55 else if (
first() == 1)
58 scalar magPlaneNormal =
mag(planeNormal);
60 if (magPlaneNormal > 1
e-3)
63 second() = planeNormal/magPlaneNormal;
66 else if (
first() == 2)
83 else if (
first() == 1)
91 else if (
first() == 2)
95 else if (pc.
first() == 1)
99 else if (pc.
first() == 2)
124 else if (
first() == 1)
128 else if (
first() == 2)
148 vecs[0] =
vector(1, 0, 0);
149 vecs[1] =
vector(0, 1, 0);
150 vecs[2] =
vector(0, 0, 1);
152 else if (
first() == 1)
156 vecs[0] =
vector(1, 0, 0) - planeDir.
x()*planeDir;
158 if (
mag(vecs[0].
x()) < 1
e-3)
160 vecs[0] =
vector(0, 1, 0) - planeDir.
y()*planeDir;
163 vecs[0] /=
mag(vecs[0]);
164 vecs[1] = vecs[0] ^ planeDir;
165 vecs[1] /=
mag(vecs[1]);
167 else if (
first() == 2)
178 tt =
tensor(vecs[0], vecs[1], vecs[2]);
182 void Foam::combineConstraintsEqOp::operator()
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const label & first() const
Return first.
const double e
Elementary charge.
A 1D vector of objects of type <T> with a fixed size <Size>.
A 2-tuple for storing two objects of different types.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Vector< scalar > vector
A scalar version of the templated Vector.
void combine(const pointConstraint &)
Combine constraints.
void applyConstraint(const vector &cd)
Apply and accumulate the effect of the given constraint direction.
static const Identity< scalar > I
Accumulates point constraints through successive applications of the applyConstraint function...
label size() const
Return the number of elements in the FixedList.
tensor constraintTransformation() const
Return the accumulated constraint transformation tensor.
const vector & second() const
Return second.
dimensioned< scalar > mag(const dimensioned< Type > &)
Tensor< scalar > tensor
Tensor of scalars.
pointConstraint()
Construct null.
dimensionSet transform(const dimensionSet &)
void unconstrainedDirections(label &n, tensor &vecs) const
Return the accumulated unconstrained directions. Directions.