Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
makeflo.h
Go to the documentation of this file.
1 /* *******************************************************************
2  * Illinois Open Source License *
3  * *
4  * University of Illinois/NCSA *
5  * Open Source License *
6  * *
7  * Copyright@2008, University of Illinois. All rights reserved. *
8  * *
9  * Developed by: *
10  * *
11  * Center for Simulation of Advanced Rockets *
12  * *
13  * University of Illinois *
14  * *
15  * www.csar.uiuc.edu *
16  * *
17  * Permission is hereby granted, free of charge, to any person *
18  * obtaining a copy of this software and associated documentation *
19  * files (the "Software"), to deal with the Software without *
20  * restriction, including without limitation the rights to use, *
21  * copy, modify, merge, publish, distribute, sublicense, and/or *
22  * sell copies of the Software, and to permit persons to whom the *
23  * Software is furnished to do so, subject to the following *
24  * conditions: *
25  * *
26  * *
27  * @ Redistributions of source code must retain the above copyright *
28  * notice, this list of conditions and the following disclaimers. *
29  * *
30  * @ Redistributions in binary form must reproduce the above *
31  * copyright notice, this list of conditions and the following *
32  * disclaimers in the documentation and/or other materials *
33  * provided with the distribution. *
34  * *
35  * @ Neither the names of the Center for Simulation of Advanced *
36  * Rockets, the University of Illinois, nor the names of its *
37  * contributors may be used to endorse or promote products derived *
38  * from this Software without specific prior written permission. *
39  * *
40  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
41  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
42  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
43  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
44  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
45  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
46  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
47  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
48  *********************************************************************
49  * Please acknowledge The University of Illinois Center for *
50  * Simulation of Advanced Rockets in works and publications *
51  * resulting from this software or its derivatives. *
52  *********************************************************************/
53 /*
54 Global parameters and declarations for makeflo.
55 
56 Orion Sky Lawlor, olawlor@acm.org, 2/1/2002
57 */
58 
59 #ifndef __CSAR_MAKEFLO_H
60 #define __CSAR_MAKEFLO_H
61 #include <cstring>
62 #include <cstdlib>
63 #include "adj.h"
64 #include "util.h"
65 #define MAKEFLO_VERSION "1.93"
66 
67 void checkQuality(const block &b);
68 
69 const char * readBoundaries(vector<block *> &blocks,
70  const char *inMesh);
71 
72 const char * splitBlocks(vector<block *> &blocks,
73  int nPieces);
74 
75 void buildFaces(vector<block *> &blocks,bool buildTypeTwo);
76 
77 const char * writeFlo(vector<block *> &blocks,int nPEs,
78  const char *inBcs,
79  const char *out);
80 const char * writeTop(vector<block *> &blocks,
81  const char *inBcs,
82  const char *out);
83 
84 const char * writeMblock(vector<block *> &blocks,
85  const char *outMblock);
86 
87 const char * writeBlocks(vector<block *> &blocks,
88  const char *outMesh);
89 
90 class makefloParam {
91  public:
92  int skipAxis; //Axis to skip face builds for, or -1 if none
93  int topologyOnly; //Don't write out grid locations
94 
95  int splitAxis; //Axis to split along, or -1 for any
96  int splitRCB; //If 1, split using recursive bisection (optimizes communication)
97  int splithalf; // If 1, always split every block in half
98 
99  int nLevels; //Number of multigrid levels to create
100  unsigned int levelBad; //Cuts and boundaries must not have these bits set
101  unsigned int levelGood; //Cuts and boundary can only have these bits set
102 
104  skipAxis=-1;
105  topologyOnly=0;
106  splitAxis=-1;
107  splitRCB=0;
108  splithalf=0;
109  setLevel(1);
110  }
111  void setLevel(int n) { //Use n multigrid levels
112  nLevels=n;
113  levelBad=(1<<(n-1))-1;
115  }
116  //Print a multigrid-size diagnostic and exit
117  void multigridError(void);
118 };
119 extern makefloParam parameters;
120 
121 
122 #endif
123 
124 
int splithalf
Definition: makeflo.h:97
void setLevel(int n)
Definition: makeflo.h:111
int skipAxis
Definition: makeflo.h:92
const char * writeMblock(vector< block * > &blocks, const char *outMblock)
int splitAxis
Definition: makeflo.h:95
const char * writeBlocks(vector< block * > &blocks, const char *outMesh)
Definition: write.cpp:147
int nLevels
Definition: makeflo.h:99
int topologyOnly
Definition: makeflo.h:93
void multigridError(void)
Definition: split.cpp:69
Definition: adj.h:203
const char * writeTop(vector< block * > &blocks, const char *inBcs, const char *out)
Definition: writetop.cpp:252
void checkQuality(const block &b)
Definition: volume.cpp:74
const char * splitBlocks(vector< block * > &blocks, int nPieces)
Definition: split.cpp:205
const NT & n
bool blocks
Input data is block-structured grid.
Definition: hdf2pltV2.C:51
unsigned int levelBad
Definition: makeflo.h:100
makefloParam parameters
Definition: makeflo.cpp:101
makefloParam()
Definition: makeflo.h:103
const char * readBoundaries(vector< block * > &blocks, const char *inMesh)
Definition: readinp.cpp:135
const char * writeFlo(vector< block * > &blocks, int nPEs, const char *inBcs, const char *out)
Definition: writeflo.cpp:230
unsigned int levelGood
Definition: makeflo.h:101
int splitRCB
Definition: makeflo.h:96
void buildFaces(vector< block * > &blocks, bool buildTypeTwo)
Definition: buildface.cpp:123