15 std::list<Mesh::IndexType> belist;
18 std::vector<bool> element_processed(number_of_elements,
false);
22 std::vector<Mesh::IndexType>::const_iterator ei =
24 while(ei != dc[nn].end()){
25 if(!element_processed[*ei-1]){
26 element_processed[*ei-1] =
true;
27 belist.push_back(*ei);
33 std::list<Mesh::IndexType>::iterator beli = belist.begin();
34 be.resize(belist.size());
35 std::vector<Mesh::IndexType>::iterator bei = be.begin();
36 while(bei != be.end())
41 int Partition::Read(
const std::string &MeshName,IRAD::Comm::CommunicatorObject &comm,
bool allow_n2m,std::ostream &ErrOut)
43 unsigned int nproc = comm.Size();
44 unsigned int rank = comm.Rank();
45 unsigned int id = rank + 1;
48 std::ifstream InfoInf;
49 std::ostringstream FNOstr;
50 FNOstr << MeshName <<
"." <<
id <<
".info";
51 InfoInf.open(FNOstr.str().c_str());
56 ErrOut <<
"Partition::Read Could not find partition info for " << MeshName;
65 ErrOut <<
"Partition::Read " << MeshName <<
" has partition/processor mismatch: ("
78 std::ostringstream Ostr;
81 Ostr <<
"." <<
id <<
".pmesh";
84 Inf.open(Ostr.str().c_str());
107 Inf >>
_borders[nn].rpart >> nrecv >> nsend;
111 Inf >>
_borders[nn].nrecv[ii] >> nodeid;
116 Inf >>
_borders[nn].nsend[ii] >> nodeid;
131 std::ostringstream FNOstr;
133 FNOstr << MeshName <<
"." <<
id <<
".info";
134 Inf.open(FNOstr.str().c_str());
146 FNOstr << MeshName <<
"." <<
id <<
".pmesh";
149 Inf.open(FNOstr.str().c_str());
166 Inf >>
_borders[nn].rpart >> nrecv >> nsend;
170 _borders[nn].nrecv.push_back(nodeid);
176 _borders[nn].nsend.push_back(nodeid);
std::vector< Border > _borders
General connectivity object.
IRAD::Comm::CommunicatorObject * _communicator
Class Mesh is the main class that holds all information to describe the current state of the mesh...
Connectivity & GetCon(const MeshConType type)
Mesh::IndexType part
total number of partitions
int Read(const std::string &meshname, int id)
int NumberOfElements() const
Mesh::IndexType nnodes
total number of elems
Mesh::IndexType nborder
total number of nodes
Mesh::IndexType nlocal
number of shared nodes owned
Mesh::IndexType nelem
partition id
int NumberOfNodes() const
int GetBorderElements(std::vector< Mesh::IndexType > &be) const
IRAD::Primitive::IndexType IndexType
Mesh::IndexType nown
number of shared nodes
Mesh::IndexType nshared
number of borders