Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Feel::DataMap Class Reference

#include <datamap.hpp>

Detailed Description

data layout in a multi-processor environnement

Author
Christophe Prud'homme
See Also
+ Inheritance diagram for Feel::DataMap:

Public Member Functions

Constructors, destructor
 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 ()
 
Operator overloads
DataMapoperator= (DataMap const &dm)
 
Accessors
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_typesearchGlobalProcessDof (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
 
Methods
void close () const
 

Protected Attributes

bool M_closed
 
std::vector< size_typeM_first_df
 
std::vector< size_typeM_first_df_globalcluster
 
std::vector< size_typeM_last_df
 
std::vector< size_typeM_last_df_globalcluster
 
std::vector< size_typeM_mapGlobalClusterToGlobalProcess
 
std::vector< size_typeM_mapGlobalProcessToGlobalCluster
 
std::vector< size_typeM_myglobalelements
 
size_type M_n_dofs
 
std::vector< size_typeM_n_localWithGhost_df
 
std::vector< size_typeM_n_localWithoutGhost_df
 
WorldComm M_worldComm
 

Constructor & Destructor Documentation

Feel::DataMap::DataMap ( size_type  n,
size_type  n_local,
WorldComm const &  _worldComm = Environment::worldComm() 
)
Feel::DataMap::DataMap ( size_type  n,
std::vector< int > const &  firstdof,
std::vector< int > const &  lastdof 
)
Parameters
ntotal size of the vector
firstdofarray of size n_processors containing the first index on each processor
lastdofarray of size n_processors containing the last index on each processor

Member Function Documentation

bool Feel::DataMap::closed ( ) const
inline
Returns
true if DataMap is close, false otherwise
size_type Feel::DataMap::firstDof ( ) const
inline
Returns
the first dof index that is in local subdomain

References M_first_df, and M_worldComm.

size_type Feel::DataMap::firstDof ( const size_type  proc) const
inline
Returns
the first dof index that is local to subdomain proc.

References M_first_df.

size_type Feel::DataMap::lastDof ( ) const
inline

Returns the last dof index that is in local subdomain

References M_last_df, and M_worldComm.

size_type Feel::DataMap::lastDof ( const unsigned int  proc) const
inline

Returns the last dof index that is local to subdomain proc.

References M_last_df.

size_type Feel::DataMap::lastDofGlobalCluster ( ) const
inline

Returns the last dof index that is in local subdomain

References M_last_df_globalcluster, and M_worldComm.

size_type Feel::DataMap::nDof ( ) const
inline
Returns
the total number of degrees of freedom in the problem.

References M_n_dofs.

size_type Feel::DataMap::nDofOnProcessor ( const size_type  proc) const
inline
Returns
the number of degrees of freedom on subdomain proc.

References M_first_df, and M_n_localWithoutGhost_df.

size_type Feel::DataMap::nLocalDof ( ) const
inline
Returns
the number of degrees of freedom on this processor(with ghosts).

References nLocalDofWithGhost().

size_type Feel::DataMap::nLocalDofWithGhost ( ) const
inline
Returns
the number of degrees of freedom on this processor with ghosts.

References worldComm().

size_type Feel::DataMap::nLocalDofWithGhost ( const int  proc) const
inline
Returns
the number of degrees of freedom on this processor with ghosts.

References M_n_localWithGhost_df.

size_type Feel::DataMap::nLocalDofWithoutGhost ( ) const
inline
Returns
the number of degrees of freedom on this processor without ghosts.

References worldComm().

size_type Feel::DataMap::nLocalDofWithoutGhost ( const int  proc) const
inline
Returns
the number of degrees of freedom on this processor without ghosts.

References M_n_localWithoutGhost_df.

size_type Feel::DataMap::nMyDof ( ) const
inline
Returns
the number of degrees of freedom on this processor.

References M_worldComm, and nDofOnProcessor().

WorldComm const& Feel::DataMap::worldComm ( ) const
inline
Returns
the communicator

References M_worldComm.

Member Data Documentation

std::vector<size_type> Feel::DataMap::M_first_df
protected

First DOF index on processor p.

std::vector<size_type> Feel::DataMap::M_first_df_globalcluster
protected

First globalcluster DOF index on processor p.

std::vector<size_type> Feel::DataMap::M_last_df
protected

Last DOF index on processor p.

std::vector<size_type> Feel::DataMap::M_last_df_globalcluster
protected

Last globalcluster DOF index on processor p.

std::vector<size_type> Feel::DataMap::M_mapGlobalClusterToGlobalProcess
protected

Map between Global Cluster To Global Process.

std::vector<size_type> Feel::DataMap::M_mapGlobalProcessToGlobalCluster
protected

Map between Global Process To Global Cluster.

size_type Feel::DataMap::M_n_dofs
protected

Total number of degrees of freedom.

std::vector<size_type> Feel::DataMap::M_n_localWithGhost_df
protected

Number of degrees of freedom for each processor with ghosts.

std::vector<size_type> Feel::DataMap::M_n_localWithoutGhost_df
protected

Number of degrees of freedom for each processor without ghosts.

WorldComm Feel::DataMap::M_worldComm
protected

Communicator


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

Generated on Fri Oct 25 2013 14:24:28 for Feel++ by doxygen 1.8.4