Skip to content
Snippets Groups Projects
Commit 9b8656de authored by mattijs's avatar mattijs
Browse files

ENH: coupling BC: allow Function1. See #2277.

autoMap,rmap for derived classes
parent bb406ea8
1 merge request!507ENH: coupling BC: allow Function1. Fixes #2277.
Showing
with 93 additions and 38 deletions
......@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2019,2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -131,6 +131,7 @@ void Foam::radiation::fixedIncidentRadiationFvPatchScalarField::autoMap
)
{
fixedGradientFvPatchScalarField::autoMap(m);
temperatureCoupledBase::autoMap(m);
qrIncident_.autoMap(m);
}
......@@ -149,6 +150,7 @@ void Foam::radiation::fixedIncidentRadiationFvPatchScalarField::rmap
psf
);
temperatureCoupledBase::rmap(thftpsf, addr);
qrIncident_.rmap(thftpsf.qrIncident_, addr);
}
......
......@@ -129,6 +129,34 @@ lumpedMassWallTemperatureFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::lumpedMassWallTemperatureFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& mapper
)
{
mixedFvPatchScalarField::autoMap(mapper);
temperatureCoupledBase::autoMap(mapper);
}
void Foam::lumpedMassWallTemperatureFvPatchScalarField::rmap
(
const fvPatchField<scalar>& ptf,
const labelList& addr
)
{
mixedFvPatchScalarField::rmap(ptf, addr);
const lumpedMassWallTemperatureFvPatchScalarField& tiptf =
refCast
<
const lumpedMassWallTemperatureFvPatchScalarField
>(ptf);
temperatureCoupledBase::rmap(tiptf, addr);
}
void Foam::lumpedMassWallTemperatureFvPatchScalarField::updateCoeffs()
{
if (updated() || (curTimeIndex_ == this->db().time().timeIndex()))
......
......@@ -166,6 +166,22 @@ public:
// Member functions
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const fvPatchField<scalar>&,
const labelList&
);
// Evaluation functions
//- Update the coefficients associated with the patch field
......
......@@ -225,6 +225,34 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& mapper
)
{
mixedFvPatchScalarField::autoMap(mapper);
temperatureCoupledBase::autoMap(mapper);
}
void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::rmap
(
const fvPatchField<scalar>& ptf,
const labelList& addr
)
{
mixedFvPatchScalarField::rmap(ptf, addr);
const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField& tiptf =
refCast
<
const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
>(ptf);
temperatureCoupledBase::rmap(tiptf, addr);
}
void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
{
if (updated())
......
......@@ -216,6 +216,22 @@ public:
// Member functions
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const fvPatchField<scalar>&,
const labelList&
);
//- Get corresponding K field
tmp<scalarField> K() const;
......
......@@ -139,26 +139,6 @@ thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void thermalBaffleFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
{
mixedFvPatchScalarField::autoMap(m);
}
void thermalBaffleFvPatchScalarField::rmap
(
const fvPatchScalarField& ptf,
const labelList& addr
)
{
mixedFvPatchScalarField::rmap(ptf, addr);
}
void thermalBaffleFvPatchScalarField::createPatchMesh()
{
const fvMesh& thisMesh = patch().boundaryMesh().mesh();
......
......@@ -325,23 +325,6 @@ public:
// Member functions
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const fvPatchScalarField&,
const labelList&
);
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
......
......@@ -383,6 +383,7 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::autoMap
)
{
mixedFvPatchScalarField::autoMap(m);
temperatureCoupledBase::autoMap(m);
if (fluid_)
{
......@@ -411,6 +412,7 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::rmap
ptf
);
temperatureCoupledBase::rmap(tiptf, addr);
if (fluid_)
{
mass_.rmap(tiptf.mass_, addr);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment