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)
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>.
A 2-tuple for storing two objects of different types.
const label & first() const
Return first.
void unconstrainedDirections(label &n, tensor &vecs) const
Return the accumulated unconstrained directions. Directions.
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.
vector constrainDisplacement(const vector &disp) const
Constrain a displacement.
const vector & second() const
Return second.
dimensioned< scalar > mag(const dimensioned< Type > &)
const doubleScalar e
Elementary charge.
Tensor< scalar > tensor
Tensor of scalars.
pointConstraint()
Construct null.
dimensionSet transform(const dimensionSet &)