DOLFIN
DOLFIN C++ interface
assemble.h
1 // Copyright (C) 2007-2015 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, 2008-2013.
19 // Modified by Johan Hake, 2009.
20 // Modified by Joachim B. Haga, 2012.
21 // Modified by Martin S. Alnaes, 2013.
22 //
23 // This file duplicates the Assembler::assemble* and
24 // SystemAssembler::assemble* functions in namespace dolfin, and adds
25 // special versions returning the value directly for scalars. For
26 // documentation, refer to Assemble.h and SystemAssemble.h
27 
28 #ifndef __ASSEMBLE_H
29 #define __ASSEMBLE_H
30 
31 #include <memory>
32 #include <vector>
33 
34 namespace dolfin
35 {
36 
37  class DirichletBC;
38  class Form;
39  class GenericMatrix;
40  class GenericTensor;
41  class GenericVector;
42  template<typename T> class MeshFunction;
43  class MultiMeshForm;
44 
46  void assemble(GenericTensor& A, const Form& a);
47 
49  void assemble_system(GenericMatrix& A, GenericVector& b,
50  const Form& a, const Form& L,
51  std::vector<std::shared_ptr<const DirichletBC>> bcs);
52 
55  void assemble_system(GenericMatrix& A, GenericVector& b,
56  const Form& a, const Form& L,
57  std::vector<std::shared_ptr<const DirichletBC>> bcs,
58  const GenericVector& x0);
59 
61  void assemble_multimesh(GenericTensor& A, const MultiMeshForm& a);
62 
63  //--- Specialized version for scalars ---
64 
66  double assemble(const Form& a);
67 
69  double assemble_multimesh(const MultiMeshForm& a);
70 }
71 
72 #endif
Definition: adapt.h:29
void assemble_system(GenericMatrix &A, GenericVector &b, const Form &a, const Form &L, std::vector< std::shared_ptr< const DirichletBC >> bcs)
Assemble system (A, b) and apply Dirichlet boundary conditions.
Definition: assemble.cpp:37
void assemble_multimesh(GenericTensor &A, const MultiMeshForm &a)
Assemble tensor from multimesh form.
Definition: assemble.cpp:56
void assemble(GenericTensor &A, const Form &a)
Assemble tensor.
Definition: assemble.cpp:31