mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: add notes to some (most) command-line options
- mapFields and splitMeshRegions need more clarification
This commit is contained in:
@ -41,7 +41,12 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::addOption("cloudName", "cloud name");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"cloudName",
|
||||||
|
"name",
|
||||||
|
"specify alternative cloud name. default is 'kinematicCloud'"
|
||||||
|
);
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|||||||
@ -38,7 +38,7 @@ Description
|
|||||||
|
|
||||||
E.g. to allow all faces on same patch to be merged:
|
E.g. to allow all faces on same patch to be merged:
|
||||||
|
|
||||||
combinePatchFaces .. cavity 180 -concaveAngle 90
|
combinePatchFaces 180 -concaveAngle 90
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -429,15 +429,18 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
# include "addOverwriteOption.H"
|
# include "addOverwriteOption.H"
|
||||||
|
|
||||||
argList::validArgs.append("feature angle [0..180]");
|
argList::validArgs.append("featureAngle [0..180]");
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"concaveAngle",
|
"concaveAngle",
|
||||||
"[0..180]",
|
"degrees",
|
||||||
"specify concave angle [0..180] degrees (default: 30.0 degrees)"
|
"specify concave angle [0..180] (default: 30 degrees)"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"snapMesh",
|
||||||
|
"use system/snapMeshDict"
|
||||||
);
|
);
|
||||||
|
|
||||||
argList::addBoolOption("snapMesh");
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -46,12 +46,18 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addOverwriteOption.H"
|
#include "addOverwriteOption.H"
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("patchName");
|
argList::validArgs.append("patchName");
|
||||||
argList::validArgs.append("edgeWeight");
|
argList::validArgs.append("edgeWeight");
|
||||||
|
|
||||||
argList::addOption("useSet", "cellSet");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"useSet",
|
||||||
|
"name",
|
||||||
|
"restrict cells to refine based on specified cellSet name"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -96,11 +96,15 @@ bool limitRefinementLevel
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::addBoolOption("readLevel");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"readLevel",
|
||||||
|
"read level from refinementLevel file"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
# include "createPolyMesh.H"
|
#include "createPolyMesh.H"
|
||||||
|
|
||||||
Info<< "Dividing cells into bins depending on cell volume.\nThis will"
|
Info<< "Dividing cells into bins depending on cell volume.\nThis will"
|
||||||
<< " correspond to refinement levels for a mesh with only 2x2x2"
|
<< " correspond to refinement levels for a mesh with only 2x2x2"
|
||||||
@ -109,7 +113,7 @@ int main(int argc, char *argv[])
|
|||||||
<< " to allow for some truncation error."
|
<< " to allow for some truncation error."
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
bool readLevel = args.optionFound("readLevel");
|
const bool readLevel = args.optionFound("readLevel");
|
||||||
|
|
||||||
const scalarField& vols = mesh.cellVolumes();
|
const scalarField& vols = mesh.cellVolumes();
|
||||||
|
|
||||||
|
|||||||
@ -517,17 +517,35 @@ void collectCuts
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addOverwriteOption.H"
|
argList::addNote
|
||||||
|
(
|
||||||
|
"split cells with flat faces"
|
||||||
|
);
|
||||||
|
#include "addOverwriteOption.H"
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addOption("set", "cellSet name");
|
argList::validArgs.append("edgeAngle [0..360]");
|
||||||
argList::addBoolOption("geometry");
|
|
||||||
argList::addOption("tol", "edge snap tolerance");
|
|
||||||
argList::validArgs.append("edge angle [0..360]");
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
argList::addOption
|
||||||
# include "createTime.H"
|
(
|
||||||
|
"set",
|
||||||
|
"name",
|
||||||
|
"split cells from specified cellSet only"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"geometry",
|
||||||
|
"use geometric cut for hexes as well"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"tol",
|
||||||
|
"scalar", "edge snap tolerance (default 0.2)"
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
# include "createPolyMesh.H"
|
#include "createPolyMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
const scalar featureAngle = args.argRead<scalar>(1);
|
const scalar featureAngle = args.argRead<scalar>(1);
|
||||||
@ -538,7 +556,7 @@ int main(int argc, char *argv[])
|
|||||||
const bool geometry = args.optionFound("geometry");
|
const bool geometry = args.optionFound("geometry");
|
||||||
const bool overwrite = args.optionFound("overwrite");
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
|
const scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@ -235,7 +235,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("ANSYS input file");
|
argList::validArgs.append("ANSYS input file");
|
||||||
argList::addOption("scale", "scale factor");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scale",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -244,8 +249,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleFactor = 1.0;
|
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||||
args.optionReadIfPresent("scale", scaleFactor);
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("CFX geom file");
|
argList::validArgs.append("CFX geom file");
|
||||||
argList::addOption("scale", "scale factor");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scale",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -58,8 +63,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleFactor = 1.0;
|
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||||
args.optionReadIfPresent("scale", scaleFactor);
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|||||||
@ -761,10 +761,30 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("Fluent mesh file");
|
argList::validArgs.append("Fluent mesh file");
|
||||||
argList::addOption("scale", "scale factor");
|
argList::addOption
|
||||||
argList::addOption("ignoreCellGroups", "cell group names");
|
(
|
||||||
argList::addOption("ignoreFaceGroups", "face group names");
|
"scale",
|
||||||
argList::addBoolOption("cubit");
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"ignoreCellGroups",
|
||||||
|
"names",
|
||||||
|
"specify cell groups to ignore"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"ignoreFaceGroups",
|
||||||
|
"names",
|
||||||
|
"specify face groups to ignore"
|
||||||
|
);
|
||||||
|
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"cubit",
|
||||||
|
"special parsing of (incorrect) cubit files"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@ -866,9 +866,22 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("Fluent mesh file");
|
argList::validArgs.append("Fluent mesh file");
|
||||||
argList::addOption("scale", "scale factor");
|
argList::addOption
|
||||||
argList::addBoolOption("writeSets");
|
(
|
||||||
argList::addBoolOption("writeZones");
|
"scale",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"writeSets",
|
||||||
|
"write cell zones and patches as sets"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"writeZones",
|
||||||
|
"write cell zones as zones"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -877,8 +890,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleFactor = 1.0;
|
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||||
args.optionReadIfPresent("scale", scaleFactor);
|
|
||||||
|
|
||||||
const bool writeSets = args.optionFound("writeSets");
|
const bool writeSets = args.optionFound("writeSets");
|
||||||
const bool writeZones = args.optionFound("writeZones");
|
const bool writeZones = args.optionFound("writeZones");
|
||||||
@ -1554,7 +1566,7 @@ int main(int argc, char *argv[])
|
|||||||
// interior boundaries are handled via faceSets
|
// interior boundaries are handled via faceSets
|
||||||
// cell zones will only be written if there is more than one
|
// cell zones will only be written if there is more than one
|
||||||
|
|
||||||
if (writeZones && cellGroupZoneID.size()>1)
|
if (writeZones && cellGroupZoneID.size() > 1)
|
||||||
{
|
{
|
||||||
Info<< "Adding Zones" << endl;
|
Info<< "Adding Zones" << endl;
|
||||||
List<pointZone*> pz(0);
|
List<pointZone*> pz(0);
|
||||||
|
|||||||
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
"scale",
|
"scale",
|
||||||
"factor",
|
"factor",
|
||||||
"specify geometry scaling factor - default is 1000 ([m] to [mm])"
|
"geometry scaling factor - default is 1000 ([m] to [mm])"
|
||||||
);
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
|
|||||||
@ -61,8 +61,8 @@ int main(int argc, char *argv[])
|
|||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"scale",
|
"scale",
|
||||||
"scale",
|
"factor",
|
||||||
"specify geometry scaling factor"
|
"geometry scaling factor - default is 1"
|
||||||
);
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
|
|||||||
@ -628,7 +628,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("GAMBIT file");
|
argList::validArgs.append("GAMBIT file");
|
||||||
argList::addOption("scale", "scale factor");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scale",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -637,8 +642,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleFactor = 1.0;
|
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||||
args.optionReadIfPresent("scale", scaleFactor);
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|||||||
@ -716,7 +716,11 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append(".msh file");
|
argList::validArgs.append(".msh file");
|
||||||
argList::addBoolOption("keepOrientation");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"keepOrientation",
|
||||||
|
"retain raw orientation for prisms/hexs"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -46,7 +46,7 @@ Description
|
|||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
// Supported KIVA versions
|
//- Supported KIVA versions
|
||||||
enum kivaVersions
|
enum kivaVersions
|
||||||
{
|
{
|
||||||
kiva3,
|
kiva3,
|
||||||
@ -59,37 +59,51 @@ enum kivaVersions
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addOption("file", "fileName");
|
argList::addOption
|
||||||
argList::addOption("version", "[kiva3|kiva3v]");
|
(
|
||||||
argList::addOption("zHeadMin", "scalar");
|
"file",
|
||||||
|
"name",
|
||||||
|
"specify alternative input file name - default is otape17"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"version",
|
||||||
|
"version",
|
||||||
|
"specify kiva version [kiva3|kiva3v] - default is '3v'"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"zHeadMin",
|
||||||
|
"scalar",
|
||||||
|
"minimum z-height for transferring liner faces to cylinder-head"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName kivaFileName("otape17");
|
const fileName kivaFileName =
|
||||||
args.optionReadIfPresent("file", kivaFileName);
|
args.optionLookupOrDefault<fileName>("file", "otape17");
|
||||||
|
|
||||||
kivaVersions kivaVersion = kiva3v;
|
kivaVersions kivaVersion = kiva3v;
|
||||||
if (args.optionFound("version"))
|
if (args.optionFound("version"))
|
||||||
{
|
{
|
||||||
const word kivaVersionName = args["version"];
|
const word versionName = args["version"];
|
||||||
|
|
||||||
if (kivaVersionName == "kiva3")
|
if (versionName == "kiva3")
|
||||||
{
|
{
|
||||||
kivaVersion = kiva3;
|
kivaVersion = kiva3;
|
||||||
}
|
}
|
||||||
else if (kivaVersionName == "kiva3v")
|
else if (versionName == "kiva3v")
|
||||||
{
|
{
|
||||||
kivaVersion = kiva3v;
|
kivaVersion = kiva3v;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorIn("main(int argc, char *argv[])")
|
FatalErrorIn("main(int argc, char *argv[])")
|
||||||
<< "KIVA file version " << kivaVersionName << " not supported"
|
<< "KIVA file version " << versionName << " not supported"
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
|
||||||
args.printUsage();
|
args.printUsage();
|
||||||
|
|
||||||
FatalError.exit(1);
|
FatalError.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -315,7 +315,7 @@ for (label i=0; i<nPoints; i++)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tranfer liner faces that are above the minimum cylinder-head z height
|
// Transfer liner faces that are above the minimum cylinder-head z height
|
||||||
// into the cylinder-head region
|
// into the cylinder-head region
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
|
|||||||
@ -56,7 +56,11 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append(".msh file");
|
argList::validArgs.append(".msh file");
|
||||||
argList::addBoolOption("hex");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"hex",
|
||||||
|
"treat input as containing hex instead of tet cells"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -69,11 +73,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (readHex)
|
if (readHex)
|
||||||
{
|
{
|
||||||
Info<< "Trying to read " << nCells << " hexes." << endl << endl;
|
Info<< "Trying to read " << nCells << " hexes." << nl << endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< "Trying to read " << nCells << " tets." << endl << endl;
|
Info<< "Trying to read " << nCells << " tets." << nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
cellShapeList cells(nCells);
|
cellShapeList cells(nCells);
|
||||||
|
|||||||
@ -57,10 +57,28 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("PLOT3D geom file");
|
argList::validArgs.append("PLOT3D geom file");
|
||||||
argList::addOption("scale", "scale factor");
|
argList::addOption
|
||||||
argList::addBoolOption("noBlank");
|
(
|
||||||
argList::addBoolOption("singleBlock");
|
"scale",
|
||||||
argList::addOption("2D", "thickness");
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noBlank",
|
||||||
|
"skip blank items"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"singleBlock",
|
||||||
|
"input is a single block"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"2D",
|
||||||
|
"thickness",
|
||||||
|
"use when converting a 2-D geometry"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -69,8 +87,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleFactor = 1.0;
|
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||||
args.optionReadIfPresent("scale", scaleFactor);
|
|
||||||
|
|
||||||
bool readBlank = !args.optionFound("noBlank");
|
bool readBlank = !args.optionFound("noBlank");
|
||||||
bool singleBlock = args.optionFound("singleBlock");
|
bool singleBlock = args.optionFound("singleBlock");
|
||||||
|
|||||||
@ -356,7 +356,7 @@ int main(int argc, char *argv[])
|
|||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
timeSelector::addOptions(true, false);
|
timeSelector::addOptions(true, false);
|
||||||
|
|
||||||
argList::validArgs.append("feature angle[0-180]");
|
argList::validArgs.append("featureAngle [0-180]");
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"splitAllFaces",
|
"splitAllFaces",
|
||||||
|
|||||||
@ -40,7 +40,12 @@ 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::addOption("scale", "scale factor");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scale",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -49,7 +54,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,12 @@ 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::addOption("scale", "scale factor");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scale",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -49,7 +54,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
|||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"scale",
|
"scale",
|
||||||
"scale",
|
"factor",
|
||||||
"geometry scaling factor - default is 0.001 ([mm] to [m])"
|
"geometry scaling factor - default is 0.001 ([mm] to [m])"
|
||||||
);
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
|
|||||||
@ -97,7 +97,11 @@ 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::addBoolOption("noFaceFile");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noFaceFile",
|
||||||
|
"skip reading .face file for boundary information"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -371,27 +371,65 @@ void writePointCells
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
timeSelector::addOptions();
|
argList::addNote
|
||||||
argList::addBoolOption("patchFaces");
|
(
|
||||||
argList::addBoolOption("patchEdges");
|
"for mesh debugging: write mesh as separate OBJ files"
|
||||||
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"
|
timeSelector::addOptions();
|
||||||
# include "createTime.H"
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"patchFaces",
|
||||||
|
"write patch faces edges"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"patchEdges",
|
||||||
|
"write patch boundary edges"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"cell",
|
||||||
|
"int",
|
||||||
|
"write points for the specified cell"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"face",
|
||||||
|
"int",
|
||||||
|
"write specified face"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"point",
|
||||||
|
"int",
|
||||||
|
"write specified point"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"cellSet",
|
||||||
|
"name",
|
||||||
|
"write points for specified cellSet"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"faceSet",
|
||||||
|
"name",
|
||||||
|
"write points for specified faceSet"
|
||||||
|
);
|
||||||
|
#include "addRegionOption.H"
|
||||||
|
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
|
|
||||||
bool patchFaces = args.optionFound("patchFaces");
|
const bool patchFaces = args.optionFound("patchFaces");
|
||||||
bool patchEdges = args.optionFound("patchEdges");
|
const bool patchEdges = args.optionFound("patchEdges");
|
||||||
bool doCell = args.optionFound("cell");
|
const bool doCell = args.optionFound("cell");
|
||||||
bool doPoint = args.optionFound("point");
|
const bool doPoint = args.optionFound("point");
|
||||||
bool doFace = args.optionFound("face");
|
const bool doFace = args.optionFound("face");
|
||||||
bool doCellSet = args.optionFound("cellSet");
|
const bool doCellSet = args.optionFound("cellSet");
|
||||||
bool doFaceSet = args.optionFound("faceSet");
|
const bool doFaceSet = args.optionFound("faceSet");
|
||||||
|
|
||||||
|
|
||||||
Info<< "Writing mesh objects as .obj files such that the object"
|
Info<< "Writing mesh objects as .obj files such that the object"
|
||||||
@ -401,7 +439,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
# include "createNamedPolyMesh.H"
|
#include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
forAll(timeDirs, timeI)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
@ -465,7 +503,6 @@ int main(int argc, char *argv[])
|
|||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
writePoints(mesh, cells.toc(), runTime.timeName());
|
writePoints(mesh, cells.toc(), runTime.timeName());
|
||||||
|
|
||||||
}
|
}
|
||||||
if (doFaceSet)
|
if (doFaceSet)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,7 +42,7 @@ Usage
|
|||||||
Specify an alternative mesh region.
|
Specify an alternative mesh region.
|
||||||
|
|
||||||
@param -dict \<filename\> \n
|
@param -dict \<filename\> \n
|
||||||
Specify an alternative dictionary for the block mesh description.
|
Specify alternative dictionary for the block mesh description.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
"dict",
|
"dict",
|
||||||
"file",
|
"file",
|
||||||
"specify an alternative dictionary for the blockMesh description"
|
"specify alternative dictionary for the blockMesh description"
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
|||||||
@ -632,7 +632,7 @@ int main(int argc, char *argv[])
|
|||||||
argList::validArgs.append("thickness");
|
argList::validArgs.append("thickness");
|
||||||
|
|
||||||
#include "addRegionOption.H"
|
#include "addRegionOption.H"
|
||||||
argList::validOptions.insert("overwrite", "");
|
#include "addOverwriteOption.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createNamedMesh.H"
|
#include "createNamedMesh.H"
|
||||||
|
|||||||
@ -48,9 +48,21 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::addBoolOption("noTopology");
|
argList::addBoolOption
|
||||||
argList::addBoolOption("allGeometry");
|
(
|
||||||
argList::addBoolOption("allTopology");
|
"noTopology",
|
||||||
|
"skip checking the mesh topology"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"allGeometry",
|
||||||
|
"include bounding box checks"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"allTopology",
|
||||||
|
"include extra topology checks"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -124,18 +124,35 @@ label findPatchID(const polyMesh& mesh, const word& name)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addOverwriteOption.H"
|
argList::addNote
|
||||||
# include "addRegionOption.H"
|
(
|
||||||
|
"Makes internal faces into boundary faces.\n"
|
||||||
|
"Does not duplicate points, unlike mergeOrSplitBaffles."
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "addOverwriteOption.H"
|
||||||
|
#include "addRegionOption.H"
|
||||||
|
|
||||||
argList::validArgs.append("faceZone");
|
argList::validArgs.append("faceZone");
|
||||||
argList::validArgs.append("patch");
|
argList::validArgs.append("patch");
|
||||||
argList::addOption("additionalPatches", "(patch2 .. patchN)");
|
|
||||||
argList::addBoolOption("internalFacesOnly");
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
argList::addOption
|
||||||
# include "createTime.H"
|
(
|
||||||
|
"additionalPatches",
|
||||||
|
"(patch2 .. patchN)",
|
||||||
|
"specify additional patches for creating baffles"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"internalFacesOnly",
|
||||||
|
"do not convert boundary faces"
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
# include "createNamedMesh.H"
|
#include "createNamedMesh.H"
|
||||||
|
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|||||||
@ -1,15 +1,22 @@
|
|||||||
Info<< nl << "Create Times" << endl;
|
Info<< nl << "Create Times" << endl;
|
||||||
|
|
||||||
|
const fileName masterCasePath = masterCase.path();
|
||||||
|
const fileName masterCaseName = masterCase.name();
|
||||||
|
|
||||||
Time runTimeMaster
|
Time runTimeMaster
|
||||||
(
|
(
|
||||||
Time::controlDictName,
|
Time::controlDictName,
|
||||||
rootDirMaster,
|
masterCasePath,
|
||||||
caseDirMaster
|
masterCaseName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const fileName addCasePath = addCase.path();
|
||||||
|
const fileName addCaseName = addCase.name();
|
||||||
|
|
||||||
Time runTimeToAdd
|
Time runTimeToAdd
|
||||||
(
|
(
|
||||||
Time::controlDictName,
|
Time::controlDictName,
|
||||||
rootDirToAdd,
|
addCasePath,
|
||||||
caseDirToAdd
|
addCaseName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -32,16 +32,76 @@ Description
|
|||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
|
void getRootCase(fileName& casePath)
|
||||||
|
{
|
||||||
|
casePath.clean();
|
||||||
|
|
||||||
|
if (casePath.empty() || casePath == ".")
|
||||||
|
{
|
||||||
|
// handle degenerate form and '.'
|
||||||
|
casePath = cwd();
|
||||||
|
}
|
||||||
|
else if (casePath[0] != '/' && casePath.name() == "..")
|
||||||
|
{
|
||||||
|
// avoid relative cases ending in '..' - makes for very ugly names
|
||||||
|
casePath = cwd()/casePath;
|
||||||
|
casePath.clean();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
// Main program:
|
// Main program:
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::addNote
|
||||||
# include "setRoots.H"
|
(
|
||||||
# include "createTimes.H"
|
"merge two meshes"
|
||||||
|
);
|
||||||
|
|
||||||
Info<< "Reading master mesh for time = " << runTimeMaster.timeName() << endl;
|
argList::noParallel();
|
||||||
|
argList::validArgs.clear();
|
||||||
|
|
||||||
|
argList::validArgs.append("masterCase");
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"masterRegion",
|
||||||
|
"name",
|
||||||
|
"specify alternative mesh region for the master mesh"
|
||||||
|
);
|
||||||
|
|
||||||
|
argList::validArgs.append("addCase");
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"addRegion",
|
||||||
|
"name",
|
||||||
|
"specify alternative mesh region for the additional mesh"
|
||||||
|
);
|
||||||
|
|
||||||
|
argList args(argc, argv);
|
||||||
|
if (!args.check())
|
||||||
|
{
|
||||||
|
FatalError.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
fileName masterCase = args[1];
|
||||||
|
word masterRegion = polyMesh::defaultRegion;
|
||||||
|
args.optionReadIfPresent("masterRegion", masterRegion);
|
||||||
|
|
||||||
|
fileName addCase = args[2];
|
||||||
|
word addRegion = polyMesh::defaultRegion;
|
||||||
|
args.optionReadIfPresent("addRegion", addRegion);
|
||||||
|
|
||||||
|
getRootCase(masterCase);
|
||||||
|
getRootCase(addCase);
|
||||||
|
|
||||||
|
Info<< "Master: " << masterCase << " region " << masterRegion << nl
|
||||||
|
<< "mesh to add: " << addCase << " region " << addRegion << endl;
|
||||||
|
|
||||||
|
#include "createTimes.H"
|
||||||
|
|
||||||
|
Info<< "Reading master mesh for time = " << runTimeMaster.timeName() << nl;
|
||||||
|
|
||||||
Info<< "Create mesh\n" << endl;
|
Info<< "Create mesh\n" << endl;
|
||||||
mergePolyMesh masterMesh
|
mergePolyMesh masterMesh
|
||||||
@ -55,7 +115,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << endl;
|
Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << nl;
|
||||||
|
|
||||||
Info<< "Create mesh\n" << endl;
|
Info<< "Create mesh\n" << endl;
|
||||||
polyMesh meshToAdd
|
polyMesh meshToAdd
|
||||||
|
|||||||
@ -1,32 +0,0 @@
|
|||||||
argList::validArgs.clear();
|
|
||||||
|
|
||||||
argList::validArgs.append("master root");
|
|
||||||
argList::validArgs.append("master case");
|
|
||||||
argList::addOption("masterRegion", "name");
|
|
||||||
|
|
||||||
argList::validArgs.append("root to add");
|
|
||||||
argList::validArgs.append("case to add");
|
|
||||||
argList::addOption("addRegion", "name");
|
|
||||||
|
|
||||||
argList args(argc, argv);
|
|
||||||
|
|
||||||
if (!args.check())
|
|
||||||
{
|
|
||||||
FatalError.exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
fileName rootDirMaster = args[1];
|
|
||||||
fileName caseDirMaster = args[2];
|
|
||||||
word masterRegion = polyMesh::defaultRegion;
|
|
||||||
args.optionReadIfPresent("masterRegion", masterRegion);
|
|
||||||
|
|
||||||
fileName rootDirToAdd = args[3];
|
|
||||||
fileName caseDirToAdd = args[4];
|
|
||||||
word addRegion = polyMesh::defaultRegion;
|
|
||||||
args.optionReadIfPresent("addRegion", addRegion);
|
|
||||||
|
|
||||||
Info<< "Master: " << rootDirMaster << " " << caseDirMaster
|
|
||||||
<< " region " << masterRegion << nl
|
|
||||||
<< "mesh to add: " << rootDirToAdd << " " << caseDirToAdd
|
|
||||||
<< " region " << addRegion << endl;
|
|
||||||
|
|
||||||
@ -221,15 +221,30 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addOverwriteOption.H"
|
argList::addNote
|
||||||
# include "addRegionOption.H"
|
(
|
||||||
argList::addBoolOption("split");
|
"Detect faces that share points (baffles).\n"
|
||||||
argList::addBoolOption("detectOnly");
|
"Merge them or duplicate the points."
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "addOverwriteOption.H"
|
||||||
# include "createTime.H"
|
#include "addRegionOption.H"
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"detectOnly",
|
||||||
|
"find baffles only, but do not merge or split them"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"split",
|
||||||
|
"topologically split duplicate surfaces"
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
# include "createNamedMesh.H"
|
#include "createNamedMesh.H"
|
||||||
|
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
const bool split = args.optionFound("split");
|
const bool split = args.optionFound("split");
|
||||||
@ -248,12 +263,10 @@ int main(int argc, char *argv[])
|
|||||||
if (detectOnly)
|
if (detectOnly)
|
||||||
{
|
{
|
||||||
findBaffles(mesh, boundaryFaces);
|
findBaffles(mesh, boundaryFaces);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Read objects in time directory
|
// Read objects in time directory
|
||||||
IOobjectList objects(mesh, runTime.timeName());
|
IOobjectList objects(mesh, runTime.timeName());
|
||||||
|
|
||||||
|
|||||||
@ -290,18 +290,26 @@ label twoDNess(const polyMesh& mesh)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addOverwriteOption.H"
|
argList::addNote
|
||||||
argList::addBoolOption("dict");
|
(
|
||||||
|
"refine cells in multiple directions"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "addOverwriteOption.H"
|
||||||
# include "createTime.H"
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"dict",
|
||||||
|
"refine according to system/refineMeshDict"
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
# include "createPolyMesh.H"
|
#include "createPolyMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
printEdgeStats(mesh);
|
printEdgeStats(mesh);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Read/construct control dictionary
|
// Read/construct control dictionary
|
||||||
//
|
//
|
||||||
|
|||||||
@ -363,9 +363,21 @@ autoPtr<mapPolyMesh> reorderMesh
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::addBoolOption("blockOrder");
|
argList::addBoolOption
|
||||||
argList::addBoolOption("orderPoints");
|
(
|
||||||
argList::addBoolOption("writeMaps");
|
"blockOrder",
|
||||||
|
"order cells into regions (using decomposition)"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"orderPoints",
|
||||||
|
"order points into internal and boundary points"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"writeMaps",
|
||||||
|
"write cellMap, faceMap, pointMap in polyMesh/"
|
||||||
|
);
|
||||||
|
|
||||||
# include "addOverwriteOption.H"
|
# include "addOverwriteOption.H"
|
||||||
# include "addTimeOptions.H"
|
# include "addTimeOptions.H"
|
||||||
|
|||||||
@ -828,7 +828,12 @@ int main(int argc, char *argv[])
|
|||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::addBoolOption("noVTK", "do not write VTK files");
|
argList::addBoolOption("noVTK", "do not write VTK files");
|
||||||
argList::addBoolOption("loop", "execute batch commands for all timesteps");
|
argList::addBoolOption("loop", "execute batch commands for all timesteps");
|
||||||
argList::addOption("batch", "file");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"batch",
|
||||||
|
"file",
|
||||||
|
"process in batch mode, using input from specified file"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|||||||
@ -57,14 +57,23 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::addBoolOption("noFlipMap");
|
argList::addNote
|
||||||
|
(
|
||||||
|
"add point/face/cell Zones from similar named point/face/cell Sets"
|
||||||
|
);
|
||||||
|
|
||||||
# include "addRegionOption.H"
|
argList::addBoolOption
|
||||||
# include "addTimeOptions.H"
|
(
|
||||||
# include "setRootCase.H"
|
"noFlipMap",
|
||||||
# include "createTime.H"
|
"ignore orientation of faceSet"
|
||||||
|
);
|
||||||
|
|
||||||
bool noFlipMap = args.optionFound("noFlipMap");
|
#include "addRegionOption.H"
|
||||||
|
#include "addTimeOptions.H"
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
|
||||||
|
const bool noFlipMap = args.optionFound("noFlipMap");
|
||||||
|
|
||||||
// Get times list
|
// Get times list
|
||||||
instantList Times = runTime.times();
|
instantList Times = runTime.times();
|
||||||
@ -73,11 +82,11 @@ int main(int argc, char *argv[])
|
|||||||
label endTime = Times.size();
|
label endTime = Times.size();
|
||||||
|
|
||||||
// check -time and -latestTime options
|
// check -time and -latestTime options
|
||||||
# include "checkTimeOption.H"
|
#include "checkTimeOption.H"
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
runTime.setTime(Times[startTime], startTime);
|
||||||
|
|
||||||
# include "createNamedPolyMesh.H"
|
#include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
// Search for list of objects for the time of the mesh
|
// Search for list of objects for the time of the mesh
|
||||||
word setsInstance = runTime.findInstance
|
word setsInstance = runTime.findInstance
|
||||||
@ -153,9 +162,19 @@ int main(int argc, char *argv[])
|
|||||||
DynamicList<label> addressing(set.size());
|
DynamicList<label> addressing(set.size());
|
||||||
DynamicList<bool> flipMap(set.size());
|
DynamicList<bool> flipMap(set.size());
|
||||||
|
|
||||||
if (!noFlipMap)
|
if (noFlipMap)
|
||||||
{
|
{
|
||||||
word setName(set.name() + "SlaveCells");
|
// No flip map.
|
||||||
|
forAll(faceLabels, i)
|
||||||
|
{
|
||||||
|
label faceI = faceLabels[i];
|
||||||
|
addressing.append(faceI);
|
||||||
|
flipMap.append(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const word setName(set.name() + "SlaveCells");
|
||||||
|
|
||||||
Info<< "Trying to load cellSet " << setName
|
Info<< "Trying to load cellSet " << setName
|
||||||
<< " to find out the slave side of the zone." << nl
|
<< " to find out the slave side of the zone." << nl
|
||||||
@ -226,16 +245,6 @@ int main(int argc, char *argv[])
|
|||||||
flipMap.append(flip);
|
flipMap.append(flip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// No flip map.
|
|
||||||
forAll(faceLabels, i)
|
|
||||||
{
|
|
||||||
label faceI = faceLabels[i];
|
|
||||||
addressing.append(faceI);
|
|
||||||
flipMap.append(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
label zoneID = mesh.faceZones().findZoneID(set.name());
|
label zoneID = mesh.faceZones().findZoneID(set.name());
|
||||||
if (zoneID == -1)
|
if (zoneID == -1)
|
||||||
|
|||||||
@ -1473,26 +1473,64 @@ void writeCellToRegion(const fvMesh& mesh, const labelList& cellRegion)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Main program:
|
// Main program:
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addOverwriteOption.H"
|
argList::addNote
|
||||||
argList::addBoolOption("cellZones");
|
(
|
||||||
argList::addBoolOption("cellZonesOnly");
|
"splits mesh into multiple regions"
|
||||||
argList::addOption("cellZonesFileOnly", "cellZonesName");
|
);
|
||||||
argList::addOption("blockedFaces", "faceSet");
|
#include "addOverwriteOption.H"
|
||||||
argList::addBoolOption("makeCellZones");
|
argList::addBoolOption
|
||||||
argList::addBoolOption("largestOnly");
|
(
|
||||||
argList::addOption("insidePoint", "point");
|
"cellZones"
|
||||||
argList::addBoolOption("detectOnly");
|
);
|
||||||
argList::addBoolOption("sloppyCellZones");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"cellZonesOnly",
|
||||||
|
"use current cellZones to split mesh into regions"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"cellZonesFileOnly",
|
||||||
|
"file",
|
||||||
|
"like -cellZonesOnly, but use specified file"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"blockedFaces",
|
||||||
|
"faceSet"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"makeCellZones",
|
||||||
|
"place cells into cellZones instead of splitting mesh"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"largestOnly"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"insidePoint",
|
||||||
|
"point"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"detectOnly",
|
||||||
|
"do not write mesh"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"sloppyCellZones",
|
||||||
|
"try to match regions to existing cell zones"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
# include "createMesh.H"
|
#include "createMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
word blockedFacesName;
|
word blockedFacesName;
|
||||||
@ -1514,10 +1552,7 @@ int main(int argc, char *argv[])
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
(useCellZonesOnly || useCellZonesFile)
|
(useCellZonesOnly || useCellZonesFile)
|
||||||
&& (
|
&& (useCellZones || blockedFacesName.size())
|
||||||
blockedFacesName != word::null
|
|
||||||
|| useCellZones
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
@ -1529,7 +1564,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (insidePoint && largestOnly)
|
if (insidePoint && largestOnly)
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
@ -1719,7 +1753,6 @@ int main(int argc, char *argv[])
|
|||||||
writeCellToRegion(mesh, cellRegion);
|
writeCellToRegion(mesh, cellRegion);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Sizes per region
|
// Sizes per region
|
||||||
// ~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@ -40,6 +40,7 @@ Description
|
|||||||
Comparable to running a meshModifier of the form
|
Comparable to running a meshModifier of the form
|
||||||
(if masterPatch is called "M" and slavePatch "S"):
|
(if masterPatch is called "M" and slavePatch "S"):
|
||||||
|
|
||||||
|
@verbatim
|
||||||
couple
|
couple
|
||||||
{
|
{
|
||||||
type slidingInterface;
|
type slidingInterface;
|
||||||
@ -51,6 +52,7 @@ Description
|
|||||||
slavePatchName S;
|
slavePatchName S;
|
||||||
typeOfMatch partial or integral
|
typeOfMatch partial or integral
|
||||||
}
|
}
|
||||||
|
@endverbatim
|
||||||
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -192,22 +194,41 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"merge the faces on the specified patches (if geometrically possible)\n"
|
||||||
|
"so the faces become internal"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
# include "addOverwriteOption.H"
|
#include "addOverwriteOption.H"
|
||||||
# include "addRegionOption.H"
|
#include "addRegionOption.H"
|
||||||
|
|
||||||
argList::validArgs.append("masterPatch");
|
argList::validArgs.append("masterPatch");
|
||||||
argList::validArgs.append("slavePatch");
|
argList::validArgs.append("slavePatch");
|
||||||
|
|
||||||
argList::addBoolOption("partial");
|
argList::addBoolOption
|
||||||
argList::addBoolOption("perfect");
|
(
|
||||||
|
"partial",
|
||||||
|
"couple partially overlapping patches"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"perfect",
|
||||||
|
"couple perfectly aligned patches"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"toleranceDict",
|
||||||
|
"file",
|
||||||
|
"dictionary file with tolerances"
|
||||||
|
);
|
||||||
|
|
||||||
argList::addOption("toleranceDict", "file with tolerances");
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
# include "setRootCase.H"
|
|
||||||
# include "createTime.H"
|
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
# include "createNamedMesh.H"
|
#include "createNamedMesh.H"
|
||||||
|
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
const word masterPatchName = args[1];
|
const word masterPatchName = args[1];
|
||||||
@ -220,7 +241,7 @@ int main(int argc, char *argv[])
|
|||||||
if (partialCover && perfectCover)
|
if (partialCover && perfectCover)
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
<< "Cannot both supply partial and perfect." << endl
|
<< "Cannot supply both partial and perfect." << endl
|
||||||
<< "Use perfect match option if the patches perfectly align"
|
<< "Use perfect match option if the patches perfectly align"
|
||||||
<< " (both vertex positions and face centres)" << endl
|
<< " (both vertex positions and face centres)" << endl
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
|||||||
@ -150,14 +150,25 @@ void subsetPointFields
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addOverwriteOption.H"
|
argList::addNote
|
||||||
argList::validArgs.append("set");
|
(
|
||||||
argList::addOption("patch", "patch name");
|
"select a mesh subset based on a cellSet"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "addOverwriteOption.H"
|
||||||
# include "createTime.H"
|
argList::validArgs.append("cellSet");
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"patch",
|
||||||
|
"name",
|
||||||
|
"add exposed internal faces to specified patch instead of to "
|
||||||
|
"'oldInternalFaces'"
|
||||||
|
);
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
# include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
const word setName = args[1];
|
const word setName = args[1];
|
||||||
@ -190,7 +201,7 @@ int main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< "Adding exposed internal faces to a patch called"
|
Info<< "Adding exposed internal faces to a patch called"
|
||||||
<< " \"oldInternalFaces\" (created if nessecary)" << endl
|
<< " \"oldInternalFaces\" (created if necessary)" << endl
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -158,13 +158,13 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
"rollPitchYaw",
|
"rollPitchYaw",
|
||||||
"vector",
|
"vector",
|
||||||
"transform in terms of '( roll pitch yaw )' in degrees"
|
"transform in terms of '(roll pitch yaw)' in degrees"
|
||||||
);
|
);
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"yawPitchRoll",
|
"yawPitchRoll",
|
||||||
"vector",
|
"vector",
|
||||||
"transform in terms of '( yaw pitch roll )' in degrees"
|
"transform in terms of '(yaw pitch roll)' in degrees"
|
||||||
);
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
|
|||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Interrogates a case and prints information to screen
|
Interrogates a case and prints information to stdout
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -38,15 +38,33 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"interrogates a case and prints information to stdout"
|
||||||
|
);
|
||||||
|
|
||||||
|
argList::noBanner();
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addBoolOption("times");
|
argList::addBoolOption("times", "list available times");
|
||||||
argList::addOption("dictionary", "dictionary name");
|
argList::addBoolOption
|
||||||
argList::addBoolOption("keywords");
|
(
|
||||||
argList::addOption("entry", "entry name");
|
"keywords",
|
||||||
|
"report keywords for the specified dictionary"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"dict",
|
||||||
|
"file",
|
||||||
|
"specify a dictionary to interrogate"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"entry",
|
||||||
|
"name",
|
||||||
|
"report the named entry for the specified dictionary"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
|
|
||||||
Info<< endl;
|
|
||||||
|
|
||||||
if (args.optionFound("times"))
|
if (args.optionFound("times"))
|
||||||
{
|
{
|
||||||
@ -61,11 +79,11 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.optionFound("dictionary"))
|
if (args.optionFound("dict"))
|
||||||
{
|
{
|
||||||
fileName dictFileName
|
const fileName dictFileName
|
||||||
(
|
(
|
||||||
args.rootPath()/args.caseName()/args["dictionary"]
|
args.rootPath()/args.caseName()/args["dict"]
|
||||||
);
|
);
|
||||||
|
|
||||||
IFstream dictFile(dictFileName);
|
IFstream dictFile(dictFileName);
|
||||||
@ -74,14 +92,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
dictionary dict(dictFile);
|
dictionary dict(dictFile);
|
||||||
|
|
||||||
if (args.optionFound("keywords") && !args.optionFound("entry"))
|
if (args.optionFound("entry"))
|
||||||
{
|
|
||||||
forAllConstIter(dictionary, dict, iter)
|
|
||||||
{
|
|
||||||
Info<< iter().keyword() << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (args.optionFound("entry"))
|
|
||||||
{
|
{
|
||||||
wordList entryNames
|
wordList entryNames
|
||||||
(
|
(
|
||||||
@ -152,6 +163,13 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit(2);
|
FatalError.exit(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (args.optionFound("keywords"))
|
||||||
|
{
|
||||||
|
forAllConstIter(dictionary, dict, iter)
|
||||||
|
{
|
||||||
|
Info<< iter().keyword() << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< dict;
|
Info<< dict;
|
||||||
|
|||||||
@ -81,8 +81,13 @@ Usage
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"decompose a mesh and fields of a case for parallel execution"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
# include "addRegionOption.H"
|
#include "addRegionOption.H"
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"cellDist",
|
"cellDist",
|
||||||
@ -110,12 +115,7 @@ int main(int argc, char *argv[])
|
|||||||
"only decompose geometry if the number of domains has changed"
|
"only decompose geometry if the number of domains has changed"
|
||||||
);
|
);
|
||||||
|
|
||||||
argList::addNote
|
#include "setRootCase.H"
|
||||||
(
|
|
||||||
"decompose a mesh and fields of a case for parallel execution"
|
|
||||||
);
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
|
||||||
|
|
||||||
word regionName = fvMesh::defaultRegion;
|
word regionName = fvMesh::defaultRegion;
|
||||||
word regionDir = word::null;
|
word regionDir = word::null;
|
||||||
@ -132,7 +132,7 @@ int main(int argc, char *argv[])
|
|||||||
bool forceOverwrite = args.optionFound("force");
|
bool forceOverwrite = args.optionFound("force");
|
||||||
bool ifRequiredDecomposition = args.optionFound("ifRequired");
|
bool ifRequiredDecomposition = args.optionFound("ifRequired");
|
||||||
|
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -279,6 +279,11 @@ autoPtr<mapPolyMesh> mergeSharedPoints
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"reconstruct a mesh using geometric information only"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
@ -293,15 +298,10 @@ int main(int argc, char *argv[])
|
|||||||
"do (slower) geometric matching on all boundary faces"
|
"do (slower) geometric matching on all boundary faces"
|
||||||
);
|
);
|
||||||
|
|
||||||
argList::addNote
|
#include "addTimeOptions.H"
|
||||||
(
|
#include "addRegionOption.H"
|
||||||
"reconstruct a mesh using geometric information only"
|
#include "setRootCase.H"
|
||||||
);
|
#include "createTime.H"
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "addRegionOption.H"
|
|
||||||
# include "setRootCase.H"
|
|
||||||
# include "createTime.H"
|
|
||||||
|
|
||||||
Info<< "This is an experimental tool which tries to merge"
|
Info<< "This is an experimental tool which tries to merge"
|
||||||
<< " individual processor" << nl
|
<< " individual processor" << nl
|
||||||
|
|||||||
@ -503,7 +503,13 @@ void compareFields
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::addOption("mergeTol", "relative merge distance");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"mergeTol",
|
||||||
|
"scalar",
|
||||||
|
"specify the merge distance relative to the bounding box size "
|
||||||
|
"(default 1E-6)"
|
||||||
|
);
|
||||||
// Create argList. This will check for non-existing processor dirs.
|
// Create argList. This will check for non-existing processor dirs.
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
|
|||||||
@ -176,7 +176,11 @@ static void writeFaceData
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addBoolOption("noWall");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noWall",
|
||||||
|
"skip setting wall information"
|
||||||
|
);
|
||||||
timeSelector::addOptions(true, false);
|
timeSelector::addOptions(true, false);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Usage
|
|||||||
|
|
||||||
- foamToTecplot360 [OPTION]
|
- foamToTecplot360 [OPTION]
|
||||||
|
|
||||||
@param -fields \<fields\>\n
|
@param -fields \<names\>\n
|
||||||
Convert selected fields only. For example,
|
Convert selected fields only. For example,
|
||||||
@verbatim
|
@verbatim
|
||||||
-fields '( p T U )'
|
-fields '( p T U )'
|
||||||
@ -163,30 +163,65 @@ labelList getSelectedPatches
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Tecplot binary file format writer"
|
||||||
|
);
|
||||||
|
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
|
#include "addRegionOption.H"
|
||||||
|
|
||||||
# include "addRegionOption.H"
|
argList::addOption
|
||||||
|
(
|
||||||
argList::addOption("fields", "fields");
|
"fields",
|
||||||
argList::addOption("cellSet", "cellSet name");
|
"names",
|
||||||
argList::addOption("faceSet", "faceSet name");
|
"convert selected fields only. eg, '(p T U)'"
|
||||||
argList::addBoolOption("nearCellValue");
|
);
|
||||||
argList::addBoolOption("noInternal");
|
argList::addOption
|
||||||
argList::addBoolOption("noPointValues");
|
(
|
||||||
|
"cellSet",
|
||||||
|
"name",
|
||||||
|
"restrict conversion to the specified cellSet"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"faceSet",
|
||||||
|
"name",
|
||||||
|
"restrict conversion to the specified cellSet"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"nearCellValue",
|
||||||
|
"output cell value on patches instead of patch value itself"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noInternal",
|
||||||
|
"do not generate file for mesh, only for patches"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noPointValues",
|
||||||
|
"no pointFields"
|
||||||
|
);
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"excludePatches",
|
"excludePatches",
|
||||||
"patches (wildcards) to exclude"
|
"patches (wildcards) to exclude"
|
||||||
);
|
);
|
||||||
argList::addBoolOption("noFaceZones");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noFaceZones",
|
||||||
|
"no faceZones"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
bool doWriteInternal = !args.optionFound("noInternal");
|
const bool doWriteInternal = !args.optionFound("noInternal");
|
||||||
bool doFaceZones = !args.optionFound("noFaceZones");
|
const bool doFaceZones = !args.optionFound("noFaceZones");
|
||||||
|
const bool nearCellValue = args.optionFound("nearCellValue");
|
||||||
bool nearCellValue = args.optionFound("nearCellValue");
|
const bool noPointValues = args.optionFound("noPointValues");
|
||||||
|
|
||||||
if (nearCellValue)
|
if (nearCellValue)
|
||||||
{
|
{
|
||||||
@ -195,8 +230,6 @@ int main(int argc, char *argv[])
|
|||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool noPointValues = args.optionFound("noPointValues");
|
|
||||||
|
|
||||||
if (noPointValues)
|
if (noPointValues)
|
||||||
{
|
{
|
||||||
WarningIn(args.executable())
|
WarningIn(args.executable())
|
||||||
|
|||||||
@ -226,13 +226,17 @@ labelList getSelectedPatches
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"legacy VTK file format writer"
|
||||||
|
);
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addRegionOption.H"
|
#include "addRegionOption.H"
|
||||||
|
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"fields", "wordList",
|
"fields",
|
||||||
|
"wordList",
|
||||||
"only convert the specified fields - eg '(p T U)'"
|
"only convert the specified fields - eg '(p T U)'"
|
||||||
);
|
);
|
||||||
argList::addOption
|
argList::addOption
|
||||||
@ -241,25 +245,59 @@ int main(int argc, char *argv[])
|
|||||||
"name",
|
"name",
|
||||||
"convert a mesh subset corresponding to the specified cellSet"
|
"convert a mesh subset corresponding to the specified cellSet"
|
||||||
);
|
);
|
||||||
argList::addOption("faceSet", "name");
|
argList::addOption
|
||||||
argList::addOption("pointSet", "name");
|
(
|
||||||
|
"faceSet",
|
||||||
|
"name",
|
||||||
|
"restrict conversion to the specified faceSet"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"pointSet",
|
||||||
|
"name",
|
||||||
|
"restrict conversion to the specified pointSet"
|
||||||
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"ascii",
|
"ascii",
|
||||||
"write in ASCII format instead of binary"
|
"write in ASCII format instead of binary"
|
||||||
);
|
);
|
||||||
argList::addBoolOption("surfaceFields");
|
argList::addBoolOption
|
||||||
argList::addBoolOption("nearCellValue");
|
(
|
||||||
argList::addBoolOption("noInternal");
|
"surfaceFields",
|
||||||
argList::addBoolOption("noPointValues");
|
"write surfaceScalarFields (e.g., phi)"
|
||||||
argList::addBoolOption("allPatches");
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"nearCellValue",
|
||||||
|
"use cell value on patches instead of patch value itself"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noInternal",
|
||||||
|
"do not generate file for mesh, only for patches"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noPointValues",
|
||||||
|
"no pointFields"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"allPatches",
|
||||||
|
"combine all patches into a single file"
|
||||||
|
);
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"excludePatches",
|
"excludePatches",
|
||||||
"wordReList",
|
"wordReList",
|
||||||
"a list of patches to exclude - eg '( inlet \".*Wall\" )' "
|
"a list of patches to exclude - eg '( inlet \".*Wall\" )' "
|
||||||
);
|
);
|
||||||
argList::addBoolOption("noFaceZones");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noFaceZones",
|
||||||
|
"no faceZones"
|
||||||
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"noLinks",
|
"noLinks",
|
||||||
@ -271,8 +309,8 @@ int main(int argc, char *argv[])
|
|||||||
"use the time name instead of the time index when naming the files"
|
"use the time name instead of the time index when naming the files"
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
const bool doWriteInternal = !args.optionFound("noInternal");
|
const bool doWriteInternal = !args.optionFound("noInternal");
|
||||||
const bool doFaceZones = !args.optionFound("noFaceZones");
|
const bool doFaceZones = !args.optionFound("noFaceZones");
|
||||||
|
|||||||
@ -51,7 +51,8 @@ int main(int argc, char *argv[])
|
|||||||
Foam::argList::addOption
|
Foam::argList::addOption
|
||||||
(
|
(
|
||||||
"dict",
|
"dict",
|
||||||
"dictionary name"
|
"name",
|
||||||
|
"dictionary to use"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
@ -61,7 +62,7 @@ int main(int argc, char *argv[])
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
word utilityName = argv[1];
|
const word utilityName = argv[1];
|
||||||
|
|
||||||
Foam::autoPtr<Foam::calcType> utility
|
Foam::autoPtr<Foam::calcType> utility
|
||||||
(
|
(
|
||||||
|
|||||||
@ -9,7 +9,7 @@ IOdictionary propsDict
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
word cloudName(propsDict.lookup("cloudName"));
|
const word cloudName(propsDict.lookup("cloudName"));
|
||||||
|
|
||||||
label sampleFrequency(readLabel(propsDict.lookup("sampleFrequency")));
|
label sampleFrequency(readLabel(propsDict.lookup("sampleFrequency")));
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ Usage
|
|||||||
- foamListTimes [OPTION]
|
- foamListTimes [OPTION]
|
||||||
|
|
||||||
@param -processor \n
|
@param -processor \n
|
||||||
List times from processor0 directory
|
List times from processor0/ directory
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -46,11 +46,19 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"list times using timeSelector"
|
||||||
|
);
|
||||||
|
|
||||||
timeSelector::addOptions(); // -constant enabled
|
timeSelector::addOptions(); // -constant enabled
|
||||||
argList::noBanner();
|
argList::noBanner();
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addBoolOption("processor");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"processor",
|
||||||
|
"list times from processor0/ directory"
|
||||||
|
);
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
label nProcs = 0;
|
label nProcs = 0;
|
||||||
|
|||||||
@ -28,8 +28,8 @@ Description
|
|||||||
Calculates and reports yPlus for all wall patches, for the specified times
|
Calculates and reports yPlus for all wall patches, for the specified times
|
||||||
when using RAS turbulence models.
|
when using RAS turbulence models.
|
||||||
|
|
||||||
Default behaviour assumes operating in incompressible mode. To apply to
|
Default behaviour assumes operating in incompressible mode.
|
||||||
compressible RAS cases, use the -compressible option.
|
Use the -compressible option for compressible RAS cases.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -185,14 +185,18 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "addRegionOption.H"
|
#include "addRegionOption.H"
|
||||||
|
|
||||||
argList::addBoolOption("compressible");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"compressible",
|
||||||
|
"calculate compressible y+"
|
||||||
|
);
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
#include "createNamedMesh.H"
|
#include "createNamedMesh.H"
|
||||||
|
|
||||||
bool compressible = args.optionFound("compressible");
|
const bool compressible = args.optionFound("compressible");
|
||||||
|
|
||||||
forAll(timeDirs, timeI)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
@ -205,8 +209,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Calculating wall distance\n" << endl;
|
Info<< "Calculating wall distance\n" << endl;
|
||||||
wallDist y(mesh, true);
|
wallDist y(mesh, true);
|
||||||
Info<< "Writing wall distance to field "
|
Info<< "Writing wall distance to field " << y.name() << nl << endl;
|
||||||
<< y.name() << nl << endl;
|
|
||||||
y.write();
|
y.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,9 +49,28 @@ static const scalar kappa(0.41);
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::addOption("ybl", "scalar");
|
argList::addNote
|
||||||
argList::addOption("Cbl", "scalar");
|
(
|
||||||
argList::addBoolOption("writenut");
|
"apply a simplified boundary-layer model to the velocity and\n"
|
||||||
|
"turbulence fields based on the 1/7th power-law."
|
||||||
|
);
|
||||||
|
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"ybl",
|
||||||
|
"scalar",
|
||||||
|
"specify the boundary-layer thickness"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"Cbl", "scalar",
|
||||||
|
"boundary-layer thickness as Cbl * mean distance to wall"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"writenut",
|
||||||
|
"write nut field"
|
||||||
|
);
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|||||||
@ -60,7 +60,7 @@ License
|
|||||||
else if (args.optionFound("Cbl"))
|
else if (args.optionFound("Cbl"))
|
||||||
{
|
{
|
||||||
// Calculate boundary layer thickness as Cbl * mean distance to wall
|
// Calculate boundary layer thickness as Cbl * mean distance to wall
|
||||||
ybl.value() = gAverage(y)*args.optionRead<scalar>("Cbl");
|
ybl.value() = gAverage(y) * args.optionRead<scalar>("Cbl");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -333,13 +333,17 @@ void updateIncompressibleCase(const fvMesh& mesh)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "addTimeOptions.H"
|
#include "addTimeOptions.H"
|
||||||
argList::addBoolOption("compressible");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"compressible",
|
||||||
|
"force use of compressible wall functions. default is auto-detect."
|
||||||
|
);
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
bool compressible = args.optionFound("compressible");
|
const bool compressible = args.optionFound("compressible");
|
||||||
|
|
||||||
Info<< "Updating turbulence fields to operate using new run time "
|
Info<< "Updating turbulence fields to operate using new run time "
|
||||||
<< "selectable" << nl << "wall functions"
|
<< "selectable" << nl << "wall functions"
|
||||||
|
|||||||
@ -244,15 +244,24 @@ bool merge
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::addOption("instance", "instance");
|
argList::addOption
|
||||||
argList::addBoolOption("literalRE");
|
(
|
||||||
|
"instance",
|
||||||
|
"name",
|
||||||
|
"specify alternate time instance - default is latest time"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"literalRE",
|
||||||
|
"treat regular expressions literally (ie, as a keyword)"
|
||||||
|
);
|
||||||
#include "addRegionOption.H"
|
#include "addRegionOption.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createNamedMesh.H"
|
#include "createNamedMesh.H"
|
||||||
|
|
||||||
bool literalRE = args.optionFound("literalRE");
|
const bool literalRE = args.optionFound("literalRE");
|
||||||
|
|
||||||
if (literalRE)
|
if (literalRE)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -48,8 +48,17 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"upgrade the syntax of system/fvSolution::solvers"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addBoolOption("test");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"test",
|
||||||
|
"suppress writing the updated system/fvSolution file"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -89,7 +98,6 @@ int main(int argc, char *argv[])
|
|||||||
<< (solutionDict.objectPath() + ".old") << nl;
|
<< (solutionDict.objectPath() + ".old") << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
solutionDict.writeObject
|
solutionDict.writeObject
|
||||||
(
|
(
|
||||||
IOstream::ASCII,
|
IOstream::ASCII,
|
||||||
|
|||||||
@ -227,7 +227,53 @@ wordList addProcessorPatches
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "setRoots.H"
|
argList::addNote
|
||||||
|
(
|
||||||
|
"map volume fields from one mesh to another"
|
||||||
|
);
|
||||||
|
argList::noParallel();
|
||||||
|
argList::validArgs.clear();
|
||||||
|
argList::validArgs.append("sourceCase");
|
||||||
|
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"sourceTime",
|
||||||
|
"scalar",
|
||||||
|
"specify the source time"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"parallelSource",
|
||||||
|
"the source is decomposed"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"parallelTarget",
|
||||||
|
"the target is decomposed"
|
||||||
|
);
|
||||||
|
argList::addBoolOption("consistent");
|
||||||
|
|
||||||
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
if (!args.check())
|
||||||
|
{
|
||||||
|
FatalError.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
fileName rootDirTarget(args.rootPath());
|
||||||
|
fileName caseDirTarget(args.globalCaseName());
|
||||||
|
|
||||||
|
const fileName casePath = args[1];
|
||||||
|
const fileName rootDirSource = casePath.path();
|
||||||
|
const fileName caseDirSource = casePath.name();
|
||||||
|
|
||||||
|
Info<< "Source: " << rootDirSource << " " << caseDirSource << nl
|
||||||
|
<< "Target: " << rootDirTarget << " " << caseDirTarget << endl;
|
||||||
|
|
||||||
|
const bool parallelSource = args.optionFound("parallelSource");
|
||||||
|
const bool parallelTarget = args.optionFound("parallelTarget");
|
||||||
|
const bool consistent = args.optionFound("consistent");
|
||||||
|
|
||||||
#include "createTimes.H"
|
#include "createTimes.H"
|
||||||
|
|
||||||
HashTable<word> patchMap;
|
HashTable<word> patchMap;
|
||||||
@ -249,7 +295,6 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
mapFieldsDict.lookup("patchMap") >> patchMap;
|
mapFieldsDict.lookup("patchMap") >> patchMap;
|
||||||
|
|
||||||
mapFieldsDict.lookup("cuttingPatches") >> cuttingPatches;
|
mapFieldsDict.lookup("cuttingPatches") >> cuttingPatches;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,30 +0,0 @@
|
|||||||
argList::noParallel();
|
|
||||||
argList::validArgs.clear();
|
|
||||||
argList::validArgs.append("source dir");
|
|
||||||
|
|
||||||
argList::addOption("sourceTime", "scalar");
|
|
||||||
argList::addBoolOption("parallelSource");
|
|
||||||
argList::addBoolOption("parallelTarget");
|
|
||||||
argList::addBoolOption("consistent");
|
|
||||||
|
|
||||||
argList args(argc, argv);
|
|
||||||
|
|
||||||
if (!args.check())
|
|
||||||
{
|
|
||||||
FatalError.exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
fileName rootDirTarget(args.rootPath());
|
|
||||||
fileName caseDirTarget(args.globalCaseName());
|
|
||||||
|
|
||||||
const fileName casePath = args[1];
|
|
||||||
const fileName rootDirSource = casePath.path();
|
|
||||||
const fileName caseDirSource = casePath.name();
|
|
||||||
|
|
||||||
Info<< "Source: " << rootDirSource << " " << caseDirSource << nl
|
|
||||||
<< "Target: " << rootDirTarget << " " << caseDirTarget << endl;
|
|
||||||
|
|
||||||
const bool parallelSource = args.optionFound("parallelSource");
|
|
||||||
const bool parallelTarget = args.optionFound("parallelTarget");
|
|
||||||
const bool consistent = args.optionFound("consistent");
|
|
||||||
|
|
||||||
@ -45,14 +45,28 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"add two surfaces via a geometric merge on points."
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("Foam surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("Foam surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("Foam output file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
|
|
||||||
argList::addOption("points", "pointsFile");
|
argList::addOption
|
||||||
argList::addBoolOption("mergeRegions");
|
(
|
||||||
|
"points",
|
||||||
|
"file",
|
||||||
|
"provide additional points"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"mergeRegions",
|
||||||
|
"combine regions from both surfaces"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@ -47,17 +47,16 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("input surface file");
|
argList::validArgs.append("input surfaceFile");
|
||||||
argList::validArgs.append("output surface file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList::validArgs.append("included angle [0..180]");
|
argList::validArgs.append("includedAngle [0..180]");
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
const fileName inFileName = args[1];
|
const fileName inFileName = args[1];
|
||||||
const fileName outFileName = args[2];
|
const fileName outFileName = args[2];
|
||||||
const scalar includedAngle = args.argRead<scalar>(3);
|
const scalar includedAngle = args.argRead<scalar>(3);
|
||||||
|
|
||||||
Info<< "Surface : " << inFileName << nl
|
Info<< "Surface : " << inFileName << nl << endl;
|
||||||
<< endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Read
|
// Read
|
||||||
|
|||||||
@ -175,10 +175,18 @@ int main(int argc, char *argv[])
|
|||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
|
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
|
|
||||||
argList::addBoolOption("checkSelfIntersection");
|
argList::addBoolOption
|
||||||
argList::addBoolOption("verbose");
|
(
|
||||||
|
"checkSelfIntersection",
|
||||||
|
"also check for self-intersection"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"verbose",
|
||||||
|
"verbose operation"
|
||||||
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"blockMesh",
|
"blockMesh",
|
||||||
@ -224,8 +232,8 @@ int main(int argc, char *argv[])
|
|||||||
<<" hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)\n"
|
<<" hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)\n"
|
||||||
<<");\n" << nl;
|
<<");\n" << nl;
|
||||||
|
|
||||||
Info<<"edges();" << nl
|
Info<<"edges\n();" << nl
|
||||||
<<"patches();" << endl;
|
<<"patches\n();" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -48,9 +48,9 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("min length");
|
argList::validArgs.append("min length");
|
||||||
argList::validArgs.append("output surface file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
const fileName inFileName = args[1];
|
const fileName inFileName = args[1];
|
||||||
|
|||||||
@ -65,9 +65,9 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("Foam surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("reduction factor");
|
argList::validArgs.append("reductionFactor");
|
||||||
argList::validArgs.append("Foam output file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
const fileName inFileName = args[1];
|
const fileName inFileName = args[1];
|
||||||
|
|||||||
@ -58,14 +58,32 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"convert between surface formats"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("inputFile");
|
argList::validArgs.append("inputFile");
|
||||||
argList::validArgs.append("outputFile");
|
argList::validArgs.append("outputFile");
|
||||||
|
|
||||||
argList::addBoolOption("clean");
|
argList::addBoolOption
|
||||||
argList::addBoolOption("group");
|
(
|
||||||
argList::addOption("scale", "scale");
|
"clean",
|
||||||
|
"perform some surface checking/cleanup on the input surface"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"group",
|
||||||
|
"reorder faces into groups; one per region"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scale",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -96,8 +114,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< endl;
|
Info<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sortByRegion = args.optionFound("group");
|
const bool sortByRegion = args.optionFound("group");
|
||||||
|
|
||||||
if (sortByRegion)
|
if (sortByRegion)
|
||||||
{
|
{
|
||||||
Info<< "Reordering faces into groups; one per region." << endl;
|
Info<< "Reordering faces into groups; one per region." << endl;
|
||||||
|
|||||||
@ -53,7 +53,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
"scale",
|
"scale",
|
||||||
"factor",
|
"factor",
|
||||||
"specify a scaling factor for the points"
|
"geometry scaling factor - default is 1"
|
||||||
);
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|||||||
@ -90,19 +90,53 @@ void deleteBox
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"extract and write surface features to file"
|
||||||
|
);
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
|
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("surface");
|
argList::validArgs.append("surface");
|
||||||
argList::validArgs.append("output set");
|
argList::validArgs.append("output set");
|
||||||
|
|
||||||
argList::addOption("includedAngle", "included angle [0..180]");
|
argList::addOption
|
||||||
argList::addOption("set", "input feature set");
|
(
|
||||||
|
"includedAngle",
|
||||||
|
"degrees",
|
||||||
|
"construct feature set from included angle [0..180]"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"set",
|
||||||
|
"name",
|
||||||
|
"use existing feature set from file"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"minLen",
|
||||||
|
"scalar",
|
||||||
|
"remove features shorter than the specified cumulative length"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"minElem",
|
||||||
|
"int",
|
||||||
|
"remove features with fewer than the specified number of edges"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"subsetBox",
|
||||||
|
"((x0 y0 z0)(x1 y1 z1))",
|
||||||
|
"remove edges outside specified bounding box"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"deleteBox",
|
||||||
|
"((x0 y0 z0)(x1 y1 z1))",
|
||||||
|
"remove edges within specified bounding box"
|
||||||
|
);
|
||||||
|
|
||||||
argList::addOption("minLen", "cumulative length of feature");
|
|
||||||
argList::addOption("minElem", "number of edges in feature");
|
|
||||||
argList::addOption("subsetBox", "((x0 y0 z0)(x1 y1 z1))");
|
|
||||||
argList::addOption("deleteBox", "((x0 y0 z0)(x1 y1 z1))");
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
Info<< "Feature line extraction is only valid on closed manifold surfaces."
|
Info<< "Feature line extraction is only valid on closed manifold surfaces."
|
||||||
@ -143,7 +177,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else if (args.optionFound("includedAngle"))
|
else if (args.optionFound("includedAngle"))
|
||||||
{
|
{
|
||||||
scalar includedAngle = args.optionRead<scalar>("includedAngle");
|
const scalar includedAngle = args.optionRead<scalar>("includedAngle");
|
||||||
|
|
||||||
Info<< "Constructing feature set from included angle " << includedAngle
|
Info<< "Constructing feature set from included angle " << includedAngle
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -175,8 +209,6 @@ int main(int argc, char *argv[])
|
|||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Trim set
|
// Trim set
|
||||||
// ~~~~~~~~
|
// ~~~~~~~~
|
||||||
|
|
||||||
@ -200,7 +232,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Subset
|
// Subset
|
||||||
// ~~~~~~
|
// ~~~~~~
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ int main(int argc, char *argv[])
|
|||||||
argList::addOption("y", "Y", "The point y-coordinate (if non-zero)");
|
argList::addOption("y", "Y", "The point y-coordinate (if non-zero)");
|
||||||
argList::addOption("z", "Z", "The point y-coordinate (if non-zero)");
|
argList::addOption("z", "Z", "The point y-coordinate (if non-zero)");
|
||||||
|
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@ -289,8 +289,12 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::addBoolOption("shellProperties");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"shellProperties",
|
||||||
|
"inertia of a thin shell"
|
||||||
|
);
|
||||||
|
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
|
|||||||
@ -71,6 +71,11 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"convert between surface formats"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("inputFile");
|
argList::validArgs.append("inputFile");
|
||||||
argList::validArgs.append("outputFile");
|
argList::validArgs.append("outputFile");
|
||||||
@ -83,14 +88,14 @@ int main(int argc, char *argv[])
|
|||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"scaleIn",
|
"scaleIn",
|
||||||
"scale",
|
"factor",
|
||||||
"specify input geometry scaling factor"
|
"geometry scaling factor on input"
|
||||||
);
|
);
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"scaleOut",
|
"scaleOut",
|
||||||
"scale",
|
"factor",
|
||||||
"specify output geometry scaling factor"
|
"geometry scaling factor on output"
|
||||||
);
|
);
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
|
|||||||
@ -71,6 +71,13 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"convert between surface formats, "
|
||||||
|
"but primarily for testing functionality\n"
|
||||||
|
"Normally use surfaceMeshConvert instead."
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("inputFile");
|
argList::validArgs.append("inputFile");
|
||||||
argList::validArgs.append("outputFile");
|
argList::validArgs.append("outputFile");
|
||||||
@ -82,7 +89,12 @@ int main(int argc, char *argv[])
|
|||||||
argList::addBoolOption("unsorted");
|
argList::addBoolOption("unsorted");
|
||||||
argList::addBoolOption("triFace");
|
argList::addBoolOption("triFace");
|
||||||
|
|
||||||
argList::addOption("scale", "scale");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scale",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor - default is 1"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
|
|||||||
@ -48,10 +48,10 @@ Usage
|
|||||||
Specify an alternative dictionary for constant/coordinateSystems.
|
Specify an alternative dictionary for constant/coordinateSystems.
|
||||||
|
|
||||||
@param -from \<coordinateSystem\> \n
|
@param -from \<coordinateSystem\> \n
|
||||||
Specify a coordinate System when reading files.
|
Specify a coordinate system when reading files.
|
||||||
|
|
||||||
@param -to \<coordinateSystem\> \n
|
@param -to \<coordinateSystem\> \n
|
||||||
Specify a coordinate System when writing files.
|
Specify a coordinate system when writing files.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
The filename extensions are used to determine the file format type.
|
The filename extensions are used to determine the file format type.
|
||||||
@ -72,17 +72,56 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"export from surfMesh to various third-party surface formats"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("outputFile");
|
argList::validArgs.append("outputFile");
|
||||||
|
|
||||||
argList::addBoolOption("clean");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
argList::addOption("name", "name");
|
"clean",
|
||||||
argList::addOption("scaleIn", "scale");
|
"perform some surface checking/cleanup on the input surface"
|
||||||
argList::addOption("scaleOut", "scale");
|
);
|
||||||
argList::addOption("dict", "coordinateSystemsDict");
|
argList::addOption
|
||||||
argList::addOption("from", "sourceCoordinateSystem");
|
(
|
||||||
argList::addOption("to", "targetCoordinateSystem");
|
"name",
|
||||||
|
"name",
|
||||||
|
"specify an alternative surface name when reading - "
|
||||||
|
"default is 'default'"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scaleIn",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor on input - default is 1"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scaleOut",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor on output - default is 1"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"dict",
|
||||||
|
"file",
|
||||||
|
"specify an alternative dictionary for constant/coordinateSystems"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"from",
|
||||||
|
"coordinateSystem",
|
||||||
|
"specify the source coordinate system, applied after '-scaleIn'"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"to",
|
||||||
|
"coordinateSystem",
|
||||||
|
"specify the target coordinate system, applied before '-scaleOut'"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
Time runTime(args.rootPath(), args.caseName());
|
Time runTime(args.rootPath(), args.caseName());
|
||||||
|
|||||||
@ -48,10 +48,10 @@ Usage
|
|||||||
Specify an alternative dictionary for constant/coordinateSystems.
|
Specify an alternative dictionary for constant/coordinateSystems.
|
||||||
|
|
||||||
@param -from \<coordinateSystem\> \n
|
@param -from \<coordinateSystem\> \n
|
||||||
Specify a coordinate System when reading files.
|
Specify a coordinate system when reading files.
|
||||||
|
|
||||||
@param -to \<coordinateSystem\> \n
|
@param -to \<coordinateSystem\> \n
|
||||||
Specify a coordinate System when writing files.
|
Specify a coordinate system when writing files.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
The filename extensions are used to determine the file format type.
|
The filename extensions are used to determine the file format type.
|
||||||
@ -72,20 +72,59 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"import from various third-party surface formats into surfMesh"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("inputFile");
|
argList::validArgs.append("inputFile");
|
||||||
|
|
||||||
argList::addBoolOption("clean");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"clean",
|
||||||
|
"perform some surface checking/cleanup on the input surface"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"name",
|
||||||
|
"name",
|
||||||
|
"specify an alternative surface name when writing - "
|
||||||
|
"default is 'default'"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scaleIn",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor on input - default is 1"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"scaleOut",
|
||||||
|
"factor",
|
||||||
|
"geometry scaling factor on output - default is 1"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"dict",
|
||||||
|
"file",
|
||||||
|
"specify an alternative dictionary for constant/coordinateSystems"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"from",
|
||||||
|
"coordinateSystem",
|
||||||
|
"specify a local coordinate system when reading files."
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"to",
|
||||||
|
"coordinateSystem",
|
||||||
|
"specify a local coordinate system when writing files."
|
||||||
|
);
|
||||||
|
|
||||||
argList::addOption("name", "name");
|
#include "setRootCase.H"
|
||||||
argList::addOption("scaleIn", "scale");
|
#include "createTime.H"
|
||||||
argList::addOption("scaleOut", "scale");
|
|
||||||
argList::addOption("dict", "coordinateSystemsDict");
|
|
||||||
argList::addOption("from", "sourceCoordinateSystem");
|
|
||||||
argList::addOption("to", "targetCoordinateSystem");
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
|
||||||
# include "createTime.H"
|
|
||||||
|
|
||||||
// try for the latestTime, but create "constant" as needed
|
// try for the latestTime, but create "constant" as needed
|
||||||
instantList Times = runTime.times();
|
instantList Times = runTime.times();
|
||||||
|
|||||||
@ -48,13 +48,26 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"extract surface from a polyMesh and triangulate boundary faces"
|
||||||
|
);
|
||||||
argList::validArgs.append("output file");
|
argList::validArgs.append("output file");
|
||||||
# include "addRegionOption.H"
|
#include "addRegionOption.H"
|
||||||
argList::addBoolOption("excludeProcPatches");
|
argList::addBoolOption
|
||||||
argList::addOption("patches", "(patch0 .. patchN)");
|
(
|
||||||
|
"excludeProcPatches",
|
||||||
|
"exclude processor patches"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"patches",
|
||||||
|
"(patch0 .. patchN)",
|
||||||
|
"only triangulate named patches"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
const fileName outFileName(runTime.path()/args[1]);
|
const fileName outFileName(runTime.path()/args[1]);
|
||||||
|
|
||||||
@ -63,9 +76,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Pout<< "Reading mesh from time " << runTime.value() << endl;
|
Pout<< "Reading mesh from time " << runTime.value() << endl;
|
||||||
|
|
||||||
# include "createNamedPolyMesh.H"
|
#include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
bool includeProcPatches =
|
const bool includeProcPatches =
|
||||||
!(
|
!(
|
||||||
args.optionFound("excludeProcPatches")
|
args.optionFound("excludeProcPatches")
|
||||||
|| Pstream::parRun()
|
|| Pstream::parRun()
|
||||||
|
|||||||
@ -39,12 +39,22 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"set face normals consistent with a user-provided 'outside' point"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("Foam surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("visiblePoint");
|
argList::validArgs.append("visiblePoint");
|
||||||
argList::validArgs.append("output file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList::addBoolOption("inside");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"inside",
|
||||||
|
"treat provided point as being inside"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
const fileName surfFileName = args[1];
|
const fileName surfFileName = args[1];
|
||||||
@ -53,18 +63,18 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const bool orientInside = args.optionFound("inside");
|
const bool orientInside = args.optionFound("inside");
|
||||||
|
|
||||||
Info<< "Reading surface from " << surfFileName << endl;
|
Info<< "Reading surface from " << surfFileName << nl
|
||||||
Info<< "Visible point " << visiblePoint << endl;
|
<< "Visible point " << visiblePoint << nl
|
||||||
|
<< "Orienting surface such that visiblePoint " << visiblePoint
|
||||||
|
<< " is ";
|
||||||
|
|
||||||
if (orientInside)
|
if (orientInside)
|
||||||
{
|
{
|
||||||
Info<< "Orienting surface such that visiblePoint " << visiblePoint
|
Info<< "inside" << endl;
|
||||||
<< " is inside" << endl;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< "Orienting surface such that visiblePoint " << visiblePoint
|
Info<< "outside" << endl;
|
||||||
<< " is outside" << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Writing surface to " << outFileName << endl;
|
Info<< "Writing surface to " << outFileName << endl;
|
||||||
|
|||||||
@ -43,9 +43,9 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("merge distance");
|
argList::validArgs.append("merge distance");
|
||||||
argList::validArgs.append("output file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
const fileName surfFileName = args[1];
|
const fileName surfFileName = args[1];
|
||||||
|
|||||||
@ -80,7 +80,7 @@ void writeProcStats
|
|||||||
{
|
{
|
||||||
const List<treeBoundBox>& bbs = meshBb[procI];
|
const List<treeBoundBox>& bbs = meshBb[procI];
|
||||||
|
|
||||||
Info<< "processor" << procI << endl
|
Info<< "processor" << procI << nl
|
||||||
<< "\tMesh bounds : " << bbs[0] << nl;
|
<< "\tMesh bounds : " << bbs[0] << nl;
|
||||||
for (label i = 1; i < bbs.size(); i++)
|
for (label i = 1; i < bbs.size(); i++)
|
||||||
{
|
{
|
||||||
@ -99,19 +99,27 @@ void writeProcStats
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"redistribute a triSurface"
|
||||||
|
);
|
||||||
|
|
||||||
argList::validArgs.append("triSurfaceMesh");
|
argList::validArgs.append("triSurfaceMesh");
|
||||||
argList::validArgs.append("distributionType");
|
argList::validArgs.append("distributionType");
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"keepNonMapped",
|
||||||
|
"preserve surface outside of mesh bounds"
|
||||||
|
);
|
||||||
|
|
||||||
argList::addBoolOption("keepNonMapped");
|
#include "setRootCase.H"
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
# include "createTime.H"
|
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
|
|
||||||
const fileName surfFileName = args[1];
|
const fileName surfFileName = args[1];
|
||||||
const word distType = args[2];
|
const word distType = args[2];
|
||||||
|
|
||||||
Info<< "Reading surface from " << surfFileName << nl
|
Info<< "Reading surface from " << surfFileName << nl << nl
|
||||||
<< nl
|
|
||||||
<< "Using distribution method "
|
<< "Using distribution method "
|
||||||
<< distributedTriSurfaceMesh::distributionTypeNames_[distType]
|
<< distributedTriSurfaceMesh::distributionTypeNames_[distType]
|
||||||
<< " " << distType << nl << endl;
|
<< " " << distType << nl << endl;
|
||||||
@ -138,7 +146,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# include "createPolyMesh.H"
|
#include "createPolyMesh.H"
|
||||||
|
|
||||||
Random rndGen(653213);
|
Random rndGen(653213);
|
||||||
|
|
||||||
|
|||||||
@ -48,8 +48,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("output surface file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
const fileName surfFileName = args[1];
|
const fileName surfFileName = args[1];
|
||||||
|
|||||||
@ -43,10 +43,10 @@ int main(int argc, char *argv[])
|
|||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.clear();
|
argList::validOptions.clear();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("underrelax factor (0..1)");
|
argList::validArgs.append("underrelax factor (0..1)");
|
||||||
argList::validArgs.append("iterations");
|
argList::validArgs.append("iterations");
|
||||||
argList::validArgs.append("output file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
const fileName surfFileName = args[1];
|
const fileName surfFileName = args[1];
|
||||||
|
|||||||
@ -36,6 +36,11 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"write surface mesh regions to separate files"
|
||||||
|
);
|
||||||
|
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("input file");
|
argList::validArgs.append("input file");
|
||||||
@ -104,7 +109,6 @@ int main(int argc, char *argv[])
|
|||||||
subSurf.write(outFile);
|
subSurf.write(outFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -666,12 +666,20 @@ bool splitBorderEdges
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"split multiply connected surface edges by duplicating points"
|
||||||
|
);
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
|
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("output surface file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList::addBoolOption("debug");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"debug",
|
||||||
|
"add debugging output"
|
||||||
|
);
|
||||||
|
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
@ -679,7 +687,6 @@ int main(int argc, char *argv[])
|
|||||||
const fileName outSurfName = args[2];
|
const fileName outSurfName = args[2];
|
||||||
const bool debug = args.optionFound("debug");
|
const bool debug = args.optionFound("debug");
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading surface from " << inSurfName << endl;
|
Info<< "Reading surface from " << inSurfName << endl;
|
||||||
|
|
||||||
triSurface surf(inSurfName);
|
triSurface surf(inSurfName);
|
||||||
|
|||||||
@ -49,8 +49,8 @@ int main(int argc, char *argv[])
|
|||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("surfaceSubsetDict");
|
argList::validArgs.append("surfaceSubsetDict");
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("output file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
Info<< "Reading dictionary " << args[1] << " ..." << endl;
|
Info<< "Reading dictionary " << args[1] << " ..." << endl;
|
||||||
|
|||||||
@ -163,14 +163,29 @@ bool repatchFace
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::addNote
|
||||||
argList::validArgs.append("surface file");
|
(
|
||||||
argList::addOption("faceSet", "faceSet name");
|
"reads surface and applies surface regioning to a mesh"
|
||||||
argList::addOption("tol", "fraction of mesh size");
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
argList::noParallel();
|
||||||
# include "createTime.H"
|
argList::validArgs.append("surfaceFile");
|
||||||
# include "createPolyMesh.H"
|
argList::addOption
|
||||||
|
(
|
||||||
|
"faceSet",
|
||||||
|
"name",
|
||||||
|
"only repatch the faces in specified faceSet"
|
||||||
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"tol",
|
||||||
|
"scalar",
|
||||||
|
"search tolerance as fraction of mesh size (default 1e-3)"
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createPolyMesh.H"
|
||||||
|
|
||||||
const fileName surfName = args[1];
|
const fileName surfName = args[1];
|
||||||
|
|
||||||
@ -190,7 +205,7 @@ int main(int argc, char *argv[])
|
|||||||
<< " triangle ..." << endl;
|
<< " triangle ..." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar searchTol = args.optionLookupOrDefault("tol", 1e-3);
|
const scalar searchTol = args.optionLookupOrDefault("tol", 1e-3);
|
||||||
|
|
||||||
// Get search box. Anything not within this box will not be considered.
|
// Get search box. Anything not within this box will not be considered.
|
||||||
const boundBox& meshBb = mesh.globalData().bb();
|
const boundBox& meshBb = mesh.globalData().bb();
|
||||||
@ -212,7 +227,6 @@ int main(int argc, char *argv[])
|
|||||||
Info<< endl;
|
Info<< endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boundaryMesh bMesh;
|
boundaryMesh bMesh;
|
||||||
|
|
||||||
// Load in the surface.
|
// Load in the surface.
|
||||||
|
|||||||
@ -61,8 +61,8 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::validArgs.append("surface file");
|
argList::validArgs.append("surfaceFile");
|
||||||
argList::validArgs.append("output surface file");
|
argList::validArgs.append("output surfaceFile");
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"translate",
|
"translate",
|
||||||
|
|||||||
@ -344,7 +344,7 @@ void Foam::argList::getRootCase()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// qualify relative path
|
// qualify relative path
|
||||||
fileName casePath = cwd()/rootPath_/globalCase_;
|
casePath = cwd()/rootPath_/globalCase_;
|
||||||
casePath.clean();
|
casePath.clean();
|
||||||
|
|
||||||
setEnv("FOAM_CASE", casePath, true);
|
setEnv("FOAM_CASE", casePath, true);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,13 +38,25 @@ Foam::autoPtr<Foam::calcType> Foam::calcType::New
|
|||||||
dictionaryConstructorTablePtr_->find(calcTypeName);
|
dictionaryConstructorTablePtr_->find(calcTypeName);
|
||||||
|
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
|
{
|
||||||
|
// special treatment for -help
|
||||||
|
// exit without stack trace
|
||||||
|
if (calcTypeName == "-help")
|
||||||
{
|
{
|
||||||
FatalErrorIn("calcType::New()")
|
FatalErrorIn("calcType::New()")
|
||||||
<< "Unknown calcType type " << calcTypeName
|
<< "Valid calcType selections are:" << nl
|
||||||
|
<< dictionaryConstructorTablePtr_->sortedToc() << nl
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorIn("calcType::New()")
|
||||||
|
<< "Unknown calcType type " << calcTypeName << nl
|
||||||
<< "Valid calcType selections are:" << nl
|
<< "Valid calcType selections are:" << nl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc() << nl
|
<< dictionaryConstructorTablePtr_->sortedToc() << nl
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return autoPtr<calcType>(cstrIter()());
|
return autoPtr<calcType>(cstrIter()());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,7 +65,8 @@ int main(int argc, char *argv[])
|
|||||||
Foam::argList::addOption
|
Foam::argList::addOption
|
||||||
(
|
(
|
||||||
"dict",
|
"dict",
|
||||||
"dictionary name"
|
"name",
|
||||||
|
"dictionary to use"
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
|
|||||||
Reference in New Issue
Block a user