Merge branch 'feature-cellDecomposer' into 'develop'
ENH: cellDecomposer: functionObject to map fields to 'tet' mesh. See merge request Development/openfoam!687
This commit is contained in:
commit
f48e617cd2
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
Copyright (C) 2018-2020,2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,7 +28,7 @@ Class
|
|||||||
Foam::tetDecomposer
|
Foam::tetDecomposer
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Decomposes polyMesh into tets or pyramids.
|
Decomposes polyMesh into tets (or pyramids)
|
||||||
|
|
||||||
Cells neighbouring decomposed cells are not decomposed themselves
|
Cells neighbouring decomposed cells are not decomposed themselves
|
||||||
so will be polyhedral.
|
so will be polyhedral.
|
||||||
@ -46,6 +46,7 @@ SourceFiles
|
|||||||
#include "boolList.H"
|
#include "boolList.H"
|
||||||
#include "typeInfo.H"
|
#include "typeInfo.H"
|
||||||
#include "Enum.H"
|
#include "Enum.H"
|
||||||
|
#include "faceList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -72,7 +73,8 @@ public:
|
|||||||
FACE_CENTRE_TRIS, //- Faces decomposed into triangles
|
FACE_CENTRE_TRIS, //- Faces decomposed into triangles
|
||||||
// using face-centre
|
// using face-centre
|
||||||
FACE_DIAG_TRIS, //- Faces decomposed into triangles diagonally
|
FACE_DIAG_TRIS, //- Faces decomposed into triangles diagonally
|
||||||
PYRAMID //- Faces not decomposed (generates pyramids)
|
PYRAMID, //- Faces not decomposed (generates pyramids)
|
||||||
|
FACE_DIAG_QUADS //- Like FACE_DIAG_TRIS but does quads mainly
|
||||||
};
|
};
|
||||||
static const Enum<decompositionType> decompositionTypeNames;
|
static const Enum<decompositionType> decompositionTypeNames;
|
||||||
|
|
||||||
@ -89,7 +91,6 @@ private:
|
|||||||
//- From face to tet point
|
//- From face to tet point
|
||||||
labelList faceToPoint_;
|
labelList faceToPoint_;
|
||||||
|
|
||||||
|
|
||||||
// Per face, per point (faceCentre) or triangle (faceDiag)
|
// Per face, per point (faceCentre) or triangle (faceDiag)
|
||||||
// the added tet on the owner side
|
// the added tet on the owner side
|
||||||
labelListList faceOwnerCells_;
|
labelListList faceOwnerCells_;
|
||||||
@ -119,6 +120,7 @@ private:
|
|||||||
(
|
(
|
||||||
polyTopoChange& meshMod,
|
polyTopoChange& meshMod,
|
||||||
const face& f,
|
const face& f,
|
||||||
|
const label facei,
|
||||||
const label own,
|
const label own,
|
||||||
const label nei,
|
const label nei,
|
||||||
const label masterPointID,
|
const label masterPointID,
|
||||||
@ -132,6 +134,46 @@ private:
|
|||||||
//- Work out triangle index given the starting vertex in the face
|
//- Work out triangle index given the starting vertex in the face
|
||||||
label triIndex(const label facei, const label fp) const;
|
label triIndex(const label facei, const label fp) const;
|
||||||
|
|
||||||
|
//- Calculate triangulation of boundary faces
|
||||||
|
void splitBoundaryFaces
|
||||||
|
(
|
||||||
|
List<faceList>& boundaryQuads,
|
||||||
|
List<faceList>& boundaryTris
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Correct coupled faces to match up
|
||||||
|
void relativeIndicesToFace
|
||||||
|
(
|
||||||
|
const bool doFlip,
|
||||||
|
const face& meshFace,
|
||||||
|
const faceList& indexLists,
|
||||||
|
faceList& faces
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Calculate triangulation of any face
|
||||||
|
void splitFace
|
||||||
|
(
|
||||||
|
const List<faceList>& boundaryQuads,
|
||||||
|
const List<faceList>& boundaryTris,
|
||||||
|
const label facei,
|
||||||
|
const label patchi,
|
||||||
|
label& quadi,
|
||||||
|
faceList& quadFaces,
|
||||||
|
label& trii,
|
||||||
|
faceList& triFaces
|
||||||
|
) const;
|
||||||
|
|
||||||
|
void splitFace
|
||||||
|
(
|
||||||
|
const List<faceList>& boundaryQuads,
|
||||||
|
const List<faceList>& boundaryTris,
|
||||||
|
const label facei,
|
||||||
|
const label patchi,
|
||||||
|
faceList& quadFaces,
|
||||||
|
faceList& triFaces,
|
||||||
|
faceList& subFaces
|
||||||
|
) const;
|
||||||
|
|
||||||
//- No copy construct
|
//- No copy construct
|
||||||
tetDecomposer(const tetDecomposer&) = delete;
|
tetDecomposer(const tetDecomposer&) = delete;
|
||||||
|
|
||||||
@ -188,7 +230,7 @@ public:
|
|||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
//- Insert all changes into meshMod to convert the polyMesh into
|
//- Insert all changes into meshMod to convert the polyMesh into
|
||||||
// tets.
|
// subshapes (tets/prisms)
|
||||||
void setRefinement
|
void setRefinement
|
||||||
(
|
(
|
||||||
const decompositionType decomposeType,
|
const decompositionType decomposeType,
|
||||||
@ -196,6 +238,17 @@ public:
|
|||||||
polyTopoChange& meshMod
|
polyTopoChange& meshMod
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Insert all changes into meshMod to convert the polyMesh into
|
||||||
|
//- subshapes (tets/prisms). Explicit control over which faces
|
||||||
|
//- get decomposed. Can be used e.g. to not split triangles.
|
||||||
|
void setRefinement
|
||||||
|
(
|
||||||
|
const decompositionType decomposeType,
|
||||||
|
const bitSet& decomposeCell,
|
||||||
|
const bitSet& decomposeFace,
|
||||||
|
polyTopoChange& meshMod
|
||||||
|
);
|
||||||
|
|
||||||
//- Force recalculation of locally stored data on topological change
|
//- Force recalculation of locally stored data on topological change
|
||||||
void updateMesh(const mapPolyMesh&);
|
void updateMesh(const mapPolyMesh&);
|
||||||
};
|
};
|
||||||
|
@ -120,6 +120,7 @@ fluxSummary/fluxSummary.C
|
|||||||
mapFields/mapFields.C
|
mapFields/mapFields.C
|
||||||
reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C
|
reactionSensitivityAnalysis/reactionsSensitivityAnalysisObjects.C
|
||||||
DESModelRegions/DESModelRegions.C
|
DESModelRegions/DESModelRegions.C
|
||||||
|
cellDecomposer/cellDecomposer.C
|
||||||
|
|
||||||
externalCoupled/externalCoupled.C
|
externalCoupled/externalCoupled.C
|
||||||
externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.C
|
externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchFields.C
|
||||||
|
@ -6,6 +6,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
|
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
Loading…
Reference in New Issue
Block a user