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]]];
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);
172 scalar l =
min(
mag(n0 - n1), 2.0);
179 alpha[j] = -alpha[j];
182 l =
min(
mag(u[j] - v), 2.0);
188 bool outlierFlag =
false;
191 if (
mag(theta[j]) < tol)
196 weights[
pid] += vNorm / dist[
pid];
221 calcWeights(toLocal, f, u, dist, weights);
230 label jMin1 = f.rcIndex(j);
241 scalar sumWeight =
sum(weights);
243 if (
mag(sumWeight) < tol)
247 weights /= sumWeight;
257 const label cellIndex,
258 const label faceIndex
261 cellIndex_((cellIndex != -1) ? cellIndex : mesh.
faceOwner()[faceIndex])
268 toLocal.
insert(toGlobal[i], i);
273 weights_.setSize(toGlobal.
size());
285 uVec[
pid] = pt-position;
322 u(j) = uVec[toLocal[f[j]]];
326 calcWeights(toLocal, f, u, dist, weights_);
const labelListList & cellPoints() const
dimensioned< scalar > mag(const dimensioned< Type > &)
A cell is defined as a list of faces with extra functionality.
defineDebugSwitchWithName(pointMVCWeight,"pointMVCWeight", 0)
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void size(const label)
Override size to be inconsistent with allocated storage.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
const cellList & cells() const
A face is a list of labels corresponding to mesh vertices.
void setSize(const label)
Reset size of List.
virtual const pointField & points() const
Return raw points.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
label size() const
Return number of elements in table.
virtual const labelList & faceOwner() const
Return face owner.
dimensionedScalar tan(const dimensionedScalar &ds)
pid_t pid()
Return the PID of this process.
Mesh consisting of general polyhedral cells.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
static scalar tol
Tolerance used in calculating barycentric co-ordinates.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
virtual const faceList & faces() const
Return raw faces.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
pointMVCWeight(const polyMesh &mesh, const vector &position, const label cellI, const label faceI=-1)
Construct from components.
dimensionedScalar asin(const dimensionedScalar &ds)
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.
dimensionedScalar sin(const dimensionedScalar &ds)