DOLFIN
DOLFIN C++ interface
Public Member Functions | Public Attributes | List of all members
dolfin::GenericDofMap Class Referenceabstract

This class provides a generic interface for dof maps. More...

#include <GenericDofMap.h>

Inheritance diagram for dolfin::GenericDofMap:
Inheritance graph
[legend]
Collaboration diagram for dolfin::GenericDofMap:
Collaboration graph
[legend]

Public Member Functions

 GenericDofMap ()
 Constructor.
 
virtual bool is_view () const =0
 True if dof map is a view into another map (is a sub-dofmap) More...
 
virtual std::size_t global_dimension () const =0
 
std::size_t cell_dimension (std::size_t index) const
 
std::size_t max_cell_dimension () const
 
virtual std::size_t num_element_dofs (std::size_t index) const =0
 
virtual std::size_t max_element_dofs () const =0
 
virtual std::size_t num_entity_dofs (std::size_t entity_dim) const =0
 Return the number of dofs for a given entity dimension. More...
 
virtual std::size_t num_entity_closure_dofs (std::size_t entity_dim) const =0
 Return the number of dofs for closure of entity of given dimension. More...
 
virtual std::size_t num_facet_dofs () const =0
 Return number of facet dofs. More...
 
virtual std::pair< std::size_t, std::size_t > ownership_range () const =0
 
virtual const std::vector< int > & off_process_owner () const =0
 
virtual Eigen::Map< const Eigen::Array< dolfin::la_index, Eigen::Dynamic, 1 > > cell_dofs (std::size_t cell_index) const =0
 Local-to-global mapping of dofs on a cell. More...
 
virtual std::vector< dolfin::la_indexentity_dofs (const Mesh &mesh, std::size_t entity_dim, const std::vector< std::size_t > &entity_indices) const =0
 Return the dof indices associated with entities of given dimension and entity indices. More...
 
virtual std::vector< dolfin::la_indexentity_dofs (const Mesh &mesh, std::size_t entity_dim) const =0
 Return the dof indices associated with all entities of given dimension. More...
 
virtual std::vector< dolfin::la_indexentity_closure_dofs (const Mesh &mesh, std::size_t entity_dim, const std::vector< std::size_t > &entity_indices) const =0
 
virtual std::vector< dolfin::la_indexentity_closure_dofs (const Mesh &mesh, std::size_t entity_dim) const =0
 
virtual void tabulate_facet_dofs (std::vector< std::size_t > &element_dofs, std::size_t cell_facet_index) const =0
 Tabulate local-local facet dofs. More...
 
virtual void tabulate_entity_dofs (std::vector< std::size_t > &element_dofs, std::size_t entity_dim, std::size_t cell_entity_index) const =0
 
virtual void tabulate_entity_closure_dofs (std::vector< std::size_t > &element_dofs, std::size_t entity_dim, std::size_t cell_entity_index) const =0
 
virtual void tabulate_global_dofs (std::vector< std::size_t > &dofs) const =0
 Tabulate globally supported dofs. More...
 
virtual std::shared_ptr< GenericDofMapcopy () const =0
 Create a copy of the dof map. More...
 
virtual std::shared_ptr< GenericDofMapcreate (const Mesh &new_mesh) const =0
 Create a new dof map on new mesh. More...
 
virtual std::shared_ptr< GenericDofMapextract_sub_dofmap (const std::vector< std::size_t > &component, const Mesh &mesh) const =0
 Extract sub dofmap component. More...
 
virtual std::shared_ptr< GenericDofMapcollapse (std::unordered_map< std::size_t, std::size_t > &collapsed_map, const Mesh &mesh) const =0
 Create a "collapsed" a dofmap (collapses from a sub-dofmap view) More...
 
virtual std::vector< dolfin::la_indexdofs (const Mesh &mesh, std::size_t dim) const =0
 
virtual std::vector< dolfin::la_indexdofs () const =0
 Return list of global dof indices on this process. More...
 
virtual void set (GenericVector &x, double value) const =0
 
virtual const std::vector< std::size_t > & local_to_global_unowned () const =0
 
virtual std::shared_ptr< const IndexMapindex_map () const =0
 Index map (const access) More...
 
virtual void tabulate_local_to_global_dofs (std::vector< std::size_t > &local_to_global_map) const =0
 Tabulate map between local (process) and global dof indices. More...
 
virtual std::size_t local_to_global_index (int local_index) const =0
 Return global dof index corresponding to a given local index. More...
 
virtual const std::unordered_map< int, std::vector< int > > & shared_nodes () const =0
 
virtual const std::set< int > & neighbours () const =0
 Return set of processes that share dofs with the this process. More...
 
virtual void clear_sub_map_data ()=0
 
virtual std::string str (bool verbose) const =0
 Return informal string representation (pretty-print) More...
 
virtual int block_size () const =0
 Get block size. More...
 
