Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Mesh::Connectivity Class Reference

General connectivity object. More...

#include <Mesh.H>

Inheritance diagram for Mesh::Connectivity:
Collaboration diagram for Mesh::Connectivity:

Public Member Functions

 Connectivity ()
 
 Connectivity (unsigned int N)
 
void Resize (unsigned int N=0)
 
 ~Connectivity ()
 
std::vector< IndexType > & Element (IndexType n)
 
std::vector< IndexTypeElement (IndexType n) const
 
IndexTypeNode (IndexType e, IndexType n)
 
IndexType Node (IndexType e, IndexType n) const
 
IndexType Nelem () const
 
IndexType Esize (IndexType n) const
 
void AddElement (const std::vector< IndexType > &elem)
 
void AddElement ()
 
void Sync ()
 
void ShrinkWrap ()
 
void Truncate ()
 
void destroy ()
 
void SyncSizes ()
 
void DestroySizes ()
 
void Inverse (Connectivity &, IndexType nnodes=0) const
 
void InverseDegenerate (Connectivity &, IndexType nnodes=0) const
 
void GetNeighborhood (NeighborHood &, const Connectivity &dc, IndexType size=0)
 
void GetNeighborhood (Connectivity &, Connectivity &dc, bool exclude_self=true, bool sortit=false)
 
void GetAdjacent (Connectivity &rl, Connectivity &dc, IndexType n=0, bool sortit=false)
 
void graph_mode (IndexType offset=0)
 
void matrix_mode (IndexType offset=0)
 
void BuildFaceConnectivity (Connectivity &fcon, Connectivity &ef, std::vector< Mesh::SymbolicFace > &sf, Connectivity &dc) const
 
template<typename T >
void Flatten (std::vector< T > &outcon) const
 
void BreadthFirstRenumber (std::vector< Mesh::IndexType > &remap)
 
void ElementsOn (std::vector< Mesh::IndexType > &nodes, Connectivity &dc, std::vector< Mesh::IndexType > &subset)
 

Private Attributes

IndexType _nelem
 
std::vector< IndexType_sizes
 

Friends

std::ostream & operator<< (std::ostream &oSt, const Connectivity &ec)
 
std::istream & operator>> (std::istream &iSt, Connectivity &ec)
 

Additional Inherited Members

- Public Attributes inherited from vector< T >
elements
 STL member. More...
 

Detailed Description

General connectivity object.

The Connectivity is a very useful object which allows the description of adjacency of many types of things. Currently the most obvious is describing the connectivity of mesh cells.

Definition at line 334 of file Mesh.H.

Constructor & Destructor Documentation

Definition at line 222 of file Mesh.C.

222  : std::vector<std::vector<IndexType> >()
223  {
224  this ->_nelem = 0;
225  this->resize(0);
226  std::vector<std::vector<Mesh::IndexType> >(*this).swap(*this);
227  };
Connectivity ( unsigned int  N)

Definition at line 229 of file Mesh.C.

229  : std::vector<std::vector<IndexType> >(N)
230  {
231  std::vector<std::vector<Mesh::IndexType> >(*this).swap(*this);
232  };

Definition at line 234 of file Mesh.C.

234 { destroy(); };
void destroy()
Definition: Mesh.C:269

Member Function Documentation

void AddElement ( const std::vector< IndexType > &  elem)

Definition at line 235 of file Mesh.C.

Referenced by Rocon::burnout(), Mesh::BSExtent< T >::CreateUnstructuredMesh(), main(), TRAIL_SurfaceMesh2Window(), and TRAIL_UnstructuredMesh2Pane().

236  {
237  _nelem++;
238  this->push_back(elem);
239  };
IndexType _nelem
Definition: Mesh.H:339

Here is the caller graph for this function:

void AddElement ( )

Definition at line 240 of file Mesh.C.

241  {
242  _nelem++;
243  std::vector<IndexType> a;
244  this->push_back(a);
245  };
IndexType _nelem
Definition: Mesh.H:339
void BreadthFirstRenumber ( std::vector< Mesh::IndexType > &  remap)

