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

#include <Partition.H>

Inheritance diagram for PartitionPatch:
Collaboration diagram for PartitionPatch:

Public Member Functions

bool ReadPartitionPatchASCII (ifstream &Inf)
 
bool WritePartitionPatchASCII (ofstream &Ouf)
 
bool ReadPartitionPatch (ifstream &Inf)
 
 PartitionPatch ()
 
 PartitionPatch (const GEM_DomainBoundary &db)
 
- Public Member Functions inherited from GEM_DomainBoundary
unsigned int NNodes (void)
 
bool SetSolverDataBlock (const std::string &wname, double *cell_data, int nval_cells, double *node_data, int nval_nodes)
 
 GEM_DomainBoundary (const GEM_DomainBoundary &db)
 
 GEM_DomainBoundary ()
 
GEM_DomainBoundaryoperator= (const GEM_DomainBoundary &db)
 
bool debug (bool s=true)
 
void report ()
 
void PopulateSurfaceArrays (const std::vector< double > &, unsigned int)
 
bool Register_com_surfmesh (const std::string &wname)
 
void Create_com_surfsoln (const std::string &wname, const std::string &fname, std::vector< double > &fvec, unsigned int ncomp, const std::string &unit)
 

Public Attributes

unsigned int _nfaces
 
unsigned int _ngfaces
 
vector< unsigned int > _faceconn
 
- Public Attributes inherited from GEM_DomainBoundary
unsigned int _id
 
unsigned int _ngtri
 
unsigned int _ngquad
 
unsigned int _nnodes
 
std::vector< unsigned int > _triconn
 
std::vector< unsigned int > _quadconn
 
std::vector< double > surface_coordinates
 
unsigned int surface_ngnodes
 
std::vector< unsigned int > surface_tri
 
std::vector< unsigned int > surface_quad
 
GEM_UserData _data
 
GEM_UserData _solver_data
 
bool _debug
 
std::ostream * _out
 
int pane_id
 

Detailed Description

Definition at line 68 of file Partition.H.

Constructor & Destructor Documentation

PartitionPatch ( )
inline

Definition at line 76 of file Partition.H.

References _nfaces, and _ngfaces.

78  {
79  _nfaces = 0;
80  _ngfaces = 0;
81  };
GEM_DomainBoundary()
Definition: GEM.H:164
unsigned int _ngfaces
Definition: Partition.H:71
unsigned int _nfaces
Definition: Partition.H:70
PartitionPatch ( const GEM_DomainBoundary db)
inline

Definition at line 82 of file Partition.H.

References _nfaces, _ngfaces, GEM_DomainBoundary::_ngquad, GEM_DomainBoundary::_ngtri, GEM_DomainBoundary::_quadconn, and GEM_DomainBoundary::_triconn.

83  : GEM_DomainBoundary(db)
84  {
85  _nfaces = db._triconn.size()/3 + db._quadconn.size()/4;
86  _ngfaces = db._ngtri + db._ngquad;
87  };
std::vector< unsigned int > _quadconn
Definition: GEM.H:132
std::vector< unsigned int > _triconn
Definition: GEM.H:131
unsigned int _ngquad
Definition: GEM.H:129
GEM_DomainBoundary()
Definition: GEM.H:164
unsigned int _ngfaces
Definition: Partition.H:71
unsigned int _nfaces
Definition: Partition.H:70
unsigned int _ngtri
Definition: GEM.H:128

Member Function Documentation

bool ReadPartitionPatch ( ifstream &  Inf)

Definition at line 42 of file Partition.C.

Referenced by Partition::ReadPartitionPatches().

43 {
44  int buf[3];
45  Inf.read(reinterpret_cast<char *>(buf),12);
46  _id = -buf[0];
47  _nfaces = buf[1];
48  _ngfaces = buf[2];
49  // _faceconn.resize(4*_nfaces);
50  // Inf.read(reinterpret_cast<char *>(&_faceconn[0]),4 * nfaces);
51  // skip the face connectivity until Bill tell us whats up with it
52  Inf.seekg(16 * _nfaces,ios::cur);
53  return(true);
54 }
unsigned int _id
Definition: GEM.H:127
unsigned int _ngfaces
Definition: Partition.H:71
unsigned int _nfaces
Definition: Partition.H:70

