#include <doftable.hpp>
Local-to-global Degree of Freedom table.
Public Types | |
typedef std::unordered_map < int, std::map< int, global_dof_fromface_type > > | Container_fromface |
typedef fe_type::continuity_type | continuity_type |
typedef reference_convex_type::super | convex_type |
typedef dof_marker_type::value_type | dof2marker |
typedef dof_element_type::const_iterator | dof_const_iterator |
typedef std::map< size_type, std::list< local_dof_type > > | dof_element_type |
typedef dof_element_type::iterator | dof_iterator |
typedef std::map< dof_type, size_type, size_type > ::const_iterator | dof_map_const_iterator |
typedef std::map< dof_type, size_type >::iterator | dof_map_iterator |
typedef std::map< dof_type, size_type > | dof_map_type |
typedef boost::bimap < size_type, boost::bimaps::multiset_of < size_type > > | dof_marker_type |
typedef boost::tuple < node_type, size_type, uint16_type > | dof_point_type |
typedef std::vector < dof_point_type > ::const_iterator | dof_points_const_iterator |
typedef std::vector < dof_point_type >::iterator | dof_points_iterator |
typedef std::vector < dof_point_type > | dof_points_type |
typedef std::map< size_type, std::set< size_type > > | dof_procset_type |
typedef dof_table::value_type | dof_relation |
typedef boost::bimap < bimaps::unordered_set_of < LocalDof > , bimaps::multiset_of< Dof > > | dof_table |
typedef boost::tuple < uint16_type, uint16_type, size_type > | dof_type |
typedef element_type::edge_permutation_type | edge_permutation_type |
typedef mesh_type::element_const_iterator | element_const_iterator |
typedef boost::tuple < element_type const *, face_type const * > | element_face_pair_type |
typedef mesh_type::element_type | element_type |
typedef element_type::face_permutation_type | face_permutation_type |
typedef ublas::vector< bool > | face_sign_info_type |
typedef mesh_type::face_type | face_type |
typedef boost::shared_ptr< FEType > | fe_ptrtype |
typedef FEType | fe_type |
typedef boost::tuple < size_type, int16_type, bool, int16_type > | global_dof_fromface_type |
typedef Dof | global_dof_type |
typedef mesh_type::gm_ptrtype | gm_ptrtype |
typedef mesh_type::gm_type | gm_type |
typedef std::map< int, global_dof_type > | indices_per_element_type |
typedef std::list < local_dof_type > ::const_iterator | ldof_const_iterator |
typedef LocalDofSet | local_dof_set_type |
typedef boost::tuple < size_type, uint16_type, uint16_type, uint16_type > | local_dof_type |
typedef Eigen::Matrix< int, nDofPerElement, 1 > | localglobal_indices_type |
typedef fe_type::matrix_type | matrix_type |
typedef MeshType | mesh_type |
typedef node< value_type >::type | node_type |
typedef std::multimap < size_type, periodic_dof_type > | periodic_dof_map_type |
typedef boost::tuple < size_type, uint16_type, uint16_type, size_type, uint16_type > | periodic_dof_type |
typedef periodic_element_list_type::const_iterator | periodic_element_list_const_iterator |
typedef periodic_element_list_type::iterator | periodic_element_list_iterator |
typedef std::list < element_face_pair_type > | periodic_element_list_type |
typedef PeriodicityType | periodicity_type |
typedef ublas::vector < uint16_type > | permutation_vector_type |
typedef mesh_type::pid_element_const_iterator | pid_element_const_iterator |
typedef fe_type::points_type | points_type |
typedef boost::tuple < uint16_type &, size_type & > | ref_shift_type |
typedef fe_type::reference_convex_type | reference_convex_type |
typedef DofTable< MeshType, FEType, PeriodicityType > | self_type |
typedef fe_type::value_type | value_type |
Public Member Functions | |
void | addDofFromElement (element_type const &__elt, size_type &next_free_dof, size_type processor=0, size_type shift=0) |
void | addEdgePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag) |
void | addEdgePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< false >, mpl::int_< 1 >) |
void | addEdgePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< false >, mpl::int_< 2 >) |
void | addEdgePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< false >, mpl::int_< 3 >) |
void | addEdgePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< true >, mpl::int_< 1 >) |
void | addEdgePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< true >, mpl::int_< 2 >) |
void | addEdgePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< true >, mpl::int_< 3 >) |
void | addFacePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag) |
void | addFacePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< false >) |
void | addFacePeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< true >) |
void | addVertexPeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag) |
void | addVertexPeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< false >) |
void | addVertexPeriodicDof (element_type const &__elt, face_type const &__face, size_type &next_free_dof, std::map< size_type, periodic_dof_map_type > &periodic_dof, size_type tag, mpl::bool_< true >) |
periodic_element_list_const_iterator | beginPeriodicElements () const |
void | build (mesh_type *M) |
void | build (boost::shared_ptr< mesh_type > &M) |
void | build (mesh_type &M) |
void | buildBoundaryDofMap (mesh_type &mesh) |
Build the localToGlobal table for the boundary. More... | |
void | buildDofMap (mesh_type &mesh, size_type start_next_free_dof=0) |
Build the localToGlobal table. More... | |
size_type | buildLocallyDiscontinuousDofMap (mesh_type &M, size_type start_next_free_dof) |
size_type | buildPeriodicDofMap (mesh_type &M) |
void | clearMapGDof () |
size_type | dofIndex (size_type dof) const |
size_type | dofNProc (size_type dof) const |
const dof_point_type & | dofPoint (size_type i) const |
dof_points_const_iterator | dofPointBegin () const |
dof_points_iterator | dofPointBegin () |
dof_points_const_iterator | dofPointEnd () const |
dof_points_iterator | dofPointEnd () |
std::set< size_type > | dofProcSet (size_type dof) const |
DofTable (WorldComm const &_worldComm) | |
DofTable (fe_ptrtype const &_fe, periodicity_type const &periodicity, WorldComm const &_worldComm) | |
The minimal constructor. More... | |
DofTable (const DofTable &dof2) | |
DofTable (mesh_type &mesh, fe_ptrtype const &_fe, periodicity_type const &periodicity, WorldComm const &_worldComm) | |
Constructor accepting a mesh as parameter. More... | |
void | dump () const |
periodic_element_list_const_iterator | endPeriodicElements () const |
global_dof_fromface_type const & | faceLocalToGlobal (const size_type ElId, const uint16_type localNode, const uint16_type c=0) const |
std::vector< size_type > | getIndices (size_type id_el) const |
std::vector< size_type > | getIndices (size_type id_el, mpl::size_t< MESH_ELEMENTS >) const |
std::vector< size_type > | getIndices (size_type id_el, mpl::size_t< MESH_FACES >) const |
std::vector< size_type > | getIndicesOnGlobalCluster (size_type id_el) const |
void | getIndicesSet (size_type id_el, std::vector< size_type > &ind) const |
void | getIndicesSetOnGlobalCluster (size_type id_el, std::vector< size_type > &ind) const |
constexpr size_type | getIndicesSize () const |
LocalDof const & | globalToLocal (size_type dof) const |
indices_per_element_type | indices (size_type id_el) const |
void | initDofMap (mesh_type &M) |
bool | insertDof (size_type ie, uint16_type l_dof, uint16_type lc, dof_type gDof, uint16_type processor, size_type &pDof, int32_type sign=1, bool is_dof_periodic=false, size_type shift=0, Marker1 const &marker=Marker1(0)) |
bool | isElementDone (size_type elt, int c=0) |
uint16_type | localDofId (uint16_type const lid, uint16_type const c=0) const |
template<typename Elem > | |
uint16_type | localDofInElement (Elem const &El, const uint16_type localNode, const uint16_type c=0) const |
local_dof_set_type const & | localDofSet (size_type eid) const |
global_dof_type const & | localToGlobal (const size_type ElId, const uint16_type localNode, const uint16_type c=0) const |
template<typename Elem > | |
mpl::if_< mpl::equal_to < mpl::int_< Elem::nDim > , mpl::int_< nDim > >, global_dof_type, global_dof_fromface_type > ::type | localToGlobal (Elem const &El, const uint16_type localNode, const uint16_type c=0) const |
local to global mapping | |
size_type | localToGlobal (size_type l) const |
size_type | localToGlobalId (const size_type ElId, const uint16_type id) const |
localglobal_indices_type const & | localToGlobalIndices (size_type ElId) |
localglobal_indices_type const & | localToGlobalIndicesOnCluster (size_type ElId) |
std::map< size_type, std::pair < size_type, size_type > > | localToGlobalMap () const |
global_dof_type | localToGlobalOnCluster (const size_type ElId, const uint16_type localNode, const uint16_type c=0) const |
localglobal_indices_type const & | localToGlobalSigns (size_type ElId) |
dof_map_type const & | mapGDof () const |
dof_map_type & | mapGDof () |
dof_marker_type::right_range_type | markerToDof (boost::any const &marker) |
dof_marker_type::right_range_type | markerToDofGreaterThan (boost::any const &marker) |
dof_marker_type::right_range_type | markerToDofLessThan (boost::any const &marker) |
mesh_type * | mesh () |
mesh_type * | mesh () const |
uint16_type | nDofPerFaceOnBoundary () const |
constexpr size_type | nLocalDof (bool per_component=false) const |
constexpr size_type | nLocalDofOnFace (bool per_component=false) const |
size_type | numElements () const |
uint16_type | numLocalEdges () const |
uint16_type | numLocalFaces () const |
uint16_type | numLocalVertices () const |
std::pair< std::map< size_type, size_type >, std::map < size_type, size_type > > | pointIdToDofRelation (std::string fname="") const |
void | printDofMarker (std::string const &filename) |
void | rebuildDofPoints (mesh_type &M) |
void | setDofIndices (std::vector< Dof > const &dof) |
void | setElementDone (size_type elt) |
void | setMapGDof (dof_map_type const &mapdof) |
void | showMe () const |
![]() | |
DataMap (WorldComm const &_worldComm=Environment::worldComm()) | |
DataMap (size_type n, size_type n_local, WorldComm const &_worldComm=Environment::worldComm()) | |
DataMap (size_type n, std::vector< int > const &firstdof, std::vector< int > const &lastdof) | |
DataMap (DataMap const &dm) | |
virtual | ~DataMap () |
DataMap & | operator= (DataMap const &dm) |
size_type | nDof () const |
size_type | nLocalDof () const |
size_type | nLocalDofWithoutGhost () const |
size_type | nLocalDofWithoutGhost (const int proc) const |
size_type | nLocalDofWithGhost () const |
size_type | nLocalDofWithGhost (const int proc) const |
size_type | nMyDof () const |
size_type | nDofOnProcessor (const size_type proc) const |
size_type | nProcessors () const |
size_type | firstDof () const |
size_type | firstDof (const size_type proc) const |
size_type | firstDofGlobalCluster () const |
size_type | firstDofGlobalCluster (uint16_type proc) const |
std::vector< size_type > const & | firstDofGlobalClusterWorld () const |
size_type | lastDof () const |
size_type | lastDof (const unsigned int proc) const |
size_type | lastDofGlobalCluster () const |
size_type | lastDofGlobalCluster (uint16_type proc) const |
std::vector< size_type > const & | lastDofGlobalClusterWorld () const |
uint16_type | procOnGlobalCluster (size_type globDof) const |
bool | dofGlobalClusterIsOnProc (size_type globDof) const |
bool | dofGlobalClusterIsOnProc (size_type globDof, int proc) const |
bool | dofGlobalProcessIsGhost (size_type dof) const |
boost::tuple< bool, size_type > | searchGlobalProcessDof (size_type gpdof) const |
size_type | lid (size_type GID) const |
Returns local ID of global ID, return invalid_size_type_value if not found on this processor. | |
size_type | gid (size_type LID) const |
Returns global ID of local ID, return -1 if not found on this processor. | |
bool | myGID (size_type GID) const |
Returns true if the GID passed in belongs to the calling processor in this map, otherwise returns false. | |
bool | myLID (size_type LID) const |
Returns true if the LID passed in belongs to the calling processor in this map, otherwise returns false. | |
size_type | minAllGID () const |
Returns the minimum global ID across the entire map. | |
size_type | maxAllGID () const |
Returns the maximum global ID across the entire map. | |
size_type | minMyGID () const |
Returns the maximum global ID owned by this processor. | |
size_type | maxMyGID () const |
Returns the maximum global ID owned by this processor. | |
size_type | minLID () const |
The minimum local index value on the calling processor. | |
size_type | maxLID () const |
The maximum local index value on the calling processor. | |
size_type | nGlobalElements () const |
number of elements across all processors. | |
size_type | nMyElements () const |
number of elements on the calling processor. | |
std::vector< size_type > const & | myGlobalElements () const |
Puts list of global elements on this processor size_typeo the user-provided array. | |
std::vector< size_type > const & | mapGlobalProcessToGlobalCluster () const |
std::vector< size_type > const & | mapGlobalClusterToGlobalProcess () const |
size_type | mapGlobalProcessToGlobalCluster (size_type i) const |
size_type | mapGlobalClusterToGlobalProcess (size_type i) const |
void | setNDof (size_type ndof) |
void | setNLocalDofWithoutGhost (const size_type proc, const size_type n, bool inWorld=true) |
void | setNLocalDofWithGhost (const size_type proc, const size_type n, bool inWorld=true) |
void | setFirstDof (const size_type proc, const size_type df, bool inWorld=true) |
void | setLastDof (const size_type proc, const size_type df, bool inWorld=true) |
void | setFirstDofGlobalCluster (const size_type proc, const size_type df, bool inWorld=true) |
void | setLastDofGlobalCluster (const size_type proc, const size_type df, bool inWorld=true) |
void | setMapGlobalProcessToGlobalCluster (std::vector< size_type > const &map) |
void | setMapGlobalClusterToGlobalProcess (std::vector< size_type > const &map) |
void | setMapGlobalProcessToGlobalCluster (size_type i, size_type j) |
void | setMapGlobalClusterToGlobalProcess (size_type i, size_type j) |
void | resizeMapGlobalProcessToGlobalCluster (size_type n) |
void | resizeMapGlobalClusterToGlobalProcess (size_type n) |
void | updateDataInWorld () |
bool | closed () const |
void | showMeMapGlobalProcessToGlobalCluster (std::ostream &__out=std::cout) const |
WorldComm const & | worldComm () const |
WorldComm const & | comm () const |
void | close () const |
Friends | |
struct | element_access |
struct | face_access |
Additional Inherited Members | |
![]() | |
bool | M_closed |
std::vector< size_type > | M_first_df |
std::vector< size_type > | M_first_df_globalcluster |
std::vector< size_type > | M_last_df |
std::vector< size_type > | M_last_df_globalcluster |
std::vector< size_type > | M_mapGlobalClusterToGlobalProcess |
std::vector< size_type > | M_mapGlobalProcessToGlobalCluster |
std::vector< size_type > | M_myglobalelements |
size_type | M_n_dofs |
std::vector< size_type > | M_n_localWithGhost_df |
std::vector< size_type > | M_n_localWithoutGhost_df |
WorldComm | M_worldComm |
typedef std::map<size_type, std::list<local_dof_type> > Feel::DofTable< MeshType, FEType, PeriodicityType >::dof_element_type |
Type that hold the map between a global dof and the elements
typedef boost::bimap<bimaps::unordered_set_of<LocalDof>, bimaps::multiset_of<Dof> > Feel::DofTable< MeshType, FEType, PeriodicityType >::dof_table |
Type for the localToGlobal table.
typedef ublas::vector<bool> Feel::DofTable< MeshType, FEType, PeriodicityType >::face_sign_info_type |
This type is useful to construct the sign map in the modal case
typedef boost::tuple<size_type, int16_type, bool, int16_type> Feel::DofTable< MeshType, FEType, PeriodicityType >::global_dof_fromface_type |
A global dof from face is defined by -its index in the global table -its sign -bool : periodicity -local number in the element
typedef Dof Feel::DofTable< MeshType, FEType, PeriodicityType >::global_dof_type |
A global dof is defined by its index in the global table and by its sign.
typedef boost::tuple<size_type, uint16_type, uint16_type, uint16_type> Feel::DofTable< MeshType, FEType, PeriodicityType >::local_dof_type |
Tuple that holds a size_type elt
1 uint16_type l
and 1 uint16_type ent elt
shall be an element index l
shall be the local index of the dof in the element ent
shall be the entity the dof belongs to (0: vertex, 1: edge, 2: face, 3: volume)
typedef MeshType Feel::DofTable< MeshType, FEType, PeriodicityType >::mesh_type |
mesh type
typedef ublas::vector<uint16_type> Feel::DofTable< MeshType, FEType, PeriodicityType >::permutation_vector_type |
Type for the permutations to be done in the faces
Feel::DofTable< MeshType, FEType, PeriodicityType >::DofTable | ( | fe_ptrtype const & | _fe, |
periodicity_type const & | periodicity, | ||
WorldComm const & | _worldComm | ||
) |
The minimal constructor.
_fe | reference element |
Feel::DofTable< MeshType, FEType, PeriodicityType >::DofTable | ( | const DofTable< MeshType, FEType, PeriodicityType > & | dof2) |
copy constructor
dof2 | a dof object instance |
Feel::DofTable< MeshType, FEType, PeriodicityType >::DofTable | ( | mesh_type & | mesh, |
fe_ptrtype const & | _fe, | ||
periodicity_type const & | periodicity, | ||
WorldComm const & | _worldComm | ||
) |
Constructor accepting a mesh as parameter.
mesh | a RegionMesh3D |
_fe | reference element |
References Feel::DofTable< MeshType, FEType, PeriodicityType >::buildBoundaryDofMap(), Feel::DofTable< MeshType, FEType, PeriodicityType >::buildDofMap(), and Feel::DofTable< MeshType, FEType, PeriodicityType >::buildPeriodicDofMap().
|
inline |
Add a new periodic dof to the dof map and to the list of periodic dof periodic_dof
for a given tag tag
|
inline |
build the dof map
|
inline |
build the dof map
References Feel::DofTable< MeshType, FEType, PeriodicityType >::build().
|
inline |
build the dof map
References Feel::DofTable< MeshType, FEType, PeriodicityType >::buildBoundaryDofMap(), Feel::DofTable< MeshType, FEType, PeriodicityType >::buildDofMap(), Feel::DofTable< MeshType, FEType, PeriodicityType >::buildLocallyDiscontinuousDofMap(), Feel::DofTable< MeshType, FEType, PeriodicityType >::buildPeriodicDofMap(), Feel::DofTable< MeshType, FEType, PeriodicityType >::initDofMap(), Feel::DataMap::M_first_df_globalcluster, Feel::DataMap::M_last_df_globalcluster, Feel::DataMap::M_mapGlobalClusterToGlobalProcess, Feel::DataMap::M_mapGlobalProcessToGlobalCluster, Feel::DataMap::M_n_localWithGhost_df, Feel::DataMap::M_n_localWithoutGhost_df, Feel::DataMap::nLocalDofWithGhost(), and Feel::DataMap::worldComm().
void Feel::DofTable< MeshType, FEType, PeriodicityType >::buildBoundaryDofMap | ( | mesh_type & | mesh) |
Build the localToGlobal table for the boundary.
mesh | A mesh |
References Feel::invalid_size_type_value.
void Feel::DofTable< MeshType, FEType, PeriodicityType >::buildDofMap | ( | mesh_type & | mesh, |
size_type | start_next_free_dof = 0 |
||
) |
Build the localToGlobal table.
mesh | mesh |
list of elements which have a periodic face Tag2
size_type Feel::DofTable< MeshType, FEType, PeriodicityType >::buildLocallyDiscontinuousDofMap | ( | mesh_type & | M, |
size_type | start_next_free_dof | ||
) |
build dof associated to local discontinuities
size_type Feel::DofTable< MeshType, FEType, PeriodicityType >::buildPeriodicDofMap | ( | mesh_type & | M) |
build dof map associated to the periodic dof, must be called before buildDofMap
References Feel::invalid_size_type_value.
|
inline |
clear the dictionnary
|
inline |
|
inline |
dof
belongs to
|
inline |
el
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
dof
belongs to
|
inline |
DofId | the Dof ID |
void Feel::DofTable< MeshType, FEType, PeriodicityType >::initDofMap | ( | mesh_type & | M) |
Initialize the dof map table
|
inline |
The dof are ordered such that they are contiguous per element and components. This way an extraction of the dof indices in one element allows to extract a view of the corresponding coefficient in a given basis which is then very helpful for interpolation for example.
ie | index of the element |
lc_dof | index of the dof in the element |
lc | local index of the entity associated with the dof in the element |
gDof | global dof index |
pDof | dof index in the processor |
References Feel::DofTable< MeshType, FEType, PeriodicityType >::dofIndex(), and Feel::DataMap::nLocalDof().
|
inline |
local(on processor) dof to global dof
|
inline |
ElId | the element ID |
localNode | the local DOF numbering (starting from 1) |
c | the component index, default is 0-th component |
References Feel::DataMap::nDof().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Number of elements in mesh
|
inline |
Number of local edges (in an element)
|
inline |
Number of local faces (in an element)
|
inline |
Number of local vertices (in an element)
std::pair< std::map< size_type, size_type >, std::map< size_type, size_type > > Feel::DofTable< MeshType, FEType, PeriodicityType >::pointIdToDofRelation | ( | std::string | fname = "" ) | const |
build point id to dof id relationship
|
inline |
rebuild dof points
|
inline |
insted of creating the dof indices on the fly, get them from a vector. The situation typically arises when we want to have dof correspondance between two spaces
References Feel::DataMap::M_first_df, Feel::DataMap::M_first_df_globalcluster, Feel::DataMap::M_last_df, Feel::DataMap::M_last_df_globalcluster, Feel::DataMap::M_n_dofs, Feel::DataMap::M_n_localWithGhost_df, Feel::DataMap::M_n_localWithoutGhost_df, and Feel::DataMap::worldComm().
|
inline |
set element to done
|
inline |
set the dictionnary for the dictionary of the global dof
void Feel::DofTable< MeshType, FEType, PeriodicityType >::showMe | ( | ) | const |
show some information about the dof instance