Definition at line 593 of file Mesh.C.

References _nelem, i, and ni.

594  {
595  remap.resize(_nelem,0);
596  IndexType renumber = 1;
597  for(IndexType i = 0;i < _nelem && renumber <= _nelem;i++){
598  // while(renumber <= _nelem){
599  if(remap[i] == 0){
600  remap[i] = renumber++;
601  std::list<IndexType> processing_queue;
602  std::vector<IndexType>::iterator ni = (*this)[i].begin();
603  while(ni != (*this)[i].end()){
604  IndexType index = *ni++ - 1;
605  if(remap[index] == 0){
606  processing_queue.push_back(index);
607  remap[index] = renumber++;
608  }
609  }
610  std::list<IndexType>::iterator pqi = processing_queue.begin();
611  while(pqi != processing_queue.end()){
612  IndexType index = *pqi;
613  std::vector<IndexType>::iterator ini = (*this)[index].begin();
614  while(ini != (*this)[index].end()){
615  IndexType iindex = *ini++ - 1;
616  if(remap[iindex] == 0){
617  processing_queue.push_back(iindex);
618  remap[iindex] = renumber++;
619  }
620  }
621  pqi++;
622  }
623  }
624  }
625  assert((renumber == (_nelem+1)));
626  };
blockLoc i
Definition: read.cpp:79
IndexType _nelem
Definition: Mesh.H:339
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57
void BuildFaceConnectivity ( Connectivity fcon,
Connectivity ef,
std::vector< Mesh::SymbolicFace > &  sf,
Connectivity dc 
) const

Definition at line 337 of file Mesh.C.

References Esize(), Mesh::GenericElement::get_face_connectivities(), Nelem(), Mesh::GenericElement::nfaces(), Resize(), Sync(), and SyncSizes().

