/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 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 "calculatedFvPatchField.H"
#include "fvPatchFieldMapper.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
Foam::calculatedFvPatchField::calculatedFvPatchField
(
const fvPatch& p,
const DimensionedField& iF
)
:
fvPatchField(p, iF)
{}
template
Foam::calculatedFvPatchField::calculatedFvPatchField
(
const fvPatch& p,
const DimensionedField& iF,
const dictionary& dict,
IOobjectOption::readOption requireValue
)
:
fvPatchField(p, iF, dict, requireValue)
{}
template
Foam::calculatedFvPatchField::calculatedFvPatchField
(
const calculatedFvPatchField& ptf,
const fvPatch& p,
const DimensionedField& iF,
const fvPatchFieldMapper& mapper
)
:
fvPatchField(ptf, p, iF, mapper)
{}
template
Foam::calculatedFvPatchField::calculatedFvPatchField
(
const calculatedFvPatchField& ptf
)
:
fvPatchField(ptf)
{}
template
Foam::calculatedFvPatchField::calculatedFvPatchField
(
const calculatedFvPatchField& ptf,
const DimensionedField& iF
)
:
fvPatchField(ptf, iF)
{}
template
Foam::tmp>
Foam::fvPatchField::NewCalculatedType
(
const fvPatch& p
)
{
auto* patchTypeCtor = patchConstructorTable(p.type());
if (patchTypeCtor)
{
return patchTypeCtor
(
p,
DimensionedField::null()
);
}
else
{
return tmp>
(
new calculatedFvPatchField
(
p,
DimensionedField::null()
)
);
}
}
template
template
Foam::tmp>
Foam::fvPatchField::NewCalculatedType
(
const fvPatchField& pf
)
{
return NewCalculatedType(pf.patch());
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
Foam::tmp>
Foam::calculatedFvPatchField::valueInternalCoeffs
(
const tmp&
) const
{
FatalErrorInFunction
<< "cannot be called for a calculatedFvPatchField"
<< "\n on patch " << this->patch().name()
<< " of field " << this->internalField().name()
<< " in file " << this->internalField().objectPath()
<< "\n You are probably trying to solve for a field with a "
"default boundary condition."
<< abort(FatalError);
return *this;
}
template
Foam::tmp>
Foam::calculatedFvPatchField::valueBoundaryCoeffs
(
const tmp&
) const
{
FatalErrorInFunction
<< "cannot be called for a calculatedFvPatchField"
<< "\n on patch " << this->patch().name()
<< " of field " << this->internalField().name()
<< " in file " << this->internalField().objectPath()
<< "\n You are probably trying to solve for a field with a "
"default boundary condition."
<< abort(FatalError);
return *this;
}
template
Foam::tmp>
Foam::calculatedFvPatchField::gradientInternalCoeffs() const
{
FatalErrorInFunction
<< "cannot be called for a calculatedFvPatchField"
<< "\n on patch " << this->patch().name()
<< " of field " << this->internalField().name()
<< " in file " << this->internalField().objectPath()
<< "\n You are probably trying to solve for a field with a "
"default boundary condition."
<< abort(FatalError);
return *this;
}
template
Foam::tmp>
Foam::calculatedFvPatchField::gradientBoundaryCoeffs() const
{
FatalErrorInFunction
<< "cannot be called for a calculatedFvPatchField"
<< "\n on patch " << this->patch().name()
<< " of field " << this->internalField().name()
<< " in file " << this->internalField().objectPath()
<< "\n You are probably trying to solve for a field with a "
"default boundary condition."
<< abort(FatalError);
return *this;
}
template
void Foam::calculatedFvPatchField::write(Ostream& os) const
{
fvPatchField::write(os);
fvPatchField::writeValueEntry(os);
}
// ************************************************************************* //