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)
97 applyConstraint(pc.
second());
99 else if (pc.
first() == 2)
124 else if (
first() == 1)
128 else if (
first() == 2)
151 vecs[0] =
vector(1, 0, 0);
152 vecs[1] =
vector(0, 1, 0);
153 vecs[2] =
vector(0, 0, 1);
155 else if (
first() == 1)
159 vecs[0] =
vector(1, 0, 0) - planeDir.
x()*planeDir;
161 if (
mag(vecs[0].
x()) < 1
e-3)
163 vecs[0] =
vector(0, 1, 0) - planeDir.
y()*planeDir;
166 vecs[0] /=
mag(vecs[0]);
167 vecs[1] = vecs[0] ^ planeDir;
168 vecs[1] /=
mag(vecs[1]);
170 else if (
first() == 2)
181 tt =
tensor(vecs[0], vecs[1], vecs[2]);
196 else if (
first() == 1)
201 else if (
first() == 2)
214 inline void Foam::combineConstraintsEqOp::operator()
A 1D vector of objects of type <T> with a fixed size <Size>.
label size() const
Return the number of elements in the FixedList.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 2-tuple for storing two objects of different types.
const Type2 & second() const
Return second.
const Type1 & first() const
Return first.
Accumulates point constraints through successive applications of the applyConstraint function.
void combine(const pointConstraint &)
Combine constraints.
void applyConstraint(const vector &cd)
Apply and accumulate the effect of the given constraint direction.
pointConstraint()
Construct null.
tensor constraintTransformation() const
Return the accumulated constraint transformation tensor.
void unconstrainedDirections(label &n, tensor &vecs) const
Return the accumulated unconstrained directions. Directions.
vector constrainDisplacement(const vector &disp) const
Constrain a displacement.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Tensor< scalar > tensor
Tensor of scalars.
labelList second(const UList< labelPair > &p)
static const Identity< scalar > I
labelList first(const UList< labelPair > &p)
Vector< scalar > vector
A scalar version of the templated Vector.
dimensionSet transform(const dimensionSet &)
dimensioned< scalar > mag(const dimensioned< Type > &)