- 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 Variableoperator= (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
 
virtual std::string str (bool verbose) const
 Return informal string representation (pretty-print) More...
 

Public Attributes

std::shared_ptr< const SubDomainconstrained_domain
 
- Public Attributes inherited from dolfin::Variable
Parameters parameters
 Parameters.
 

Detailed Description

This class provides a generic interface for dof maps.

Member Function Documentation

◆ block_size()

virtual int dolfin::GenericDofMap::block_size ( ) const
pure virtual

Get block size.

Implemented in dolfin::DofMap.

◆ cell_dimension()

std::size_t dolfin::GenericDofMap::cell_dimension ( std::size_t  index) const
inline

Return the dimension of the local finite element function space on a cell (deprecated API)

◆ cell_dofs()

virtual Eigen::Map< const Eigen::Array< dolfin::la_index, Eigen::Dynamic, 1 > > dolfin::GenericDofMap::cell_dofs ( std::size_t  cell_index) const
pure virtual

Local-to-global mapping of dofs on a cell.

Implemented in dolfin::DofMap.

◆ clear_sub_map_data()

virtual void dolfin::GenericDofMap::clear_sub_map_data ( )
pure virtual

Clear any data required to build sub-dofmaps (this is to reduce memory use)

Implemented in dolfin::DofMap.

◆ collapse()

virtual std::shared_ptr< GenericDofMap > dolfin::GenericDofMap::collapse ( std::unordered_map< std::size_t, std::size_t > &  collapsed_map,
const Mesh mesh 
) const
pure virtual

Create a "collapsed" a dofmap (collapses from a sub-dofmap view)

Implemented in dolfin::DofMap.

◆ copy()

virtual std::shared_ptr< GenericDofMap > dolfin::GenericDofMap::copy ( ) const
pure virtual

Create a copy of the dof map.

Implemented in dolfin::DofMap.

◆ create()

virtual std::shared_ptr< GenericDofMap > dolfin::GenericDofMap::create ( const Mesh new_mesh) const
pure virtual

Create a new dof map on new mesh.

Implemented in dolfin::DofMap.

◆ dofs() [1/2]

virtual std::vector< dolfin::la_index > dolfin::GenericDofMap::dofs ( ) const
pure virtual

Return list of global dof indices on this process.

Implemented in dolfin::DofMap.

◆ dofs() [2/2]

virtual std::vector< dolfin::la_index > dolfin::GenericDofMap::dofs ( const Mesh mesh,
std::size_t  dim 
) const
pure virtual

Return list of dof indices on this process that belong to mesh entities of dimension dim

Implemented in dolfin::DofMap.

◆ entity_closure_dofs() [1/2]

virtual std::vector< dolfin::la_index > dolfin::GenericDofMap::entity_closure_dofs ( const Mesh mesh,
std::size_t  entity_dim 
) const
pure virtual

Return the dof indices associated with the closure of all entities of given dimension

Implemented in dolfin::DofMap.

◆ entity_closure_dofs() [2/2]

virtual std::vector< dolfin::la_index > dolfin::GenericDofMap::entity_closure_dofs ( const Mesh mesh,
std::size_t  entity_dim,
const std::vector< std::size_t > &  entity_indices 
) const
pure virtual

Return the dof indices associated with the closure of entities of given dimension and entity indices

Implemented in dolfin::DofMap.

◆ entity_dofs() [1/2]

virtual std::vector< dolfin::la_index > dolfin::GenericDofMap::entity_dofs ( const Mesh mesh,
std::size_t  entity_dim 
) const
pure virtual

Return the dof indices associated with all entities of given dimension.

Implemented in dolfin::DofMap.

◆ entity_dofs() [2/2]

virtual std::vector< dolfin::la_index > dolfin::GenericDofMap::entity_dofs ( const Mesh mesh,
std::size_t  entity_dim,
const std::vector< std::size_t > &  entity_indices 
) const
pure virtual

Return the dof indices associated with entities of given dimension and entity indices.

Implemented in dolfin::DofMap.

◆ extract_sub_dofmap()

virtual std::shared_ptr< GenericDofMap > dolfin::GenericDofMap::extract_sub_dofmap ( const std::vector< std::size_t > &  component,
const Mesh mesh 
) const
pure virtual

Extract sub dofmap component.

Implemented in dolfin::DofMap.

◆ global_dimension()

virtual std::size_t dolfin::GenericDofMap::global_dimension ( ) const
pure virtual

Return the dimension of the global finite element function space

Implemented in dolfin::DofMap.

◆ index_map()

virtual std::shared_ptr< const IndexMap > dolfin::GenericDofMap::index_map ( ) const
pure virtual

Index map (const access)

Implemented in dolfin::DofMap.

◆ is_view()

virtual bool dolfin::GenericDofMap::is_view ( ) const
pure virtual

True if dof map is a view into another map (is a sub-dofmap)

Implemented in dolfin::DofMap.

◆ local_to_global_index()

virtual std::size_t dolfin::GenericDofMap::local_to_global_index ( int  local_index) const
pure virtual

Return global dof index corresponding to a given local index.

Implemented in dolfin::DofMap.

◆ local_to_global_unowned()

virtual const std::vector< std::size_t > & dolfin::GenericDofMap::local_to_global_unowned ( ) const
pure virtual

Return the map from unowned local dofmap nodes to global dofmap nodes. Dofmap node is dof index modulo block size.

Implemented in dolfin::DofMap.

◆ max_cell_dimension()

std::size_t dolfin::GenericDofMap::max_cell_dimension ( ) const
inline

Return the maximum dimension of the local finite element function space (deprecated API)

◆ max_element_dofs()

virtual std::size_t dolfin::GenericDofMap::max_element_dofs ( ) const
pure virtual

Return the maximum dimension of the local finite element function space

Implemented in dolfin::DofMap.

◆ neighbours()

virtual const std::set< int > & dolfin::GenericDofMap::neighbours ( ) const
pure virtual

Return set of processes that share dofs with the this process.

Implemented in dolfin::DofMap.

◆ num_element_dofs()

virtual std::size_t dolfin::GenericDofMap::num_element_dofs ( std::size_t  index) const
pure virtual

Return the dimension of the local finite element function space on a cell

Implemented in dolfin::DofMap.

◆ num_entity_closure_dofs()

virtual std::size_t dolfin::GenericDofMap::num_entity_closure_dofs ( std::size_t  entity_dim) const
pure virtual

Return the number of dofs for closure of entity of given dimension.

Implemented in dolfin::DofMap.

◆ num_entity_dofs()

virtual std::size_t dolfin::GenericDofMap::num_entity_dofs ( std::size_t  entity_dim) const
pure virtual

Return the number of dofs for a given entity dimension.

Implemented in dolfin::DofMap.

◆ num_facet_dofs()

virtual std::size_t dolfin::GenericDofMap::num_facet_dofs ( ) const
pure virtual

Return number of facet dofs.

Implemented in dolfin::DofMap.

◆ off_process_owner()

virtual const std::vector< int > & dolfin::GenericDofMap::off_process_owner ( ) const
pure virtual

Return map from nonlocal-dofs (that appear in local dof map) to owning process

Implemented in dolfin::DofMap.

◆ ownership_range()

virtual std::pair< std::size_t, std::size_t > dolfin::GenericDofMap::ownership_range ( ) const
pure virtual

Return the ownership range (dofs in this range are owned by this process)

Implemented in dolfin::DofMap.

◆ set()

virtual void dolfin::GenericDofMap::set ( GenericVector x,
double  value 
) const
pure 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

Implemented in dolfin::DofMap.

◆ shared_nodes()

virtual const std::unordered_map< int, std::vector< int > > & dolfin::GenericDofMap::shared_nodes ( ) const
pure virtual

Return map from shared nodes to the processes (not including the current process) that share it.

Implemented in dolfin::DofMap.

◆ str()

virtual std::string dolfin::GenericDofMap::str ( bool  verbose) const
pure virtual

Return informal string representation (pretty-print)

Reimplemented from dolfin::Variable.

Implemented in dolfin::DofMap.

◆ tabulate_entity_closure_dofs()

virtual void dolfin::GenericDofMap::tabulate_entity_closure_dofs ( std::vector< std::size_t > &  element_dofs,
std::size_t  entity_dim,
std::size_t  cell_entity_index 
) const
pure virtual

Tabulate the local-to-local mapping of dofs on closure of entity (dim, local_entity)

Implemented in dolfin::DofMap.

◆ tabulate_entity_dofs()

virtual void dolfin::GenericDofMap::tabulate_entity_dofs ( std::vector< std::size_t > &  element_dofs,
std::size_t  entity_dim,
std::size_t  cell_entity_index 
) const
pure virtual

Tabulate the local-to-local mapping of dofs on entity (dim, local_entity)

Implemented in dolfin::DofMap.

◆ tabulate_facet_dofs()

virtual void dolfin::GenericDofMap::tabulate_facet_dofs ( std::vector< std::size_t > &  element_dofs,
std::size_t  cell_facet_index 
) const
pure virtual

Tabulate local-local facet dofs.

Implemented in dolfin::DofMap.

◆ tabulate_global_dofs()

virtual void dolfin::GenericDofMap::tabulate_global_dofs ( std::vector< std::size_t > &  dofs) const
pure virtual

Tabulate globally supported dofs.

Implemented in dolfin::DofMap.

◆ tabulate_local_to_global_dofs()

virtual void dolfin::GenericDofMap::tabulate_local_to_global_dofs ( std::vector< std::size_t > &  local_to_global_map) const
pure virtual

Tabulate map between local (process) and global dof indices.

Implemented in dolfin::DofMap.

Member Data Documentation

◆ constrained_domain

std::shared_ptr<const SubDomain> dolfin::GenericDofMap::constrained_domain

Subdomain mapping constrained boundaries, e.g. periodic conditions


The documentation for this class was generated from the following file: