Go to the documentation of this file.
57 else if (first() == 1)
59 vector planeNormal = cd ^ second();
60 scalar magPlaneNormal =
mag(planeNormal);
62 if (magPlaneNormal > 1
e-3)
65 second() = planeNormal/magPlaneNormal;
68 else if (first() == 2)
70 if (
mag(cd & second()) > 1
e-3)
85 else if (first() == 1)
93 else if (first() == 2)
97 else if (pc.
first() == 1)
99 applyConstraint(pc.
second());
101 else if (pc.
first() == 2)
104 if (
mag(second() & pc.
second()) <= (1.0-1
e-3))
126 else if (first() == 1)
128 return I -
sqr(second());
130 else if (first() == 2)
132 return sqr(second());
153 vecs[0] =
vector(1, 0, 0);
154 vecs[1] =
vector(0, 1, 0);
155 vecs[2] =
vector(0, 0, 1);
157 else if (first() == 1)
159 const vector& planeDir = second();
161 vecs[0] =
vector(1, 0, 0) - planeDir.
x()*planeDir;
163 if (
mag(vecs[0].
x()) < 1
e-3)
165 vecs[0] =
vector(0, 1, 0) - planeDir.
y()*planeDir;
168 vecs[0] /=
mag(vecs[0]);
169 vecs[1] = vecs[0] ^ planeDir;
170 vecs[1] /=
mag(vecs[1]);
172 else if (first() == 2)
183 tt =
tensor(vecs[0], vecs[1], vecs[2]);
198 else if (first() == 1)
201 cd = d-(d&second())*second();
203 else if (first() == 2)
206 cd = (d&second())*second();
216 inline void Foam::combineConstraintsEqOp::operator()
const Cmpt & x() const
Access to the vector x component.
static constexpr const zero Zero
Global zero (0)
pointConstraint()
Construct null.
Accumulates point constraints through successive applications of the applyConstraint function.
static constexpr label size() noexcept
Return the number of elements in the FixedList.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
void unconstrainedDirections(label &n, tensor &vecs) const
Return the accumulated unconstrained directions. Directions.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void combine(const pointConstraint &)
Combine constraints.
vector constrainDisplacement(const vector &disp) const
Constrain a displacement.
Vector< scalar > vector
A scalar version of the templated Vector.
void applyConstraint(const vector &cd)
Apply and accumulate the effect of the given constraint direction.
const Cmpt & y() const
Access to the vector y component.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A 1D vector of objects of type <T> with a fixed length <N>.
const dimensionedScalar e
Elementary charge.
const T2 & second() const noexcept
Return second.
tensor constraintTransformation() const
Return the accumulated constraint transformation tensor.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
const T1 & first() const noexcept
Return first.
Tensor< scalar > tensor
Tensor of scalars, i.e. Tensor<scalar>.
static const Identity< scalar > I