meshSurfaceMapper2DMapVertices.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
11  cfMesh is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation; either version 3 of the License, or (at your
14  option) any later version.
15 
16  cfMesh is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
23 
24 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "meshOctree.H"
29 #include "triSurf.H"
30 #include "triSurfacePartitioner.H"
31 #include "meshSurfaceMapper2D.H"
32 #include "meshSurfaceEngine.H"
33 #include "polyMeshGen2DEngine.H"
35 #include "meshSurfacePartitioner.H"
36 #include "labelledScalar.H"
37 #include "polyMeshGenAddressing.H"
38 #include "boundBox.H"
39 
40 #include "helperFunctionsPar.H"
41 
42 # ifdef USE_OMP
43 #include <omp.h>
44 # endif
45 
46 //#define DEBUGMapping
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
56 (
57  const labelLongList& edgesToMap,
58  std::map<label, scalar>& mappingDistance
59 ) const
60 {
61  const vectorField& faceCentres = surfaceEngine_.faceCentres();
62  const VRWGraph& eFaces = surfaceEngine_.edgeFaces();
63  const edgeList& edges = surfaceEngine_.edges();
64  const pointFieldPMG& points = surfaceEngine_.points();
65 
66  //- generate search distance for corner edges
67  mappingDistance.clear();
68  forAll(edgesToMap, i)
69  {
70  const label beI = edgesToMap[i];
71 
72  mappingDistance.insert(std::make_pair(beI, 0.0));
73  std::map<label, scalar>::iterator mIter = mappingDistance.find(beI);
74 
75  const point p = edges[beI].centre(points);
76  forAllRow(eFaces, beI, efI)
77  {
78  const scalar d = magSqr(faceCentres[eFaces(beI, efI)] - p);
79  mIter->second = Foam::max(mIter->second, d);
80  }
81 
82  //- safety factor
83  mIter->second *= 16.0;
84  }
85 
86  if( Pstream::parRun() )
87  {
88  //- make sure that corner edges at parallel boundaries
89  //- have the same range in which they accept the corners
90  const VRWGraph& beAtProcs = surfaceEngine_.beAtProcs();
91  const labelList& globalEdgeLabel =
92  surfaceEngine_.globalBoundaryEdgeLabel();
93  const Map<label>& globalToLocal =
94  surfaceEngine_.globalToLocalBndEdgeAddressing();
95 
96  //- create the map for exchanging data
97  std::map<label, DynList<labelledScalar> > exchangeData;
98  const DynList<label>& neiProcs = surfaceEngine_.beNeiProcs();
99  forAll(neiProcs, i)
100  exchangeData.insert
101  (
102  std::make_pair(neiProcs[i], DynList<labelledScalar>()));
103 
104  forAll(edgesToMap, eI)
105  {
106  const label beI = edgesToMap[eI];
107 
108  forAllRow(beAtProcs, beI, i)
109  {
110  const label neiProc = beAtProcs(beI, i);
111  if( neiProc == Pstream::myProcNo() )
112  continue;
113 
114  exchangeData[neiProc].append
115  (
116  labelledScalar(globalEdgeLabel[beI], mappingDistance[beI])
117  );
118  }
119  }
120 
121  //- exchange data between processors
122  LongList<labelledScalar> receivedData;
123  help::exchangeMap(exchangeData, receivedData);
124 
125  //- select the maximum mapping distance for processor points
126  forAll(receivedData, i)
127  {
128  const labelledScalar& ls = receivedData[i];
129 
130  const label beI = globalToLocal[ls.scalarLabel()];
131 
132  //- choose the maximum value for the mapping distance
133  std::map<label, scalar>::iterator mIter = mappingDistance.find(beI);
134  mIter->second = Foam::max(mIter->second, ls.value());
135  }
136  }
137 }
138 
140 {
141  if( !Pstream::parRun() )
142  return;
143 
144  std::map<label, LongList<parMapperHelper> > exchangeData;
145  const DynList<label>& neiProcs = surfaceEngine_.beNeiProcs();
146  forAll(neiProcs, i)
147  exchangeData.insert
148  (
149  std::make_pair(neiProcs[i], LongList<parMapperHelper>())
150  );
151 
152  const labelList& bp = surfaceEngine_.bp();
153  const edgeList& edges = surfaceEngine_.edges();
154  const VRWGraph& beAtProcs = surfaceEngine_.beAtProcs();
155  const labelList& globalEdgeLabel =
157  const Map<label>& globalToLocal =
160 
161  Map<label> beToList(parE.size());
162 
163  forAll(parE, i)
164  {
165  const label beI = parE[i].globalLabel();
166  beToList.insert(beI, i);
167 
168  forAllRow(beAtProcs, beI, procI)
169  {
170  const label neiProc = beAtProcs(beI, procI);
171  if( neiProc == Pstream::myProcNo() )
172  continue;
173 
174  exchangeData[neiProc].append
175  (
177  (
178  parE[i].coordinates(),
179  parE[i].movingDistance(),
180  globalEdgeLabel[beI],
181  parE[i].pointPatch()
182  )
183  );
184  }
185  }
186 
187  //- exchange data
188  LongList<parMapperHelper> receivedData;
189  help::exchangeMap(exchangeData, receivedData);
190 
191  //- select the point with the smallest moving distance
193  forAll(receivedData, i)
194  {
195  const parMapperHelper& ph = receivedData[i];
196 
197  const label beI = globalToLocal[ph.globalLabel()];
198 
199  parMapperHelper& phOrig = parE[beToList[beI]];
200  if( phOrig.movingDistance() < ph.movingDistance() )
201  {
202  const edge& e = edges[beI];
203 
204  point newP = ph.coordinates();
205 
206  newP.z() = points[e.start()].z();
207  surfModifier.moveBoundaryVertex(bp[e.start()], newP);
208 
209  newP.z() = points[e.end()].z();
210  surfModifier.moveBoundaryVertex(bp[e.end()], newP);
211 
212  phOrig = ph;
213  }
214  }
215 
216  surfModifier.updateVertexNormals();
217 }
218 
220 {
221  //- create the bounding box of the surface mesh
222  const boundBox sbb(meshOctree_.surface().points());
223 
224  const labelList& bp = surfaceEngine_.bp();
226 
228 
230  const boolList& minZPoint = mesh2DEngine.zMinPoints();
231  const boolList& maxZPoint = mesh2DEngine.zMaxPoints();
232 
233  # ifdef USE_OMP
234  # pragma omp parallel for schedule(dynamic, 50)
235  # endif
236  forAll(minZPoint, pointI)
237  {
238  point newP = points[pointI];
239 
240  if( minZPoint[pointI] )
241  {
242  newP.z() = sbb.min().z();
243  }
244  else if( maxZPoint[pointI] )
245  {
246  newP.z() = sbb.max().z();
247  }
248  else
249  {
251  (
252  "void meshSurfaceMapper2D::adjustZCoordinates()"
253  ) << "This mesh is not in the x-y plane!" << exit(FatalError);
254  }
255 
256  modifier.moveBoundaryVertexNoUpdate(bp[pointI], newP);
257  }
258 
259  modifier.updateGeometry();
260 }
261 
263 {
264  labelLongList edgesToMap;
265 
267  edgesToMap.append(activeBoundaryEdges_[beI]);
268 
269  mapVerticesOntoSurface(edgesToMap);
270 }
271 
273 {
274  const edgeList& edges = surfaceEngine_.edges();
275  const labelList& bp = surfaceEngine_.bp();
277 
278  const VRWGraph* beAtProcsPtr(NULL);
279  if( Pstream::parRun() )
280  beAtProcsPtr = &surfaceEngine_.beAtProcs();
281 
282  labelLongList nodesToMap;
283  forAll(edgesToMap, i)
284  {
285  const edge& e = edges[edgesToMap[i]];
286  nodesToMap.append(bp[e.start()]);
287  nodesToMap.append(bp[e.end()]);
288  }
289 
290  meshSurfaceEngineModifier surfaceModifier(surfaceEngine_);
291  LongList<parMapperHelper> parallelBndEdges;
292 
293  # ifdef USE_OMP
294  const label size = edgesToMap.size();
295  # pragma omp parallel for if( size > 1000 ) shared(parallelBndEdges) \
296  schedule(dynamic, Foam::max(1, size / (3 * omp_get_max_threads())))
297  # endif
298  forAll(edgesToMap, i)
299  {
300  const label beI = edgesToMap[i];
301  const edge& e = edges[beI];
302 
303  # ifdef DEBUGMapping
304  Info << nl << "Mapping edge " << beI << " with nodes "
305  << e << endl;
306  # endif
307 
308  label patch, nt;
309  point mapPoint;
310  scalar dSq;
311 
313  (
314  mapPoint,
315  dSq,
316  nt,
317  patch,
318  points[e.start()]
319  );
320 
321  mapPoint.z() = points[e.start()].z();
322  surfaceModifier.moveBoundaryVertexNoUpdate(bp[e.start()], mapPoint);
323 
324  mapPoint.z() = points[e.end()].z();
325  surfaceModifier.moveBoundaryVertexNoUpdate(bp[e.end()], mapPoint);
326 
327  if( beAtProcsPtr && beAtProcsPtr->sizeOfRow(beI) )
328  {
329  # ifdef USE_OMP
330  # pragma omp critical
331  # endif
332  parallelBndEdges.append
333  (
335  (
336  mapPoint,
337  dSq,
338  beI,
339  patch
340  )
341  );
342  }
343 
344  # ifdef DEBUGMapping
345  Info << "Mapped edge " << edges[beI] << endl;
346  # endif
347  }
348 
349  surfaceModifier.updateGeometry(nodesToMap);
350 
351  mapToSmallestDistance(parallelBndEdges);
352 }
353 
355 {
356  const edgeList& edges = surfaceEngine_.edges();
357 
358  const meshSurfacePartitioner& mPart = meshPartitioner();
359  const labelHashSet& cornerPoints = mPart.corners();
360 
361  labelLongList selectedEdges;
363  {
364  const edge& e = edges[activeBoundaryEdges_[eI]];
365 
366  if( cornerPoints.found(e.start()) || cornerPoints.found(e.end()) )
367  selectedEdges.append(activeBoundaryEdges_[eI]);
368  }
369 
370  mapCorners(selectedEdges);
371 }
372 
374 {
375  const meshSurfacePartitioner& mPart = meshPartitioner();
376  const labelHashSet& corners = mPart.corners();
377  const VRWGraph& pPatches = mPart.pointPatches();
378 
380  const edgeList& edges = surfaceEngine_.edges();
381  const labelList& bp = surfaceEngine_.bp();
382 
383  std::map<label, scalar> mappingDistance;
384  findMappingDistance(edgesToMap, mappingDistance);
385 
386  //- for every corner in the mesh surface find the nearest corner in the
387  //- triSurface
389 
390  # ifdef USE_OMP
391  # pragma omp parallel for if( edgesToMap.size() > 10 )
392  # endif
393  forAll(edgesToMap, eI)
394  {
395  const label beI = edgesToMap[eI];
396  const edge& be = edges[beI];
397 
398  const label bps = bp[be.start()];
399  const label bpe = bp[be.end()];
400 
401  DynList<label> ePatches;
402  forAllRow(pPatches, bps, i)
403  {
404  if( pPatches.contains(bpe, pPatches(bps, i)) )
405  ePatches.append(pPatches(bps, i));
406  }
407 
408  if( !corners.found(bps) || !corners.found(bpe) )
410  (
411  "meshSurfaceMapper2D::mapCorners(const labelLongList&)"
412  ) << "Trying to map a point that is not a corner"
413  << abort(FatalError);
414 
415  const point& p = points[be.start()];
416  const scalar maxDist = mappingDistance[beI];
417 
418  //- find the nearest position to the given point patches
419  point mapPointApprox(p);
420  scalar distSqApprox;
421 
422  label iter(0);
423  while( iter++ < 40 )
424  {
425  point newP(vector::zero);
426  forAll(ePatches, epI)
427  {
428  point np;
429  label nt;
431  (
432  np,
433  distSqApprox,
434  nt,
435  ePatches[epI],
436  mapPointApprox
437  );
438 
439  newP += np;
440  }
441 
442  newP /= ePatches.size();
443  if( magSqr(newP - mapPointApprox) < 1e-8 * maxDist )
444  break;
445 
446  mapPointApprox = newP;
447  }
448 
449  distSqApprox = magSqr(mapPointApprox - p);
450 
451  //- find the nearest triSurface corner for the given corner
452  scalar distSq;
453  point mapPoint;
454  label nse;
455  meshOctree_.findNearestEdgePoint(mapPoint, distSq, nse, p, ePatches);
456 
457  if( distSq > mappingDistance[beI] )
458  {
459  const vector disp = mapPoint - p;
460 
461  mapPoint = Foam::sqrt(mappingDistance[beI] / distSq) * disp + p;
462  distSq = mappingDistance[beI];
463  }
464 
465  if( distSq > 1.2 * distSqApprox )
466  {
467  mapPoint = mapPointApprox;
468  }
469 
470  //- move the point to the nearest corner
471  mapPoint.z() = points[be.start()].z();
472  sMod.moveBoundaryVertexNoUpdate(bps, mapPoint);
473 
474  mapPoint.z() = points[be.end()].z();
475  sMod.moveBoundaryVertexNoUpdate(bpe, mapPoint);
476  }
477 
478  labelLongList nodesToMap;
479  forAll(edgesToMap, eI)
480  {
481  const edge& be = edges[edgesToMap[eI]];
482 
483  nodesToMap.append(bp[be.start()]);
484  nodesToMap.append(bp[be.end()]);
485  }
486 
487  sMod.updateGeometry(nodesToMap);
488 }
489 
491 {
492  labelLongList edgesToMap;
493 
495  edgesToMap.append(activeBoundaryEdges_[beI]);
496 
497  mapVerticesOntoSurfacePatches(edgesToMap);
498 }
499 
501 (
502  const labelLongList& edgesToMap
503 )
504 {
505  //- map the selected edges on their patches
506  const edgeList& edges = surfaceEngine_.edges();
507  const pointFieldPMG& points = surfaceEngine_.points();
508  const VRWGraph& edgePatches = surfaceEngine_.edgePatches();
509  const labelList& bp = surfaceEngine_.bp();
510 
511  const VRWGraph* beAtProcsPtr(NULL);
512  if( Pstream::parRun() )
513  beAtProcsPtr = &surfaceEngine_.beAtProcs();
514 
515  meshSurfaceEngineModifier surfaceModifier(surfaceEngine_);
516  LongList<parMapperHelper> parallelBndEdges;
517  labelLongList selectedCorners;
518 
519  # ifdef USE_OMP
520  const label size = edgesToMap.size();
521  # pragma omp parallel for if( size > 1000 ) shared(parallelBndEdges) \
522  schedule(dynamic, Foam::max(50, size / (3 * omp_get_max_threads())))
523  # endif
524  forAll(edgesToMap, nI)
525  {
526  const label beI = edgesToMap[nI];
527 
528  if( edgePatches.sizeOfRow(beI) == 2 )
529  {
530  # ifdef USE_OMP
531  # pragma omp critical
532  # endif
533  selectedCorners.append(beI);
534 
535  continue;
536  }
537 
538  const edge& e = edges[beI];
539 
540  const point& p = points[e.start()];
541  point mapPoint;
542  scalar dSq;
543  label nt;
544 
545  meshOctree_.findNearestSurfacePointInRegion
546  (
547  mapPoint,
548  dSq,
549  nt,
550  edgePatches(beI, 0),
551  p
552  );
553 
554  mapPoint.z() = points[e.start()].z();
555  surfaceModifier.moveBoundaryVertexNoUpdate(bp[e.start()], mapPoint);
556 
557  mapPoint.z() = points[e.end()].z();
558  surfaceModifier.moveBoundaryVertexNoUpdate(bp[e.end()], mapPoint);
559 
560  if( beAtProcsPtr && beAtProcsPtr->sizeOfRow(beI) )
561  {
562  # ifdef USE_OMP
563  # pragma omp critical
564  # endif
565  parallelBndEdges.append
566  (
568  (
569  mapPoint,
570  dSq,
571  beI,
572  -1
573  )
574  );
575  }
576 
577  # ifdef DEBUGMapping
578  Info << "Mapped edge " << edges[beI] << endl;
579  # endif
580  }
581 
582  mapToSmallestDistance(parallelBndEdges);
583 
584  mapCorners(selectedCorners);
585 
586  //- update geometry at moved vertices
587  selectedCorners.clear();
588  forAll(edgesToMap, eI)
589  {
590  const edge& e = edges[edgesToMap[eI]];
591 
592  selectedCorners.append(bp[e.start()]);
593  selectedCorners.append(bp[e.end()]);
594  }
595 
596  surfaceModifier.updateGeometry(selectedCorners);
597 }
598 
599 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
600 
601 } // End namespace Foam
602 
603 // ************************************************************************* //
Foam::meshSurfaceEngine::beAtProcs
const VRWGraph & beAtProcs() const
processors which contain the edges
Definition: meshSurfaceEngineI.H:530
Foam::meshSurfaceEngine::bp
const labelList & bp() const
Definition: meshSurfaceEngineI.H:64
Foam::LongList::append
void append(const T &e)
Append an element at the end of the list.
Definition: LongListI.H:265
triSurf.H
Foam::Vector< scalar >::zero
static const Vector zero
Definition: Vector.H:80
Foam::parMapperHelper::globalLabel
label globalLabel() const
return global label
Definition: parMapperHelper.H:102
Foam::parMapperHelper
Definition: parMapperHelper.H:51
p
p
Definition: pEqn.H:62
Foam::boundBox::max
const point & max() const
Maximum describing the bounding box.
Definition: boundBoxI.H:60
Foam::meshSurfaceEngine::globalToLocalBndEdgeAddressing
const Map< label > & globalToLocalBndEdgeAddressing() const
global boundary edge label to local label. Only for processor edges
Definition: meshSurfaceEngineI.H:510
Foam::meshSurfaceEngine::globalBoundaryEdgeLabel
const labelList & globalBoundaryEdgeLabel() const
global boundary edge label
Definition: meshSurfaceEngineI.H:489
helperFunctionsPar.H
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
triSurfacePartitioner.H
Foam::meshOctree::findNearestSurfacePoint
void findNearestSurfacePoint(point &nearest, scalar &distSq, label &nearestTriangle, label &region, const point &p) const
find nearest surface point for vertex and its region
Definition: meshOctreeFindNearestSurfacePoint.C:44
Foam::triSurfPoints::points
const pointField & points() const
access to points
Definition: triSurfPointsI.H:44
Foam::meshSurfaceEngineModifier::updateVertexNormals
void updateVertexNormals()
update normals of boundary vertices at processor boundaries
Definition: meshSurfaceEngineModifier.H:83
Foam::LongList::clear
void clear()
Clear the list, i.e. set next free to zero.
Definition: LongListI.H:230
Foam::UPstream::parRun
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:377
Foam::edge
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:58
Foam::Map< label >
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::LongList::size
label size() const
Size of the active part of the list.
Definition: LongListI.H:203
Foam::pointPatch
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:56
Foam::meshSurfaceMapper2D::mesh2DEngine
const polyMeshGen2DEngine & mesh2DEngine() const
create and return mesh 2D engine
Definition: meshSurfaceMapper2D.H:92
Foam::HashSet< label, Hash< label > >
Foam::polyMeshGen2DEngine::zMinPoints
const boolList & zMinPoints() const
Definition: polyMeshGen2DEngineI.H:64
Foam::VRWGraph::contains
bool contains(const label rowI, const label e) const
check if the element is in the given row (takes linear time)
Definition: VRWGraphI.H:511
Foam::labelledScalar::scalarLabel
label scalarLabel() const
return scalar label
Definition: labelledScalar.H:82
Foam::meshSurfacePartitioner::pointPatches
const VRWGraph & pointPatches() const
Definition: meshSurfacePartitioner.H:123
meshOctree.H
Foam::parMapperHelper::movingDistance
const scalar & movingDistance() const
return moving distance
Definition: parMapperHelper.H:96
Foam::labelledScalar::value
const scalar & value() const
return the value
Definition: labelledScalar.H:88
Foam::edge::end
label end() const
Return end vertex label.
Definition: edgeI.H:92
Foam::LongList< label >
Foam::meshSurfaceEngineModifier
Definition: meshSurfaceEngineModifier.H:48
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
Foam::meshOctree::findNearestEdgePoint
bool findNearestEdgePoint(point &edgePoint, scalar &distSq, label &nearestEdge, const point &p, const DynList< label > &regions) const
find nearest feature-edges vertex to a given vertex
Definition: meshOctreeFindNearestSurfacePoint.C:215
Foam::meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate
void moveBoundaryVertexNoUpdate(const label bpI, const point &newP)
relocate the selected boundary vertex
Definition: meshSurfaceEngineModifier.C:68
Foam::meshSurfaceEngine::beNeiProcs
const DynList< label > & beNeiProcs() const
communication matrix for sending edge data
Definition: meshSurfaceEngineI.H:549
Foam::meshSurfaceMapper2D::activeBoundaryEdges_
labelLongList activeBoundaryEdges_
Definition: meshSurfaceMapper2D.H:82
forAllRow
#define forAllRow(graph, rowI, index)
Definition: VRWGraph.H:277
Foam::meshSurfaceEngineModifier::moveBoundaryVertex
void moveBoundaryVertex(const label bpI, const point &newP)
relocate the selected boundary vertex and update geometry data
Definition: meshSurfaceEngineModifier.C:77
Foam::boundBox::min
const point & min() const
Minimum describing the bounding box.
Definition: boundBoxI.H:54
Foam::meshSurfaceEngine::points
const pointFieldPMG & points() const
Definition: meshSurfaceEngineI.H:49
coordinates
PtrList< coordinateSystem > coordinates(solidRegions.size())
Foam::VRWGraph::sizeOfRow
label sizeOfRow(const label rowI) const
Returns the number of elements in the given row.
Definition: VRWGraphI.H:127
Foam::polyMeshGen2DEngine::zMaxPoints
const boolList & zMaxPoints() const
Definition: polyMeshGen2DEngineI.H:88
Foam::FatalError
error FatalError
Foam::meshSurfaceMapper2D::mapVerticesOntoSurface
void mapVerticesOntoSurface()
Definition: meshSurfaceMapper2DMapVertices.C:262
labelledScalar.H
Foam::HashTable::found
bool found(const Key &) const
Return true if hashedEntry is found in table.
Definition: HashTable.C:109
polyMeshGen2DEngine.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::meshSurfaceEngineModifier::updateGeometry
void updateGeometry(const labelLongList &)
Definition: meshSurfaceEngineModifier.C:234
Foam::Vector::z
const Cmpt & z() const
Definition: VectorI.H:77
meshSurfaceEngine.H
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:131
Foam::e
const double e
Elementary charge.
Definition: doubleFloat.H:94
Foam::DynList< label >
Foam::meshSurfaceMapper2D::meshOctree_
const meshOctree & meshOctree_
reference to the octree
Definition: meshSurfaceMapper2D.H:69
Foam::meshSurfacePartitioner
Definition: meshSurfacePartitioner.H:52
Foam::meshSurfaceEngine::edges
const edgeList & edges() const
Definition: meshSurfaceEngineI.H:296
Foam::meshSurfaceMapper2D::surfaceEngine_
const meshSurfaceEngine & surfaceEngine_
reference to mesh surface
Definition: meshSurfaceMapper2D.H:66
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
Foam::labelledScalar
Definition: labelledScalar.H:50
Foam::UPstream::myProcNo
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Definition: UPstream.H:405
Foam::parMapperHelper::coordinates
const point & coordinates() const
return point coordinates
Definition: parMapperHelper.H:90
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
boundBox.H
Foam::meshSurfaceMapper2D::mapVerticesOntoSurfacePatches
void mapVerticesOntoSurfacePatches()
Definition: meshSurfaceMapper2DMapVertices.C:490
Foam::edge::start
label start() const
Return start vertex label.
Definition: edgeI.H:81
Foam::polyMeshGen2DEngine
Definition: polyMeshGen2DEngine.H:51
Foam::Vector< scalar >
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::sqrt
dimensionedScalar sqrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:142
Foam::meshSurfaceMapper2D::meshPartitioner
const meshSurfacePartitioner & meshPartitioner() const
create and return mesh surface partitioner
Definition: meshSurfaceMapper2D.H:116
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::meshSurfaceMapper2D::findMappingDistance
void findMappingDistance(const labelLongList &, std::map< label, scalar > &) const
find mapping distance for corner points
Definition: meshSurfaceMapper2DMapVertices.C:56
Foam::help::exchangeMap
void exchangeMap(const std::map< label, ListType > &m, LongList< T > &data, const Pstream::commsTypes commsType)
Definition: helperFunctionsPar.C:129
meshSurfaceEngineModifier.H
Foam::boundBox
A bounding box defined in terms of the points at its extremities.
Definition: boundBox.H:55
FatalErrorIn
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Definition: error.H:313
Foam::DynList::size
label size() const
Definition: DynListI.H:235
Foam::meshOctree::findNearestSurfacePointInRegion
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
Definition: meshOctreeFindNearestSurfacePoint.C:131
Foam::meshOctree::surface
const triSurf & surface() const
return a reference to the surface
Definition: meshOctreeI.H:130
Foam::meshSurfaceMapper2D::mapCorners
void mapCorners()
Definition: meshSurfaceMapper2DMapVertices.C:354
Foam::meshSurfacePartitioner::corners
const labelHashSet & corners() const
return labels of corner points (from the list of boundary points)
Definition: meshSurfacePartitioner.H:129
Foam::pointFieldPMG
Definition: pointFieldPMG.H:50
Foam::VRWGraph
Definition: VRWGraph.H:101
polyMeshGenAddressing.H
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Foam::meshSurfaceMapper2D::mapToSmallestDistance
void mapToSmallestDistance(LongList< parMapperHelper > &)
map to the location with the smallest distance
Definition: meshSurfaceMapper2DMapVertices.C:139
Foam::meshSurfaceMapper2D::adjustZCoordinates
void adjustZCoordinates()
adjust z coordinates of the mesh to the ones in the surface mesh
Definition: meshSurfaceMapper2DMapVertices.C:219
meshSurfacePartitioner.H
meshSurfaceMapper2D.H
Foam::DynList::append
void append(const T &e)
Append an element at the end of the list.
Definition: DynListI.H:304