COMP: temperatureCoupledBase: make API consistent. Fixes #2287.
This commit is contained in:
parent
29f7fcc515
commit
f5f93e81d8
@ -170,7 +170,7 @@ Foam::temperatureCoupledBase::temperatureCoupledBase
|
||||
|
||||
void Foam::temperatureCoupledBase::autoMap
|
||||
(
|
||||
const FieldMapper& mapper
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
{
|
||||
if (kappaFunction1_)
|
||||
@ -186,17 +186,22 @@ void Foam::temperatureCoupledBase::autoMap
|
||||
|
||||
void Foam::temperatureCoupledBase::rmap
|
||||
(
|
||||
const temperatureCoupledBase& ptf,
|
||||
const fvPatchField<scalar>& ptf,
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
if (kappaFunction1_)
|
||||
const auto* tcb = isA<temperatureCoupledBase>(ptf);
|
||||
|
||||
if (tcb)
|
||||
{
|
||||
kappaFunction1_().rmap(ptf.kappaFunction1_(), addr);
|
||||
}
|
||||
if (alphaFunction1_)
|
||||
{
|
||||
alphaFunction1_().rmap(ptf.alphaFunction1_(), addr);
|
||||
if (kappaFunction1_)
|
||||
{
|
||||
kappaFunction1_().rmap(tcb->kappaFunction1_(), addr);
|
||||
}
|
||||
if (alphaFunction1_)
|
||||
{
|
||||
alphaFunction1_().rmap(tcb->alphaFunction1_(), addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,7 @@ SourceFiles
|
||||
#include "Enum.H"
|
||||
#include "fvPatch.H"
|
||||
#include "PatchFunction1.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -204,15 +205,15 @@ public:
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
virtual void autoMap
|
||||
(
|
||||
const FieldMapper&
|
||||
);
|
||||
const fvPatchFieldMapper&
|
||||
) = 0;
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
virtual void rmap
|
||||
(
|
||||
const temperatureCoupledBase&,
|
||||
const fvPatchField<scalar>&,
|
||||
const labelList&
|
||||
);
|
||||
) = 0;
|
||||
|
||||
//- Given patch temperature calculate corresponding K field
|
||||
virtual tmp<scalarField> kappa(const scalarField& Tp) const;
|
||||
|
@ -164,6 +164,28 @@ public:
|
||||
|
||||
// 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
|
||||
|
||||
//- Add explicit contribution to compressible momentum equation
|
||||
|
Loading…
Reference in New Issue
Block a user