40 unsigned int nnodes=0)
42 Resize(ncells,nfaces,nnodes);
45 Resize(
unsigned int ncells=0,
unsigned int nfaces=0,
unsigned int nnodes=0)
47 _rhof.resize(ncells,0.0);
48 _rhovf.resize(3*ncells,0.0);
50 _pf.resize(ncells,0.0);
51 _Tf.resize(ncells,0.0);
52 _af.resize(ncells,0.0);
53 _disp.resize(nnodes*3,0.0);
54 _gsp.resize(nfaces,0.0);
81 void Resize(
unsigned int nfaces=0,
unsigned int nvert=0)
83 _gsp.resize(nfaces,0);
88 _pf.resize(nfaces,0.0);
89 _qc.resize(nfaces,0.0);
90 _qr.resize(nfaces,0.0);
91 _tf.resize(3*nfaces,0.0);
137 unsigned int nelem();
140 int&,
unsigned int&);
146 bool ReadFluDIM(
const string &p=
"",
double=0.0,
bool=
true);
147 bool WriteFluDIM(
const string &p=
"",
double=0.0,
bool=
true);
151 double=0.0,
bool=
true);
153 double=0.0,
bool=
true);
155 double=0.0,
bool=
true);
156 bool ReadGSPASCII(
const std::string&p=
"",
unsigned int=0,
157 double=0.0,
bool=
true);
159 double=0.0,
bool=
true);
166 double *node_data,
int nval_nodes);
201 template<
typename DB>
204 map<unsigned int,unsigned int> patch_mapping;
207 vector<FluPatch>::iterator fpi =
_patches.begin();
209 fpi->_ntri = fpi->_triconn.size()/3;
210 fpi->_nquad = fpi->_quadconn.size()/4;
216 template<
typename PB>
219 unsigned int nborders = pb.size();
221 unsigned int border = 0;
222 while(border < nborders){
223 _borders[border]._rpart = pb[border]._rpart;
224 _borders[border]._sendcells = pb[border]._sendcells;
225 _borders[border]._recvcells = pb[border]._recvcells;
226 _borders[border]._sharenodes = pb[border]._sharenodes;
227 _borders[border]._sendnodes = pb[border]._sendnodes;
228 _borders[border]._recvnodes = pb[border]._recvnodes;
229 _borders[border]._rbid = pb[border]._rbid;
230 _borders[border]._out = pb[border]._out;
243 while(index < ncsend){
245 if(!(csend[ind] <= nreal_cell)){
247 *
_out <<
"SEND CELL " << index <<
" is a ghost cell!!" << endl;
250 if(!(csend[ind] > 0)){
252 *
_out <<
"SEND CELL " << index <<
" is zero or negative!" << endl;
257 list<int> recvcell_list;
258 while(index < ncrecv) {
260 if(!(crecv[ind] > nreal_cell)){
262 *
_out <<
"RECV CELL " << index <<
" is a real cell!!" << endl;
265 if(!(crecv[ind] > 0)){
267 *
_out <<
"RECV CELL " << index <<
" is zero or negative!" << endl;
271 list<int>::iterator rci = recvcell_list.begin();
272 while(rci != recvcell_list.end() && !duped){
273 if(crecv[ind] == *rci++){
275 *
_out <<
"RECV CELL " << index
276 <<
" is duplicated in the receive list!"
282 recvcell_list.push_back(crecv[ind]);
287 int nnrecv,
int ncsend,
int ncrecv,
288 int *nshared,
int *nsend,
int *nrecv,
289 int *csend,
int *crecv){
290 assert(rpid > 0 && rpin >= 0);
292 *
_out <<
"FluRegion(" <<
_id <<
")::AddFluBorder: Adding Border with"
293 <<
" region " << rpid <<
"." << endl;
295 new_border.
_rbid = rpin;
299 *
_out <<
"FluRegion(" <<
_id <<
")::AddFluBorder: Validation of "
300 <<
"communication arrays failed, aborting." << endl;
303 new_border.
populate(rpid,nnshare,nnsend,nnrecv,ncsend,ncrecv,
304 nshared,nsend,nrecv,csend,crecv);
308 int nquad,
int ngquad,
int *quads)
310 assert(ntri >= ngtri && nquad >= ngquad);
312 *
_out <<
"FluRegion(" <<
_id <<
")::AddFluPatch: Adding Patch with"
313 <<
" id " << patch_id <<
"." << endl;
315 new_patch.
_ntri = ntri;
317 new_patch.
_id = patch_id;
324 while(indy < 3*ntri){
325 assert(tris[indy] != 0);
326 new_patch.
_triconn[indy] = tris[indy];
327 assert(new_patch.
_triconn[indy] != 0);
331 while(indy < 4*nquad){
332 assert(quads[indy] != 0);
345 istream &
SkipLines(istream &,
unsigned int = 1);
bool PopRemBordIndFILE(const string &p="", double=0.0, bool=true)
bool WriteFluCOM(const string &p="")
bool ReadFluSolnASCII(const std::string &p="", unsigned int=0, double=0.0, bool=true)
bool PopulateFluBorders(vector< PB > &pb)
bool ComRemeshInitData(const string &wname, double *cell_data, int nval_cells, double *node_data, int nval_nodes)
void MapDomainBoundaries(std::map< unsigned int, unsigned int > &bcmap)
bool WriteFluCMP(const string &p="")
bool InitSurfaceSoln(const string &prefix="", bool=false)
bool WriteFluSolnASCII(const std::string &p="", unsigned int=0, double=0.0, bool=true)
bool CreateRegionMapFile(const string &p="", unsigned int=0, unsigned int=0)
std::vector< unsigned int > _tetconn
bool ReadRegionASCII(const string &p="", unsigned int=0, unsigned int=0, double=0.0, bool=true)
void AddFluBorder(int rpid, int rpin, int nnshare, int nnsend, int nnrecv, int ncsend, int ncrecv, int *nshared, int *nsend, int *nrecv, int *csend, int *crecv)
vector< FluBorder > _borders
bool ReadFluGridASCII(const std::string &p="", double=0.0, bool=true)
void AddFluPatch(int patch_id, int ntri, int ngtri, int *tris, int nquad, int ngquad, int *quads)
bool ReadFluCOM(const string &p="")
std::vector< unsigned int > _quadconn
unsigned int _cell_ordering[4]
unsigned int _npatches_total
vector< double > _rhofvf_alp
bool RegisterSoln(const string &, bool)
vector< double > _Tflm_alp
bool PopulateFluPatches(const string &pre, vector< DB > &db)
std::vector< unsigned int > _triconn
bool BuildPatchMapping(map< unsigned int, unsigned int > &, const string &p="")
bool RegisterVolumeSoln(bool)
bool WriteGSPASCII(const std::string &p="", unsigned int=0, double=0.0, bool=true)
bool WriteFluDIM(const string &p="", double=0.0, bool=true)
std::vector< unsigned int > _pyrconn
bool validate_comm_list(int ncsend, int ncrecv, int *csend, int *crecv)
std::vector< unsigned int > _hexconn
void Resize(unsigned int ncells=0, unsigned int nfaces=0, unsigned int nnodes=0)
void populate(int rpid, int nnshared, int nnsend, int nnrecv, int ncsend, int ncrecv, int *sharedn, int *sendn, int *recvn, int *sendc, int *recvc)
bool ReadFluDIM(const string &p="", double=0.0, bool=true)
vector< pair< unsigned int, unsigned int > > _cellmap
bool WriteFluNative(const string &p="")
vector< FluPatch > _patches
vector< double > _mdot_alp
bool RegisterSurfaceSoln(bool)
bool InitSurfaceSoln(const string &p="")
FluSurfSoln(unsigned int nfaces=0, unsigned int nvert=0)
bool Cell2Elem(unsigned int, unsigned int &, unsigned int &)
void Resize(unsigned int nfaces=0, unsigned int nvert=0)
bool InitVolumeSoln(const string &p="")
FluRegion(const GEM_Partition &gp)
istream & SkipLines(istream &, unsigned int=1)
bool WriteFluGridASCII(const string &pre="", double=0.0, bool=true)
std::vector< double > _nc
std::vector< unsigned int > _prisconn
vector< double > _rhof_alp
bool ReadGSPASCII(const std::string &p="", unsigned int=0, double=0.0, bool=true)
bool RegisterFluSurfaceMesh()
FluVolumeSoln(unsigned int ncells=0, unsigned int nfaces=0, unsigned int nnodes=0)