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();
A 1D vector of objects of type <T> with a fixed length <N>.
static constexpr label size() noexcept
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 dissimilar types. The container is similar in purpose to std::pa...
const T1 & first() const noexcept
Return first.
const T2 & second() const noexcept
Return second.
const Cmpt & y() const
Access to the vector y component.
const Cmpt & x() const
Access to the vector x component.
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
Accumulates point constraints through successive applications of the applyConstraint function.
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.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
static const Identity< scalar > I
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)