Here is the caller graph for this function:

bool ReadPartitionPatchASCII ( ifstream &  Inf)

Definition at line 57 of file Partition.C.

Referenced by Partition::ReadPartitionPatchesASCII().

58 {
59  _ngtri = 0;
60  _ngquad = 0;
61  Inf >> _id >> _nfaces >> _ngfaces;
62  unsigned int nfaces_accum = 0;
63  nfaces_accum += _nfaces;
64  _ngtri = _ngfaces;
65  _id *= -1;
66  _triconn.resize(3*_nfaces);
67  unsigned int face = 0;
68  while(face < _nfaces){
69  unsigned int node1,node2,node3;
70  Inf >> node1 >> node2 >> node3;
71  _triconn[face*3] = node1;
72  _triconn[face*3+1] = node2;
73  _triconn[face*3+2] = node3;
74  face++;
75  }
76  Inf >> _nfaces >> _ngfaces;
77  nfaces_accum += _nfaces;
78  _ngquad = _ngfaces;
79  _quadconn.resize(4*_nfaces);
80  face = 0;
81  while(face < _nfaces){
82  unsigned int node1,node2,node3,node4;
83  Inf >> node1 >> node2 >> node3 >> node4;
84  _quadconn[face*4] = (node1);
85  _quadconn[face*4+1] = (node2);
86  _quadconn[face*4+2] = (node3);
87  _quadconn[face*4+3] = (node4);
88  face++;
89  }
90  _nfaces = nfaces_accum;
91  _ngfaces = _ngquad + _ngtri;
92  return(true);
93 }
Definition: face.h:90
std::vector< unsigned int > _quadconn
Definition: GEM.H:132
unsigned int _id
Definition: GEM.H:127
std::vector< unsigned int > _triconn
Definition: GEM.H:131
unsigned int _ngquad
Definition: GEM.H:129
unsigned int _ngfaces
Definition: Partition.H:71
unsigned int _nfaces
Definition: Partition.H:70
unsigned int _ngtri
Definition: GEM.H:128

Here is the caller graph for this function:

bool WritePartitionPatchASCII ( ofstream &  Ouf)

Definition at line 96 of file Partition.C.

Referenced by Partition::WritePartitionPatchesASCII().

97 {
98  unsigned int nfaces = _triconn.size()/3;
99  unsigned int face = 0;
100  Ouf << setw(12) << (_id < 0 ? _id : -1*_id) << endl
101  << setw(12) << nfaces << endl
102  << setw(12) << _ngtri << endl;
103  while(face < nfaces){
104  Ouf << setw(12) << _triconn[face*3]
105  << setw(12) << _triconn[face*3+1]
106  << setw(12) << _triconn[face*3+2] << endl;
107  face++;
108  }
109  nfaces = _quadconn.size()/4;
110  face = 0;
111  Ouf << setw(12) << nfaces << endl
112  << setw(12) << _ngquad << endl;
113  while(face < nfaces){
114  Ouf << setw(12) << _quadconn[face*4]
115  << setw(12) << _quadconn[face*4+1]
116  << setw(12) << _quadconn[face*4+2]
117  << setw(12) << _quadconn[face*4+3] << endl;
118  face++;
119  }
120  return(true);
121 }
Definition: face.h:90
std::vector< unsigned int > _quadconn
Definition: GEM.H:132
unsigned int _id
Definition: GEM.H:127
std::vector< unsigned int > _triconn
Definition: GEM.H:131
unsigned int _ngquad
Definition: GEM.H:129
unsigned int _ngtri
Definition: GEM.H:128

Here is the caller graph for this function:

Member Data Documentation

vector<unsigned int> _faceconn

Definition at line 72 of file Partition.H.

unsigned int _nfaces

Definition at line 70 of file Partition.H.

Referenced by PartitionPatch().

unsigned int _ngfaces

Definition at line 71 of file Partition.H.

Referenced by PartitionPatch().


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