DOLFIN
DOLFIN C++ interface
AssemblerBase.h
1 // Copyright (C) 2007-2009 Anders Logg
2 //
3 // This file is part of DOLFIN.
4 //
5 // DOLFIN is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // DOLFIN is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // Modified by Garth N. Wells, 2007-2008.
19 // Modified by Ola Skavhaug, 2008.
20 //
21 // First added: 2007-01-17
22 // Last changed: 2013-09-19
23 
24 #ifndef __ASSEMBLER_BASE_H
25 #define __ASSEMBLER_BASE_H
26 
27 #include <string>
28 #include <utility>
29 #include <vector>
30 #include <dolfin/common/types.h>
31 #include <dolfin/log/log.h>
32 
33 namespace dolfin
34 {
35 
36  // Forward declarations
37  class GenericTensor;
38  class Form;
39 
42  {
43  public:
44 
47  keep_diagonal(false) {}
48 
53  bool add_values;
54 
61 
68 
74  void init_global_tensor(GenericTensor& A, const Form& a);
75 
76  protected:
77 
79  static void check(const Form& a);
80 
82  static std::string progress_message(std::size_t rank,
83  std::string integral_type);
84 
85  };
86 
87 }
88 
89 #endif
bool add_values
Definition: AssemblerBase.h:53
bool keep_diagonal
Definition: AssemblerBase.h:67
static void check(const Form &a)
Check form.
Definition: AssemblerBase.cpp:198
Base class for UFC code generated by FFC for DOLFIN with option -l.
Definition: Form.h:85
AssemblerBase()
Constructor.
Definition: AssemblerBase.h:46
bool finalize_tensor
Definition: AssemblerBase.h:60
void init_global_tensor(GenericTensor &A, const Form &a)
Definition: AssemblerBase.cpp:48
Definition: adapt.h:29
A common interface for arbitrary rank tensors.
Definition: GenericTensor.h:48
Provide some common functions used in assembler classes.
Definition: AssemblerBase.h:41
static std::string progress_message(std::size_t rank, std::string integral_type)
Pretty-printing for progress bar.
Definition: AssemblerBase.cpp:314