Go to the documentation of this file.
53 Info <<
"Smoothing mesh surface before mapping." <<
endl;
69 # pragma omp parallel for schedule(dynamic, 20)
73 const point&
c = faceCentres[bfI];
74 const face& bf = bFaces[bfI];
84 for(
label iterI=0;iterI<nIterations;++iterI)
89 # pragma omp parallel for schedule(dynamic, 50)
93 const face& bf = bFaces[bfI];
107 faceCentres[bfI] -
vector(boxSize, boxSize, boxSize),
108 faceCentres[bfI] +
vector(boxSize, boxSize, boxSize)
115 forAll(containedLeaves, clI)
121 patches.appendIfNotIn(surf[ct[i]].region());
124 scalar metric(VGREAT);
138 boundaryPointPatches[bp[bf[pI]]].appendIfNotIn(bestPatch);
143 # pragma omp parallel for schedule(dynamic, 40)
153 const label bfI = pointFaces(bpI, pfI);
154 const point& fc = faceCentres[pointFaces(bpI, pfI)];
155 const label pos = pointInFace(bpI, pfI);
164 preMapPositions[bpI] = lp;
173 bpAtProcsPtr = &bpAtProcs;
180 std::map<label, LongList<labelledPointScalar> > exchangeData;
193 const label bpI = it();
197 const label neiProc = bpAtProcs(bpI, procI);
202 exchangeData[neiProc].append
206 globalPointLabel[bpI],
208 preMapPositions[bpI].scalarValue()
236 # pragma omp parallel for schedule(dynamic, 50)
238 forAll(boundaryPoints, bpI)
250 if( boundaryPointPatches[bpI].size() == 1 )
258 boundaryPointPatches[bpI][0],
269 boundaryPointPatches[bpI]
273 const point newP =
p + 0.5 * (pMap -
p);
277 if( bpAtProcsPtr && bpAtProcsPtr->
sizeOfRow(bpI) )
280 # pragma omp critical
307 Info <<
"Finished smoothing mesh surface before mapping." <<
endl;
const vectorField & faceCentres() const
const VRWGraph & bpAtProcs() const
processors which contain the vertex
const VRWGraph & pointInFaces() const
const labelList & bp() const
void append(const T &e)
Append an element at the end of the list.
const scalar & scalarValue() const
return scalar value
const meshSurfaceEngine & surfaceEngine_
mesh surface
volScalarField w(IOobject("w", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("w", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
scalar faceMetricInPatch(const label bfI, const label patchI) const
calculate face metric
#define forAll(list, i)
Loop across all elements in list.
const labelList & globalBoundaryPointLabel() const
global boundary point label
Template functions to aid in the implementation of demand driven data.
A List obtained as a section of another List.
void containedTriangles(const label, DynList< label > &) const
static bool & parRun()
Is this a parallel run?
const point & coordinates() const
return point coordinates
const DynList< label > & bpNeiProcs() const
communication matrix for sending point data
const VRWGraph & pointFaces() const
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
void findLeavesContainedInBox(const boundBox &, DynList< const meshOctreeCube *, 256 > &) const
find leaves contained in the box
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
bool untangleSurface(const labelLongList &activeBoundaryPoints, const label nAdditionalLayers=0)
runs a surface smoother on the selected boundary points
const faceList::subList & boundaryFaces() const
void mapToSmallestDistance(LongList< parMapperHelper > &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
void moveBoundaryVertexNoUpdate(const label bpI, const point &newP)
relocate the selected boundary vertex
bool findNearestPointToPatches(point &nearest, scalar &distSq, const point &p, const DynList< label > &patches, const scalar tol=1e-4) const
find the nearest vertex to the given patches
#define forAllRow(graph, rowI, index)
const pointFieldPMG & points() const
PtrList< coordinateSystem > coordinates(solidRegions.size())
label sizeOfRow(const label rowI) const
Returns the number of elements in the given row.
void preMapVertices(const label nIterations=3)
void updateGeometry(const labelLongList &)
Vector< scalar > vector
A scalar version of the templated Vector.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setSize(const label)
Reset size of List.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label pointLabel() const
return point label
void exchangeMap(const std::map< label, ListType > &m, LongList< T > &data, const Pstream::commsTypes commsType)
A bounding box defined in terms of the points at its extremities.
const dimensionedScalar c
Speed of light in a vacuum.
const labelList & boundaryPoints() const
A face is a list of labels corresponding to mesh vertices.
const Map< label > & globalToLocalBndPointAddressing() const
global point label to local label. Only for processors points
void size(const label)
Override size to be inconsistent with allocated storage.
void findNearestSurfacePointInRegion(point &nearest, scalar &distSq, label &nearestTriangle, const label region, const point &p) const
find nearest surface point for vertex in a given region
const triSurf & surface() const
return a reference to the surface
label size() const
Return the number of elements in the UList.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
const meshOctree & meshOctree_
reference to the octree
dimensionedScalar pos(const dimensionedScalar &ds)