Skip to content
Snippets Groups Projects
Commit a7656237 authored by mattijs's avatar mattijs
Browse files

ENH: snappyHexMesh: improvements to gap detection:

- shoot rays to nearest point on surface and two perpendicular rays
  (instead of always shooting in the 3 coordinate directions)

- avoid bleeding through the surface intersection
parent faff5ac1
Branches
Tags
1 merge request!2Feature snappy hex mesh gap refinement
......@@ -1366,14 +1366,17 @@ Foam::label Foam::meshRefinement::markInternalGapRefinement
<< mesh_.globalData().nTotalFaces() << endl;
FaceCellWave<transportData> deltaCalc
transportData::trackData td(surfaceIndex_);
FaceCellWave<transportData, transportData::trackData> deltaCalc
(
mesh_,
frontFaces,
frontData,
faceData,
cellData,
mesh_.globalData().nTotalCells()+1
mesh_.globalData().nTotalCells()+1,
td
);
......
......@@ -45,7 +45,6 @@ namespace Foam
// Forward declaration of classes
class polyMesh;
class hexRef8;
/*---------------------------------------------------------------------------*\
Class transportData Declaration
......@@ -55,6 +54,23 @@ class transportData
:
public wallPointData<scalar>
{
public:
//- Class used to pass additional data in
class trackData
{
public:
//- Per face the index of the surface hit
const labelList& surfaceIndex_;
trackData(const labelList& surfaceIndex)
:
surfaceIndex_(surfaceIndex)
{}
};
private:
// Private Member Functions
......
......@@ -101,12 +101,17 @@ inline bool Foam::transportData::updateCell
(
const polyMesh& mesh,
const label cellI,
const label,
const label faceI,
const transportData& neighbourWallInfo,
const scalar tol,
TrackingData& td
)
{
if (td.surfaceIndex_[faceI] != -1)
{
return false;
}
const vectorField& cellCentres = mesh.primitiveMesh::cellCentres();
bool updated = update
......@@ -132,6 +137,11 @@ inline bool Foam::transportData::updateFace
TrackingData& td
)
{
if (td.surfaceIndex_[thisFaceI] != -1)
{
return false;
}
return update
(
mesh.faceCentres()[thisFaceI],
......@@ -152,6 +162,11 @@ inline bool Foam::transportData::updateFace
TrackingData& td
)
{
if (td.surfaceIndex_[thisFaceI] != -1)
{
return false;
}
return update
(
mesh.faceCentres()[thisFaceI],
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment