mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated cloud post-processing models to cloudFunctionObject (list)
This commit is contained in:
@ -25,12 +25,13 @@ License
|
||||
|
||||
#include "coalCloud.H"
|
||||
|
||||
#include "makeParcelCloudFunctionObjects.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeThermoParcelForces.H" // thermo variant
|
||||
#include "makeParcelDispersionModels.H"
|
||||
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
|
||||
#include "makeParcelPatchInteractionModels.H"
|
||||
#include "makeParcelPostProcessingModels.H"
|
||||
|
||||
// Thermodynamic
|
||||
#include "makeParcelHeatTransferModels.H"
|
||||
@ -50,12 +51,13 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeParcelCloudFunctionObjects(coalCloud);
|
||||
|
||||
// Kinematic sub-models
|
||||
makeThermoParcelForces(coalCloud);
|
||||
makeParcelDispersionModels(coalCloud);
|
||||
makeReactingMultiphaseParcelInjectionModels(coalCloud);
|
||||
makeParcelPatchInteractionModels(coalCloud);
|
||||
makeParcelPostProcessingModels(coalCloud);
|
||||
|
||||
// Thermo sub-models
|
||||
makeParcelHeatTransferModels(coalCloud);
|
||||
|
||||
@ -31,7 +31,6 @@ License
|
||||
#include "DispersionModel.H"
|
||||
#include "InjectionModel.H"
|
||||
#include "PatchInteractionModel.H"
|
||||
#include "PostProcessingModel.H"
|
||||
#include "SurfaceFilmModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
@ -66,15 +65,6 @@ void Foam::KinematicCloud<CloudType>::setModels()
|
||||
).ptr()
|
||||
);
|
||||
|
||||
postProcessingModel_.reset
|
||||
(
|
||||
PostProcessingModel<KinematicCloud<CloudType> >::New
|
||||
(
|
||||
subModelProperties_,
|
||||
*this
|
||||
).ptr()
|
||||
);
|
||||
|
||||
surfaceFilmModel_.reset
|
||||
(
|
||||
SurfaceFilmModel<KinematicCloud<CloudType> >::New
|
||||
@ -245,9 +235,10 @@ void Foam::KinematicCloud<CloudType>::postEvolve()
|
||||
}
|
||||
|
||||
this->dispersion().cacheFields(false);
|
||||
|
||||
forces_.cacheFields(false);
|
||||
|
||||
this->postProcessing().post();
|
||||
functions_.postEvolve();
|
||||
|
||||
solution_.nextIter();
|
||||
}
|
||||
@ -262,10 +253,11 @@ void Foam::KinematicCloud<CloudType>::cloudReset(KinematicCloud<CloudType>& c)
|
||||
|
||||
forces_.transfer(c.forces_);
|
||||
|
||||
functions_.transfer(c.functions_);
|
||||
|
||||
dispersionModel_.reset(c.dispersionModel_.ptr());
|
||||
injectionModel_.reset(c.injectionModel_.ptr());
|
||||
patchInteractionModel_.reset(c.patchInteractionModel_.ptr());
|
||||
postProcessingModel_.reset(c.postProcessingModel_.ptr());
|
||||
surfaceFilmModel_.reset(c.surfaceFilmModel_.ptr());
|
||||
|
||||
UIntegrator_.reset(c.UIntegrator_.ptr());
|
||||
@ -309,7 +301,9 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
rndGen_
|
||||
(
|
||||
label(0),
|
||||
solution_.steadyState() ?
|
||||
particleProperties_.lookupOrDefault<label>("randomSampleSize", 100000)
|
||||
: -1
|
||||
),
|
||||
cellOccupancyPtr_(),
|
||||
rho_(rho),
|
||||
@ -327,10 +321,19 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
),
|
||||
solution_.active()
|
||||
),
|
||||
functions_
|
||||
(
|
||||
*this,
|
||||
particleProperties_.subOrEmptyDict
|
||||
(
|
||||
"cloudFunctions",
|
||||
solution_.active()
|
||||
),
|
||||
solution_.active()
|
||||
),
|
||||
dispersionModel_(NULL),
|
||||
injectionModel_(NULL),
|
||||
patchInteractionModel_(NULL),
|
||||
postProcessingModel_(NULL),
|
||||
surfaceFilmModel_(NULL),
|
||||
UIntegrator_(NULL),
|
||||
UTrans_
|
||||
@ -405,10 +408,10 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
mu_(c.mu_),
|
||||
g_(c.g_),
|
||||
forces_(c.forces_),
|
||||
functions_(c.functions_),
|
||||
dispersionModel_(c.dispersionModel_->clone()),
|
||||
injectionModel_(c.injectionModel_->clone()),
|
||||
patchInteractionModel_(c.patchInteractionModel_->clone()),
|
||||
postProcessingModel_(c.postProcessingModel_->clone()),
|
||||
surfaceFilmModel_(c.surfaceFilmModel_->clone()),
|
||||
UIntegrator_(c.UIntegrator_->clone()),
|
||||
UTrans_
|
||||
@ -480,10 +483,10 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
mu_(c.mu_),
|
||||
g_(c.g_),
|
||||
forces_(*this, mesh),
|
||||
functions_(*this),
|
||||
dispersionModel_(NULL),
|
||||
injectionModel_(NULL),
|
||||
patchInteractionModel_(NULL),
|
||||
postProcessingModel_(NULL),
|
||||
surfaceFilmModel_(NULL),
|
||||
UIntegrator_(NULL),
|
||||
UTrans_(NULL),
|
||||
|
||||
@ -27,17 +27,18 @@ Class
|
||||
Description
|
||||
Templated base class for kinematic cloud
|
||||
|
||||
- cloud function objects
|
||||
|
||||
- particle forces
|
||||
- buoyancy
|
||||
- drag
|
||||
- pressure gradient
|
||||
|
||||
- sub-models:
|
||||
- Dispersion model
|
||||
- Injection model
|
||||
- Patch interaction model
|
||||
- Post-processing model
|
||||
- Surface film model
|
||||
- dispersion model
|
||||
- injection model
|
||||
- patch interaction model
|
||||
- surface film model
|
||||
|
||||
SourceFiles
|
||||
KinematicCloudI.H
|
||||
@ -61,6 +62,7 @@ SourceFiles
|
||||
#include "cloudSolution.H"
|
||||
|
||||
#include "ParticleForceList.H"
|
||||
#include "CloudFunctionObjectList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -78,9 +80,6 @@ class InjectionModel;
|
||||
template<class CloudType>
|
||||
class PatchInteractionModel;
|
||||
|
||||
template<class CloudType>
|
||||
class PostProcessingModel;
|
||||
|
||||
template<class CloudType>
|
||||
class SurfaceFilmModel;
|
||||
|
||||
@ -108,9 +107,13 @@ public:
|
||||
//- Convenience typedef for this cloud type
|
||||
typedef KinematicCloud<CloudType> kinematicCloudType;
|
||||
|
||||
//- Force type
|
||||
//- Force models type
|
||||
typedef ParticleForceList<KinematicCloud<CloudType> > forceType;
|
||||
|
||||
//- Function object type
|
||||
typedef CloudFunctionObjectList<KinematicCloud<CloudType> >
|
||||
functionType;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -176,6 +179,9 @@ protected:
|
||||
//- Optional particle forces
|
||||
forceType forces_;
|
||||
|
||||
//- Optional cloud function objects
|
||||
functionType functions_;
|
||||
|
||||
|
||||
// References to the cloud sub-models
|
||||
|
||||
@ -191,10 +197,6 @@ protected:
|
||||
autoPtr<PatchInteractionModel<KinematicCloud<CloudType> > >
|
||||
patchInteractionModel_;
|
||||
|
||||
//- Post-processing model
|
||||
autoPtr<PostProcessingModel<KinematicCloud<CloudType> > >
|
||||
postProcessingModel_;
|
||||
|
||||
//- Surface film model
|
||||
autoPtr<SurfaceFilmModel<KinematicCloud<CloudType> > >
|
||||
surfaceFilmModel_;
|
||||
@ -369,6 +371,9 @@ public:
|
||||
// inline const typename parcelType::forceType& forces() const;
|
||||
inline const forceType& forces() const;
|
||||
|
||||
//- Optional cloud function objects
|
||||
inline functionType& functions();
|
||||
|
||||
|
||||
// Sub-models
|
||||
|
||||
@ -396,10 +401,6 @@ public:
|
||||
inline PatchInteractionModel<KinematicCloud<CloudType> >&
|
||||
patchInteraction();
|
||||
|
||||
//- Return reference to post-processing model
|
||||
inline PostProcessingModel<KinematicCloud<CloudType> >&
|
||||
postProcessing();
|
||||
|
||||
//- Return const-access to the surface film model
|
||||
inline const SurfaceFilmModel<KinematicCloud<CloudType> >&
|
||||
surfaceFilm() const;
|
||||
|
||||
@ -118,6 +118,14 @@ Foam::KinematicCloud<CloudType>::forces() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline typename Foam::KinematicCloud<CloudType>::functionType&
|
||||
Foam::KinematicCloud<CloudType>::functions()
|
||||
{
|
||||
return functions_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::DispersionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::dispersion() const
|
||||
@ -166,14 +174,6 @@ Foam::KinematicCloud<CloudType>::injection()
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline Foam::PostProcessingModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::postProcessing()
|
||||
{
|
||||
return postProcessingModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::surfaceFilm() const
|
||||
|
||||
@ -337,7 +337,7 @@ void Foam::KinematicParcel<ParcelType>::hitFace(TrackData& td)
|
||||
typename TrackData::cloudType::parcelType& p =
|
||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||
|
||||
td.cloud().postProcessing().postFace(p);
|
||||
td.cloud().functions().postFace(p);
|
||||
}
|
||||
|
||||
|
||||
@ -361,7 +361,7 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||
|
||||
// Invoke post-processing model
|
||||
td.cloud().postProcessing().postPatch(p, patchI);
|
||||
td.cloud().functions().postPatch(p, patchI);
|
||||
|
||||
// Invoke surface film model
|
||||
if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
|
||||
|
||||
@ -25,26 +25,28 @@ License
|
||||
|
||||
#include "basicKinematicCollidingCloud.H"
|
||||
|
||||
#include "makeParcelCloudFunctionObjects.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeParcelForces.H"
|
||||
#include "makeParcelDispersionModels.H"
|
||||
#include "makeParcelInjectionModels.H"
|
||||
#include "makeParcelCollisionModels.H"
|
||||
#include "makeParcelPatchInteractionModels.H"
|
||||
#include "makeParcelPostProcessingModels.H"
|
||||
#include "makeParcelSurfaceFilmModels.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeParcelCloudFunctionObjects(basicKinematicCollidingCloud);
|
||||
|
||||
// Kinematic sub-models
|
||||
makeParcelForces(basicKinematicCollidingCloud);
|
||||
makeParcelDispersionModels(basicKinematicCollidingCloud);
|
||||
makeParcelInjectionModels(basicKinematicCollidingCloud);
|
||||
makeParcelCollisionModels(basicKinematicCollidingCloud);
|
||||
makeParcelPatchInteractionModels(basicKinematicCollidingCloud);
|
||||
makeParcelPostProcessingModels(basicKinematicCollidingCloud);
|
||||
makeParcelSurfaceFilmModels(basicKinematicCollidingCloud);
|
||||
}
|
||||
|
||||
|
||||
@ -25,24 +25,26 @@ License
|
||||
|
||||
#include "basicKinematicCloud.H"
|
||||
|
||||
#include "makeParcelCloudFunctionObjects.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeParcelForces.H"
|
||||
#include "makeParcelDispersionModels.H"
|
||||
#include "makeParcelInjectionModels.H"
|
||||
#include "makeParcelPatchInteractionModels.H"
|
||||
#include "makeParcelPostProcessingModels.H"
|
||||
#include "makeParcelSurfaceFilmModels.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeParcelCloudFunctionObjects(basicKinematicCloud);
|
||||
|
||||
// Kinematic sub-models
|
||||
makeParcelForces(basicKinematicCloud);
|
||||
makeParcelDispersionModels(basicKinematicCloud);
|
||||
makeParcelInjectionModels(basicKinematicCloud);
|
||||
makeParcelPatchInteractionModels(basicKinematicCloud);
|
||||
makeParcelPostProcessingModels(basicKinematicCloud);
|
||||
makeParcelSurfaceFilmModels(basicKinematicCloud);
|
||||
}
|
||||
|
||||
|
||||
@ -25,12 +25,13 @@ License
|
||||
|
||||
#include "basicReactingMultiphaseCloud.H"
|
||||
|
||||
#include "makeParcelCloudFunctionObjects.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeThermoParcelForces.H" // thermo variant
|
||||
#include "makeParcelDispersionModels.H"
|
||||
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
|
||||
#include "makeParcelPatchInteractionModels.H"
|
||||
#include "makeParcelPostProcessingModels.H"
|
||||
|
||||
// Thermodynamic
|
||||
#include "makeParcelHeatTransferModels.H"
|
||||
@ -48,12 +49,13 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeParcelCloudFunctionObjects(basicReactingMultiphaseCloud);
|
||||
|
||||
// Kinematic sub-models
|
||||
makeThermoParcelForces(basicReactingMultiphaseCloud);
|
||||
makeParcelDispersionModels(basicReactingMultiphaseCloud);
|
||||
makeReactingMultiphaseParcelInjectionModels(basicReactingMultiphaseCloud);
|
||||
makeParcelPatchInteractionModels(basicReactingMultiphaseCloud);
|
||||
makeParcelPostProcessingModels(basicReactingMultiphaseCloud);
|
||||
|
||||
// Thermo sub-models
|
||||
makeParcelHeatTransferModels(basicReactingMultiphaseCloud);
|
||||
|
||||
@ -25,12 +25,13 @@ License
|
||||
|
||||
#include "basicReactingCloud.H"
|
||||
|
||||
#include "makeParcelCloudFunctionObjects.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeThermoParcelForces.H" // thermo variant
|
||||
#include "makeParcelDispersionModels.H"
|
||||
#include "makeReactingParcelInjectionModels.H" // Reacting variant
|
||||
#include "makeParcelPatchInteractionModels.H"
|
||||
#include "makeParcelPostProcessingModels.H"
|
||||
|
||||
// Thermodynamic
|
||||
#include "makeParcelHeatTransferModels.H"
|
||||
@ -47,12 +48,13 @@ namespace Foam
|
||||
typedef basicReactingCloud::thermoCloudType thermoCloudType2;
|
||||
typedef basicReactingCloud::kinematicCloudType kinematicCloudType2;
|
||||
|
||||
makeParcelCloudFunctionObjects(basicReactingCloud);
|
||||
|
||||
// Kinematic sub-models
|
||||
makeThermoParcelForces(basicReactingCloud);
|
||||
makeParcelDispersionModels(basicReactingCloud);
|
||||
makeReactingParcelInjectionModels(basicReactingCloud);
|
||||
makeParcelPatchInteractionModels(basicReactingCloud);
|
||||
makeParcelPostProcessingModels(basicReactingCloud);
|
||||
|
||||
// Thermo sub-models
|
||||
makeParcelHeatTransferModels(basicReactingCloud);
|
||||
|
||||
@ -25,12 +25,13 @@ License
|
||||
|
||||
#include "basicThermoCloud.H"
|
||||
|
||||
#include "makeParcelCloudFunctionObjects.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeThermoParcelForces.H" // thermo variant
|
||||
#include "makeParcelDispersionModels.H"
|
||||
#include "makeParcelInjectionModels.H"
|
||||
#include "makeParcelPatchInteractionModels.H"
|
||||
#include "makeParcelPostProcessingModels.H"
|
||||
|
||||
// Thermodynamic
|
||||
#include "makeParcelHeatTransferModels.H"
|
||||
@ -40,12 +41,13 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeParcelCloudFunctionObjects(basicThermoCloud);
|
||||
|
||||
// Kinematic sub-models
|
||||
makeThermoParcelForces(basicThermoCloud);
|
||||
makeParcelDispersionModels(basicThermoCloud);
|
||||
makeParcelInjectionModels(basicThermoCloud);
|
||||
makeParcelPatchInteractionModels(basicThermoCloud);
|
||||
makeParcelPostProcessingModels(basicThermoCloud);
|
||||
|
||||
// Thermo sub-models
|
||||
makeParcelHeatTransferModels(basicThermoCloud);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,24 +23,22 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef makeParcelPostProcessingModels_H
|
||||
#define makeParcelPostProcessingModels_H
|
||||
#ifndef makeParcelCloudFunctionObjects_H
|
||||
#define makeParcelCloudFunctionObjects_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "NoPostProcessing.H"
|
||||
#include "ParticleTracks.H"
|
||||
#include "PatchPostProcessing.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makeParcelPostProcessingModels(CloudType) \
|
||||
#define makeParcelCloudFunctionObjects(CloudType) \
|
||||
\
|
||||
makePostProcessingModel(CloudType); \
|
||||
makeCloudFunctionObject(CloudType); \
|
||||
\
|
||||
makePostProcessingModelType(NoPostProcessing, CloudType); \
|
||||
makePostProcessingModelType(ParticleTracks, CloudType); \
|
||||
makePostProcessingModelType(PatchPostProcessing, CloudType);
|
||||
makeCloudFunctionObjectType(ParticleTracks, CloudType); \
|
||||
makeCloudFunctionObjectType(PatchPostProcessing, CloudType);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,42 +23,42 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PostProcessingModel.H"
|
||||
#include "CloudFunctionObject.H"
|
||||
|
||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::PostProcessingModel<CloudType>::write()
|
||||
void Foam::CloudFunctionObject<CloudType>::write()
|
||||
{
|
||||
notImplemented("void Foam::PostProcessingModel<CloudType>::write()");
|
||||
notImplemented("void Foam::CloudFunctionObject<CloudType>::write()");
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::PostProcessingModel<CloudType>::PostProcessingModel(CloudType& owner)
|
||||
Foam::CloudFunctionObject<CloudType>::CloudFunctionObject(CloudType& owner)
|
||||
:
|
||||
SubModelBase<CloudType>(owner)
|
||||
{}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::PostProcessingModel<CloudType>::PostProcessingModel
|
||||
Foam::CloudFunctionObject<CloudType>::CloudFunctionObject
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
:
|
||||
SubModelBase<CloudType>(owner, dict, type)
|
||||
SubModelBase<CloudType>(owner, dict, type, "")
|
||||
{}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::PostProcessingModel<CloudType>::PostProcessingModel
|
||||
Foam::CloudFunctionObject<CloudType>::CloudFunctionObject
|
||||
(
|
||||
const PostProcessingModel<CloudType>& ppm
|
||||
const CloudFunctionObject<CloudType>& ppm
|
||||
)
|
||||
:
|
||||
SubModelBase<CloudType>(ppm)
|
||||
@ -68,14 +68,14 @@ Foam::PostProcessingModel<CloudType>::PostProcessingModel
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::PostProcessingModel<CloudType>::~PostProcessingModel()
|
||||
Foam::CloudFunctionObject<CloudType>::~CloudFunctionObject()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::PostProcessingModel<CloudType>::post()
|
||||
void Foam::CloudFunctionObject<CloudType>::postEvolve()
|
||||
{
|
||||
if (this->owner().time().outputTime())
|
||||
{
|
||||
@ -85,7 +85,7 @@ void Foam::PostProcessingModel<CloudType>::post()
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::PostProcessingModel<CloudType>::postPatch
|
||||
void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||
(
|
||||
const typename CloudType::parcelType&,
|
||||
const label
|
||||
@ -93,7 +93,7 @@ void Foam::PostProcessingModel<CloudType>::postPatch
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"void Foam::PostProcessingModel<CloudType>::postPatch"
|
||||
"void Foam::CloudFunctionObject<CloudType>::postPatch"
|
||||
"("
|
||||
"const typename CloudType::parcelType&,"
|
||||
"const label"
|
||||
@ -103,14 +103,14 @@ void Foam::PostProcessingModel<CloudType>::postPatch
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::PostProcessingModel<CloudType>::postFace
|
||||
void Foam::CloudFunctionObject<CloudType>::postFace
|
||||
(
|
||||
const typename CloudType::parcelType&
|
||||
)
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"void Foam::PostProcessingModel<CloudType>::postFace"
|
||||
"void Foam::CloudFunctionObject<CloudType>::postFace"
|
||||
"("
|
||||
"const typename CloudType::parcelType&"
|
||||
")"
|
||||
@ -120,6 +120,6 @@ void Foam::PostProcessingModel<CloudType>::postFace
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "PostProcessingModelNew.C"
|
||||
#include "CloudFunctionObjectNew.C"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,19 +22,19 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::PostProcessingModel
|
||||
Foam::CloudFunctionObject
|
||||
|
||||
Description
|
||||
Templated post-processing model class
|
||||
Templated cloud function object base class
|
||||
|
||||
SourceFiles
|
||||
PostProcessingModel.C
|
||||
PostProcessingModelNew.C
|
||||
CloudFunctionObject.C
|
||||
CloudFunctionObjectNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef PostProcessingModel_H
|
||||
#define PostProcessingModel_H
|
||||
#ifndef CloudFunctionObject_H
|
||||
#define CloudFunctionObject_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "autoPtr.H"
|
||||
@ -47,11 +47,11 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class PostProcessingModel Declaration
|
||||
Class CloudFunctionObject Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
class PostProcessingModel
|
||||
class CloudFunctionObject
|
||||
:
|
||||
public SubModelBase<CloudType>
|
||||
{
|
||||
@ -70,7 +70,7 @@ public:
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
PostProcessingModel,
|
||||
CloudFunctionObject,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict,
|
||||
@ -83,38 +83,39 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null from owner
|
||||
PostProcessingModel(CloudType& owner);
|
||||
CloudFunctionObject(CloudType& owner);
|
||||
|
||||
//- Construct from dictionary
|
||||
PostProcessingModel
|
||||
CloudFunctionObject
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
const word& modelType
|
||||
);
|
||||
|
||||
//- Construct copy
|
||||
PostProcessingModel(const PostProcessingModel<CloudType>& ppm);
|
||||
CloudFunctionObject(const CloudFunctionObject<CloudType>& ppm);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<PostProcessingModel<CloudType> > clone() const
|
||||
virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
|
||||
{
|
||||
return autoPtr<PostProcessingModel<CloudType> >
|
||||
return autoPtr<CloudFunctionObject<CloudType> >
|
||||
(
|
||||
new PostProcessingModel<CloudType>(*this)
|
||||
new CloudFunctionObject<CloudType>(*this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~PostProcessingModel();
|
||||
virtual ~CloudFunctionObject();
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<PostProcessingModel<CloudType> > New
|
||||
static autoPtr<CloudFunctionObject<CloudType> > New
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& modelType
|
||||
);
|
||||
|
||||
|
||||
@ -122,17 +123,17 @@ public:
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Main post-processing function
|
||||
virtual void post();
|
||||
//- Post-evolve hook
|
||||
virtual void postEvolve();
|
||||
|
||||
//- Gather post-processing info on patch
|
||||
//- Post-patch hook
|
||||
virtual void postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label patchI
|
||||
);
|
||||
|
||||
//- Gather post-processing info on a face
|
||||
//- Post-face hook
|
||||
virtual void postFace(const typename CloudType::parcelType& p);
|
||||
};
|
||||
|
||||
@ -143,27 +144,27 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makePostProcessingModel(CloudType) \
|
||||
#define makeCloudFunctionObject(CloudType) \
|
||||
\
|
||||
typedef CloudType::kinematicCloudType kinematicCloudType; \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
PostProcessingModel<kinematicCloudType>, \
|
||||
CloudFunctionObject<kinematicCloudType>, \
|
||||
0 \
|
||||
); \
|
||||
defineTemplateRunTimeSelectionTable \
|
||||
( \
|
||||
PostProcessingModel<kinematicCloudType>, \
|
||||
CloudFunctionObject<kinematicCloudType>, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
#define makePostProcessingModelType(SS, CloudType) \
|
||||
#define makeCloudFunctionObjectType(SS, CloudType) \
|
||||
\
|
||||
typedef CloudType::kinematicCloudType kinematicCloudType; \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<kinematicCloudType>, 0); \
|
||||
\
|
||||
PostProcessingModel<kinematicCloudType>:: \
|
||||
CloudFunctionObject<kinematicCloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<kinematicCloudType> > \
|
||||
add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
|
||||
|
||||
@ -171,7 +172,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "PostProcessingModel.C"
|
||||
# include "CloudFunctionObject.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,21 +23,20 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PostProcessingModel.H"
|
||||
#include "CloudFunctionObject.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::autoPtr<Foam::PostProcessingModel<CloudType> >
|
||||
Foam::PostProcessingModel<CloudType>::New
|
||||
Foam::autoPtr<Foam::CloudFunctionObject<CloudType> >
|
||||
Foam::CloudFunctionObject<CloudType>::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
CloudType& owner,
|
||||
const word& modelType
|
||||
)
|
||||
{
|
||||
const word modelType(dict.lookup("postProcessingModel"));
|
||||
|
||||
Info<< "Selecting post-processing model " << modelType << endl;
|
||||
Info<< " Selecting cloud function " << modelType << endl;
|
||||
|
||||
typename dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
@ -46,19 +45,19 @@ Foam::PostProcessingModel<CloudType>::New
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"PostProcessingModel<CloudType>::New"
|
||||
"CloudFunctionObject<CloudType>::New"
|
||||
"("
|
||||
"const dictionary&, "
|
||||
"CloudType&"
|
||||
")"
|
||||
) << "Unknown post-processing model type "
|
||||
) << "Unknown cloud function type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid post-processing model types are:" << nl
|
||||
<< "Valid cloud function types are:" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<PostProcessingModel<CloudType> >(cstrIter()(dict, owner));
|
||||
return autoPtr<CloudFunctionObject<CloudType> >(cstrIter()(dict, owner));
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,147 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "CloudFunctionObjectList.H"
|
||||
#include "entry.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::CloudFunctionObjectList<CloudType>::CloudFunctionObjectList
|
||||
(
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
PtrList<CloudFunctionObject<CloudType> >(),
|
||||
owner_(owner),
|
||||
dict_(dictionary::null)
|
||||
{}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::CloudFunctionObjectList<CloudType>::CloudFunctionObjectList
|
||||
(
|
||||
CloudType& owner,
|
||||
const dictionary& dict,
|
||||
const bool readFields
|
||||
)
|
||||
:
|
||||
PtrList<CloudFunctionObject<CloudType> >(),
|
||||
owner_(owner),
|
||||
dict_(dict)
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
wordList modelNames(dict.toc());
|
||||
|
||||
Info<< "Constructing cloud functions" << endl;
|
||||
|
||||
if (modelNames.size() > 0)
|
||||
{
|
||||
this->setSize(modelNames.size());
|
||||
|
||||
forAll(modelNames, i)
|
||||
{
|
||||
const word& modelName = modelNames[i];
|
||||
|
||||
this->set
|
||||
(
|
||||
i,
|
||||
CloudFunctionObject<CloudType>::New
|
||||
(
|
||||
dict,
|
||||
owner,
|
||||
modelName
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " none" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::CloudFunctionObjectList<CloudType>::CloudFunctionObjectList
|
||||
(
|
||||
const CloudFunctionObjectList& ppm
|
||||
)
|
||||
:
|
||||
PtrList<CloudFunctionObject<CloudType> >(ppm),
|
||||
owner_(ppm.owner_),
|
||||
dict_(ppm.dict_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::CloudFunctionObjectList<CloudType>::~CloudFunctionObjectList()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postEvolve()
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postEvolve();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label patchI
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postPatch(p, patchI);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postFace
|
||||
(
|
||||
const typename CloudType::parcelType& p
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postFace(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,20 +22,22 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::NoPostProcessing
|
||||
Foam::CloudFunctionObjectList
|
||||
|
||||
Description
|
||||
Place holder for 'none' option
|
||||
List of cloud function objects
|
||||
|
||||
SourceFiles
|
||||
NoPostProcessing.C
|
||||
CloudFunctionObjectListI.H
|
||||
CloudFunctionObjectList.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef NoPostProcessing_H
|
||||
#define NoPostProcessing_H
|
||||
#ifndef CloudFunctionObjectList_H
|
||||
#define CloudFunctionObjectList_H
|
||||
|
||||
#include "PostProcessingModel.H"
|
||||
#include "PtrList.H"
|
||||
#include "CloudFunctionObject.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -43,65 +45,75 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class NoPostProcessing Declaration
|
||||
Class CloudFunctionObjectList Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
class NoPostProcessing
|
||||
class CloudFunctionObjectList
|
||||
:
|
||||
public PostProcessingModel<CloudType>
|
||||
public PtrList<CloudFunctionObject<CloudType> >
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
// Protected Data
|
||||
|
||||
//- Write post-processing info
|
||||
void write();
|
||||
//- Reference to the owner cloud
|
||||
const CloudType& owner_;
|
||||
|
||||
//- Dictionary
|
||||
const dictionary dict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("none");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
NoPostProcessing(const dictionary&, CloudType&);
|
||||
//- Null constructor
|
||||
CloudFunctionObjectList(CloudType& owner);
|
||||
|
||||
//- Construct from mesh
|
||||
CloudFunctionObjectList
|
||||
(
|
||||
CloudType& owner,
|
||||
const dictionary& dict,
|
||||
const bool readFields
|
||||
);
|
||||
|
||||
//- Construct copy
|
||||
NoPostProcessing(const NoPostProcessing<CloudType>& ppm);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<PostProcessingModel<CloudType> > clone() const
|
||||
{
|
||||
return autoPtr<PostProcessingModel<CloudType> >
|
||||
(
|
||||
new NoPostProcessing<CloudType>(*this)
|
||||
);
|
||||
}
|
||||
CloudFunctionObjectList(const CloudFunctionObjectList& ppml);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~NoPostProcessing();
|
||||
virtual ~CloudFunctionObjectList();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to the cloud owner
|
||||
inline const CloudType& owner() const;
|
||||
|
||||
//- Return refernce to the cloud owner
|
||||
inline CloudType& owner();
|
||||
|
||||
//- Return the forces dictionary
|
||||
inline const dictionary& dict() const;
|
||||
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Flag to indicate whether model activates post-processing model
|
||||
virtual bool active() const;
|
||||
//- Post-evolve hook
|
||||
virtual void postEvolve();
|
||||
|
||||
//- Gather post-processing info on patch
|
||||
//- Post-patch hook
|
||||
virtual void postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label patchI
|
||||
);
|
||||
|
||||
//- Gather particle data when hit face
|
||||
//- Post-face hook
|
||||
virtual void postFace(const typename CloudType::parcelType& p);
|
||||
};
|
||||
|
||||
@ -112,8 +124,10 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "CloudFunctionObjectListI.H"
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "NoPostProcessing.C"
|
||||
#include "CloudFunctionObjectList.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -0,0 +1,48 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
inline const CloudType& Foam::CloudFunctionObjectList<CloudType>::owner() const
|
||||
{
|
||||
return owner_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline CloudType& Foam::CloudFunctionObjectList<CloudType>::owner()
|
||||
{
|
||||
return owner_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::dictionary&
|
||||
Foam::CloudFunctionObjectList<CloudType>::dict() const
|
||||
{
|
||||
return dict_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -62,7 +62,7 @@ Foam::ParticleTracks<CloudType>::ParticleTracks
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
PostProcessingModel<CloudType>(dict, owner, typeName),
|
||||
CloudFunctionObject<CloudType>(dict, owner, typeName),
|
||||
trackInterval_(readLabel(this->coeffDict().lookup("trackInterval"))),
|
||||
maxSamples_(readLabel(this->coeffDict().lookup("maxSamples"))),
|
||||
resetOnWrite_(this->coeffDict().lookup("resetOnWrite")),
|
||||
@ -77,7 +77,7 @@ Foam::ParticleTracks<CloudType>::ParticleTracks
|
||||
const ParticleTracks<CloudType>& ppm
|
||||
)
|
||||
:
|
||||
PostProcessingModel<CloudType>(ppm),
|
||||
CloudFunctionObject<CloudType>(ppm),
|
||||
trackInterval_(ppm.trackInterval_),
|
||||
maxSamples_(ppm.maxSamples_),
|
||||
resetOnWrite_(ppm.resetOnWrite_),
|
||||
@ -35,7 +35,7 @@ SourceFiles
|
||||
#ifndef ParticleTracks_H
|
||||
#define ParticleTracks_H
|
||||
|
||||
#include "PostProcessingModel.H"
|
||||
#include "CloudFunctionObject.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -49,7 +49,7 @@ namespace Foam
|
||||
template<class CloudType>
|
||||
class ParticleTracks
|
||||
:
|
||||
public PostProcessingModel<CloudType>
|
||||
public CloudFunctionObject<CloudType>
|
||||
{
|
||||
// Private data
|
||||
|
||||
@ -101,9 +101,9 @@ public:
|
||||
ParticleTracks(const ParticleTracks<CloudType>& ppm);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<PostProcessingModel<CloudType> > clone() const
|
||||
virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
|
||||
{
|
||||
return autoPtr<PostProcessingModel<CloudType> >
|
||||
return autoPtr<CloudFunctionObject<CloudType> >
|
||||
(
|
||||
new ParticleTracks<CloudType>(*this)
|
||||
);
|
||||
@ -136,10 +136,10 @@ public:
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Gather post-processing info on patch - not used
|
||||
//- Post-patch hook
|
||||
virtual void postPatch(const parcelType& p, const label patchI);
|
||||
|
||||
//- Gather particle data when hit face
|
||||
//- Post-face hook
|
||||
virtual void postFace(const parcelType& p);
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -125,7 +125,7 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
PostProcessingModel<CloudType>(dict, owner, typeName),
|
||||
CloudFunctionObject<CloudType>(dict, owner, typeName),
|
||||
maxStoredParcels_(readScalar(this->coeffDict().lookup("maxStoredParcels"))),
|
||||
patchIDs_(),
|
||||
patchData_()
|
||||
@ -176,7 +176,7 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing
|
||||
const PatchPostProcessing<CloudType>& ppm
|
||||
)
|
||||
:
|
||||
PostProcessingModel<CloudType>(ppm),
|
||||
CloudFunctionObject<CloudType>(ppm),
|
||||
maxStoredParcels_(ppm.maxStoredParcels_),
|
||||
patchIDs_(ppm.patchIDs_),
|
||||
patchData_(ppm.patchData_)
|
||||
@ -35,7 +35,7 @@ SourceFiles
|
||||
#ifndef PatchPostProcessing_H
|
||||
#define PatchPostProcessing_H
|
||||
|
||||
#include "PostProcessingModel.H"
|
||||
#include "CloudFunctionObject.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -49,7 +49,7 @@ namespace Foam
|
||||
template<class CloudType>
|
||||
class PatchPostProcessing
|
||||
:
|
||||
public PostProcessingModel<CloudType>
|
||||
public CloudFunctionObject<CloudType>
|
||||
{
|
||||
// Private data
|
||||
|
||||
@ -94,9 +94,9 @@ public:
|
||||
PatchPostProcessing(const PatchPostProcessing<CloudType>& ppm);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<PostProcessingModel<CloudType> > clone() const
|
||||
virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
|
||||
{
|
||||
return autoPtr<PostProcessingModel<CloudType> >
|
||||
return autoPtr<CloudFunctionObject<CloudType> >
|
||||
(
|
||||
new PatchPostProcessing<CloudType>(*this)
|
||||
);
|
||||
@ -120,10 +120,10 @@ public:
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Gather post-processing info on patch
|
||||
//- Post-patch hook
|
||||
virtual void postPatch(const parcelType& p, const label patchI);
|
||||
|
||||
//- Gather particle data when hit face - not used
|
||||
//- Post-face hook
|
||||
virtual void postFace(const parcelType& p);
|
||||
};
|
||||
|
||||
@ -1,97 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "NoPostProcessing.H"
|
||||
|
||||
// * * * * * * * * * * * * * protected Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::NoPostProcessing<CloudType>::write()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::NoPostProcessing<CloudType>::NoPostProcessing
|
||||
(
|
||||
const dictionary&,
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
PostProcessingModel<CloudType>(owner)
|
||||
{}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::NoPostProcessing<CloudType>::NoPostProcessing
|
||||
(
|
||||
const NoPostProcessing<CloudType>& ppm
|
||||
)
|
||||
:
|
||||
PostProcessingModel<CloudType>(ppm.owner_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::NoPostProcessing<CloudType>::~NoPostProcessing()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::NoPostProcessing<CloudType>::active() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::NoPostProcessing<CloudType>::postPatch
|
||||
(
|
||||
const typename CloudType::parcelType&,
|
||||
const label
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::NoPostProcessing<CloudType>::postFace
|
||||
(
|
||||
const typename CloudType::parcelType&
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,12 +41,13 @@ Foam::SubModelBase<CloudType>::SubModelBase
|
||||
(
|
||||
CloudType& owner,
|
||||
const dictionary& dict,
|
||||
const word& name
|
||||
const word& name,
|
||||
const word& dictExt
|
||||
)
|
||||
:
|
||||
owner_(owner),
|
||||
dict_(dict),
|
||||
coeffDict_(dict.subDict(name + "Coeffs"))
|
||||
coeffDict_(dict.subDict(name + dictExt))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -80,7 +80,8 @@ public:
|
||||
(
|
||||
CloudType& owner,
|
||||
const dictionary& dict,
|
||||
const word& name
|
||||
const word& name,
|
||||
const word& dictExt = "Coeffs"
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
|
||||
Reference in New Issue
Block a user