33 template <
class weightType>
39 const bool resetInternalFaces
47 for (
const label pointi: resetPoints)
50 pointDisplacement[pointi] = vector::zero;
55 template <
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];
A traits class, which is primarily used for primitives and vector-space.
bitSet pointsToMove(const labelList &facesToMove, const bool moveInternalFaces) const
Get list of the points to be moved.
Generic templated field type.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void reset(const labelList &facesToMove, Field< weightType > &weights, vectorField &pointDisplacement, const bool resetInternalFaces=true) const
Reset the relevant weights and displacements to zero.
Field< vector > vectorField
Specialisation of Field<T> for vector.
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.