339  {
340  // this->Sync();
341  // this->SyncSizes();
342  ef.Resize(this->Nelem());
343  Mesh::IndexType number_of_elements = this->Nelem();
344  Mesh::IndexType nface_estimate = static_cast<Mesh::IndexType>(2.2 * number_of_elements);
345  fcon.Resize(0);
346  fcon.reserve(nface_estimate);
347  sf.reserve(nface_estimate);
348  Mesh::IndexType number_of_faces = 0;
349  std::vector<Mesh::Connectivity> all_face_conn;
350  all_face_conn.resize(this->Nelem());
351  // std::vector<Mesh::IndexType> element_nfaces;
352  // element_nfaces.resize(this->Nelem());
353  // This loop sizes the C[F] array (i.e. for each cell, which faces)
354  // They're init'd to 0 so that we can tell which faces have been processed
355  for(Mesh::IndexType element_being_processed = 1;
356  element_being_processed <= number_of_elements;
357  element_being_processed++)
358  {
359  Mesh::IndexType index = element_being_processed - 1;
360  Mesh::IndexType size_of_element = this->Esize(element_being_processed);
361  Mesh::GenericElement ge(size_of_element);
362  // element_nfaces[index] = nfaces;
363  ef[index].resize(ge.nfaces(),0);
364  // std::vector<Mesh::IndexType>(ef[index]).swap(ef[index]);
365  ge.get_face_connectivities(all_face_conn[index],(*this)[index]);
366  }
367  ef.Sync();
368  ef.SyncSizes();
369  // This loop populates the F[N] (i.e. for each face, which nodes), and
370  // the C[F] arrays.
371  for(Mesh::IndexType element_being_processed = 1;
372  element_being_processed <= number_of_elements;
373  element_being_processed++)
374  {
375  Mesh::IndexType index = element_being_processed - 1;
376  Mesh::IndexType size_of_element = this->Esize(element_being_processed);
377  Mesh::GenericElement ge(size_of_element);
378  Mesh::IndexType nfaces = ef.Esize(element_being_processed);
379  // Mesh::Connectivity efc;
380  // This call populates the F[N] for the faces local
381  // to the element_being_processed.
382  // ge.get_face_connectivities(efc,(*this)[index]);
383  // This loop goes through each face of the element_being_processed
384  // and updates the F[N] and C[F] arrays.
385  for(Mesh::IndexType face_being_processed = 1;
386  face_being_processed <= nfaces;
387  face_being_processed++){
388  Mesh::IndexType findex = face_being_processed - 1;
389  if(!ef[index][findex]){ // 0 if face hasn't yet been processed
390  fcon.push_back(all_face_conn[index][findex]); // add the new face to the F[N] array
391  ef[index][findex] = number_of_faces + 1; // add the face id to the C[F] array
392  SubEntityId seid1;
393  SubEntityId seid2;
394  sf.push_back(std::make_pair(seid1,seid2));
395  sf[number_of_faces].first.first = element_being_processed;
396  sf[number_of_faces].first.second = face_being_processed;
397  // Now look at each cell containing each node of the current face and determine
398  // which one (if any) have the same face. This will be the face neighbor of the
399  // element_being_processed for the face identified by (number_of_faces + 1).
400  // std::list<Mesh::IndexType> element_nbrlist;
401  bool found = false;
402  std::vector<Mesh::IndexType>::iterator fni = fcon[number_of_faces].begin();
403  while(fni != fcon[number_of_faces].end() && !found){ // for every node in this face
404  Mesh::IndexType face_node_index = *fni++ - 1;
405  std::vector<Mesh::IndexType>::iterator enbri = dc[face_node_index].begin();
406  while(enbri != dc[face_node_index].end() && !found){ // look thru all the node's cells
407  Mesh::IndexType enbr_index = *enbri++ - 1;
408  if(enbr_index+1 > element_being_processed){
409  Mesh::IndexType nbr_nfaces = ef.Esize(enbr_index+1);
410  for(Mesh::IndexType nbrface = 1;nbrface <= nbr_nfaces && !found;nbrface++){
411  Mesh::IndexType nbr_face_index = nbrface -1;
412  if(!ef[enbr_index][nbr_face_index]){
413  if(IRAD::Util::HaveOppositeOrientation(all_face_conn[index][findex],
414  all_face_conn[enbr_index][nbr_face_index])){
415  found = true;
416  ef[enbr_index][nbr_face_index] = number_of_faces + 1;
417  sf[number_of_faces].second.first = enbr_index+1;
418  sf[number_of_faces].second.second = nbr_face_index+1;
419  } // if faces match
420  }
421  }
422  }
423  }
424  }
425  number_of_faces++;
426  }
427  }
428  }
429  fcon.Sync();
430  };
std::pair< IndexType, CellEntityIDType > SubEntityId
Definition: Mesh.H:59
IndexType Esize(IndexType n) const
Definition: Mesh.H:365
IndexType Nelem() const
Definition: Mesh.H:364
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Here is the call graph for this function:

void destroy ( )

Definition at line 269 of file Mesh.C.

Referenced by main().

269  {
270  DestroySizes();
271  Connectivity::iterator ti = this->begin();
272  while(ti != this->end()){
273  ti->resize(0);
274  std::vector<IndexType> tmp(*ti);
275  ti->swap(tmp);
276  ti++;
277  }
278  this->resize(0);
279  std::vector<std::vector<IndexType> >(*this).swap(*this);
280  };
void DestroySizes()
Definition: Mesh.C:289

Here is the caller graph for this function:

void DestroySizes ( )

Definition at line 289 of file Mesh.C.

289 { _sizes.resize(0);};
std::vector< IndexType > _sizes
Definition: Mesh.H:340
std::vector<IndexType>& Element ( IndexType  n)
inline

Definition at line 346 of file Mesh.H.

References _nelem.

346  {
347  assert(n > 0 && n <= _nelem);
348  return((*this)[n-1]);
349  };
const NT & n
IndexType _nelem
Definition: Mesh.H:339
std::vector<IndexType> Element ( IndexType  n) const
inline

Definition at line 350 of file Mesh.H.

References _nelem.

