36int Foam::blockDescriptor::calcEdgePointsWeights
38 pointField& edgePoints,
39 scalarList& edgeWeights,
42 const gradingDescriptors& expand
46 const Foam::edge thisEdge(blockShape_, cellModelEdge);
48 if (blockEdge::debug && !thisEdge.good())
50 Info<<
"Collapsed edge:" << thisEdge;
53 Info <<
" block:" << index_;
55 Info<<
" model edge:" << cellModelEdge <<
nl;
64 for (
const blockEdge& cedge : blockEdges_)
66 const int cmp = cedge.compare(thisEdge);
73 const lineDivide divEdge(cedge, nDiv, expand);
75 edgePoints = divEdge.points();
76 edgeWeights = divEdge.lambdaDivisions();
85 const lineDivide divEdge(cedge, nDiv,
expand.inv());
88 const scalarList& d = divEdge.lambdaDivisions();
91 edgeWeights.resize(d.size());
94 const label pn = (
p.size() - 1);
97 edgePoints[
pi] =
p[pn -
pi];
98 edgeWeights[
pi] = 1 - d[pn -
pi];
108 const pointField blockPoints(blockShape_.points(vertices_));
112 blockEdges::lineEdge(blockPoints, cellModelEdge),
117 edgePoints = divEdge.points();
118 edgeWeights = divEdge.lambdaDivisions();
134 for (label edgei = 0; edgei < 12; ++edgei)
136 nCurved += calcEdgePointsWeights
157 const gradingDescriptors& gd
160 if (edgei < 0 || edgei >= 12)
163 <<
"Edge label " << edgei
164 <<
" out of range 0..11"
168 const int nCurved = calcEdgePointsWeights
189 if (edgei < 0 || edgei >= 12)
192 <<
"Edge label " << edgei
193 <<
" out of range 0..11"
197 const int nCurved = calcEdgePointsWeights
constexpr scalar pi(M_PI)
void resize(const label len)
Adjust allocated size of list.
int edgesPointsWeights(pointField(&edgesPoints)[12], scalarList(&edgesWeights)[12]) const
Calculate the points and weights for all edges.
bool edgePointsWeights(const label edgei, pointField &edgePoints, scalarList &edgeWeights, const label nDiv, const gradingDescriptors &gd=gradingDescriptors()) const
Calculate points and weights for specified edge, using the specified number of divisions and grading.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
List of gradingDescriptor for the sections of a block with additional IO functionality.
static const Foam::edgeList & modelEdges()
Return the model edges.
const labelVector & sizes() const noexcept
The (i,j,k) addressing dimensions.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
string expand(const std::string &s, const HashTable< string > &mapping, const char sigil='$')
Expand occurrences of variables according to the mapping and return the expanded string.
messageStream Info
Information stream (stdout output on master, null elsewhere).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< scalar > scalarList
List of scalar.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.