65 std::move(mappedField)
75 const bool allowUnknownPatchFields
83 forAll(boundaryAddressing_, patchi)
91 procMesh_.boundary()[patchi],
98 tmp<VolFieldType> tresF
105 procMesh_.thisDb().time().timeName(),
112 Field<Type>(
field.primitiveField(), cellAddressing_),
116 VolFieldType& resF = tresF.ref();
117 resF.oriented() =
field().oriented();
123 auto& bf = resF.boundaryFieldRef();
127 if (patchFieldDecomposerPtrs_.set(patchi))
134 field.boundaryField()[boundaryAddressing_[patchi]],
135 procMesh_.boundary()[patchi],
137 patchFieldDecomposerPtrs_[patchi]
141 else if (isA<processorCyclicFvPatch>(procMesh_.boundary()[patchi]))
146 new processorCyclicFvPatchField<Type>
148 procMesh_.boundary()[patchi],
152 field.primitiveField(),
153 processorVolPatchFieldDecomposerPtrs_[patchi]
158 else if (isA<processorFvPatch>(procMesh_.boundary()[patchi]))
163 new processorFvPatchField<Type>
165 procMesh_.boundary()[patchi],
169 field.primitiveField(),
170 processorVolPatchFieldDecomposerPtrs_[patchi]
175 else if (allowUnknownPatchFields)
180 new emptyFvPatchField<Type>
182 procMesh_.boundary()[patchi],
213 procMesh_.nInternalFaces()
222 Field<Type> internalField
224 field.primitiveField(),
233 Field<Type> allFaceField(
field.mesh().nFaces());
237 allFaceField[i] =
field.primitiveField()[i];
242 const Field<Type>&
p =
field.boundaryField()[patchi];
244 const label patchStart =
field.mesh().boundaryMesh()[patchi].start();
248 allFaceField[patchStart + i] =
p[i];
254 PtrList<fvsPatchField<Type>> patchFields(boundaryAddressing_.size());
256 forAll(boundaryAddressing_, patchi)
264 procMesh_.boundary()[patchi],
270 tmp<SurfaceFieldType> tresF
277 procMesh_.thisDb().time().timeName(),
284 Field<Type>(
field.primitiveField(), mapAddr),
288 SurfaceFieldType& resF = tresF.ref();
289 resF.oriented() =
field().oriented();
294 auto& bf = resF.boundaryFieldRef();
296 forAll(boundaryAddressing_, patchi)
298 if (patchFieldDecomposerPtrs_.set(patchi))
305 field.boundaryField()[boundaryAddressing_[patchi]],
306 procMesh_.boundary()[patchi],
308 patchFieldDecomposerPtrs_[patchi]
312 else if (isA<processorCyclicFvPatch>(procMesh_.boundary()[patchi]))
317 new processorCyclicFvsPatchField<Type>
319 procMesh_.boundary()[patchi],
324 processorSurfacePatchFieldDecomposerPtrs_[patchi]
329 if (resF.is_oriented())
331 bf[patchi] *= faceSign_[patchi];
334 else if (isA<processorFvPatch>(procMesh_.boundary()[patchi]))
339 new processorFvsPatchField<Type>
341 procMesh_.boundary()[patchi],
346 processorSurfacePatchFieldDecomposerPtrs_[patchi]
351 if (resF.is_oriented())
353 bf[patchi] *= faceSign_[patchi];
368 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.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
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.
Ignore writing from objectRegistry::writeObject()
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
#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.
static const DimensionedField< Type, GeoMesh > & null()
Return a NullObjectRef DimensionedField.
Generic templated field type.
const Time & time() const noexcept
Return time registry.
errorManip< error > abort(error &err)
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
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...
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.
A class for managing temporary objects.
void decomposeFields(const PtrList< GeoField > &fields) const
Decompose list of fields.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Do not request registration (bool: false)
static tmp< fvPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
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.