84 Info<<
indent << typeName <<
" : Creating addressing and weights between " 94 if (transformPatch.
name() != neighbPatch().transformPatch().name())
97 <<
"Transform patch " << transformPatch.
name() <<
" for " 98 << typeName <<
" patch " <<
name() <<
" is not the same as for " 99 <<
"the neighbour patch " << neighbPatch().name() <<
". " 110 <<
"Transform patch " << transformPatch.
name() <<
" for " 111 << typeName <<
" patch " <<
name() <<
" has a non-uniform " 112 <<
"transformation. This is not allowed." 118 transformPatch.size(),
136 <<
"Transform patch " << transformPatch.
name() <<
" for " 137 << typeName <<
" patch " <<
name() <<
" has zero faces. It may " 138 <<
"have been converted to a processor cyclic during " 139 <<
"decomposition. Consider adding " << transformPatch.
name()
140 <<
" and it's neighbour to the list of preserved patches." 156 gSum(this->faceCentres()*thisMagAreas)/
gSum(thisMagAreas);
158 gSum(neighbPatch().faceCentres()*nbrMagAreas)/
gSum(nbrMagAreas);
161 scalar d =
mag(thisCentre - nbrCentre);
191 for (
label i = 0; i < n - 1; ++ i)
202 for (
label i = 0; i > n + 1; -- i)
214 const pointField nbrPoints(neighbPatch().localPoints());
224 SubList<face>(neighbPatch().localFaces(), neighbPatch().size()),
229 thisPoints = TLeft.transformPosition(localPoints());
240 AMILowWeightCorrection_,
246 gSum(AMILeftPtr->srcWeightsSum()*AMILeftPtr->srcMagSf())
247 /
gSum(AMILeftPtr->srcMagSf());
249 thisPoints =
T.transformPosition(localPoints());
260 AMILowWeightCorrection_,
266 gSum(AMIPtr->srcWeightsSum()*AMIPtr->srcMagSf())
267 /
gSum(AMIPtr->srcMagSf());
280 AMILowWeightCorrection_,
285 const scalar sRight =
286 gSum(AMIRightPtr->srcWeightsSum()*AMIRightPtr->srcMagSf())
287 /
gSum(AMIRightPtr->srcMagSf());
289 Info<< typeName <<
": number of transforms = " << n << endl
290 << typeName <<
": left/centre/right sum(weights) = " 291 << sLeft <<
", " << s <<
", " << sRight <<
endl;
296 AMIs_.set(0, sLeft > sRight ? AMILeftPtr.
ptr() : AMIPtr.
ptr());
297 AMIs_.set(1, sLeft > sRight ? AMIPtr.
ptr() : AMIRightPtr.
ptr());
299 AMITransforms_.resize(2);
300 AMITransforms_[0] = sLeft > sRight ? TLeft :
T;
301 AMITransforms_[1] = sLeft > sRight ?
T : TRight;
304 AMIInterpolation::sumWeights(AMIs_);
305 AMIInterpolation::reportSumWeights(AMIs_[0]);
306 AMIInterpolation::normaliseWeights(AMIs_);
319 const word& patchType,
336 transformPatchID_(-1)
349 const word& patchType
362 transformPatchName_(dict.
lookup(
"transformPatch")),
363 transformPatchID_(-1)
378 transformPatchID_(-1)
391 const label newStart,
392 const word& nbrPatchName
397 transformPatchID_(-1)
415 transformPatchID_(-1)
435 return refCast<const cyclicRepeatAMIPolyPatch>(pp);
441 if (transformPatchID_ == -1)
446 if (transformPatchID_ == -1)
449 <<
"Illegal transformPatch name " << transformPatchName()
450 <<
nl <<
"Valid patch names are " 456 return transformPatchID_;
465 return refCast<const coupledPolyPatch>(pp);
491 writeEntry(os,
"transformPatch", transformPatchName_);
virtual void resetAMI() const
Reset the AMI interpolator.
virtual ~cyclicRepeatAMIPolyPatch()
Destructor.
virtual void movePoints(const Field< PointType > &)
Correct patch after moving points.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
Ostream & indent(Ostream &os)
Indent stream.
virtual const scalarField & weightsSum() const
Return the weights sum for this patch.
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.
A 2-tuple for storing two objects of different types.
const Type1 & first() const
Return first.
virtual const cyclicRepeatAMIPolyPatch & neighbPatch() const
Return a reference to the neighbour patch.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
void size(const label)
Override size to be inconsistent with allocated storage.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const scalarField & neighbWeightsSum() const
Return the weights sum for the neighbour patch.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
T * ptr()
Return object pointer for reuse.
virtual const vectorField & separation() const
If the planes are separated the separation vector.
Macros for easy insertion into run-time selection tables.
virtual const tensorField & forwardT() const
Return face transformation tensor.
virtual label transformPatchID() const
Neighbour patch ID.
A list of faces which address into the list of points.
Repeat patch for Arbitrary Mesh Interface (AMI)
A List obtained as a section of another List.
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){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Type gSum(const FieldField< Field, Type > &f)
A class for handling words, derived from string.
static const word null
An empty word.
word transformPatchName_
Name of the transform patch.
Cyclic patch for Arbitrary Mesh Interface (AMI)
virtual const scalarField & weightsSum() const
Return the weights sum for this patch.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
defineTypeNameAndDebug(combustionModel, 0)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
word name(const complex &)
Return a string representation of a complex.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
const Type2 & second() const
Return second.
dimensioned< scalar > mag(const dimensioned< Type > &)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A patch is a list of labels that address the faces in the global face list.
static const Vector< scalar > zero
virtual const scalarField & neighbWeightsSum() const
Return the weights sum for the neighbour patch.
cyclicRepeatAMIPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform=UNKNOWN)
Construct from (base couped patch) components.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
virtual const coupledPolyPatch & transformPatch() const
Return a reference to the transform patch.