33template <
class weightType>
39 const bool resetInternalFaces
47 for (
const label pointi: resetPoints)
55template <
class weightType>
59 Field<weightType>& weights,
67 plusEqOp<weightType>(),
68 pTraits<weightType>::zero
81 pointsToMove(facesToMove,
true)
84 for (
const label pointi : averagePoints)
86 if (weights[pointi] != pTraits<weightType>::zero)
88 pointDisplacement[pointi] /= weights[pointi];
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A traits class, which is primarily used for primitives and vector-space.
void reset(const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement, const bool resetInternalFaces=true) const
Reset the relevant weights and displacements to zero.
bitSet pointsToMove(const labelList &facesToMove, const bool moveInternalFaces) const
Get list of the points to be moved.
void average(const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement) const
Average the displacements using the weights provided.
List< label > labelList
A List of labels.
Field< vector > vectorField
Specialisation of Field<T> for vector.