48 const cvControls& foamyHexMeshControls,
49 const searchableSurfaces& allGeometry,
50 const conformationSurfaces& geometryToConformTo
55 foamyHexMeshControls.foamyHexMeshDict().subDict(
"motionControl")
57 geometryToConformTo_(geometryToConformTo),
58 defaultCellSize_(foamyHexMeshControls.defaultCellSize()),
59 minimumCellSize_(foamyHexMeshControls.minimumCellSize()),
60 shapeControlMesh_(runTime),
65 subDict(
"shapeControlFunctions"),
89 cellSizes[i] = cellSize(pts[i]);
101 shapeControlMesh_.barycentricCoords(pt, bary, ch);
105 if (shapeControlMesh_.dimension() < 3)
107 size = sizeAndAlignment_.cellSize(pt);
109 else if (shapeControlMesh_.is_infinite(ch))
134 size = sizeAndAlignment_.cellSize(pt);
138 label nFarPoints = 0;
139 for (
label pI = 0; pI < 4; ++pI)
141 if (ch->vertex(pI)->farPoint())
149 for (
label pI = 0; pI < 4; ++pI)
153 size = ch->vertex(pI)->targetCellSize();
162 size += bary[pI]*ch->vertex(pI)->targetCellSize();
176 shapeControlMesh_.barycentricCoords(pt, bary, ch);
180 if (shapeControlMesh_.dimension() < 3 || shapeControlMesh_.is_infinite(ch))
186 label nFarPoints = 0;
187 for (
label pI = 0; pI < 4; ++pI)
189 if (ch->vertex(pI)->farPoint())
209 for (
label pI = 0; pI < 4; ++pI)
211 if (bary[pI] > small)
213 tri += triad(bary[pI]*ch->vertex(pI)->alignment());
248 shapeControlMesh_.barycentricCoords(pt, bary, ch);
253 if (shapeControlMesh_.dimension() < 3 || shapeControlMesh_.is_infinite(ch))
256 size = sizeAndAlignment_.cellSize(pt);
261 label nFarPoints = 0;
262 for (
label pI = 0; pI < 4; ++pI)
264 if (ch->vertex(pI)->farPoint())
272 for (
label pI = 0; pI < 4; ++pI)
276 size = ch->vertex(pI)->targetCellSize();
277 alignment = ch->vertex(pI)->alignment();
285 for (
label pI = 0; pI < 4; ++pI)
287 size += bary[pI]*ch->vertex(pI)->targetCellSize();
289 if (bary[pI] > small)
291 tri += triad(bary[pI]*ch->vertex(pI)->alignment());
311 for (
label dir = 0; dir < 3; dir++)
315 if (!v.set(dir) || size == 0)
319 scalar dotProd = great;
322 dotProd = v[1] & v[2];
324 v[dir] = v[1] ^ v[2];
328 dotProd = v[0] & v[2];
330 v[dir] = v[0] ^ v[2];
334 dotProd = v[0] & v[1];
336 v[dir] = v[0] ^ v[1];
342 Pout<<
"Dot prod = " << dotProd <<
endl;
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Barycentric< scalar > barycentric
A scalar version of the templated Barycentric.
void cellSizeAndAlignment(const point &pt, scalar &size, tensor &alignment) const
tensor cellAlignment(const point &pt) const
Return the cell alignment at the given location.
~cellShapeControl()
Destructor.
vectorField pointField
pointField is a vectorField.
bool uninitialised(const VertexType &v)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
defineTypeNameAndDebug(combustionModel, 0)
CellSizeDelaunay::Cell_handle Cell_handle
vector point
Point is a vector.
cellShapeControl(const Time &runTime, const cvControls &foamyHexMeshControls, const searchableSurfaces &allGeometry, const conformationSurfaces &geometryToConformTo)
Construct from dictionary and references to conformalVoronoiMesh and.
prefixOSstream Pout(cout, "Pout")
Tensor< scalar > tensor
Tensor of scalars.
scalar cellSize(const point &pt) const
Return the cell size at the given location.