Feel++ 0.91.0
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 ()
 DataMap (size_type n, size_type n_local)
 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 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 lastDof () const
size_type lastDof (const unsigned 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.
bool closed () const
mpi::communicator const & comm () const
Methods
void close () const

Protected Attributes

bool M_closed
size_type _M_n_dofs
std::vector< size_type_M_first_df
std::vector< size_type_M_last_df
std::vector< size_typeM_myglobalelements
mpi::communicator M_comm

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 
)
Parameters:
ntotal size of the vector
n_locallocal size of the vector on the curent processor

References _M_first_df, _M_last_df, _M_n_dofs, and Feel::invalid_size_type_value.

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().

mpi::communicator const& Feel::DataMap::comm ( ) const [inline]
Returns:
the communicator

Referenced by Feel::Vector< T >::comm().

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::firstDof ( ) const [inline]
Returns:
the first dof index that is in local subdomain

References _M_first_df.

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

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

Returns the last dof index that is in local subdomain

References _M_last_df.

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.

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_last_df.

Referenced by nLocalDof(), and nMyDof().

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

References nDofOnProcessor().

Referenced by nMyElements().

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

References nDofOnProcessor().


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().

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

Last DOF index (plus 1) on processor p.

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

Total number of degrees of freedom.

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