39namespace patchDistMethods
47Foam::patchDistMethods::exact::patchSurface()
const
61 treeBoundBox(localBb).extend(
rndGen, 1E-3)
77 dict.
add(
"mergeDistance", 1
e-6*localBb.mag());
80 Info<<
"Triangulating local patch faces" <<
nl <<
endl;
86 new distributedTriSurfaceMesh
108 Info<<
"Redistributing surface" <<
nl <<
endl;
109 autoPtr<mapDistribute>
faceMap;
110 autoPtr<mapDistribute> pointMap;
111 patchSurfPtr_().distribute
121 return patchSurfPtr_();
176 if (info[cellI].hit())
178 const point& cc = mesh_.cellCentres()[cellI];
179 y[cellI] =
mag(cc-info[cellI].hitPoint());
187 y.correctBoundaryConditions();
191 OBJstream str(mesh_.time().timePath()/
"wallPoint.obj");
192 Info<<
type() <<
": dumping nearest wall point to " << str.
name()
194 forAll(mesh_.cellCentres(), cellI)
196 const point& cc = mesh_.cellCentres()[cellI];
206 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.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual label triangulate()
Triangulate in-place, returning the number of triangles added.
OFstream that keeps track of vertices.
virtual Ostream & write(const char c)
Write character.
virtual const fileName & name() const
Read/write access to the name of the stream.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
const word & constant() const
Return constant name.
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.
const labelHashSet patchIDs_
Set of patch IDs.
Calculation of exact distance to nearest patch for all cells and boundary by constructing a search tr...
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const pointField & points() const
Return raw points.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
line< point, const point & > linePointRef
A line using referred points.
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
bool notNull(const T *ptr)
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(boundBox(coarseMesh.points(), false)).extend(rndGen, 1e-3))
#define forAll(list, i)
Loop across all elements in list.