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[])
|
||||
{
|
||||
|
||||
argList::validOptions.insert("writep", "");
|
||||
argList::addBoolOption("writep", "write the final pressure field");
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "maxwellSlipUFvPatchVectorField.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "mixedFixedValueSlipFvPatchFields.H"
|
||||
|
||||
@ -47,8 +47,10 @@
|
||||
)
|
||||
);
|
||||
|
||||
word kinematicCloudName("kinematicCloud");
|
||||
args.optionReadIfPresent("cloudName", kinematicCloudName);
|
||||
const word kinematicCloudName
|
||||
(
|
||||
args.optionLookupOrDefault<word>("cloudName", "kinematicCloud")
|
||||
);
|
||||
|
||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||
basicKinematicCloud kinematicCloud
|
||||
|
||||
@ -42,7 +42,7 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("cloudName", "cloud name");
|
||||
argList::addOption("cloudName", "cloud name");
|
||||
|
||||
#include "setRootCase.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[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("reList", "reList");
|
||||
argList::validOptions.insert("wordList", "wordList");
|
||||
argList::validOptions.insert("stringList", "stringList");
|
||||
argList::validOptions.insert("float", "xx");
|
||||
argList::validOptions.insert("flag", "");
|
||||
argList::addOption("reList", "reList");
|
||||
argList::addOption("wordList", "wordList");
|
||||
argList::addOption("stringList", "stringList");
|
||||
argList::addOption("float", "xx");
|
||||
argList::addBoolOption("flag");
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
|
||||
@ -82,9 +82,13 @@ int main(int argc, char *argv[])
|
||||
argList::noParallel();
|
||||
argList::validArgs.insert("file .. fileN");
|
||||
|
||||
argList::validOptions.insert("mask", "");
|
||||
argList::validOptions.insert("count", "");
|
||||
argList::validOptions.insert("info", "");
|
||||
argList::addBoolOption("mask", "report information about the bit masks");
|
||||
argList::addBoolOption("count", "test the count() method");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"info",
|
||||
"print an ascii representation of the storage"
|
||||
);
|
||||
|
||||
argList args(argc, argv, false, true);
|
||||
|
||||
|
||||
@ -58,9 +58,15 @@ int main(int argc, char *argv[])
|
||||
list1.print(Info);
|
||||
|
||||
Info<< "\ntest set() with default argument (max_value)\n";
|
||||
list1.set(1);
|
||||
list1.set(3);
|
||||
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";
|
||||
list1[2] = 3;
|
||||
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,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
#include "argList.H"
|
||||
Application
|
||||
|
||||
#include "vector.H"
|
||||
#include "IFstream.H"
|
||||
#include "BSpline.H"
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#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;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.insert("file .. fileN");
|
||||
const label n = 100000000;
|
||||
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];
|
||||
Info<< nl << "reading " << srcFile << nl;
|
||||
IFstream ifs(srcFile);
|
||||
|
||||
List<pointField> splinePointFields(ifs);
|
||||
|
||||
forAll(splinePointFields, splineI)
|
||||
if ((i % nReport) == 0 && i)
|
||||
{
|
||||
Info<<"convert " << splinePointFields[splineI] << " to bspline" << endl;
|
||||
|
||||
BSpline spl(splinePointFields[splineI], vector::zero, vector::zero);
|
||||
|
||||
Info<< "1/2 = " << spl.position(0.5) << endl;
|
||||
Info<< "i:" << i << " in " << timer.cpuTimeIncrement() << " s"
|
||||
<<endl;
|
||||
}
|
||||
packed[i] = 1;
|
||||
}
|
||||
Info<< "insert test: " << n << " elements in "
|
||||
<< timer.cpuTimeIncrement() << " s\n\n";
|
||||
|
||||
Info << "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -66,17 +66,18 @@ int main(int argc, char *argv[])
|
||||
argList::noBanner();
|
||||
argList::noParallel();
|
||||
argList::validArgs.insert("fileName .. fileNameN");
|
||||
argList::addOption("istream", "fileName", "test Istream values");
|
||||
|
||||
argList args(argc, argv, false, true);
|
||||
|
||||
if (args.additionalArgs().empty())
|
||||
if (args.additionalArgs().empty() && args.options().empty())
|
||||
{
|
||||
args.printUsage();
|
||||
}
|
||||
|
||||
if (args.optionFound("case"))
|
||||
fileName pathName;
|
||||
if (args.optionReadIfPresent("case", pathName))
|
||||
{
|
||||
fileName pathName = args.option("case");
|
||||
Info<< nl
|
||||
<< "-case" << nl
|
||||
<< "path = " << args.path() << nl
|
||||
@ -91,7 +92,23 @@ int main(int argc, char *argv[])
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -98,8 +98,9 @@ bool checkDictionaryContent(const dictionary& dict1, const dictionary& dict2)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("rewrite", "");
|
||||
argList::validOptions.insert("show", "");
|
||||
argList::addBoolOption("rewrite");
|
||||
argList::addBoolOption("show");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
Time runTime(args.rootPath(), args.caseName());
|
||||
|
||||
@ -39,8 +39,9 @@ int main(int argc, char *argv[])
|
||||
argList::noBanner();
|
||||
argList::noParallel();
|
||||
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);
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("CHEMKINIIIFile");
|
||||
argList::validOptions.insert("thermo", "fileName");
|
||||
argList::addOption("thermo", "fileName");
|
||||
argList args(argc, argv);
|
||||
|
||||
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,
|
||||
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 * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
T Foam::argList::optionRead(const word& opt) const
|
||||
namespace Foam
|
||||
{
|
||||
T val;
|
||||
class hasBoolClass
|
||||
{
|
||||
public:
|
||||
bool b_;
|
||||
|
||||
hasBoolClass(const bool val=false)
|
||||
:
|
||||
b_(false)
|
||||
{}
|
||||
};
|
||||
|
||||
optionLookup(opt)() >> val;
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
bool Foam::argList::optionReadIfPresent(const word& opt, T& val) const
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (optionFound(opt))
|
||||
cout<<"sizeof\n------\n";
|
||||
{
|
||||
val = optionRead<T>(opt);
|
||||
return true;
|
||||
nil x;
|
||||
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>
|
||||
Foam::List<T> Foam::argList::optionReadList(const word& opt) const
|
||||
{
|
||||
return readList<T>(optionLookup(opt)());
|
||||
Info << "---\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
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::validArgs.insert("string .. stringN");
|
||||
argList::validOptions.insert("file", "name");
|
||||
argList::validOptions.insert("repeat", "count");
|
||||
argList::addOption("file", "name");
|
||||
argList::addOption("repeat", "count");
|
||||
|
||||
argList args(argc, argv, false, true);
|
||||
|
||||
label repeat = 1;
|
||||
args.optionReadIfPresent<label>("repeat", repeat);
|
||||
const label repeat = args.optionLookupOrDefault<label>("repeat", 1);
|
||||
|
||||
cpuTime timer;
|
||||
|
||||
for (label count = 0; count < repeat; ++count)
|
||||
{
|
||||
forAll(args.additionalArgs(), argI)
|
||||
|
||||
@ -454,7 +454,7 @@ label simplifyFaces
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::validArgs.append("edge length [m]");
|
||||
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
|
||||
void checkSnapMesh
|
||||
@ -433,9 +429,9 @@ label mergeEdges(const scalar minCos, polyMesh& mesh)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.append("feature angle [0..180]");
|
||||
argList::validOptions.insert("concaveAngle", "[0..180]");
|
||||
argList::validOptions.insert("snapMesh", "");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addOption("concaveAngle", "[0..180]");
|
||||
argList::addBoolOption("snapMesh");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -447,8 +443,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||
|
||||
scalar concaveAngle = defaultConcaveAngle;
|
||||
args.optionReadIfPresent("concaveAngle", concaveAngle);
|
||||
// Sin of angle between two consecutive edges on a face.
|
||||
// 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));
|
||||
|
||||
@ -483,8 +480,8 @@ int main(int argc, char *argv[])
|
||||
// Merge points on straight edges and remove unused points
|
||||
if (snapMeshDict)
|
||||
{
|
||||
Info<< "Merging all 'loose' points on surface edges"
|
||||
<< ", regardless of the angle they make." << endl;
|
||||
Info<< "Merging all 'loose' points on surface edges, "
|
||||
<< "regardless of the angle they make." << endl;
|
||||
|
||||
// Surface bnound to be used to extrude. Merge all loose points.
|
||||
nChanged += mergeEdges(-1, mesh);
|
||||
@ -510,7 +507,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "Mesh unchanged." << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "cellSplitter.H"
|
||||
@ -39,12 +37,8 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(Foam::cellSplitter, 0);
|
||||
|
||||
defineTypeNameAndDebug(cellSplitter, 0);
|
||||
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -328,7 +328,7 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -52,7 +52,7 @@ using namespace Foam;
|
||||
// Main program:
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::validArgs.append("cellSet");
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -47,11 +47,12 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::argList::noParallel();
|
||||
Foam::argList::validArgs.append("patchName");
|
||||
Foam::argList::validArgs.append("edgeWeight");
|
||||
Foam::argList::validOptions.insert("useSet", "cellSet");
|
||||
Foam::argList::validOptions.insert("overwrite", "");
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("patchName");
|
||||
argList::validArgs.append("edgeWeight");
|
||||
|
||||
argList::addOption("useSet", "cellSet");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -97,7 +97,7 @@ bool limitRefinementLevel
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("readLevel", "");
|
||||
argList::addBoolOption("readLevel");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -48,8 +48,8 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::argList::validOptions.insert("overwrite", "");
|
||||
Foam::argList::validArgs.append("faceSet");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::validArgs.append("faceSet");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -525,10 +525,10 @@ void collectCuts
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("set", "cellSet name");
|
||||
argList::validOptions.insert("geometry", "");
|
||||
argList::validOptions.insert("tol", "edge snap tolerance");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addOption("set", "cellSet name");
|
||||
argList::addBoolOption("geometry");
|
||||
argList::addOption("tol", "edge snap tolerance");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::validArgs.append("edge angle [0..360]");
|
||||
|
||||
# include "setRootCase.H"
|
||||
@ -546,8 +546,7 @@ int main(int argc, char *argv[])
|
||||
bool geometry = args.optionFound("geometry");
|
||||
bool overwrite = args.optionFound("overwrite");
|
||||
|
||||
scalar edgeTol = 0.2;
|
||||
args.optionReadIfPresent("tol", edgeTol);
|
||||
scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
|
||||
|
||||
Info<< "Trying to split cells with internal angles > feature angle\n" << nl
|
||||
<< "featureAngle : " << featureAngle << nl
|
||||
|
||||
@ -198,8 +198,11 @@ void ReadVertices
|
||||
int dims = 1;
|
||||
float scale;
|
||||
CCMIOID mapID;
|
||||
CCMIOReadVerticesf(&err, vertices, &dims, &scale, &mapID, verts.begin(),
|
||||
offset, offsetPlusSize);
|
||||
CCMIOReadVerticesf
|
||||
(
|
||||
&err, vertices, &dims, &scale, &mapID, verts.begin(),
|
||||
offset, offsetPlusSize
|
||||
);
|
||||
CCMIOReadMap(&err, mapID, mapData.begin(), offset, offsetPlusSize);
|
||||
|
||||
//CCMIOSize size;
|
||||
@ -273,7 +276,6 @@ void ReadProblem
|
||||
|
||||
// ... walk through each region description and print it...
|
||||
|
||||
|
||||
CCMIOID boundary;
|
||||
label regionI = 0;
|
||||
int k = 0;
|
||||
|
||||
@ -238,7 +238,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("ANSYS input file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::addOption("scale", "scale factor");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -22,13 +22,9 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
|
||||
#include "block.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -50,7 +50,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("CFX geom file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::addOption("scale", "scale factor");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "hexBlock.H"
|
||||
|
||||
@ -762,10 +762,10 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("Fluent mesh file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::validOptions.insert("ignoreCellGroups", "cell group names");
|
||||
argList::validOptions.insert("ignoreFaceGroups", "face group names");
|
||||
argList::validOptions.insert("cubit", "");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addOption("ignoreCellGroups", "cell group names");
|
||||
argList::addOption("ignoreFaceGroups", "face group names");
|
||||
argList::addBoolOption("cubit");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -776,17 +776,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
|
||||
HashSet<word> ignoreCellGroups;
|
||||
if (args.optionFound("ignoreCellGroups"))
|
||||
{
|
||||
args.optionLookup("ignoreCellGroups")() >> ignoreCellGroups;
|
||||
}
|
||||
wordHashSet ignoreCellGroups;
|
||||
wordHashSet ignoreFaceGroups;
|
||||
|
||||
HashSet<word> ignoreFaceGroups;
|
||||
if (args.optionFound("ignoreFaceGroups"))
|
||||
{
|
||||
args.optionLookup("ignoreFaceGroups")() >> ignoreFaceGroups;
|
||||
}
|
||||
args.optionReadIfPresent("ignoreCellGroups", ignoreCellGroups);
|
||||
args.optionReadIfPresent("ignoreFaceGroups", ignoreFaceGroups);
|
||||
|
||||
cubitFile = args.options().found("cubit");
|
||||
|
||||
|
||||
@ -867,9 +867,9 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("Fluent mesh file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::validOptions.insert("writeSets", "");
|
||||
argList::validOptions.insert("writeZones", "");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addBoolOption("writeSets");
|
||||
argList::addBoolOption("writeZones");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -76,10 +76,27 @@ int main(int argc, char *argv[])
|
||||
argList::noParallel();
|
||||
timeSelector::addOptions();
|
||||
|
||||
argList::validOptions.insert("scale", "scale");
|
||||
argList::validOptions.insert("noBnd", "");
|
||||
argList::validOptions.insert("tri", "");
|
||||
argList::validOptions.insert("surface", "");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"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 "createTime.H"
|
||||
|
||||
@ -639,7 +639,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("GAMBIT file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::addOption("scale", "scale factor");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -717,7 +717,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append(".msh file");
|
||||
argList::validOptions.insert("keepOrientation", "");
|
||||
argList::addBoolOption("keepOrientation");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -579,7 +579,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append(".unv file");
|
||||
argList::validOptions.insert("dump", "");
|
||||
argList::addBoolOption("dump");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -60,9 +60,9 @@ enum kivaVersions
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("file", "fileName");
|
||||
argList::validOptions.insert("version", "[kiva3|kiva3v]");
|
||||
argList::validOptions.insert("zHeadMin", "scalar");
|
||||
argList::addOption("file", "fileName");
|
||||
argList::addOption("version", "[kiva3|kiva3v]");
|
||||
argList::addOption("zHeadMin", "scalar");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -57,7 +57,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append(".msh file");
|
||||
argList::validOptions.insert("hex", "");
|
||||
argList::addBoolOption("hex");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -58,10 +58,10 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("PLOT3D geom file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::validOptions.insert("noBlank", "");
|
||||
argList::validOptions.insert("singleBlock", "");
|
||||
argList::validOptions.insert("2D", "thickness");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addBoolOption("noBlank");
|
||||
argList::addBoolOption("singleBlock");
|
||||
argList::addOption("2D", "thickness");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -357,10 +357,10 @@ int main(int argc, char *argv[])
|
||||
timeSelector::addOptions(true, false);
|
||||
|
||||
argList::validArgs.append("feature angle[0-180]");
|
||||
argList::validOptions.insert("splitAllFaces", "");
|
||||
argList::validOptions.insert("concaveMultiCells", "");
|
||||
argList::validOptions.insert("doNotPreserveFaceZones", "");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("splitAllFaces");
|
||||
argList::addBoolOption("concaveMultiCells");
|
||||
argList::addBoolOption("doNotPreserveFaceZones");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -22,12 +22,9 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
|
||||
#include "sammMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -41,7 +41,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("SAMM mesh file prefix");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::addOption("scale", "scale factor");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -50,8 +50,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
scalar scaleFactor = 1.0;
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
|
||||
@ -62,28 +62,35 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("pro-STAR prefix");
|
||||
argList::validOptions.insert("ascii", "");
|
||||
argList::validOptions.insert("scale", "scale");
|
||||
argList::validOptions.insert("solids", "");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"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);
|
||||
Time runTime(args.rootPath(), args.caseName());
|
||||
const stringList& params = args.additionalArgs();
|
||||
|
||||
// default rescale from [mm] to [m]
|
||||
scalar scaleFactor = 0.001;
|
||||
if (args.optionReadIfPresent("scale", scaleFactor))
|
||||
{
|
||||
scalar scaleFactor = args.optionLookupOrDefault("scale", 0.001);
|
||||
if (scaleFactor <= 0)
|
||||
{
|
||||
scaleFactor = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (args.optionFound("solids"))
|
||||
{
|
||||
meshReaders::STARCD::keepSolids = true;
|
||||
}
|
||||
meshReaders::STARCD::keepSolids = args.optionFound("solids");
|
||||
|
||||
// default to binary output, unless otherwise specified
|
||||
IOstream::streamFormat format = IOstream::BINARY;
|
||||
|
||||
@ -41,7 +41,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("STAR mesh file prefix");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::addOption("scale", "scale factor");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -50,8 +50,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
scalar scaleFactor = 1.0;
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ Description
|
||||
and run tetgen with -f option.
|
||||
|
||||
Sample smesh file:
|
||||
|
||||
@verbatim
|
||||
# cube.smesh -- A 10x10x10 cube
|
||||
8 3
|
||||
1 0 0 0
|
||||
@ -50,8 +50,9 @@ Description
|
||||
4 2 6 7 3 65
|
||||
0
|
||||
0
|
||||
@endverbatim
|
||||
|
||||
NOTE:
|
||||
Note
|
||||
- for some reason boundary faces point inwards. I just reverse them
|
||||
always. Might use some geometric check instead.
|
||||
- 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[])
|
||||
{
|
||||
argList::validArgs.append("file prefix");
|
||||
argList::validOptions.insert("noFaceFile", "");
|
||||
argList::addBoolOption("noFaceFile");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -378,13 +378,13 @@ void writePointCells
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
timeSelector::addOptions();
|
||||
argList::validOptions.insert("patchFaces", "");
|
||||
argList::validOptions.insert("patchEdges", "");
|
||||
argList::validOptions.insert("cell", "cellI");
|
||||
argList::validOptions.insert("face", "faceI");
|
||||
argList::validOptions.insert("point", "pointI");
|
||||
argList::validOptions.insert("cellSet", "setName");
|
||||
argList::validOptions.insert("faceSet", "setName");
|
||||
argList::addBoolOption("patchFaces");
|
||||
argList::addBoolOption("patchEdges");
|
||||
argList::addOption("cell", "cellI");
|
||||
argList::addOption("face", "faceI");
|
||||
argList::addOption("point", "pointI");
|
||||
argList::addOption("cellSet", "setName");
|
||||
argList::addOption("faceSet", "setName");
|
||||
# include "addRegionOption.H"
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
@ -72,8 +72,18 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("blockTopology", "");
|
||||
argList::validOptions.insert("dict", "dictionary");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"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 "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -83,10 +93,9 @@ int main(int argc, char *argv[])
|
||||
word regionName;
|
||||
fileName polyMeshDir;
|
||||
|
||||
if (args.optionFound("region"))
|
||||
if (args.optionReadIfPresent("region", regionName, polyMesh::defaultRegion))
|
||||
{
|
||||
// constant/<region>/polyMesh/blockMeshDict
|
||||
regionName = args.option("region");
|
||||
polyMeshDir = regionName/polyMesh::meshSubDir;
|
||||
|
||||
Info<< nl << "Generating mesh for region " << regionName << endl;
|
||||
@ -94,7 +103,6 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
// constant/polyMesh/blockMeshDict
|
||||
regionName = polyMesh::defaultRegion;
|
||||
polyMeshDir = polyMesh::meshSubDir;
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.append("thickness");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
@ -115,7 +115,7 @@ void writeMesh
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
@ -42,7 +42,7 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -71,7 +71,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("feature angle[0-180]");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -49,9 +49,9 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
timeSelector::addOptions();
|
||||
# include "addRegionOption.H"
|
||||
argList::validOptions.insert("noTopology", "");
|
||||
argList::validOptions.insert("allGeometry", "");
|
||||
argList::validOptions.insert("allTopology", "");
|
||||
argList::addBoolOption("noTopology");
|
||||
argList::addBoolOption("allGeometry");
|
||||
argList::addBoolOption("allTopology");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -128,9 +128,9 @@ int main(int argc, char *argv[])
|
||||
# include "addRegionOption.H"
|
||||
argList::validArgs.append("faceZone");
|
||||
argList::validArgs.append("patch");
|
||||
argList::validOptions.insert("additionalPatches", "(patch2 .. patchN)");
|
||||
argList::validOptions.insert("internalFacesOnly", "");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addOption("additionalPatches", "(patch2 .. patchN)");
|
||||
argList::addBoolOption("internalFacesOnly");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -517,7 +517,7 @@ void syncPoints
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
# include "addRegionOption.H"
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -43,16 +43,15 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::argList::noParallel();
|
||||
Foam::argList::validArgs.append("surface file");
|
||||
Foam::argList::validArgs.append("destination cellSet");
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("surface file");
|
||||
argList::validArgs.append("destination cellSet");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createPolyMesh.H"
|
||||
|
||||
fileName surfName(args.additionalArgs()[0]);
|
||||
|
||||
fileName setName(args.additionalArgs()[1]);
|
||||
|
||||
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
argList::validArgs.append("master root");
|
||||
argList::validArgs.append("master case");
|
||||
argList::validOptions.insert("masterRegion", "name");
|
||||
argList::addOption("masterRegion", "name");
|
||||
|
||||
argList::validArgs.append("root to add");
|
||||
argList::validArgs.append("case to add");
|
||||
argList::validOptions.insert("addRegion", "name");
|
||||
argList::addOption("addRegion", "name");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -223,9 +223,9 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
# include "addRegionOption.H"
|
||||
argList::validOptions.insert("split", "");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::validOptions.insert("detectOnly", "");
|
||||
argList::addBoolOption("split");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::addBoolOption("detectOnly");
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
@ -291,8 +291,8 @@ label twoDNess(const polyMesh& mesh)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::argList::validOptions.insert("dict", "");
|
||||
Foam::argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("dict");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -320,8 +320,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
Info<< "Refining according to refineMeshDict" << nl << endl;
|
||||
|
||||
refineDict =
|
||||
IOdictionary
|
||||
refineDict = IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
||||
@ -364,10 +364,10 @@ autoPtr<mapPolyMesh> reorderMesh
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("blockOrder", "");
|
||||
argList::validOptions.insert("orderPoints", "");
|
||||
argList::validOptions.insert("writeMaps", "");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("blockOrder");
|
||||
argList::addBoolOption("orderPoints");
|
||||
argList::addBoolOption("writeMaps");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "addTimeOptions.H"
|
||||
|
||||
|
||||
@ -843,8 +843,8 @@ int main(int argc, char *argv[])
|
||||
# include "addRegionOption.H"
|
||||
# include "addTimeOptions.H"
|
||||
|
||||
argList::validOptions.insert("noVTK", "");
|
||||
argList::validOptions.insert("batch", "file");
|
||||
argList::addBoolOption("noVTK");
|
||||
argList::addOption("batch", "file");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "writeFuns.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "writePatch.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "writePointSet.H"
|
||||
|
||||
@ -58,7 +58,7 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("noFlipMap", "");
|
||||
argList::addBoolOption("noFlipMap");
|
||||
|
||||
# include "addRegionOption.H"
|
||||
# include "addTimeOptions.H"
|
||||
|
||||
@ -66,7 +66,8 @@ void interpolateFields
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "addTimeOptions.H"
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -110,12 +110,12 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::argList::noParallel();
|
||||
argList::noParallel();
|
||||
|
||||
Foam::argList::validArgs.append("faceSet");
|
||||
Foam::argList::validArgs.append("masterPatch");
|
||||
Foam::argList::validArgs.append("slavePatch");
|
||||
Foam::argList::validOptions.insert("overwrite", "");
|
||||
argList::validArgs.append("faceSet");
|
||||
argList::validArgs.append("masterPatch");
|
||||
argList::validArgs.append("slavePatch");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -1290,15 +1290,15 @@ label findCorrespondingRegion
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("cellZones", "");
|
||||
argList::validOptions.insert("cellZonesOnly", "");
|
||||
argList::validOptions.insert("blockedFaces", "faceSet");
|
||||
argList::validOptions.insert("makeCellZones", "");
|
||||
argList::validOptions.insert("largestOnly", "");
|
||||
argList::validOptions.insert("insidePoint", "point");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::validOptions.insert("detectOnly", "");
|
||||
argList::validOptions.insert("sloppyCellZones", "");
|
||||
argList::addBoolOption("cellZones");
|
||||
argList::addBoolOption("cellZonesOnly");
|
||||
argList::addOption("blockedFaces", "faceSet");
|
||||
argList::addBoolOption("makeCellZones");
|
||||
argList::addBoolOption("largestOnly");
|
||||
argList::addOption("insidePoint", "point");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::addBoolOption("detectOnly");
|
||||
argList::addBoolOption("sloppyCellZones");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -95,17 +95,16 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::argList::noParallel();
|
||||
argList::noParallel();
|
||||
|
||||
Foam::argList::validArgs.append("masterPatch");
|
||||
Foam::argList::validArgs.append("slavePatch");
|
||||
argList::validArgs.append("masterPatch");
|
||||
argList::validArgs.append("slavePatch");
|
||||
|
||||
Foam::argList::validOptions.insert("partial", "");
|
||||
Foam::argList::validOptions.insert("perfect", "");
|
||||
argList::addBoolOption("partial");
|
||||
argList::addBoolOption("perfect");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
Foam::argList::validOptions.insert("overwrite", "");
|
||||
|
||||
Foam::argList::validOptions.insert("toleranceDict", "file with tolerances");
|
||||
argList::addOption("toleranceDict", "file with tolerances");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -174,8 +173,10 @@ int main(int argc, char *argv[])
|
||||
dictionary slidingTolerances;
|
||||
if (args.options().found("toleranceDict"))
|
||||
{
|
||||
IOdictionary toleranceFile(
|
||||
IOobject(
|
||||
IOdictionary toleranceFile
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
args.options()["toleranceDict"],
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
|
||||
@ -152,8 +152,8 @@ void subsetPointFields
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.append("set");
|
||||
argList::validOptions.insert("patch", "patch name");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addOption("patch", "patch name");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.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[])
|
||||
{
|
||||
# include "addRegionOption.H"
|
||||
argList::validOptions.insert("translate", "vector");
|
||||
argList::validOptions.insert("rotate", "(vector vector)");
|
||||
argList::validOptions.insert("rollPitchYaw", "(roll pitch yaw)");
|
||||
argList::validOptions.insert("yawPitchRoll", "(yaw pitch roll)");
|
||||
argList::validOptions.insert("rotateFields", "");
|
||||
argList::validOptions.insert("scale", "vector");
|
||||
argList::addOption("translate", "vector");
|
||||
argList::addOption("rotate", "(vector vector)");
|
||||
argList::addOption("rollPitchYaw", "(roll pitch yaw)");
|
||||
argList::addOption("yawPitchRoll", "(yaw pitch roll)");
|
||||
argList::addBoolOption("rotateFields");
|
||||
argList::addOption("scale", "vector");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -41,10 +41,20 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("new", "");
|
||||
argList::validOptions.insert("old", "");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"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 currInfo(debug::infoSwitches().toc());
|
||||
|
||||
@ -40,10 +40,10 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("times", "");
|
||||
argList::validOptions.insert("dictionary", "dictionary name");
|
||||
argList::validOptions.insert("keywords", "");
|
||||
argList::validOptions.insert("entry", "entry name");
|
||||
argList::addBoolOption("times");
|
||||
argList::addOption("dictionary", "dictionary name");
|
||||
argList::addBoolOption("keywords");
|
||||
argList::addOption("entry", "entry name");
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
|
||||
@ -87,21 +87,40 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
# include "addRegionOption.H"
|
||||
argList::validOptions.insert("cellDist", "");
|
||||
argList::validOptions.insert("copyUniform", "");
|
||||
argList::validOptions.insert("fields", "");
|
||||
argList::validOptions.insert("filterPatches", "");
|
||||
argList::validOptions.insert("force", "");
|
||||
argList::validOptions.insert("ifRequired", "");
|
||||
argList::addBoolOption("cellDist");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"copyUniform",
|
||||
"copy any uniform/ directories too"
|
||||
);
|
||||
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"
|
||||
|
||||
word regionName = fvMesh::defaultRegion;
|
||||
word regionDir = word::null;
|
||||
|
||||
if (args.optionFound("region"))
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
{
|
||||
regionName = args.option("region");
|
||||
regionDir = regionName;
|
||||
Info<< "Decomposing mesh " << regionName << nl << endl;
|
||||
}
|
||||
|
||||
@ -50,8 +50,8 @@ int main(int argc, char *argv[])
|
||||
timeSelector::addOptions(true, true);
|
||||
argList::noParallel();
|
||||
# include "addRegionOption.H"
|
||||
argList::validOptions.insert("fields", "\"(list of fields)\"");
|
||||
argList::validOptions.insert("noLagrangian", "");
|
||||
argList::addOption("fields", "\"(list of fields)\"");
|
||||
argList::addBoolOption("noLagrangian");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -281,8 +281,8 @@ autoPtr<mapPolyMesh> mergeSharedPoints
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("mergeTol", "relative merge distance");
|
||||
argList::validOptions.insert("fullMatch", "");
|
||||
argList::addOption("mergeTol", "relative merge distance");
|
||||
argList::addBoolOption("fullMatch");
|
||||
|
||||
# include "addTimeOptions.H"
|
||||
# include "addRegionOption.H"
|
||||
|
||||
@ -506,7 +506,7 @@ void compareFields
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("mergeTol", "relative merge distance");
|
||||
argList::addOption("mergeTol", "relative merge distance");
|
||||
# include "setRootCase.H"
|
||||
|
||||
// Create processor directory if non-existing
|
||||
|
||||
@ -93,9 +93,23 @@ bool inFileNameList
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("ascii", "" );
|
||||
argList::validOptions.insert("patches", "patchList");
|
||||
argList::validOptions.insert("noPatches", "");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"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 "setRootCase.H"
|
||||
|
||||
@ -34,12 +34,10 @@ License
|
||||
#include "OFstream.H"
|
||||
#include "IOmanip.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
void ensightCaseEntry
|
||||
void Foam::ensightCaseEntry
|
||||
(
|
||||
OFstream& caseFile,
|
||||
const string& ensightType,
|
||||
@ -89,7 +87,7 @@ void ensightCaseEntry
|
||||
}
|
||||
|
||||
|
||||
void ensightParticlePositions
|
||||
void Foam::ensightParticlePositions
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const fileName& dataDir,
|
||||
@ -124,7 +122,7 @@ void ensightParticlePositions
|
||||
os.write(i+1);
|
||||
}
|
||||
|
||||
forAllIter(Cloud<passiveParticle>, parcels, elmnt)
|
||||
forAllConstIter(Cloud<passiveParticle>, parcels, elmnt)
|
||||
{
|
||||
const vector& p = elmnt().position();
|
||||
|
||||
@ -137,7 +135,7 @@ void ensightParticlePositions
|
||||
{
|
||||
label nParcels = 0;
|
||||
|
||||
forAllIter(Cloud<passiveParticle>, parcels, elmnt)
|
||||
forAllConstIter(Cloud<passiveParticle>, parcels, elmnt)
|
||||
{
|
||||
const vector& p = elmnt().position();
|
||||
|
||||
@ -153,7 +151,7 @@ void ensightParticlePositions
|
||||
|
||||
|
||||
template<class Type>
|
||||
void ensightLagrangianField
|
||||
void Foam::ensightLagrangianField
|
||||
(
|
||||
const IOobject& fieldObject,
|
||||
const fileName& dataDir,
|
||||
@ -211,7 +209,7 @@ void ensightLagrangianField
|
||||
|
||||
//- write generalized field components
|
||||
template <class Type>
|
||||
void ensightVolField
|
||||
void Foam::ensightVolField
|
||||
(
|
||||
const ensightParts& partsList,
|
||||
const IOobject& fieldObject,
|
||||
@ -241,9 +239,5 @@ void ensightVolField
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // namespace Foam
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -79,9 +79,24 @@ int main(int argc, char *argv[])
|
||||
// afterwards anyhow
|
||||
timeSelector::addOptions(true, false);
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("ascii", "");
|
||||
argList::validOptions.insert("index", "start");
|
||||
argList::validOptions.insert("noMesh", "");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"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
|
||||
wordHashSet volFieldTypes;
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "calcFaceAddressing.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fieldviewTopology.H"
|
||||
|
||||
@ -177,7 +177,7 @@ static void writeFaceData
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("noWall", "");
|
||||
argList::addBoolOption("noWall");
|
||||
timeSelector::addOptions(true, false);
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "writeFunctions.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "itoa.H"
|
||||
|
||||
@ -168,18 +168,18 @@ int main(int argc, char *argv[])
|
||||
|
||||
# include "addRegionOption.H"
|
||||
|
||||
argList::validOptions.insert("fields", "fields");
|
||||
argList::validOptions.insert("cellSet", "cellSet name");
|
||||
argList::validOptions.insert("faceSet", "faceSet name");
|
||||
argList::validOptions.insert("nearCellValue","");
|
||||
argList::validOptions.insert("noInternal","");
|
||||
argList::validOptions.insert("noPointValues","");
|
||||
argList::validOptions.insert
|
||||
argList::addOption("fields", "fields");
|
||||
argList::addOption("cellSet", "cellSet name");
|
||||
argList::addOption("faceSet", "faceSet name");
|
||||
argList::addBoolOption("nearCellValue");
|
||||
argList::addBoolOption("noInternal");
|
||||
argList::addBoolOption("noPointValues");
|
||||
argList::addOption
|
||||
(
|
||||
"excludePatches",
|
||||
"patches (wildcards) to exclude"
|
||||
);
|
||||
argList::validOptions.insert("noFaceZones","");
|
||||
argList::addBoolOption("noFaceZones");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -241,20 +241,20 @@ int main(int argc, char *argv[])
|
||||
|
||||
# include "addRegionOption.H"
|
||||
|
||||
argList::validOptions.insert("fields", "fields");
|
||||
argList::validOptions.insert("cellSet", "cellSet name");
|
||||
argList::validOptions.insert("faceSet", "faceSet name");
|
||||
argList::validOptions.insert("pointSet", "pointSet name");
|
||||
argList::validOptions.insert("ascii","");
|
||||
argList::validOptions.insert("surfaceFields","");
|
||||
argList::validOptions.insert("nearCellValue","");
|
||||
argList::validOptions.insert("noInternal","");
|
||||
argList::validOptions.insert("noPointValues","");
|
||||
argList::validOptions.insert("allPatches","");
|
||||
argList::validOptions.insert("excludePatches","patches to exclude");
|
||||
argList::validOptions.insert("noFaceZones","");
|
||||
argList::validOptions.insert("noLinks","");
|
||||
argList::validOptions.insert("useTimeName","");
|
||||
argList::addOption("fields", "fields");
|
||||
argList::addOption("cellSet", "cellSet name");
|
||||
argList::addOption("faceSet", "faceSet name");
|
||||
argList::addOption("pointSet", "pointSet name");
|
||||
argList::addBoolOption("ascii");
|
||||
argList::addBoolOption("surfaceFields");
|
||||
argList::addBoolOption("nearCellValue");
|
||||
argList::addBoolOption("noInternal");
|
||||
argList::addBoolOption("noPointValues");
|
||||
argList::addBoolOption("allPatches");
|
||||
argList::addOption("excludePatches","patches to exclude");
|
||||
argList::addBoolOption("noFaceZones");
|
||||
argList::addBoolOption("noLinks");
|
||||
argList::addBoolOption("useTimeName");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -301,7 +301,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
word cellSetName;
|
||||
string vtkName;
|
||||
string vtkName = runTime.caseName();
|
||||
|
||||
if (args.optionFound("cellSet"))
|
||||
{
|
||||
@ -311,8 +311,6 @@ int main(int argc, char *argv[])
|
||||
else if (Pstream::parRun())
|
||||
{
|
||||
// Strip off leading casename, leaving just processor_DDD ending.
|
||||
vtkName = runTime.caseName();
|
||||
|
||||
string::size_type i = vtkName.rfind("processor");
|
||||
|
||||
if (i != string::npos)
|
||||
@ -320,10 +318,6 @@ int main(int argc, char *argv[])
|
||||
vtkName = vtkName.substr(i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vtkName = runTime.caseName();
|
||||
}
|
||||
|
||||
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "vtkMesh.H"
|
||||
|
||||
@ -23,7 +23,6 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
Note: bug in vtk displaying wedges? Seems to display ok if we decompose
|
||||
them. Should be thoroughly tested!
|
||||
(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,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "writeFaceSet.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "writeFuns.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#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