/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2017 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
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 "uniformJumpAMIFvPatchField.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
Foam::uniformJumpAMIFvPatchField::uniformJumpAMIFvPatchField
(
const fvPatch& p,
const DimensionedField& iF
)
:
fixedJumpAMIFvPatchField(p, iF),
jumpTable_()
{}
template
Foam::uniformJumpAMIFvPatchField::uniformJumpAMIFvPatchField
(
const uniformJumpAMIFvPatchField& ptf,
const fvPatch& p,
const DimensionedField& iF,
const fvPatchFieldMapper& mapper
)
:
fixedJumpAMIFvPatchField(ptf, p, iF, mapper),
jumpTable_(ptf.jumpTable_.clone())
{}
template
Foam::uniformJumpAMIFvPatchField::uniformJumpAMIFvPatchField
(
const fvPatch& p,
const DimensionedField& iF,
const dictionary& dict
)
:
fixedJumpAMIFvPatchField(p, iF),
jumpTable_()
{
if (this->cyclicAMIPatch().owner())
{
jumpTable_ = Function1::New("jumpTable", dict, &this->db());
}
if (!this->readValueEntry(dict))
{
this->evaluate(Pstream::commsTypes::buffered);
}
}
template
Foam::uniformJumpAMIFvPatchField::uniformJumpAMIFvPatchField
(
const uniformJumpAMIFvPatchField& ptf
)
:
fixedJumpAMIFvPatchField(ptf),
jumpTable_(ptf.jumpTable_.clone())
{}
template
Foam::uniformJumpAMIFvPatchField::uniformJumpAMIFvPatchField
(
const uniformJumpAMIFvPatchField& ptf,
const DimensionedField& iF
)
:
fixedJumpAMIFvPatchField(ptf, iF),
jumpTable_(ptf.jumpTable_.clone())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
void Foam::uniformJumpAMIFvPatchField::updateCoeffs()
{
if (this->updated())
{
return;
}
if (this->cyclicAMIPatch().owner())
{
this->jump_ = jumpTable_->value(this->db().time().value());
}
fixedJumpAMIFvPatchField::updateCoeffs();
}
template
void Foam::uniformJumpAMIFvPatchField::write(Ostream& os) const
{
fixedJumpAMIFvPatchField::write(os);
if (this->cyclicAMIPatch().owner())
{
jumpTable_->writeData(os);
}
}
// ************************************************************************* //