47Foam::patchDistMethods::exact::patchSurface()
const
61 localBb.extend(
rndGen, 1E-3)
76 dict_.
add(
"mergeDistance", 1
e-6*localBb.mag());
78 Info<<
"Triangulating local patch faces" <<
nl <<
endl;
106 Info<<
"Redistributing surface" <<
nl <<
endl;
109 patchSurfPtr_().distribute
119 return patchSurfPtr_();
125Foam::patchDistMethods::exact::exact
137Foam::patchDistMethods::exact::exact
175 if (info[celli].hit())
177 const point& cc = mesh_.cellCentres()[celli];
178 y[celli] = info[celli].point().dist(cc);
186 y.correctBoundaryConditions();
190 OBJstream str(mesh_.time().timePath()/
"wallPoint.obj");
191 Info<<
type() <<
": dumping nearest wall point to "
192 << str.name() <<
endl;
193 forAll(mesh_.cellCentres(), celli)
195 const point& cc = mesh_.cellCentres()[celli];
196 str.writeLine(cc, info[celli].
point());
205 n.correctBoundaryConditions();
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const polyBoundaryMesh & pbm
static const this_type & null() noexcept
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An OFstream that keeps track of vertices and provides convenience output methods for OBJ files.
Ostream & writeLine(const point &p0, const point &p1)
Write line joining two points.
virtual const fileName & name() const override
Read/write access to the name of the stream.
const word & constant() const noexcept
Return constant name.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void clear() noexcept
Same as reset(nullptr).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
IOoject and searching on distributed triSurface. All processor hold (possibly overlapping) part of th...
static const Enum< distributionType > distributionTypeNames_
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Specialisation of patchDist for wall distance calculation.
const fvMesh & mesh_
Reference to the mesh.
patchDistMethod(const patchDistMethod &)=delete
No copy construct.
const labelHashSet patchIDs_
Set of patch IDs.
const labelHashSet & patchIDs() const
Return the patchIDs.
Calculation of exact distance to nearest patch for all cells and boundary by constructing a search tr...
virtual bool correct(volScalarField &y)
Correct the given distance-to-patch field.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
virtual const pointField & points() const
Return raw points.
Standard boundBox with extra functionality for use in octree.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Namespace for handling debugging switches.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
GeometricField< vector, fvPatchField, volMesh > volVectorField
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
vector point
Point is a vector.
bool notNull(const T *ptr) noexcept
True if ptr is not a pointer (of type T) to the nullObject.
constexpr char nl
The newline '\n' character (0x0a).
List< treeBoundBox > meshBb(1, treeBoundBox(coarseMesh.points()).extend(rndGen, 1e-3))
#define forAll(list, i)
Loop across all elements in list.