73 extern "C" void FC_GLOBAL(accept_locations,ACCEPT_LOCATIONS)
80 for (i[2]=0; i[2]<dim[2]; i[2]++)
81 for (i[1]=0; i[1]<dim[1]; i[1]++)
82 for (i[0]=0; i[0]<dim[0]; i[0]++)
84 int c_i=dim[
i], f_i=dim[
i];
120 return "Unrecognized input mesh file extension! ("__FILE__
")";
131 printf(
"Reading block file '%s'...\n",tmp);
133 if (ret!=NULL)
return ret;
169 void print(
const vector3d &v,
const char *post=
"") {
170 printf(
"%g\t%g\t%g%s",
174 void checkPoint(
int i,
int j,
int k,
182 printf(
"\tGrid spacings:");print(del,
"\n");
186 printf(
"\tSlant-ness:xy=%.3f\tyz=%.3f\txz=%.3f\n",
191 debugBlockConsumer() {count=0;}
197 printf(
"Block #%d: (%d x %d x %d)\n",++count,
198 dim[0],dim[1],dim[2]);
209 for (l=0;l<
max;l++) {
217 int main(
int argc,
char *argv[]) {
218 if (argc<2) {printf(
"Usage: read <mesh file> [all]\n");
return 1;}
219 debugBlockConsumer dest;
221 if (argc>2) printAll=1;
222 if (NULL!=(err=dest.read(argv[1])))
223 printf(
"ERROR! %s\n",err);
225 printf(
"Finished successfully.\n");
bool fileExists(const char *fName)
real dist(const vector3d &b) const
bool incrementAscii(char *cur)
void int int REAL REAL * y
void read_file(const char *fname, const string &wname, double alpha)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
const char * read_hdf(const char *hdfName, blockConsumer &dest)
void int int int REAL REAL REAL const char * fName
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
const char * read_multiple(const char *file, blockConsumer &dest)
bool endsWith(const char *a, const char *suffix)
const char * read_reg(const char *regFile, blockConsumer &dest)
virtual vector3d * allocateBlock(blockDim &dim)
const char * read_grds(const char *gridFile, blockConsumer &dest)
void int int int REAL REAL REAL * z
virtual void freeBlock(vector3d *blk)
const char * read_grdd(const char *gridFile, blockConsumer &dest)
int main(int argc, char *argv[])
const char * read(const char *gridFile)
#define FC_GLOBAL(name, NAME)
void int int REAL REAL REAL *z blockDim dim * ni
subroutine read_msh(F_name)
real dot(const vector3d &b) const
const char * read_grd(const char *gridFile, blockConsumer &dest)
const char * fortranifyString(const char *src)
virtual const char * consume(const blockDim &dim, vector3d *locs)=0
static blockConsumer * curConsumer