83 template<
class GeoField>
84 void readAndRotateFields
95 Info<<
"Transforming " << flds[i].name() <<
endl;
139 int main(
int argc,
char *argv[])
143 "Transforms a mesh by translation, rotation and/or scaling.\n"
144 "The <transformations> are listed comma-separated in a string "
145 "and executed in sequence.\n\n"
147 " translate=<vector> "
148 "translation by vector, e.g. (1 2 3)\n"
149 " rotate=(<n1> <n2>) "
150 "rotation from unit vector n1 to n2\n"
152 "rotation by given angle [deg], e.g. 90, about x-axis\n"
154 "rotation by given angle [deg] about y-axis\n"
156 "rotation by given angle [deg] about z-axis\n"
157 " Ra=<axis vector> <angle> "
158 "rotation by given angle [deg] about specified axis\n"
160 "scale by factors from vector in x, y, z directions,\n"
162 "e.g. (0.001 0.001 0.001) to scale from mm to m\n\n"
165 "\"translate=(1.2 0 0), Rx=90, translate=(-1.2 0 0)\""
173 "transform vector and tensor fields"
180 "Point set to limit the transformation to"
188 const string transformationString(
args[1]);
199 if (doRotateFields && doPointSet)
202 <<
"Rotation of fields across the entire mesh, and limiting the "
203 <<
"transformation of points to a set, cannot be done "
211 const word& regionDir =
Field reading functions for post-processing utilities.
#define forAll(list, i)
Loop across all elements in list.
List< Key > toc() const
Return the table of contents.
A primitive field of type <Type> with automated input and output.
List of IOobjects with searching and retrieving facilities.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static unsigned int defaultPrecision()
Return the default precision.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
word findInstance(const fileName &dir, const word &name=word::null, const IOobject::readOption rOpt=IOobject::MUST_READ, const word &stopInstance=word::null) const
Return the location of "dir" containing the file "name".
A List with indirect addressing.
Extract command arguments and options from the supplied argc and argv parameters.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool optionFound(const word &opt) const
Return true if the named option is found.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
Generic dimensioned Type class.
const word & name() const
Return const reference to name.
A class for handling file names.
Mesh data needed to do the Finite Volume discretisation.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
static word defaultRegion
Return the default region name.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
errorManipArg< error, int > exit(error &err, const int errNo=1)
wordList ReadFields(const Mesh &mesh, const IOobjectList &objects, PtrList< GeoField > &fields, const bool syncPar=true)
Read all fields of the specified type.
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const word & regionName(const solver ®ion)
dimensionSet transform(const dimensionSet &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
PtrList< surfaceScalarField > ssFlds
PtrList< surfaceTensorField > stFlds
PtrList< surfaceSymmTensorField > ssymtFlds
PtrList< surfaceVectorField > svFlds
PtrList< surfaceSphericalTensorField > sstFlds
PtrList< volSphericalTensorField > vstFlds
PtrList< volScalarField > vsFlds
PtrList< volTensorField > vtFlds
PtrList< volSymmTensorField > vsymtFlds
PtrList< volVectorField > vvFlds
const Foam::wordList regionNames(args.optionFound("allRegions") ? runTime .controlDict().subDict("regionSolvers").toc() :wordList(1, args.optionFound("region") ? args.optionRead< word >("region") :polyMesh::defaultRegion))
Foam::argList args(argc, argv)