66 const bool allowUnknownPatchFields
81 auto& result = tresult.ref();
92 if (patchFieldDecomposerPtrs_.set(patchi))
99 field.boundaryField()[boundaryAddressing_[patchi]],
100 procMesh_.boundary()[patchi],
102 patchFieldDecomposerPtrs_[patchi]
106 else if (isA<processorCyclicFvPatch>(procMesh_.boundary()[patchi]))
111 new processorCyclicFvPatchField<Type>
113 procMesh_.boundary()[patchi],
117 field.primitiveField(),
118 processorVolPatchFieldDecomposerPtrs_[patchi]
123 else if (isA<processorFvPatch>(procMesh_.boundary()[patchi]))
128 new processorFvPatchField<Type>
130 procMesh_.boundary()[patchi],
134 field.primitiveField(),
135 processorVolPatchFieldDecomposerPtrs_[patchi]
140 else if (allowUnknownPatchFields)
145 new emptyFvPatchField<Type>
147 procMesh_.boundary()[patchi],
186 Field<Type> allFaceField(
field.mesh().nFaces());
189 SubList<Type>(allFaceField,
field.primitiveField().size()) =
190 field.primitiveField();
194 const Field<Type>& pfld =
field.boundaryField()[patchi];
196 const label start =
field.mesh().boundaryMesh()[patchi].start();
198 SubList<Type>(allFaceField, pfld.size(), start) = pfld;
212 Field<Type>(
field.primitiveField(), mapAddr),
215 auto& result = tresult.
ref();
216 result.oriented() =
field.oriented();
221 auto& bf = result.boundaryFieldRef();
223 forAll(boundaryAddressing_, patchi)
225 if (patchFieldDecomposerPtrs_.set(patchi))
232 field.boundaryField()[boundaryAddressing_[patchi]],
233 procMesh_.boundary()[patchi],
234 result.internalField(),
235 patchFieldDecomposerPtrs_[patchi]
239 else if (isA<processorCyclicFvPatch>(procMesh_.boundary()[patchi]))
244 new processorCyclicFvsPatchField<Type>
246 procMesh_.boundary()[patchi],
247 result.internalField(),
251 processorSurfacePatchFieldDecomposerPtrs_[patchi]
256 if (result.is_oriented())
258 bf[patchi] *= faceSign_[patchi];
261 else if (isA<processorFvPatch>(procMesh_.boundary()[patchi]))
266 new processorFvsPatchField<Type>
268 procMesh_.boundary()[patchi],
269 result.internalField(),
273 processorSurfacePatchFieldDecomposerPtrs_[patchi]
278 if (result.is_oriented())
280 bf[patchi] *= faceSign_[patchi];
295 template<
class GeoField>
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
orientedType oriented() const noexcept
Return oriented type.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
static const word & calculatedType() noexcept
The type name for calculated patch fields.
Generic GeometricField class.
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
#define forAll(list, i)
Loop across all elements in list.
tmp< DimensionedField< Type, volMesh > > decomposeField(const DimensionedField< Type, volMesh > &field) const
Decompose internal field.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
A List obtained as a section of another List.
Generic templated field type.
errorManip< error > abort(error &err)
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=PatchField< Type >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
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))
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &iField)
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions, copy of internal field...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static const word & calculatedType() noexcept
The type name for calculated patch fields.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
A class for managing temporary objects.
void decomposeFields(const PtrList< GeoField > &fields) const
Decompose list of fields.
Do not request registration (bool: false)
static tmp< fvsPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Return a pointer to a new patchField created on freestore given.