ENH: conformalVoronoiMesh: renamed writeTetMesh to writeTetDualMesh

This commit is contained in:
mattijs
2011-07-19 17:30:25 +01:00
parent 534c6e03ff
commit 68973728a1
10 changed files with 29 additions and 18 deletions

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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
( (

View File

@ -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;

View File

@ -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_;
} }

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;