Go to the documentation of this file.
31 #include "primitiveMesh.H"
66 point(
c.x() - vec.
x(),
c.y() - vec.
y(),
c.z() - vec.
z())
70 point(
c.x() + vec.
x(),
c.y() - vec.
y(),
c.z() - vec.
z())
74 point(
c.x() + vec.
x(),
c.y() + vec.
y(),
c.z() - vec.
z())
78 point(
c.x() - vec.
x(),
c.y() + vec.
y(),
c.z() - vec.
z())
82 point(
c.x() - vec.
x(),
c.y() - vec.
y(),
c.z() + vec.
z())
86 point(
c.x() + vec.
x(),
c.y() - vec.
y(),
c.z() + vec.
z())
90 point(
c.x() + vec.
x(),
c.y() + vec.
y(),
c.z() + vec.
z())
94 point(
c.x() - vec.
x(),
c.y() + vec.
y(),
c.z() + vec.
z())
156 Info <<
"Original vertices " << *pointsPtr_ <<
endl;
157 Info <<
"Original edges " << *edgesPtr_ <<
endl;
158 Info <<
"Original faces " << *facesPtr_ <<
endl;
177 tol_(SMALL * bb.
mag()),
201 if( cFacesPtr_ || cPtsPtr_ || cEdgesPtr_ )
205 "void meshUntangler::"
206 "cutRegion::planeCut(const plane& plane)"
223 this->createPolyMeshFromRegion(pmg);
226 if( findNewVertices(
plane) )
232 if( !valid_ )
return;
235 pointsPtr_ = cPtsPtr_;
239 edgesPtr_ = cEdgesPtr_;
243 facesPtr_ = cFacesPtr_;
255 points.setSize(pointsPtr_->size());
257 points[pI] = (*pointsPtr_)[pI];
262 cells[0].setSize(facesPtr_->size());
263 faces.
setSize(facesPtr_->size());
274 Info <<
"Edges forming face " << fI <<
" are " << fEdges <<
endl;
279 "void meshOptimizer::meshUntangler::"
280 "cutRegion::createPolyMeshFromRegion(polyMesgGen&)"
285 faces[fI][pI] =
sf[0][pI];
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
void planeCut(const plane &plane)
cut the region woth the plane
const point & max() const
Maximum describing the bounding box.
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
const DynList< DynList< label > > & sortedChains() const
a list of points which have not yet been resolved
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
Geometric class that creates a 2D plane and can return the intersection point between a line and the ...
Registry of regIOobjects.
void deleteDemandDrivenData(DataPtr &dataPtr)
cellListPMG & cellsAccess()
access to cells
void createInitialConfiguration(const boundBox &)
void setSize(const label nElmts)
set the number of used elements
const point & min() const
Minimum describing the bounding box.
pointFieldPMG & pointsAccess()
access to mesh points
errorManip< error > abort(error &err)
volScalarField sf(fieldObject, mesh)
void setSize(const label)
Reset size of List.
A bounding box defined in terms of the points at its extremities.
const dimensionedScalar c
Speed of light in a vacuum.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
faceListPMG & facesAccess()
access to mesh faces
vector point
Point is a vector.
static word controlDictName
The default control dictionary name (normally "controlDict")
cutRegion(const boundBox &)
Construct from boundBox.
void createPolyMeshFromRegion(polyMeshGen &) const
export the feasible region as polyMeshGen
void append(const T &e)
Append an element at the end of the list.