MeshFunctionBool

class dolfin.cpp.mesh.MeshFunctionBool(*args)

Bases: dolfin.cpp.common.Variable, dolfin.cpp.mesh.HierarchicalMeshFunctionBool

A MeshFunction is a function that can be evaluated at a set of mesh entities. A MeshFunction is discrete and is only defined at the set of mesh entities of a fixed topological dimension. A MeshFunction may for example be used to store a global numbering scheme for the entities of a (parallel) mesh, marking sub domains or boolean markers for mesh refinement.

Overloaded versions

  • MeshFunction()

    Create empty mesh function

  • MeshFunction(mesh)

    Create empty mesh function on given mesh

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

  • MeshFunction(mesh)

    Create empty mesh function on given mesh (shared_ptr version)

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

  • MeshFunction(mesh, dim)

    Create mesh function of given dimension on given mesh

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

    dim (int)

    The mesh entity dimension for the mesh function.

  • MeshFunction(mesh, dim)

    Create mesh function of given dimension on given mesh (shared_ptr version)

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

    dim (int)

    The mesh entity dimension for the mesh function.

  • MeshFunction(mesh, dim, value)

    Create mesh of given dimension on given mesh and initialize to a value

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

    dim (int)

    The mesh entity dimension.

    value (T)

    The value.

  • MeshFunction(mesh, dim, value)

    Create mesh of given dimension on given mesh and initialize to a value (shared_ptr version)

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

    dim (int)

    The mesh entity dimension.

    value (T)

    The value.

  • MeshFunction(mesh, filename)

    Create function from data file

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

    filename (str)

    The filename to create mesh function from.

  • MeshFunction(mesh, filename)

    Create function from data file (shared_ptr version)

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

    filename (str)

    The filename to create mesh function from.

  • MeshFunction(mesh, value_collection)

    Create function from a MeshValueCollecion

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

    value_collection (MeshValueCollection)

    The mesh value collection for the mesh function data.

  • MeshFunction(mesh, value_collection)

    Create function from a MeshValueCollecion (shared_ptr version)

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

    value_collection (MeshValueCollection)

    The mesh value collection for the mesh function data.

  • MeshFunction(mesh, dim, domains)

    Create function from MeshDomains

    Arguments
    mesh (Mesh)

    The mesh to create mesh function on.

    dim (int)

    The dimension of the MeshFunction

    domains (MeshDomains)

    The domains from which to extratc the domain markers

  • MeshFunction(f)

    Copy constructor

    Arguments
    f (MeshFunction)

    The object to be copied.

array()

Return a NumPy array view of the data

dim()

Return topological dimension

Returns
int
The dimension.
empty()

Return true if empty

Returns
bool
True if empty.
init()

Overloaded versions

  • init(dim)

    Initialize mesh function for given topological dimension

    Arguments
    dim (int)

    The dimension.

  • init(dim, size)

    Initialize mesh function for given topological dimension of given size

    Arguments
    dim (int)

    The dimension.

    size (int)

    The size.

  • init(mesh, dim)

    Initialize mesh function for given topological dimension

    Arguments
    mesh (Mesh)

    The mesh.

    dim (int)

    The dimension.

  • init(mesh, dim)

    Initialize mesh function for given topological dimension (shared_ptr version)

    Arguments
    mesh (Mesh)

    The mesh.

    dim (int)

    The dimension.

  • init(mesh, dim, size)

    Initialize mesh function for given topological dimension of given size

    Arguments
    mesh (Mesh)

    The mesh.

    dim (int)

    The dimension.

    size (int)

    The size.

  • init(mesh, dim, size)

    Initialize mesh function for given topological dimension of given size (shared_ptr version)

    Arguments
    mesh (Mesh)

    The mesh.

    dim (int)

    The dimension.

    size (int)

    The size.

mesh()

Return mesh associated with mesh function

Returns
Mesh
The mesh.
set_all()

Set all values to given value

Arguments
value (T)
The value to set all values to.
set_value()

Overloaded versions

  • set_value(index, value)

    Set value at given index

    Arguments
    index (int)

    The index.

    value (T)

    The value.

  • set_value(index, value, mesh)

    Compatibility function for use in SubDomains

set_values()

Set values

Arguments
values (std::vector<T>)
The values.
size()

Return size (number of entities)

Returns
int
The size.
thisown

The membership flag