volPointInterpolation, pointMesh now MeshObject

This commit is contained in:
mattijs
2008-10-21 15:02:04 +01:00
parent cdb0a8a8d5
commit 99e8bf7516
81 changed files with 371 additions and 518 deletions

View File

@ -46,9 +46,6 @@
)
);
pointMesh pMesh(mesh);
volPointInterpolation vpi(mesh, pMesh);
word kinematicCloudName("kinematicCloud");
if (args.options().found("cloudName"))
@ -60,7 +57,6 @@
basicKinematicCloud kinematicCloud
(
kinematicCloudName,
vpi,
rho,
U,
thermo().mu(),

View File

@ -1,8 +1,5 @@
Info << "Constructing Spray" << endl;
pointMesh pMesh(mesh);
volPointInterpolation vpi(mesh, pMesh);
PtrList<specieProperties> gasProperties(Y.size());
forAll(gasProperties, i)
{
@ -18,7 +15,6 @@ forAll(gasProperties, i)
spray dieselSpray
(
vpi,
U,
rho,
p,

View File

@ -41,6 +41,7 @@ Description
#include "multivariateScheme.H"
#include "Switch.H"
#include "OFstream.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -75,7 +76,10 @@ int main(int argc, char *argv[])
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
mesh.move();
vpi.updateMesh();
const_cast<volPointInterpolation&>
(
volPointInterpolation::New(mesh)
).updateMesh();
dieselSpray.evolve();

View File

@ -52,8 +52,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
# include "createMesh.H"
pointMesh pMesh(mesh);
volPointInterpolation pInterp(mesh, pMesh);
volPointInterpolation pInterp(mesh);
// Get times list
instantList Times = runTime.times();

View File

@ -642,8 +642,7 @@ int main(int argc, char *argv[])
//Info<< "Writing variables data ..." << endl;
pointMesh pMesh(mesh);
volPointInterpolation pInterp(mesh, pMesh);
volPointInterpolation pInterp(mesh);
writeInt(fvFile, FV_VARIABLES);

View File

@ -489,7 +489,7 @@ int main(int argc, char *argv[])
readFields
(
vMesh,
vMesh.basePointMesh(),
pointMesh::New(vMesh.baseMesh()),
objects,
selectedFields,
psf
@ -499,7 +499,7 @@ int main(int argc, char *argv[])
readFields
(
vMesh,
vMesh.basePointMesh(),
pointMesh::New(vMesh.baseMesh()),
objects,
selectedFields,
pvf
@ -509,7 +509,7 @@ int main(int argc, char *argv[])
readFields
(
vMesh,
vMesh.basePointMesh(),
pointMesh::New(vMesh.baseMesh()),
objects,
selectedFields,
pSpheretf
@ -519,7 +519,7 @@ int main(int argc, char *argv[])
readFields
(
vMesh,
vMesh.basePointMesh(),
pointMesh::New(vMesh.baseMesh()),
objects,
selectedFields,
pSymmtf
@ -529,7 +529,7 @@ int main(int argc, char *argv[])
readFields
(
vMesh,
vMesh.basePointMesh(),
pointMesh::New(vMesh.baseMesh()),
objects,
selectedFields,
ptf
@ -598,7 +598,7 @@ int main(int argc, char *argv[])
writer.write(ptf);
// Interpolated volFields
volPointInterpolation pInterp(mesh, vMesh.pMesh());
volPointInterpolation pInterp(mesh);
writer.write(pInterp, vsf);
writer.write(pInterp, vvf);
writer.write(pInterp, vSpheretf);

View File

@ -70,7 +70,6 @@ Foam::polyMesh::readUpdateState Foam::vtkMesh::readUpdate()
// the subset even if only movement.
topoPtr_.clear();
pointMeshPtr_.clear();
if (setName_.size() > 0)
{

View File

@ -39,7 +39,6 @@ SourceFiles
#include "vtkTopo.H"
#include "fvMeshSubset.H"
#include "pointMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -60,9 +59,6 @@ class vtkMesh
//- Reference to mesh
fvMesh& baseMesh_;
//- Demand driven pointMesh
mutable autoPtr<pointMesh> pointMeshPtr_;
//- Subsetting engine + sub-fvMesh
fvMeshSubset subsetter_;
@ -101,15 +97,6 @@ public:
return baseMesh_;
}
const pointMesh& basePointMesh() const
{
if (!pointMeshPtr_.valid())
{
pointMeshPtr_.reset(new pointMesh(baseMesh_));
}
return pointMeshPtr_();
}
const fvMeshSubset& subsetter() const
{
return subsetter_;
@ -144,19 +131,6 @@ public:
}
}
//- Access either pointMesh of base or pointMesh of subset
const pointMesh& pMesh() const
{
if (useSubMesh())
{
return subsetter_.subPointMesh();
}
else
{
return basePointMesh();
}
}
//- Number of field cells
label nFieldCells() const
{
@ -166,7 +140,7 @@ public:
//- Number of field points
label nFieldPoints() const
{
return pMesh().size() + topo().addPointCellLabels().size();
return mesh().nPoints() + topo().addPointCellLabels().size();
}

View File

@ -107,8 +107,7 @@ void Foam::vtkPV3Foam::convertVolFields
}
// Construct interpolation on the raw mesh
pointMesh pMesh(mesh);
volPointInterpolation pInterp(mesh, pMesh);
volPointInterpolation pInterp(mesh);
PtrList<PrimitivePatchInterpolation<primitivePatch> >
ppInterpList(mesh.boundaryMesh().size());

View File

@ -62,11 +62,16 @@ Foam::pointMesh::pointMesh
bool alwaysConstructGlobalPatch
)
:
MeshObject<polyMesh, pointMesh>(pMesh),
GeoMesh<polyMesh>(pMesh),
boundary_(*this, pMesh.boundaryMesh())
{
// Add the globalPointPatch if there are global points
if (alwaysConstructGlobalPatch || mesh_.globalData().nGlobalPoints())
if
(
alwaysConstructGlobalPatch
|| GeoMesh<polyMesh>::mesh_.globalData().nGlobalPoints()
)
{
boundary_.setSize(boundary_.size() + 1);

View File

@ -34,6 +34,7 @@ Description
#define pointMesh_H
#include "GeoMesh.H"
#include "MeshObject.H"
#include "polyMesh.H"
#include "pointBoundaryMesh.H"
@ -48,6 +49,7 @@ namespace Foam
class pointMesh
:
public MeshObject<polyMesh, pointMesh>,
public GeoMesh<polyMesh>
{
// Permanent data
@ -95,7 +97,7 @@ public:
//- Return number of points
static label size(const Mesh& mesh)
{
return mesh.mesh_.nPoints();
return mesh.GeoMesh<polyMesh>::mesh_.nPoints();
}
//- Return reference to boundary mesh
@ -107,7 +109,13 @@ public:
//- Return parallel info
const globalMeshData& globalData() const
{
return mesh_.globalData();
return GeoMesh<polyMesh>::mesh_.globalData();
}
//- Return database (only needed for compilation purposes)
const objectRegistry& db() const
{
return GeoMesh<polyMesh>::mesh_.db();
}

View File

@ -28,6 +28,8 @@ License
#include "primitiveMesh.H"
#include "globalMeshData.H"
#include "demandDrivenData.H"
#include "pointMesh.H"
#include "Time.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -65,6 +67,8 @@ void Foam::polyMesh::clearGeom()
{
boundary_[patchI].clearGeom();
}
pointMesh::Delete(*this);
}
@ -82,6 +86,8 @@ void Foam::polyMesh::clearAddressing()
// parallelData depends on the processorPatch ordering so force
// recalculation
deleteDemandDrivenData(globalMeshDataPtr_);
pointMesh::Delete(*this);
}

View File

@ -31,6 +31,7 @@ Description
#include "mapPolyMesh.H"
#include "Time.H"
#include "globalMeshData.H"
#include "pointMesh.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -66,6 +67,26 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
// Map the list
newMotionPoints.map(oldMotionPoints, mpm.pointMap());
}
// Hack until proper callbacks. Below are all the polyMesh-MeshObjects.
// pointMesh
if
(
db().objectRegistry::foundObject<pointMesh>
(
pointMesh::typeName
)
)
{
const_cast<pointMesh&>
(
db().objectRegistry::lookupObject<pointMesh>
(
pointMesh::typeName
)
).updateMesh(mpm);
}
}

View File

@ -34,7 +34,6 @@ License
#include "cellSet.H"
#include "syncTools.H"
#include "motionSmoother.H"
#include "pointMesh.H"
#include "refinementParameters.H"
#include "snapParameters.H"
#include "layerParameters.H"

View File

@ -3082,7 +3082,7 @@ void Foam::autoLayerDriver::doLayers
Info<< "Constructing mesh displacer ..." << endl;
{
pointMesh pMesh(mesh);
const pointMesh& pMesh = pointMesh::New(mesh);
motionSmoother meshMover
(

View File

@ -675,7 +675,6 @@ void Foam::autoLayerDriver::medialAxisSmoothingInfo
const polyMesh& mesh = meshMover.mesh();
const pointField& points = mesh.points();
const pointMesh& pMesh = meshMover.pMesh();
const indirectPrimitivePatch& pp = meshMover.patch();
const vectorField& faceNormals = pp.faceNormals();
@ -788,7 +787,7 @@ void Foam::autoLayerDriver::medialAxisSmoothingInfo
List<pointData> edgeWallDist(mesh.nEdges());
PointEdgeWave<pointData> wallDistCalc
(
pMesh,
mesh,
meshPoints,
wallInfo,
pointWallDist,
@ -892,7 +891,7 @@ void Foam::autoLayerDriver::medialAxisSmoothingInfo
// Do all calculations
PointEdgeWave<pointData> medialDistCalc
(
pMesh,
mesh,
maxPoints,
maxInfo,
@ -975,7 +974,6 @@ void Foam::autoLayerDriver::shrinkMeshMedialDistance
Info<< "shrinkMeshMedialDistance : Smoothing using Medial Axis ..." << endl;
const polyMesh& mesh = meshMover.mesh();
const pointMesh& pMesh = meshMover.pMesh();
const indirectPrimitivePatch& pp = meshMover.patch();
const labelList& meshPoints = pp.meshPoints();
@ -1100,7 +1098,7 @@ void Foam::autoLayerDriver::shrinkMeshMedialDistance
// Do all calculations
PointEdgeWave<pointData> wallDistCalc
(
pMesh,
mesh,
wallPoints,
wallInfo,
pointWallDist,

View File

@ -527,7 +527,7 @@ Foam::tmp<Foam::scalarField> Foam::autoSnapDriver::edgePatchDist
PointEdgeWave<pointEdgePoint> wallCalc
(
pMesh,
mesh,
pp.meshPoints(),
wallInfo,
@ -1504,7 +1504,7 @@ void Foam::autoSnapDriver::doSnap
Info<< "Constructing mesh displacer ..." << endl;
Info<< "Using mesh parameters " << motionDict << nl << endl;
pointMesh pMesh(mesh);
const pointMesh& pMesh = pointMesh::New(mesh);
motionSmoother meshMover
(

View File

@ -1992,7 +1992,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const
volRefLevel.write();
pointMesh pMesh(mesh_);
const pointMesh& pMesh = pointMesh::New(mesh_);
pointScalarField pointRefLevel
(

View File

@ -680,7 +680,6 @@ void Foam::fvMeshSubset::setCellSubset
newCells
)
);
pointMeshSubsetPtr_.clear();
// Add old patches
@ -1180,7 +1179,6 @@ void Foam::fvMeshSubset::setLargeCellSubset
syncPar // parallel synchronisation
)
);
pointMeshSubsetPtr_.clear();
// Add old patches
List<polyPatch*> newBoundary(nbSize);
@ -1370,26 +1368,6 @@ fvMesh& Foam::fvMeshSubset::subMesh()
}
const pointMesh& Foam::fvMeshSubset::subPointMesh() const
{
if (!pointMeshSubsetPtr_.valid())
{
pointMeshSubsetPtr_.reset(new pointMesh(subMesh()));
}
return pointMeshSubsetPtr_();
}
pointMesh& Foam::fvMeshSubset::subPointMesh()
{
if (!pointMeshSubsetPtr_.valid())
{
pointMeshSubsetPtr_.reset(new pointMesh(subMesh()));
}
return pointMeshSubsetPtr_();
}
const labelList& Foam::fvMeshSubset::pointMap() const
{
checkCellSubset();

View File

@ -171,8 +171,6 @@ private:
//- Subset mesh pointer
autoPtr<fvMesh> fvMeshSubsetPtr_;
mutable autoPtr<pointMesh> pointMeshSubsetPtr_;
//- Point mapping array
labelList pointMap_;
@ -278,11 +276,6 @@ public:
fvMesh& subMesh();
//- Return reference to demand-driven subset pointMesh
const pointMesh& subPointMesh() const;
pointMesh& subPointMesh();
//- Return point map
const labelList& pointMap() const;

View File

@ -409,7 +409,7 @@ tmp<GeometricField<Type, pointPatchField, pointMesh> > fvMeshSubset::interpolate
return interpolate
(
sf,
subPointMesh(), // subsetted point mesh
pointMesh::New(subMesh()), // subsetted point mesh
subMesh(), // registry (pointfields are stored on the polyMesh)
patchMap(),
pointMap()

View File

@ -46,7 +46,6 @@ namespace Foam
{
class polyMesh;
class volPointInterpolation;
/*---------------------------------------------------------------------------*\
Class interpolation Declaration
@ -83,10 +82,9 @@ public:
interpolation,
dictionary,
(
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
),
(pInterp, psi)
(psi)
);
@ -96,7 +94,6 @@ public:
static autoPtr<interpolation<Type> > New
(
const word& interpolationType,
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
);
@ -104,7 +101,6 @@ public:
static autoPtr<interpolation<Type> > New
(
const dictionary& interpolationSchemes,
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
);

View File

@ -34,7 +34,6 @@ Foam::autoPtr<Foam::interpolation<Type> >
Foam::interpolation<Type>::New
(
const word& interpolationType,
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
)
{
@ -55,7 +54,7 @@ Foam::interpolation<Type>::New
<< exit(FatalError);
}
return autoPtr<interpolation<Type> >(cstrIter()(pInterp, psi));
return autoPtr<interpolation<Type> >(cstrIter()(psi));
}
@ -64,11 +63,10 @@ Foam::autoPtr<Foam::interpolation<Type> >
Foam::interpolation<Type>::New
(
const dictionary& interpolationSchemes,
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
)
{
return New(word(interpolationSchemes.lookup(psi.name())), pInterp, psi);
return New(word(interpolationSchemes.lookup(psi.name())), psi);
}

View File

@ -39,7 +39,6 @@ namespace Foam
template<class Type>
interpolationCell<Type>::interpolationCell
(
const volPointInterpolation&,
const GeometricField<Type, fvPatchField, volMesh>& psi
)
:

View File

@ -63,7 +63,6 @@ public:
//- Construct from components
interpolationCell
(
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
);

View File

@ -32,12 +32,11 @@ License
template<class Type>
Foam::interpolationCellPoint<Type>::interpolationCellPoint
(
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
)
:
interpolation<Type>(psi),
psip_(pInterp.interpolate(psi))
psip_(volPointInterpolation::New(psi.mesh()).interpolate(psi))
{}

View File

@ -52,7 +52,8 @@ class interpolationCellPoint
{
// Private data
GeometricField<Type, pointPatchField, pointMesh> psip_;
//- Interpolated volfield
const GeometricField<Type, pointPatchField, pointMesh> psip_;
public:
@ -66,7 +67,6 @@ public:
//- Construct from components
interpolationCellPoint
(
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
);

View File

@ -44,12 +44,11 @@ namespace Foam
template<class Type>
interpolationCellPointFace<Type>::interpolationCellPointFace
(
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
)
:
interpolation<Type>(psi),
psip_(pInterp.interpolate(psi)),
psip_(volPointInterpolation::New(psi.mesh()).interpolate(psi)),
psis_(linearInterpolate(psi))
{}

View File

@ -51,8 +51,11 @@ class interpolationCellPointFace
{
// Private data
GeometricField<Type, pointPatchField, pointMesh> psip_;
GeometricField<Type, fvsPatchField, surfaceMesh> psis_;
//- Interpolated volfield
const GeometricField<Type, pointPatchField, pointMesh> psip_;
//- Linearly interpolated volfield
const GeometricField<Type, fvsPatchField, surfaceMesh> psis_;
bool findTet
(
@ -87,7 +90,6 @@ public:
//- Construct from components
interpolationCellPointFace
(
const volPointInterpolation& pInterp,
const GeometricField<Type, fvPatchField, volMesh>& psi
);

View File

@ -62,7 +62,7 @@ void pointPatchInterpolation::interpolate
// patch
const fvBoundaryMesh& bm = fvMesh_.boundary();
const pointBoundaryMesh& pbm = pointMesh_.boundary();
const pointBoundaryMesh& pbm = pointMesh::New(fvMesh_).boundary();
forAll(bm, patchi)
{

View File

@ -55,7 +55,7 @@ void pointPatchInterpolation::makePatchPatchAddressing()
}
const fvBoundaryMesh& bm = fvMesh_.boundary();
const pointBoundaryMesh& pbm = pointMesh_.boundary();
const pointBoundaryMesh& pbm = pointMesh::New(fvMesh_).boundary();
// first count the total number of patch-patch points
@ -188,7 +188,7 @@ void pointPatchInterpolation::makePatchPatchWeights()
fvMesh_.polyMesh::instance(),
fvMesh_
),
pointMesh_,
pointMesh::New(fvMesh_),
dimensionedScalar("zero", dimless, 0)
);
@ -285,14 +285,9 @@ void pointPatchInterpolation::makePatchPatchWeights()
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
pointPatchInterpolation::pointPatchInterpolation
(
const fvMesh& vm,
const pointMesh& pm
)
pointPatchInterpolation::pointPatchInterpolation(const fvMesh& vm)
:
fvMesh_(vm),
pointMesh_(pm)
fvMesh_(vm)
{
updateMesh();
}

View File

@ -61,7 +61,6 @@ class pointPatchInterpolation
// Private data
const fvMesh& fvMesh_;
const pointMesh& pointMesh_;
//- Primitive patch interpolators
PtrList<primitivePatchInterpolation> patchInterpolators_;
@ -101,7 +100,7 @@ public:
// Constructors
//- Constructor given fvMesh and pointMesh.
pointPatchInterpolation(const fvMesh&, const pointMesh&);
pointPatchInterpolation(const fvMesh&);
// Destructor
@ -118,11 +117,6 @@ public:
return fvMesh_;
}
const pointMesh& pMesh() const
{
return pointMesh_;
}
// Edit

View File

@ -103,18 +103,20 @@ volPointInterpolation::interpolate
{
wordList types(patchFieldTypes);
const pointMesh& pMesh = pointMesh::New(vf.mesh());
// If the last patch of the pointBoundaryMesh is the global patch
// it must be added to the list of patchField types
if
(
isType<globalPointPatch>
(
pMesh().boundary()[pMesh().boundary().size() - 1]
pMesh.boundary()[pMesh.boundary().size() - 1]
)
)
{
types.setSize(types.size() + 1);
types[types.size()-1] = pMesh().boundary()[types.size()-1].type();
types[types.size()-1] = pMesh.boundary()[types.size()-1].type();
}
// Construct tmp<pointField>
@ -128,7 +130,7 @@ volPointInterpolation::interpolate
vf.instance(),
vf.db()
),
pMesh(),
pMesh,
vf.dimensions(),
types
)
@ -176,7 +178,7 @@ volPointInterpolation::interpolate
vf.instance(),
vf.db()
),
pMesh(),
pointMesh::New(vf.mesh()),
vf.dimensions()
)
);

View File

@ -74,7 +74,7 @@ void volPointInterpolation::makeWeights()
mesh().polyMesh::instance(),
mesh()
),
pMesh(),
pointMesh::New(mesh()),
dimensionedScalar("zero", dimless, 0)
);
@ -139,13 +139,10 @@ void volPointInterpolation::makeWeights()
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
volPointInterpolation::volPointInterpolation
(
const fvMesh& vm,
const pointMesh& pm
)
volPointInterpolation::volPointInterpolation(const fvMesh& vm)
:
boundaryInterpolator_(vm, pm)
MeshObject<fvMesh, volPointInterpolation>(vm),
boundaryInterpolator_(vm)
{
updateMesh();
}

View File

@ -37,6 +37,7 @@ SourceFiles
#ifndef volPointInterpolation_H
#define volPointInterpolation_H
#include "MeshObject.H"
#include "pointPatchInterpolation.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -52,6 +53,8 @@ class pointMesh;
\*---------------------------------------------------------------------------*/
class volPointInterpolation
:
public MeshObject<fvMesh, volPointInterpolation>
{
// Private data
@ -83,7 +86,7 @@ public:
// Constructors
//- Constructor given fvMesh and pointMesh.
volPointInterpolation(const fvMesh&, const pointMesh&);
explicit volPointInterpolation(const fvMesh&);
// Destructor
@ -100,11 +103,6 @@ public:
return boundaryInterpolator_.mesh();
}
const pointMesh& pMesh() const
{
return boundaryInterpolator_.pMesh();
}
// Edit

View File

@ -33,6 +33,7 @@ License
#include "surfaceInterpolate.H"
#include "fvcLaplacian.H"
#include "mapPolyMesh.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -83,7 +84,7 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
pointMesh_
pointMesh::New(fvMesh_)
),
cellDisplacement_
(
@ -123,7 +124,11 @@ Foam::displacementSBRStressFvMotionSolver::
Foam::tmp<Foam::pointField>
Foam::displacementSBRStressFvMotionSolver::curPoints() const
{
vpi_.interpolate(cellDisplacement_, pointDisplacement_);
volPointInterpolation::New(fvMesh_).interpolate
(
cellDisplacement_,
pointDisplacement_
);
tmp<pointField> tcurPoints
(

View File

@ -29,6 +29,7 @@ License
#include "fvmLaplacian.H"
#include "addToRunTimeSelectionTable.H"
#include "mapPolyMesh.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -117,7 +118,7 @@ displacementComponentLaplacianFvMotionSolver
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
pointMesh_
pointMesh::New(fvMesh_)
),
cellDisplacement_
(
@ -173,7 +174,7 @@ displacementComponentLaplacianFvMotionSolver
new pointVectorField
(
io,
pointMesh_
pointMesh::New(fvMesh_)
)
);
@ -202,7 +203,11 @@ Foam::displacementComponentLaplacianFvMotionSolver::
Foam::tmp<Foam::pointField>
Foam::displacementComponentLaplacianFvMotionSolver::curPoints() const
{
vpi_.interpolate(cellDisplacement_, pointDisplacement_);
volPointInterpolation::New(fvMesh_).interpolate
(
cellDisplacement_,
pointDisplacement_
);
if (pointLocation_.valid())
{

View File

@ -334,7 +334,8 @@ displacementInterpolationFvMotionSolver
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::displacementInterpolationFvMotionSolver::~displacementInterpolationFvMotionSolver()
Foam::displacementInterpolationFvMotionSolver::
~displacementInterpolationFvMotionSolver()
{}

View File

@ -31,6 +31,7 @@ License
#include "OFstream.H"
#include "meshTools.H"
#include "mapPolyMesh.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -82,7 +83,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
pointMesh_
pointMesh::New(fvMesh_)
),
cellDisplacement_
(
@ -139,7 +140,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver
new pointVectorField
(
io,
pointMesh_
pointMesh::New(fvMesh_)
)
);
@ -168,7 +169,11 @@ Foam::displacementLaplacianFvMotionSolver::
Foam::tmp<Foam::pointField>
Foam::displacementLaplacianFvMotionSolver::curPoints() const
{
vpi_.interpolate(cellDisplacement_, pointDisplacement_);
volPointInterpolation::New(fvMesh_).interpolate
(
cellDisplacement_,
pointDisplacement_
);
if (pointLocation_.valid())
{

View File

@ -25,6 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include "fvMotionSolver.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -39,9 +40,7 @@ namespace Foam
Foam::fvMotionSolver::fvMotionSolver(const polyMesh& mesh)
:
motionSolver(mesh),
fvMesh_(refCast<const fvMesh>(mesh)),
pointMesh_(fvMesh_),
vpi_(fvMesh_, pointMesh_)
fvMesh_(refCast<const fvMesh>(mesh))
{}
@ -55,16 +54,14 @@ Foam::fvMotionSolver::~fvMotionSolver()
void Foam::fvMotionSolver::movePoints(const pointField& p)
{
pointMesh_.movePoints(p);
vpi_.movePoints();
// Movement of pointMesh and volPointInterpolation done by polyMesh,fvMesh
}
void Foam::fvMotionSolver::updateMesh(const mapPolyMesh& mpm)
{
motionSolver::updateMesh(mpm);
pointMesh_.updateMesh(mpm);
vpi_.updateMesh();
// Update of pointMesh and volPointInterpolation done by polyMesh,fvMesh
}

View File

@ -40,13 +40,16 @@ SourceFiles
#define fvMotionSolver_H
#include "motionSolver.H"
#include "volPointInterpolation.H"
#include "pointFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class fvMesh;
class mapPolyMesh;
/*---------------------------------------------------------------------------*\
Class fvMotionSolver Declaration
\*---------------------------------------------------------------------------*/
@ -63,13 +66,6 @@ protected:
//- The fvMesh to be moved
const fvMesh& fvMesh_;
//- Point mesh needed by the volPointInterpolation
mutable pointMesh pointMesh_;
//- Vol-point interpolator used to obtain the point motion from
// the cell-centre motion
mutable volPointInterpolation vpi_;
// Protected member functions

View File

@ -28,6 +28,7 @@ License
#include "motionDiffusivity.H"
#include "fvmLaplacian.H"
#include "addToRunTimeSelectionTable.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -66,7 +67,7 @@ velocityComponentLaplacianFvMotionSolver
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
pointMesh_
pointMesh::New(fvMesh_)
),
cellMotionU_
(
@ -129,7 +130,11 @@ Foam::velocityComponentLaplacianFvMotionSolver::
Foam::tmp<Foam::pointField>
Foam::velocityComponentLaplacianFvMotionSolver::curPoints() const
{
vpi_.interpolate(cellMotionU_, pointMotionU_);
volPointInterpolation::New(fvMesh_).interpolate
(
cellMotionU_,
pointMotionU_
);
tmp<pointField> tcurPoints(new pointField(fvMesh_.points()));

View File

@ -28,6 +28,7 @@ License
#include "motionDiffusivity.H"
#include "fvmLaplacian.H"
#include "addToRunTimeSelectionTable.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -63,7 +64,7 @@ Foam::velocityLaplacianFvMotionSolver::velocityLaplacianFvMotionSolver
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
pointMesh_
pointMesh::New(fvMesh_)
),
cellMotionU_
(
@ -102,7 +103,11 @@ Foam::velocityLaplacianFvMotionSolver::~velocityLaplacianFvMotionSolver()
Foam::tmp<Foam::pointField>
Foam::velocityLaplacianFvMotionSolver::curPoints() const
{
vpi_.interpolate(cellMotionU_, pointMotionU_);
volPointInterpolation::New(fvMesh_).interpolate
(
cellMotionU_,
pointMotionU_
);
tmp<pointField> tcurPoints
(

View File

@ -73,9 +73,6 @@ void Foam::inversePointDistanceDiffusivity::correct()
const polyMesh& mesh = mSolver().mesh();
const polyBoundaryMesh& bdry = mesh.boundaryMesh();
// Construct point mesh
const pointMesh pMesh(mesh);
labelHashSet patchSet(bdry.size());
label nPatchEdges = 0;
@ -133,7 +130,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
// Do calculations
PointEdgeWave<pointEdgePoint> waveInfo
(
pMesh,
mesh,
seedPoints,
seedInfo,

View File

@ -37,7 +37,6 @@ SourceFiles
#define Cloud_H
#include "cloud.H"
#include "pointMesh.H"
#include "IDLList.H"
#include "IOField.H"
@ -231,8 +230,14 @@ public:
// Read
//- Read and return a lagrangian data field
// Checks that data is valid
//- Helper to construct IOobject for field and current time.
IOobject fieldIOobject
(
const word& fieldName,
const IOobject::readOption r
) const;
//- Check lagrangian data field
template<class DataType>
void checkFieldIOobject
(
@ -240,13 +245,6 @@ public:
const IOField<DataType>& data
) const;
//- Read and return a lagrangian data field
IOobject fieldIOobject(const word& fieldName) const;
//- Read and return a lagrangian data field
template<class Type>
tmp<IOField<Type> > readField(const word& fieldName) const;
//- Read the field data for the cloud of particles
void readFields();

View File

@ -103,6 +103,25 @@ Foam::Cloud<ParticleType>::Cloud
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ParticleType>
Foam::IOobject Foam::Cloud<ParticleType>::fieldIOobject
(
const word& fieldName,
const IOobject::readOption r
) const
{
return IOobject
(
fieldName,
time().timeName(),
*this,
r,
IOobject::NO_WRITE,
false
);
}
template<class ParticleType>
template<class DataType>
void Foam::Cloud<ParticleType>::checkFieldIOobject
@ -116,7 +135,7 @@ void Foam::Cloud<ParticleType>::checkFieldIOobject
FatalErrorIn
(
"void Cloud<ParticleType>::checkFieldIOobject"
"(Cloud<ParticleType>, IOField<DataType>)"
"(const Cloud<ParticleType>&, const IOField<DataType>&) const"
) << "Size of " << data.name()
<< " field " << data.size()
<< " does not match the number of particles " << c.size()
@ -125,35 +144,6 @@ void Foam::Cloud<ParticleType>::checkFieldIOobject
}
template<class ParticleType>
Foam::IOobject Foam::Cloud<ParticleType>::fieldIOobject
(
const word& fieldName
) const
{
return IOobject
(
fieldName,
time().timeName(),
*this,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
);
}
template<class ParticleType>
template<class Type>
Foam::tmp<Foam::IOField<Type> > Foam::Cloud<ParticleType>::readField
(
const word& fieldName
) const
{
return tmp<IOField<Type> >(new IOField<Type>(fieldIOobject(fieldName)));
}
template<class ParticleType>
void Foam::Cloud<ParticleType>::readFields()
{}

View File

@ -106,43 +106,46 @@ void Foam::parcel::readFields
return;
}
IOField<scalar> d(c.fieldIOobject("d"));
IOField<scalar> d(c.fieldIOobject("d", IOobject::MUST_READ));
c.checkFieldIOobject(c, d);
IOField<scalar> T(c.fieldIOobject("T"));
IOField<scalar> T(c.fieldIOobject("T", IOobject::MUST_READ));
c.checkFieldIOobject(c, T);
IOField<scalar> m(c.fieldIOobject("m"));
IOField<scalar> m(c.fieldIOobject("m", IOobject::MUST_READ));
c.checkFieldIOobject(c, m);
IOField<scalar> y(c.fieldIOobject("y"));
IOField<scalar> y(c.fieldIOobject("y", IOobject::MUST_READ));
c.checkFieldIOobject(c, y);
IOField<scalar> yDot(c.fieldIOobject("yDot"));
IOField<scalar> yDot(c.fieldIOobject("yDot", IOobject::MUST_READ));
c.checkFieldIOobject(c, yDot);
IOField<scalar> ct(c.fieldIOobject("ct"));
IOField<scalar> ct(c.fieldIOobject("ct", IOobject::MUST_READ));
c.checkFieldIOobject(c, ct);
IOField<scalar> ms(c.fieldIOobject("ms"));
IOField<scalar> ms(c.fieldIOobject("ms", IOobject::MUST_READ));
c.checkFieldIOobject(c, ms);
IOField<scalar> tTurb(c.fieldIOobject("tTurb"));
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::MUST_READ));
c.checkFieldIOobject(c, tTurb);
IOField<scalar> liquidCore(c.fieldIOobject("liquidCore"));
IOField<scalar> liquidCore
(
c.fieldIOobject("liquidCore", IOobject::MUST_READ)
);
c.checkFieldIOobject(c, liquidCore);
IOField<scalar> injector(c.fieldIOobject("injector"));
IOField<scalar> injector(c.fieldIOobject("injector", IOobject::MUST_READ));
c.checkFieldIOobject(c, injector);
IOField<vector> U(c.fieldIOobject("U"));
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
c.checkFieldIOobject(c, U);
IOField<vector> Uturb(c.fieldIOobject("Uturb"));
IOField<vector> Uturb(c.fieldIOobject("Uturb", IOobject::MUST_READ));
c.checkFieldIOobject(c, Uturb);
IOField<vector> n(c.fieldIOobject("n"));
IOField<vector> n(c.fieldIOobject("n", IOobject::MUST_READ));
c.checkFieldIOobject(c, n);
label i = 0;
@ -179,7 +182,7 @@ void Foam::parcel::readFields
for (label j=0; j<nX; j++)
{
IOField<scalar> X(c.fieldIOobject(names[j]));
IOField<scalar> X(c.fieldIOobject(names[j], IOobject::MUST_READ));
label i = 0;
forAllIter(Cloud<parcel>, c, iter)
@ -201,20 +204,27 @@ void Foam::parcel::writeFields
label np = c.size();
IOField<scalar> d(c.fieldIOobject("d"), np);
IOField<scalar> T(c.fieldIOobject("T"), np);
IOField<scalar> m(c.fieldIOobject("m"), np);
IOField<scalar> y(c.fieldIOobject("y"), np);
IOField<scalar> yDot(c.fieldIOobject("yDot"), np);
IOField<scalar> ct(c.fieldIOobject("ct"), np);
IOField<scalar> ms(c.fieldIOobject("ms"), np);
IOField<scalar> tTurb(c.fieldIOobject("tTurb"), np);
IOField<scalar> liquidCore(c.fieldIOobject("liquidCore"), np);
IOField<scalar> injector(c.fieldIOobject("injector"), np);
IOField<vector> U(c.fieldIOobject("U"), np);
IOField<vector> Uturb(c.fieldIOobject("Uturb"), np);
IOField<vector> n(c.fieldIOobject("n"), np);
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
IOField<scalar> T(c.fieldIOobject("T", IOobject::NO_READ), np);
IOField<scalar> m(c.fieldIOobject("m", IOobject::NO_READ), np);
IOField<scalar> y(c.fieldIOobject("y", IOobject::NO_READ), np);
IOField<scalar> yDot(c.fieldIOobject("yDot", IOobject::NO_READ), np);
IOField<scalar> ct(c.fieldIOobject("ct", IOobject::NO_READ), np);
IOField<scalar> ms(c.fieldIOobject("ms", IOobject::NO_READ), np);
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::NO_READ), np);
IOField<scalar> liquidCore
(
c.fieldIOobject("liquidCore", IOobject::NO_READ),
np
);
IOField<scalar> injector
(
c.fieldIOobject("injector", IOobject::NO_READ),
np
);
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
IOField<vector> Uturb(c.fieldIOobject("Uturb", IOobject::NO_READ), np);
IOField<vector> n(c.fieldIOobject("n", IOobject::NO_READ), np);
label i = 0;
forAllConstIter(Cloud<parcel>, c, iter)
@ -265,7 +275,7 @@ void Foam::parcel::writeFields
for (label j=0; j<nX; j++)
{
IOField<scalar> X(c.fieldIOobject(names[j]), np);
IOField<scalar> X(c.fieldIOobject(names[j], IOobject::NO_READ), np);
label i = 0;
forAllConstIter(Cloud<parcel>, c, iter)

View File

@ -52,7 +52,6 @@ defineTemplateTypeNameAndDebug(IOPtrList<injector>, 0);
// Construct from components
Foam::spray::spray
(
const volPointInterpolation& vpi,
const volVectorField& U,
const volScalarField& rho,
const volScalarField& p,
@ -67,7 +66,6 @@ Foam::spray::spray
runTime_(U.time()),
time0_(runTime_.value()),
mesh_(U.mesh()),
volPointInterpolation_(vpi),
rndGen_(label(0)),
U_(U),
@ -263,7 +261,7 @@ Foam::spray::spray
{
FatalErrorIn
(
"spray::spray(const pointMesh& pMesh, const volVectorField& U, "
"spray::spray(const volVectorField& U, "
"const volScalarField& rho, const volScalarField& p, "
"const volScalarField& T, const combustionMixture& composition,"
"const PtrList<specieProperties>& gaseousFuelProperties, "

View File

@ -36,7 +36,6 @@ Description
#include "parcel.H"
#include "injector.H"
#include "IOPtrList.H"
#include "volPointInterpolation.H"
#include "interpolation.H"
#include "liquid.H"
#include "sprayThermoTypes.H"
@ -76,7 +75,6 @@ class spray
const Time& runTime_;
scalar time0_;
const fvMesh& mesh_;
const volPointInterpolation& volPointInterpolation_;
//- Random number generator
Random rndGen_;
@ -189,7 +187,6 @@ public:
//- Construct from components
spray
(
const volPointInterpolation& vpi,
const volVectorField& U,
const volScalarField& rho,
const volScalarField& p,

View File

@ -49,33 +49,13 @@ void spray::evolve()
srhos_[i].setSize(rho_.size());
}
UInterpolator_ = interpolation<vector>::New
(
interpolationSchemes_,
volPointInterpolation_,
U_
);
UInterpolator_ = interpolation<vector>::New(interpolationSchemes_, U_);
rhoInterpolator_ = interpolation<scalar>::New
(
interpolationSchemes_,
volPointInterpolation_,
rho_
);
rhoInterpolator_ = interpolation<scalar>::New(interpolationSchemes_, rho_);
pInterpolator_ = interpolation<scalar>::New
(
interpolationSchemes_,
volPointInterpolation_,
p_
);
pInterpolator_ = interpolation<scalar>::New(interpolationSchemes_, p_);
TInterpolator_ = interpolation<scalar>::New
(
interpolationSchemes_,
volPointInterpolation_,
T_
);
TInterpolator_ = interpolation<scalar>::New(interpolationSchemes_, T_);
calculateAmbientPressure();
calculateAmbientTemperature();

View File

@ -29,10 +29,9 @@ License
#include "DragModel.H"
#include "InjectionModel.H"
#include "WallInteractionModel.H"
#include "IntegrationScheme.H"
#include "interpolation.H"
#include "interpolationCellPoint.H"
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
@ -142,7 +141,6 @@ template<class ParcelType>
Foam::KinematicCloud<ParcelType>::KinematicCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const volScalarField& mu,
@ -153,7 +151,6 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
kinematicCloud(),
cloudType_(cloudType),
mesh_(rho.mesh()),
vpi_(vpi),
particleProperties_
(
IOobject
@ -267,7 +264,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
FatalErrorIn
(
"Foam::KinematicCloud<ParcelType>::KinematicCloud"
"(const word&, const volPointInterpolation&, const volScalarField&"
"(const word&, const volScalarField&"
", const volVectorField&, const volScalarField&, const "
"dimensionedVector&)"
)<< "parcelBasisType must be either 'number' or 'mass'" << nl
@ -300,7 +297,6 @@ void Foam::KinematicCloud<ParcelType>::evolve()
interpolation<scalar>::New
(
interpolationSchemes_,
vpi_,
rho_
);
@ -308,7 +304,6 @@ void Foam::KinematicCloud<ParcelType>::evolve()
interpolation<vector>::New
(
interpolationSchemes_,
vpi_,
U_
);
@ -316,7 +311,6 @@ void Foam::KinematicCloud<ParcelType>::evolve()
interpolation<scalar>::New
(
interpolationSchemes_,
vpi_,
mu_
);

View File

@ -50,7 +50,6 @@ SourceFiles
#include "Random.H"
#include "fvMesh.H"
#include "volFields.H"
#include "volPointInterpolation.H"
#include "fvMatrices.H"
#include "fvm.H"
@ -110,9 +109,6 @@ private:
//- References to the mesh and time databases
const fvMesh& mesh_;
//- Reference to the interpolation for the carrier phase to the parcels
const volPointInterpolation& vpi_;
//- Dictionary of particle properties
IOdictionary particleProperties_;
@ -268,7 +264,6 @@ public:
KinematicCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const volScalarField& mu,
@ -295,9 +290,6 @@ public:
//- Return refernce to the mesh
inline const fvMesh& mesh() const;
//- Retuen reference to the interpolation
inline const volPointInterpolation& vpi() const;
//- Return particle properties dictionary
inline const IOdictionary& particleProperties() const;

View File

@ -47,14 +47,6 @@ inline const Foam::fvMesh& Foam::KinematicCloud<ParcelType>::mesh() const
}
template<class ParcelType>
inline const Foam::volPointInterpolation&
Foam::KinematicCloud<ParcelType>::vpi() const
{
return vpi_;
}
template<class ParcelType>
inline const Foam::IOdictionary&
Foam::KinematicCloud<ParcelType>::particleProperties() const

View File

@ -29,15 +29,12 @@ License
#include "MassTransferModel.H"
#include "SurfaceReactionModel.H"
#include "interpolationCellPoint.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ParcelType>
Foam::ReactingCloud<ParcelType>::ReactingCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
@ -45,7 +42,7 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
PtrList<specieReactingProperties>& gases
)
:
ThermoCloud<ParcelType>(cloudType, vpi, rho, U, g, thermo),
ThermoCloud<ParcelType>(cloudType, rho, U, g, thermo),
reactingCloud(),
constProps_(this->particleProperties()),
carrierThermo_(thermo),
@ -131,42 +128,36 @@ void Foam::ReactingCloud<ParcelType>::evolve()
autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New
(
this->interpolationSchemes(),
this->vpi(),
this->rho()
);
autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New
(
this->interpolationSchemes(),
this->vpi(),
this->U()
);
autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New
(
this->interpolationSchemes(),
this->vpi(),
this->mu()
);
autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New
(
this->interpolationSchemes(),
this->vpi(),
T
);
autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New
(
this->interpolationSchemes(),
this->vpi(),
cp
);
autoPtr<interpolation<scalar> > pInterpolator = interpolation<scalar>::New
(
this->interpolationSchemes(),
this->vpi(),
p
);

View File

@ -133,7 +133,6 @@ public:
ReactingCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,

View File

@ -36,7 +36,6 @@ template<class ParcelType>
Foam::ThermoCloud<ParcelType>::ThermoCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
@ -46,7 +45,6 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
KinematicCloud<ParcelType>
(
cloudType,
vpi,
rho,
U,
thermo.mu(),
@ -130,35 +128,30 @@ void Foam::ThermoCloud<ParcelType>::evolve()
autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New
(
this->interpolationSchemes(),
this->vpi(),
this->rho()
);
autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New
(
this->interpolationSchemes(),
this->vpi(),
this->U()
);
autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New
(
this->interpolationSchemes(),
this->vpi(),
this->mu()
);
autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New
(
this->interpolationSchemes(),
this->vpi(),
T
);
autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New
(
this->interpolationSchemes(),
this->vpi(),
cp
);

View File

@ -135,7 +135,6 @@ public:
ThermoCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,

View File

@ -39,14 +39,13 @@ namespace Foam
Foam::basicKinematicCloud::basicKinematicCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const volScalarField& mu,
const dimensionedVector& g
)
:
KinematicCloud<basicKinematicParcel>(cloudType, vpi, rho, U, mu, g)
KinematicCloud<basicKinematicParcel>(cloudType, rho, U, mu, g)
{
basicKinematicParcel::readFields(*this);
}

View File

@ -74,7 +74,6 @@ public:
basicKinematicCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const volScalarField& mu,

View File

@ -39,7 +39,6 @@ namespace Foam
Foam::basicReactingCloud::basicReactingCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
@ -50,7 +49,6 @@ Foam::basicReactingCloud::basicReactingCloud
ReactingCloud<basicReactingParcel>
(
cloudType,
vpi,
rho,
U,
g,

View File

@ -73,7 +73,6 @@ public:
basicReactingCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,

View File

@ -39,14 +39,13 @@ namespace Foam
Foam::basicThermoCloud::basicThermoCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
basicThermo& thermo
)
:
ThermoCloud<basicThermoParcel>(cloudType, vpi, rho, U, g, thermo)
ThermoCloud<basicThermoParcel>(cloudType, rho, U, g, thermo)
{
basicThermoParcel::readFields(*this);
}

View File

@ -76,7 +76,6 @@ public:
basicThermoCloud
(
const word& cloudType,
const volPointInterpolation& vpi,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,

View File

@ -26,6 +26,8 @@ License
#include "KinematicParcel.H"
#include "IOstreams.H"
#include "IOField.H"
#include "Cloud.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -97,25 +99,25 @@ void Foam::KinematicParcel<ParcelType>::readFields
return;
}
IOField<label> typeId(c.fieldIOobject("typeId"));
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::MUST_READ));
c.checkFieldIOobject(c, typeId);
IOField<scalar> d(c.fieldIOobject("d"));
IOField<scalar> d(c.fieldIOobject("d", IOobject::MUST_READ));
c.checkFieldIOobject(c, d);
IOField<vector> U(c.fieldIOobject("U"));
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
c.checkFieldIOobject(c, U);
IOField<scalar> nParticle(c.fieldIOobject("nParticle"));
IOField<scalar> nParticle(c.fieldIOobject("nParticle", IOobject::MUST_READ));
c.checkFieldIOobject(c, nParticle);
IOField<scalar> rho(c.fieldIOobject("rho"));
IOField<scalar> rho(c.fieldIOobject("rho", IOobject::MUST_READ));
c.checkFieldIOobject(c, rho);
IOField<scalar> tTurb(c.fieldIOobject("tTurb"));
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::MUST_READ));
c.checkFieldIOobject(c, tTurb);
IOField<vector> UTurb(c.fieldIOobject("UTurb"));
IOField<vector> UTurb(c.fieldIOobject("UTurb", IOobject::MUST_READ));
c.checkFieldIOobject(c, UTurb);
label i = 0;
@ -145,13 +147,17 @@ void Foam::KinematicParcel<ParcelType>::writeFields
label np = c.size();
IOField<label> typeId(c.fieldIOobject("typeId"), np);
IOField<scalar> d(c.fieldIOobject("d"), np);
IOField<vector> U(c.fieldIOobject("U"), np);
IOField<scalar> nParticle(c.fieldIOobject("nParticle"), np);
IOField<scalar> rho(c.fieldIOobject("rho"), np);
IOField<scalar> tTurb(c.fieldIOobject("tTurb"), np);
IOField<vector> UTurb(c.fieldIOobject("UTurb"), np);
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np);
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
IOField<scalar> nParticle
(
c.fieldIOobject("nParticle", IOobject::NO_READ),
np
);
IOField<scalar> rho(c.fieldIOobject("rho", IOobject::NO_READ), np);
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::NO_READ), np);
IOField<vector> UTurb(c.fieldIOobject("UTurb", IOobject::NO_READ), np);
label i = 0;
forAllConstIter(typename Cloud<ParcelType>, c, iter)

View File

@ -103,7 +103,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
ThermoParcel<ParcelType>::readFields(c);
IOField<scalar> mass0(c.fieldIOobject("mass0"));
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::MUST_READ));
c.checkFieldIOobject(c, mass0);
label i = 0;
@ -136,7 +136,10 @@ void Foam::ReactingParcel<ParcelType>::readFields
// Populate YMixture for each parcel
forAll(compositionNames, j)
{
IOField<scalar> YMixture(c.fieldIOobject("Y" + compositionNames[j]));
IOField<scalar> YMixture
(
c.fieldIOobject("Y" + compositionNames[j], IOobject::MUST_READ)
);
label i = 0;
forAllIter(typename Cloud<ParcelType>, c, iter)
@ -148,7 +151,10 @@ void Foam::ReactingParcel<ParcelType>::readFields
// Populate YGas for each parcel
forAll(gasNames, j)
{
IOField<scalar> YGas(c.fieldIOobject("Y" + gasNames[j]));
IOField<scalar> YGas
(
c.fieldIOobject("Y" + gasNames[j], IOobject::MUST_READ)
);
label i = 0;
forAllIter(typename Cloud<ParcelType>, c, iter)
@ -160,7 +166,10 @@ void Foam::ReactingParcel<ParcelType>::readFields
// Populate YLiquid for each parcel
forAll(liquidNames, j)
{
IOField<scalar> YLiquid(c.fieldIOobject("Y" + liquidNames[j]));
IOField<scalar> YLiquid
(
c.fieldIOobject("Y" + liquidNames[j], IOobject::MUST_READ)
);
label i = 0;
forAllIter(typename Cloud<ParcelType>, c, iter)
@ -172,7 +181,10 @@ void Foam::ReactingParcel<ParcelType>::readFields
// Populate YSolid for each parcel
forAll(solidNames, j)
{
IOField<scalar> YSolid(c.fieldIOobject("Y" + solidNames[j]));
IOField<scalar> YSolid
(
c.fieldIOobject("Y" + solidNames[j], IOobject::MUST_READ)
);
label i = 0;
forAllIter(typename Cloud<ParcelType>, c, iter)
@ -194,7 +206,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
label np = c.size();
IOField<scalar> mass0(c.fieldIOobject("mass0"), np);
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
label i = 0;
forAllConstIter(typename Cloud<ParcelType>, c, iter)
@ -213,7 +225,8 @@ void Foam::ReactingParcel<ParcelType>::writeFields
{
IOField<scalar> YMixture
(
c.fieldIOobject("Y" + compositionNames[j]), np
c.fieldIOobject("Y" + compositionNames[j], IOobject::NO_READ),
np
);
label i = 0;
@ -228,7 +241,11 @@ void Foam::ReactingParcel<ParcelType>::writeFields
const wordList& gasNames = c.composition().gasNames();
forAll(gasNames, j)
{
IOField<scalar> YGas(c.fieldIOobject("Y" + gasNames[j]), np);
IOField<scalar> YGas
(
c.fieldIOobject("Y" + gasNames[j], IOobject::NO_READ),
np
);
label i = 0;
forAllConstIter(typename Cloud<ParcelType>, c, iter)
@ -242,7 +259,11 @@ void Foam::ReactingParcel<ParcelType>::writeFields
const wordList& liquidNames = c.composition().liquidNames();
forAll(liquidNames, j)
{
IOField<scalar> YLiquid(c.fieldIOobject("Y" + liquidNames[j]), np);
IOField<scalar> YLiquid
(
c.fieldIOobject("Y" + liquidNames[j], IOobject::NO_READ),
np
);
label i = 0;
forAllConstIter(typename Cloud<ParcelType>, c, iter)
@ -256,7 +277,11 @@ void Foam::ReactingParcel<ParcelType>::writeFields
const wordList& solidNames = c.composition().solidNames();
forAll(solidNames, j)
{
IOField<scalar> YSolid(c.fieldIOobject("Y" + solidNames[j]), np);
IOField<scalar> YSolid
(
c.fieldIOobject("Y" + solidNames[j], IOobject::NO_READ),
np
);
label i = 0;
forAllConstIter(typename Cloud<ParcelType>, c, iter)

View File

@ -82,10 +82,10 @@ void Foam::ThermoParcel<ParcelType>::readFields
KinematicParcel<ParcelType>::readFields(c);
IOField<scalar> T(c.fieldIOobject("T"));
IOField<scalar> T(c.fieldIOobject("T", IOobject::MUST_READ));
c.checkFieldIOobject(c, T);
IOField<scalar> cp(c.fieldIOobject("cp"));
IOField<scalar> cp(c.fieldIOobject("cp", IOobject::MUST_READ));
c.checkFieldIOobject(c, cp);
@ -111,8 +111,8 @@ void Foam::ThermoParcel<ParcelType>::writeFields
label np = c.size();
IOField<scalar> T(c.fieldIOobject("T"), np);
IOField<scalar> cp(c.fieldIOobject("cp"), np);
IOField<scalar> T(c.fieldIOobject("T", IOobject::NO_READ), np);
IOField<scalar> cp(c.fieldIOobject("cp", IOobject::NO_READ), np);
label i = 0;
forAllConstIter(typename Cloud<ParcelType>, c, iter)

View File

@ -85,22 +85,25 @@ void molecule::readFields(moleculeCloud& mC)
return;
}
IOField<label> id(mC.fieldIOobject("id"));
IOField<label> id(mC.fieldIOobject("id", IOobject::MUST_READ));
mC.checkFieldIOobject(mC, id);
IOField<scalar> mass(mC.fieldIOobject("mass"));
IOField<scalar> mass(mC.fieldIOobject("mass", IOobject::MUST_READ));
mC.checkFieldIOobject(mC, mass);
IOField<vector> U(mC.fieldIOobject("U"));
IOField<vector> U(mC.fieldIOobject("U", IOobject::MUST_READ));
mC.checkFieldIOobject(mC, U);
IOField<vector> A(mC.fieldIOobject("A"));
IOField<vector> A(mC.fieldIOobject("A", IOobject::MUST_READ));
mC.checkFieldIOobject(mC, A);
IOField<label> tethered(mC.fieldIOobject("tethered"));
IOField<label> tethered(mC.fieldIOobject("tethered", IOobject::MUST_READ));
mC.checkFieldIOobject(mC, tethered);
IOField<vector> tetherPositions(mC.fieldIOobject("tetherPositions"));
IOField<vector> tetherPositions
(
mC.fieldIOobject("tetherPositions", IOobject::MUST_READ)
);
mC.checkFieldIOobject(mC, tetherPositions);
label i = 0;
@ -127,12 +130,20 @@ void molecule::writeFields(const moleculeCloud& mC)
label np = mC.size();
IOField<label> id(mC.fieldIOobject("id"), np);
IOField<scalar> mass(mC.fieldIOobject("mass"), np);
IOField<vector> U(mC.fieldIOobject("U"), np);
IOField<vector> A(mC.fieldIOobject("A"), np);
IOField<label> tethered(mC.fieldIOobject("tethered"), np);
IOField<vector> tetherPositions(mC.fieldIOobject("tetherPositions"), np);
IOField<label> id(mC.fieldIOobject("id", IOobject::NO_READ), np);
IOField<scalar> mass(mC.fieldIOobject("mass", IOobject::NO_READ), np);
IOField<vector> U(mC.fieldIOobject("U", IOobject::NO_READ), np);
IOField<vector> A(mC.fieldIOobject("A", IOobject::NO_READ), np);
IOField<label> tethered
(
mC.fieldIOobject("tethered", IOobject::NO_READ),
np
);
IOField<vector> tetherPositions
(
mC.fieldIOobject("tetherPositions", IOobject::NO_READ),
np
);
label i = 0;
forAllConstIter(moleculeCloud, mC, iter)

View File

@ -28,7 +28,6 @@ License
#include "fvMesh.H"
#include "volFields.H"
#include "interpolationCellPoint.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -75,12 +74,9 @@ void Foam::solidParticleCloud::move(const dimensionedVector& g)
const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");
pointMesh pMesh(U.mesh());
volPointInterpolation vpi(U.mesh(), pMesh);
interpolationCellPoint<scalar> rhoInterp(vpi, rho);
interpolationCellPoint<vector> UInterp(vpi, U);
interpolationCellPoint<scalar> nuInterp(vpi, nu);
interpolationCellPoint<scalar> rhoInterp(rho);
interpolationCellPoint<vector> UInterp(U);
interpolationCellPoint<scalar> nuInterp(nu);
solidParticle::trackData td(*this, rhoInterp, UInterp, nuInterp, g.value());

View File

@ -66,10 +66,10 @@ void Foam::solidParticle::readFields(Cloud<solidParticle>& c)
{
return;
}
IOField<scalar> d(c.fieldIOobject("d"));
IOField<scalar> d(c.fieldIOobject("d", IOobject::MUST_READ));
c.checkFieldIOobject(c, d);
IOField<vector> U(c.fieldIOobject("U"));
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
c.checkFieldIOobject(c, U);
label i = 0;
@ -90,8 +90,8 @@ void Foam::solidParticle::writeFields(const Cloud<solidParticle>& c)
label np = c.size();
IOField<scalar> d(c.fieldIOobject("d"), np);
IOField<vector> U(c.fieldIOobject("U"), np);
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
label i = 0;
forAllConstIter(Cloud<solidParticle>, c, iter)

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include "PointEdgeWave.H"
#include "pointMesh.H"
#include "polyMesh.H"
#include "processorPolyPatch.H"
#include "cyclicPolyPatch.H"
#include "OPstream.H"
@ -33,7 +33,6 @@ License
#include "PstreamCombineReduceOps.H"
#include "debug.H"
#include "typeInfo.H"
#include "ListOps.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -61,13 +60,11 @@ void Foam::PointEdgeWave<Type>::offset(const label val, labelList& elems)
template <class Type>
void Foam::PointEdgeWave<Type>::calcCyclicAddressing()
{
const polyMesh& mesh = pMesh_();
label cycHalf = 0;
forAll(mesh.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchI)
{
const polyPatch& patch = mesh.boundaryMesh()[patchI];
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
if (isA<cyclicPolyPatch>(patch))
{
@ -75,7 +72,7 @@ void Foam::PointEdgeWave<Type>::calcCyclicAddressing()
SubList<face> halfAFaces
(
mesh.faces(),
mesh_.faces(),
halfSize,
patch.start()
);
@ -83,12 +80,12 @@ void Foam::PointEdgeWave<Type>::calcCyclicAddressing()
cycHalves_.set
(
cycHalf++,
new primitivePatch(halfAFaces, mesh.points())
new primitivePatch(halfAFaces, mesh_.points())
);
SubList<face> halfBFaces
(
mesh.faces(),
mesh_.faces(),
halfSize,
patch.start() + halfSize
);
@ -96,7 +93,7 @@ void Foam::PointEdgeWave<Type>::calcCyclicAddressing()
cycHalves_.set
(
cycHalf++,
new primitivePatch(halfBFaces, mesh.points())
new primitivePatch(halfBFaces, mesh_.points())
);
}
}
@ -203,7 +200,7 @@ bool Foam::PointEdgeWave<Type>::updatePoint
bool propagate =
pointInfo.updatePoint
(
pMesh_(),
mesh_,
pointI,
neighbourEdgeI,
neighbourInfo,
@ -249,7 +246,7 @@ bool Foam::PointEdgeWave<Type>::updatePoint
bool propagate =
pointInfo.updatePoint
(
pMesh_(),
mesh_,
pointI,
neighbourInfo,
tol
@ -295,7 +292,7 @@ bool Foam::PointEdgeWave<Type>::updateEdge
bool propagate =
edgeInfo.updateEdge
(
pMesh_(),
mesh_,
edgeI,
neighbourPointI,
neighbourInfo,
@ -327,9 +324,9 @@ Foam::label Foam::PointEdgeWave<Type>::countPatchType() const
{
label nPatches = 0;
forAll(pMesh_().boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchI)
{
if (isA<PatchType>(pMesh_().boundaryMesh()[patchI]))
if (isA<PatchType>(mesh_.boundaryMesh()[patchI]))
{
nPatches++;
}
@ -433,15 +430,12 @@ void Foam::PointEdgeWave<Type>::updateFromPatchInfo
template <class Type>
void Foam::PointEdgeWave<Type>::handleProcPatches()
{
const polyMesh& mesh = pMesh_();
// 1. Send all point info on processor patches. Send as
// face label + offset in face.
forAll(mesh.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchI)
{
const polyPatch& patch = mesh.boundaryMesh()[patchI];
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
if (isA<processorPolyPatch>(patch))
{
@ -491,9 +485,9 @@ void Foam::PointEdgeWave<Type>::handleProcPatches()
// 2. Receive all point info on processor patches.
//
forAll(mesh.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchI)
{
const polyPatch& patch = mesh.boundaryMesh()[patchI];
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
if (isA<processorPolyPatch>(patch))
{
@ -544,7 +538,7 @@ void Foam::PointEdgeWave<Type>::handleProcPatches()
// (Note:irrespective if changed or not for now)
//
const globalMeshData& pd = mesh.globalData();
const globalMeshData& pd = mesh_.globalData();
List<Type> sharedData(pd.nGlobalPoints());
@ -579,16 +573,14 @@ void Foam::PointEdgeWave<Type>::handleProcPatches()
template <class Type>
void Foam::PointEdgeWave<Type>::handleCyclicPatches()
{
const polyMesh& mesh = pMesh_();
// 1. Send all point info on cyclic patches. Send as
// face label + offset in face.
label cycHalf = 0;
forAll(mesh.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchI)
{
const polyPatch& patch = mesh.boundaryMesh()[patchI];
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
if (isA<cyclicPolyPatch>(patch))
{
@ -692,7 +684,7 @@ void Foam::PointEdgeWave<Type>::handleCyclicPatches()
template <class Type>
Foam::PointEdgeWave<Type>::PointEdgeWave
(
const pointMesh& pMesh,
const polyMesh& mesh,
const labelList& changedPoints,
const List<Type>& changedPointsInfo,
@ -702,45 +694,45 @@ Foam::PointEdgeWave<Type>::PointEdgeWave
const label maxIter
)
:
pMesh_(pMesh),
mesh_(mesh),
allPointInfo_(allPointInfo),
allEdgeInfo_(allEdgeInfo),
changedPoint_(pMesh_().nPoints(), false),
changedPoints_(pMesh_().nPoints()),
changedPoint_(mesh_.nPoints(), false),
changedPoints_(mesh_.nPoints()),
nChangedPoints_(0),
changedEdge_(pMesh_().nEdges(), false),
changedEdges_(pMesh_().nEdges()),
changedEdge_(mesh_.nEdges(), false),
changedEdges_(mesh_.nEdges()),
nChangedEdges_(0),
nCyclicPatches_(countPatchType<cyclicPolyPatch>()),
cycHalves_(2*nCyclicPatches_),
nEvals_(0),
nUnvisitedPoints_(pMesh_().nPoints()),
nUnvisitedEdges_(pMesh_().nEdges())
nUnvisitedPoints_(mesh_.nPoints()),
nUnvisitedEdges_(mesh_.nEdges())
{
if (allPointInfo_.size() != pMesh_().nPoints())
if (allPointInfo_.size() != mesh_.nPoints())
{
FatalErrorIn
(
"PointEdgeWave<Type>::PointEdgeWave"
"(const pointMesh&, const labelList&, const List<Type>,"
"(const polyMesh&, const labelList&, const List<Type>,"
" List<Type>&, List<Type>&, const label maxIter)"
) << "size of pointInfo work array is not equal to the number"
<< " of points in the mesh" << endl
<< " pointInfo :" << allPointInfo_.size() << endl
<< " mesh.nPoints:" << pMesh_().nPoints()
<< " mesh.nPoints:" << mesh_.nPoints()
<< exit(FatalError);
}
if (allEdgeInfo_.size() != pMesh_().nEdges())
if (allEdgeInfo_.size() != mesh_.nEdges())
{
FatalErrorIn
(
"PointEdgeWave<Type>::PointEdgeWave"
"(const pointMesh&, const labelList&, const List<Type>,"
"(const polyMesh&, const labelList&, const List<Type>,"
" List<Type>&, List<Type>&, const label maxIter)"
) << "size of edgeInfo work array is not equal to the number"
<< " of edges in the mesh" << endl
<< " edgeInfo :" << allEdgeInfo_.size() << endl
<< " mesh.nEdges:" << pMesh_().nEdges()
<< " mesh.nEdges:" << mesh_.nEdges()
<< exit(FatalError);
}
@ -768,7 +760,7 @@ Foam::PointEdgeWave<Type>::PointEdgeWave
FatalErrorIn
(
"PointEdgeWave<Type>::PointEdgeWave"
"(const pointMesh&, const labelList&, const List<Type>,"
"(const polyMesh&, const labelList&, const List<Type>,"
" List<Type>&, List<Type>&, const label maxIter)"
) << "Maximum number of iterations reached. Increase maxIter." << endl
<< " maxIter:" << maxIter << endl
@ -863,7 +855,7 @@ Foam::label Foam::PointEdgeWave<Type>::edgeToPoint()
const Type& neighbourWallInfo = allEdgeInfo_[edgeI];
// Evaluate all connected points (= edge endpoints)
const edge& e = pMesh_().edges()[edgeI];
const edge& e = mesh_.edges()[edgeI];
forAll(e, eI)
{
@ -918,7 +910,7 @@ Foam::label Foam::PointEdgeWave<Type>::edgeToPoint()
template <class Type>
Foam::label Foam::PointEdgeWave<Type>::pointToEdge()
{
const labelListList& pointEdges = pMesh_().pointEdges();
const labelListList& pointEdges = mesh_.pointEdges();
for
(

View File

@ -61,7 +61,6 @@ SourceFiles
#include "label.H"
#include "boolList.H"
#include "labelList.H"
#include "scalarField.H"
#include "pointFields.H"
#include "tensor.H"
@ -74,7 +73,7 @@ namespace Foam
{
// Forward declaration of classes
class pointMesh;
class polyMesh;
/*---------------------------------------------------------------------------*\
@ -104,7 +103,7 @@ class PointEdgeWave
// Private data
//- Reference to mesh
const pointMesh& pMesh_;
const polyMesh& mesh_;
//- Wall information for all points
List<Type>& allPointInfo_;
@ -272,7 +271,7 @@ public:
// (maxIter can be 0)
PointEdgeWave
(
const pointMesh& pMesh,
const polyMesh& mesh,
const labelList& initialPoints,
const List<Type>& initialPointsInfo,
List<Type>& allPointInfo,

View File

@ -52,7 +52,6 @@ meshToMesh::meshToMesh
fromMesh_(meshFrom),
toMesh_(meshTo),
patchMap_(patchMap),
fromPointMesh_(meshFrom),
cellAddressing_(toMesh_.nCells()),
boundaryAddressing_(toMesh_.boundaryMesh().size()),
inverseDistanceWeightsPtr_(NULL)
@ -123,7 +122,6 @@ meshToMesh::meshToMesh
:
fromMesh_(meshFrom),
toMesh_(meshTo),
fromPointMesh_(meshFrom),
cellAddressing_(toMesh_.nCells()),
boundaryAddressing_(toMesh_.boundaryMesh().size()),
inverseDistanceWeightsPtr_(NULL)

View File

@ -40,7 +40,6 @@ SourceFiles
#define meshtoMesh_H
#include "fvMesh.H"
#include "pointMesh.H"
#include "HashTable.H"
#include "fvPatchMapper.H"
#include "scalarList.H"
@ -81,9 +80,6 @@ class meshToMesh
//- toMesh patch labels which cut the from-mesh
HashTable<label> cuttingPatches_;
//- Point mesh used for interpolation
pointMesh fromPointMesh_;
//- Cell addressing
labelList cellAddressing_;

View File

@ -26,7 +26,6 @@ License
#include "meshToMesh.H"
#include "volFields.H"
#include "volPointInterpolation.H"
#include "interpolationCellPoint.H"
#include "SubField.H"
#include "mixedFvPatchField.H"
@ -102,13 +101,7 @@ void meshToMesh::interpolateField
) const
{
// Cell-Point interpolation
volPointInterpolation vpi(fromMesh_, fromPointMesh_);
interpolationCellPoint<Type> interpolator
(
vpi,
fromVf
);
interpolationCellPoint<Type> interpolator(fromVf);
forAll (toF, celli)
{

View File

@ -30,7 +30,7 @@ License
#include "volFields.H"
#include "ListListOps.H"
#include "SortableList.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -236,8 +236,8 @@ Foam::sampledSets::sampledSets
loadFromFiles_(loadFromFiles),
outputPath_(fileName::null),
searchEngine_(mesh_, true),
pMeshPtr_(NULL),
pInterpPtr_(NULL),
// pMeshPtr_(NULL),
// pInterpPtr_(NULL),
fieldNames_(),
interpolationScheme_(word::null),
writeFormat_(word::null)
@ -330,8 +330,10 @@ void Foam::sampledSets::read(const dictionary& dict)
void Foam::sampledSets::correct()
{
pMeshPtr_.clear();
pInterpPtr_.clear();
// reset interpolation
pointMesh::Delete(mesh_);
volPointInterpolation::Delete(mesh_);
searchEngine_.correct();
PtrList<sampledSet> newList

View File

@ -52,7 +52,6 @@ namespace Foam
class objectRegistry;
class dictionary;
class fvMesh;
class volPointInterpolation;
/*---------------------------------------------------------------------------*\
Class sampledSets Declaration
@ -104,7 +103,6 @@ class sampledSets
//- Construct interpolating field to the sampleSets
volFieldSampler
(
const volPointInterpolation&,
const word& interpolationScheme,
const GeometricField<Type, fvPatchField, volMesh>& field,
const PtrList<sampledSet>&
@ -159,12 +157,6 @@ class sampledSets
//- Mesh search engine
meshSearch searchEngine_;
//- pointMesh for interpolation
autoPtr<pointMesh> pMeshPtr_;
//- volPointInterpolation for interpolation
autoPtr<volPointInterpolation> pInterpPtr_;
// Read from dictonary

View File

@ -26,7 +26,6 @@ License
#include "sampledSets.H"
#include "volFields.H"
#include "volPointInterpolation.H"
#include "ListListOps.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -34,7 +33,6 @@ License
template <class Type>
Foam::sampledSets::volFieldSampler<Type>::volFieldSampler
(
const volPointInterpolation& pInterp,
const word& interpolationScheme,
const GeometricField<Type, fvPatchField, volMesh>& field,
const PtrList<sampledSet>& samplers
@ -45,7 +43,7 @@ Foam::sampledSets::volFieldSampler<Type>::volFieldSampler
{
autoPtr<interpolation<Type> > interpolator
(
interpolation<Type>::New(interpolationScheme, pInterp, field)
interpolation<Type>::New(interpolationScheme, field)
);
forAll(samplers, seti)
@ -228,13 +226,6 @@ void Foam::sampledSets::sampleAndWrite
{
bool interpolate = interpolationScheme_ != "cell";
if (interpolate && (!pMeshPtr_.valid() || !pInterpPtr_.valid()))
{
// set up interpolation
pMeshPtr_.reset(new pointMesh(mesh_));
pInterpPtr_.reset(new volPointInterpolation(mesh_, pMeshPtr_()));
}
// Create or use existing writer
if (!fields.formatter.valid())
{
@ -275,7 +266,6 @@ void Foam::sampledSets::sampleAndWrite
fieldi,
new volFieldSampler<Type>
(
pInterpPtr_(),
interpolationScheme_,
vf,
*this
@ -300,7 +290,6 @@ void Foam::sampledSets::sampleAndWrite
fieldi,
new volFieldSampler<Type>
(
pInterpPtr_(),
interpolationScheme_,
mesh_.lookupObject
<GeometricField<Type, fvPatchField, volMesh> >

View File

@ -31,6 +31,7 @@ License
#include "IOmanip.H"
#include "ListListOps.H"
#include "mergePoints.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -270,8 +271,6 @@ Foam::sampledSurfaces::sampledSurfaces
mesh_(refCast<const fvMesh>(obr)),
loadFromFiles_(loadFromFiles),
outputPath_(fileName::null),
pMeshPtr_(NULL),
pInterpPtr_(NULL),
fieldNames_(),
interpolationScheme_(word::null),
writeFormat_(word::null),
@ -369,9 +368,9 @@ void Foam::sampledSurfaces::correct()
operator[](surfI).correct(true);
}
// reset interpolation for later
pMeshPtr_.clear();
pInterpPtr_.clear();
// reset interpolation
pointMesh::Delete(mesh_);
volPointInterpolation::Delete(mesh_);
mergeSurfaces();
}

View File

@ -41,7 +41,6 @@ SourceFiles
#include "sampledSurface.H"
#include "surfaceWriter.H"
#include "volFieldsFwd.H"
#include "volPointInterpolation.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -130,23 +129,17 @@ class sampledSurfaces
//- Name of this set of surfaces,
// Also used as the name of the sampledSurfaces directory.
word name_;
const word name_;
//- Const reference to fvMesh
const fvMesh& mesh_;
//- Load fields from files (not from objectRegistry)
bool loadFromFiles_;
const bool loadFromFiles_;
//- output path
fileName outputPath_;
//- pointMesh for interpolation
autoPtr<pointMesh> pMeshPtr_;
//- volPointInterpolation for interpolation
autoPtr<volPointInterpolation> pInterpPtr_;
// Read from dictonary
@ -192,13 +185,6 @@ class sampledSurfaces
const wordList& fieldTypes
) const;
//- Set interpolator for the field
template<class Type>
autoPtr<interpolation<Type> > setInterpolator
(
const GeometricField<Type, fvPatchField, volMesh>&
);
//- Sample and write a particular volume field
template<class Type>
void sampleAndWrite

View File

@ -59,30 +59,6 @@ Foam::label Foam::sampledSurfaces::grep
}
template<class Type>
Foam::autoPtr<Foam::interpolation<Type> >
Foam::sampledSurfaces::setInterpolator
(
const GeometricField<Type, fvPatchField, volMesh>& vField
)
{
if (!pMeshPtr_.valid() || !pInterpPtr_.valid())
{
// set up interpolation
pMeshPtr_.reset(new pointMesh(mesh_));
pInterpPtr_.reset(new volPointInterpolation(mesh_, pMeshPtr_()));
}
// interpolator for this field
return interpolation<Type>::New
(
interpolationScheme_,
pInterpPtr_(),
vField
);
}
template<class Type>
void Foam::sampledSurfaces::sampleAndWrite
(
@ -106,7 +82,11 @@ void Foam::sampledSurfaces::sampleAndWrite
{
if (!interpolator.valid())
{
interpolator = setInterpolator(vField);
interpolator = interpolation<Type>::New
(
interpolationScheme_,
vField
);
}
values = s.interpolate(interpolator());

View File

@ -57,14 +57,10 @@
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
pointMesh pMesh(mesh);
volPointInterpolation vpi(mesh, pMesh);
Info<< "Constructing thermoCloud1" << endl;
basicThermoCloud thermoCloud1
(
"thermoCloud1",
vpi,
rho,
U,
g,
@ -75,7 +71,6 @@
basicKinematicCloud kinematicCloud1
(
"kinematicCloud1",
vpi,
rho,
U,
thermo().mu(),