57 const vector r = dir - (dir & e3)*e3;
66 return axesRotation(e3, dir).R();
71 void Foam::cylindrical::init
73 const objectRegistry& obr,
74 const List<label>& cells
77 const polyMesh& mesh = refCast<const polyMesh>(obr);
81 updateCells(mesh, cells);
85 void Foam::cylindrical::init(
const objectRegistry& obr)
87 const polyMesh& mesh = refCast<const polyMesh>(obr);
96 vector dir = cc[celli] - origin_;
97 dir /=
mag(dir) + vSmall;
99 R[celli] = this->
R(dir);
167 <<
" cylindrical can not be constructed from dictionary " 168 <<
" use the constructor : " 170 " const dictionary&, const objectRegistry&" 208 label celli = cells[i];
209 vector dir = cc[celli] - origin_;
210 dir /=
mag(dir) + vSmall;
222 if (Rptr_->size() != vf.
size())
225 <<
"vectorField st has different size to tensorField " 229 return (Rptr_() & vf);
246 return (Rptr_()[cmptI] & v);
255 return (Rptr_().
T() & vf);
272 return (Rptr_()[cmptI].
T() & v);
281 if (Rptr_->size() != tf.
size())
284 <<
"tensorField st has different size to tensorField Tr" 287 return (Rptr_() & tf & Rptr_().
T());
311 <<
"tensorField tf has different size to tensorField Tr" 321 t[i] = R[i] & tf[i] &
Rtr[i];
333 if (Rptr_->size() != vf.
size())
336 <<
"tensorField vf has different size to tensorField Tr"
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
symmTensor transformPrincipal(const tensor &, const vector &) const
Transform principal.
virtual tmp< tensorField > transformTensor(const tensorField &tf) const
Transform tensor field using transformation tensorField.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
virtual const tensor & Rtr() const
Return global-to-local transformation tensor.
virtual tmp< vectorField > invTransform(const vectorField &vf) const
Inverse transform vectorField using transformation tensor field.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T & ref() const
Return non-const reference or generate a fatal error.
void size(const label)
Override size to be inconsistent with allocated storage.
Vector< scalar > vector
A scalar version of the templated Vector.
Macros for easy insertion into run-time selection tables.
virtual const tensor & R() const
Return local-to-global transformation tensor.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const dictionary & parent() const
Return the parent dictionary.
virtual const vector e3() const
Return local Cartesian z-axis in global coordinates.
cylindrical(const dictionary &, const objectRegistry &)
Construct from dictionary and objectRegistry.
virtual tmp< vectorField > transform(const vectorField &tf) const
Transform vectorField using transformation tensor field.
virtual void write(Ostream &) const
Write.
const vectorField & cellCentres() const
errorManip< error > abort(error &err)
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Vector< Cmpt > perpendicular(const Vector< Cmpt > &v)
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
virtual void updateCells(const polyMesh &mesh, const labelList &cells)
Update the rotation for a list of cells.
#define R(A, B, C, D, E, F, K, M)
virtual void clear()
Reset rotation to an identity rotation.
tmp< Field< Type > > T() const
Return the field transpose (only defined for second rank tensors)
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
virtual tmp< symmTensorField > transformVector(const vectorField &vf) const
Transform vectorField using transformation tensorField and return.
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
Registry of regIOobjects.
Templated 3D tensor derived from MatrixSpace adding construction from 9 components, element access using xx(), xy() etc. member functions and the inner-product (dot-product) and outer-product of two Vectors (tensor-product) operators.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
static const Vector< scalar > zero
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.