Feel++  0.91.4
Protected Attributes
Feel::DataMap Class Reference

data layout in a multi-processor environnement More...

#include <datamap.hpp>

List of all members.

Public Member Functions

Constructors, destructor
 DataMap (WorldComm const &_worldComm=WorldComm())
 DataMap (size_type n, size_type n_local, WorldComm const &_worldComm=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 nLocalDofWithGhost () 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
size_type lastDof () const
size_type lastDof (const unsigned int proc) const
size_type lastDofGlobalCluster () const
size_type lastDofGlobalCluster (uint16_type proc) const
uint16_type procOnGlobalCluster (size_type globDof) const
bool dofGlobalClusterIsOnProc (size_type globDof) const
bool dofGlobalClusterIsOnProc (size_type globDof, int proc) 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
size_type _M_n_dofs
std::vector< size_type_M_n_localWithoutGhost_df
std::vector< size_type_M_n_localWithGhost_df
std::vector< size_type_M_first_df
std::vector< size_type_M_last_df
std::vector< size_type_M_first_df_globalcluster
std::vector< size_type_M_last_df_globalcluster
std::vector< size_typeM_myglobalelements
std::vector< size_typeM_mapGlobalProcessToGlobalCluster
std::vector< size_typeM_mapGlobalClusterToGlobalProcess
WorldComm M_worldComm

Detailed Description

data layout in a multi-processor environnement

Author:
Christophe Prud'homme
See also:

Constructor & Destructor Documentation

Feel::DataMap::DataMap ( size_type  n,
size_type  n_local,
WorldComm const &  _worldComm = 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

Referenced by myGlobalElements().

size_type Feel::DataMap::firstDof ( ) const [inline]
Returns:
the first dof index that is in local subdomain

References _M_first_df, and M_worldComm.

Referenced by gid(), lid(), maxLID(), minAllGID(), and minMyGID().

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.

Referenced by gid(), lid(), maxAllGID(), maxLID(), and maxMyGID().

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.

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.

Referenced by Feel::VectorUblas< T, Storage >::init(), and Feel::Vector< T >::size().

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.

Referenced by nMyDof().

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

References nLocalDofWithGhost().

Referenced by nMyElements().

Returns:
the number of degrees of freedom on this processor with ghosts.

References _M_n_localWithGhost_df, and worldComm().

Referenced by Feel::VectorUblas< T, Storage >::init(), Feel::Vector< T >::localSize(), and nLocalDof().

Returns:
the number of degrees of freedom on this processor without ghosts.

References _M_n_localWithoutGhost_df, and worldComm().

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.

Referenced by DataMap(), nLocalDofWithGhost(), and nLocalDofWithoutGhost().


Member Data Documentation

std::vector<size_type> Feel::DataMap::_M_first_df [protected]

First DOF index on processor p.

Referenced by DataMap(), firstDof(), and nDofOnProcessor().

First globalcluster DOF index on processor p.

Referenced by DataMap().

std::vector<size_type> Feel::DataMap::_M_last_df [protected]

Last DOF index on processor p.

Referenced by DataMap(), and lastDof().

Last globalcluster DOF index on processor p.

Referenced by DataMap(), and lastDofGlobalCluster().

Total number of degrees of freedom.

Referenced by DataMap(), nDof(), and nGlobalElements().

Number of degrees of freedom for each processor with ghosts.

Referenced by DataMap(), and nLocalDofWithGhost().

Number of degrees of freedom for each processor without ghosts.

Referenced by DataMap(), nDofOnProcessor(), and nLocalDofWithoutGhost().

Map between Global Cluster To Global Process.

Referenced by DataMap().

Map between Global Process To Global Cluster.

Referenced by DataMap().