Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mblockData::blockPatches Class Reference
Collaboration diagram for mblockData::blockPatches:

Public Member Functions

void init (block *b)
 
void write (FILE *out, mblockData &d, block *b)
 
void swap (int &a, int &b)
 
int getPatchNumber (patch *forPatch, int *retFace=NULL)
 
int totalPatches (void) const
 

Public Attributes

vector< patch * > patches [block::nFaces]
 

Detailed Description

Definition at line 67 of file writemblock.cpp.

Member Function Documentation

int getPatchNumber ( patch forPatch,
int *  retFace = NULL 
)
inline

Definition at line 76 of file writemblock.cpp.

References block::nFaces, and patches.

Referenced by mblockData::getPatchListWith().

77  {
78  //Find that patch in our list
79  int patchNo=0;
80  for (int f=0;f<block::nFaces;f++)
81  for (unsigned int p=0;p<patches[f].size();p++)
82  if (patches[f][p]==forPatch) {
83  if (retFace!=NULL) *retFace=f;
84  return patchNo;
85  }
86  else
87  patchNo++;
88  fprintf(stderr,"Can't match patch in %s!\n",__FILE__);
89  abort();
90  return 0;
91  }
vector< patch * > patches[block::nFaces]
Definition: writemblock.cpp:69

Here is the caller graph for this function:

void init ( block b)
inline

Definition at line 70 of file writemblock.cpp.

References block::getFace(), face::getPatches(), block::nFaces, and patches.

70  {
71  for (int f=0;f<block::nFaces;f++)
72  patches[f]=b->getFace(f).getPatches();
73  }
const vector< patch * > & getPatches(void) const
Definition: face.h:145
vector< patch * > patches[block::nFaces]
Definition: writemblock.cpp:69
face & getFace(int faceNo)
Definition: adj.h:248

Here is the call graph for this function:

void swap ( int &  a,
int &  b 
)
inline

Definition at line 75 of file writemblock.cpp.

75 {int tmp=a;a=b;b=tmp;}
int totalPatches ( void  ) const
inline

Definition at line 92 of file writemblock.cpp.

References block::nFaces, and patches.

Referenced by write().

92  {
93  int ret=0;
94  for (int f=0;f<block::nFaces;f++)
95  ret+=patches[f].size();
96  return ret;
97  }
vector< patch * > patches[block::nFaces]
Definition: writemblock.cpp:69

Here is the caller graph for this function:

void write ( FILE *  out,
mblockData d,
block b 
)

Definition at line 168 of file writemblock.cpp.

References block::getBlockNumber(), block::getDim(), block::nFaces, patches, totalPatches(), and writeMblock().

Referenced by mblockData::write().

169 {
170  //Write the block header:
171  fprintf(out,"# Charm++ Mblock framework block boundary condition file\n");
172  fprintf(out,"1.0 # Version number\n");
173  fprintf(out,"%d %d %d %d # Block number and size\n",b->getBlockNumber(),
174  b->getDim()[0],b->getDim()[1],b->getDim()[2]);
175  fprintf(out,"%d %d # Number of faces, patches\n",block::nFaces,totalPatches());
176  for (int f=0;f<block::nFaces;f++)
177  {
178  fprintf(out,"\n%d # Number of patches on this face\n",
179  (int)patches[f].size());
180  for (unsigned int p=0;p<patches[f].size();p++)
181  patches[f][p]->writeMblock(out,d);
182  }
183 }
const char * writeMblock(vector< block * > &blocks, const char *outMblock)
const blockDim & getDim(void) const
Definition: adj.h:222
int totalPatches(void) const
Definition: writemblock.cpp:92
vector< patch * > patches[block::nFaces]
Definition: writemblock.cpp:69
int getBlockNumber(void) const
Definition: adj.h:219

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

vector<patch *> patches[block::nFaces]

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