mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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
This commit is contained in:
@ -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],
|
||||
|
||||
Reference in New Issue
Block a user