50template<
class GeoField>
51void ReadAndRotateFields
63 GeoField
fld(*fieldIter(),
mesh);
84 ReadAndRotateFields<volVectorField>(
mesh, objects, rotT);
85 ReadAndRotateFields<volSphericalTensorField>(
mesh, objects, rotT);
86 ReadAndRotateFields<volSymmTensorField>(
mesh, objects, rotT);
87 ReadAndRotateFields<volTensorField>(
mesh, objects, rotT);
89 ReadAndRotateFields<surfaceVectorField>(
mesh, objects, rotT);
90 ReadAndRotateFields<surfaceSphericalTensorField>(
mesh, objects, rotT);
91 ReadAndRotateFields<surfaceSymmTensorField>(
mesh, objects, rotT);
92 ReadAndRotateFields<surfaceTensorField>(
mesh, objects, rotT);
98int main(
int argc,
char *argv[])
102 "Rotate mesh points and vector/tensor fields\n"
103 "Rotation from the <from> vector to the <to> vector"
106 timeSelector::addOptions();
108 argList::addArgument(
"from",
"The vector to rotate from");
109 argList::addArgument(
"to",
"The vector to rotate to");
135 polyMesh::regionName(
regionName)/polyMesh::meshSubDir
148 runTime.findInstance(meshDir,
"points"),
160 IOstream::defaultPrecision(
max(10u, IOstream::defaultPrecision()));
162 Info<<
"Writing points into directory "
172 runTime.setTime(timeDirs[timei], timei);
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A primitive field of type <T> with automated input and output.
List of IOobjects with searching and retrieving facilities.
IOobjectList lookupClass(const char *clsName) const
The list of IOobjects with the given headerClassName.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
T get(const label index) const
Get a value from the argument at index.
Generic dimensioned Type class.
A class for handling file names.
Mesh data needed to do the Finite Volume discretisation.
Tensor of scalars, i.e. Tensor<scalar>.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
Foam::word regionName(Foam::polyMesh::defaultRegion)
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from vector n1 to n2.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.