mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
Conflicts: applications/utilities/mesh/manipulation/transformPoints/transformPoints.C
This commit is contained in:
@ -38,11 +38,9 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addBoolOption("writep", "write the final pressure field");
|
||||||
argList::validOptions.insert("writep", "");
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
# include "createFields.H"
|
# include "createFields.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "maxwellSlipUFvPatchVectorField.H"
|
#include "maxwellSlipUFvPatchVectorField.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "mixedFixedValueSlipFvPatchFields.H"
|
#include "mixedFixedValueSlipFvPatchFields.H"
|
||||||
|
|||||||
@ -47,8 +47,10 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
word kinematicCloudName("kinematicCloud");
|
const word kinematicCloudName
|
||||||
args.optionReadIfPresent("cloudName", kinematicCloudName);
|
(
|
||||||
|
args.optionLookupOrDefault<word>("cloudName", "kinematicCloud")
|
||||||
|
);
|
||||||
|
|
||||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||||
basicKinematicCloud kinematicCloud
|
basicKinematicCloud kinematicCloud
|
||||||
|
|||||||
@ -42,7 +42,7 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("cloudName", "cloud name");
|
argList::addOption("cloudName", "cloud name");
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
BSplineTest.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/BSplineTest
|
|
||||||
@ -1,69 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: 1.6 |
|
|
||||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
(
|
|
||||||
// Upper body longitudinal splines.
|
|
||||||
(
|
|
||||||
(-0.22685 -0.01125166 0) // 7
|
|
||||||
(-0.21685 -0.01340204 0)
|
|
||||||
(-0.20685 -0.01529684 0)
|
|
||||||
(-0.19685 -0.01694748 0)
|
|
||||||
(-0.18685 -0.01836538 0)
|
|
||||||
(-0.17685 -0.01956197 0)
|
|
||||||
(-0.16685 -0.02054868 0)
|
|
||||||
(-0.15685 -0.02133693 0)
|
|
||||||
(-0.14685 -0.02193816 0)
|
|
||||||
(-0.13685 -0.02236377 0)
|
|
||||||
(-0.12685 -0.02262521 0)
|
|
||||||
(-0.11685 -0.02273389 0) // 2
|
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
(-0.22685 0 0.01125166) // 8
|
|
||||||
(-0.21685 0 0.01340204)
|
|
||||||
(-0.20685 0 0.01529684)
|
|
||||||
(-0.19685 0 0.01694748)
|
|
||||||
(-0.18685 0 0.01836538)
|
|
||||||
(-0.17685 0 0.01956197)
|
|
||||||
(-0.16685 0 0.02054868)
|
|
||||||
(-0.15685 0 0.02133693)
|
|
||||||
(-0.14685 0 0.02193816)
|
|
||||||
(-0.13685 0 0.02236377)
|
|
||||||
(-0.12685 0 0.02262521)
|
|
||||||
(-0.11685 0 0.02273389) // 3
|
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
(-0.22685 0.01125166 0) // 9
|
|
||||||
(-0.21685 0.01340204 0)
|
|
||||||
(-0.20685 0.01529684 0)
|
|
||||||
(-0.19685 0.01694748 0)
|
|
||||||
(-0.18685 0.01836538 0)
|
|
||||||
(-0.17685 0.01956197 0)
|
|
||||||
(-0.16685 0.02054868 0)
|
|
||||||
(-0.15685 0.02133693 0)
|
|
||||||
(-0.14685 0.02193816 0)
|
|
||||||
(-0.13685 0.02236377 0)
|
|
||||||
(-0.12685 0.02262521 0)
|
|
||||||
(-0.11685 0.02273389 0) // 4
|
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
(-0.22685 0 -0.01125166) // 6
|
|
||||||
(-0.21685 0 -0.01340204)
|
|
||||||
(-0.20685 0 -0.01529684)
|
|
||||||
(-0.19685 0 -0.01694748)
|
|
||||||
(-0.18685 0 -0.01836538)
|
|
||||||
(-0.17685 0 -0.01956197)
|
|
||||||
(-0.16685 0 -0.02054868)
|
|
||||||
(-0.15685 0 -0.02133693)
|
|
||||||
(-0.14685 0 -0.02193816)
|
|
||||||
(-0.13685 0 -0.02236377)
|
|
||||||
(-0.12685 0 -0.02262521)
|
|
||||||
(-0.11685 0 -0.02273389) // 1
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@ -47,11 +47,11 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("reList", "reList");
|
argList::addOption("reList", "reList");
|
||||||
argList::validOptions.insert("wordList", "wordList");
|
argList::addOption("wordList", "wordList");
|
||||||
argList::validOptions.insert("stringList", "stringList");
|
argList::addOption("stringList", "stringList");
|
||||||
argList::validOptions.insert("float", "xx");
|
argList::addOption("float", "xx");
|
||||||
argList::validOptions.insert("flag", "");
|
argList::addBoolOption("flag");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
|
|||||||
@ -82,9 +82,13 @@ int main(int argc, char *argv[])
|
|||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.insert("file .. fileN");
|
argList::validArgs.insert("file .. fileN");
|
||||||
|
|
||||||
argList::validOptions.insert("mask", "");
|
argList::addBoolOption("mask", "report information about the bit masks");
|
||||||
argList::validOptions.insert("count", "");
|
argList::addBoolOption("count", "test the count() method");
|
||||||
argList::validOptions.insert("info", "");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"info",
|
||||||
|
"print an ascii representation of the storage"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
|
|||||||
@ -58,9 +58,15 @@ int main(int argc, char *argv[])
|
|||||||
list1.print(Info);
|
list1.print(Info);
|
||||||
|
|
||||||
Info<< "\ntest set() with default argument (max_value)\n";
|
Info<< "\ntest set() with default argument (max_value)\n";
|
||||||
|
list1.set(1);
|
||||||
list1.set(3);
|
list1.set(3);
|
||||||
list1.print(Info);
|
list1.print(Info);
|
||||||
|
|
||||||
|
Info<< "\ntest unset() with in-range and out-of-range\n";
|
||||||
|
list1.unset(3);
|
||||||
|
list1.unset(100000);
|
||||||
|
list1.print(Info);
|
||||||
|
|
||||||
Info<< "\ntest assign between references\n";
|
Info<< "\ntest assign between references\n";
|
||||||
list1[2] = 3;
|
list1[2] = 3;
|
||||||
list1[4] = list1[2];
|
list1[4] = list1[2];
|
||||||
|
|||||||
3
applications/test/PackedList3/Make/files
Normal file
3
applications/test/PackedList3/Make/files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PackedListTest3.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_USER_APPBIN)/PackedListTest3
|
||||||
0
applications/test/PackedList3/Make/options
Normal file
0
applications/test/PackedList3/Make/options
Normal file
@ -22,43 +22,51 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
Application
|
||||||
#include "argList.H"
|
|
||||||
|
|
||||||
#include "vector.H"
|
Description
|
||||||
#include "IFstream.H"
|
|
||||||
#include "BSpline.H"
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "argList.H"
|
||||||
|
#include "boolList.H"
|
||||||
|
#include "HashSet.H"
|
||||||
|
#include "StaticHashTable.H"
|
||||||
|
#include "cpuTime.H"
|
||||||
|
#include <vector>
|
||||||
|
#include "PackedList.H"
|
||||||
|
#include "PackedBoolList.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
// Main program:
|
// Main program:
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
const label n = 100000000;
|
||||||
argList::validArgs.insert("file .. fileN");
|
const label nReport = 1000000;
|
||||||
|
|
||||||
argList args(argc, argv, false, true);
|
cpuTime timer;
|
||||||
|
|
||||||
forAll(args.additionalArgs(), argI)
|
// test inserts
|
||||||
|
// PackedBoolList
|
||||||
|
PackedBoolList packed;
|
||||||
|
for (label i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
const string& srcFile = args.additionalArgs()[argI];
|
if ((i % nReport) == 0 && i)
|
||||||
Info<< nl << "reading " << srcFile << nl;
|
|
||||||
IFstream ifs(srcFile);
|
|
||||||
|
|
||||||
List<pointField> splinePointFields(ifs);
|
|
||||||
|
|
||||||
forAll(splinePointFields, splineI)
|
|
||||||
{
|
{
|
||||||
Info<<"convert " << splinePointFields[splineI] << " to bspline" << endl;
|
Info<< "i:" << i << " in " << timer.cpuTimeIncrement() << " s"
|
||||||
|
<<endl;
|
||||||
BSpline spl(splinePointFields[splineI], vector::zero, vector::zero);
|
|
||||||
|
|
||||||
Info<< "1/2 = " << spl.position(0.5) << endl;
|
|
||||||
}
|
}
|
||||||
|
packed[i] = 1;
|
||||||
}
|
}
|
||||||
|
Info<< "insert test: " << n << " elements in "
|
||||||
|
<< timer.cpuTimeIncrement() << " s\n\n";
|
||||||
|
|
||||||
|
Info << "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -66,17 +66,18 @@ int main(int argc, char *argv[])
|
|||||||
argList::noBanner();
|
argList::noBanner();
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.insert("fileName .. fileNameN");
|
argList::validArgs.insert("fileName .. fileNameN");
|
||||||
|
argList::addOption("istream", "fileName", "test Istream values");
|
||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
if (args.additionalArgs().empty())
|
if (args.additionalArgs().empty() && args.options().empty())
|
||||||
{
|
{
|
||||||
args.printUsage();
|
args.printUsage();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.optionFound("case"))
|
fileName pathName;
|
||||||
|
if (args.optionReadIfPresent("case", pathName))
|
||||||
{
|
{
|
||||||
fileName pathName = args.option("case");
|
|
||||||
Info<< nl
|
Info<< nl
|
||||||
<< "-case" << nl
|
<< "-case" << nl
|
||||||
<< "path = " << args.path() << nl
|
<< "path = " << args.path() << nl
|
||||||
@ -91,7 +92,23 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
forAll(args.additionalArgs(), argI)
|
forAll(args.additionalArgs(), argI)
|
||||||
{
|
{
|
||||||
fileName pathName = args.additionalArgs()[argI];
|
pathName = args.additionalArgs()[argI];
|
||||||
|
printCleaning(pathName);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args.optionFound("istream"))
|
||||||
|
{
|
||||||
|
args.optionLookup("istream")() >> pathName;
|
||||||
|
|
||||||
|
Info<< nl
|
||||||
|
<< "-case" << nl
|
||||||
|
<< "path = " << args.path() << nl
|
||||||
|
<< "root = " << args.rootPath() << nl
|
||||||
|
<< "case = " << args.caseName() << nl
|
||||||
|
<< "FOAM_CASE=" << getEnv("FOAM_CASE") << nl
|
||||||
|
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
|
||||||
|
<< endl;
|
||||||
|
|
||||||
printCleaning(pathName);
|
printCleaning(pathName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -98,8 +98,9 @@ bool checkDictionaryContent(const dictionary& dict1, const dictionary& dict2)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("rewrite", "");
|
argList::addBoolOption("rewrite");
|
||||||
argList::validOptions.insert("show", "");
|
argList::addBoolOption("show");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
Time runTime(args.rootPath(), args.caseName());
|
Time runTime(args.rootPath(), args.caseName());
|
||||||
|
|||||||
@ -39,8 +39,9 @@ int main(int argc, char *argv[])
|
|||||||
argList::noBanner();
|
argList::noBanner();
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.insert("file .. fileN");
|
argList::validArgs.insert("file .. fileN");
|
||||||
argList::validOptions.erase("case");
|
|
||||||
argList::validOptions.insert("ext", "bak");
|
argList::removeOption("case");
|
||||||
|
argList::addOption("ext", "bak");
|
||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("CHEMKINIIIFile");
|
argList::validArgs.append("CHEMKINIIIFile");
|
||||||
argList::validOptions.insert("thermo", "fileName");
|
argList::addOption("thermo", "fileName");
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
fileName thermoFileName = fileName::null;
|
fileName thermoFileName = fileName::null;
|
||||||
|
|||||||
3
applications/test/sizeof/Make/files
Normal file
3
applications/test/sizeof/Make/files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
sizeofTest.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_USER_APPBIN)/sizeofTest
|
||||||
2
applications/test/sizeof/Make/options
Normal file
2
applications/test/sizeof/Make/options
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */
|
||||||
|
/* EXE_LIBS = -lfiniteVolume */
|
||||||
@ -22,41 +22,83 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Description
|
||||||
|
Test the sizeof various classes.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "bool.H"
|
||||||
|
#include "Switch.H"
|
||||||
|
#include "string.H"
|
||||||
|
#include "dictionary.H"
|
||||||
|
#include "nil.H"
|
||||||
|
#include "IOstreams.H"
|
||||||
|
#include "IStringStream.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
namespace Foam
|
||||||
|
|
||||||
template<class T>
|
|
||||||
T Foam::argList::optionRead(const word& opt) const
|
|
||||||
{
|
{
|
||||||
T val;
|
class hasBoolClass
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
bool b_;
|
||||||
|
|
||||||
|
hasBoolClass(const bool val=false)
|
||||||
|
:
|
||||||
|
b_(false)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
optionLookup(opt)() >> val;
|
|
||||||
return val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
using namespace Foam;
|
||||||
bool Foam::argList::optionReadIfPresent(const word& opt, T& val) const
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// Main program:
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (optionFound(opt))
|
cout<<"sizeof\n------\n";
|
||||||
{
|
{
|
||||||
val = optionRead<T>(opt);
|
nil x;
|
||||||
return true;
|
cout<<"nil:" << sizeof(x) << nl;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
{
|
||||||
return false;
|
bool x(0);
|
||||||
|
cout<<"bool:" << sizeof(x) << nl;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
hasBoolClass x(true);
|
||||||
|
cout<<"hasBoolClass:" << sizeof(x) << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Switch x("n");
|
||||||
|
cout<<"Switch:" << sizeof(x) << nl;
|
||||||
|
cout<<"Switch::switchType=" << sizeof(Switch::switchType) << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
scalar x(0);
|
||||||
|
cout<<"scalar:" << sizeof(x) << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
label x(0);
|
||||||
|
cout<<"label:" << sizeof(x) << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
cout<<"int:" << sizeof(int) << nl;
|
||||||
|
cout<<"long:" << sizeof(long) << nl;
|
||||||
|
cout<<"float:" << sizeof(float) << nl;
|
||||||
|
cout<<"double:" << sizeof(double) << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
Info << "---\nEnd\n" << endl;
|
||||||
Foam::List<T> Foam::argList::optionReadList(const word& opt) const
|
|
||||||
{
|
return 0;
|
||||||
return readList<T>(optionLookup(opt)());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
3
applications/test/spline/Make/files
Normal file
3
applications/test/spline/Make/files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
splineTest.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_USER_APPBIN)/splineTest
|
||||||
137
applications/test/spline/splineTest.C
Normal file
137
applications/test/spline/splineTest.C
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
#include "argList.H"
|
||||||
|
|
||||||
|
#include "vector.H"
|
||||||
|
#include "IFstream.H"
|
||||||
|
|
||||||
|
#include "BSpline.H"
|
||||||
|
#include "CatmullRomSpline.H"
|
||||||
|
|
||||||
|
using namespace Foam;
|
||||||
|
|
||||||
|
inline Ostream& printPoint(Ostream& os, const point& p)
|
||||||
|
{
|
||||||
|
os << p.x() << ' ' << p.y() << ' ' << p.z() << nl;
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// Main program:
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
argList::noParallel();
|
||||||
|
argList::validArgs.insert("file .. fileN");
|
||||||
|
argList::addBoolOption("B", "B-Spline implementation");
|
||||||
|
argList::addBoolOption("CMR", "catmull-rom spline (default)");
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"n",
|
||||||
|
"INT",
|
||||||
|
"number of segments for evaluation - default 20"
|
||||||
|
);
|
||||||
|
|
||||||
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
|
if (args.additionalArgs().empty())
|
||||||
|
{
|
||||||
|
args.printUsage();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool useBSpline = args.optionFound("B");
|
||||||
|
bool useCatmullRom = args.optionFound("CMR");
|
||||||
|
label nSeg = args.optionLookupOrDefault<label>("n", 20);
|
||||||
|
|
||||||
|
if (!useCatmullRom && !useBSpline)
|
||||||
|
{
|
||||||
|
Info<<"defaulting to Catmull-Rom spline" << endl;
|
||||||
|
useCatmullRom = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
forAll(args.additionalArgs(), argI)
|
||||||
|
{
|
||||||
|
const string& srcFile = args.additionalArgs()[argI];
|
||||||
|
Info<< nl << "reading " << srcFile << nl;
|
||||||
|
IFstream ifs(srcFile);
|
||||||
|
|
||||||
|
List<pointField> pointFields(ifs);
|
||||||
|
|
||||||
|
|
||||||
|
forAll(pointFields, splineI)
|
||||||
|
{
|
||||||
|
Info<<"\n# points:" << endl;
|
||||||
|
forAll(pointFields[splineI], ptI)
|
||||||
|
{
|
||||||
|
printPoint(Info, pointFields[splineI][ptI]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useBSpline)
|
||||||
|
{
|
||||||
|
BSpline spl(pointFields[splineI]);
|
||||||
|
|
||||||
|
Info<< nl << "# B-Spline" << endl;
|
||||||
|
|
||||||
|
for (label segI = 0; segI <= nSeg; ++segI)
|
||||||
|
{
|
||||||
|
scalar lambda = scalar(segI)/scalar(nSeg);
|
||||||
|
printPoint(Info, spl.position(lambda));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useCatmullRom)
|
||||||
|
{
|
||||||
|
CatmullRomSpline spl(pointFields[splineI]);
|
||||||
|
|
||||||
|
Info<< nl <<"# Catmull-Rom" << endl;
|
||||||
|
|
||||||
|
for (label segI = 0; segI <= nSeg; ++segI)
|
||||||
|
{
|
||||||
|
scalar lambda = scalar(segI)/scalar(nSeg);
|
||||||
|
printPoint(Info, spl.position(lambda));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
polyLine pl(pointFields[splineI]);
|
||||||
|
|
||||||
|
Info<< nl <<"# polyList" << endl;
|
||||||
|
|
||||||
|
for (label segI = 0; segI <= nSeg; ++segI)
|
||||||
|
{
|
||||||
|
scalar lambda = scalar(segI)/scalar(nSeg);
|
||||||
|
printPoint(Info, pl.position(lambda));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
46
applications/test/spline/test-splines
Normal file
46
applications/test/spline/test-splines
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
(
|
||||||
|
// Upper body longitudinal splines
|
||||||
|
(
|
||||||
|
(0.22685 0.01125166 0) // 7
|
||||||
|
(0.21685 0.01340204 0)
|
||||||
|
(0.20685 0.01529684 0)
|
||||||
|
(0.19685 0.01694748 0)
|
||||||
|
(0.18685 0.01836538 0)
|
||||||
|
(0.17685 0.01956197 0)
|
||||||
|
(0.16685 0.02054868 0)
|
||||||
|
(0.15685 0.02133693 0)
|
||||||
|
(0.14685 0.02193816 0)
|
||||||
|
(0.13685 0.02236377 0)
|
||||||
|
(0.12685 0.02262521 0)
|
||||||
|
(0.11685 0.02273389 0) // 2
|
||||||
|
)
|
||||||
|
|
||||||
|
// sine function
|
||||||
|
(
|
||||||
|
(0 0 0)
|
||||||
|
(45 0.70707 0)
|
||||||
|
(90 1 0)
|
||||||
|
(135 0.70707 0)
|
||||||
|
(180 0 0)
|
||||||
|
(225 -0.70707 0)
|
||||||
|
(270 -1 0)
|
||||||
|
(315 -0.70707 0)
|
||||||
|
(360 0 0)
|
||||||
|
)
|
||||||
|
|
||||||
|
// cosine function, but with extremely few points
|
||||||
|
(
|
||||||
|
(0 1 0)
|
||||||
|
(180 -1 0)
|
||||||
|
(360 1 0)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
@ -44,16 +44,14 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.insert("string .. stringN");
|
argList::validArgs.insert("string .. stringN");
|
||||||
argList::validOptions.insert("file", "name");
|
argList::addOption("file", "name");
|
||||||
argList::validOptions.insert("repeat", "count");
|
argList::addOption("repeat", "count");
|
||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
label repeat = 1;
|
const label repeat = args.optionLookupOrDefault<label>("repeat", 1);
|
||||||
args.optionReadIfPresent<label>("repeat", repeat);
|
|
||||||
|
|
||||||
cpuTime timer;
|
cpuTime timer;
|
||||||
|
|
||||||
for (label count = 0; count < repeat; ++count)
|
for (label count = 0; count < repeat; ++count)
|
||||||
{
|
{
|
||||||
forAll(args.additionalArgs(), argI)
|
forAll(args.additionalArgs(), argI)
|
||||||
|
|||||||
@ -454,7 +454,7 @@ label simplifyFaces
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
argList::validArgs.append("edge length [m]");
|
argList::validArgs.append("edge length [m]");
|
||||||
argList::validArgs.append("merge angle (degrees)");
|
argList::validArgs.append("merge angle (degrees)");
|
||||||
|
|
||||||
|
|||||||
@ -59,10 +59,6 @@ using namespace Foam;
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Sin of angle between two consecutive edges on a face. If sin(angle) larger
|
|
||||||
// than this the face will be considered concave.
|
|
||||||
const scalar defaultConcaveAngle = 30;
|
|
||||||
|
|
||||||
|
|
||||||
// Same check as snapMesh
|
// Same check as snapMesh
|
||||||
void checkSnapMesh
|
void checkSnapMesh
|
||||||
@ -433,9 +429,9 @@ label mergeEdges(const scalar minCos, polyMesh& mesh)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validArgs.append("feature angle [0..180]");
|
argList::validArgs.append("feature angle [0..180]");
|
||||||
argList::validOptions.insert("concaveAngle", "[0..180]");
|
argList::addOption("concaveAngle", "[0..180]");
|
||||||
argList::validOptions.insert("snapMesh", "");
|
argList::addBoolOption("snapMesh");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -447,8 +443,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||||
|
|
||||||
scalar concaveAngle = defaultConcaveAngle;
|
// Sin of angle between two consecutive edges on a face.
|
||||||
args.optionReadIfPresent("concaveAngle", concaveAngle);
|
// If sin(angle) larger than this the face will be considered concave.
|
||||||
|
scalar concaveAngle = args.optionLookupOrDefault("concaveAngle", 30.0);
|
||||||
|
|
||||||
scalar concaveSin = Foam::sin(degToRad(concaveAngle));
|
scalar concaveSin = Foam::sin(degToRad(concaveAngle));
|
||||||
|
|
||||||
@ -483,8 +480,8 @@ int main(int argc, char *argv[])
|
|||||||
// Merge points on straight edges and remove unused points
|
// Merge points on straight edges and remove unused points
|
||||||
if (snapMeshDict)
|
if (snapMeshDict)
|
||||||
{
|
{
|
||||||
Info<< "Merging all 'loose' points on surface edges"
|
Info<< "Merging all 'loose' points on surface edges, "
|
||||||
<< ", regardless of the angle they make." << endl;
|
<< "regardless of the angle they make." << endl;
|
||||||
|
|
||||||
// Surface bnound to be used to extrude. Merge all loose points.
|
// Surface bnound to be used to extrude. Merge all loose points.
|
||||||
nChanged += mergeEdges(-1, mesh);
|
nChanged += mergeEdges(-1, mesh);
|
||||||
@ -510,7 +507,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Mesh unchanged." << endl;
|
Info<< "Mesh unchanged." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "cellSplitter.H"
|
#include "cellSplitter.H"
|
||||||
@ -39,12 +37,8 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
defineTypeNameAndDebug(Foam::cellSplitter, 0);
|
||||||
{
|
|
||||||
|
|
||||||
defineTypeNameAndDebug(cellSplitter, 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -328,7 +328,7 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -52,7 +52,7 @@ using namespace Foam;
|
|||||||
// Main program:
|
// Main program:
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
argList::validArgs.append("cellSet");
|
argList::validArgs.append("cellSet");
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -47,11 +47,12 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Foam::argList::noParallel();
|
argList::noParallel();
|
||||||
Foam::argList::validArgs.append("patchName");
|
argList::validArgs.append("patchName");
|
||||||
Foam::argList::validArgs.append("edgeWeight");
|
argList::validArgs.append("edgeWeight");
|
||||||
Foam::argList::validOptions.insert("useSet", "cellSet");
|
|
||||||
Foam::argList::validOptions.insert("overwrite", "");
|
argList::addOption("useSet", "cellSet");
|
||||||
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -97,7 +97,7 @@ bool limitRefinementLevel
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("readLevel", "");
|
argList::addBoolOption("readLevel");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -48,8 +48,8 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Foam::argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
Foam::argList::validArgs.append("faceSet");
|
argList::validArgs.append("faceSet");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -525,10 +525,10 @@ void collectCuts
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("set", "cellSet name");
|
argList::addOption("set", "cellSet name");
|
||||||
argList::validOptions.insert("geometry", "");
|
argList::addBoolOption("geometry");
|
||||||
argList::validOptions.insert("tol", "edge snap tolerance");
|
argList::addOption("tol", "edge snap tolerance");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
argList::validArgs.append("edge angle [0..360]");
|
argList::validArgs.append("edge angle [0..360]");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
@ -546,8 +546,7 @@ int main(int argc, char *argv[])
|
|||||||
bool geometry = args.optionFound("geometry");
|
bool geometry = args.optionFound("geometry");
|
||||||
bool overwrite = args.optionFound("overwrite");
|
bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
scalar edgeTol = 0.2;
|
scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
|
||||||
args.optionReadIfPresent("tol", edgeTol);
|
|
||||||
|
|
||||||
Info<< "Trying to split cells with internal angles > feature angle\n" << nl
|
Info<< "Trying to split cells with internal angles > feature angle\n" << nl
|
||||||
<< "featureAngle : " << featureAngle << nl
|
<< "featureAngle : " << featureAngle << nl
|
||||||
|
|||||||
@ -198,8 +198,11 @@ void ReadVertices
|
|||||||
int dims = 1;
|
int dims = 1;
|
||||||
float scale;
|
float scale;
|
||||||
CCMIOID mapID;
|
CCMIOID mapID;
|
||||||
CCMIOReadVerticesf(&err, vertices, &dims, &scale, &mapID, verts.begin(),
|
CCMIOReadVerticesf
|
||||||
offset, offsetPlusSize);
|
(
|
||||||
|
&err, vertices, &dims, &scale, &mapID, verts.begin(),
|
||||||
|
offset, offsetPlusSize
|
||||||
|
);
|
||||||
CCMIOReadMap(&err, mapID, mapData.begin(), offset, offsetPlusSize);
|
CCMIOReadMap(&err, mapID, mapData.begin(), offset, offsetPlusSize);
|
||||||
|
|
||||||
//CCMIOSize size;
|
//CCMIOSize size;
|
||||||
@ -273,7 +276,6 @@ void ReadProblem
|
|||||||
|
|
||||||
// ... walk through each region description and print it...
|
// ... walk through each region description and print it...
|
||||||
|
|
||||||
|
|
||||||
CCMIOID boundary;
|
CCMIOID boundary;
|
||||||
label regionI = 0;
|
label regionI = 0;
|
||||||
int k = 0;
|
int k = 0;
|
||||||
|
|||||||
@ -238,7 +238,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("ANSYS input file");
|
argList::validArgs.append("ANSYS input file");
|
||||||
argList::validOptions.insert("scale", "scale factor");
|
argList::addOption("scale", "scale factor");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@ -22,13 +22,9 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "error.H"
|
#include "error.H"
|
||||||
|
|
||||||
#include "block.H"
|
#include "block.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -50,7 +50,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("CFX geom file");
|
argList::validArgs.append("CFX geom file");
|
||||||
argList::validOptions.insert("scale", "scale factor");
|
argList::addOption("scale", "scale factor");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "hexBlock.H"
|
#include "hexBlock.H"
|
||||||
|
|||||||
@ -762,10 +762,10 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("Fluent mesh file");
|
argList::validArgs.append("Fluent mesh file");
|
||||||
argList::validOptions.insert("scale", "scale factor");
|
argList::addOption("scale", "scale factor");
|
||||||
argList::validOptions.insert("ignoreCellGroups", "cell group names");
|
argList::addOption("ignoreCellGroups", "cell group names");
|
||||||
argList::validOptions.insert("ignoreFaceGroups", "face group names");
|
argList::addOption("ignoreFaceGroups", "face group names");
|
||||||
argList::validOptions.insert("cubit", "");
|
argList::addBoolOption("cubit");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -776,17 +776,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
args.optionReadIfPresent("scale", scaleFactor);
|
args.optionReadIfPresent("scale", scaleFactor);
|
||||||
|
|
||||||
HashSet<word> ignoreCellGroups;
|
wordHashSet ignoreCellGroups;
|
||||||
if (args.optionFound("ignoreCellGroups"))
|
wordHashSet ignoreFaceGroups;
|
||||||
{
|
|
||||||
args.optionLookup("ignoreCellGroups")() >> ignoreCellGroups;
|
|
||||||
}
|
|
||||||
|
|
||||||
HashSet<word> ignoreFaceGroups;
|
args.optionReadIfPresent("ignoreCellGroups", ignoreCellGroups);
|
||||||
if (args.optionFound("ignoreFaceGroups"))
|
args.optionReadIfPresent("ignoreFaceGroups", ignoreFaceGroups);
|
||||||
{
|
|
||||||
args.optionLookup("ignoreFaceGroups")() >> ignoreFaceGroups;
|
|
||||||
}
|
|
||||||
|
|
||||||
cubitFile = args.options().found("cubit");
|
cubitFile = args.options().found("cubit");
|
||||||
|
|
||||||
|
|||||||
@ -867,9 +867,9 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("Fluent mesh file");
|
argList::validArgs.append("Fluent mesh file");
|
||||||
argList::validOptions.insert("scale", "scale factor");
|
argList::addOption("scale", "scale factor");
|
||||||
argList::validOptions.insert("writeSets", "");
|
argList::addBoolOption("writeSets");
|
||||||
argList::validOptions.insert("writeZones", "");
|
argList::addBoolOption("writeZones");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@ -76,10 +76,27 @@ int main(int argc, char *argv[])
|
|||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
|
|
||||||
argList::validOptions.insert("scale", "scale");
|
argList::addOption
|
||||||
argList::validOptions.insert("noBnd", "");
|
(
|
||||||
argList::validOptions.insert("tri", "");
|
"scale",
|
||||||
argList::validOptions.insert("surface", "");
|
"factor",
|
||||||
|
"specify geometry scaling factor - default is 1000 ([m] to [mm])"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noBnd",
|
||||||
|
"suppress writing the .bnd file"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"tri",
|
||||||
|
"Extract a triangulated surface. Implies -surface"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"surface",
|
||||||
|
"extract the surface of the volume mesh only"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -639,7 +639,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("GAMBIT file");
|
argList::validArgs.append("GAMBIT file");
|
||||||
argList::validOptions.insert("scale", "scale factor");
|
argList::addOption("scale", "scale factor");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@ -717,7 +717,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append(".msh file");
|
argList::validArgs.append(".msh file");
|
||||||
argList::validOptions.insert("keepOrientation", "");
|
argList::addBoolOption("keepOrientation");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -579,7 +579,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append(".unv file");
|
argList::validArgs.append(".unv file");
|
||||||
argList::validOptions.insert("dump", "");
|
argList::addBoolOption("dump");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -60,9 +60,9 @@ enum kivaVersions
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("file", "fileName");
|
argList::addOption("file", "fileName");
|
||||||
argList::validOptions.insert("version", "[kiva3|kiva3v]");
|
argList::addOption("version", "[kiva3|kiva3v]");
|
||||||
argList::validOptions.insert("zHeadMin", "scalar");
|
argList::addOption("zHeadMin", "scalar");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -57,7 +57,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append(".msh file");
|
argList::validArgs.append(".msh file");
|
||||||
argList::validOptions.insert("hex", "");
|
argList::addBoolOption("hex");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -58,10 +58,10 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("PLOT3D geom file");
|
argList::validArgs.append("PLOT3D geom file");
|
||||||
argList::validOptions.insert("scale", "scale factor");
|
argList::addOption("scale", "scale factor");
|
||||||
argList::validOptions.insert("noBlank", "");
|
argList::addBoolOption("noBlank");
|
||||||
argList::validOptions.insert("singleBlock", "");
|
argList::addBoolOption("singleBlock");
|
||||||
argList::validOptions.insert("2D", "thickness");
|
argList::addOption("2D", "thickness");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@ -357,10 +357,10 @@ int main(int argc, char *argv[])
|
|||||||
timeSelector::addOptions(true, false);
|
timeSelector::addOptions(true, false);
|
||||||
|
|
||||||
argList::validArgs.append("feature angle[0-180]");
|
argList::validArgs.append("feature angle[0-180]");
|
||||||
argList::validOptions.insert("splitAllFaces", "");
|
argList::addBoolOption("splitAllFaces");
|
||||||
argList::validOptions.insert("concaveMultiCells", "");
|
argList::addBoolOption("concaveMultiCells");
|
||||||
argList::validOptions.insert("doNotPreserveFaceZones", "");
|
argList::addBoolOption("doNotPreserveFaceZones");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -22,12 +22,9 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "error.H"
|
#include "error.H"
|
||||||
|
|
||||||
#include "sammMesh.H"
|
#include "sammMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -41,7 +41,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("SAMM mesh file prefix");
|
argList::validArgs.append("SAMM mesh file prefix");
|
||||||
argList::validOptions.insert("scale", "scale factor");
|
argList::addOption("scale", "scale factor");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -50,8 +50,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleFactor = 1.0;
|
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||||
args.optionReadIfPresent("scale", scaleFactor);
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|||||||
@ -62,28 +62,35 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("pro-STAR prefix");
|
argList::validArgs.append("pro-STAR prefix");
|
||||||
argList::validOptions.insert("ascii", "");
|
argList::addBoolOption
|
||||||
argList::validOptions.insert("scale", "scale");
|
(
|
||||||
argList::validOptions.insert("solids", "");
|
"ascii",
|
||||||
|
"write in ASCII instead of binary format"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scale",
|
||||||
|
"scale",
|
||||||
|
"geometry scaling factor - default is 0.001 ([mm] to [m])"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"solids",
|
||||||
|
"retain solid cells and treat them like fluid cells"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
Time runTime(args.rootPath(), args.caseName());
|
Time runTime(args.rootPath(), args.caseName());
|
||||||
const stringList& params = args.additionalArgs();
|
const stringList& params = args.additionalArgs();
|
||||||
|
|
||||||
// default rescale from [mm] to [m]
|
// default rescale from [mm] to [m]
|
||||||
scalar scaleFactor = 0.001;
|
scalar scaleFactor = args.optionLookupOrDefault("scale", 0.001);
|
||||||
if (args.optionReadIfPresent("scale", scaleFactor))
|
|
||||||
{
|
|
||||||
if (scaleFactor <= 0)
|
if (scaleFactor <= 0)
|
||||||
{
|
{
|
||||||
scaleFactor = 1;
|
scaleFactor = 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (args.optionFound("solids"))
|
meshReaders::STARCD::keepSolids = args.optionFound("solids");
|
||||||
{
|
|
||||||
meshReaders::STARCD::keepSolids = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// default to binary output, unless otherwise specified
|
// default to binary output, unless otherwise specified
|
||||||
IOstream::streamFormat format = IOstream::BINARY;
|
IOstream::streamFormat format = IOstream::BINARY;
|
||||||
|
|||||||
@ -41,7 +41,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("STAR mesh file prefix");
|
argList::validArgs.append("STAR mesh file prefix");
|
||||||
argList::validOptions.insert("scale", "scale factor");
|
argList::addOption("scale", "scale factor");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -50,8 +50,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleFactor = 1.0;
|
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||||
args.optionReadIfPresent("scale", scaleFactor);
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Description
|
|||||||
and run tetgen with -f option.
|
and run tetgen with -f option.
|
||||||
|
|
||||||
Sample smesh file:
|
Sample smesh file:
|
||||||
|
@verbatim
|
||||||
# cube.smesh -- A 10x10x10 cube
|
# cube.smesh -- A 10x10x10 cube
|
||||||
8 3
|
8 3
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
@ -50,8 +50,9 @@ Description
|
|||||||
4 2 6 7 3 65
|
4 2 6 7 3 65
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
|
@endverbatim
|
||||||
|
|
||||||
NOTE:
|
Note
|
||||||
- for some reason boundary faces point inwards. I just reverse them
|
- for some reason boundary faces point inwards. I just reverse them
|
||||||
always. Might use some geometric check instead.
|
always. Might use some geometric check instead.
|
||||||
- marked faces might not actually be boundary faces of mesh.
|
- marked faces might not actually be boundary faces of mesh.
|
||||||
@ -97,7 +98,7 @@ label findFace(const primitiveMesh& mesh, const face& f)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validArgs.append("file prefix");
|
argList::validArgs.append("file prefix");
|
||||||
argList::validOptions.insert("noFaceFile", "");
|
argList::addBoolOption("noFaceFile");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -378,13 +378,13 @@ void writePointCells
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
argList::validOptions.insert("patchFaces", "");
|
argList::addBoolOption("patchFaces");
|
||||||
argList::validOptions.insert("patchEdges", "");
|
argList::addBoolOption("patchEdges");
|
||||||
argList::validOptions.insert("cell", "cellI");
|
argList::addOption("cell", "cellI");
|
||||||
argList::validOptions.insert("face", "faceI");
|
argList::addOption("face", "faceI");
|
||||||
argList::validOptions.insert("point", "pointI");
|
argList::addOption("point", "pointI");
|
||||||
argList::validOptions.insert("cellSet", "setName");
|
argList::addOption("cellSet", "setName");
|
||||||
argList::validOptions.insert("faceSet", "setName");
|
argList::addOption("faceSet", "setName");
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|||||||
@ -72,8 +72,18 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("blockTopology", "");
|
argList::addBoolOption
|
||||||
argList::validOptions.insert("dict", "dictionary");
|
(
|
||||||
|
"blockTopology",
|
||||||
|
"write block edges and centres as .obj files"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"dict",
|
||||||
|
"NAME",
|
||||||
|
"specify an alternative dictionary for the blockMesh description"
|
||||||
|
);
|
||||||
|
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -83,10 +93,9 @@ int main(int argc, char *argv[])
|
|||||||
word regionName;
|
word regionName;
|
||||||
fileName polyMeshDir;
|
fileName polyMeshDir;
|
||||||
|
|
||||||
if (args.optionFound("region"))
|
if (args.optionReadIfPresent("region", regionName, polyMesh::defaultRegion))
|
||||||
{
|
{
|
||||||
// constant/<region>/polyMesh/blockMeshDict
|
// constant/<region>/polyMesh/blockMeshDict
|
||||||
regionName = args.option("region");
|
|
||||||
polyMeshDir = regionName/polyMesh::meshSubDir;
|
polyMeshDir = regionName/polyMesh::meshSubDir;
|
||||||
|
|
||||||
Info<< nl << "Generating mesh for region " << regionName << endl;
|
Info<< nl << "Generating mesh for region " << regionName << endl;
|
||||||
@ -94,7 +103,6 @@ int main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// constant/polyMesh/blockMeshDict
|
// constant/polyMesh/blockMeshDict
|
||||||
regionName = polyMesh::defaultRegion;
|
|
||||||
polyMeshDir = polyMesh::meshSubDir;
|
polyMeshDir = polyMesh::meshSubDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validArgs.append("thickness");
|
argList::validArgs.append("thickness");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
|
|||||||
@ -115,7 +115,7 @@ void writeMesh
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
|
|||||||
@ -42,7 +42,7 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -71,7 +71,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("feature angle[0-180]");
|
argList::validArgs.append("feature angle[0-180]");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -49,9 +49,9 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("noTopology", "");
|
argList::addBoolOption("noTopology");
|
||||||
argList::validOptions.insert("allGeometry", "");
|
argList::addBoolOption("allGeometry");
|
||||||
argList::validOptions.insert("allTopology", "");
|
argList::addBoolOption("allTopology");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -128,9 +128,9 @@ int main(int argc, char *argv[])
|
|||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::validArgs.append("faceZone");
|
argList::validArgs.append("faceZone");
|
||||||
argList::validArgs.append("patch");
|
argList::validArgs.append("patch");
|
||||||
argList::validOptions.insert("additionalPatches", "(patch2 .. patchN)");
|
argList::addOption("additionalPatches", "(patch2 .. patchN)");
|
||||||
argList::validOptions.insert("internalFacesOnly", "");
|
argList::addBoolOption("internalFacesOnly");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -517,7 +517,7 @@ void syncPoints
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -43,16 +43,15 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Foam::argList::noParallel();
|
argList::noParallel();
|
||||||
Foam::argList::validArgs.append("surface file");
|
argList::validArgs.append("surface file");
|
||||||
Foam::argList::validArgs.append("destination cellSet");
|
argList::validArgs.append("destination cellSet");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
|
|
||||||
fileName surfName(args.additionalArgs()[0]);
|
fileName surfName(args.additionalArgs()[0]);
|
||||||
|
|
||||||
fileName setName(args.additionalArgs()[1]);
|
fileName setName(args.additionalArgs()[1]);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
argList::validArgs.append("master root");
|
argList::validArgs.append("master root");
|
||||||
argList::validArgs.append("master case");
|
argList::validArgs.append("master case");
|
||||||
argList::validOptions.insert("masterRegion", "name");
|
argList::addOption("masterRegion", "name");
|
||||||
|
|
||||||
argList::validArgs.append("root to add");
|
argList::validArgs.append("root to add");
|
||||||
argList::validArgs.append("case to add");
|
argList::validArgs.append("case to add");
|
||||||
argList::validOptions.insert("addRegion", "name");
|
argList::addOption("addRegion", "name");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@ -223,9 +223,9 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("split", "");
|
argList::addBoolOption("split");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
argList::validOptions.insert("detectOnly", "");
|
argList::addBoolOption("detectOnly");
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
|
|||||||
@ -291,8 +291,8 @@ label twoDNess(const polyMesh& mesh)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Foam::argList::validOptions.insert("dict", "");
|
argList::addBoolOption("dict");
|
||||||
Foam::argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -320,8 +320,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Refining according to refineMeshDict" << nl << endl;
|
Info<< "Refining according to refineMeshDict" << nl << endl;
|
||||||
|
|
||||||
refineDict =
|
refineDict = IOdictionary
|
||||||
IOdictionary
|
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
|
|||||||
@ -364,10 +364,10 @@ autoPtr<mapPolyMesh> reorderMesh
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("blockOrder", "");
|
argList::addBoolOption("blockOrder");
|
||||||
argList::validOptions.insert("orderPoints", "");
|
argList::addBoolOption("orderPoints");
|
||||||
argList::validOptions.insert("writeMaps", "");
|
argList::addBoolOption("writeMaps");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
# include "addTimeOptions.H"
|
||||||
|
|
||||||
|
|||||||
@ -843,8 +843,8 @@ int main(int argc, char *argv[])
|
|||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
# include "addTimeOptions.H"
|
# include "addTimeOptions.H"
|
||||||
|
|
||||||
argList::validOptions.insert("noVTK", "");
|
argList::addBoolOption("noVTK");
|
||||||
argList::validOptions.insert("batch", "file");
|
argList::addOption("batch", "file");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "writeFuns.H"
|
#include "writeFuns.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "writePatch.H"
|
#include "writePatch.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "writePointSet.H"
|
#include "writePointSet.H"
|
||||||
|
|||||||
@ -58,7 +58,7 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("noFlipMap", "");
|
argList::addBoolOption("noFlipMap");
|
||||||
|
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
# include "addTimeOptions.H"
|
# include "addTimeOptions.H"
|
||||||
|
|||||||
@ -66,7 +66,8 @@ void interpolateFields
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Foam::argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
# include "addTimeOptions.H"
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -110,12 +110,12 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Foam::argList::noParallel();
|
argList::noParallel();
|
||||||
|
|
||||||
Foam::argList::validArgs.append("faceSet");
|
argList::validArgs.append("faceSet");
|
||||||
Foam::argList::validArgs.append("masterPatch");
|
argList::validArgs.append("masterPatch");
|
||||||
Foam::argList::validArgs.append("slavePatch");
|
argList::validArgs.append("slavePatch");
|
||||||
Foam::argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -1290,15 +1290,15 @@ label findCorrespondingRegion
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("cellZones", "");
|
argList::addBoolOption("cellZones");
|
||||||
argList::validOptions.insert("cellZonesOnly", "");
|
argList::addBoolOption("cellZonesOnly");
|
||||||
argList::validOptions.insert("blockedFaces", "faceSet");
|
argList::addOption("blockedFaces", "faceSet");
|
||||||
argList::validOptions.insert("makeCellZones", "");
|
argList::addBoolOption("makeCellZones");
|
||||||
argList::validOptions.insert("largestOnly", "");
|
argList::addBoolOption("largestOnly");
|
||||||
argList::validOptions.insert("insidePoint", "point");
|
argList::addOption("insidePoint", "point");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
argList::validOptions.insert("detectOnly", "");
|
argList::addBoolOption("detectOnly");
|
||||||
argList::validOptions.insert("sloppyCellZones", "");
|
argList::addBoolOption("sloppyCellZones");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -95,17 +95,16 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Foam::argList::noParallel();
|
argList::noParallel();
|
||||||
|
|
||||||
Foam::argList::validArgs.append("masterPatch");
|
argList::validArgs.append("masterPatch");
|
||||||
Foam::argList::validArgs.append("slavePatch");
|
argList::validArgs.append("slavePatch");
|
||||||
|
|
||||||
Foam::argList::validOptions.insert("partial", "");
|
argList::addBoolOption("partial");
|
||||||
Foam::argList::validOptions.insert("perfect", "");
|
argList::addBoolOption("perfect");
|
||||||
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
Foam::argList::validOptions.insert("overwrite", "");
|
argList::addOption("toleranceDict", "file with tolerances");
|
||||||
|
|
||||||
Foam::argList::validOptions.insert("toleranceDict", "file with tolerances");
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -174,8 +173,10 @@ int main(int argc, char *argv[])
|
|||||||
dictionary slidingTolerances;
|
dictionary slidingTolerances;
|
||||||
if (args.options().found("toleranceDict"))
|
if (args.options().found("toleranceDict"))
|
||||||
{
|
{
|
||||||
IOdictionary toleranceFile(
|
IOdictionary toleranceFile
|
||||||
IOobject(
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
args.options()["toleranceDict"],
|
args.options()["toleranceDict"],
|
||||||
runTime.constant(),
|
runTime.constant(),
|
||||||
mesh,
|
mesh,
|
||||||
|
|||||||
@ -152,8 +152,8 @@ void subsetPointFields
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validArgs.append("set");
|
argList::validArgs.append("set");
|
||||||
argList::validOptions.insert("patch", "patch name");
|
argList::addOption("patch", "patch name");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::addBoolOption("overwrite");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -143,12 +143,12 @@ void rotateFields(const argList& args, const Time& runTime, const tensor& T)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("translate", "vector");
|
argList::addOption("translate", "vector");
|
||||||
argList::validOptions.insert("rotate", "(vector vector)");
|
argList::addOption("rotate", "(vector vector)");
|
||||||
argList::validOptions.insert("rollPitchYaw", "(roll pitch yaw)");
|
argList::addOption("rollPitchYaw", "(roll pitch yaw)");
|
||||||
argList::validOptions.insert("yawPitchRoll", "(yaw pitch roll)");
|
argList::addOption("yawPitchRoll", "(yaw pitch roll)");
|
||||||
argList::validOptions.insert("rotateFields", "");
|
argList::addBoolOption("rotateFields");
|
||||||
argList::validOptions.insert("scale", "vector");
|
argList::addOption("scale", "vector");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -41,10 +41,20 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("new", "");
|
argList::addBoolOption
|
||||||
argList::validOptions.insert("old", "");
|
(
|
||||||
|
"new",
|
||||||
|
"output switches that are known from the libraries "
|
||||||
|
"but that do not seem to be known in the current etc/controlDict"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"old",
|
||||||
|
"output switches that appear to be unknown in "
|
||||||
|
"the current etc/controlDict"
|
||||||
|
);
|
||||||
|
|
||||||
Foam::argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
wordList currDebug(debug::debugSwitches().toc());
|
wordList currDebug(debug::debugSwitches().toc());
|
||||||
wordList currInfo(debug::infoSwitches().toc());
|
wordList currInfo(debug::infoSwitches().toc());
|
||||||
|
|||||||
@ -40,10 +40,10 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("times", "");
|
argList::addBoolOption("times");
|
||||||
argList::validOptions.insert("dictionary", "dictionary name");
|
argList::addOption("dictionary", "dictionary name");
|
||||||
argList::validOptions.insert("keywords", "");
|
argList::addBoolOption("keywords");
|
||||||
argList::validOptions.insert("entry", "entry name");
|
argList::addOption("entry", "entry name");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
|
|||||||
@ -87,21 +87,40 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("cellDist", "");
|
argList::addBoolOption("cellDist");
|
||||||
argList::validOptions.insert("copyUniform", "");
|
argList::addBoolOption
|
||||||
argList::validOptions.insert("fields", "");
|
(
|
||||||
argList::validOptions.insert("filterPatches", "");
|
"copyUniform",
|
||||||
argList::validOptions.insert("force", "");
|
"copy any uniform/ directories too"
|
||||||
argList::validOptions.insert("ifRequired", "");
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"fields",
|
||||||
|
"use existing geometry decomposition and convert fields only"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"filterPatches",
|
||||||
|
"remove empty patches when decomposing the geometry"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"force",
|
||||||
|
"remove existing processor*/ subdirs before decomposing the geometry"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"ifRequired",
|
||||||
|
"only decompose geometry if the number of domains has changed"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
word regionName = fvMesh::defaultRegion;
|
word regionName = fvMesh::defaultRegion;
|
||||||
word regionDir = word::null;
|
word regionDir = word::null;
|
||||||
|
|
||||||
if (args.optionFound("region"))
|
if (args.optionReadIfPresent("region", regionName))
|
||||||
{
|
{
|
||||||
regionName = args.option("region");
|
|
||||||
regionDir = regionName;
|
regionDir = regionName;
|
||||||
Info<< "Decomposing mesh " << regionName << nl << endl;
|
Info<< "Decomposing mesh " << regionName << nl << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,8 +50,8 @@ int main(int argc, char *argv[])
|
|||||||
timeSelector::addOptions(true, true);
|
timeSelector::addOptions(true, true);
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("fields", "\"(list of fields)\"");
|
argList::addOption("fields", "\"(list of fields)\"");
|
||||||
argList::validOptions.insert("noLagrangian", "");
|
argList::addBoolOption("noLagrangian");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -281,8 +281,8 @@ autoPtr<mapPolyMesh> mergeSharedPoints
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("mergeTol", "relative merge distance");
|
argList::addOption("mergeTol", "relative merge distance");
|
||||||
argList::validOptions.insert("fullMatch", "");
|
argList::addBoolOption("fullMatch");
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
# include "addTimeOptions.H"
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
|||||||
@ -506,7 +506,7 @@ void compareFields
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("mergeTol", "relative merge distance");
|
argList::addOption("mergeTol", "relative merge distance");
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
// Create processor directory if non-existing
|
// Create processor directory if non-existing
|
||||||
|
|||||||
@ -93,9 +93,23 @@ bool inFileNameList
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("ascii", "" );
|
argList::addBoolOption
|
||||||
argList::validOptions.insert("patches", "patchList");
|
(
|
||||||
argList::validOptions.insert("noPatches", "");
|
"ascii",
|
||||||
|
"write in ASCII format instead of 'C Binary'"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noPatches",
|
||||||
|
"Suppress writing any patches"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"patches",
|
||||||
|
"patchList",
|
||||||
|
"Specify particular patches to write. "
|
||||||
|
"An empty list suppresses writing the internalMesh."
|
||||||
|
);
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
# include "addTimeOptions.H"
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|||||||
@ -34,12 +34,10 @@ License
|
|||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void ensightCaseEntry
|
void Foam::ensightCaseEntry
|
||||||
(
|
(
|
||||||
OFstream& caseFile,
|
OFstream& caseFile,
|
||||||
const string& ensightType,
|
const string& ensightType,
|
||||||
@ -89,7 +87,7 @@ void ensightCaseEntry
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ensightParticlePositions
|
void Foam::ensightParticlePositions
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const fileName& dataDir,
|
const fileName& dataDir,
|
||||||
@ -124,7 +122,7 @@ void ensightParticlePositions
|
|||||||
os.write(i+1);
|
os.write(i+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllIter(Cloud<passiveParticle>, parcels, elmnt)
|
forAllConstIter(Cloud<passiveParticle>, parcels, elmnt)
|
||||||
{
|
{
|
||||||
const vector& p = elmnt().position();
|
const vector& p = elmnt().position();
|
||||||
|
|
||||||
@ -137,7 +135,7 @@ void ensightParticlePositions
|
|||||||
{
|
{
|
||||||
label nParcels = 0;
|
label nParcels = 0;
|
||||||
|
|
||||||
forAllIter(Cloud<passiveParticle>, parcels, elmnt)
|
forAllConstIter(Cloud<passiveParticle>, parcels, elmnt)
|
||||||
{
|
{
|
||||||
const vector& p = elmnt().position();
|
const vector& p = elmnt().position();
|
||||||
|
|
||||||
@ -153,7 +151,7 @@ void ensightParticlePositions
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void ensightLagrangianField
|
void Foam::ensightLagrangianField
|
||||||
(
|
(
|
||||||
const IOobject& fieldObject,
|
const IOobject& fieldObject,
|
||||||
const fileName& dataDir,
|
const fileName& dataDir,
|
||||||
@ -211,7 +209,7 @@ void ensightLagrangianField
|
|||||||
|
|
||||||
//- write generalized field components
|
//- write generalized field components
|
||||||
template <class Type>
|
template <class Type>
|
||||||
void ensightVolField
|
void Foam::ensightVolField
|
||||||
(
|
(
|
||||||
const ensightParts& partsList,
|
const ensightParts& partsList,
|
||||||
const IOobject& fieldObject,
|
const IOobject& fieldObject,
|
||||||
@ -241,9 +239,5 @@ void ensightVolField
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // namespace Foam
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -79,9 +79,24 @@ int main(int argc, char *argv[])
|
|||||||
// afterwards anyhow
|
// afterwards anyhow
|
||||||
timeSelector::addOptions(true, false);
|
timeSelector::addOptions(true, false);
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("ascii", "");
|
argList::addBoolOption
|
||||||
argList::validOptions.insert("index", "start");
|
(
|
||||||
argList::validOptions.insert("noMesh", "");
|
"ascii",
|
||||||
|
"write in ASCII format instead of 'C Binary'"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"index",
|
||||||
|
"start",
|
||||||
|
"ignore the time index contained in the uniform/time file "
|
||||||
|
"and use simple indexing when creating the files"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noMesh",
|
||||||
|
"Suppress writing the geometry. "
|
||||||
|
"Can be useful for converting partial results for a static geometry"
|
||||||
|
);
|
||||||
|
|
||||||
// the volume field types that we handle
|
// the volume field types that we handle
|
||||||
wordHashSet volFieldTypes;
|
wordHashSet volFieldTypes;
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "calcFaceAddressing.H"
|
#include "calcFaceAddressing.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fieldviewTopology.H"
|
#include "fieldviewTopology.H"
|
||||||
|
|||||||
@ -177,7 +177,7 @@ static void writeFaceData
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("noWall", "");
|
argList::addBoolOption("noWall");
|
||||||
timeSelector::addOptions(true, false);
|
timeSelector::addOptions(true, false);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "writeFunctions.H"
|
#include "writeFunctions.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "itoa.H"
|
#include "itoa.H"
|
||||||
|
|||||||
@ -168,18 +168,18 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
|
||||||
argList::validOptions.insert("fields", "fields");
|
argList::addOption("fields", "fields");
|
||||||
argList::validOptions.insert("cellSet", "cellSet name");
|
argList::addOption("cellSet", "cellSet name");
|
||||||
argList::validOptions.insert("faceSet", "faceSet name");
|
argList::addOption("faceSet", "faceSet name");
|
||||||
argList::validOptions.insert("nearCellValue","");
|
argList::addBoolOption("nearCellValue");
|
||||||
argList::validOptions.insert("noInternal","");
|
argList::addBoolOption("noInternal");
|
||||||
argList::validOptions.insert("noPointValues","");
|
argList::addBoolOption("noPointValues");
|
||||||
argList::validOptions.insert
|
argList::addOption
|
||||||
(
|
(
|
||||||
"excludePatches",
|
"excludePatches",
|
||||||
"patches (wildcards) to exclude"
|
"patches (wildcards) to exclude"
|
||||||
);
|
);
|
||||||
argList::validOptions.insert("noFaceZones","");
|
argList::addBoolOption("noFaceZones");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -241,20 +241,20 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
|
||||||
argList::validOptions.insert("fields", "fields");
|
argList::addOption("fields", "fields");
|
||||||
argList::validOptions.insert("cellSet", "cellSet name");
|
argList::addOption("cellSet", "cellSet name");
|
||||||
argList::validOptions.insert("faceSet", "faceSet name");
|
argList::addOption("faceSet", "faceSet name");
|
||||||
argList::validOptions.insert("pointSet", "pointSet name");
|
argList::addOption("pointSet", "pointSet name");
|
||||||
argList::validOptions.insert("ascii","");
|
argList::addBoolOption("ascii");
|
||||||
argList::validOptions.insert("surfaceFields","");
|
argList::addBoolOption("surfaceFields");
|
||||||
argList::validOptions.insert("nearCellValue","");
|
argList::addBoolOption("nearCellValue");
|
||||||
argList::validOptions.insert("noInternal","");
|
argList::addBoolOption("noInternal");
|
||||||
argList::validOptions.insert("noPointValues","");
|
argList::addBoolOption("noPointValues");
|
||||||
argList::validOptions.insert("allPatches","");
|
argList::addBoolOption("allPatches");
|
||||||
argList::validOptions.insert("excludePatches","patches to exclude");
|
argList::addOption("excludePatches","patches to exclude");
|
||||||
argList::validOptions.insert("noFaceZones","");
|
argList::addBoolOption("noFaceZones");
|
||||||
argList::validOptions.insert("noLinks","");
|
argList::addBoolOption("noLinks");
|
||||||
argList::validOptions.insert("useTimeName","");
|
argList::addBoolOption("useTimeName");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -301,7 +301,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
word cellSetName;
|
word cellSetName;
|
||||||
string vtkName;
|
string vtkName = runTime.caseName();
|
||||||
|
|
||||||
if (args.optionFound("cellSet"))
|
if (args.optionFound("cellSet"))
|
||||||
{
|
{
|
||||||
@ -311,8 +311,6 @@ int main(int argc, char *argv[])
|
|||||||
else if (Pstream::parRun())
|
else if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
// Strip off leading casename, leaving just processor_DDD ending.
|
// Strip off leading casename, leaving just processor_DDD ending.
|
||||||
vtkName = runTime.caseName();
|
|
||||||
|
|
||||||
string::size_type i = vtkName.rfind("processor");
|
string::size_type i = vtkName.rfind("processor");
|
||||||
|
|
||||||
if (i != string::npos)
|
if (i != string::npos)
|
||||||
@ -320,10 +318,6 @@ int main(int argc, char *argv[])
|
|||||||
vtkName = vtkName.substr(i);
|
vtkName = vtkName.substr(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
vtkName = runTime.caseName();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "vtkMesh.H"
|
#include "vtkMesh.H"
|
||||||
|
|||||||
@ -23,7 +23,6 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
Note: bug in vtk displaying wedges? Seems to display ok if we decompose
|
Note: bug in vtk displaying wedges? Seems to display ok if we decompose
|
||||||
them. Should be thoroughly tested!
|
them. Should be thoroughly tested!
|
||||||
(they appear rarely in polyhedral meshes, do appear in some cut meshes)
|
(they appear rarely in polyhedral meshes, do appear in some cut meshes)
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "writeFaceSet.H"
|
#include "writeFaceSet.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "writeFuns.H"
|
#include "writeFuns.H"
|
||||||
|
|||||||
@ -22,8 +22,6 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "writePatchGeom.H"
|
#include "writePatchGeom.H"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user