SubDomain

class dolfin.cpp.mesh.SubDomain

Bases: object

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.

Friends: DirichletBC, PeriodicBC.

Constructor

Parameters:double map_tol (const) – (double) The tolerance used when identifying mapped points using the function SubDomain::map .
geometric_dimension()

Return geometric dimension

Return type:std::size_t
Returns:std::size_t The geometric dimension.
get_property()

Property getter

Parameters:name (std::string) –
Return type:double
Returns:double
inside()

Return true for points inside the subdomain

Parameters:
  • Array< double > & x (const) – (Array<double>) The coordinates of the point.
  • on_boundary (bool) – (bool) True for points on the boundary.
Return type:

bool

Returns:

bool True for points inside the subdomain.

map()

Map coordinate x in domain H to coordinate y in domain G (used for periodic boundary conditions)

Parameters:
  • Array< double > & x (const) – (Array<double>) The coordinates in domain H.
  • double > & y (Array<) – (Array<double>) The coordinates in domain G.
Return type:

void

map_tolerance

Return tolerance uses to find matching point via map function

Return type:const double
Returns:double The tolerance.
mark(*args, **kwargs)

Set subdomain markers (bool) for given subdomain

Parameters:
  • bool > & sub_domains (MeshValueCollection<) – (MeshValueCollection<bool>) The subdomain markers
  • sub_domain (bool) – (bool) The subdomain number
  • Mesh & mesh (const) – (Mesh ) The mesh.
  • check_midpoint (bool) – (bool) Flag for whether midpoint of cell should be checked (default).
Return type:

void

mark_cells()

Set subdomain markers (std::size_t) on cells for given subdomain number

Parameters:
  • & mesh (Mesh) – (Mesh ) The mesh to be marked.
  • sub_domain (std::size_t) – (std::size_t) The subdomain number.
  • check_midpoint (bool) – (bool) Flag for whether midpoint of cell should be checked (default).
Return type:

void

mark_facets()

Set subdomain markers (std::size_t) on facets for given subdomain number

Parameters:
  • & mesh (Mesh) – (Mesh ) The mesh to be marked.
  • sub_domain (std::size_t) – (std::size_t) The subdomain number.
  • check_midpoint (bool) – (bool) Flag for whether midpoint of cell should be checked (default).
Return type:

void

set_property()

Property setter

Parameters:
  • name (std::string) –
  • value (double) –
Return type:

void

snap()

Snap coordinate to boundary of subdomain

Parameters:double > & x (Array<) – (Array<double>) The coordinates.
Return type:void
thisown

The membership flag