350  {
351  assert(n > 0 && n <= _nelem);
352  return((*this)[n-1]);
353  };
const NT & n
IndexType _nelem
Definition: Mesh.H:339
void ElementsOn ( std::vector< Mesh::IndexType > &  nodes,
Connectivity dc,
std::vector< Mesh::IndexType > &  subset 
)

Definition at line 569 of file Mesh.C.

References ni.

572  {
573  std::list<Mesh::IndexType> alist;
574  std::vector<Mesh::IndexType>::iterator ni = nodes.begin();
575  while(ni != nodes.end()){
576  Mesh::IndexType node_index = *ni++ - 1;
577  std::vector<Mesh::IndexType>::iterator dci = dc[node_index].begin();
578  while(dci != dc[node_index].end())
579  alist.push_back(*dci++);
580  }
581  alist.sort();
582  alist.unique();
583  subset.resize(alist.size());
584  std::vector<Mesh::IndexType>::iterator ssi = subset.begin();
585  std::list<Mesh::IndexType>::iterator li = alist.begin();
586  while(li != alist.end())
587  *ssi++ = *li++;
588  };
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57
IndexType Esize ( IndexType  n) const
inline

Definition at line 365 of file Mesh.H.

References _nelem, and _sizes.

Referenced by BuildFaceConnectivity(), Rocon::burnout(), GetStatistics(), main(), stitchGrids(), Mesh::writeVtkData(), and writeVtkData().

366  {
367  assert(n > 0 && n <= _nelem);
368  return (_sizes.empty() ? (*this)[n-1].size() : _sizes[n-1]);
369  };
std::vector< IndexType > _sizes
Definition: Mesh.H:340
const NT & n
IndexType _nelem
Definition: Mesh.H:339

Here is the caller graph for this function:

void Flatten ( std::vector< T > &  outcon) const
inline

Definition at line 394 of file Mesh.H.

Referenced by TRAIL_FD2FE_WinCreate(), and TRAIL_FD2FE_WinCreate2().

395  {
396  outcon.resize(0);
397  std::vector<std::vector<IndexType> >::const_iterator eci = this->begin();
398  while(eci != this->end()){
399  std::vector<IndexType>::const_iterator eni = eci->begin();
400  while(eni != eci->end())
401  outcon.push_back(*eni++);
402  eci++;
403  }
404  };

Here is the caller graph for this function:

void GetAdjacent ( Connectivity rl,
Connectivity dc,
IndexType  n = 0,
bool  sortit = false 
)

Definition at line 520 of file Mesh.C.

References _nelem, i, j, n, ni, and Resize().

Referenced by main().

524  {
525  rl.Resize(_nelem);
526  rl._nelem = _nelem;
527  IndexType nadj = n;
528  if(n == 0){
529  std::cout << "GETADJACENT: Determining MaxNodeId" << std::endl;
530  nadj = MaxNodeId<Connectivity,std::vector<IndexType> >(dc);
531  }
532  std::vector<bool> added(nadj,false);
533  for(IndexType i = 0; i < _nelem;i++){
534  // IndexType current_element = i + 1;
535  std::vector<IndexType>::iterator ni = (*this)[i].begin();
536  std::list<IndexType> nbrlist;
537  while(ni != (*this)[i].end()){
538  IndexType index = *ni - 1;
539  std::vector<IndexType>::iterator dci = dc[index].begin();
540  while(dci != dc[index].end()){
541  IndexType ai = *dci - 1;
542  if(!added[ai]){
543  nbrlist.push_back(*dci);
544  added[ai] = true;
545  }
546  dci++;
547  }
548  ni++;
549  }
550  if(sortit)
551  nbrlist.sort();
552  // nbrlist.unique();
553  rl[i].resize(nbrlist.size());
554  IndexType j = 0;
555  std::list<IndexType>::iterator si = nbrlist.begin();
556  while(si != nbrlist.end()){
557  rl[i][j++] = *si;
558  added[*si-1] = false;
559  si++;
560  }
561  }
562  };
blockLoc i
Definition: read.cpp:79
const NT & n
IndexType _nelem
Definition: Mesh.H:339
j indices j
Definition: Indexing.h:6
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Here is the call graph for this function:

