Go to the documentation of this file.
34 void Foam::geomDecomp::setOrder()
42 else if (order.size() != 3)
45 <<
"Number of characters in order (" << order <<
") != 3"
49 for (
int i = 0; i < 3; ++i)
55 case 'x':
order_[i] = 0;
break;
56 case 'y':
order_[i] = 1;
break;
57 case 'z':
order_[i] = 2;
break;
61 <<
"Illegal decomposition order " << order <<
nl
62 <<
"It should only contain x, y or z"
70 void Foam::geomDecomp::readCoeffs()
72 coeffsDict_.readIfPresent(
"delta", delta_);
74 coeffsDict_.readEntry(
"n", n_);
76 if (nDomains_ != n_.x()*n_.y()*n_.z())
80 <<
"Wrong number of domain divisions in geomDecomp:" <<
nl
81 <<
"Number of domains : " << nDomains_ <<
nl
82 <<
"Wanted decomposition : " << n_
87 const dictionary* transformDict =
92 csys_ = coordinateSystem(*transformDict);
94 else if (
equal(delta_, 0))
100 const scalar d = 1 - 0.5*delta_*delta_;
101 const scalar d2 =
sqr(d);
103 const scalar a = delta_;
104 const scalar a2 =
sqr(a);
110 a*d - a2*d, a*a2 + d2, -2*a*d,
111 a*d2 + a2, a*d - a2*d, d2 - a2
126 return csys_.localPosition(
points);
135 for (
direction dir = 0; dir < Vector<label>::nComponents; ++dir)
137 if (n_[dir] > 1 && meshDirs[dir] == -1)
140 <<
"Trying to decompose a 1/2D mesh"
141 <<
" into " << n_[dir]
142 <<
" parts in direction "
154 const word& derivedType,
155 const dictionary& decompDict,
159 decompositionMethod(decompDict),
164 coeffsDict_(findCoeffsDict(derivedType +
"Coeffs", select))
172 const word& derivedType,
183 coeffsDict_(findCoeffsDict(derivedType +
"Coeffs", select))
vectorField pointField
pointField is a vectorField.
const dictionary & coeffsDict_
const dictionary & decompDict_
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
Ostream & endl(Ostream &os)
Generic templated field type.
Vector< direction > order_
geomDecomp(const word &derivedType, const dictionary &decompDict, int select=selectionType::DEFAULT)
void checkDecompositionDirections(const Vector< label > &) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base class for domain decomposition.
An user-specified coordinateRotation, primarily to be used internally within coding when the rotation...
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< pointField > adjustPoints(const pointField &) const
#define FatalIOErrorInFunction(ios)
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
bool equal(const T &s1, const T &s2)
#define WarningInFunction
Tensor< scalar > tensor
Tensor of scalars, i.e. Tensor<scalar>.
Base class for coordinate system specification, the default coordinate system type is cartesian .