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// Modified by Cecile Daversin-Catty, 2018.
23//
24// This file duplicates the Assembler::assemble* and
25// SystemAssembler::assemble* functions in namespace dolfin, and adds
26// special versions returning the value directly for scalars. For
27// documentation, refer to Assemble.h and SystemAssemble.h
28
29#ifndef __ASSEMBLE_H
30#define __ASSEMBLE_H
31
32#include <memory>
33#include <vector>
34
35namespace dolfin
36{
37
38 class DirichletBC;
39 class Form;
40 class GenericMatrix;
41 class GenericTensor;
42 class GenericVector;
43 template<typename T> class MeshFunction;
44 class MultiMeshForm;
45
47 void assemble(GenericTensor& A, const Form& a);
48
50 void assemble_mixed(GenericTensor& A, const Form& a, bool add=false);
51
53 void assemble_system(GenericMatrix& A, GenericVector& b,
54 const Form& a, const Form& L,
55 std::vector<std::shared_ptr<const DirichletBC>> bcs);
56
59 void assemble_system(GenericMatrix& A, GenericVector& b,
60 const Form& a, const Form& L,
61 std::vector<std::shared_ptr<const DirichletBC>> bcs,
62 const GenericVector& x0);
63
65 void assemble_multimesh(GenericTensor& A, const MultiMeshForm& a);
66
67 //--- Specialized version for scalars ---
68
70 double assemble(const Form& a);
71
73 double assemble_mixed(const Form& a, bool add=false);
74
76 double assemble_multimesh(const MultiMeshForm& a);
77}
78
79#endif
Definition: adapt.h:30
void assemble_mixed(GenericTensor &A, const Form &a, bool add=false)
Assemble tensor.
Definition: assemble.cpp:38
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:45
void assemble_multimesh(GenericTensor &A, const MultiMeshForm &a)
Assemble tensor from multimesh form.
Definition: assemble.cpp:64
void assemble(GenericTensor &A, const Form &a)
Assemble tensor.
Definition: assemble.cpp:32