33 #include <feel/feelcore/feel.hpp>
63 DataMap( WorldComm
const& _worldComm = Environment::worldComm() );
76 DataMap(
size_type n, std::vector<int>
const& firstdof, std::vector<int>
const& lastdof );
157 FEELPP_ASSERT( proc <
M_first_df.size() )( proc )(
M_first_df.size() ).error(
"invalid proc id or dof table" );
173 FEELPP_ASSERT( proc <
M_first_df.size() )( proc )(
M_first_df.size() ).error(
"invalid proc id or dof table" );
181 FEELPP_ASSERT( proc <
M_first_df.size() )( proc )(
M_first_df.size() ).error(
"invalid proc id or dof table" );
192 size_type firstDofGlobalCluster( uint16_type proc )
const
198 std::vector<size_type>
const& firstDofGlobalClusterWorld()
const
209 FEELPP_ASSERT( proc <
M_last_df.size() )( proc )(
M_last_df.size() ).error(
"invalid proc id or dof table" );
217 FEELPP_ASSERT( proc <
M_last_df.size() )( proc )(
M_last_df.size() ).error(
"invalid proc id or dof table" );
237 std::vector<size_type>
const& lastDofGlobalClusterWorld()
const
242 uint16_type procOnGlobalCluster(
size_type globDof )
const;
244 bool dofGlobalClusterIsOnProc(
size_type globDof )
const
246 return this->dofGlobalClusterIsOnProc( globDof, this->
worldComm().globalRank() );
249 bool dofGlobalClusterIsOnProc(
size_type globDof,
int proc )
const
254 bool dofGlobalProcessIsGhost(
size_type dof)
const
256 return !this->dofGlobalClusterIsOnProc(this->mapGlobalProcessToGlobalCluster( dof ));
259 boost::tuple<bool,size_type> searchGlobalProcessDof(
size_type gpdof )
const;
349 std::vector<size_type>
const& mapGlobalProcessToGlobalCluster()
const
353 std::vector<size_type>
const& mapGlobalClusterToGlobalProcess()
const
368 void setNLocalDofWithoutGhost(
const size_type proc,
const size_type n,
bool inWorld=
true );
369 void setNLocalDofWithGhost(
const size_type proc,
const size_type n,
bool inWorld=
true );
372 void setFirstDofGlobalCluster(
const size_type proc,
const size_type df,
bool inWorld=
true );
373 void setLastDofGlobalCluster(
const size_type proc,
const size_type df,
bool inWorld=
true );
375 void setMapGlobalProcessToGlobalCluster( std::vector<size_type>
const& map );
376 void setMapGlobalClusterToGlobalProcess( std::vector<size_type>
const& map );
379 void resizeMapGlobalProcessToGlobalCluster(
size_type n );
380 void resizeMapGlobalClusterToGlobalProcess(
size_type n );
382 void updateDataInWorld();
390 void showMeMapGlobalProcessToGlobalCluster( std::ostream& __out = std::cout )
const;
401 WorldComm
const& comm()
const
430 mutable bool M_closed;
468 mutable std::vector<size_type> M_myglobalelements;
size_type minMyGID() const
Returns the maximum global ID owned by this processor.
Definition: datamap.hpp:310
WorldComm M_worldComm
Definition: datamap.hpp:485
size_type maxLID() const
The maximum local index value on the calling processor.
Definition: datamap.hpp:328
std::vector< size_type > M_mapGlobalProcessToGlobalCluster
Definition: datamap.hpp:474
size_type nDof() const
Definition: datamap.hpp:99
size_type firstDof(const size_type proc) const
Definition: datamap.hpp:179
size_type minLID() const
The minimum local index value on the calling processor.
Definition: datamap.hpp:322
const size_type invalid_size_type_value
Definition: feelcore/feel.hpp:360
std::vector< size_type > M_n_localWithoutGhost_df
Definition: datamap.hpp:440
bool myGID(size_type GID) const
Returns true if the GID passed in belongs to the calling processor in this map, otherwise returns fal...
Definition: datamap.hpp:286
std::vector< size_type > M_mapGlobalClusterToGlobalProcess
Definition: datamap.hpp:479
std::vector< size_type > M_first_df
Definition: datamap.hpp:450
size_type nMyDof() const
Definition: datamap.hpp:147
size_type nLocalDofWithoutGhost() const
Definition: datamap.hpp:115
size_type firstDof() const
Definition: datamap.hpp:170
size_type lid(size_type GID) const
Returns local ID of global ID, return invalid_size_type_value if not found on this processor...
Definition: datamap.hpp:263
size_type nLocalDof() const
Definition: datamap.hpp:107
size_type nGlobalElements() const
number of elements across all processors.
Definition: datamap.hpp:334
data layout in a multi-processor environnement
Definition: datamap.hpp:46
std::vector< size_type > const & myGlobalElements() const
Puts list of global elements on this processor size_typeo the user-provided array.
Definition: datamap.cpp:227
size_type nDofOnProcessor(const size_type proc) const
Definition: datamap.hpp:155
size_type lastDof(const unsigned int proc) const
Definition: datamap.hpp:215
size_type lastDof() const
Definition: datamap.hpp:206
size_type nLocalDofWithGhost(const int proc) const
Definition: datamap.hpp:139
WorldComm const & worldComm() const
Definition: datamap.hpp:396
size_type lastDofGlobalCluster() const
Definition: datamap.hpp:224
size_type nMyElements() const
number of elements on the calling processor.
Definition: datamap.hpp:341
size_t size_type
Indices (starting from 0)
Definition: feelcore/feel.hpp:319
size_type minAllGID() const
Returns the minimum global ID across the entire map.
Definition: datamap.hpp:298
size_type maxMyGID() const
Returns the maximum global ID owned by this processor.
Definition: datamap.hpp:316
std::vector< size_type > M_first_df_globalcluster
Definition: datamap.hpp:460
bool closed() const
Definition: datamap.hpp:385
size_type gid(size_type LID) const
Returns global ID of local ID, return -1 if not found on this processor.
Definition: datamap.hpp:275
size_type maxAllGID() const
Returns the maximum global ID across the entire map.
Definition: datamap.hpp:304
bool myLID(size_type LID) const
Returns true if the LID passed in belongs to the calling processor in this map, otherwise returns fal...
Definition: datamap.hpp:292
std::vector< size_type > M_n_localWithGhost_df
Definition: datamap.hpp:445
std::vector< size_type > M_last_df_globalcluster
Definition: datamap.hpp:465
std::vector< size_type > M_last_df
Definition: datamap.hpp:455
size_type M_n_dofs
Definition: datamap.hpp:435
size_type nLocalDofWithoutGhost(const int proc) const
Definition: datamap.hpp:123
size_type nLocalDofWithGhost() const
Definition: datamap.hpp:131