64 <<
"patch " << this->
patch().
index() <<
" not cyclicACMI type. "
65 <<
"Patch type = " << p.type()
74 const cyclicACMIPointPatchField<Type>& ptf,
76 const DimensionedField<Type, pointMesh>& iF,
77 const pointPatchFieldMapper& mapper
80 coupledPointPatchField<Type>(ptf,
p, iF, mapper),
81 cyclicACMIPatch_(
refCast<const cyclicACMIPointPatch>(
p)),
88 <<
"Field type does not correspond to patch type for patch "
91 <<
"Patch type: " << this->
patch().type()
100 const cyclicACMIPointPatchField<Type>& ptf,
101 const DimensionedField<Type, pointMesh>& iF
104 coupledPointPatchField<Type>(ptf, iF),
105 cyclicACMIPatch_(ptf.cyclicACMIPatch_),
120 if (cyclicACMIPatch_.cyclicACMIPatch().owner())
133 this->internalField()
139 fld.boundaryField()[nbrPatch.
index()]
143 Field<Type> ptFld(this->patchInternalField(pField));
144 Field<Type> nbrPtFld(nbr.patchInternalField(pField));
149 const tensor& forwardT = this->forwardT()[0];
150 const tensor& reverseT = this->reverseT()[0];
160 Field<Type> nbrFcFld(nbrPpi().pointToFaceInterpolate(nbrPtFld));
162 const cyclicAMIPolyPatch& cami = cyclicACMIPatch_.cyclicACMIPatch();
165 nbrFcFld = cami.interpolate(nbrFcFld);
168 this->addToInternalField
171 ppi().faceToPointInterpolate(nbrFcFld)()
177 Field<Type> fcFld(ppi().pointToFaceInterpolate(ptFld));
182 fcFld = cami.
neighbPatch().cyclicAMIPolyPatch::interpolate(fcFld);
185 nbr.addToInternalField
188 nbrPpi().faceToPointInterpolate(fcFld)()
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Generic GeometricField class.
commsTypes
Communications types.
A Coupled boundary condition for pointField.
coupledPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
Cyclic ACMI front and back plane patch field.
virtual bool doTransform() const
Does the patch field perform the transformation.
virtual void swapAddSeparated(const Pstream::commsTypes commsType, Field< Type > &) const
Complete swap of patch point values and add to local values.
cyclicACMIPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual const tensorField & forwardT() const
Return face transformation tensor.
Cyclic AMI point patch - place holder only.
const cyclicACMIPointPatch & neighbPatch() const
Return neighbour point patch.
Cyclic patch for Arbitrary Mesh Interface (AMI).
virtual const cyclicAMIPolyPatch & neighbPatch() const
Return a reference to the neighbour patch.
tmp< Field< Type > > interpolate(const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >()) const
Interpolate field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual label index() const
Return the index of this patch in the pointBoundaryMesh.
label index() const noexcept
The index of this patch in the boundaryMesh.
const pointPatch & patch() const noexcept
Return the patch.
Foam::pointPatchFieldMapper.
void patchInternalField(const UList< Type1 > &internalData, const labelUList &addressing, UList< Type1 > &pfld) const
Extract field using specified addressing.
void addToInternalField(Field< Type1 > &iF, const Field< Type1 > &pF) const
Given the internal field and a patch field, add the patch field to the internal field.
const DimensionedField< Type, pointMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
Basic pointPatch represents a set of points from the mesh.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
bool isType(const U &obj)
Check if typeid of the object and Type are identical.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)