Go to the documentation of this file.
52 weights.setSize(toLocal.size());
60 label jPlus1 =
f.fcIndex(j);
61 scalar l =
mag(u[j] - u[jPlus1]);
68 label
pid = toLocal[
f[j]];
69 label jMin1 =
f.rcIndex(j);
74 sumWeight += weights[
pid];
104 label facei = cFaces[iter];
114 u(j) = uVec[toLocal[
f[j]]];
120 label jPlus1 =
f.fcIndex(j);
123 vector temp = u[j] ^ u[jPlus1];
125 scalar magTemp =
mag(temp);
127 if (magTemp < VSMALL)
137 scalar l =
min(
mag(u[j] - u[jPlus1]), 2.0);
145 scalar vNorm =
mag(v);
158 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)
187 label
pid = toLocal[
f[j]];
188 weights[
pid] += vNorm / dist[
pid];
201 label jMin1 =
f.rcIndex(j);
213 calcWeights(toLocal,
f, u, dist, weights);
221 label
pid = toLocal[
f[j]];
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_);
dimensionedScalar tan(const dimensionedScalar &ds)
defineDebugSwitchWithName(pointMVCWeight, "pointMVCWeight", 0)
static constexpr const zero Zero
Global zero (0)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensionedScalar sin(const dimensionedScalar &ds)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Mesh consisting of general polyhedral cells.
static scalar tol
Tolerance used in calculating barycentric coordinates.
#define forAll(list, i)
Loop across all elements in list.
pid_t pid()
Return the PID of this process.
pointMVCWeight(const polyMesh &mesh, const vector &position, const label celli, const label facei=-1)
Construct from components.
VectorSpace< Form, Cmpt, Ncmpts > normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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.
A cell is defined as a list of faces with extra functionality.
dimensionedScalar asin(const dimensionedScalar &ds)