57 if (!isType<cyclicPointPatch>(
p))
60 <<
"patch " << this->
patch().
index() <<
" not cyclic type. " 61 <<
"Patch type = " << p.type()
70 const cyclicPointPatchField<Type>& ptf,
72 const DimensionedField<Type, pointMesh>& iF,
73 const pointPatchFieldMapper& mapper
76 coupledPointPatchField<Type>(ptf,
p, iF, mapper),
77 cyclicPatch_(
refCast<const cyclicPointPatch>(
p))
79 if (!isType<cyclicPointPatch>(this->
patch()))
82 <<
"Field type does not correspond to patch type for patch " 84 <<
"Field type: " << typeName <<
endl 85 <<
"Patch type: " << this->
patch().type()
94 const cyclicPointPatchField<Type>& ptf,
95 const DimensionedField<Type, pointMesh>& iF
98 coupledPointPatchField<Type>(ptf, iF),
99 cyclicPatch_(ptf.cyclicPatch_)
115 if (cyclicPatch_.cyclicPatch().owner())
123 refCast<const GeometricField<Type, pointPatchField, pointMesh>>
125 this->internalField()
129 refCast<const cyclicPointPatchField<Type>>
131 fld.boundaryField()[nbrPatch.
index()]
138 const edgeList& pairs = cyclicPatch_.transformPairs();
145 label pointi = pairs[pairi][0];
146 label nbrPointi = pairs[pairi][1];
148 Type
tmp = pf[pointi];
149 pf[pointi] =
transform(forwardT()[0], nbrPf[nbrPointi]);
157 Foam::Swap(pf[pairs[pairi][0]], nbrPf[pairs[pairi][1]]);
160 this->addToInternalField(pField, pf);
161 nbr.addToInternalField(pField, nbrPf);
errorManipArg< error, int > exit(error &err, const int errNo=1)
const pointPatch & patch() const noexcept
Return the patch.
commsTypes
Communications types.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Cyclic front and back plane patch field.
Cyclic patch for post-processing.
virtual label index() const
Return the index of this patch in the pointBoundaryMesh.
#define forAll(list, i)
Loop across all elements in list.
Generic templated field type.
virtual void swapAddSeparated(const Pstream::commsTypes commsType, Field< Type > &) const
Complete swap of patch point values and add to local values.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Basic pointPatch represents a set of points from the mesh.
virtual label index() const =0
Return the index of this patch in the pointBoundaryMesh.
A Coupled boundary condition for pointField.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
cyclicPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
void Swap(DynamicList< T, SizeMinA > &a, DynamicList< T, SizeMinB > &b)
Exchange contents of lists - see DynamicList::swap().
A class for managing temporary objects.
const cyclicPointPatch & neighbPatch() const
Return neighbour point patch.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...