SubDomain.h¶
Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
-
class
SubDomain
¶ This class defines the interface for definition of subdomains. Alternatively, subdomains may be defined by a
Mesh
and a MeshFunction<std::size_t> over the mesh.-
SubDomain
(const double map_tol = 1.0e-10)¶ Constructor
- @param map_tol (double)
- The tolerance used when identifying mapped points using the function SubDomain::map.
-
bool
inside
(const Array<double> &x, bool on_boundary) const¶ Return true for points inside the subdomain
- @param x (Array<double>)
- The coordinates of the point.
- @param on_boundary (bool)
- True for points on the boundary.
- @return bool
- True for points inside the subdomain.
-
bool
inside
(Eigen::Ref<const Eigen::VectorXd> x, bool on_boundary) const¶ Return true for points inside the subdomain
- @param x (Eigen::Ref<const Eigen::VectorXd>)
- The coordinates of the point.
- @param on_boundary (bool)
- True for points on the boundary.
- @return bool
- True for points inside the subdomain.
-
void
map
(const Array<double> &x, Array<double> &y) const¶ Map coordinate x in domain H to coordinate y in domain G (used for periodic boundary conditions)
- @param x (Array<double>)
- The coordinates in domain H.
- @param y (Array<double>)
- The coordinates in domain G.
-
void
map
(Eigen::Ref<const Eigen::VectorXd> x, Eigen::Ref<Eigen::VectorXd> y) const¶ Map coordinate x in domain H to coordinate y in domain G (used for periodic boundary conditions)
- @param x (Eigen::Ref<const Eigen::VectorXd>)
- The coordinates in domain H.
- @param y (Eigen::Ref<Eigen::VectorXd>)
- The coordinates in domain G.
-
void
snap
(Array<double> &x) const¶ Snap coordinate to boundary of subdomain
- @param x (Array<double>)
- The coordinates.
-
void
mark_cells
(Mesh &mesh, std::size_t sub_domain, bool check_midpoint = true) const¶ Set subdomain markers (std::size_t) on cells for given subdomain number
- @param mesh (
Mesh
) - The mesh to be marked.
- @param sub_domain (std::size_t)
- The subdomain number.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
- @param mesh (
-
void
mark_facets
(Mesh &mesh, std::size_t sub_domain, bool check_midpoint = true) const¶ Set subdomain markers (std::size_t) on facets for given subdomain number
- @param mesh (
Mesh
) - The mesh to be marked.
- @param sub_domain (std::size_t)
- The subdomain number.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
- @param mesh (
-
void
mark
(Mesh &mesh, std::size_t dim, std::size_t sub_domain, bool check_midpoint = true) const¶ Set subdomain markers (std::size_t) for given topological dimension and subdomain number
- @param mesh (
Mesh
) - The mesh to be marked.
- @param dim (std::size_t)
- The topological dimension of entities to be marked.
- @param sub_domain (std::size_t)
- The subdomain number.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
- @param mesh (
-
void
mark
(MeshFunction<std::size_t> &sub_domains, std::size_t sub_domain, bool check_midpoint = true) const¶ Set subdomain markers (std::size_t) for given subdomain number
- @param sub_domains (MeshFunction<std::size_t>)
- The subdomain markers.
- @param sub_domain (std::size_t)
- The subdomain number.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
-
void
mark
(MeshFunction<int> &sub_domains, int sub_domain, bool check_midpoint = true) const¶ Set subdomain markers (int) for given subdomain number
- @param sub_domains (MeshFunction<int>)
- The subdomain markers.
- @param sub_domain (int)
- The subdomain number.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
-
void
mark
(MeshFunction<double> &sub_domains, double sub_domain, bool check_midpoint = true) const¶ Set subdomain markers (double) for given subdomain number
- @param sub_domains (MeshFunction<double>)
- The subdomain markers.
- @param sub_domain (double)
- The subdomain number.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
-
void
mark
(MeshFunction<bool> &sub_domains, bool sub_domain, bool check_midpoint = true) const¶ Set subdomain markers (bool) for given subdomain
- @param sub_domains (MeshFunction<bool>)
- The subdomain markers.
- @param sub_domain (bool)
- The subdomain number.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
-
void
mark
(MeshValueCollection<std::size_t> &sub_domains, std::size_t sub_domain, const Mesh &mesh, bool check_midpoint = true) const¶ Set subdomain markers (std::size_t) for given subdomain number
- @param sub_domains (MeshValueCollection<std::size_t>)
- The subdomain markers.
- @param sub_domain (std::size_t)
- The subdomain number.
- @param mesh (
Mesh
) - The mesh.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
-
void
mark
(MeshValueCollection<int> &sub_domains, int sub_domain, const Mesh &mesh, bool check_midpoint = true) const¶ Set subdomain markers (int) for given subdomain number
- @param sub_domains (MeshValueCollection<int>)
- The subdomain markers
- @param sub_domain (int)
- The subdomain number
- @param mesh (Mesh)
- The mesh.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
-
void
mark
(MeshValueCollection<double> &sub_domains, double sub_domain, const Mesh &mesh, bool check_midpoint = true) const¶ Set subdomain markers (double) for given subdomain number
- @param sub_domains (MeshValueCollection<double>)
- The subdomain markers.
- @param sub_domain (double)
- The subdomain number
- @param mesh (Mesh)
- The mesh.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
-
void
mark
(MeshValueCollection<bool> &sub_domains, bool sub_domain, const Mesh &mesh, bool check_midpoint = true) const¶ Set subdomain markers (bool) for given subdomain
- @param sub_domains (MeshValueCollection<bool>)
- The subdomain markers
- @param sub_domain (bool)
- The subdomain number
- @param mesh (Mesh)
- The mesh.
- @param check_midpoint (bool)
- Flag for whether midpoint of cell should be checked (default).
-
std::size_t
geometric_dimension
() const¶ Return geometric dimension
- @return std::size_t
- The geometric dimension.
-
void
set_property
(std::string name, double value)¶ Property setter
@param name @param value
-
double
get_property
(std::string name) const¶ Property getter
@param name @return double
-