.. Documentation for the header file dolfin/mesh/SubDomain.h .. _programmers_reference_cpp_mesh_subdomain: SubDomain.h =========== .. note:: The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded. .. cpp:class:: SubDomain This class defines the interface for definition of subdomains. Alternatively, subdomains may be defined by a :cpp:class:`Mesh` and a MeshFunction over the mesh. .. cpp:function:: 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. .. cpp:function:: bool inside(const Array& x, bool on_boundary) const Return true for points inside the subdomain @param x (Array) The coordinates of the point. @param on_boundary (bool) True for points on the boundary. @return bool True for points inside the subdomain. .. cpp:function:: bool inside(Eigen::Ref x, bool on_boundary) const Return true for points inside the subdomain @param x (Eigen::Ref) The coordinates of the point. @param on_boundary (bool) True for points on the boundary. @return bool True for points inside the subdomain. .. cpp:function:: void map(const Array& x, Array& y) const Map coordinate x in domain H to coordinate y in domain G (used for periodic boundary conditions) @param x (Array) The coordinates in domain H. @param y (Array) The coordinates in domain G. .. cpp:function:: void map(Eigen::Ref x, Eigen::Ref y) const Map coordinate x in domain H to coordinate y in domain G (used for periodic boundary conditions) @param x (Eigen::Ref) The coordinates in domain H. @param y (Eigen::Ref) The coordinates in domain G. .. cpp:function:: void snap(Array& x) const Snap coordinate to boundary of subdomain @param x (Array) The coordinates. .. cpp:function:: 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 (:cpp:class:`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). .. cpp:function:: 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 (:cpp:class:`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). .. cpp:function:: 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 (:cpp:class:`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). .. cpp:function:: void mark(MeshFunction& 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) 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). .. cpp:function:: void mark(MeshFunction& sub_domains, int sub_domain, bool check_midpoint=true) const Set subdomain markers (int) for given subdomain number @param sub_domains (MeshFunction) The subdomain markers. @param sub_domain (int) The subdomain number. @param check_midpoint (bool) Flag for whether midpoint of cell should be checked (default). .. cpp:function:: void mark(MeshFunction& sub_domains, double sub_domain, bool check_midpoint=true) const Set subdomain markers (double) for given subdomain number @param sub_domains (MeshFunction) The subdomain markers. @param sub_domain (double) The subdomain number. @param check_midpoint (bool) Flag for whether midpoint of cell should be checked (default). .. cpp:function:: void mark(MeshFunction& sub_domains, bool sub_domain, bool check_midpoint=true) const Set subdomain markers (bool) for given subdomain @param sub_domains (MeshFunction) The subdomain markers. @param sub_domain (bool) The subdomain number. @param check_midpoint (bool) Flag for whether midpoint of cell should be checked (default). .. cpp:function:: void mark(MeshValueCollection& 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) The subdomain markers. @param sub_domain (std::size_t) The subdomain number. @param mesh (:cpp:class:`Mesh`) The mesh. @param check_midpoint (bool) Flag for whether midpoint of cell should be checked (default). .. cpp:function:: void mark(MeshValueCollection& 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) 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). .. cpp:function:: void mark(MeshValueCollection& 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) 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). .. cpp:function:: void mark(MeshValueCollection& sub_domains, bool sub_domain, const Mesh& mesh, bool check_midpoint=true) const Set subdomain markers (bool) for given subdomain @param sub_domains (MeshValueCollection) 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). .. cpp:function:: std::size_t geometric_dimension() const Return geometric dimension @return std::size_t The geometric dimension. .. cpp:function:: void set_property(std::string name, double value) Property setter @param name @param value .. cpp:function:: double get_property(std::string name) const Property getter @param name @return double .. cpp:function:: void apply_markers(S& sub_domains, T sub_domain, const Mesh& mesh, bool check_midpoint) const Apply marker of type T (most likely an std::size_t) to object of class S (most likely MeshFunction or MeshValueCollection)