mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: conformalVoronoiMesh: renamed writeTetMesh to writeTetDualMesh
This commit is contained in:
@ -397,7 +397,7 @@ motionControl
|
|||||||
polyMeshFiltering
|
polyMeshFiltering
|
||||||
{
|
{
|
||||||
// Write the underlying Delaunay tet mesh at output time
|
// Write the underlying Delaunay tet mesh at output time
|
||||||
writeTetMesh true;
|
writeTetDualMesh false; //true;
|
||||||
|
|
||||||
// Upper limit on the size of faces to be filtered.
|
// Upper limit on the size of faces to be filtered.
|
||||||
// fraction of the local target cell size
|
// fraction of the local target cell size
|
||||||
|
|||||||
@ -109,16 +109,22 @@ void ReadAndMapFields
|
|||||||
{
|
{
|
||||||
label faceI = -index-1;
|
label faceI = -index-1;
|
||||||
label bFaceI = faceI - mesh.nInternalFaces();
|
label bFaceI = faceI - mesh.nInternalFaces();
|
||||||
if (bFaceI < 0)
|
if (bFaceI >= 0)
|
||||||
{
|
{
|
||||||
FatalErrorIn("ReadAndMapFields(..)")
|
label patchI = mesh.boundaryMesh().patchID()[bFaceI];
|
||||||
<< "Face " << faceI << " from index " << index
|
label localFaceI = mesh.boundaryMesh()[patchI].whichFace
|
||||||
<< " is not a boundary face." << abort(FatalError);
|
(
|
||||||
|
faceI
|
||||||
|
);
|
||||||
|
fld[pointI] = readField.boundaryField()[patchI][localFaceI];
|
||||||
}
|
}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// FatalErrorIn("ReadAndMapFields(..)")
|
||||||
|
// << "Face " << faceI << " from index " << index
|
||||||
|
// << " is not a boundary face." << abort(FatalError);
|
||||||
|
//}
|
||||||
|
|
||||||
label patchI = mesh.boundaryMesh().patchID()[bFaceI];
|
|
||||||
label localFaceI = mesh.boundaryMesh()[patchI].whichFace(faceI);
|
|
||||||
fld[pointI] = readField.boundaryField()[patchI][localFaceI];
|
|
||||||
}
|
}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
@ -211,12 +217,12 @@ int main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
label faceI = -index-1;
|
label faceI = -index-1;
|
||||||
if (faceI < tetDualMesh.nInternalFaces())
|
if (faceI < mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
<< "Face " << faceI << " from index " << index
|
<< "Face " << faceI << " from index " << index
|
||||||
<< " is not a boundary face."
|
<< " is not a boundary face."
|
||||||
<< " nInternalFaces:" << tetDualMesh.nInternalFaces()
|
<< " nInternalFaces:" << mesh.nInternalFaces()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -250,7 +250,7 @@ void Foam::conformalVoronoiMesh::writeMesh
|
|||||||
{
|
{
|
||||||
writeInternalDelaunayVertices(instance);
|
writeInternalDelaunayVertices(instance);
|
||||||
|
|
||||||
if (cvMeshControls().writeTetMesh())
|
if (cvMeshControls().writeTetDualMesh())
|
||||||
{
|
{
|
||||||
pointField points;
|
pointField points;
|
||||||
faceList faces;
|
faceList faces;
|
||||||
|
|||||||
@ -271,7 +271,7 @@ Foam::cvControls::cvControls
|
|||||||
|
|
||||||
const dictionary& filteringDict(cvMeshDict_.subDict("polyMeshFiltering"));
|
const dictionary& filteringDict(cvMeshDict_.subDict("polyMeshFiltering"));
|
||||||
|
|
||||||
writeTetMesh_ = Switch(filteringDict.lookup("writeTetMesh"));
|
writeTetDualMesh_ = Switch(filteringDict.lookup("writeTetDualMesh"));
|
||||||
|
|
||||||
filterSizeCoeff_ = readScalar
|
filterSizeCoeff_ = readScalar
|
||||||
(
|
(
|
||||||
|
|||||||
@ -219,7 +219,7 @@ class cvControls
|
|||||||
// polyMesh filtering controls
|
// polyMesh filtering controls
|
||||||
|
|
||||||
//- Write tet mesh at output time (it always writes the Voronoi)
|
//- Write tet mesh at output time (it always writes the Voronoi)
|
||||||
Switch writeTetMesh_;
|
Switch writeTetDualMesh_;
|
||||||
|
|
||||||
//- Upper limit on the size of faces to be filtered from,
|
//- Upper limit on the size of faces to be filtered from,
|
||||||
// fraction of the local target cell size
|
// fraction of the local target cell size
|
||||||
@ -387,7 +387,7 @@ public:
|
|||||||
inline scalar removalDistCoeff() const;
|
inline scalar removalDistCoeff() const;
|
||||||
|
|
||||||
//- Write tetMesh at output time
|
//- Write tetMesh at output time
|
||||||
inline Switch writeTetMesh() const;
|
inline Switch writeTetDualMesh() const;
|
||||||
|
|
||||||
//- Return the filterSizeCoeff
|
//- Return the filterSizeCoeff
|
||||||
inline scalar filterSizeCoeff() const;
|
inline scalar filterSizeCoeff() const;
|
||||||
|
|||||||
@ -139,9 +139,9 @@ inline Foam::scalar Foam::cvControls::removalDistCoeff() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::Switch Foam::cvControls::writeTetMesh() const
|
inline Foam::Switch Foam::cvControls::writeTetDualMesh() const
|
||||||
{
|
{
|
||||||
return writeTetMesh_;
|
return writeTetDualMesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -374,7 +374,7 @@ motionControl
|
|||||||
polyMeshFiltering
|
polyMeshFiltering
|
||||||
{
|
{
|
||||||
// Write the underlying Delaunay tet mesh at output time
|
// Write the underlying Delaunay tet mesh at output time
|
||||||
writeTetMesh true;
|
writeTetDualMesh true;
|
||||||
|
|
||||||
// Upper limit on the size of faces to be filtered.
|
// Upper limit on the size of faces to be filtered.
|
||||||
// fraction of the local target cell size
|
// fraction of the local target cell size
|
||||||
|
|||||||
@ -375,7 +375,7 @@ motionControl
|
|||||||
polyMeshFiltering
|
polyMeshFiltering
|
||||||
{
|
{
|
||||||
// Write the underlying Delaunay tet mesh at output time
|
// Write the underlying Delaunay tet mesh at output time
|
||||||
writeTetMesh true;
|
writeTetDualMesh true;
|
||||||
|
|
||||||
// Upper limit on the size of faces to be filtered.
|
// Upper limit on the size of faces to be filtered.
|
||||||
// fraction of the local target cell size
|
// fraction of the local target cell size
|
||||||
|
|||||||
@ -196,6 +196,8 @@ motionControl
|
|||||||
|
|
||||||
polyMeshFiltering
|
polyMeshFiltering
|
||||||
{
|
{
|
||||||
|
// Write the underlying Delaunay tet mesh at output time
|
||||||
|
writeTetDualMesh true;
|
||||||
filterSizeCoeff 0.2;
|
filterSizeCoeff 0.2;
|
||||||
mergeClosenessCoeff 1e-4;
|
mergeClosenessCoeff 1e-4;
|
||||||
continueFilteringOnBadInitialPolyMesh true;
|
continueFilteringOnBadInitialPolyMesh true;
|
||||||
|
|||||||
@ -171,6 +171,9 @@ motionControl
|
|||||||
|
|
||||||
polyMeshFiltering
|
polyMeshFiltering
|
||||||
{
|
{
|
||||||
|
// Write the underlying Delaunay tet mesh at output time
|
||||||
|
writeTetDualMesh true;
|
||||||
|
|
||||||
filterSizeCoeff 0.2;
|
filterSizeCoeff 0.2;
|
||||||
mergeClosenessCoeff 1e-4;
|
mergeClosenessCoeff 1e-4;
|
||||||
continueFilteringOnBadInitialPolyMesh true;
|
continueFilteringOnBadInitialPolyMesh true;
|
||||||
|
|||||||
Reference in New Issue
Block a user