Clean-up of post-processing with topo changes

This commit is contained in:
Hrvoje Jasak 2010-11-11 17:40:25 +00:00
parent f047b418ba
commit f0dfd66dd6
7 changed files with 52 additions and 16 deletions

View file

@ -82,13 +82,13 @@ void Foam::printMeshStats(const polyMesh& mesh, const bool allTopology)
}
}
reduce(nHex,sumOp<label>());
reduce(nPrism,sumOp<label>());
reduce(nWedge,sumOp<label>());
reduce(nPyr,sumOp<label>());
reduce(nTetWedge,sumOp<label>());
reduce(nTet,sumOp<label>());
reduce(nUnknown,sumOp<label>());
reduce(nHex, sumOp<label>());
reduce(nPrism, sumOp<label>());
reduce(nWedge, sumOp<label>());
reduce(nPyr, sumOp<label>());
reduce(nTetWedge, sumOp<label>());
reduce(nTet, sumOp<label>());
reduce(nUnknown, sumOp<label>());
Info<< "Overall number of cells of each type:" << nl
<< " hexahedra: " << nHex << nl

View file

@ -192,7 +192,11 @@ void Foam::vtkPV3Foam::convertPointFields
}
// Construct interpolation on the raw mesh
pointMesh pMesh(mesh);
// HJ, bug fix? Point mesh handled by objectRegistry
// HJ, 11/Nov/2010
const pointMesh& pMesh = pointMesh::New(mesh);
// pointMesh pMesh(mesh);
convertPointFields<scalar>

View file

@ -29,6 +29,7 @@ License
#include "globalMeshData.H"
#include "demandDrivenData.H"
#include "meshObjectBase.H"
#include "pointMesh.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -93,7 +94,9 @@ void Foam::polyMesh::clearGeom()
solutionD_ = Vector<label>::zero;
// Move points all mesh objects. HJ, 13/Oct/2010
meshObjectBase::allMovePoints(*this);
// This is a problem, because it is called in a destructor.
meshObjectBase::allDelete(*this);
// meshObjectBase::allMovePoints(*this);
}

View file

@ -260,7 +260,6 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
initMesh(cells);
}
// Even if number of patches stayed same still recalculate boundary
// data.

View file

@ -36,9 +36,34 @@ void Foam::polyMesh::initMesh()
<< "initialising primitiveMesh" << endl;
}
// For backward compatibility check if the owner array is the same
// length as the number of allFaces and shrink to remove the -1s padding
if (min(owner_) < 0)
{
label nActiveFaces = 0;
forAll(owner_, faceI)
{
if (owner_[faceI] == -1)
{
break;
}
else
{
nActiveFaces++;
}
}
InfoIn("void polyMesh::initMesh()")
<< "Truncating owner list at " << nActiveFaces
<< " for backward compatibility" << endl;
owner_.setSize(nActiveFaces);
}
// For backward compatibility check if the neighbour array is the same
// length as the owner and shrink to remove the -1s padding
if (neighbour_.size() == owner_.size())
if (min(neighbour_) < 0)
{
label nIntFaces = 0;
@ -54,6 +79,10 @@ void Foam::polyMesh::initMesh()
}
}
InfoIn("void polyMesh::initMesh()")
<< "Truncating neighbour list at " << nIntFaces
<< " for backward compatibility" << endl;
neighbour_.setSize(nIntFaces);
}
@ -270,7 +299,7 @@ void Foam::polyMesh::initMesh(cellList& c)
{
Info<< "void polyMesh::initMesh(cellList& c) : "
<< "unused faces detected. "
<< "Number of used faces: " << nUsedFaces
<< "Number of used faces: " << nUsedFaces
<< ". Total number of faces: " << owner_.size() << endl;
}

View file

@ -42,7 +42,7 @@ void Foam::primitiveMesh::calcCells
{
nCells = -1;
forAll(own, faceI)
forAll (own, faceI)
{
nCells = max(nCells, own[faceI]);
}

View file

@ -86,7 +86,8 @@ public:
// Constructors
//- Constructor given fvMesh and pointMesh.
//- Constructor given fvMesh. pointMesh will be created or
// looked up from objectRegistry
explicit volPointInterpolation(const fvMesh&);
@ -154,7 +155,7 @@ public:
const wordList& patchFieldTypes
) const;
//- Interpolate volField using inverse distance weighting
//- Interpolate volField using inverse distance weighting
// returning pointField
template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
@ -162,7 +163,7 @@ public:
const GeometricField<Type, fvPatchField, volMesh>&
) const;
//- Interpolate tmp<volField> using inverse distance weighting
//- Interpolate tmp<volField> using inverse distance weighting
// returning pointField
template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate