57 cs[i].applyConstraint(normals[i]);
70Foam::meshPointPatch::meshPointPatch
81 meshPoints_(meshPoints),
82 constraints_(constraints)
86 FatalErrorInFunction <<
"patch " << name
87 <<
" size of meshPoints " << meshPoints_.size()
88 <<
" differs from size of constraints " << constraints_.size()
94Foam::meshPointPatch::meshPointPatch
101 const word& patchType
105 meshPoints_(meshPoints),
110 FatalErrorInFunction <<
"patch " << name
111 <<
" size of meshPoints " << meshPoints_.size()
112 <<
" differs from size of pointNormals " << pointNormals.size()
118Foam::meshPointPatch::meshPointPatch
124 const word& patchType
133Foam::meshPointPatch::meshPointPatch
158 localPointsPtr_.reset(
nullptr);
181 localPointsPtr_.reset(
nullptr);
189 if (!localPointsPtr_)
191 localPointsPtr_.reset
200 return localPointsPtr_();
206 if (!pointNormalsPtr_)
212 pointNormals[i] = constraints_[i].second();
215 return pointNormalsPtr_();
222 meshPoints().writeEntry(
"meshPoints",
os);
223 constraints().writeEntry(
"constraints",
os);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void size(const label n)
Older name for setAddressableSize.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
pointPatch with explicitly provided points instead of using the points of a polyPatch.
virtual const pointField & localPoints() const
Return pointField of points in patch.
virtual label size() const
Return size.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
autoPtr< pointField > localPointsPtr_
Demand-driven local points.
virtual void write(Ostream &) const
Write the pointPatch data as a dictionary.
autoPtr< pointField > pointNormalsPtr_
Demand-driven local normals (assumes constructed with pointNormals.
virtual const List< pointConstraint > & constraints() const
Return constraints.
const List< pointConstraint > constraints_
virtual const labelList & meshPoints() const
Return mesh points.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
const labelList meshPoints_
Explicit mesh points.
virtual const vectorField & pointNormals() const
Return point unit normals. Assumes single constraint.
label index() const noexcept
The index of this patch in the boundaryMesh.
A pointBoundaryMesh is a pointPatch list with registered IO, a reference to the associated pointMesh,...
Accumulates point constraints through successive applications of the applyConstraint function.
Basic pointPatch represents a set of points from the mesh.
virtual void write(Ostream &) const
Write the pointPatch data as a dictionary.
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
friend class pointBoundaryMesh
pointPatch(const pointPatch &)=delete
No copy construct.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
List< word > wordList
List of word.
static List< pointConstraint > makeConstraints(const vectorField &normals)
List< label > labelList
A List of labels.
Field< vector > vectorField
Specialisation of Field<T> for vector.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.