36 template<
class>
class PatchField,
37 template<
class>
class SlicedPatchField,
50 if (!
mesh.boundary().empty())
52 const auto&
p =
mesh.boundary().back();
53 maxAddress = (
p.start() +
p.size());
57 return (fieldSize < maxAddress);
64 template<
class>
class PatchField,
65 template<
class>
class SlicedPatchField,
73 const Field<Type>& completeOrBoundaryField,
74 const bool preserveCouples,
75 const bool preserveProcessorOnly,
76 const bool isBoundaryOnly
80 SlicedPatchField<Type>::processorPatchType
83 auto tbf = tmp<FieldField<PatchField, Type>>
::New(
mesh.boundary().size());
88 const auto&
p =
mesh.boundary()[patchi];
92 preserveCouples &&
p.coupled()
93 && (!preserveProcessorOnly || isA<processorPatchType>(
p))
107 bf[patchi] = SlicedPatchField<Type>
110 DimensionedField<Type, GeoMesh>::null(),
111 completeOrBoundaryField,
120 new SlicedPatchField<Type>
123 DimensionedField<Type, GeoMesh>::null(),
124 completeOrBoundaryField,
138 template<
class>
class PatchField,
139 template<
class>
class SlicedPatchField,
147 const FieldField<PatchField, Type>& bField,
148 const bool preserveCouples
151 auto tbf = tmp<FieldField<PatchField, Type>>
::New(
mesh.boundary().size());
152 auto& bf = tbf.ref();
156 const auto&
p =
mesh.boundary()[patchi];
158 if (preserveCouples &&
p.coupled())
168 bf[patchi] == bField[patchi];
176 new SlicedPatchField<Type>
179 DimensionedField<Type, GeoMesh>::null()
183 bf[patchi].UList<Type>::shallowCopy(bField[patchi]);
196 template<
class>
class PatchField,
197 template<
class>
class SlicedPatchField,
207 const bool preserveCouples
218 makeBoundary(
mesh, completeField, preserveCouples)
234 template<
class>
class PatchField,
235 template<
class>
class SlicedPatchField,
246 const bool preserveCouples,
247 const bool preserveProcessorOnly
261 preserveProcessorOnly,
262 isBoundaryAddressing(
mesh, completeBField.size())
279 template<
class>
class PatchField,
280 template<
class>
class SlicedPatchField,
288 const bool preserveCouples
297 makeBoundary(gf.
mesh(), gf.boundaryField(), preserveCouples)
310 template<
class>
class PatchField,
311 template<
class>
class SlicedPatchField,
327 makeBoundary(gf.
mesh(), gf.boundaryField(), true)
338 template<
class>
class PatchField,
339 template<
class>
class SlicedPatchField,
364 template<
class>
class PatchField,
365 template<
class>
class SlicedPatchField,
381 template<
class>
class PatchField,
382 template<
class>
class SlicedPatchField,
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
SlicedGeometricField(const IOobject &, const Mesh &, const dimensionSet &dims, const Field< Type > &completeField, const bool preserveCouples=true)
Construct from components and field to slice.
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.
Generic GeometricField class.
#define forAll(list, i)
Loop across all elements in list.
~SlicedGeometricField()
Destructor.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Generic templated field type.
GeoMesh::Mesh Mesh
The mesh type for the DimensionedField.
const Mesh & mesh() const noexcept
Return mesh.
tmp< SlicedGeometricField< Type, PatchField, SlicedPatchField, GeoMesh > > clone() const
Clone.
void correctBoundaryConditions()
Correct boundary field.
void shallowCopy(T *__restrict__ ptr, const label len) noexcept
Copy the pointer and size.
void correctBoundaryConditions()
Correct boundary field.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A class for managing temporary objects.
Specialization of GeometricField which holds slices of given complete fields in a form that they act ...
Defines the attributes of an object for which implicit objectRegistry management is supported...