Go to the documentation of this file.
48 Pout<<
"distanceSurface::createGeometry :updating geometry." <<
endl;
100 surfPtr_().getVolumeType(cc, volType);
117 <<
"getVolumeType failure, neither INSIDE or OUTSIDE"
150 surfPtr_().getVolumeType(cc, volType);
167 <<
"getVolumeType failure, "
168 <<
"neither INSIDE or OUTSIDE"
205 surfPtr_().getVolumeType(pts, volType);
214 Foam::mag(pts[i] - nearest[i].hitPoint());
219 -
Foam::mag(pts[i] - nearest[i].hitPoint());
224 <<
"getVolumeType failure, neither INSIDE or OUTSIDE"
241 Pout<<
"Writing cell distance:" << cellDistance.objectPath() <<
endl;
242 cellDistance.write();
259 Pout<<
"Writing point distance:" << pDist.objectPath() <<
endl;
338 isoSurfCellPtr_(NULL),
358 const word& surfaceType,
359 const word& surfaceName,
361 const bool signedDistance,
387 signed_(signedDistance),
389 regularise_(regularise),
394 isoSurfCellPtr_(NULL),
418 Pout<<
"distanceSurface::expire :"
419 <<
" have-facesPtr_:" << facesPtr_.valid()
420 <<
" needsUpdate_:" << needsUpdate_ <<
endl;
444 Pout<<
"distanceSurface::update :"
445 <<
" have-facesPtr_:" << facesPtr_.valid()
446 <<
" needsUpdate_:" << needsUpdate_ <<
endl;
456 needsUpdate_ =
false;
466 return sampleField(vField);
475 return sampleField(vField);
484 return sampleField(vField);
493 return sampleField(vField);
502 return sampleField(vField);
511 return interpolateField(interpolator);
520 return interpolateField(interpolator);
528 return interpolateField(interpolator);
537 return interpolateField(interpolator);
546 return interpolateField(interpolator);
552 os <<
"distanceSurface: " <<
name() <<
" :"
553 <<
" surface:" << surfPtr_().name()
554 <<
" distance:" << distance_
555 <<
" faces:" << faces().size()
556 <<
" points:" <<
points().size();
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual const pointField & points() const
Return raw points.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
const scalar distance_
Distance value.
A class for handling words, derived from string.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
autoPtr< isoSurfaceCell > isoSurfCellPtr_
Constructed iso surface.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual bool update()
Update the surface as required.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const Switch regularise_
Whether to coarsen.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
autoPtr< faceList > facesPtr_
Triangles converted to faceList.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
const bool signed_
Signed distance.
Mesh consisting of general polyhedral cells.
static const pointMesh & New(const polyMesh &mesh)
A surface formed by the iso value. After "Polygonising A Scalar Field Using Tetrahedrons",...
autoPtr< volScalarField > cellDistancePtr_
Distance to cell centres.
distanceSurface(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
const bool cell_
Whether to use isoSurfaceCell or isoSurface.
virtual bool expire()
Mark the surface as needing an update.
A surface formed by the iso value. After "Regularised Marching Tetrahedra: improved iso-surface extra...
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
Pre-declare SubField and related Field type.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
virtual ~distanceSurface()
Destructor.
InternalField & internalField()
Return internal field.
An abstract class for surfaces with sampling.
static const keyType null
An empty keyType.
autoPtr< isoSurface > isoSurfPtr_
Constructed iso surface.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Generic dimensioned Type class.
Mesh data needed to do the Finite Volume discretisation.
virtual bool needsUpdate() const
Does the surface need an update?
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
virtual void print(Ostream &) const
Write.
scalar distance(const vector &p1, const vector &p2)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const volVectorField & C() const
Return cell centres as volVectorField.
const autoPtr< searchableSurface > surfPtr_
Surface.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
prefixOSstream Pout(cout, "Pout")
static const boundBox greatBox
A very large boundBox: min/max == -/+ VGREAT.
virtual tmp< scalarField > sample(const volScalarField &) const
Sample field on surface.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const word & constant() const
Return constant name.
virtual void clearGeom() const
A bounding box defined in terms of the points at its extremities.
const Time & time() const
Return the top-level database.
void createGeometry()
Create iso surface.
const polyMesh & mesh() const
Access to the underlying mesh.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
scalarField pointDistance_
Distance to points.
Generic GeometricField class.
bool interpolate() const
Interpolation requested for surface.
defineTypeNameAndDebug(combustionModel, 0)
A cell is defined as a list of faces with extra functionality.
word name(const complex &)
Return a string representation of a complex.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
const boundBox bounds_
Optional bounding box to trim triangles against.