Go to the documentation of this file.
55 else if (first() == 1)
57 vector planeNormal = cd ^ second();
58 scalar magPlaneNormal =
mag(planeNormal);
60 if (magPlaneNormal > 1
e-3)
63 second() = planeNormal/magPlaneNormal;
66 else if (first() == 2)
68 if (
mag(cd & second()) > 1
e-3)
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)
102 if (
mag(second() & pc.
second()) <= (1.0-1
e-3))
124 else if (first() == 1)
126 return I -
sqr(second());
128 else if (first() == 2)
130 return sqr(second());
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)
154 const vector& planeDir = second();
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()
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
const Type2 & second() const
Return second.
Tensor< scalar > tensor
Tensor of scalars.
const Type1 & first() const
Return first.
pointConstraint()
Construct null.
Accumulates point constraints through successive applications of the applyConstraint function.
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionSet transform(const dimensionSet &)
void unconstrainedDirections(label &n, tensor &vecs) const
Return the accumulated unconstrained directions. Directions.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static const sphericalTensor I(1)
void combine(const pointConstraint &)
Combine constraints.
const double e
Elementary charge.
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
label size() const
Return the number of elements in the FixedList.
A 1D vector of objects of type <T> with a fixed size <Size>.
tensor constraintTransformation() const
Return the accumulated constraint transformation tensor.
A 2-tuple for storing two objects of different types.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...