Go to the documentation of this file.
50 weights.setSize(toLocal.size());
58 label jPlus1 =
f.fcIndex(j);
59 scalar l =
mag(u[j] - u[jPlus1]);
67 label jMin1 =
f.rcIndex(j);
72 sumWeight += weights[
pid];
102 label faceI = cFaces[iter];
112 u(j) = uVec[toLocal[
f[j]]];
118 label jPlus1 =
f.fcIndex(j);
121 vector temp = u[j] ^ u[jPlus1];
123 scalar magTemp =
mag(temp);
125 if (magTemp < VSMALL)
135 scalar l =
min(
mag(u[j] - u[jPlus1]), 2.0);
143 scalar vNorm =
mag(v);
156 label jPlus1 =
f.fcIndex(j);
164 scalar l =
min(
mag(n0 - n1), 2.0);
174 l =
min(
mag(u[j] - v), 2.0);
180 bool outlierFlag =
false;
183 if (
mag(theta[j]) < tol)
188 weights[
pid] += vNorm / dist[
pid];
201 label jMin1 =
f.rcIndex(j);
213 calcWeights(toLocal,
f, u, dist, weights);
222 label jMin1 =
f.rcIndex(j);
233 scalar sumWeight =
sum(weights);
235 if (
mag(sumWeight) < tol)
239 weights /= sumWeight;
249 const label cellIndex,
250 const label faceIndex
253 cellIndex_((cellIndex != -1) ? cellIndex :
mesh.faceOwner()[faceIndex])
260 toLocal.insert(toGlobal[i], i);
265 weights_.setSize(toGlobal.
size());
277 uVec[
pid] = pt-position;
314 u(j) = uVec[toLocal[
f[j]]];
318 calcWeights(toLocal,
f, u, dist, weights_);
pointMVCWeight(const polyMesh &mesh, const vector &position, const label cellI, const label faceI=-1)
Construct from components.
dimensionedScalar tan(const dimensionedScalar &ds)
defineDebugSwitchWithName(pointMVCWeight, "pointMVCWeight", 0)
#define forAll(list, i)
Loop across all elements in list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensionedScalar sin(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
static scalar tol
Tolerance used in calculating barycentric co-ordinates.
PID_T pid()
Return the PID of this process.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void calcWeights(const Map< label > &toLocal, const face &f, const DynamicList< point > &u, const scalarField &dist, scalarField &weights) const
Calculate weights from single face's vertices only.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
A cell is defined as a list of faces with extra functionality.
dimensionedScalar asin(const dimensionedScalar &ds)