kivaToFoam.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "argList.H"
00034 #include "Time.H"
00035 #include "polyMesh.H"
00036 #include "IFstream.H"
00037 #include "OFstream.H"
00038 #include "cellShape.H"
00039 #include "cellModeller.H"
00040 #include "preservePatchTypes.H"
00041 #include "emptyPolyPatch.H"
00042 #include "wallPolyPatch.H"
00043 #include "symmetryPolyPatch.H"
00044 #include "wedgePolyPatch.H"
00045 #include "cyclicPolyPatch.H"
00046 #include "mathematicalConstants.H"
00047
00048 using namespace Foam;
00049
00050
00051 enum kivaVersions
00052 {
00053 kiva3,
00054 kiva3v
00055 };
00056
00057
00058
00059
00060 int main(int argc, char *argv[])
00061 {
00062 argList::noParallel();
00063 argList::validOptions.insert("file", "fileName");
00064 argList::validOptions.insert("version", "[kiva3|kiva3v]");
00065 argList::validOptions.insert("zHeadMin", "scalar");
00066
00067 # include "setRootCase.H"
00068 # include "createTime.H"
00069
00070 fileName kivaFileName("otape17");
00071 if (args.optionFound("file"))
00072 {
00073 kivaFileName = args.option("file");
00074 }
00075
00076 kivaVersions kivaVersion = kiva3v;
00077 if (args.optionFound("version"))
00078 {
00079 word kivaVersionName = args.option("version");
00080
00081 if (kivaVersionName == "kiva3")
00082 {
00083 kivaVersion = kiva3;
00084 }
00085 else if (kivaVersionName == "kiva3v")
00086 {
00087 kivaVersion = kiva3v;
00088 }
00089 else
00090 {
00091 FatalErrorIn("main(int argc, char *argv[])")
00092 << "KIVA file version " << kivaVersionName << " not supported"
00093 << exit(FatalError);
00094
00095 args.printUsage();
00096
00097 FatalError.exit(1);
00098 }
00099 }
00100
00101 scalar zHeadMin = -GREAT;
00102 args.optionReadIfPresent("zHeadMin", zHeadMin);
00103
00104 # include "readKivaGrid.H"
00105
00106 Info << "End\n" << endl;
00107
00108 return 0;
00109 }
00110
00111
00112
Copyright © 2000-2009 OpenCFD Ltd