Here is the caller graph for this function:

void GetNeighborhood ( NeighborHood rl,
const Connectivity dc,
IndexType  size = 0 
)

Definition at line 456 of file Mesh.C.

References _nelem, i, and ni.

Referenced by main().

459  {
460  rl.resize(_nelem);
461  // rl._nelem = _nelem;
462  for(IndexType i = 0; i < _nelem;i++){
463  std::vector<IndexType>::const_iterator ni = (*this)[i].begin();
464  while(ni != (*this)[i].end()){
465  IndexType index = *ni - 1;
466  std::vector<IndexType>::const_iterator dci = dc[index].begin();
467  while(dci != dc[index].end())
468  rl[i].insert(*dci++);
469  ni++;
470  }
471  rl[i].erase(i+1);
472  }
473  };
blockLoc i
Definition: read.cpp:79
IndexType _nelem
Definition: Mesh.H:339
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Here is the caller graph for this function:

void GetNeighborhood ( Connectivity rl,
Connectivity dc,
bool  exclude_self = true,
bool  sortit = false 
)

Definition at line 476 of file Mesh.C.

References _nelem, i, j, ni, and Resize().

480  {
481  rl.Resize(_nelem);
482  rl._nelem = _nelem;
483  std::vector<bool> added(_nelem,false);
484  for(IndexType i = 0; i < _nelem;i++){
485  IndexType current_element = i + 1;
486  std::vector<IndexType>::iterator ni = (*this)[i].begin();
487  std::list<IndexType> nbrlist;
488  while(ni != (*this)[i].end()){
489  IndexType index = *ni - 1;
490  std::vector<IndexType>::iterator dci = dc[index].begin();
491  while(dci != dc[index].end()){
492  IndexType ai = *dci - 1;
493  if(!added[ai]){
494  nbrlist.push_back(*dci);
495  added[ai] = true;
496  }
497  dci++;
498  }
499  ni++;
500  }
501  if(sortit)
502  nbrlist.sort();
503  // nbrlist.unique();
504  if(exclude_self){
505  nbrlist.remove(current_element);
506  added[i] = false;
507  }
508  rl[i].resize(nbrlist.size());
509  IndexType j = 0;
510  std::list<IndexType>::iterator si = nbrlist.begin();
511  while(si != nbrlist.end()){
512  rl[i][j++] = *si;
513  added[*si-1] = false;
514  si++;
515  }
516  }
517  };
blockLoc i
Definition: read.cpp:79
IndexType _nelem
Definition: Mesh.H:339
j indices j
Definition: Indexing.h:6
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Here is the call graph for this function:

void graph_mode ( IndexType  offset = 0)

Definition at line 434 of file Mesh.C.

Referenced by main().

435  {
436  Connectivity::iterator ci = this->begin();
437  IndexType n = 1;
438  while(ci != this->end()){
439  ci->erase(std::lower_bound(ci->begin(),ci->end(),offset+n++));
440  ci++;
441  }
442  };
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
const NT & n
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Here is the caller graph for this function:

void Inverse ( Connectivity rc,
IndexType  nnodes = 0 
) const

Definition at line 312 of file Mesh.C.

References _nelem, i, Resize(), and Sync().

Referenced by BuildBorderStiffness(), Mesh::MeshUtilityObject::FormConnectivity(), GlobalDofReMapExchange(), and main().

