82 template<
class GeoField>
83 void readAndRotateFields
94 Info<<
"Transforming " << flds[i].name() <<
endl;
110 readAndRotateFields(vsFlds, mesh, T, objects);
112 readAndRotateFields(vvFlds, mesh, T, objects);
114 readAndRotateFields(vstFlds, mesh, T, objects);
116 readAndRotateFields(vsymtFlds, mesh, T, objects);
118 readAndRotateFields(vtFlds, mesh, T, objects);
122 readAndRotateFields(ssFlds, mesh, T, objects);
124 readAndRotateFields(svFlds, mesh, T, objects);
126 readAndRotateFields(sstFlds, mesh, T, objects);
128 readAndRotateFields(ssymtFlds, mesh, T, objects);
130 readAndRotateFields(stFlds, mesh, T, objects);
138 int main(
int argc,
char *argv[])
140 const wordList supportedTransformations
142 {
"translate",
"rotate",
"Rx",
"Ry",
"Rz",
"Ra",
"scale"}
147 supportedTransformationsStr << supportedTransformations <<
endl;
151 "Transforms a mesh e.g.\n" 153 "\"translate=(-0.586 0 -0.156), " 155 "translate=(0.586 0 0.156)\"\n\n" 156 "Supported transformations " + supportedTransformationsStr.
str()
165 "transform vector and tensor fields" 173 const string transformationString(args[1]);
179 const bool doRotateFields = args.
optionFound(
"rotateFields");
181 forAll(regionNames, regioni)
183 const word& regionName = regionNames[regioni];
PtrList< surfaceSphericalTensorField > sstFlds
PtrList< volTensorField > vtFlds
PtrList< volSphericalTensorField > vstFlds
wordList ReadFields(const Mesh &mesh, const IOobjectList &objects, PtrList< GeoField > &fields, const bool syncPar=true)
Read all fields of the specified type.
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
List of IOobjects with searching and retrieving facilities.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Unit conversion functions.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
static unsigned int defaultPrecision()
Return the default precision.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool optionFound(const word &opt) const
Return true if the named option is found.
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".
static SLList< string > validArgs
A list of valid (mandatory) arguments.
Field reading functions for post-processing utilities.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Generic dimensioned Type class.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
PtrList< volVectorField > vvFlds
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
PtrList< volScalarField > vsFlds
const word & regionDir(const word ®ionName)
A class for handling words, derived from string.
Extract command arguments and options from the supplied argc and argv parameters. ...
PtrList< surfaceSymmTensorField > ssymtFlds
PtrList< volSymmTensorField > vsymtFlds
PtrList< surfaceTensorField > stFlds
PtrList< surfaceScalarField > ssFlds
PtrList< surfaceVectorField > svFlds
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Mesh data needed to do the Finite Volume discretisation.
string str() const
Return the string.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Output to memory buffer stream.
A primitive field of type <T> with automated input and output.
wordList selectRegionNames(const argList &args, const Time &runTime)
dimensionSet transform(const dimensionSet &)