45 void Foam::block::createPoints()
80 for (
label j=0; j<=nj; j++)
82 for (
label i=0; i<=ni; i++)
92 scalar wx1 = (1 -
w0)*(1 -
w4)*(1 -
w8) +
w0*(1 -
w5)*(1 -
w9);
97 const scalar sumWx = wx1 + wx2 + wx3 + wx4;
105 scalar wy1 = (1 -
w4)*(1 -
w0)*(1 -
w8) +
w4*(1 -
w1)*(1 -
w11);
110 const scalar sumWy = wy1 + wy2 + wy3 + wy4;
118 scalar wz1 = (1 -
w8)*(1 -
w0)*(1 -
w4) +
w8*(1 -
w3)*(1 -
w7);
123 const scalar sumWz = wz1 + wz2 + wz3 + wz4;
131 const vector edgex1 = p000 + (p100 - p000)*
w0;
132 const vector edgex2 = p010 + (p110 - p010)*
w1;
133 const vector edgex3 = p011 + (p111 - p011)*
w2;
134 const vector edgex4 = p001 + (p101 - p001)*
w3;
136 const vector edgey1 = p000 + (p010 - p000)*
w4;
137 const vector edgey2 = p100 + (p110 - p100)*
w5;
138 const vector edgey3 = p101 + (p111 - p101)*
w6;
139 const vector edgey4 = p001 + (p011 - p001)*
w7;
141 const vector edgez1 = p000 + (p001 - p000)*
w8;
142 const vector edgez2 = p100 + (p101 - p100)*
w9;
143 const vector edgez3 = p110 + (p111 - p110)*
w10;
144 const vector edgez4 = p010 + (p011 - p010)*
w11;
149 wx1*edgex1 + wx2*edgex2 + wx3*edgex3 + wx4*edgex4
150 + wy1*edgey1 + wy2*edgey2 + wy3*edgey3 + wy4*edgey4
151 + wz1*edgez1 + wz2*edgez2 + wz3*edgez3 + wz4*edgez4
159 const vector corx1 = wx1*(p[0][i] - edgex1);
160 const vector corx2 = wx2*(p[1][i] - edgex2);
161 const vector corx3 = wx3*(p[2][i] - edgex3);
162 const vector corx4 = wx4*(p[3][i] - edgex4);
164 const vector cory1 = wy1*(p[4][j] - edgey1);
165 const vector cory2 = wy2*(p[5][j] - edgey2);
166 const vector cory3 = wy3*(p[6][j] - edgey3);
167 const vector cory4 = wy4*(p[7][j] - edgey4);
169 const vector corz1 = wz1*(p[8][
k] - edgez1);
170 const vector corz2 = wz2*(p[9][
k] - edgez2);
171 const vector corz3 = wz3*(p[10][
k] - edgez3);
172 const vector corz4 = wz4*(p[11][
k] - edgez4);
176 corx1 + corx2 + corx3 + corx4
177 + cory1 + cory2 + cory3 + cory4
178 + corz1 + corz2 + corz3 + corz4
192 for (
label ii=0; ii<=ni; ii++)
195 label i = (ii + 1)%(ni + 1);
197 for (
label j=0; j<=nj; j++)
208 (1 -
w0)*(1 -
w4)*(1 -
w8)
222 const scalar sumWf = wf0 + wf1;
244 for (
label jj=0; jj<=nj; jj++)
247 label j = (jj + 1)%(nj + 1);
249 for (
label i=0; i<=ni; i++)
260 (1 -
w4)*(1 -
w1)*(1 -
w8)
274 const scalar sumWf = wf2 + wf3;
296 for (
label kk=0; kk<=nk; kk++)
299 label k = (kk + 1)%(nk + 1);
301 for (
label i=0; i<=ni; i++)
303 for (
label j=0; j<=nj; j++)
312 (1 -
w8)*(1 -
w0)*(1 -
w4)
326 const scalar sumWf = wf4 + wf5;
361 for (
label j=0; j<nj; j++)
363 for (
label i=0; i<ni; i++)
383 void Foam::block::createBoundary()
395 boundaryPatches_[
patchi].setSize(nj*nk);
398 for (
label j=0; j<nj; j++)
413 boundaryPatches_[
patchi].setSize(nj*nk);
417 for (
label j=0; j<nj; j++)
434 boundaryPatches_[
patchi].setSize(ni*nk);
435 for (
label i=0; i<ni; i++)
452 boundaryPatches_[
patchi].setSize(ni*nk);
454 for (
label i=0; i<ni; i++)
473 boundaryPatches_[
patchi].setSize(ni*nj);
475 for (
label i=0; i<ni; i++)
477 for (
label j=0; j<nj; j++)
492 boundaryPatches_[
patchi].setSize(ni*nj);
494 for (
label i=0; i<ni; i++)
496 for (
label j=0; j<nj; j++)
label edgesPointsWeights(pointField(&edgePoints)[12], scalarList(&edgeWeights)[12]) const
Calculate the points and weights for all edges.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool vertex(const label i, const label j, const label k) const
Return true if point i,j,k addresses a block vertex.
const Vector< label > & density() const
Return the mesh density (number of cells) in the i,j,k directions.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label nCells() const
Return the number of cells.
List< FixedList< label, 8 > > cells() const
Return the cells for filling the block.
Vector< scalar > vector
A scalar version of the templated Vector.
label k
Boltzmann constant.
FixedList< pointField, 6 > facePoints(const pointField &points) const
Return the list of face-points for all of the faces of the block.
const point & blockPoint(const label i) const
Return block point for local label i.
label facePointLabel(const label facei, const label i, const label j) const
Face vertex label offset for a particular i,j,k position.
vectorField pointField
pointField is a vectorField.
List< scalar > scalarList
A List of scalars.
bool flatFaceOrEdge(const label i, const label j, const label k) const
Return true if point i,j,k addresses a block flat face or edge.
void correctFacePoints(FixedList< pointField, 6 > &) const
Correct the location of the given face-points.
label nCurvedFaces() const
Number of curved faces in this block.
label nPoints() const
Return the number of points.
void setSize(const label)
Reset size of List.
vector point
Point is a vector.
label pointLabel(const label i, const label j, const label k) const
Vertex label offset for a particular i,j,k position.