313  {
314  if(nnodes <= 0)
315  nnodes = MaxNodeId<Connectivity,std::vector<IndexType> >(*this);
316  // Connectivity::const_iterator ci = this->begin();
317  // while(ci != this->end()){
318  // std::vector<IndexType>::const_iterator ii = ci->begin();
319  // while(ii != ci->end()){
320  // nnodes = (nnodes > *ii ? nnodes : *ii);
321  // ii++;
322  // }
323  // ci++;
324  // }
325  // }
326  rc.Resize(nnodes);
327  rc.Sync();
328  for(IndexType i = 0;i < _nelem;i++){
329  std::vector<IndexType>::const_iterator ii = (*this)[i].begin();
330  while(ii != (*this)[i].end()){
331  rc[*ii-1].push_back(i+1);
332  ii++;
333  }
334  }
335  };
blockLoc i
Definition: read.cpp:79
IndexType _nelem
Definition: Mesh.H:339
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Here is the call graph for this function:

Here is the caller graph for this function:

void InverseDegenerate ( Connectivity rc,
IndexType  nnodes = 0 
) const

Definition at line 293 of file Mesh.C.

References i, Resize(), and Sync().

Referenced by main().

294  {
295  if(nnodes <= 0)
296  nnodes = MaxNodeId<Connectivity,std::vector<IndexType> >(*this);
297  rc.Resize(nnodes);
298  rc.Sync();
299  for(IndexType i = 0;i < _nelem;i++){
300  if((*this)[i].size() > 1){
301  std::vector<IndexType>::const_iterator ii = (*this)[i].begin();
302  while(ii != (*this)[i].end()){
303  rc[*ii-1].push_back(i+1);
304  ii++;
305  }
306  }
307  }
308  };
blockLoc i
Definition: read.cpp:79
IndexType _nelem
Definition: Mesh.H:339
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Here is the call graph for this function:

Here is the caller graph for this function:

void matrix_mode ( IndexType  offset = 0)

Definition at line 444 of file Mesh.C.

References n.

Referenced by main().

445  {
446  Connectivity::iterator ci = this->begin();
447  IndexType n = 1;
448  while(ci != this->end()){
449  ci->insert(std::lower_bound(ci->begin(),ci->end(),offset+n),1,offset+n);
450  n++;
451  ci++;
452  }
453  };
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
const NT & n
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Here is the caller graph for this function:

IndexType Nelem ( ) const
inline

Definition at line 364 of file Mesh.H.

References _nelem.

Referenced by BuildFaceConnectivity(), Rocon::burnout(), GetStatistics(), main(), stitchGrids(), TRAIL_FD2FE_WinCreate(), TRAIL_FD2FE_WinCreate2(), TRAIL_SurfaceMesh2Window(), and TRAIL_UnstructuredMesh2Pane().

364 { return _nelem;};
IndexType _nelem
Definition: Mesh.H:339

Here is the caller graph for this function:

IndexType& Node ( IndexType  e,
IndexType  n 
)
inline

Definition at line 354 of file Mesh.H.

Referenced by Rocon::burnout(), Mesh::GenericCell_2::GetNormalSet(), Mesh::GenericCell_2::GetPointSet(), Mesh::GenericElement::shapef_jacobian_at(), and stitchGrids().

354  {
355  assert(e > 0 && e <= _nelem && n > 0);
356  assert(n <= (*this)[e-1].size());
357  return((*this)[e-1][n-1]);
358  };
const NT & n

Here is the caller graph for this function:

IndexType Node ( IndexType  e,
IndexType  n 
) const
inline

Definition at line 359 of file Mesh.H.

359  {
360  assert(e > 0 && e <= _nelem && n > 0);
361  assert(n <= (*this)[e-1].size());
362  return((*this)[e-1][n-1]);
363  };
const NT & n
void Resize ( unsigned int  N = 0)

Definition at line 233 of file Mesh.C.

Referenced by BuildFaceConnectivity(), Mesh::GenericElement::get_face_connectivities(), GetAdjacent(), GetNeighborhood(), Inverse(), InverseDegenerate(), and Mesh::operator>>().

233 {this->resize(N);};

Here is the caller graph for this function:

void ShrinkWrap ( )

Definition at line 247 of file Mesh.C.

Referenced by main(), and Mesh::Partition::Read().

