mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: temperatureCoupledBase: make API consistent. Fixes #2287.
This commit is contained in:
@ -170,7 +170,7 @@ Foam::temperatureCoupledBase::temperatureCoupledBase
|
|||||||
|
|
||||||
void Foam::temperatureCoupledBase::autoMap
|
void Foam::temperatureCoupledBase::autoMap
|
||||||
(
|
(
|
||||||
const FieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (kappaFunction1_)
|
if (kappaFunction1_)
|
||||||
@ -186,17 +186,22 @@ void Foam::temperatureCoupledBase::autoMap
|
|||||||
|
|
||||||
void Foam::temperatureCoupledBase::rmap
|
void Foam::temperatureCoupledBase::rmap
|
||||||
(
|
(
|
||||||
const temperatureCoupledBase& ptf,
|
const fvPatchField<scalar>& ptf,
|
||||||
const labelList& addr
|
const labelList& addr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (kappaFunction1_)
|
const auto* tcb = isA<temperatureCoupledBase>(ptf);
|
||||||
|
|
||||||
|
if (tcb)
|
||||||
{
|
{
|
||||||
kappaFunction1_().rmap(ptf.kappaFunction1_(), addr);
|
if (kappaFunction1_)
|
||||||
}
|
{
|
||||||
if (alphaFunction1_)
|
kappaFunction1_().rmap(tcb->kappaFunction1_(), addr);
|
||||||
{
|
}
|
||||||
alphaFunction1_().rmap(ptf.alphaFunction1_(), addr);
|
if (alphaFunction1_)
|
||||||
|
{
|
||||||
|
alphaFunction1_().rmap(tcb->alphaFunction1_(), addr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -87,6 +87,7 @@ SourceFiles
|
|||||||
#include "Enum.H"
|
#include "Enum.H"
|
||||||
#include "fvPatch.H"
|
#include "fvPatch.H"
|
||||||
#include "PatchFunction1.H"
|
#include "PatchFunction1.H"
|
||||||
|
#include "fvPatchFieldMapper.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -204,15 +205,15 @@ public:
|
|||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
virtual void autoMap
|
virtual void autoMap
|
||||||
(
|
(
|
||||||
const FieldMapper&
|
const fvPatchFieldMapper&
|
||||||
);
|
) = 0;
|
||||||
|
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||||
virtual void rmap
|
virtual void rmap
|
||||||
(
|
(
|
||||||
const temperatureCoupledBase&,
|
const fvPatchField<scalar>&,
|
||||||
const labelList&
|
const labelList&
|
||||||
);
|
) = 0;
|
||||||
|
|
||||||
//- Given patch temperature calculate corresponding K field
|
//- Given patch temperature calculate corresponding K field
|
||||||
virtual tmp<scalarField> kappa(const scalarField& Tp) const;
|
virtual tmp<scalarField> kappa(const scalarField& Tp) const;
|
||||||
|
|||||||
@ -164,6 +164,28 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
// Mapping functions
|
||||||
|
|
||||||
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
|
virtual void autoMap
|
||||||
|
(
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
{
|
||||||
|
temperatureCoupledBase::autoMap(mapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||||
|
virtual void rmap
|
||||||
|
(
|
||||||
|
const fvPatchField<scalar>& fld,
|
||||||
|
const labelList& map
|
||||||
|
)
|
||||||
|
{
|
||||||
|
temperatureCoupledBase::rmap(fld, map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Evaluation
|
// Evaluation
|
||||||
|
|
||||||
//- Add explicit contribution to compressible momentum equation
|
//- Add explicit contribution to compressible momentum equation
|
||||||
|
|||||||
Reference in New Issue
Block a user