DOLFIN
DOLFIN C++ interface
|
Degree-of-freedom map. More...
#include <DofMap.h>
Public Member Functions | |
DofMap (std::shared_ptr< const ufc::dofmap > ufc_dofmap, const Mesh &mesh) | |
DofMap (std::shared_ptr< const ufc::dofmap > ufc_dofmap, const Mesh &mesh, std::shared_ptr< const SubDomain > constrained_domain) | |
~DofMap () | |
Destructor. | |
bool | is_view () const |
std::size_t | global_dimension () const |
std::size_t | num_element_dofs (std::size_t cell_index) const |
std::size_t | max_element_dofs () const |
virtual std::size_t | num_entity_dofs (std::size_t entity_dim) const |
virtual std::size_t | num_entity_closure_dofs (std::size_t entity_dim) const |
std::size_t | num_facet_dofs () const |
std::pair< std::size_t, std::size_t > | ownership_range () const |
const std::vector< int > & | off_process_owner () const |
const std::unordered_map< int, std::vector< int > > & | shared_nodes () const |
const std::set< int > & | neighbours () const |
void | clear_sub_map_data () |
Eigen::Map< const Eigen::Array< dolfin::la_index, Eigen::Dynamic, 1 > > | cell_dofs (std::size_t cell_index) const |
std::vector< dolfin::la_index > | entity_dofs (const Mesh &mesh, std::size_t entity_dim, const std::vector< std::size_t > &entity_indices) const |
std::vector< dolfin::la_index > | entity_dofs (const Mesh &mesh, std::size_t entity_dim) const |
std::vector< dolfin::la_index > | entity_closure_dofs (const Mesh &mesh, std::size_t entity_dim, const std::vector< std::size_t > &entity_indices) const |
std::vector< dolfin::la_index > | entity_closure_dofs (const Mesh &mesh, std::size_t entity_dim) const |
void | tabulate_facet_dofs (std::vector< std::size_t > &element_dofs, std::size_t cell_facet_index) const |
void | tabulate_entity_dofs (std::vector< std::size_t > &element_dofs, std::size_t entity_dim, std::size_t cell_entity_index) const |
void | tabulate_entity_closure_dofs (std::vector< std::size_t > &element_dofs, std::size_t entity_dim, std::size_t cell_entity_index) const |
void | tabulate_global_dofs (std::vector< std::size_t > &element_dofs) const |
std::shared_ptr< GenericDofMap > | copy () const |
std::shared_ptr< GenericDofMap > | create (const Mesh &new_mesh) const |
std::shared_ptr< GenericDofMap > | extract_sub_dofmap (const std::vector< std::size_t > &component, const Mesh &mesh) const |
std::shared_ptr< GenericDofMap > | collapse (std::unordered_map< std::size_t, std::size_t > &collapsed_map, const Mesh &mesh) const |
std::vector< dolfin::la_index > | dofs (const Mesh &mesh, std::size_t dim) const |
std::vector< dolfin::la_index > | dofs () const |
Return list of global dof indices on this process. | |
void | set (GenericVector &x, double value) const |
std::shared_ptr< const IndexMap > | index_map () const |
Return the map (const access) | |
int | block_size () const |
void | tabulate_local_to_global_dofs (std::vector< std::size_t > &local_to_global_map) const |
std::size_t | local_to_global_index (int local_index) const |
const std::vector< std::size_t > & | local_to_global_unowned () const |
Return indices of dofs which are owned by other processes. | |
std::string | str (bool verbose) const |
Public Member Functions inherited from dolfin::GenericDofMap | |
GenericDofMap () | |
Constructor. | |
std::size_t | cell_dimension (std::size_t index) const |
std::size_t | max_cell_dimension () const |
Public Member Functions inherited from dolfin::Variable | |
Variable () | |
Create unnamed variable. | |
Variable (const std::string name, const std::string label) | |
Create variable with given name and label. | |
Variable (const Variable &variable) | |
Copy constructor. | |
virtual | ~Variable () |
Destructor. | |
const Variable & | operator= (const Variable &variable) |
Assignment operator. | |
void | rename (const std::string name, const std::string label) |
Rename variable. | |
std::string | name () const |
Return name. | |
std::string | label () const |
Return label (description) | |
std::size_t | id () const |
Friends | |
class | DofMapBuilder |
class | MultiMeshDofMap |
Additional Inherited Members | |
Public Attributes inherited from dolfin::GenericDofMap | |
std::shared_ptr< const SubDomain > | constrained_domain |
Public Attributes inherited from dolfin::Variable | |
Parameters | parameters |
Parameters. | |
Degree-of-freedom map.
This class handles the mapping of degrees of freedom. It builds a dof map based on a ufc::dofmap on a specific mesh. It will reorder the dofs when running in parallel. Sub-dofmaps, both views and copies, are supported.
DofMap::DofMap | ( | std::shared_ptr< const ufc::dofmap > | ufc_dofmap, |
const Mesh & | mesh | ||
) |
Create dof map on mesh (mesh is not stored)
[in] | ufc_dofmap | (ufc::dofmap) The ufc::dofmap. |
[in] | mesh | (Mesh&) The mesh. |
|
inlinevirtual |
Return the block size for dof maps with components, typically used for vector valued functions.
Implements dolfin::GenericDofMap.
|
inlinevirtual |
Local-to-global mapping of dofs on a cell
cell_index | (std::size_t) The cell index. |
Implements dolfin::GenericDofMap.
|
inlinevirtual |
Clear any data required to build sub-dofmaps (this is to reduce memory use)
Implements dolfin::GenericDofMap.
|
virtual |
Create a "collapsed" dofmap (collapses a sub-dofmap)
collapsed_map | (std::unordered_map<std::size_t, std::size_t>) The "collapsed" map. |
mesh | (Mesh) The mesh. |
Implements dolfin::GenericDofMap.
|
virtual |
|
virtual |
Create a copy of the dof map on a new mesh
new_mesh | (Mesh) The new mesh to create the dof map on. |
Implements dolfin::GenericDofMap.
|
virtual |
Return list of dof indices on this process that belong to mesh entities of dimension dim
Implements dolfin::GenericDofMap.
|
virtual |
Return the dof indices associated with the closure of entities of given dimension and entity indices
Arguments entity_dim (std::size_t) Entity dimension. entity_indices (std::vector<dolfin::la_index>&) Entity indices to get dofs for. Returns std::vector<dolfin::la_index> Dof indices associated with selected entities and their closure.
Implements dolfin::GenericDofMap.
|
virtual |
Return the dof indices associated with the closure of all entities of given dimension
Implements dolfin::GenericDofMap.
|
virtual |
Return the dof indices associated with entities of given dimension and entity indices
Arguments entity_dim (std::size_t) Entity dimension. entity_indices (std::vector<dolfin::la_index>&) Entity indices to get dofs for. Returns std::vector<dolfin::la_index> Dof indices associated with selected entities.
Implements dolfin::GenericDofMap.
|
virtual |
Return the dof indices associated with all entities of given dimension
Arguments entity_dim (std::size_t) Entity dimension. Returns std::vector<dolfin::la_index> Dof indices associated with selected entities.
Implements dolfin::GenericDofMap.
|
virtual |
Extract subdofmap component
component | (std::vector<std::size_t>) The component. |
mesh | (Mesh) The mesh. |
Implements dolfin::GenericDofMap.
|
virtual |
Return the dimension of the global finite element function space. Use index_map()->size() to get the local dimension.
Returns std::size_t The dimension of the global finite element function space.
Implements dolfin::GenericDofMap.
|
inlinevirtual |
True iff dof map is a view into another map
Returns bool True if the dof map is a sub-dof map (a view into another map).
Implements dolfin::GenericDofMap.
|
inlinevirtual |
Return global dof index for a given local (process) dof index
local_index | (int) The local local index. |
Implements dolfin::GenericDofMap.
|
virtual |
Return the maximum dimension of the local finite element function space
Implements dolfin::GenericDofMap.
|
virtual |
Return set of processes that share dofs with this process
Implements dolfin::GenericDofMap.
|
virtual |
Return the dimension of the local finite element function space on a cell
cell_index | (std::size_t) Index of cell |
Implements dolfin::GenericDofMap.
|
virtual |
Return the number of dofs for the closure of an entity of given dimension
Arguments entity_dim (std::size_t) Entity dimension
Returns std::size_t Number of dofs associated with closure of an entity of given dimension
Implements dolfin::GenericDofMap.
|
virtual |
Return the number of dofs for a given entity dimension
entity_dim | (std::size_t) Entity dimension |
Implements dolfin::GenericDofMap.
|
virtual |
Return number of facet dofs
Implements dolfin::GenericDofMap.
|
inlinevirtual |
Return map from nonlocal dofs that appear in local dof map to owning process
Implements dolfin::GenericDofMap.
|
virtual |
Return the ownership range (dofs in this range are owned by this process)
Implements dolfin::GenericDofMap.
|
virtual |
Set dof entries in vector to a specified value. Parallel layout of vector must be consistent with dof map range. This function is typically used to construct the null space of a matrix operator.
x | (GenericVector) The vector to set. |
value | (double) The value to set. |
Implements dolfin::GenericDofMap.
|
virtual |
Return map from all shared nodes to the sharing processes (not including the current process) that share it.
Implements dolfin::GenericDofMap.
|
virtual |
Return informal string representation (pretty-print)
verbose | (bool) Flag to turn on additional output. |
Implements dolfin::GenericDofMap.
|
virtual |
Tabulate local-local mapping of dofs on closure of entity (dim, local_entity)
element_dofs | (std::size_t) Degrees of freedom on a single element. |
entity_dim | (std::size_t) The entity dimension. |
cell_entity_index | (std::size_t) The local entity index on the cell. |
Implements dolfin::GenericDofMap.
|
virtual |
Tabulate local-local mapping of dofs on entity (dim, local_entity)
element_dofs | (std::size_t) Degrees of freedom on a single element. |
entity_dim | (std::size_t) The entity dimension. |
cell_entity_index | (std::size_t) The local entity index on the cell. |
Implements dolfin::GenericDofMap.
|
virtual |
Tabulate local-local facet dofs
element_dofs | (std::size_t) Degrees of freedom on a single element. |
cell_facet_index | (std::size_t) The local facet index on the cell. |
Implements dolfin::GenericDofMap.
|
inlinevirtual |
Tabulate globally supported dofs
element_dofs | (std::size_t) Degrees of freedom. |
Implements dolfin::GenericDofMap.
|
virtual |
Compute the map from local (this process) dof indices to global dof indices.
local_to_global_map | (std::vector<std::size_t>) The local-to-global map to fill. |
Implements dolfin::GenericDofMap.