21 #ifndef __MULTI_MESH_DIRICHLET_BC_H 22 #define __MULTI_MESH_DIRICHLET_BC_H 26 #include <dolfin/mesh/SubDomain.h> 32 class MultiMeshFunctionSpace;
33 class GenericFunction;
64 std::shared_ptr<const GenericFunction> g,
65 std::shared_ptr<const SubDomain> sub_domain,
66 std::string method=
"topological",
67 bool check_midpoint=
true,
68 bool exclude_overlapped_boundaries=
true);
90 std::shared_ptr<const GenericFunction> g,
91 std::shared_ptr<const SubDomain> sub_domain,
93 std::string method=
"topological",
94 bool check_midpoint=
true,
95 bool exclude_overlapped_boundaries=
true);
113 std::shared_ptr<const GenericFunction> g,
115 std::size_t sub_domain,
117 std::string method=
"topological");
134 {
return _function_space; }
140 std::shared_ptr<DirichletBC>
view(std::size_t part)
const 142 return _bcs.at(part);
199 class MultiMeshSubDomain :
public SubDomain 204 MultiMeshSubDomain(std::shared_ptr<const SubDomain> sub_domain,
205 std::shared_ptr<const MultiMesh> multimesh,
206 bool exclude_overlapped_boundaries);
209 ~MultiMeshSubDomain();
215 void set_current_part(std::size_t current_part);
220 std::shared_ptr<const SubDomain> _user_sub_domain;
223 std::shared_ptr<const MultiMesh> _multimesh;
226 std::size_t _current_part;
229 bool _exclude_overlapped_boundaries;
234 std::shared_ptr<const MultiMeshFunctionSpace> _function_space;
237 std::map<std::size_t, std::shared_ptr<DirichletBC>> _bcs;
240 mutable std::shared_ptr<MultiMeshSubDomain> _sub_domain;
243 bool _exclude_overlapped_boundaries;
std::shared_ptr< DirichletBC > view(std::size_t part) const
Definition: MultiMeshDirichletBC.h:140
MultiMeshDirichletBC(std::shared_ptr< const MultiMeshFunctionSpace > V, std::shared_ptr< const GenericFunction > g, std::shared_ptr< const SubDomain > sub_domain, std::string method="topological", bool check_midpoint=true, bool exclude_overlapped_boundaries=true)
Definition: MultiMeshDirichletBC.cpp:35
~MultiMeshDirichletBC()
Destructor.
Definition: MultiMeshDirichletBC.cpp:159
Definition: SubDomain.h:42
Definition: MultiMeshDirichletBC.h:42
void homogenize()
Set value to 0.0.
Definition: MultiMeshDirichletBC.cpp:252
std::shared_ptr< const MultiMeshFunctionSpace > function_space() const
Definition: MultiMeshDirichletBC.h:133
This class defines a common interface for matrices.
Definition: GenericMatrix.h:46
void zero(GenericMatrix &A) const
Definition: MultiMeshDirichletBC.cpp:238
This class defines a common interface for vectors.
Definition: GenericVector.h:47
void apply(GenericMatrix &A) const
Definition: MultiMeshDirichletBC.cpp:164