/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ 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 .
\*---------------------------------------------------------------------------*/
#include "CloudFunctionObject.H"
#include "writeFile.H"
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
template
void Foam::CloudFunctionObject::write()
{
NotImplemented;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
Foam::CloudFunctionObject::CloudFunctionObject(CloudType& owner)
:
CloudSubModelBase(owner),
outputDir_()
{}
template
Foam::CloudFunctionObject::CloudFunctionObject
(
const dictionary& dict,
CloudType& owner,
const word& modelName,
const word& objectType
)
:
CloudSubModelBase(modelName, owner, dict, typeName, objectType),
outputDir_()
{
const fileName relPath =
functionObjects::writeFile::outputPrefix
/lagrangian::cloud::prefix
/owner.name()
/this->modelName();
outputDir_ = owner.mesh().time().globalPath()/relPath;
}
template
Foam::CloudFunctionObject::CloudFunctionObject
(
const CloudFunctionObject& ppm
)
:
CloudSubModelBase(ppm),
outputDir_(ppm.outputDir_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template
Foam::CloudFunctionObject::~CloudFunctionObject()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
void Foam::CloudFunctionObject::preEvolve()
{}
template
void Foam::CloudFunctionObject::postEvolve()
{
if (this->owner().time().writeTime())
{
this->write();
}
}
template
void Foam::CloudFunctionObject::postMove
(
typename CloudType::parcelType&,
const scalar,
const point&,
bool&
)
{}
template
void Foam::CloudFunctionObject::postPatch
(
const typename CloudType::parcelType&,
const polyPatch&
)
{}
template
void Foam::CloudFunctionObject::preFace
(
const typename CloudType::parcelType&
)
{}
template
void Foam::CloudFunctionObject::postFace
(
const typename CloudType::parcelType&
)
{}
template
const Foam::fileName& Foam::CloudFunctionObject::outputDir() const
{
return outputDir_;
}
template
Foam::fileName Foam::CloudFunctionObject::writeTimeDir() const
{
return outputDir_/this->owner().time().name();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "CloudFunctionObjectNew.C"
// ************************************************************************* //