88 inline void swap(
int &a,
int &b) {
int tmp=a;a=b;b=tmp;}
92 int p,len=from.size();
94 if (from[p]->srcSpan==at)
109 fprintf(stderr,
"Couldn't find match for internal patch on block %d!\n",
120 return a_area<=b_area;
125 int f;
unsigned int bNo;
128 for (bNo=0;bNo<blocks.size();bNo++)
133 for (bNo=0;bNo<blocks.size();bNo++)
135 blocks[bNo]->getFace(f).buildPatches();
138 for (bNo=0;bNo<blocks.size();bNo++)
140 const vector<patch *> &patches=
141 blocks[bNo]->getFace(f).getPatches();
142 for (
unsigned int pNo=0;pNo<patches.size();pNo++) {
143 patch *p=patches[pNo];
149 if (!buildTypeTwo)
return;
157 const int nCorners=8;
169 for (bNo=0;bNo<blocks.size();bNo++) {
170 block *b=blocks[bNo];
172 for (
int cNo=0;cNo<nCorners;cNo++) {
179 bool hasExternalFace=
false;
183 hasExternalFace=
true;
190 printf(
"Corner %d of block %d is external> patches on ",
199 printf(
"are all type 2\n");
203 for (bNo=0;bNo<blocks.size();bNo++) {
204 block *b=blocks[bNo];
207 for (
unsigned int pNo=0;pNo<patches.size();pNo++) {
208 patch *p=patches[pNo];
221 for (bNo=0;bNo<blocks.size();bNo++) {
222 block *b=blocks[bNo];
225 for (
unsigned int pNo=0;pNo<patches.size();pNo++) {
226 patch *p=patches[pNo];
void swap(int &a, int &b)
blockLoc dirToCorner(block *b, const blockLoc &dir)
internalBCpatch * partner
const vector< patch * > & getPatches(void) const
node * loc2node(const vector3d &loc)
face * getFace(void) const
const blockLoc & getLoc(void) const
bool isSmaller(face *a, face *b)
patch * patchForCoord(const blockLoc &at)
static const char * face2name[nFaces]
const blockDim & getDim(void) const
virtual bool isExternal(void) const
void findPartner(internalBCpatch *p)
blockDim getDim(void) const
void setPartner(internalBCpatch *p)
bool blocks
Input data is block-structured grid.
virtual bool isExternal(void) const
const vector3d & getLoc(const blockLoc &l) const
patch * findPatch(const blockSpan &at, const vector< patch * > &from)
bool isExternal(void) const
int getBlockNumber(void) const
face & getFace(int faceNo)
void buildFaces(vector< block * > &blocks, bool buildTypeTwo)