248  {
249  _nelem = this->size();
250  Connectivity::iterator ti = this->begin();
251  while(ti != this->end()){
252  std::vector<Mesh::IndexType>(*ti).swap(*ti);
253  ti++;
254  }
255  std::vector<std::vector<Mesh::IndexType> >(*this).swap(*this);
256  };
IndexType _nelem
Definition: Mesh.H:339

Here is the caller graph for this function:

void Sync ( )

Definition at line 246 of file Mesh.C.

Referenced by BuildFaceConnectivity(), Rocon::burnout(), Mesh::BSExtent< T >::CreateUnstructuredMesh(), Inverse(), InverseDegenerate(), main(), Mesh::Partition::Read(), test(), and TRAIL_FD2FE_WinCreate2().

246 { _nelem = this->size();};
IndexType _nelem
Definition: Mesh.H:339

Here is the caller graph for this function:

void SyncSizes ( )

Definition at line 281 of file Mesh.C.

References i.

Referenced by BuildFaceConnectivity(), main(), TRAIL_FD2FE_WinCreate2(), Mesh::writeVtkData(), and writeVtkData().

281  {
282  _sizes.resize(_nelem);
283  for(IndexType i = 0;i < _nelem;i++){
284  _sizes[i] = (*this)[i].size();
285  // std::vector<IndexType> tmp((*this)[i]);
286  // ((*this)[i].swap(tmp));
287  }
288  };
std::vector< IndexType > _sizes
Definition: Mesh.H:340
blockLoc i
Definition: read.cpp:79
IndexType _nelem
Definition: Mesh.H:339
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Here is the caller graph for this function:

void Truncate ( )

Definition at line 257 of file Mesh.C.

Referenced by main().

258  {
259  Connectivity::iterator ti = this->begin();
260  while(ti != this->end()){
261  if(ti->empty()){
262  ti = this->erase(ti);
263  _nelem--;
264  }
265  else
266  ti++;
267  }
268  };
IndexType _nelem
Definition: Mesh.H:339

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  oSt,
const Connectivity ec 
)
friend

Definition at line 2146 of file Mesh.C.

2147  {
2148  oSt << std::setiosflags(std::ios::left) << ec.size();
2149  if(ec.size() == 0) return(oSt);
2150  oSt << "\n";
2151  Mesh::Connectivity::const_iterator ci = ec.begin();
2152  while(ci != ec.end()){
2153  std::vector<IndexType>::const_iterator ni = ci->begin();
2154  while(ni != ci->end()){
2155  oSt << *ni++;
2156  if(ni != ci->end())
2157  oSt << "\t";
2158  }
2159  ci++;
2160  if(ci != ec.end())
2161  oSt << "\n";
2162  }
2163  return(oSt);
2164  }
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
std::istream& operator>> ( std::istream &  iSt,
Mesh::Connectivity ec 
)
friend

Definition at line 2085 of file Mesh.C.

2086  {
2087  std::string line;
2088  std::getline(iSt,line);
2089  std::istringstream Istr(line);
2090  IndexType nelem = 0;
2091  Istr >> nelem;
2092  if(nelem > 0){
2093  ec.Resize(nelem);
2094  ec._nelem = nelem;
2095  for(IndexType i = 0;i < nelem;i++){
2096  std::getline(iSt,line);
2097  std::istringstream Istr2(line);
2098  IndexType node;
2099  ec[i].reserve(8);
2100  while(Istr2 >> node)
2101  ec[i].push_back(node);
2102  std::vector<Mesh::IndexType>(ec[i]).swap(ec[i]);
2103  }
2104  }
2105  return(iSt);
2106  }
void swap(int &a, int &b)
Definition: buildface.cpp:88
Definition: adj.h:150
void Resize(unsigned int N=0)
Definition: Mesh.C:233
blockLoc i
Definition: read.cpp:79
IndexType _nelem
Definition: Mesh.H:339
IRAD::Primitive::IndexType IndexType
Definition: Mesh.H:57

Member Data Documentation

IndexType _nelem
private
std::vector<IndexType> _sizes
private

Definition at line 340 of file Mesh.H.

Referenced by Esize(), and main().


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