SubDomain

class dolfin.cpp.mesh.SubDomain(map_tol=1e-10)

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.

Constructor

Arguments
map_tol (float)
The tolerance used when identifying mapped points using the function SubDomain::map.
geometric_dimension()

Return geometric dimension

Returns
int
The geometric dimension.
inside()

Return true for points inside the subdomain

Arguments
x (numpy.array(float))
The coordinates of the point.
on_boundary (bool)
True for points on the boundary.
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)

Arguments
x (numpy.array(float))
The coordinates in domain H.
y (numpy.array(float))
The coordinates in domain G.
map_tolerance
mark(*args, **kwargs)

Overloaded versions

  • mark(mesh, dim, sub_domain, check_midpoint=true)

    Set subdomain markers (std::size_t) for given topological dimension and subdomain number

    Arguments
    mesh (Mesh)

    The mesh to be marked.

    dim (int)

    The topological dimension of entities to be marked.

    sub_domain (int)

    The subdomain number.

    check_midpoint (bool)

    Flag for whether midpoint of cell should be checked (default).

  • mark(sub_domains, sub_domain, check_midpoint=true)

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

    Arguments
    sub_domains (MeshFunction)

    The subdomain markers.

    sub_domain (int)

    The subdomain number.

    check_midpoint (bool)

    Flag for whether midpoint of cell should be checked (default).

  • mark(sub_domains, sub_domain, check_midpoint=true)

    Set subdomain markers (int) for given subdomain number

    Arguments
    sub_domains (MeshFunction)

    The subdomain markers.

    sub_domain (int)

    The subdomain number.

    check_midpoint (bool)

    Flag for whether midpoint of cell should be checked (default).

  • mark(sub_domains, sub_domain, check_midpoint=true)

    Set subdomain markers (double) for given subdomain number

    Arguments
    sub_domains (MeshFunction)

    The subdomain markers.

    sub_domain (float)

    The subdomain number.

    check_midpoint (bool)

    Flag for whether midpoint of cell should be checked (default).

  • mark(sub_domains, sub_domain, check_midpoint=true)

    Set subdomain markers (bool) for given subdomain

    Arguments
    sub_domains (MeshFunction)

    The subdomain markers.

    sub_domain (bool)

    The subdomain number.

    check_midpoint (bool)

    Flag for whether midpoint of cell should be checked (default).

  • mark(sub_domains, sub_domain, mesh, check_midpoint=true)

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

    Arguments
    sub_domains (MeshValueCollection)

    The subdomain markers.

    sub_domain (int)

    The subdomain number.

    mesh (Mesh)

    The mesh.

    check_midpoint (bool)

    Flag for whether midpoint of cell should be checked (default).

  • mark(sub_domains, sub_domain, mesh, check_midpoint=true)

    Set subdomain markers (int) for given subdomain number

    Arguments
    sub_domains (MeshValueCollection)

    The subdomain markers

    sub_domain (int)

    The subdomain number

    check_midpoint (bool)

    Flag for whether midpoint of cell should be checked (default).

  • mark(sub_domains, sub_domain, mesh, check_midpoint=true)

    Set subdomain markers (double) for given subdomain number

    Arguments
    sub_domains (MeshValueCollection)

    The subdomain markers.

    sub_domain (float)

    The subdomain number

    check_midpoint (bool)

    Flag for whether midpoint of cell should be checked (default).

  • mark(sub_domains, sub_domain, mesh, check_midpoint=true)

    Set subdomain markers (bool) for given subdomain

    Arguments
    sub_domains (MeshValueCollection)

    The subdomain markers

    sub_domain (bool)

    The subdomain number

    check_midpoint (bool)

    Flag for whether midpoint of cell should be checked (default).

mark_cells()

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

Arguments
mesh (Mesh)
The mesh to be marked.
sub_domain (int)
The subdomain number.
check_midpoint (bool)
Flag for whether midpoint of cell should be checked (default).
mark_facets()

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

Arguments
mesh (Mesh)
The mesh to be marked.
sub_domain (int)
The subdomain number.
check_midpoint (bool)
Flag for whether midpoint of cell should be checked (default).
snap()

Snap coordinate to boundary of subdomain

Arguments
x (numpy.array(float))
The coordinates.
thisown

The membership flag