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))
100 PatchField<Type>::New(
p.type(),
p, *
this)
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())
164 PatchField<Type>::New(
p.type(),
p, *
this)
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
310 template<
class>
class PatchField,
311 template<
class>
class SlicedPatchField,
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 Mesh & mesh() const noexcept
Return const reference to mesh.
const dimensionSet & dimensions() const noexcept
Return dimensions.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
GeometricField(const IOobject &io, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=PatchField< Type >::calculatedType())
Construct given IOobject, mesh, dimensions and patch type.
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
void correctBoundaryConditions()
Correct boundary field.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Specialization of GeometricField which holds slices of given complete fields in a form that they act ...
tmp< SlicedGeometricField< Type, PatchField, SlicedPatchField, GeoMesh > > clone() const
Clone.
SlicedGeometricField(const IOobject &, const Mesh &, const dimensionSet &dims, const Field< Type > &completeField, const bool preserveCouples=true)
Construct from components and field to slice.
~SlicedGeometricField()
Destructor.
void correctBoundaryConditions()
Correct boundary field.
A non-owning sub-view of a List (allocated or unallocated storage).
void shallowCopy(T *__restrict__ ptr, const label len) noexcept
Copy the pointer and size.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
A class for managing temporary objects.
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.
#define forAll(list, i)
Loop across all elements in list.