mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
volPointInterpolation, pointMesh now MeshObject
This commit is contained in:
@ -46,9 +46,6 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
|
||||||
volPointInterpolation vpi(mesh, pMesh);
|
|
||||||
|
|
||||||
word kinematicCloudName("kinematicCloud");
|
word kinematicCloudName("kinematicCloud");
|
||||||
|
|
||||||
if (args.options().found("cloudName"))
|
if (args.options().found("cloudName"))
|
||||||
@ -60,7 +57,6 @@
|
|||||||
basicKinematicCloud kinematicCloud
|
basicKinematicCloud kinematicCloud
|
||||||
(
|
(
|
||||||
kinematicCloudName,
|
kinematicCloudName,
|
||||||
vpi,
|
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
thermo().mu(),
|
thermo().mu(),
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
Info << "Constructing Spray" << endl;
|
Info << "Constructing Spray" << endl;
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
|
||||||
volPointInterpolation vpi(mesh, pMesh);
|
|
||||||
|
|
||||||
PtrList<specieProperties> gasProperties(Y.size());
|
PtrList<specieProperties> gasProperties(Y.size());
|
||||||
forAll(gasProperties, i)
|
forAll(gasProperties, i)
|
||||||
{
|
{
|
||||||
@ -18,7 +15,6 @@ forAll(gasProperties, i)
|
|||||||
|
|
||||||
spray dieselSpray
|
spray dieselSpray
|
||||||
(
|
(
|
||||||
vpi,
|
|
||||||
U,
|
U,
|
||||||
rho,
|
rho,
|
||||||
p,
|
p,
|
||||||
|
|||||||
@ -41,6 +41,7 @@ Description
|
|||||||
#include "multivariateScheme.H"
|
#include "multivariateScheme.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
#include "OFstream.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;
|
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
|
||||||
|
|
||||||
mesh.move();
|
mesh.move();
|
||||||
vpi.updateMesh();
|
const_cast<volPointInterpolation&>
|
||||||
|
(
|
||||||
|
volPointInterpolation::New(mesh)
|
||||||
|
).updateMesh();
|
||||||
|
|
||||||
dieselSpray.evolve();
|
dieselSpray.evolve();
|
||||||
|
|
||||||
|
|||||||
@ -52,8 +52,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
volPointInterpolation pInterp(mesh);
|
||||||
volPointInterpolation pInterp(mesh, pMesh);
|
|
||||||
|
|
||||||
// Get times list
|
// Get times list
|
||||||
instantList Times = runTime.times();
|
instantList Times = runTime.times();
|
||||||
|
|||||||
@ -642,8 +642,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
//Info<< "Writing variables data ..." << endl;
|
//Info<< "Writing variables data ..." << endl;
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
volPointInterpolation pInterp(mesh);
|
||||||
volPointInterpolation pInterp(mesh, pMesh);
|
|
||||||
|
|
||||||
writeInt(fvFile, FV_VARIABLES);
|
writeInt(fvFile, FV_VARIABLES);
|
||||||
|
|
||||||
|
|||||||
@ -489,7 +489,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
psf
|
psf
|
||||||
@ -499,7 +499,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
pvf
|
pvf
|
||||||
@ -509,7 +509,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
pSpheretf
|
pSpheretf
|
||||||
@ -519,7 +519,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
pSymmtf
|
pSymmtf
|
||||||
@ -529,7 +529,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
ptf
|
ptf
|
||||||
@ -598,7 +598,7 @@ int main(int argc, char *argv[])
|
|||||||
writer.write(ptf);
|
writer.write(ptf);
|
||||||
|
|
||||||
// Interpolated volFields
|
// Interpolated volFields
|
||||||
volPointInterpolation pInterp(mesh, vMesh.pMesh());
|
volPointInterpolation pInterp(mesh);
|
||||||
writer.write(pInterp, vsf);
|
writer.write(pInterp, vsf);
|
||||||
writer.write(pInterp, vvf);
|
writer.write(pInterp, vvf);
|
||||||
writer.write(pInterp, vSpheretf);
|
writer.write(pInterp, vSpheretf);
|
||||||
|
|||||||
@ -70,7 +70,6 @@ Foam::polyMesh::readUpdateState Foam::vtkMesh::readUpdate()
|
|||||||
// the subset even if only movement.
|
// the subset even if only movement.
|
||||||
|
|
||||||
topoPtr_.clear();
|
topoPtr_.clear();
|
||||||
pointMeshPtr_.clear();
|
|
||||||
|
|
||||||
if (setName_.size() > 0)
|
if (setName_.size() > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,7 +39,6 @@ SourceFiles
|
|||||||
|
|
||||||
#include "vtkTopo.H"
|
#include "vtkTopo.H"
|
||||||
#include "fvMeshSubset.H"
|
#include "fvMeshSubset.H"
|
||||||
#include "pointMesh.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -60,9 +59,6 @@ class vtkMesh
|
|||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
fvMesh& baseMesh_;
|
fvMesh& baseMesh_;
|
||||||
|
|
||||||
//- Demand driven pointMesh
|
|
||||||
mutable autoPtr<pointMesh> pointMeshPtr_;
|
|
||||||
|
|
||||||
//- Subsetting engine + sub-fvMesh
|
//- Subsetting engine + sub-fvMesh
|
||||||
fvMeshSubset subsetter_;
|
fvMeshSubset subsetter_;
|
||||||
|
|
||||||
@ -101,15 +97,6 @@ public:
|
|||||||
return baseMesh_;
|
return baseMesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointMesh& basePointMesh() const
|
|
||||||
{
|
|
||||||
if (!pointMeshPtr_.valid())
|
|
||||||
{
|
|
||||||
pointMeshPtr_.reset(new pointMesh(baseMesh_));
|
|
||||||
}
|
|
||||||
return pointMeshPtr_();
|
|
||||||
}
|
|
||||||
|
|
||||||
const fvMeshSubset& subsetter() const
|
const fvMeshSubset& subsetter() const
|
||||||
{
|
{
|
||||||
return subsetter_;
|
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
|
//- Number of field cells
|
||||||
label nFieldCells() const
|
label nFieldCells() const
|
||||||
{
|
{
|
||||||
@ -166,7 +140,7 @@ public:
|
|||||||
//- Number of field points
|
//- Number of field points
|
||||||
label nFieldPoints() const
|
label nFieldPoints() const
|
||||||
{
|
{
|
||||||
return pMesh().size() + topo().addPointCellLabels().size();
|
return mesh().nPoints() + topo().addPointCellLabels().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -107,8 +107,7 @@ void Foam::vtkPV3Foam::convertVolFields
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Construct interpolation on the raw mesh
|
// Construct interpolation on the raw mesh
|
||||||
pointMesh pMesh(mesh);
|
volPointInterpolation pInterp(mesh);
|
||||||
volPointInterpolation pInterp(mesh, pMesh);
|
|
||||||
|
|
||||||
PtrList<PrimitivePatchInterpolation<primitivePatch> >
|
PtrList<PrimitivePatchInterpolation<primitivePatch> >
|
||||||
ppInterpList(mesh.boundaryMesh().size());
|
ppInterpList(mesh.boundaryMesh().size());
|
||||||
|
|||||||
@ -62,11 +62,16 @@ Foam::pointMesh::pointMesh
|
|||||||
bool alwaysConstructGlobalPatch
|
bool alwaysConstructGlobalPatch
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
MeshObject<polyMesh, pointMesh>(pMesh),
|
||||||
GeoMesh<polyMesh>(pMesh),
|
GeoMesh<polyMesh>(pMesh),
|
||||||
boundary_(*this, pMesh.boundaryMesh())
|
boundary_(*this, pMesh.boundaryMesh())
|
||||||
{
|
{
|
||||||
// Add the globalPointPatch if there are global points
|
// 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);
|
boundary_.setSize(boundary_.size() + 1);
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ Description
|
|||||||
#define pointMesh_H
|
#define pointMesh_H
|
||||||
|
|
||||||
#include "GeoMesh.H"
|
#include "GeoMesh.H"
|
||||||
|
#include "MeshObject.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "pointBoundaryMesh.H"
|
#include "pointBoundaryMesh.H"
|
||||||
|
|
||||||
@ -48,6 +49,7 @@ namespace Foam
|
|||||||
|
|
||||||
class pointMesh
|
class pointMesh
|
||||||
:
|
:
|
||||||
|
public MeshObject<polyMesh, pointMesh>,
|
||||||
public GeoMesh<polyMesh>
|
public GeoMesh<polyMesh>
|
||||||
{
|
{
|
||||||
// Permanent data
|
// Permanent data
|
||||||
@ -95,7 +97,7 @@ public:
|
|||||||
//- Return number of points
|
//- Return number of points
|
||||||
static label size(const Mesh& mesh)
|
static label size(const Mesh& mesh)
|
||||||
{
|
{
|
||||||
return mesh.mesh_.nPoints();
|
return mesh.GeoMesh<polyMesh>::mesh_.nPoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return reference to boundary mesh
|
//- Return reference to boundary mesh
|
||||||
@ -107,7 +109,13 @@ public:
|
|||||||
//- Return parallel info
|
//- Return parallel info
|
||||||
const globalMeshData& globalData() const
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,8 @@ License
|
|||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
#include "globalMeshData.H"
|
#include "globalMeshData.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
|
#include "pointMesh.H"
|
||||||
|
#include "Time.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -65,6 +67,8 @@ void Foam::polyMesh::clearGeom()
|
|||||||
{
|
{
|
||||||
boundary_[patchI].clearGeom();
|
boundary_[patchI].clearGeom();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pointMesh::Delete(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -82,6 +86,8 @@ void Foam::polyMesh::clearAddressing()
|
|||||||
// parallelData depends on the processorPatch ordering so force
|
// parallelData depends on the processorPatch ordering so force
|
||||||
// recalculation
|
// recalculation
|
||||||
deleteDemandDrivenData(globalMeshDataPtr_);
|
deleteDemandDrivenData(globalMeshDataPtr_);
|
||||||
|
|
||||||
|
pointMesh::Delete(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@ Description
|
|||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "globalMeshData.H"
|
#include "globalMeshData.H"
|
||||||
|
#include "pointMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -66,6 +67,26 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
|
|||||||
// Map the list
|
// Map the list
|
||||||
newMotionPoints.map(oldMotionPoints, mpm.pointMap());
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,6 @@ License
|
|||||||
#include "cellSet.H"
|
#include "cellSet.H"
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
#include "motionSmoother.H"
|
#include "motionSmoother.H"
|
||||||
#include "pointMesh.H"
|
|
||||||
#include "refinementParameters.H"
|
#include "refinementParameters.H"
|
||||||
#include "snapParameters.H"
|
#include "snapParameters.H"
|
||||||
#include "layerParameters.H"
|
#include "layerParameters.H"
|
||||||
|
|||||||
@ -3082,7 +3082,7 @@ void Foam::autoLayerDriver::doLayers
|
|||||||
Info<< "Constructing mesh displacer ..." << endl;
|
Info<< "Constructing mesh displacer ..." << endl;
|
||||||
|
|
||||||
{
|
{
|
||||||
pointMesh pMesh(mesh);
|
const pointMesh& pMesh = pointMesh::New(mesh);
|
||||||
|
|
||||||
motionSmoother meshMover
|
motionSmoother meshMover
|
||||||
(
|
(
|
||||||
|
|||||||
@ -675,7 +675,6 @@ void Foam::autoLayerDriver::medialAxisSmoothingInfo
|
|||||||
|
|
||||||
const polyMesh& mesh = meshMover.mesh();
|
const polyMesh& mesh = meshMover.mesh();
|
||||||
const pointField& points = mesh.points();
|
const pointField& points = mesh.points();
|
||||||
const pointMesh& pMesh = meshMover.pMesh();
|
|
||||||
|
|
||||||
const indirectPrimitivePatch& pp = meshMover.patch();
|
const indirectPrimitivePatch& pp = meshMover.patch();
|
||||||
const vectorField& faceNormals = pp.faceNormals();
|
const vectorField& faceNormals = pp.faceNormals();
|
||||||
@ -788,7 +787,7 @@ void Foam::autoLayerDriver::medialAxisSmoothingInfo
|
|||||||
List<pointData> edgeWallDist(mesh.nEdges());
|
List<pointData> edgeWallDist(mesh.nEdges());
|
||||||
PointEdgeWave<pointData> wallDistCalc
|
PointEdgeWave<pointData> wallDistCalc
|
||||||
(
|
(
|
||||||
pMesh,
|
mesh,
|
||||||
meshPoints,
|
meshPoints,
|
||||||
wallInfo,
|
wallInfo,
|
||||||
pointWallDist,
|
pointWallDist,
|
||||||
@ -892,7 +891,7 @@ void Foam::autoLayerDriver::medialAxisSmoothingInfo
|
|||||||
// Do all calculations
|
// Do all calculations
|
||||||
PointEdgeWave<pointData> medialDistCalc
|
PointEdgeWave<pointData> medialDistCalc
|
||||||
(
|
(
|
||||||
pMesh,
|
mesh,
|
||||||
maxPoints,
|
maxPoints,
|
||||||
maxInfo,
|
maxInfo,
|
||||||
|
|
||||||
@ -975,7 +974,6 @@ void Foam::autoLayerDriver::shrinkMeshMedialDistance
|
|||||||
Info<< "shrinkMeshMedialDistance : Smoothing using Medial Axis ..." << endl;
|
Info<< "shrinkMeshMedialDistance : Smoothing using Medial Axis ..." << endl;
|
||||||
|
|
||||||
const polyMesh& mesh = meshMover.mesh();
|
const polyMesh& mesh = meshMover.mesh();
|
||||||
const pointMesh& pMesh = meshMover.pMesh();
|
|
||||||
|
|
||||||
const indirectPrimitivePatch& pp = meshMover.patch();
|
const indirectPrimitivePatch& pp = meshMover.patch();
|
||||||
const labelList& meshPoints = pp.meshPoints();
|
const labelList& meshPoints = pp.meshPoints();
|
||||||
@ -1100,7 +1098,7 @@ void Foam::autoLayerDriver::shrinkMeshMedialDistance
|
|||||||
// Do all calculations
|
// Do all calculations
|
||||||
PointEdgeWave<pointData> wallDistCalc
|
PointEdgeWave<pointData> wallDistCalc
|
||||||
(
|
(
|
||||||
pMesh,
|
mesh,
|
||||||
wallPoints,
|
wallPoints,
|
||||||
wallInfo,
|
wallInfo,
|
||||||
pointWallDist,
|
pointWallDist,
|
||||||
|
|||||||
@ -527,7 +527,7 @@ Foam::tmp<Foam::scalarField> Foam::autoSnapDriver::edgePatchDist
|
|||||||
|
|
||||||
PointEdgeWave<pointEdgePoint> wallCalc
|
PointEdgeWave<pointEdgePoint> wallCalc
|
||||||
(
|
(
|
||||||
pMesh,
|
mesh,
|
||||||
pp.meshPoints(),
|
pp.meshPoints(),
|
||||||
wallInfo,
|
wallInfo,
|
||||||
|
|
||||||
@ -1504,7 +1504,7 @@ void Foam::autoSnapDriver::doSnap
|
|||||||
Info<< "Constructing mesh displacer ..." << endl;
|
Info<< "Constructing mesh displacer ..." << endl;
|
||||||
Info<< "Using mesh parameters " << motionDict << nl << endl;
|
Info<< "Using mesh parameters " << motionDict << nl << endl;
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
const pointMesh& pMesh = pointMesh::New(mesh);
|
||||||
|
|
||||||
motionSmoother meshMover
|
motionSmoother meshMover
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1992,7 +1992,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const
|
|||||||
volRefLevel.write();
|
volRefLevel.write();
|
||||||
|
|
||||||
|
|
||||||
pointMesh pMesh(mesh_);
|
const pointMesh& pMesh = pointMesh::New(mesh_);
|
||||||
|
|
||||||
pointScalarField pointRefLevel
|
pointScalarField pointRefLevel
|
||||||
(
|
(
|
||||||
|
|||||||
@ -680,7 +680,6 @@ void Foam::fvMeshSubset::setCellSubset
|
|||||||
newCells
|
newCells
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
pointMeshSubsetPtr_.clear();
|
|
||||||
|
|
||||||
|
|
||||||
// Add old patches
|
// Add old patches
|
||||||
@ -1180,7 +1179,6 @@ void Foam::fvMeshSubset::setLargeCellSubset
|
|||||||
syncPar // parallel synchronisation
|
syncPar // parallel synchronisation
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
pointMeshSubsetPtr_.clear();
|
|
||||||
|
|
||||||
// Add old patches
|
// Add old patches
|
||||||
List<polyPatch*> newBoundary(nbSize);
|
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
|
const labelList& Foam::fvMeshSubset::pointMap() const
|
||||||
{
|
{
|
||||||
checkCellSubset();
|
checkCellSubset();
|
||||||
|
|||||||
@ -171,8 +171,6 @@ private:
|
|||||||
//- Subset mesh pointer
|
//- Subset mesh pointer
|
||||||
autoPtr<fvMesh> fvMeshSubsetPtr_;
|
autoPtr<fvMesh> fvMeshSubsetPtr_;
|
||||||
|
|
||||||
mutable autoPtr<pointMesh> pointMeshSubsetPtr_;
|
|
||||||
|
|
||||||
//- Point mapping array
|
//- Point mapping array
|
||||||
labelList pointMap_;
|
labelList pointMap_;
|
||||||
|
|
||||||
@ -278,11 +276,6 @@ public:
|
|||||||
|
|
||||||
fvMesh& subMesh();
|
fvMesh& subMesh();
|
||||||
|
|
||||||
//- Return reference to demand-driven subset pointMesh
|
|
||||||
const pointMesh& subPointMesh() const;
|
|
||||||
|
|
||||||
pointMesh& subPointMesh();
|
|
||||||
|
|
||||||
//- Return point map
|
//- Return point map
|
||||||
const labelList& pointMap() const;
|
const labelList& pointMap() const;
|
||||||
|
|
||||||
|
|||||||
@ -409,7 +409,7 @@ tmp<GeometricField<Type, pointPatchField, pointMesh> > fvMeshSubset::interpolate
|
|||||||
return interpolate
|
return interpolate
|
||||||
(
|
(
|
||||||
sf,
|
sf,
|
||||||
subPointMesh(), // subsetted point mesh
|
pointMesh::New(subMesh()), // subsetted point mesh
|
||||||
subMesh(), // registry (pointfields are stored on the polyMesh)
|
subMesh(), // registry (pointfields are stored on the polyMesh)
|
||||||
patchMap(),
|
patchMap(),
|
||||||
pointMap()
|
pointMap()
|
||||||
|
|||||||
@ -46,7 +46,6 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class volPointInterpolation;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class interpolation Declaration
|
Class interpolation Declaration
|
||||||
@ -83,10 +82,9 @@ public:
|
|||||||
interpolation,
|
interpolation,
|
||||||
dictionary,
|
dictionary,
|
||||||
(
|
(
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
),
|
),
|
||||||
(pInterp, psi)
|
(psi)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -96,7 +94,6 @@ public:
|
|||||||
static autoPtr<interpolation<Type> > New
|
static autoPtr<interpolation<Type> > New
|
||||||
(
|
(
|
||||||
const word& interpolationType,
|
const word& interpolationType,
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -104,7 +101,6 @@ public:
|
|||||||
static autoPtr<interpolation<Type> > New
|
static autoPtr<interpolation<Type> > New
|
||||||
(
|
(
|
||||||
const dictionary& interpolationSchemes,
|
const dictionary& interpolationSchemes,
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,6 @@ Foam::autoPtr<Foam::interpolation<Type> >
|
|||||||
Foam::interpolation<Type>::New
|
Foam::interpolation<Type>::New
|
||||||
(
|
(
|
||||||
const word& interpolationType,
|
const word& interpolationType,
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -55,7 +54,7 @@ Foam::interpolation<Type>::New
|
|||||||
<< exit(FatalError);
|
<< 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
|
Foam::interpolation<Type>::New
|
||||||
(
|
(
|
||||||
const dictionary& interpolationSchemes,
|
const dictionary& interpolationSchemes,
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return New(word(interpolationSchemes.lookup(psi.name())), pInterp, psi);
|
return New(word(interpolationSchemes.lookup(psi.name())), psi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,6 @@ namespace Foam
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
interpolationCell<Type>::interpolationCell
|
interpolationCell<Type>::interpolationCell
|
||||||
(
|
(
|
||||||
const volPointInterpolation&,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -63,7 +63,6 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
interpolationCell
|
interpolationCell
|
||||||
(
|
(
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -32,12 +32,11 @@ License
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::interpolationCellPoint<Type>::interpolationCellPoint
|
Foam::interpolationCellPoint<Type>::interpolationCellPoint
|
||||||
(
|
(
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
interpolation<Type>(psi),
|
interpolation<Type>(psi),
|
||||||
psip_(pInterp.interpolate(psi))
|
psip_(volPointInterpolation::New(psi.mesh()).interpolate(psi))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,8 @@ class interpolationCellPoint
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
GeometricField<Type, pointPatchField, pointMesh> psip_;
|
//- Interpolated volfield
|
||||||
|
const GeometricField<Type, pointPatchField, pointMesh> psip_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -66,7 +67,6 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
interpolationCellPoint
|
interpolationCellPoint
|
||||||
(
|
(
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -44,12 +44,11 @@ namespace Foam
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
interpolationCellPointFace<Type>::interpolationCellPointFace
|
interpolationCellPointFace<Type>::interpolationCellPointFace
|
||||||
(
|
(
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
interpolation<Type>(psi),
|
interpolation<Type>(psi),
|
||||||
psip_(pInterp.interpolate(psi)),
|
psip_(volPointInterpolation::New(psi.mesh()).interpolate(psi)),
|
||||||
psis_(linearInterpolate(psi))
|
psis_(linearInterpolate(psi))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -51,8 +51,11 @@ class interpolationCellPointFace
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
GeometricField<Type, pointPatchField, pointMesh> psip_;
|
//- Interpolated volfield
|
||||||
GeometricField<Type, fvsPatchField, surfaceMesh> psis_;
|
const GeometricField<Type, pointPatchField, pointMesh> psip_;
|
||||||
|
|
||||||
|
//- Linearly interpolated volfield
|
||||||
|
const GeometricField<Type, fvsPatchField, surfaceMesh> psis_;
|
||||||
|
|
||||||
bool findTet
|
bool findTet
|
||||||
(
|
(
|
||||||
@ -87,7 +90,6 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
interpolationCellPointFace
|
interpolationCellPointFace
|
||||||
(
|
(
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi
|
const GeometricField<Type, fvPatchField, volMesh>& psi
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ void pointPatchInterpolation::interpolate
|
|||||||
// patch
|
// patch
|
||||||
|
|
||||||
const fvBoundaryMesh& bm = fvMesh_.boundary();
|
const fvBoundaryMesh& bm = fvMesh_.boundary();
|
||||||
const pointBoundaryMesh& pbm = pointMesh_.boundary();
|
const pointBoundaryMesh& pbm = pointMesh::New(fvMesh_).boundary();
|
||||||
|
|
||||||
forAll(bm, patchi)
|
forAll(bm, patchi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -55,7 +55,7 @@ void pointPatchInterpolation::makePatchPatchAddressing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fvBoundaryMesh& bm = fvMesh_.boundary();
|
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
|
// first count the total number of patch-patch points
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ void pointPatchInterpolation::makePatchPatchWeights()
|
|||||||
fvMesh_.polyMesh::instance(),
|
fvMesh_.polyMesh::instance(),
|
||||||
fvMesh_
|
fvMesh_
|
||||||
),
|
),
|
||||||
pointMesh_,
|
pointMesh::New(fvMesh_),
|
||||||
dimensionedScalar("zero", dimless, 0)
|
dimensionedScalar("zero", dimless, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -285,14 +285,9 @@ void pointPatchInterpolation::makePatchPatchWeights()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
pointPatchInterpolation::pointPatchInterpolation
|
pointPatchInterpolation::pointPatchInterpolation(const fvMesh& vm)
|
||||||
(
|
|
||||||
const fvMesh& vm,
|
|
||||||
const pointMesh& pm
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
fvMesh_(vm),
|
fvMesh_(vm)
|
||||||
pointMesh_(pm)
|
|
||||||
{
|
{
|
||||||
updateMesh();
|
updateMesh();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,7 +61,6 @@ class pointPatchInterpolation
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
const fvMesh& fvMesh_;
|
const fvMesh& fvMesh_;
|
||||||
const pointMesh& pointMesh_;
|
|
||||||
|
|
||||||
//- Primitive patch interpolators
|
//- Primitive patch interpolators
|
||||||
PtrList<primitivePatchInterpolation> patchInterpolators_;
|
PtrList<primitivePatchInterpolation> patchInterpolators_;
|
||||||
@ -101,7 +100,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Constructor given fvMesh and pointMesh.
|
//- Constructor given fvMesh and pointMesh.
|
||||||
pointPatchInterpolation(const fvMesh&, const pointMesh&);
|
pointPatchInterpolation(const fvMesh&);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
@ -118,11 +117,6 @@ public:
|
|||||||
return fvMesh_;
|
return fvMesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointMesh& pMesh() const
|
|
||||||
{
|
|
||||||
return pointMesh_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
|
|||||||
@ -103,18 +103,20 @@ volPointInterpolation::interpolate
|
|||||||
{
|
{
|
||||||
wordList types(patchFieldTypes);
|
wordList types(patchFieldTypes);
|
||||||
|
|
||||||
|
const pointMesh& pMesh = pointMesh::New(vf.mesh());
|
||||||
|
|
||||||
// If the last patch of the pointBoundaryMesh is the global patch
|
// If the last patch of the pointBoundaryMesh is the global patch
|
||||||
// it must be added to the list of patchField types
|
// it must be added to the list of patchField types
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
isType<globalPointPatch>
|
isType<globalPointPatch>
|
||||||
(
|
(
|
||||||
pMesh().boundary()[pMesh().boundary().size() - 1]
|
pMesh.boundary()[pMesh.boundary().size() - 1]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
types.setSize(types.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>
|
// Construct tmp<pointField>
|
||||||
@ -128,7 +130,7 @@ volPointInterpolation::interpolate
|
|||||||
vf.instance(),
|
vf.instance(),
|
||||||
vf.db()
|
vf.db()
|
||||||
),
|
),
|
||||||
pMesh(),
|
pMesh,
|
||||||
vf.dimensions(),
|
vf.dimensions(),
|
||||||
types
|
types
|
||||||
)
|
)
|
||||||
@ -176,7 +178,7 @@ volPointInterpolation::interpolate
|
|||||||
vf.instance(),
|
vf.instance(),
|
||||||
vf.db()
|
vf.db()
|
||||||
),
|
),
|
||||||
pMesh(),
|
pointMesh::New(vf.mesh()),
|
||||||
vf.dimensions()
|
vf.dimensions()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -74,7 +74,7 @@ void volPointInterpolation::makeWeights()
|
|||||||
mesh().polyMesh::instance(),
|
mesh().polyMesh::instance(),
|
||||||
mesh()
|
mesh()
|
||||||
),
|
),
|
||||||
pMesh(),
|
pointMesh::New(mesh()),
|
||||||
dimensionedScalar("zero", dimless, 0)
|
dimensionedScalar("zero", dimless, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -139,13 +139,10 @@ void volPointInterpolation::makeWeights()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
volPointInterpolation::volPointInterpolation
|
volPointInterpolation::volPointInterpolation(const fvMesh& vm)
|
||||||
(
|
|
||||||
const fvMesh& vm,
|
|
||||||
const pointMesh& pm
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
boundaryInterpolator_(vm, pm)
|
MeshObject<fvMesh, volPointInterpolation>(vm),
|
||||||
|
boundaryInterpolator_(vm)
|
||||||
{
|
{
|
||||||
updateMesh();
|
updateMesh();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,6 +37,7 @@ SourceFiles
|
|||||||
#ifndef volPointInterpolation_H
|
#ifndef volPointInterpolation_H
|
||||||
#define volPointInterpolation_H
|
#define volPointInterpolation_H
|
||||||
|
|
||||||
|
#include "MeshObject.H"
|
||||||
#include "pointPatchInterpolation.H"
|
#include "pointPatchInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -52,6 +53,8 @@ class pointMesh;
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class volPointInterpolation
|
class volPointInterpolation
|
||||||
|
:
|
||||||
|
public MeshObject<fvMesh, volPointInterpolation>
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -83,7 +86,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Constructor given fvMesh and pointMesh.
|
//- Constructor given fvMesh and pointMesh.
|
||||||
volPointInterpolation(const fvMesh&, const pointMesh&);
|
explicit volPointInterpolation(const fvMesh&);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
@ -100,11 +103,6 @@ public:
|
|||||||
return boundaryInterpolator_.mesh();
|
return boundaryInterpolator_.mesh();
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointMesh& pMesh() const
|
|
||||||
{
|
|
||||||
return boundaryInterpolator_.pMesh();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@ License
|
|||||||
#include "surfaceInterpolate.H"
|
#include "surfaceInterpolate.H"
|
||||||
#include "fvcLaplacian.H"
|
#include "fvcLaplacian.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver
|
|||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
pointMesh_
|
pointMesh::New(fvMesh_)
|
||||||
),
|
),
|
||||||
cellDisplacement_
|
cellDisplacement_
|
||||||
(
|
(
|
||||||
@ -123,7 +124,11 @@ Foam::displacementSBRStressFvMotionSolver::
|
|||||||
Foam::tmp<Foam::pointField>
|
Foam::tmp<Foam::pointField>
|
||||||
Foam::displacementSBRStressFvMotionSolver::curPoints() const
|
Foam::displacementSBRStressFvMotionSolver::curPoints() const
|
||||||
{
|
{
|
||||||
vpi_.interpolate(cellDisplacement_, pointDisplacement_);
|
volPointInterpolation::New(fvMesh_).interpolate
|
||||||
|
(
|
||||||
|
cellDisplacement_,
|
||||||
|
pointDisplacement_
|
||||||
|
);
|
||||||
|
|
||||||
tmp<pointField> tcurPoints
|
tmp<pointField> tcurPoints
|
||||||
(
|
(
|
||||||
|
|||||||
@ -29,6 +29,7 @@ License
|
|||||||
#include "fvmLaplacian.H"
|
#include "fvmLaplacian.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -117,7 +118,7 @@ displacementComponentLaplacianFvMotionSolver
|
|||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
pointMesh_
|
pointMesh::New(fvMesh_)
|
||||||
),
|
),
|
||||||
cellDisplacement_
|
cellDisplacement_
|
||||||
(
|
(
|
||||||
@ -173,7 +174,7 @@ displacementComponentLaplacianFvMotionSolver
|
|||||||
new pointVectorField
|
new pointVectorField
|
||||||
(
|
(
|
||||||
io,
|
io,
|
||||||
pointMesh_
|
pointMesh::New(fvMesh_)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -202,7 +203,11 @@ Foam::displacementComponentLaplacianFvMotionSolver::
|
|||||||
Foam::tmp<Foam::pointField>
|
Foam::tmp<Foam::pointField>
|
||||||
Foam::displacementComponentLaplacianFvMotionSolver::curPoints() const
|
Foam::displacementComponentLaplacianFvMotionSolver::curPoints() const
|
||||||
{
|
{
|
||||||
vpi_.interpolate(cellDisplacement_, pointDisplacement_);
|
volPointInterpolation::New(fvMesh_).interpolate
|
||||||
|
(
|
||||||
|
cellDisplacement_,
|
||||||
|
pointDisplacement_
|
||||||
|
);
|
||||||
|
|
||||||
if (pointLocation_.valid())
|
if (pointLocation_.valid())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -334,7 +334,8 @@ displacementInterpolationFvMotionSolver
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::displacementInterpolationFvMotionSolver::~displacementInterpolationFvMotionSolver()
|
Foam::displacementInterpolationFvMotionSolver::
|
||||||
|
~displacementInterpolationFvMotionSolver()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@ License
|
|||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -82,7 +83,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver
|
|||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
pointMesh_
|
pointMesh::New(fvMesh_)
|
||||||
),
|
),
|
||||||
cellDisplacement_
|
cellDisplacement_
|
||||||
(
|
(
|
||||||
@ -139,7 +140,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver
|
|||||||
new pointVectorField
|
new pointVectorField
|
||||||
(
|
(
|
||||||
io,
|
io,
|
||||||
pointMesh_
|
pointMesh::New(fvMesh_)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -168,7 +169,11 @@ Foam::displacementLaplacianFvMotionSolver::
|
|||||||
Foam::tmp<Foam::pointField>
|
Foam::tmp<Foam::pointField>
|
||||||
Foam::displacementLaplacianFvMotionSolver::curPoints() const
|
Foam::displacementLaplacianFvMotionSolver::curPoints() const
|
||||||
{
|
{
|
||||||
vpi_.interpolate(cellDisplacement_, pointDisplacement_);
|
volPointInterpolation::New(fvMesh_).interpolate
|
||||||
|
(
|
||||||
|
cellDisplacement_,
|
||||||
|
pointDisplacement_
|
||||||
|
);
|
||||||
|
|
||||||
if (pointLocation_.valid())
|
if (pointLocation_.valid())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvMotionSolver.H"
|
#include "fvMotionSolver.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -39,9 +40,7 @@ namespace Foam
|
|||||||
Foam::fvMotionSolver::fvMotionSolver(const polyMesh& mesh)
|
Foam::fvMotionSolver::fvMotionSolver(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
motionSolver(mesh),
|
motionSolver(mesh),
|
||||||
fvMesh_(refCast<const fvMesh>(mesh)),
|
fvMesh_(refCast<const fvMesh>(mesh))
|
||||||
pointMesh_(fvMesh_),
|
|
||||||
vpi_(fvMesh_, pointMesh_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -55,16 +54,14 @@ Foam::fvMotionSolver::~fvMotionSolver()
|
|||||||
|
|
||||||
void Foam::fvMotionSolver::movePoints(const pointField& p)
|
void Foam::fvMotionSolver::movePoints(const pointField& p)
|
||||||
{
|
{
|
||||||
pointMesh_.movePoints(p);
|
// Movement of pointMesh and volPointInterpolation done by polyMesh,fvMesh
|
||||||
vpi_.movePoints();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fvMotionSolver::updateMesh(const mapPolyMesh& mpm)
|
void Foam::fvMotionSolver::updateMesh(const mapPolyMesh& mpm)
|
||||||
{
|
{
|
||||||
motionSolver::updateMesh(mpm);
|
motionSolver::updateMesh(mpm);
|
||||||
pointMesh_.updateMesh(mpm);
|
// Update of pointMesh and volPointInterpolation done by polyMesh,fvMesh
|
||||||
vpi_.updateMesh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,13 +40,16 @@ SourceFiles
|
|||||||
#define fvMotionSolver_H
|
#define fvMotionSolver_H
|
||||||
|
|
||||||
#include "motionSolver.H"
|
#include "motionSolver.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "pointFieldsFwd.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class fvMesh;
|
||||||
|
class mapPolyMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fvMotionSolver Declaration
|
Class fvMotionSolver Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -63,13 +66,6 @@ protected:
|
|||||||
//- The fvMesh to be moved
|
//- The fvMesh to be moved
|
||||||
const fvMesh& fvMesh_;
|
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
|
// Protected member functions
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@ License
|
|||||||
#include "motionDiffusivity.H"
|
#include "motionDiffusivity.H"
|
||||||
#include "fvmLaplacian.H"
|
#include "fvmLaplacian.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -66,7 +67,7 @@ velocityComponentLaplacianFvMotionSolver
|
|||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
pointMesh_
|
pointMesh::New(fvMesh_)
|
||||||
),
|
),
|
||||||
cellMotionU_
|
cellMotionU_
|
||||||
(
|
(
|
||||||
@ -129,7 +130,11 @@ Foam::velocityComponentLaplacianFvMotionSolver::
|
|||||||
Foam::tmp<Foam::pointField>
|
Foam::tmp<Foam::pointField>
|
||||||
Foam::velocityComponentLaplacianFvMotionSolver::curPoints() const
|
Foam::velocityComponentLaplacianFvMotionSolver::curPoints() const
|
||||||
{
|
{
|
||||||
vpi_.interpolate(cellMotionU_, pointMotionU_);
|
volPointInterpolation::New(fvMesh_).interpolate
|
||||||
|
(
|
||||||
|
cellMotionU_,
|
||||||
|
pointMotionU_
|
||||||
|
);
|
||||||
|
|
||||||
tmp<pointField> tcurPoints(new pointField(fvMesh_.points()));
|
tmp<pointField> tcurPoints(new pointField(fvMesh_.points()));
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@ License
|
|||||||
#include "motionDiffusivity.H"
|
#include "motionDiffusivity.H"
|
||||||
#include "fvmLaplacian.H"
|
#include "fvmLaplacian.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -63,7 +64,7 @@ Foam::velocityLaplacianFvMotionSolver::velocityLaplacianFvMotionSolver
|
|||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
pointMesh_
|
pointMesh::New(fvMesh_)
|
||||||
),
|
),
|
||||||
cellMotionU_
|
cellMotionU_
|
||||||
(
|
(
|
||||||
@ -102,7 +103,11 @@ Foam::velocityLaplacianFvMotionSolver::~velocityLaplacianFvMotionSolver()
|
|||||||
Foam::tmp<Foam::pointField>
|
Foam::tmp<Foam::pointField>
|
||||||
Foam::velocityLaplacianFvMotionSolver::curPoints() const
|
Foam::velocityLaplacianFvMotionSolver::curPoints() const
|
||||||
{
|
{
|
||||||
vpi_.interpolate(cellMotionU_, pointMotionU_);
|
volPointInterpolation::New(fvMesh_).interpolate
|
||||||
|
(
|
||||||
|
cellMotionU_,
|
||||||
|
pointMotionU_
|
||||||
|
);
|
||||||
|
|
||||||
tmp<pointField> tcurPoints
|
tmp<pointField> tcurPoints
|
||||||
(
|
(
|
||||||
|
|||||||
@ -73,9 +73,6 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
|||||||
const polyMesh& mesh = mSolver().mesh();
|
const polyMesh& mesh = mSolver().mesh();
|
||||||
const polyBoundaryMesh& bdry = mesh.boundaryMesh();
|
const polyBoundaryMesh& bdry = mesh.boundaryMesh();
|
||||||
|
|
||||||
// Construct point mesh
|
|
||||||
const pointMesh pMesh(mesh);
|
|
||||||
|
|
||||||
labelHashSet patchSet(bdry.size());
|
labelHashSet patchSet(bdry.size());
|
||||||
|
|
||||||
label nPatchEdges = 0;
|
label nPatchEdges = 0;
|
||||||
@ -133,7 +130,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
|||||||
// Do calculations
|
// Do calculations
|
||||||
PointEdgeWave<pointEdgePoint> waveInfo
|
PointEdgeWave<pointEdgePoint> waveInfo
|
||||||
(
|
(
|
||||||
pMesh,
|
mesh,
|
||||||
seedPoints,
|
seedPoints,
|
||||||
seedInfo,
|
seedInfo,
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,6 @@ SourceFiles
|
|||||||
#define Cloud_H
|
#define Cloud_H
|
||||||
|
|
||||||
#include "cloud.H"
|
#include "cloud.H"
|
||||||
#include "pointMesh.H"
|
|
||||||
#include "IDLList.H"
|
#include "IDLList.H"
|
||||||
#include "IOField.H"
|
#include "IOField.H"
|
||||||
|
|
||||||
@ -231,8 +230,14 @@ public:
|
|||||||
|
|
||||||
// Read
|
// Read
|
||||||
|
|
||||||
//- Read and return a lagrangian data field
|
//- Helper to construct IOobject for field and current time.
|
||||||
// Checks that data is valid
|
IOobject fieldIOobject
|
||||||
|
(
|
||||||
|
const word& fieldName,
|
||||||
|
const IOobject::readOption r
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Check lagrangian data field
|
||||||
template<class DataType>
|
template<class DataType>
|
||||||
void checkFieldIOobject
|
void checkFieldIOobject
|
||||||
(
|
(
|
||||||
@ -240,13 +245,6 @@ public:
|
|||||||
const IOField<DataType>& data
|
const IOField<DataType>& data
|
||||||
) const;
|
) 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
|
//- Read the field data for the cloud of particles
|
||||||
void readFields();
|
void readFields();
|
||||||
|
|
||||||
|
|||||||
@ -103,6 +103,25 @@ Foam::Cloud<ParticleType>::Cloud
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * 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 ParticleType>
|
||||||
template<class DataType>
|
template<class DataType>
|
||||||
void Foam::Cloud<ParticleType>::checkFieldIOobject
|
void Foam::Cloud<ParticleType>::checkFieldIOobject
|
||||||
@ -116,7 +135,7 @@ void Foam::Cloud<ParticleType>::checkFieldIOobject
|
|||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"void Cloud<ParticleType>::checkFieldIOobject"
|
"void Cloud<ParticleType>::checkFieldIOobject"
|
||||||
"(Cloud<ParticleType>, IOField<DataType>)"
|
"(const Cloud<ParticleType>&, const IOField<DataType>&) const"
|
||||||
) << "Size of " << data.name()
|
) << "Size of " << data.name()
|
||||||
<< " field " << data.size()
|
<< " field " << data.size()
|
||||||
<< " does not match the number of particles " << c.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>
|
template<class ParticleType>
|
||||||
void Foam::Cloud<ParticleType>::readFields()
|
void Foam::Cloud<ParticleType>::readFields()
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -106,43 +106,46 @@ void Foam::parcel::readFields
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IOField<scalar> d(c.fieldIOobject("d"));
|
IOField<scalar> d(c.fieldIOobject("d", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, d);
|
c.checkFieldIOobject(c, d);
|
||||||
|
|
||||||
IOField<scalar> T(c.fieldIOobject("T"));
|
IOField<scalar> T(c.fieldIOobject("T", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, T);
|
c.checkFieldIOobject(c, T);
|
||||||
|
|
||||||
IOField<scalar> m(c.fieldIOobject("m"));
|
IOField<scalar> m(c.fieldIOobject("m", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, m);
|
c.checkFieldIOobject(c, m);
|
||||||
|
|
||||||
IOField<scalar> y(c.fieldIOobject("y"));
|
IOField<scalar> y(c.fieldIOobject("y", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, y);
|
c.checkFieldIOobject(c, y);
|
||||||
|
|
||||||
IOField<scalar> yDot(c.fieldIOobject("yDot"));
|
IOField<scalar> yDot(c.fieldIOobject("yDot", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, yDot);
|
c.checkFieldIOobject(c, yDot);
|
||||||
|
|
||||||
IOField<scalar> ct(c.fieldIOobject("ct"));
|
IOField<scalar> ct(c.fieldIOobject("ct", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, ct);
|
c.checkFieldIOobject(c, ct);
|
||||||
|
|
||||||
IOField<scalar> ms(c.fieldIOobject("ms"));
|
IOField<scalar> ms(c.fieldIOobject("ms", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, ms);
|
c.checkFieldIOobject(c, ms);
|
||||||
|
|
||||||
IOField<scalar> tTurb(c.fieldIOobject("tTurb"));
|
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, tTurb);
|
c.checkFieldIOobject(c, tTurb);
|
||||||
|
|
||||||
IOField<scalar> liquidCore(c.fieldIOobject("liquidCore"));
|
IOField<scalar> liquidCore
|
||||||
|
(
|
||||||
|
c.fieldIOobject("liquidCore", IOobject::MUST_READ)
|
||||||
|
);
|
||||||
c.checkFieldIOobject(c, liquidCore);
|
c.checkFieldIOobject(c, liquidCore);
|
||||||
|
|
||||||
IOField<scalar> injector(c.fieldIOobject("injector"));
|
IOField<scalar> injector(c.fieldIOobject("injector", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, injector);
|
c.checkFieldIOobject(c, injector);
|
||||||
|
|
||||||
IOField<vector> U(c.fieldIOobject("U"));
|
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, U);
|
c.checkFieldIOobject(c, U);
|
||||||
|
|
||||||
IOField<vector> Uturb(c.fieldIOobject("Uturb"));
|
IOField<vector> Uturb(c.fieldIOobject("Uturb", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, Uturb);
|
c.checkFieldIOobject(c, Uturb);
|
||||||
|
|
||||||
IOField<vector> n(c.fieldIOobject("n"));
|
IOField<vector> n(c.fieldIOobject("n", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, n);
|
c.checkFieldIOobject(c, n);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -179,7 +182,7 @@ void Foam::parcel::readFields
|
|||||||
|
|
||||||
for (label j=0; j<nX; j++)
|
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;
|
label i = 0;
|
||||||
forAllIter(Cloud<parcel>, c, iter)
|
forAllIter(Cloud<parcel>, c, iter)
|
||||||
@ -201,20 +204,27 @@ void Foam::parcel::writeFields
|
|||||||
|
|
||||||
label np = c.size();
|
label np = c.size();
|
||||||
|
|
||||||
IOField<scalar> d(c.fieldIOobject("d"), np);
|
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
|
||||||
IOField<scalar> T(c.fieldIOobject("T"), np);
|
IOField<scalar> T(c.fieldIOobject("T", IOobject::NO_READ), np);
|
||||||
IOField<scalar> m(c.fieldIOobject("m"), np);
|
IOField<scalar> m(c.fieldIOobject("m", IOobject::NO_READ), np);
|
||||||
IOField<scalar> y(c.fieldIOobject("y"), np);
|
IOField<scalar> y(c.fieldIOobject("y", IOobject::NO_READ), np);
|
||||||
IOField<scalar> yDot(c.fieldIOobject("yDot"), np);
|
IOField<scalar> yDot(c.fieldIOobject("yDot", IOobject::NO_READ), np);
|
||||||
IOField<scalar> ct(c.fieldIOobject("ct"), np);
|
IOField<scalar> ct(c.fieldIOobject("ct", IOobject::NO_READ), np);
|
||||||
IOField<scalar> ms(c.fieldIOobject("ms"), np);
|
IOField<scalar> ms(c.fieldIOobject("ms", IOobject::NO_READ), np);
|
||||||
IOField<scalar> tTurb(c.fieldIOobject("tTurb"), np);
|
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::NO_READ), np);
|
||||||
IOField<scalar> liquidCore(c.fieldIOobject("liquidCore"), np);
|
IOField<scalar> liquidCore
|
||||||
IOField<scalar> injector(c.fieldIOobject("injector"), np);
|
(
|
||||||
|
c.fieldIOobject("liquidCore", IOobject::NO_READ),
|
||||||
IOField<vector> U(c.fieldIOobject("U"), np);
|
np
|
||||||
IOField<vector> Uturb(c.fieldIOobject("Uturb"), np);
|
);
|
||||||
IOField<vector> n(c.fieldIOobject("n"), 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;
|
label i = 0;
|
||||||
forAllConstIter(Cloud<parcel>, c, iter)
|
forAllConstIter(Cloud<parcel>, c, iter)
|
||||||
@ -265,7 +275,7 @@ void Foam::parcel::writeFields
|
|||||||
|
|
||||||
for (label j=0; j<nX; j++)
|
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;
|
label i = 0;
|
||||||
forAllConstIter(Cloud<parcel>, c, iter)
|
forAllConstIter(Cloud<parcel>, c, iter)
|
||||||
|
|||||||
@ -52,7 +52,6 @@ defineTemplateTypeNameAndDebug(IOPtrList<injector>, 0);
|
|||||||
// Construct from components
|
// Construct from components
|
||||||
Foam::spray::spray
|
Foam::spray::spray
|
||||||
(
|
(
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volScalarField& p,
|
const volScalarField& p,
|
||||||
@ -67,7 +66,6 @@ Foam::spray::spray
|
|||||||
runTime_(U.time()),
|
runTime_(U.time()),
|
||||||
time0_(runTime_.value()),
|
time0_(runTime_.value()),
|
||||||
mesh_(U.mesh()),
|
mesh_(U.mesh()),
|
||||||
volPointInterpolation_(vpi),
|
|
||||||
rndGen_(label(0)),
|
rndGen_(label(0)),
|
||||||
|
|
||||||
U_(U),
|
U_(U),
|
||||||
@ -263,7 +261,7 @@ Foam::spray::spray
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"spray::spray(const pointMesh& pMesh, const volVectorField& U, "
|
"spray::spray(const volVectorField& U, "
|
||||||
"const volScalarField& rho, const volScalarField& p, "
|
"const volScalarField& rho, const volScalarField& p, "
|
||||||
"const volScalarField& T, const combustionMixture& composition,"
|
"const volScalarField& T, const combustionMixture& composition,"
|
||||||
"const PtrList<specieProperties>& gaseousFuelProperties, "
|
"const PtrList<specieProperties>& gaseousFuelProperties, "
|
||||||
|
|||||||
@ -36,7 +36,6 @@ Description
|
|||||||
#include "parcel.H"
|
#include "parcel.H"
|
||||||
#include "injector.H"
|
#include "injector.H"
|
||||||
#include "IOPtrList.H"
|
#include "IOPtrList.H"
|
||||||
#include "volPointInterpolation.H"
|
|
||||||
#include "interpolation.H"
|
#include "interpolation.H"
|
||||||
#include "liquid.H"
|
#include "liquid.H"
|
||||||
#include "sprayThermoTypes.H"
|
#include "sprayThermoTypes.H"
|
||||||
@ -76,7 +75,6 @@ class spray
|
|||||||
const Time& runTime_;
|
const Time& runTime_;
|
||||||
scalar time0_;
|
scalar time0_;
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
const volPointInterpolation& volPointInterpolation_;
|
|
||||||
|
|
||||||
//- Random number generator
|
//- Random number generator
|
||||||
Random rndGen_;
|
Random rndGen_;
|
||||||
@ -189,7 +187,6 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
spray
|
spray
|
||||||
(
|
(
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volScalarField& p,
|
const volScalarField& p,
|
||||||
|
|||||||
@ -49,33 +49,13 @@ void spray::evolve()
|
|||||||
srhos_[i].setSize(rho_.size());
|
srhos_[i].setSize(rho_.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
UInterpolator_ = interpolation<vector>::New
|
UInterpolator_ = interpolation<vector>::New(interpolationSchemes_, U_);
|
||||||
(
|
|
||||||
interpolationSchemes_,
|
|
||||||
volPointInterpolation_,
|
|
||||||
U_
|
|
||||||
);
|
|
||||||
|
|
||||||
rhoInterpolator_ = interpolation<scalar>::New
|
rhoInterpolator_ = interpolation<scalar>::New(interpolationSchemes_, rho_);
|
||||||
(
|
|
||||||
interpolationSchemes_,
|
|
||||||
volPointInterpolation_,
|
|
||||||
rho_
|
|
||||||
);
|
|
||||||
|
|
||||||
pInterpolator_ = interpolation<scalar>::New
|
pInterpolator_ = interpolation<scalar>::New(interpolationSchemes_, p_);
|
||||||
(
|
|
||||||
interpolationSchemes_,
|
|
||||||
volPointInterpolation_,
|
|
||||||
p_
|
|
||||||
);
|
|
||||||
|
|
||||||
TInterpolator_ = interpolation<scalar>::New
|
TInterpolator_ = interpolation<scalar>::New(interpolationSchemes_, T_);
|
||||||
(
|
|
||||||
interpolationSchemes_,
|
|
||||||
volPointInterpolation_,
|
|
||||||
T_
|
|
||||||
);
|
|
||||||
|
|
||||||
calculateAmbientPressure();
|
calculateAmbientPressure();
|
||||||
calculateAmbientTemperature();
|
calculateAmbientTemperature();
|
||||||
|
|||||||
@ -29,10 +29,9 @@ License
|
|||||||
#include "DragModel.H"
|
#include "DragModel.H"
|
||||||
#include "InjectionModel.H"
|
#include "InjectionModel.H"
|
||||||
#include "WallInteractionModel.H"
|
#include "WallInteractionModel.H"
|
||||||
|
|
||||||
#include "IntegrationScheme.H"
|
#include "IntegrationScheme.H"
|
||||||
|
#include "interpolation.H"
|
||||||
|
|
||||||
#include "interpolationCellPoint.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -142,7 +141,6 @@ template<class ParcelType>
|
|||||||
Foam::KinematicCloud<ParcelType>::KinematicCloud
|
Foam::KinematicCloud<ParcelType>::KinematicCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const volScalarField& mu,
|
const volScalarField& mu,
|
||||||
@ -153,7 +151,6 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
kinematicCloud(),
|
kinematicCloud(),
|
||||||
cloudType_(cloudType),
|
cloudType_(cloudType),
|
||||||
mesh_(rho.mesh()),
|
mesh_(rho.mesh()),
|
||||||
vpi_(vpi),
|
|
||||||
particleProperties_
|
particleProperties_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -267,7 +264,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"Foam::KinematicCloud<ParcelType>::KinematicCloud"
|
"Foam::KinematicCloud<ParcelType>::KinematicCloud"
|
||||||
"(const word&, const volPointInterpolation&, const volScalarField&"
|
"(const word&, const volScalarField&"
|
||||||
", const volVectorField&, const volScalarField&, const "
|
", const volVectorField&, const volScalarField&, const "
|
||||||
"dimensionedVector&)"
|
"dimensionedVector&)"
|
||||||
)<< "parcelBasisType must be either 'number' or 'mass'" << nl
|
)<< "parcelBasisType must be either 'number' or 'mass'" << nl
|
||||||
@ -300,7 +297,6 @@ void Foam::KinematicCloud<ParcelType>::evolve()
|
|||||||
interpolation<scalar>::New
|
interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
interpolationSchemes_,
|
interpolationSchemes_,
|
||||||
vpi_,
|
|
||||||
rho_
|
rho_
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -308,7 +304,6 @@ void Foam::KinematicCloud<ParcelType>::evolve()
|
|||||||
interpolation<vector>::New
|
interpolation<vector>::New
|
||||||
(
|
(
|
||||||
interpolationSchemes_,
|
interpolationSchemes_,
|
||||||
vpi_,
|
|
||||||
U_
|
U_
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -316,7 +311,6 @@ void Foam::KinematicCloud<ParcelType>::evolve()
|
|||||||
interpolation<scalar>::New
|
interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
interpolationSchemes_,
|
interpolationSchemes_,
|
||||||
vpi_,
|
|
||||||
mu_
|
mu_
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,6 @@ SourceFiles
|
|||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "volPointInterpolation.H"
|
|
||||||
#include "fvMatrices.H"
|
#include "fvMatrices.H"
|
||||||
#include "fvm.H"
|
#include "fvm.H"
|
||||||
|
|
||||||
@ -110,9 +109,6 @@ private:
|
|||||||
//- References to the mesh and time databases
|
//- References to the mesh and time databases
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
//- Reference to the interpolation for the carrier phase to the parcels
|
|
||||||
const volPointInterpolation& vpi_;
|
|
||||||
|
|
||||||
//- Dictionary of particle properties
|
//- Dictionary of particle properties
|
||||||
IOdictionary particleProperties_;
|
IOdictionary particleProperties_;
|
||||||
|
|
||||||
@ -268,7 +264,6 @@ public:
|
|||||||
KinematicCloud
|
KinematicCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const volScalarField& mu,
|
const volScalarField& mu,
|
||||||
@ -295,9 +290,6 @@ public:
|
|||||||
//- Return refernce to the mesh
|
//- Return refernce to the mesh
|
||||||
inline const fvMesh& mesh() const;
|
inline const fvMesh& mesh() const;
|
||||||
|
|
||||||
//- Retuen reference to the interpolation
|
|
||||||
inline const volPointInterpolation& vpi() const;
|
|
||||||
|
|
||||||
//- Return particle properties dictionary
|
//- Return particle properties dictionary
|
||||||
inline const IOdictionary& particleProperties() const;
|
inline const IOdictionary& particleProperties() const;
|
||||||
|
|
||||||
|
|||||||
@ -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>
|
template<class ParcelType>
|
||||||
inline const Foam::IOdictionary&
|
inline const Foam::IOdictionary&
|
||||||
Foam::KinematicCloud<ParcelType>::particleProperties() const
|
Foam::KinematicCloud<ParcelType>::particleProperties() const
|
||||||
|
|||||||
@ -29,15 +29,12 @@ License
|
|||||||
#include "MassTransferModel.H"
|
#include "MassTransferModel.H"
|
||||||
#include "SurfaceReactionModel.H"
|
#include "SurfaceReactionModel.H"
|
||||||
|
|
||||||
#include "interpolationCellPoint.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::ReactingCloud<ParcelType>::ReactingCloud
|
Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
@ -45,7 +42,7 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
PtrList<specieReactingProperties>& gases
|
PtrList<specieReactingProperties>& gases
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoCloud<ParcelType>(cloudType, vpi, rho, U, g, thermo),
|
ThermoCloud<ParcelType>(cloudType, rho, U, g, thermo),
|
||||||
reactingCloud(),
|
reactingCloud(),
|
||||||
constProps_(this->particleProperties()),
|
constProps_(this->particleProperties()),
|
||||||
carrierThermo_(thermo),
|
carrierThermo_(thermo),
|
||||||
@ -131,42 +128,36 @@ void Foam::ReactingCloud<ParcelType>::evolve()
|
|||||||
autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New
|
autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
this->rho()
|
this->rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New
|
autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
this->U()
|
this->U()
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New
|
autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
this->mu()
|
this->mu()
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New
|
autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New
|
autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
cp
|
cp
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > pInterpolator = interpolation<scalar>::New
|
autoPtr<interpolation<scalar> > pInterpolator = interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
p
|
p
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,6 @@ public:
|
|||||||
ReactingCloud
|
ReactingCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
|
|||||||
@ -36,7 +36,6 @@ template<class ParcelType>
|
|||||||
Foam::ThermoCloud<ParcelType>::ThermoCloud
|
Foam::ThermoCloud<ParcelType>::ThermoCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
@ -46,7 +45,6 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
KinematicCloud<ParcelType>
|
KinematicCloud<ParcelType>
|
||||||
(
|
(
|
||||||
cloudType,
|
cloudType,
|
||||||
vpi,
|
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
thermo.mu(),
|
thermo.mu(),
|
||||||
@ -130,35 +128,30 @@ void Foam::ThermoCloud<ParcelType>::evolve()
|
|||||||
autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New
|
autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
this->rho()
|
this->rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New
|
autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
this->U()
|
this->U()
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New
|
autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
this->mu()
|
this->mu()
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New
|
autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New
|
autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New
|
||||||
(
|
(
|
||||||
this->interpolationSchemes(),
|
this->interpolationSchemes(),
|
||||||
this->vpi(),
|
|
||||||
cp
|
cp
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -135,7 +135,6 @@ public:
|
|||||||
ThermoCloud
|
ThermoCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
|
|||||||
@ -39,14 +39,13 @@ namespace Foam
|
|||||||
Foam::basicKinematicCloud::basicKinematicCloud
|
Foam::basicKinematicCloud::basicKinematicCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const volScalarField& mu,
|
const volScalarField& mu,
|
||||||
const dimensionedVector& g
|
const dimensionedVector& g
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicCloud<basicKinematicParcel>(cloudType, vpi, rho, U, mu, g)
|
KinematicCloud<basicKinematicParcel>(cloudType, rho, U, mu, g)
|
||||||
{
|
{
|
||||||
basicKinematicParcel::readFields(*this);
|
basicKinematicParcel::readFields(*this);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,6 @@ public:
|
|||||||
basicKinematicCloud
|
basicKinematicCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const volScalarField& mu,
|
const volScalarField& mu,
|
||||||
|
|||||||
@ -39,7 +39,6 @@ namespace Foam
|
|||||||
Foam::basicReactingCloud::basicReactingCloud
|
Foam::basicReactingCloud::basicReactingCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
@ -50,7 +49,6 @@ Foam::basicReactingCloud::basicReactingCloud
|
|||||||
ReactingCloud<basicReactingParcel>
|
ReactingCloud<basicReactingParcel>
|
||||||
(
|
(
|
||||||
cloudType,
|
cloudType,
|
||||||
vpi,
|
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
g,
|
||||||
|
|||||||
@ -73,7 +73,6 @@ public:
|
|||||||
basicReactingCloud
|
basicReactingCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
|
|||||||
@ -39,14 +39,13 @@ namespace Foam
|
|||||||
Foam::basicThermoCloud::basicThermoCloud
|
Foam::basicThermoCloud::basicThermoCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
basicThermo& thermo
|
basicThermo& thermo
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoCloud<basicThermoParcel>(cloudType, vpi, rho, U, g, thermo)
|
ThermoCloud<basicThermoParcel>(cloudType, rho, U, g, thermo)
|
||||||
{
|
{
|
||||||
basicThermoParcel::readFields(*this);
|
basicThermoParcel::readFields(*this);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,7 +76,6 @@ public:
|
|||||||
basicThermoCloud
|
basicThermoCloud
|
||||||
(
|
(
|
||||||
const word& cloudType,
|
const word& cloudType,
|
||||||
const volPointInterpolation& vpi,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
|
|||||||
@ -26,6 +26,8 @@ License
|
|||||||
|
|
||||||
#include "KinematicParcel.H"
|
#include "KinematicParcel.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
#include "IOField.H"
|
||||||
|
#include "Cloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -97,25 +99,25 @@ void Foam::KinematicParcel<ParcelType>::readFields
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IOField<label> typeId(c.fieldIOobject("typeId"));
|
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, typeId);
|
c.checkFieldIOobject(c, typeId);
|
||||||
|
|
||||||
IOField<scalar> d(c.fieldIOobject("d"));
|
IOField<scalar> d(c.fieldIOobject("d", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, d);
|
c.checkFieldIOobject(c, d);
|
||||||
|
|
||||||
IOField<vector> U(c.fieldIOobject("U"));
|
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, U);
|
c.checkFieldIOobject(c, U);
|
||||||
|
|
||||||
IOField<scalar> nParticle(c.fieldIOobject("nParticle"));
|
IOField<scalar> nParticle(c.fieldIOobject("nParticle", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, nParticle);
|
c.checkFieldIOobject(c, nParticle);
|
||||||
|
|
||||||
IOField<scalar> rho(c.fieldIOobject("rho"));
|
IOField<scalar> rho(c.fieldIOobject("rho", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, rho);
|
c.checkFieldIOobject(c, rho);
|
||||||
|
|
||||||
IOField<scalar> tTurb(c.fieldIOobject("tTurb"));
|
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, tTurb);
|
c.checkFieldIOobject(c, tTurb);
|
||||||
|
|
||||||
IOField<vector> UTurb(c.fieldIOobject("UTurb"));
|
IOField<vector> UTurb(c.fieldIOobject("UTurb", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, UTurb);
|
c.checkFieldIOobject(c, UTurb);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -145,13 +147,17 @@ void Foam::KinematicParcel<ParcelType>::writeFields
|
|||||||
|
|
||||||
label np = c.size();
|
label np = c.size();
|
||||||
|
|
||||||
IOField<label> typeId(c.fieldIOobject("typeId"), np);
|
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np);
|
||||||
IOField<scalar> d(c.fieldIOobject("d"), np);
|
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
|
||||||
IOField<vector> U(c.fieldIOobject("U"), np);
|
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
|
||||||
IOField<scalar> nParticle(c.fieldIOobject("nParticle"), np);
|
IOField<scalar> nParticle
|
||||||
IOField<scalar> rho(c.fieldIOobject("rho"), np);
|
(
|
||||||
IOField<scalar> tTurb(c.fieldIOobject("tTurb"), np);
|
c.fieldIOobject("nParticle", IOobject::NO_READ),
|
||||||
IOField<vector> UTurb(c.fieldIOobject("UTurb"), np);
|
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;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||||
|
|||||||
@ -103,7 +103,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
|||||||
|
|
||||||
ThermoParcel<ParcelType>::readFields(c);
|
ThermoParcel<ParcelType>::readFields(c);
|
||||||
|
|
||||||
IOField<scalar> mass0(c.fieldIOobject("mass0"));
|
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, mass0);
|
c.checkFieldIOobject(c, mass0);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -136,7 +136,10 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
|||||||
// Populate YMixture for each parcel
|
// Populate YMixture for each parcel
|
||||||
forAll(compositionNames, j)
|
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;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||||
@ -148,7 +151,10 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
|||||||
// Populate YGas for each parcel
|
// Populate YGas for each parcel
|
||||||
forAll(gasNames, j)
|
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;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||||
@ -160,7 +166,10 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
|||||||
// Populate YLiquid for each parcel
|
// Populate YLiquid for each parcel
|
||||||
forAll(liquidNames, j)
|
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;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||||
@ -172,7 +181,10 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
|||||||
// Populate YSolid for each parcel
|
// Populate YSolid for each parcel
|
||||||
forAll(solidNames, j)
|
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;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||||
@ -194,7 +206,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
|
|
||||||
label np = c.size();
|
label np = c.size();
|
||||||
|
|
||||||
IOField<scalar> mass0(c.fieldIOobject("mass0"), np);
|
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||||
@ -213,7 +225,8 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
{
|
{
|
||||||
IOField<scalar> YMixture
|
IOField<scalar> YMixture
|
||||||
(
|
(
|
||||||
c.fieldIOobject("Y" + compositionNames[j]), np
|
c.fieldIOobject("Y" + compositionNames[j], IOobject::NO_READ),
|
||||||
|
np
|
||||||
);
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -228,7 +241,11 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
const wordList& gasNames = c.composition().gasNames();
|
const wordList& gasNames = c.composition().gasNames();
|
||||||
forAll(gasNames, j)
|
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;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||||
@ -242,7 +259,11 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
const wordList& liquidNames = c.composition().liquidNames();
|
const wordList& liquidNames = c.composition().liquidNames();
|
||||||
forAll(liquidNames, j)
|
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;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||||
@ -256,7 +277,11 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
|||||||
const wordList& solidNames = c.composition().solidNames();
|
const wordList& solidNames = c.composition().solidNames();
|
||||||
forAll(solidNames, j)
|
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;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||||
|
|||||||
@ -82,10 +82,10 @@ void Foam::ThermoParcel<ParcelType>::readFields
|
|||||||
|
|
||||||
KinematicParcel<ParcelType>::readFields(c);
|
KinematicParcel<ParcelType>::readFields(c);
|
||||||
|
|
||||||
IOField<scalar> T(c.fieldIOobject("T"));
|
IOField<scalar> T(c.fieldIOobject("T", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, T);
|
c.checkFieldIOobject(c, T);
|
||||||
|
|
||||||
IOField<scalar> cp(c.fieldIOobject("cp"));
|
IOField<scalar> cp(c.fieldIOobject("cp", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, cp);
|
c.checkFieldIOobject(c, cp);
|
||||||
|
|
||||||
|
|
||||||
@ -111,8 +111,8 @@ void Foam::ThermoParcel<ParcelType>::writeFields
|
|||||||
|
|
||||||
label np = c.size();
|
label np = c.size();
|
||||||
|
|
||||||
IOField<scalar> T(c.fieldIOobject("T"), np);
|
IOField<scalar> T(c.fieldIOobject("T", IOobject::NO_READ), np);
|
||||||
IOField<scalar> cp(c.fieldIOobject("cp"), np);
|
IOField<scalar> cp(c.fieldIOobject("cp", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||||
|
|||||||
@ -85,22 +85,25 @@ void molecule::readFields(moleculeCloud& mC)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IOField<label> id(mC.fieldIOobject("id"));
|
IOField<label> id(mC.fieldIOobject("id", IOobject::MUST_READ));
|
||||||
mC.checkFieldIOobject(mC, id);
|
mC.checkFieldIOobject(mC, id);
|
||||||
|
|
||||||
IOField<scalar> mass(mC.fieldIOobject("mass"));
|
IOField<scalar> mass(mC.fieldIOobject("mass", IOobject::MUST_READ));
|
||||||
mC.checkFieldIOobject(mC, mass);
|
mC.checkFieldIOobject(mC, mass);
|
||||||
|
|
||||||
IOField<vector> U(mC.fieldIOobject("U"));
|
IOField<vector> U(mC.fieldIOobject("U", IOobject::MUST_READ));
|
||||||
mC.checkFieldIOobject(mC, U);
|
mC.checkFieldIOobject(mC, U);
|
||||||
|
|
||||||
IOField<vector> A(mC.fieldIOobject("A"));
|
IOField<vector> A(mC.fieldIOobject("A", IOobject::MUST_READ));
|
||||||
mC.checkFieldIOobject(mC, A);
|
mC.checkFieldIOobject(mC, A);
|
||||||
|
|
||||||
IOField<label> tethered(mC.fieldIOobject("tethered"));
|
IOField<label> tethered(mC.fieldIOobject("tethered", IOobject::MUST_READ));
|
||||||
mC.checkFieldIOobject(mC, tethered);
|
mC.checkFieldIOobject(mC, tethered);
|
||||||
|
|
||||||
IOField<vector> tetherPositions(mC.fieldIOobject("tetherPositions"));
|
IOField<vector> tetherPositions
|
||||||
|
(
|
||||||
|
mC.fieldIOobject("tetherPositions", IOobject::MUST_READ)
|
||||||
|
);
|
||||||
mC.checkFieldIOobject(mC, tetherPositions);
|
mC.checkFieldIOobject(mC, tetherPositions);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -127,12 +130,20 @@ void molecule::writeFields(const moleculeCloud& mC)
|
|||||||
|
|
||||||
label np = mC.size();
|
label np = mC.size();
|
||||||
|
|
||||||
IOField<label> id(mC.fieldIOobject("id"), np);
|
IOField<label> id(mC.fieldIOobject("id", IOobject::NO_READ), np);
|
||||||
IOField<scalar> mass(mC.fieldIOobject("mass"), np);
|
IOField<scalar> mass(mC.fieldIOobject("mass", IOobject::NO_READ), np);
|
||||||
IOField<vector> U(mC.fieldIOobject("U"), np);
|
IOField<vector> U(mC.fieldIOobject("U", IOobject::NO_READ), np);
|
||||||
IOField<vector> A(mC.fieldIOobject("A"), np);
|
IOField<vector> A(mC.fieldIOobject("A", IOobject::NO_READ), np);
|
||||||
IOField<label> tethered(mC.fieldIOobject("tethered"), np);
|
IOField<label> tethered
|
||||||
IOField<vector> tetherPositions(mC.fieldIOobject("tetherPositions"), np);
|
(
|
||||||
|
mC.fieldIOobject("tethered", IOobject::NO_READ),
|
||||||
|
np
|
||||||
|
);
|
||||||
|
IOField<vector> tetherPositions
|
||||||
|
(
|
||||||
|
mC.fieldIOobject("tetherPositions", IOobject::NO_READ),
|
||||||
|
np
|
||||||
|
);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(moleculeCloud, mC, iter)
|
forAllConstIter(moleculeCloud, mC, iter)
|
||||||
|
|||||||
@ -28,7 +28,6 @@ License
|
|||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "interpolationCellPoint.H"
|
#include "interpolationCellPoint.H"
|
||||||
#include "volPointInterpolation.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -75,12 +74,9 @@ void Foam::solidParticleCloud::move(const dimensionedVector& g)
|
|||||||
const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
|
const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
|
||||||
const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");
|
const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");
|
||||||
|
|
||||||
pointMesh pMesh(U.mesh());
|
interpolationCellPoint<scalar> rhoInterp(rho);
|
||||||
volPointInterpolation vpi(U.mesh(), pMesh);
|
interpolationCellPoint<vector> UInterp(U);
|
||||||
|
interpolationCellPoint<scalar> nuInterp(nu);
|
||||||
interpolationCellPoint<scalar> rhoInterp(vpi, rho);
|
|
||||||
interpolationCellPoint<vector> UInterp(vpi, U);
|
|
||||||
interpolationCellPoint<scalar> nuInterp(vpi, nu);
|
|
||||||
|
|
||||||
solidParticle::trackData td(*this, rhoInterp, UInterp, nuInterp, g.value());
|
solidParticle::trackData td(*this, rhoInterp, UInterp, nuInterp, g.value());
|
||||||
|
|
||||||
|
|||||||
@ -66,10 +66,10 @@ void Foam::solidParticle::readFields(Cloud<solidParticle>& c)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IOField<scalar> d(c.fieldIOobject("d"));
|
IOField<scalar> d(c.fieldIOobject("d", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, d);
|
c.checkFieldIOobject(c, d);
|
||||||
|
|
||||||
IOField<vector> U(c.fieldIOobject("U"));
|
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, U);
|
c.checkFieldIOobject(c, U);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
@ -90,8 +90,8 @@ void Foam::solidParticle::writeFields(const Cloud<solidParticle>& c)
|
|||||||
|
|
||||||
label np = c.size();
|
label np = c.size();
|
||||||
|
|
||||||
IOField<scalar> d(c.fieldIOobject("d"), np);
|
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
|
||||||
IOField<vector> U(c.fieldIOobject("U"), np);
|
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(Cloud<solidParticle>, c, iter)
|
forAllConstIter(Cloud<solidParticle>, c, iter)
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "PointEdgeWave.H"
|
#include "PointEdgeWave.H"
|
||||||
#include "pointMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "processorPolyPatch.H"
|
#include "processorPolyPatch.H"
|
||||||
#include "cyclicPolyPatch.H"
|
#include "cyclicPolyPatch.H"
|
||||||
#include "OPstream.H"
|
#include "OPstream.H"
|
||||||
@ -33,7 +33,6 @@ License
|
|||||||
#include "PstreamCombineReduceOps.H"
|
#include "PstreamCombineReduceOps.H"
|
||||||
#include "debug.H"
|
#include "debug.H"
|
||||||
#include "typeInfo.H"
|
#include "typeInfo.H"
|
||||||
#include "ListOps.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -61,13 +60,11 @@ void Foam::PointEdgeWave<Type>::offset(const label val, labelList& elems)
|
|||||||
template <class Type>
|
template <class Type>
|
||||||
void Foam::PointEdgeWave<Type>::calcCyclicAddressing()
|
void Foam::PointEdgeWave<Type>::calcCyclicAddressing()
|
||||||
{
|
{
|
||||||
const polyMesh& mesh = pMesh_();
|
|
||||||
|
|
||||||
label cycHalf = 0;
|
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))
|
if (isA<cyclicPolyPatch>(patch))
|
||||||
{
|
{
|
||||||
@ -75,7 +72,7 @@ void Foam::PointEdgeWave<Type>::calcCyclicAddressing()
|
|||||||
|
|
||||||
SubList<face> halfAFaces
|
SubList<face> halfAFaces
|
||||||
(
|
(
|
||||||
mesh.faces(),
|
mesh_.faces(),
|
||||||
halfSize,
|
halfSize,
|
||||||
patch.start()
|
patch.start()
|
||||||
);
|
);
|
||||||
@ -83,12 +80,12 @@ void Foam::PointEdgeWave<Type>::calcCyclicAddressing()
|
|||||||
cycHalves_.set
|
cycHalves_.set
|
||||||
(
|
(
|
||||||
cycHalf++,
|
cycHalf++,
|
||||||
new primitivePatch(halfAFaces, mesh.points())
|
new primitivePatch(halfAFaces, mesh_.points())
|
||||||
);
|
);
|
||||||
|
|
||||||
SubList<face> halfBFaces
|
SubList<face> halfBFaces
|
||||||
(
|
(
|
||||||
mesh.faces(),
|
mesh_.faces(),
|
||||||
halfSize,
|
halfSize,
|
||||||
patch.start() + halfSize
|
patch.start() + halfSize
|
||||||
);
|
);
|
||||||
@ -96,7 +93,7 @@ void Foam::PointEdgeWave<Type>::calcCyclicAddressing()
|
|||||||
cycHalves_.set
|
cycHalves_.set
|
||||||
(
|
(
|
||||||
cycHalf++,
|
cycHalf++,
|
||||||
new primitivePatch(halfBFaces, mesh.points())
|
new primitivePatch(halfBFaces, mesh_.points())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -203,7 +200,7 @@ bool Foam::PointEdgeWave<Type>::updatePoint
|
|||||||
bool propagate =
|
bool propagate =
|
||||||
pointInfo.updatePoint
|
pointInfo.updatePoint
|
||||||
(
|
(
|
||||||
pMesh_(),
|
mesh_,
|
||||||
pointI,
|
pointI,
|
||||||
neighbourEdgeI,
|
neighbourEdgeI,
|
||||||
neighbourInfo,
|
neighbourInfo,
|
||||||
@ -249,7 +246,7 @@ bool Foam::PointEdgeWave<Type>::updatePoint
|
|||||||
bool propagate =
|
bool propagate =
|
||||||
pointInfo.updatePoint
|
pointInfo.updatePoint
|
||||||
(
|
(
|
||||||
pMesh_(),
|
mesh_,
|
||||||
pointI,
|
pointI,
|
||||||
neighbourInfo,
|
neighbourInfo,
|
||||||
tol
|
tol
|
||||||
@ -295,7 +292,7 @@ bool Foam::PointEdgeWave<Type>::updateEdge
|
|||||||
bool propagate =
|
bool propagate =
|
||||||
edgeInfo.updateEdge
|
edgeInfo.updateEdge
|
||||||
(
|
(
|
||||||
pMesh_(),
|
mesh_,
|
||||||
edgeI,
|
edgeI,
|
||||||
neighbourPointI,
|
neighbourPointI,
|
||||||
neighbourInfo,
|
neighbourInfo,
|
||||||
@ -327,9 +324,9 @@ Foam::label Foam::PointEdgeWave<Type>::countPatchType() const
|
|||||||
{
|
{
|
||||||
label nPatches = 0;
|
label nPatches = 0;
|
||||||
|
|
||||||
forAll(pMesh_().boundaryMesh(), patchI)
|
forAll(mesh_.boundaryMesh(), patchI)
|
||||||
{
|
{
|
||||||
if (isA<PatchType>(pMesh_().boundaryMesh()[patchI]))
|
if (isA<PatchType>(mesh_.boundaryMesh()[patchI]))
|
||||||
{
|
{
|
||||||
nPatches++;
|
nPatches++;
|
||||||
}
|
}
|
||||||
@ -433,15 +430,12 @@ void Foam::PointEdgeWave<Type>::updateFromPatchInfo
|
|||||||
template <class Type>
|
template <class Type>
|
||||||
void Foam::PointEdgeWave<Type>::handleProcPatches()
|
void Foam::PointEdgeWave<Type>::handleProcPatches()
|
||||||
{
|
{
|
||||||
const polyMesh& mesh = pMesh_();
|
|
||||||
|
|
||||||
|
|
||||||
// 1. Send all point info on processor patches. Send as
|
// 1. Send all point info on processor patches. Send as
|
||||||
// face label + offset in face.
|
// 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))
|
if (isA<processorPolyPatch>(patch))
|
||||||
{
|
{
|
||||||
@ -491,9 +485,9 @@ void Foam::PointEdgeWave<Type>::handleProcPatches()
|
|||||||
// 2. Receive all point info on processor patches.
|
// 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))
|
if (isA<processorPolyPatch>(patch))
|
||||||
{
|
{
|
||||||
@ -544,7 +538,7 @@ void Foam::PointEdgeWave<Type>::handleProcPatches()
|
|||||||
// (Note:irrespective if changed or not for now)
|
// (Note:irrespective if changed or not for now)
|
||||||
//
|
//
|
||||||
|
|
||||||
const globalMeshData& pd = mesh.globalData();
|
const globalMeshData& pd = mesh_.globalData();
|
||||||
|
|
||||||
List<Type> sharedData(pd.nGlobalPoints());
|
List<Type> sharedData(pd.nGlobalPoints());
|
||||||
|
|
||||||
@ -579,16 +573,14 @@ void Foam::PointEdgeWave<Type>::handleProcPatches()
|
|||||||
template <class Type>
|
template <class Type>
|
||||||
void Foam::PointEdgeWave<Type>::handleCyclicPatches()
|
void Foam::PointEdgeWave<Type>::handleCyclicPatches()
|
||||||
{
|
{
|
||||||
const polyMesh& mesh = pMesh_();
|
|
||||||
|
|
||||||
// 1. Send all point info on cyclic patches. Send as
|
// 1. Send all point info on cyclic patches. Send as
|
||||||
// face label + offset in face.
|
// face label + offset in face.
|
||||||
|
|
||||||
label cycHalf = 0;
|
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))
|
if (isA<cyclicPolyPatch>(patch))
|
||||||
{
|
{
|
||||||
@ -692,7 +684,7 @@ void Foam::PointEdgeWave<Type>::handleCyclicPatches()
|
|||||||
template <class Type>
|
template <class Type>
|
||||||
Foam::PointEdgeWave<Type>::PointEdgeWave
|
Foam::PointEdgeWave<Type>::PointEdgeWave
|
||||||
(
|
(
|
||||||
const pointMesh& pMesh,
|
const polyMesh& mesh,
|
||||||
const labelList& changedPoints,
|
const labelList& changedPoints,
|
||||||
const List<Type>& changedPointsInfo,
|
const List<Type>& changedPointsInfo,
|
||||||
|
|
||||||
@ -702,45 +694,45 @@ Foam::PointEdgeWave<Type>::PointEdgeWave
|
|||||||
const label maxIter
|
const label maxIter
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
pMesh_(pMesh),
|
mesh_(mesh),
|
||||||
allPointInfo_(allPointInfo),
|
allPointInfo_(allPointInfo),
|
||||||
allEdgeInfo_(allEdgeInfo),
|
allEdgeInfo_(allEdgeInfo),
|
||||||
changedPoint_(pMesh_().nPoints(), false),
|
changedPoint_(mesh_.nPoints(), false),
|
||||||
changedPoints_(pMesh_().nPoints()),
|
changedPoints_(mesh_.nPoints()),
|
||||||
nChangedPoints_(0),
|
nChangedPoints_(0),
|
||||||
changedEdge_(pMesh_().nEdges(), false),
|
changedEdge_(mesh_.nEdges(), false),
|
||||||
changedEdges_(pMesh_().nEdges()),
|
changedEdges_(mesh_.nEdges()),
|
||||||
nChangedEdges_(0),
|
nChangedEdges_(0),
|
||||||
nCyclicPatches_(countPatchType<cyclicPolyPatch>()),
|
nCyclicPatches_(countPatchType<cyclicPolyPatch>()),
|
||||||
cycHalves_(2*nCyclicPatches_),
|
cycHalves_(2*nCyclicPatches_),
|
||||||
nEvals_(0),
|
nEvals_(0),
|
||||||
nUnvisitedPoints_(pMesh_().nPoints()),
|
nUnvisitedPoints_(mesh_.nPoints()),
|
||||||
nUnvisitedEdges_(pMesh_().nEdges())
|
nUnvisitedEdges_(mesh_.nEdges())
|
||||||
{
|
{
|
||||||
if (allPointInfo_.size() != pMesh_().nPoints())
|
if (allPointInfo_.size() != mesh_.nPoints())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"PointEdgeWave<Type>::PointEdgeWave"
|
"PointEdgeWave<Type>::PointEdgeWave"
|
||||||
"(const pointMesh&, const labelList&, const List<Type>,"
|
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||||
" List<Type>&, List<Type>&, const label maxIter)"
|
" List<Type>&, List<Type>&, const label maxIter)"
|
||||||
) << "size of pointInfo work array is not equal to the number"
|
) << "size of pointInfo work array is not equal to the number"
|
||||||
<< " of points in the mesh" << endl
|
<< " of points in the mesh" << endl
|
||||||
<< " pointInfo :" << allPointInfo_.size() << endl
|
<< " pointInfo :" << allPointInfo_.size() << endl
|
||||||
<< " mesh.nPoints:" << pMesh_().nPoints()
|
<< " mesh.nPoints:" << mesh_.nPoints()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
if (allEdgeInfo_.size() != pMesh_().nEdges())
|
if (allEdgeInfo_.size() != mesh_.nEdges())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"PointEdgeWave<Type>::PointEdgeWave"
|
"PointEdgeWave<Type>::PointEdgeWave"
|
||||||
"(const pointMesh&, const labelList&, const List<Type>,"
|
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||||
" List<Type>&, List<Type>&, const label maxIter)"
|
" List<Type>&, List<Type>&, const label maxIter)"
|
||||||
) << "size of edgeInfo work array is not equal to the number"
|
) << "size of edgeInfo work array is not equal to the number"
|
||||||
<< " of edges in the mesh" << endl
|
<< " of edges in the mesh" << endl
|
||||||
<< " edgeInfo :" << allEdgeInfo_.size() << endl
|
<< " edgeInfo :" << allEdgeInfo_.size() << endl
|
||||||
<< " mesh.nEdges:" << pMesh_().nEdges()
|
<< " mesh.nEdges:" << mesh_.nEdges()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -768,7 +760,7 @@ Foam::PointEdgeWave<Type>::PointEdgeWave
|
|||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"PointEdgeWave<Type>::PointEdgeWave"
|
"PointEdgeWave<Type>::PointEdgeWave"
|
||||||
"(const pointMesh&, const labelList&, const List<Type>,"
|
"(const polyMesh&, const labelList&, const List<Type>,"
|
||||||
" List<Type>&, List<Type>&, const label maxIter)"
|
" List<Type>&, List<Type>&, const label maxIter)"
|
||||||
) << "Maximum number of iterations reached. Increase maxIter." << endl
|
) << "Maximum number of iterations reached. Increase maxIter." << endl
|
||||||
<< " maxIter:" << maxIter << endl
|
<< " maxIter:" << maxIter << endl
|
||||||
@ -863,7 +855,7 @@ Foam::label Foam::PointEdgeWave<Type>::edgeToPoint()
|
|||||||
const Type& neighbourWallInfo = allEdgeInfo_[edgeI];
|
const Type& neighbourWallInfo = allEdgeInfo_[edgeI];
|
||||||
|
|
||||||
// Evaluate all connected points (= edge endpoints)
|
// Evaluate all connected points (= edge endpoints)
|
||||||
const edge& e = pMesh_().edges()[edgeI];
|
const edge& e = mesh_.edges()[edgeI];
|
||||||
|
|
||||||
forAll(e, eI)
|
forAll(e, eI)
|
||||||
{
|
{
|
||||||
@ -918,7 +910,7 @@ Foam::label Foam::PointEdgeWave<Type>::edgeToPoint()
|
|||||||
template <class Type>
|
template <class Type>
|
||||||
Foam::label Foam::PointEdgeWave<Type>::pointToEdge()
|
Foam::label Foam::PointEdgeWave<Type>::pointToEdge()
|
||||||
{
|
{
|
||||||
const labelListList& pointEdges = pMesh_().pointEdges();
|
const labelListList& pointEdges = mesh_.pointEdges();
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
|
|||||||
@ -61,7 +61,6 @@ SourceFiles
|
|||||||
|
|
||||||
#include "label.H"
|
#include "label.H"
|
||||||
#include "boolList.H"
|
#include "boolList.H"
|
||||||
#include "labelList.H"
|
|
||||||
#include "scalarField.H"
|
#include "scalarField.H"
|
||||||
#include "pointFields.H"
|
#include "pointFields.H"
|
||||||
#include "tensor.H"
|
#include "tensor.H"
|
||||||
@ -74,7 +73,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
class pointMesh;
|
class polyMesh;
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -104,7 +103,7 @@ class PointEdgeWave
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
const pointMesh& pMesh_;
|
const polyMesh& mesh_;
|
||||||
|
|
||||||
//- Wall information for all points
|
//- Wall information for all points
|
||||||
List<Type>& allPointInfo_;
|
List<Type>& allPointInfo_;
|
||||||
@ -272,7 +271,7 @@ public:
|
|||||||
// (maxIter can be 0)
|
// (maxIter can be 0)
|
||||||
PointEdgeWave
|
PointEdgeWave
|
||||||
(
|
(
|
||||||
const pointMesh& pMesh,
|
const polyMesh& mesh,
|
||||||
const labelList& initialPoints,
|
const labelList& initialPoints,
|
||||||
const List<Type>& initialPointsInfo,
|
const List<Type>& initialPointsInfo,
|
||||||
List<Type>& allPointInfo,
|
List<Type>& allPointInfo,
|
||||||
|
|||||||
@ -52,7 +52,6 @@ meshToMesh::meshToMesh
|
|||||||
fromMesh_(meshFrom),
|
fromMesh_(meshFrom),
|
||||||
toMesh_(meshTo),
|
toMesh_(meshTo),
|
||||||
patchMap_(patchMap),
|
patchMap_(patchMap),
|
||||||
fromPointMesh_(meshFrom),
|
|
||||||
cellAddressing_(toMesh_.nCells()),
|
cellAddressing_(toMesh_.nCells()),
|
||||||
boundaryAddressing_(toMesh_.boundaryMesh().size()),
|
boundaryAddressing_(toMesh_.boundaryMesh().size()),
|
||||||
inverseDistanceWeightsPtr_(NULL)
|
inverseDistanceWeightsPtr_(NULL)
|
||||||
@ -123,7 +122,6 @@ meshToMesh::meshToMesh
|
|||||||
:
|
:
|
||||||
fromMesh_(meshFrom),
|
fromMesh_(meshFrom),
|
||||||
toMesh_(meshTo),
|
toMesh_(meshTo),
|
||||||
fromPointMesh_(meshFrom),
|
|
||||||
cellAddressing_(toMesh_.nCells()),
|
cellAddressing_(toMesh_.nCells()),
|
||||||
boundaryAddressing_(toMesh_.boundaryMesh().size()),
|
boundaryAddressing_(toMesh_.boundaryMesh().size()),
|
||||||
inverseDistanceWeightsPtr_(NULL)
|
inverseDistanceWeightsPtr_(NULL)
|
||||||
|
|||||||
@ -40,7 +40,6 @@ SourceFiles
|
|||||||
#define meshtoMesh_H
|
#define meshtoMesh_H
|
||||||
|
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "pointMesh.H"
|
|
||||||
#include "HashTable.H"
|
#include "HashTable.H"
|
||||||
#include "fvPatchMapper.H"
|
#include "fvPatchMapper.H"
|
||||||
#include "scalarList.H"
|
#include "scalarList.H"
|
||||||
@ -81,9 +80,6 @@ class meshToMesh
|
|||||||
//- toMesh patch labels which cut the from-mesh
|
//- toMesh patch labels which cut the from-mesh
|
||||||
HashTable<label> cuttingPatches_;
|
HashTable<label> cuttingPatches_;
|
||||||
|
|
||||||
//- Point mesh used for interpolation
|
|
||||||
pointMesh fromPointMesh_;
|
|
||||||
|
|
||||||
//- Cell addressing
|
//- Cell addressing
|
||||||
labelList cellAddressing_;
|
labelList cellAddressing_;
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,6 @@ License
|
|||||||
|
|
||||||
#include "meshToMesh.H"
|
#include "meshToMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "volPointInterpolation.H"
|
|
||||||
#include "interpolationCellPoint.H"
|
#include "interpolationCellPoint.H"
|
||||||
#include "SubField.H"
|
#include "SubField.H"
|
||||||
#include "mixedFvPatchField.H"
|
#include "mixedFvPatchField.H"
|
||||||
@ -102,13 +101,7 @@ void meshToMesh::interpolateField
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Cell-Point interpolation
|
// Cell-Point interpolation
|
||||||
volPointInterpolation vpi(fromMesh_, fromPointMesh_);
|
interpolationCellPoint<Type> interpolator(fromVf);
|
||||||
|
|
||||||
interpolationCellPoint<Type> interpolator
|
|
||||||
(
|
|
||||||
vpi,
|
|
||||||
fromVf
|
|
||||||
);
|
|
||||||
|
|
||||||
forAll (toF, celli)
|
forAll (toF, celli)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,7 +30,7 @@ License
|
|||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "ListListOps.H"
|
#include "ListListOps.H"
|
||||||
#include "SortableList.H"
|
#include "SortableList.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -236,8 +236,8 @@ Foam::sampledSets::sampledSets
|
|||||||
loadFromFiles_(loadFromFiles),
|
loadFromFiles_(loadFromFiles),
|
||||||
outputPath_(fileName::null),
|
outputPath_(fileName::null),
|
||||||
searchEngine_(mesh_, true),
|
searchEngine_(mesh_, true),
|
||||||
pMeshPtr_(NULL),
|
// pMeshPtr_(NULL),
|
||||||
pInterpPtr_(NULL),
|
// pInterpPtr_(NULL),
|
||||||
fieldNames_(),
|
fieldNames_(),
|
||||||
interpolationScheme_(word::null),
|
interpolationScheme_(word::null),
|
||||||
writeFormat_(word::null)
|
writeFormat_(word::null)
|
||||||
@ -330,8 +330,10 @@ void Foam::sampledSets::read(const dictionary& dict)
|
|||||||
|
|
||||||
void Foam::sampledSets::correct()
|
void Foam::sampledSets::correct()
|
||||||
{
|
{
|
||||||
pMeshPtr_.clear();
|
// reset interpolation
|
||||||
pInterpPtr_.clear();
|
pointMesh::Delete(mesh_);
|
||||||
|
volPointInterpolation::Delete(mesh_);
|
||||||
|
|
||||||
searchEngine_.correct();
|
searchEngine_.correct();
|
||||||
|
|
||||||
PtrList<sampledSet> newList
|
PtrList<sampledSet> newList
|
||||||
|
|||||||
@ -52,7 +52,6 @@ namespace Foam
|
|||||||
class objectRegistry;
|
class objectRegistry;
|
||||||
class dictionary;
|
class dictionary;
|
||||||
class fvMesh;
|
class fvMesh;
|
||||||
class volPointInterpolation;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class sampledSets Declaration
|
Class sampledSets Declaration
|
||||||
@ -104,7 +103,6 @@ class sampledSets
|
|||||||
//- Construct interpolating field to the sampleSets
|
//- Construct interpolating field to the sampleSets
|
||||||
volFieldSampler
|
volFieldSampler
|
||||||
(
|
(
|
||||||
const volPointInterpolation&,
|
|
||||||
const word& interpolationScheme,
|
const word& interpolationScheme,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const PtrList<sampledSet>&
|
const PtrList<sampledSet>&
|
||||||
@ -159,12 +157,6 @@ class sampledSets
|
|||||||
//- Mesh search engine
|
//- Mesh search engine
|
||||||
meshSearch searchEngine_;
|
meshSearch searchEngine_;
|
||||||
|
|
||||||
//- pointMesh for interpolation
|
|
||||||
autoPtr<pointMesh> pMeshPtr_;
|
|
||||||
|
|
||||||
//- volPointInterpolation for interpolation
|
|
||||||
autoPtr<volPointInterpolation> pInterpPtr_;
|
|
||||||
|
|
||||||
|
|
||||||
// Read from dictonary
|
// Read from dictonary
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,6 @@ License
|
|||||||
|
|
||||||
#include "sampledSets.H"
|
#include "sampledSets.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "volPointInterpolation.H"
|
|
||||||
#include "ListListOps.H"
|
#include "ListListOps.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
@ -34,7 +33,6 @@ License
|
|||||||
template <class Type>
|
template <class Type>
|
||||||
Foam::sampledSets::volFieldSampler<Type>::volFieldSampler
|
Foam::sampledSets::volFieldSampler<Type>::volFieldSampler
|
||||||
(
|
(
|
||||||
const volPointInterpolation& pInterp,
|
|
||||||
const word& interpolationScheme,
|
const word& interpolationScheme,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& field,
|
const GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const PtrList<sampledSet>& samplers
|
const PtrList<sampledSet>& samplers
|
||||||
@ -45,7 +43,7 @@ Foam::sampledSets::volFieldSampler<Type>::volFieldSampler
|
|||||||
{
|
{
|
||||||
autoPtr<interpolation<Type> > interpolator
|
autoPtr<interpolation<Type> > interpolator
|
||||||
(
|
(
|
||||||
interpolation<Type>::New(interpolationScheme, pInterp, field)
|
interpolation<Type>::New(interpolationScheme, field)
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(samplers, seti)
|
forAll(samplers, seti)
|
||||||
@ -228,13 +226,6 @@ void Foam::sampledSets::sampleAndWrite
|
|||||||
{
|
{
|
||||||
bool interpolate = interpolationScheme_ != "cell";
|
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
|
// Create or use existing writer
|
||||||
if (!fields.formatter.valid())
|
if (!fields.formatter.valid())
|
||||||
{
|
{
|
||||||
@ -275,7 +266,6 @@ void Foam::sampledSets::sampleAndWrite
|
|||||||
fieldi,
|
fieldi,
|
||||||
new volFieldSampler<Type>
|
new volFieldSampler<Type>
|
||||||
(
|
(
|
||||||
pInterpPtr_(),
|
|
||||||
interpolationScheme_,
|
interpolationScheme_,
|
||||||
vf,
|
vf,
|
||||||
*this
|
*this
|
||||||
@ -300,7 +290,6 @@ void Foam::sampledSets::sampleAndWrite
|
|||||||
fieldi,
|
fieldi,
|
||||||
new volFieldSampler<Type>
|
new volFieldSampler<Type>
|
||||||
(
|
(
|
||||||
pInterpPtr_(),
|
|
||||||
interpolationScheme_,
|
interpolationScheme_,
|
||||||
mesh_.lookupObject
|
mesh_.lookupObject
|
||||||
<GeometricField<Type, fvPatchField, volMesh> >
|
<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
|||||||
@ -31,6 +31,7 @@ License
|
|||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
#include "ListListOps.H"
|
#include "ListListOps.H"
|
||||||
#include "mergePoints.H"
|
#include "mergePoints.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -270,8 +271,6 @@ Foam::sampledSurfaces::sampledSurfaces
|
|||||||
mesh_(refCast<const fvMesh>(obr)),
|
mesh_(refCast<const fvMesh>(obr)),
|
||||||
loadFromFiles_(loadFromFiles),
|
loadFromFiles_(loadFromFiles),
|
||||||
outputPath_(fileName::null),
|
outputPath_(fileName::null),
|
||||||
pMeshPtr_(NULL),
|
|
||||||
pInterpPtr_(NULL),
|
|
||||||
fieldNames_(),
|
fieldNames_(),
|
||||||
interpolationScheme_(word::null),
|
interpolationScheme_(word::null),
|
||||||
writeFormat_(word::null),
|
writeFormat_(word::null),
|
||||||
@ -369,9 +368,9 @@ void Foam::sampledSurfaces::correct()
|
|||||||
operator[](surfI).correct(true);
|
operator[](surfI).correct(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset interpolation for later
|
// reset interpolation
|
||||||
pMeshPtr_.clear();
|
pointMesh::Delete(mesh_);
|
||||||
pInterpPtr_.clear();
|
volPointInterpolation::Delete(mesh_);
|
||||||
|
|
||||||
mergeSurfaces();
|
mergeSurfaces();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,6 @@ SourceFiles
|
|||||||
#include "sampledSurface.H"
|
#include "sampledSurface.H"
|
||||||
#include "surfaceWriter.H"
|
#include "surfaceWriter.H"
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
#include "volPointInterpolation.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -130,23 +129,17 @@ class sampledSurfaces
|
|||||||
|
|
||||||
//- Name of this set of surfaces,
|
//- Name of this set of surfaces,
|
||||||
// Also used as the name of the sampledSurfaces directory.
|
// Also used as the name of the sampledSurfaces directory.
|
||||||
word name_;
|
const word name_;
|
||||||
|
|
||||||
//- Const reference to fvMesh
|
//- Const reference to fvMesh
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
//- Load fields from files (not from objectRegistry)
|
//- Load fields from files (not from objectRegistry)
|
||||||
bool loadFromFiles_;
|
const bool loadFromFiles_;
|
||||||
|
|
||||||
//- output path
|
//- output path
|
||||||
fileName outputPath_;
|
fileName outputPath_;
|
||||||
|
|
||||||
//- pointMesh for interpolation
|
|
||||||
autoPtr<pointMesh> pMeshPtr_;
|
|
||||||
|
|
||||||
//- volPointInterpolation for interpolation
|
|
||||||
autoPtr<volPointInterpolation> pInterpPtr_;
|
|
||||||
|
|
||||||
|
|
||||||
// Read from dictonary
|
// Read from dictonary
|
||||||
|
|
||||||
@ -192,13 +185,6 @@ class sampledSurfaces
|
|||||||
const wordList& fieldTypes
|
const wordList& fieldTypes
|
||||||
) const;
|
) 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
|
//- Sample and write a particular volume field
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void sampleAndWrite
|
void sampleAndWrite
|
||||||
|
|||||||
@ -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>
|
template<class Type>
|
||||||
void Foam::sampledSurfaces::sampleAndWrite
|
void Foam::sampledSurfaces::sampleAndWrite
|
||||||
(
|
(
|
||||||
@ -106,7 +82,11 @@ void Foam::sampledSurfaces::sampleAndWrite
|
|||||||
{
|
{
|
||||||
if (!interpolator.valid())
|
if (!interpolator.valid())
|
||||||
{
|
{
|
||||||
interpolator = setInterpolator(vField);
|
interpolator = interpolation<Type>::New
|
||||||
|
(
|
||||||
|
interpolationScheme_,
|
||||||
|
vField
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
values = s.interpolate(interpolator());
|
values = s.interpolate(interpolator());
|
||||||
|
|||||||
@ -57,14 +57,10 @@
|
|||||||
volScalarField DpDt =
|
volScalarField DpDt =
|
||||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
|
||||||
volPointInterpolation vpi(mesh, pMesh);
|
|
||||||
|
|
||||||
Info<< "Constructing thermoCloud1" << endl;
|
Info<< "Constructing thermoCloud1" << endl;
|
||||||
basicThermoCloud thermoCloud1
|
basicThermoCloud thermoCloud1
|
||||||
(
|
(
|
||||||
"thermoCloud1",
|
"thermoCloud1",
|
||||||
vpi,
|
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
g,
|
||||||
@ -75,7 +71,6 @@
|
|||||||
basicKinematicCloud kinematicCloud1
|
basicKinematicCloud kinematicCloud1
|
||||||
(
|
(
|
||||||
"kinematicCloud1",
|
"kinematicCloud1",
|
||||||
vpi,
|
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
thermo().mu(),
|
thermo().mu(),
|
||||||
|
|||||||
Reference in New Issue
Block a user