fvPatchField, fvsPatchField, pointPatchField: Generalised in-place mapping
The patch field 'autoMap' and 'rmap' functions have been replaced with a
single 'map' function that can used to do any form of in-place
patch-to-patch mapping. The exact form of mapping is now controlled
entirely by the mapper object.
An example 'map' function is shown below:
void nutkRoughWallFunctionFvPatchScalarField::map
(
const fvPatchScalarField& ptf,
const fvPatchFieldMapper& mapper
)
{
nutkWallFunctionFvPatchScalarField::map(ptf, mapper);
const nutkRoughWallFunctionFvPatchScalarField& nrwfpsf =
refCast<const nutkRoughWallFunctionFvPatchScalarField>(ptf);
mapper(Ks_, nrwfpsf.Ks_);
mapper(Cs_, nrwfpsf.Cs_);
}
This single function replaces these two previous functions:
void nutkRoughWallFunctionFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
{
nutkWallFunctionFvPatchScalarField::autoMap(m);
m(Ks_, Ks_);
m(Cs_, Cs_);
}
void nutkRoughWallFunctionFvPatchScalarField::rmap
(
const fvPatchScalarField& ptf,
const labelList& addr
)
{
nutkWallFunctionFvPatchScalarField::rmap(ptf, addr);
const nutkRoughWallFunctionFvPatchScalarField& nrwfpsf =
refCast<const nutkRoughWallFunctionFvPatchScalarField>(ptf);
Ks_.rmap(nrwfpsf.Ks_, addr);
Cs_.rmap(nrwfpsf.Cs_, addr);
}
Calls to 'autoMap' should be replaced with calls to 'map' with the same
mapper object and the patch field itself provided as the source. Calls
to 'rmap' should be replaced with calls to 'map' by wrapping the
addressing in a 'reverseFvPatchFieldMapper' (or
'reversePointPatchFieldMapper') object.
This change simplifies the creation of new patch fields and hence
improves extensibility. It also provides more options regarding general
mapping strategies between patches. Previously, general abstracted
mapping was only possible in 'autoMap'; i.e., from a patch to itself.
Now, general mapping is possible between different patches.
This commit is contained in:
@ -781,41 +781,24 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void alphatWallBoilingWallFunctionFvPatchScalarField::autoMap
|
void alphatWallBoilingWallFunctionFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchScalarField::autoMap(m);
|
|
||||||
|
|
||||||
m(wetFraction_, wetFraction_);
|
|
||||||
m(dDeparture_, dDeparture_);
|
|
||||||
m(fDeparture_, fDeparture_);
|
|
||||||
m(nucleationSiteDensity_, nucleationSiteDensity_);
|
|
||||||
m(qQuenching_, qQuenching_);
|
|
||||||
m(qEvaporative_, qEvaporative_);
|
|
||||||
m(dmdtf_, dmdtf_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void alphatWallBoilingWallFunctionFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchScalarField::rmap(ptf, addr);
|
fixedValueFvPatchScalarField::map(ptf, mapper);
|
||||||
|
|
||||||
const alphatWallBoilingWallFunctionFvPatchScalarField& tiptf =
|
const alphatWallBoilingWallFunctionFvPatchScalarField& tiptf =
|
||||||
refCast<const alphatWallBoilingWallFunctionFvPatchScalarField>(ptf);
|
refCast<const alphatWallBoilingWallFunctionFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
wetFraction_.rmap(tiptf.wetFraction_, addr);
|
mapper(wetFraction_, tiptf.wetFraction_);
|
||||||
dDeparture_.rmap(tiptf.dDeparture_, addr);
|
mapper(dDeparture_, tiptf.dDeparture_);
|
||||||
fDeparture_.rmap(tiptf.fDeparture_, addr);
|
mapper(fDeparture_, tiptf.fDeparture_);
|
||||||
nucleationSiteDensity_.rmap(tiptf.nucleationSiteDensity_, addr);
|
mapper(nucleationSiteDensity_, tiptf.nucleationSiteDensity_);
|
||||||
qQuenching_.rmap(tiptf.qQuenching_, addr);
|
mapper(qQuenching_, tiptf.qQuenching_);
|
||||||
qEvaporative_.rmap(tiptf.qEvaporative_, addr);
|
mapper(qEvaporative_, tiptf.qEvaporative_);
|
||||||
dmdtf_.rmap(tiptf.dmdtf_, addr);
|
mapper(dmdtf_, tiptf.dmdtf_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -400,13 +400,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -135,28 +135,18 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::smoluchowskiJumpTFvPatchScalarField::autoMap
|
void Foam::smoluchowskiJumpTFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
mixedFvPatchScalarField::autoMap(m);
|
|
||||||
m(Twall_, Twall_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::smoluchowskiJumpTFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<scalar>& ptf,
|
const fvPatchField<scalar>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchField<scalar>::rmap(ptf, addr);
|
mixedFvPatchField<scalar>::map(ptf, mapper);
|
||||||
|
|
||||||
const smoluchowskiJumpTFvPatchScalarField& ptpsf =
|
const smoluchowskiJumpTFvPatchScalarField& ptpsf =
|
||||||
refCast<const smoluchowskiJumpTFvPatchScalarField>(ptf);
|
refCast<const smoluchowskiJumpTFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
Twall_.rmap(ptpsf.Twall_, addr);
|
mapper(Twall_, ptpsf.Twall_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -131,13 +131,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -143,28 +143,18 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::maxwellSlipUFvPatchVectorField::autoMap
|
void Foam::maxwellSlipUFvPatchVectorField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
mixedFixedValueSlipFvPatchVectorField::autoMap(m);
|
|
||||||
m(Uwall_, Uwall_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::maxwellSlipUFvPatchVectorField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchVectorField& pvf,
|
const fvPatchVectorField& pvf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFixedValueSlipFvPatchVectorField::rmap(pvf, addr);
|
mixedFixedValueSlipFvPatchVectorField::map(pvf, mapper);
|
||||||
|
|
||||||
const maxwellSlipUFvPatchVectorField& mspvf =
|
const maxwellSlipUFvPatchVectorField& mspvf =
|
||||||
refCast<const maxwellSlipUFvPatchVectorField>(pvf);
|
refCast<const maxwellSlipUFvPatchVectorField>(pvf);
|
||||||
|
|
||||||
Uwall_.rmap(mspvf.Uwall_, addr);
|
mapper(Uwall_, mspvf.Uwall_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -136,13 +136,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -86,31 +86,19 @@ Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::mixedFixedValueSlipFvPatchField<Type>::autoMap
|
void Foam::mixedFixedValueSlipFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
m(*this, *this);
|
|
||||||
m(refValue_, refValue_);
|
|
||||||
m(valueFraction_, valueFraction_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::mixedFixedValueSlipFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
transformFvPatchField<Type>::rmap(ptf, addr);
|
transformFvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
const mixedFixedValueSlipFvPatchField<Type>& dmptf =
|
const mixedFixedValueSlipFvPatchField<Type>& dmptf =
|
||||||
refCast<const mixedFixedValueSlipFvPatchField<Type>>(ptf);
|
refCast<const mixedFixedValueSlipFvPatchField<Type>>(ptf);
|
||||||
|
|
||||||
refValue_.rmap(dmptf.refValue_, addr);
|
mapper(refValue_, dmptf.refValue_);
|
||||||
valueFraction_.rmap(dmptf.valueFraction_, addr);
|
mapper(valueFraction_, dmptf.valueFraction_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -85,7 +85,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given mixedFixedValueSlipFvPatchField
|
//- Construct by mapping given mixedFixedValueSlipFvPatchField
|
||||||
//- Onto a new patch
|
// onto a new patch
|
||||||
mixedFixedValueSlipFvPatchField
|
mixedFixedValueSlipFvPatchField
|
||||||
(
|
(
|
||||||
const mixedFixedValueSlipFvPatchField<Type>&,
|
const mixedFixedValueSlipFvPatchField<Type>&,
|
||||||
@ -132,13 +132,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -91,28 +91,18 @@ tractionDisplacementFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::tractionDisplacementFvPatchVectorField::autoMap
|
void Foam::tractionDisplacementFvPatchVectorField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedGradientFvPatchVectorField::autoMap(m);
|
|
||||||
m(traction_, traction_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::tractionDisplacementFvPatchVectorField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchVectorField& ptf,
|
const fvPatchVectorField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedGradientFvPatchVectorField::rmap(ptf, addr);
|
fixedGradientFvPatchVectorField::map(ptf, mapper);
|
||||||
|
|
||||||
const tractionDisplacementFvPatchVectorField& dmptf =
|
const tractionDisplacementFvPatchVectorField& dmptf =
|
||||||
refCast<const tractionDisplacementFvPatchVectorField>(ptf);
|
refCast<const tractionDisplacementFvPatchVectorField>(ptf);
|
||||||
|
|
||||||
traction_.rmap(dmptf.traction_, addr);
|
mapper(traction_, dmptf.traction_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -141,13 +141,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -40,7 +40,7 @@ SourceFiles
|
|||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
#include "setSizeFieldMapper.H"
|
#include "setSizeFvPatchFieldMapper.H"
|
||||||
#include "labelIOList.H"
|
#include "labelIOList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -93,24 +93,6 @@ class fvFieldReconstructor
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Mapper for sizing only - does not do any actual mapping.
|
|
||||||
class fvPatchFieldReconstructor
|
|
||||||
:
|
|
||||||
public fvPatchFieldMapper,
|
|
||||||
public setSizeFieldMapper
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct given size
|
|
||||||
fvPatchFieldReconstructor(const label size)
|
|
||||||
:
|
|
||||||
setSizeFieldMapper(size)
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,6 +31,7 @@ License
|
|||||||
#include "emptyFvPatchField.H"
|
#include "emptyFvPatchField.H"
|
||||||
#include "emptyFvsPatchField.H"
|
#include "emptyFvsPatchField.H"
|
||||||
#include "processorCyclicFvPatch.H"
|
#include "processorCyclicFvPatch.H"
|
||||||
|
#include "reverseFvPatchFieldMapper.H"
|
||||||
#include "stringOps.H"
|
#include "stringOps.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
@ -183,7 +184,7 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField
|
|||||||
procField.boundaryField()[procPatchi],
|
procField.boundaryField()[procPatchi],
|
||||||
completeMesh_.boundary()[completePatchi],
|
completeMesh_.boundary()[completePatchi],
|
||||||
DimensionedField<Type, volMesh>::null(),
|
DimensionedField<Type, volMesh>::null(),
|
||||||
fvPatchFieldReconstructor
|
setSizeFvPatchFieldMapper
|
||||||
(
|
(
|
||||||
completeMesh_.boundary()[completePatchi].size()
|
completeMesh_.boundary()[completePatchi].size()
|
||||||
)
|
)
|
||||||
@ -191,10 +192,13 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
patchFields[completePatchi].rmap
|
patchFields[completePatchi].map
|
||||||
(
|
(
|
||||||
procField.boundaryField()[procPatchi],
|
procField.boundaryField()[procPatchi],
|
||||||
|
reverseFvPatchFieldMapper
|
||||||
|
(
|
||||||
faceProcAddressingBf_[proci][procPatchi] - 1
|
faceProcAddressingBf_[proci][procPatchi] - 1
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (isA<processorCyclicFvPatch>(procPatch))
|
else if (isA<processorCyclicFvPatch>(procPatch))
|
||||||
@ -230,10 +234,13 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
patchFields[completePatchi].rmap
|
patchFields[completePatchi].map
|
||||||
(
|
(
|
||||||
procField.boundaryField()[procPatchi],
|
procField.boundaryField()[procPatchi],
|
||||||
|
reverseFvPatchFieldMapper
|
||||||
|
(
|
||||||
faceProcAddressingBf_[proci][procPatchi] - 1
|
faceProcAddressingBf_[proci][procPatchi] - 1
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -353,7 +360,7 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
|
|||||||
procField.boundaryField()[procPatchi],
|
procField.boundaryField()[procPatchi],
|
||||||
completeMesh_.boundary()[completePatchi],
|
completeMesh_.boundary()[completePatchi],
|
||||||
DimensionedField<Type, surfaceMesh>::null(),
|
DimensionedField<Type, surfaceMesh>::null(),
|
||||||
fvPatchFieldReconstructor
|
setSizeFvPatchFieldMapper
|
||||||
(
|
(
|
||||||
completeMesh_.boundary()[completePatchi].size()
|
completeMesh_.boundary()[completePatchi].size()
|
||||||
)
|
)
|
||||||
@ -361,10 +368,13 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
patchFields[completePatchi].rmap
|
patchFields[completePatchi].map
|
||||||
(
|
(
|
||||||
procField.boundaryField()[procPatchi],
|
procField.boundaryField()[procPatchi],
|
||||||
|
reverseFvPatchFieldMapper
|
||||||
|
(
|
||||||
faceProcAddressingBf_[proci][procPatchi] - 1
|
faceProcAddressingBf_[proci][procPatchi] - 1
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (isA<processorCyclicFvPatch>(procPatch))
|
else if (isA<processorCyclicFvPatch>(procPatch))
|
||||||
@ -383,10 +393,13 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
patchFields[completePatchi].rmap
|
patchFields[completePatchi].map
|
||||||
(
|
(
|
||||||
procField.boundaryField()[procPatchi],
|
procField.boundaryField()[procPatchi],
|
||||||
|
reverseFvPatchFieldMapper
|
||||||
|
(
|
||||||
faceProcAddressingBf_[proci][procPatchi] - 1
|
faceProcAddressingBf_[proci][procPatchi] - 1
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (isA<processorFvPatch>(procPatch))
|
else if (isA<processorFvPatch>(procPatch))
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,7 +38,7 @@ SourceFiles
|
|||||||
#include "pointMesh.H"
|
#include "pointMesh.H"
|
||||||
#include "pointFields.H"
|
#include "pointFields.H"
|
||||||
#include "pointPatchFieldMapper.H"
|
#include "pointPatchFieldMapper.H"
|
||||||
#include "setSizeFieldMapper.H"
|
#include "setSizePointPatchFieldMapper.H"
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -74,24 +74,6 @@ class pointFieldReconstructor
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Mapper for sizing only - does not do any actual mapping.
|
|
||||||
class pointPatchFieldReconstructor
|
|
||||||
:
|
|
||||||
public pointPatchFieldMapper,
|
|
||||||
public setSizeFieldMapper
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct given size
|
|
||||||
pointPatchFieldReconstructor(const label size)
|
|
||||||
:
|
|
||||||
setSizeFieldMapper(size)
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,6 +25,7 @@ License
|
|||||||
|
|
||||||
#include "pointFieldReconstructor.H"
|
#include "pointFieldReconstructor.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
|
#include "reversePointPatchFieldMapper.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -93,14 +94,15 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
|||||||
{
|
{
|
||||||
if (!patchFields(curBPatch))
|
if (!patchFields(curBPatch))
|
||||||
{
|
{
|
||||||
patchFields.set(
|
patchFields.set
|
||||||
|
(
|
||||||
curBPatch,
|
curBPatch,
|
||||||
pointPatchField<Type>::New
|
pointPatchField<Type>::New
|
||||||
(
|
(
|
||||||
procField.boundaryField()[patchi],
|
procField.boundaryField()[patchi],
|
||||||
completeMesh_.boundary()[curBPatch],
|
completeMesh_.boundary()[curBPatch],
|
||||||
DimensionedField<Type, pointMesh>::null(),
|
DimensionedField<Type, pointMesh>::null(),
|
||||||
pointPatchFieldReconstructor
|
setSizePointPatchFieldMapper
|
||||||
(
|
(
|
||||||
completeMesh_.boundary()[curBPatch].size()
|
completeMesh_.boundary()[curBPatch].size()
|
||||||
)
|
)
|
||||||
@ -108,10 +110,13 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
patchFields[curBPatch].rmap
|
patchFields[curBPatch].map
|
||||||
(
|
(
|
||||||
procField.boundaryField()[patchi],
|
procField.boundaryField()[patchi],
|
||||||
|
reversePointPatchFieldMapper
|
||||||
|
(
|
||||||
patchPointAddressing_[proci][patchi]
|
patchPointAddressing_[proci][patchi]
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -143,29 +143,18 @@ CONSTRUCT
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::CLASS::autoMap
|
void Foam::CLASS::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PARENT::autoMap(m);
|
|
||||||
m(fieldData_, fieldData_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::CLASS::rmap
|
|
||||||
(
|
(
|
||||||
const FVPATCHF& ptf,
|
const FVPATCHF& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
PARENT::rmap(ptf, addr);
|
PARENT::map(ptf, mapper);
|
||||||
|
|
||||||
const CLASS& tiptf =
|
const CLASS& tiptf =
|
||||||
refCast<const CLASS>(ptf);
|
refCast<const CLASS>(ptf);
|
||||||
|
|
||||||
fieldData_.rmap(tiptf.fieldData_, addr);
|
mapper(fieldData_, tiptf.fieldData_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -191,13 +191,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const FVPATCHF&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const FVPATCHF&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -262,30 +262,19 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void nutURoughWallFunctionFvPatchScalarField::autoMap
|
void nutURoughWallFunctionFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
nutUWallFunctionFvPatchScalarField::autoMap(m);
|
|
||||||
m(Ks_, Ks_);
|
|
||||||
m(Cs_, Cs_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void nutURoughWallFunctionFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
nutUWallFunctionFvPatchScalarField::rmap(ptf, addr);
|
nutUWallFunctionFvPatchScalarField::map(ptf, mapper);
|
||||||
|
|
||||||
const nutURoughWallFunctionFvPatchScalarField& nrwfpsf =
|
const nutURoughWallFunctionFvPatchScalarField& nrwfpsf =
|
||||||
refCast<const nutURoughWallFunctionFvPatchScalarField>(ptf);
|
refCast<const nutURoughWallFunctionFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
Ks_.rmap(nrwfpsf.Ks_, addr);
|
mapper(Ks_, nrwfpsf.Ks_);
|
||||||
Cs_.rmap(nrwfpsf.Cs_, addr);
|
mapper(Cs_, nrwfpsf.Cs_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -197,14 +197,11 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
virtual void map
|
||||||
|
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
|
||||||
virtual void rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField&,
|
const fvPatchScalarField&,
|
||||||
const labelList&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -179,30 +179,19 @@ nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void nutkRoughWallFunctionFvPatchScalarField::autoMap
|
void nutkRoughWallFunctionFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
nutkWallFunctionFvPatchScalarField::autoMap(m);
|
|
||||||
m(Ks_, Ks_);
|
|
||||||
m(Cs_, Cs_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void nutkRoughWallFunctionFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
nutkWallFunctionFvPatchScalarField::rmap(ptf, addr);
|
nutkWallFunctionFvPatchScalarField::map(ptf, mapper);
|
||||||
|
|
||||||
const nutkRoughWallFunctionFvPatchScalarField& nrwfpsf =
|
const nutkRoughWallFunctionFvPatchScalarField& nrwfpsf =
|
||||||
refCast<const nutkRoughWallFunctionFvPatchScalarField>(ptf);
|
refCast<const nutkRoughWallFunctionFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
Ks_.rmap(nrwfpsf.Ks_, addr);
|
mapper(Ks_, nrwfpsf.Ks_);
|
||||||
Cs_.rmap(nrwfpsf.Cs_, addr);
|
mapper(Cs_, nrwfpsf.Cs_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -201,14 +201,11 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
virtual void map
|
||||||
|
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
|
||||||
virtual void rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField&,
|
const fvPatchScalarField&,
|
||||||
const labelList&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
|
|||||||
@ -640,7 +640,9 @@ fields/UniformGeometricFields/uniformGeometricFields.C
|
|||||||
Fields = fields/Fields
|
Fields = fields/Fields
|
||||||
|
|
||||||
$(Fields)/fieldMappers/directFieldMapper/directFieldMapper.C
|
$(Fields)/fieldMappers/directFieldMapper/directFieldMapper.C
|
||||||
|
$(Fields)/fieldMappers/identityFieldMapper/identityFieldMapper.C
|
||||||
$(Fields)/fieldMappers/generalFieldMapper/generalFieldMapper.C
|
$(Fields)/fieldMappers/generalFieldMapper/generalFieldMapper.C
|
||||||
|
$(Fields)/fieldMappers/reverseFieldMapper/reverseFieldMapper.C
|
||||||
$(Fields)/fieldMappers/setSizeFieldMapper/setSizeFieldMapper.C
|
$(Fields)/fieldMappers/setSizeFieldMapper/setSizeFieldMapper.C
|
||||||
$(Fields)/labelField/labelField.C
|
$(Fields)/labelField/labelField.C
|
||||||
$(Fields)/scalarField/scalarField.C
|
$(Fields)/scalarField/scalarField.C
|
||||||
|
|||||||
@ -0,0 +1,36 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "identityFieldMapper.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
FOR_ALL_FIELD_TYPES(IMPLEMENT_FIELD_MAPPER_OPERATOR, identityFieldMapper)
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_FIELD_MAPPER_OPERATOR(label, identityFieldMapper)
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,107 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::identityFieldMapper
|
||||||
|
|
||||||
|
Description
|
||||||
|
Identity field mapper
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef identityFieldMapper_H
|
||||||
|
#define identityFieldMapper_H
|
||||||
|
|
||||||
|
#include "fieldMapper.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class identityFieldMapper Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class identityFieldMapper
|
||||||
|
:
|
||||||
|
virtual public fieldMapper
|
||||||
|
{
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void map(Field<Type>& f, const Field<Type>& mapF) const;
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<Field<Type>> map(const Field<Type>& f) const;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Null constructor
|
||||||
|
identityFieldMapper()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~identityFieldMapper()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Are there unmapped values? I.e. do all size() elements get
|
||||||
|
// get value
|
||||||
|
virtual bool hasUnmapped() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
|
//- Map a field
|
||||||
|
FOR_ALL_FIELD_TYPES(DEFINE_FIELD_MAPPER_OPERATOR, );
|
||||||
|
|
||||||
|
//- Map a label field
|
||||||
|
DEFINE_FIELD_MAPPER_OPERATOR(label, );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "identityFieldMapperTemplates.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "identityFieldMapper.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::identityFieldMapper::map
|
||||||
|
(
|
||||||
|
Field<Type>& f,
|
||||||
|
const Field<Type>& mapF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
f = mapF;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::tmp<Foam::Field<Type>> Foam::identityFieldMapper::map
|
||||||
|
(
|
||||||
|
const Field<Type>& mapF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return mapF;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "reverseFieldMapper.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
FOR_ALL_FIELD_TYPES(IMPLEMENT_FIELD_MAPPER_OPERATOR, reverseFieldMapper)
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_FIELD_MAPPER_OPERATOR(label, reverseFieldMapper)
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,107 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::reverseFieldMapper
|
||||||
|
|
||||||
|
Description
|
||||||
|
Reverse field mapper
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef reverseFieldMapper_H
|
||||||
|
#define reverseFieldMapper_H
|
||||||
|
|
||||||
|
#include "fieldMapper.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class reverseFieldMapper Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class reverseFieldMapper
|
||||||
|
:
|
||||||
|
virtual public fieldMapper
|
||||||
|
{
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void map(Field<Type>& f, const Field<Type>& mapF) const;
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<Field<Type>> map(const Field<Type>& f) const;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Null constructor
|
||||||
|
reverseFieldMapper()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~reverseFieldMapper()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Are there unmapped values? I.e. do all size() elements get
|
||||||
|
// get value
|
||||||
|
virtual bool hasUnmapped() const = 0;
|
||||||
|
|
||||||
|
//- Access to the reverse map addressing
|
||||||
|
virtual const labelUList& addressing() const = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
|
//- Map a field
|
||||||
|
FOR_ALL_FIELD_TYPES(DEFINE_FIELD_MAPPER_OPERATOR, );
|
||||||
|
|
||||||
|
//- Map a label field
|
||||||
|
DEFINE_FIELD_MAPPER_OPERATOR(label, );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "reverseFieldMapperTemplates.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "reverseFieldMapper.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::reverseFieldMapper::map
|
||||||
|
(
|
||||||
|
Field<Type>& f,
|
||||||
|
const Field<Type>& mapF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
if (notNull(addressing()) && addressing().size())
|
||||||
|
{
|
||||||
|
f.rmap(mapF, addressing());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::tmp<Foam::Field<Type>> Foam::reverseFieldMapper::map
|
||||||
|
(
|
||||||
|
const Field<Type>& mapF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
NotImplemented;
|
||||||
|
return tmp<Field<Type>>(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -115,7 +115,11 @@ void MapGeometricFields
|
|||||||
// from the patch which has already been resized
|
// from the patch which has already been resized
|
||||||
//
|
//
|
||||||
|
|
||||||
bfield[patchi].autoMap(mapper.boundaryMap()[patchi]);
|
bfield[patchi].map
|
||||||
|
(
|
||||||
|
bfield[patchi],
|
||||||
|
mapper.boundaryMap()[patchi]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
field.instance() = field.time().name();
|
field.instance() = field.time().name();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -119,30 +119,16 @@ Foam::valuePointPatchField<Type>::valuePointPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::valuePointPatchField<Type>::autoMap
|
void Foam::valuePointPatchField<Type>::map
|
||||||
(
|
|
||||||
const pointPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
m(*this, *this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::valuePointPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const pointPatchField<Type>& ptf,
|
const pointPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const pointPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Field<Type>::rmap
|
const valuePointPatchField<Type>& vptf =
|
||||||
(
|
refCast<const valuePointPatchField<Type>>(ptf);
|
||||||
refCast<const valuePointPatchField<Type>>
|
|
||||||
(
|
mapper(*this, vptf);
|
||||||
ptf
|
|
||||||
),
|
|
||||||
addr
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -81,7 +81,8 @@ public:
|
|||||||
const bool valueRequired=true
|
const bool valueRequired=true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given patchField<Type> onto a new patch
|
//- Construct by mapping given valuePointPatchField<Type>
|
||||||
|
// onto a new patch
|
||||||
valuePointPatchField
|
valuePointPatchField
|
||||||
(
|
(
|
||||||
const valuePointPatchField<Type>&,
|
const valuePointPatchField<Type>&,
|
||||||
@ -130,13 +131,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given pointPatchField onto this pointPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const pointPatchFieldMapper&);
|
(
|
||||||
|
const pointPatchField<Type>&,
|
||||||
//- Reverse map the given pointPatchField onto this pointPatchField
|
const pointPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const pointPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the pointPatchField to the given pointPatchField
|
//- Reset the pointPatchField to the given pointPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -164,7 +164,7 @@ public:
|
|||||||
const dictionary&
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given patchField<Type> onto a new patch
|
//- Construct by mapping given pointPatchField<Type> onto a new patch
|
||||||
pointPatchField
|
pointPatchField
|
||||||
(
|
(
|
||||||
const pointPatchField<Type>&,
|
const pointPatchField<Type>&,
|
||||||
@ -398,14 +398,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given pointPatchField onto this pointPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const pointPatchFieldMapper&)
|
(
|
||||||
{}
|
const pointPatchField<Type>&,
|
||||||
|
const pointPatchFieldMapper&
|
||||||
//- Reverse map the given pointPatchField onto this pointPatchField
|
)
|
||||||
// Used to reconstruct fields
|
|
||||||
virtual void rmap(const pointPatchField<Type>&, const labelList&)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Reset the pointPatchField to the given pointPatchField
|
//- Reset the pointPatchField to the given pointPatchField
|
||||||
|
|||||||
@ -0,0 +1,105 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::reversePointPatchFieldMapper
|
||||||
|
|
||||||
|
Description
|
||||||
|
reverse pointPatchFieldMapper
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef reversePointPatchFieldMapper_H
|
||||||
|
#define reversePointPatchFieldMapper_H
|
||||||
|
|
||||||
|
#include "pointPatchFieldMapper.H"
|
||||||
|
#include "reverseFieldMapper.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class reversePointPatchFieldMapper Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class reversePointPatchFieldMapper
|
||||||
|
:
|
||||||
|
public pointPatchFieldMapper,
|
||||||
|
public reverseFieldMapper
|
||||||
|
{
|
||||||
|
// Private Data
|
||||||
|
|
||||||
|
//- Addressing from new back to old
|
||||||
|
const labelUList& addressing_;
|
||||||
|
|
||||||
|
//- Does map contain any unmapped values
|
||||||
|
bool hasUnmapped_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct given addressing
|
||||||
|
reversePointPatchFieldMapper(const labelUList& addressing)
|
||||||
|
:
|
||||||
|
addressing_(addressing),
|
||||||
|
hasUnmapped_(false)
|
||||||
|
{
|
||||||
|
if (addressing_.size() && min(addressing_) < 0)
|
||||||
|
{
|
||||||
|
hasUnmapped_ = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~reversePointPatchFieldMapper()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
bool hasUnmapped() const
|
||||||
|
{
|
||||||
|
return hasUnmapped_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const labelUList& addressing() const
|
||||||
|
{
|
||||||
|
return addressing_;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::setSizePointPatchFieldMapper
|
||||||
|
|
||||||
|
Description
|
||||||
|
Set size pointPatchFieldMapper
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef setSizePointPatchFieldMapper_H
|
||||||
|
#define setSizePointPatchFieldMapper_H
|
||||||
|
|
||||||
|
#include "pointPatchFieldMapper.H"
|
||||||
|
#include "setSizeFieldMapper.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class setSizePointPatchFieldMapper Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class setSizePointPatchFieldMapper
|
||||||
|
:
|
||||||
|
public pointPatchFieldMapper,
|
||||||
|
public setSizeFieldMapper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct
|
||||||
|
setSizePointPatchFieldMapper(const label size)
|
||||||
|
:
|
||||||
|
setSizeFieldMapper(size)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~setSizePointPatchFieldMapper()
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -193,54 +193,30 @@ externalTemperatureFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::externalTemperatureFvPatchScalarField::autoMap
|
void Foam::externalTemperatureFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
mixedFvPatchScalarField::autoMap(m);
|
|
||||||
|
|
||||||
if (haveq_)
|
|
||||||
{
|
|
||||||
m(q_, q_);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (haveh_)
|
|
||||||
{
|
|
||||||
m(h_, h_);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (qrName_ != word::null)
|
|
||||||
{
|
|
||||||
m(qrPrevious_, qrPrevious_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::externalTemperatureFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::rmap(ptf, addr);
|
mixedFvPatchScalarField::map(ptf, mapper);
|
||||||
|
|
||||||
const externalTemperatureFvPatchScalarField& tiptf =
|
const externalTemperatureFvPatchScalarField& tiptf =
|
||||||
refCast<const externalTemperatureFvPatchScalarField>(ptf);
|
refCast<const externalTemperatureFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
if (haveq_)
|
if (haveq_)
|
||||||
{
|
{
|
||||||
q_.rmap(tiptf.q_, addr);
|
mapper(q_, tiptf.q_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (haveh_)
|
if (haveh_)
|
||||||
{
|
{
|
||||||
h_.rmap(tiptf.h_, addr);
|
mapper(h_, tiptf.h_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qrName_ != word::null)
|
if (qrName_ != word::null)
|
||||||
{
|
{
|
||||||
qrPrevious_.rmap(tiptf.qrPrevious_, addr);
|
mapper(qrPrevious_, tiptf.qrPrevious_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -241,13 +241,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -259,37 +259,21 @@ tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>::qs() const
|
|||||||
|
|
||||||
|
|
||||||
template<class solidType>
|
template<class solidType>
|
||||||
void thermalBaffle1DFvPatchScalarField<solidType>::autoMap
|
void thermalBaffle1DFvPatchScalarField<solidType>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
mixedFvPatchScalarField::autoMap(m);
|
|
||||||
|
|
||||||
if (this->owner())
|
|
||||||
{
|
|
||||||
m(thickness_, thickness_);
|
|
||||||
m(qs_, qs_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class solidType>
|
|
||||||
void thermalBaffle1DFvPatchScalarField<solidType>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::rmap(ptf, addr);
|
mixedFvPatchScalarField::map(ptf, mapper);
|
||||||
|
|
||||||
const thermalBaffle1DFvPatchScalarField& tiptf =
|
const thermalBaffle1DFvPatchScalarField& tiptf =
|
||||||
refCast<const thermalBaffle1DFvPatchScalarField>(ptf);
|
refCast<const thermalBaffle1DFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
if (this->owner())
|
if (this->owner())
|
||||||
{
|
{
|
||||||
thickness_.rmap(tiptf.thickness_, addr);
|
mapper(thickness_, tiptf.thickness_);
|
||||||
qs_.rmap(tiptf.qs_, addr);
|
mapper(qs_, tiptf.qs_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -182,8 +182,8 @@ public:
|
|||||||
const dictionary&
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given
|
//- Construct by mapping given thermalBaffle1DFvPatchScalarField
|
||||||
// thermalBaffle1DFvPatchScalarField onto a new patch
|
// onto a new patch
|
||||||
thermalBaffle1DFvPatchScalarField
|
thermalBaffle1DFvPatchScalarField
|
||||||
(
|
(
|
||||||
const thermalBaffle1DFvPatchScalarField&,
|
const thermalBaffle1DFvPatchScalarField&,
|
||||||
@ -222,13 +222,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -111,22 +111,13 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::autoMap
|
void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
m(*this, *this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchField<scalar>::rmap(ptf, addr);
|
mixedFvPatchField<scalar>::map(ptf, mapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -134,13 +134,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -170,23 +170,15 @@ Foam::atmBoundaryLayer::atmBoundaryLayer(const atmBoundaryLayer& abl)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::atmBoundaryLayer::autoMap(const fvPatchFieldMapper& m)
|
void Foam::atmBoundaryLayer::map
|
||||||
{
|
|
||||||
m(z0_, z0_);
|
|
||||||
m(zGround_, zGround_);
|
|
||||||
m(Ustar_, Ustar_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::atmBoundaryLayer::rmap
|
|
||||||
(
|
(
|
||||||
const atmBoundaryLayer& blptf,
|
const atmBoundaryLayer& blptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
z0_.rmap(blptf.z0_, addr);
|
mapper(z0_, blptf.z0_);
|
||||||
zGround_.rmap(blptf.zGround_, addr);
|
mapper(zGround_, blptf.zGround_);
|
||||||
Ustar_.rmap(blptf.Ustar_, addr);
|
mapper(Ustar_, blptf.Ustar_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -249,12 +249,8 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given atmBoundaryLayer onto this atmBoundaryLayer
|
||||||
void autoMap(const fvPatchFieldMapper&);
|
void map(const atmBoundaryLayer&, const fvPatchFieldMapper&);
|
||||||
|
|
||||||
//- Reverse map the given atmBoundaryLayer onto this
|
|
||||||
// atmBoundaryLayer
|
|
||||||
void rmap(const atmBoundaryLayer&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the atmBoundaryLayer to the given atmBoundaryLayer
|
//- Reset the atmBoundaryLayer to the given atmBoundaryLayer
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,28 +104,18 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void atmBoundaryLayerInletEpsilonFvPatchScalarField::autoMap
|
void atmBoundaryLayerInletEpsilonFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
inletOutletFvPatchScalarField::autoMap(m);
|
|
||||||
atmBoundaryLayer::autoMap(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& psf,
|
const fvPatchScalarField& psf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
inletOutletFvPatchScalarField::rmap(psf, addr);
|
inletOutletFvPatchScalarField::map(psf, mapper);
|
||||||
|
|
||||||
const atmBoundaryLayerInletEpsilonFvPatchScalarField& blpsf =
|
const atmBoundaryLayerInletEpsilonFvPatchScalarField& blpsf =
|
||||||
refCast<const atmBoundaryLayerInletEpsilonFvPatchScalarField>(psf);
|
refCast<const atmBoundaryLayerInletEpsilonFvPatchScalarField>(psf);
|
||||||
|
|
||||||
atmBoundaryLayer::rmap(blpsf, addr);
|
atmBoundaryLayer::map(blpsf, mapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -132,13 +132,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,28 +104,18 @@ atmBoundaryLayerInletKFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void atmBoundaryLayerInletKFvPatchScalarField::autoMap
|
void atmBoundaryLayerInletKFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
inletOutletFvPatchScalarField::autoMap(m);
|
|
||||||
atmBoundaryLayer::autoMap(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void atmBoundaryLayerInletKFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& psf,
|
const fvPatchScalarField& psf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
inletOutletFvPatchScalarField::rmap(psf, addr);
|
inletOutletFvPatchScalarField::map(psf, mapper);
|
||||||
|
|
||||||
const atmBoundaryLayerInletKFvPatchScalarField& blpsf =
|
const atmBoundaryLayerInletKFvPatchScalarField& blpsf =
|
||||||
refCast<const atmBoundaryLayerInletKFvPatchScalarField>(psf);
|
refCast<const atmBoundaryLayerInletKFvPatchScalarField>(psf);
|
||||||
|
|
||||||
atmBoundaryLayer::rmap(blpsf, addr);
|
atmBoundaryLayer::map(blpsf, mapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -132,13 +132,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,28 +104,18 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap
|
void atmBoundaryLayerInletVelocityFvPatchVectorField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
inletOutletFvPatchVectorField::autoMap(m);
|
|
||||||
atmBoundaryLayer::autoMap(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void atmBoundaryLayerInletVelocityFvPatchVectorField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchVectorField& pvf,
|
const fvPatchVectorField& pvf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
inletOutletFvPatchVectorField::rmap(pvf, addr);
|
inletOutletFvPatchVectorField::map(pvf, mapper);
|
||||||
|
|
||||||
const atmBoundaryLayerInletVelocityFvPatchVectorField& blpvf =
|
const atmBoundaryLayerInletVelocityFvPatchVectorField& blpvf =
|
||||||
refCast<const atmBoundaryLayerInletVelocityFvPatchVectorField>(pvf);
|
refCast<const atmBoundaryLayerInletVelocityFvPatchVectorField>(pvf);
|
||||||
|
|
||||||
atmBoundaryLayer::rmap(blpvf, addr);
|
atmBoundaryLayer::map(blpvf, mapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -133,13 +133,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -134,28 +134,18 @@ nutkAtmRoughWallFunctionFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void nutkAtmRoughWallFunctionFvPatchScalarField::autoMap
|
void nutkAtmRoughWallFunctionFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
nutkWallFunctionFvPatchScalarField::autoMap(m);
|
|
||||||
m(z0_, z0_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void nutkAtmRoughWallFunctionFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
nutkWallFunctionFvPatchScalarField::rmap(ptf, addr);
|
nutkWallFunctionFvPatchScalarField::map(ptf, mapper);
|
||||||
|
|
||||||
const nutkAtmRoughWallFunctionFvPatchScalarField& nrwfpsf =
|
const nutkAtmRoughWallFunctionFvPatchScalarField& nrwfpsf =
|
||||||
refCast<const nutkAtmRoughWallFunctionFvPatchScalarField>(ptf);
|
refCast<const nutkAtmRoughWallFunctionFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
z0_.rmap(nrwfpsf.z0_, addr);
|
mapper(z0_, nrwfpsf.z0_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -171,14 +171,11 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
virtual void map
|
||||||
|
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
|
||||||
virtual void rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField&,
|
const fvPatchScalarField&,
|
||||||
const labelList&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,8 @@ License
|
|||||||
#include "pointFields.H"
|
#include "pointFields.H"
|
||||||
#include "directFvPatchFieldMapper.H"
|
#include "directFvPatchFieldMapper.H"
|
||||||
#include "directPointPatchFieldMapper.H"
|
#include "directPointPatchFieldMapper.H"
|
||||||
|
#include "reverseFvPatchFieldMapper.H"
|
||||||
|
#include "reversePointPatchFieldMapper.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -236,10 +238,10 @@ void Foam::fvMeshAdder::MapVolField
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bfld[newPatchi].rmap
|
bfld[newPatchi].map
|
||||||
(
|
(
|
||||||
fldToAdd.boundaryField()[patchi],
|
fldToAdd.boundaryField()[patchi],
|
||||||
addedToNew
|
reverseFvPatchFieldMapper(addedToNew)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -529,10 +531,10 @@ void Foam::fvMeshAdder::MapSurfaceField
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bfld[newPatchi].rmap
|
bfld[newPatchi].map
|
||||||
(
|
(
|
||||||
fldToAdd.boundaryField()[patchi],
|
fldToAdd.boundaryField()[patchi],
|
||||||
addedToNew
|
reverseFvPatchFieldMapper(addedToNew)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -829,10 +831,10 @@ void Foam::fvMeshAdder::MapPointField
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bfld[newPatchi].rmap
|
bfld[newPatchi].map
|
||||||
(
|
(
|
||||||
fldToAdd.boundaryField()[patchi],
|
fldToAdd.boundaryField()[patchi],
|
||||||
oldToNew
|
reversePointPatchFieldMapper(oldToNew)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,33 +92,20 @@ Foam::directionMixedFvPatchField<Type>::directionMixedFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::directionMixedFvPatchField<Type>::autoMap
|
void Foam::directionMixedFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transformFvPatchField<Type>::autoMap(m);
|
|
||||||
m(refValue_, refValue_);
|
|
||||||
m(refGrad_, refGrad_);
|
|
||||||
m(valueFraction_, valueFraction_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::directionMixedFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
transformFvPatchField<Type>::rmap(ptf, addr);
|
transformFvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
const directionMixedFvPatchField<Type>& dmptf =
|
const directionMixedFvPatchField<Type>& dmptf =
|
||||||
refCast<const directionMixedFvPatchField<Type>>(ptf);
|
refCast<const directionMixedFvPatchField<Type>>(ptf);
|
||||||
|
|
||||||
refValue_.rmap(dmptf.refValue_, addr);
|
mapper(refValue_, dmptf.refValue_);
|
||||||
refGrad_.rmap(dmptf.refGrad_, addr);
|
mapper(refGrad_, dmptf.refGrad_);
|
||||||
valueFraction_.rmap(dmptf.valueFraction_, addr);
|
mapper(valueFraction_, dmptf.valueFraction_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,8 +86,8 @@ public:
|
|||||||
const dictionary&
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given directionMixedFvPatchField onto
|
//- Construct by mapping given directionMixedFvPatchField
|
||||||
// a new patch
|
// onto a new patch
|
||||||
directionMixedFvPatchField
|
directionMixedFvPatchField
|
||||||
(
|
(
|
||||||
const directionMixedFvPatchField<Type>&,
|
const directionMixedFvPatchField<Type>&,
|
||||||
@ -137,13 +137,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -109,29 +109,18 @@ Foam::fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::fixedGradientFvPatchField<Type>::autoMap
|
void Foam::fixedGradientFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fvPatchField<Type>::autoMap(m);
|
|
||||||
m(gradient_, gradient_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::fixedGradientFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::rmap(ptf, addr);
|
fvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
const fixedGradientFvPatchField<Type>& fgptf =
|
const fixedGradientFvPatchField<Type>& fgptf =
|
||||||
refCast<const fixedGradientFvPatchField<Type>>(ptf);
|
refCast<const fixedGradientFvPatchField<Type>>(ptf);
|
||||||
|
|
||||||
gradient_.rmap(fgptf.gradient_, addr);
|
mapper(gradient_, fgptf.gradient_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -163,13 +163,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -129,33 +129,20 @@ Foam::mixedFvPatchField<Type>::mixedFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::mixedFvPatchField<Type>::autoMap
|
void Foam::mixedFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fvPatchField<Type>::autoMap(m);
|
|
||||||
m(refValue_, refValue_);
|
|
||||||
m(refGrad_, refGrad_);
|
|
||||||
m(valueFraction_, valueFraction_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::mixedFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::rmap(ptf, addr);
|
fvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
const mixedFvPatchField<Type>& mptf =
|
const mixedFvPatchField<Type>& mptf =
|
||||||
refCast<const mixedFvPatchField<Type>>(ptf);
|
refCast<const mixedFvPatchField<Type>>(ptf);
|
||||||
|
|
||||||
refValue_.rmap(mptf.refValue_, addr);
|
mapper(refValue_, mptf.refValue_);
|
||||||
refGrad_.rmap(mptf.refGrad_, addr);
|
mapper(refGrad_, mptf.refGrad_);
|
||||||
valueFraction_.rmap(mptf.valueFraction_, addr);
|
mapper(valueFraction_, mptf.valueFraction_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -205,13 +205,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -124,14 +124,8 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map(const fvPatchField<Type>&, const labelList&)
|
||||||
virtual void autoMap( const fvPatchFieldMapper&)
|
|
||||||
{}
|
|
||||||
|
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
|
||||||
// Used to reconstruct fields
|
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -132,44 +132,21 @@ activeBaffleVelocityFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::activeBaffleVelocityFvPatchVectorField::autoMap
|
void Foam::activeBaffleVelocityFvPatchVectorField::map
|
||||||
(
|
(
|
||||||
const fvPatchFieldMapper& m
|
const fvPatchVectorField& ptf,
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchVectorField::autoMap(m);
|
fixedValueFvPatchVectorField::map(ptf, mapper);
|
||||||
|
|
||||||
//- Note: cannot map field from cyclic patch anyway so just recalculate
|
//- Note: cannot map field from cyclic patch anyway so just recalculate
|
||||||
// Areas should be consistent when doing autoMap except in case of
|
// Areas should be consistent when doing map except in case of topo
|
||||||
// topo changes.
|
// changes.
|
||||||
//- Note: we don't want to use Sf here since triggers rebuilding of
|
//- Note: we don't want to use Sf here since triggers rebuilding of
|
||||||
// fvMesh::S() which will give problems when mapped (since already
|
// fvMesh::S() which will give problems when mapped (since already
|
||||||
// on new mesh)
|
// on new mesh)
|
||||||
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
|
||||||
initWallSf_ = patch().patchSlice(areas);
|
|
||||||
initCyclicSf_ = patch().boundaryMesh()
|
|
||||||
[
|
|
||||||
cyclicPatchLabel_
|
|
||||||
].patchSlice(areas);
|
|
||||||
nbrCyclicSf_ = refCast<const cyclicFvPatch>
|
|
||||||
(
|
|
||||||
patch().boundaryMesh()
|
|
||||||
[
|
|
||||||
cyclicPatchLabel_
|
|
||||||
]
|
|
||||||
).neighbFvPatch().patch().patchSlice(areas);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::activeBaffleVelocityFvPatchVectorField::rmap
|
|
||||||
(
|
|
||||||
const fvPatchVectorField& ptf,
|
|
||||||
const labelList& addr
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchVectorField::rmap(ptf, addr);
|
|
||||||
|
|
||||||
// See autoMap.
|
|
||||||
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
||||||
initWallSf_ = patch().patchSlice(areas);
|
initWallSf_ = patch().patchSlice(areas);
|
||||||
initCyclicSf_ = patch().boundaryMesh()
|
initCyclicSf_ = patch().boundaryMesh()
|
||||||
@ -193,7 +170,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::reset
|
|||||||
{
|
{
|
||||||
fixedValueFvPatchVectorField::reset(ptf);
|
fixedValueFvPatchVectorField::reset(ptf);
|
||||||
|
|
||||||
// See autoMap.
|
// See rmap.
|
||||||
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
||||||
initWallSf_ = patch().patchSlice(areas);
|
initWallSf_ = patch().patchSlice(areas);
|
||||||
initCyclicSf_ = patch().boundaryMesh()
|
initCyclicSf_ = patch().boundaryMesh()
|
||||||
|
|||||||
@ -206,11 +206,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
virtual void map
|
||||||
|
(
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchVectorField&,
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -153,54 +153,21 @@ activePressureForceBaffleVelocityFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::activePressureForceBaffleVelocityFvPatchVectorField::autoMap
|
void Foam::activePressureForceBaffleVelocityFvPatchVectorField::map
|
||||||
(
|
(
|
||||||
const fvPatchFieldMapper& m
|
const fvPatchVectorField& ptf,
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchVectorField::autoMap(m);
|
fixedValueFvPatchVectorField::map(ptf, mapper);
|
||||||
|
|
||||||
//- Note: cannot map field from cyclic patch anyway so just recalculate
|
//- Note: cannot map field from cyclic patch anyway so just recalculate
|
||||||
// Areas should be consistent when doing autoMap except in case of
|
// Areas should be consistent when doing map except in case of topo
|
||||||
// topo changes.
|
// changes.
|
||||||
//- Note: we don't want to use Sf here since triggers rebuilding of
|
//- Note: we don't want to use Sf here since triggers rebuilding of
|
||||||
// fvMesh::S() which will give problems when mapped (since already
|
// fvMesh::S() which will give problems when mapped (since already
|
||||||
// on new mesh)
|
// on new mesh)
|
||||||
forAll(patch().boundaryMesh().mesh().faceAreas(), i)
|
|
||||||
{
|
|
||||||
if (mag(patch().boundaryMesh().mesh().faceAreas()[i]) == 0)
|
|
||||||
{
|
|
||||||
Info << "faceArea[active] "<< i << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (patch().size() > 0)
|
|
||||||
{
|
|
||||||
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
|
||||||
initWallSf_ = patch().patchSlice(areas);
|
|
||||||
initCyclicSf_ = patch().boundaryMesh()
|
|
||||||
[
|
|
||||||
cyclicPatchLabel_
|
|
||||||
].patchSlice(areas);
|
|
||||||
nbrCyclicSf_ = refCast<const cyclicFvPatch>
|
|
||||||
(
|
|
||||||
patch().boundaryMesh()
|
|
||||||
[
|
|
||||||
cyclicPatchLabel_
|
|
||||||
]
|
|
||||||
).neighbFvPatch().patch().patchSlice(areas);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::activePressureForceBaffleVelocityFvPatchVectorField::rmap
|
|
||||||
(
|
|
||||||
const fvPatchVectorField& ptf,
|
|
||||||
const labelList& addr
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchVectorField::rmap(ptf, addr);
|
|
||||||
|
|
||||||
// See autoMap.
|
|
||||||
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
||||||
initWallSf_ = patch().patchSlice(areas);
|
initWallSf_ = patch().patchSlice(areas);
|
||||||
initCyclicSf_ = patch().boundaryMesh()
|
initCyclicSf_ = patch().boundaryMesh()
|
||||||
@ -224,7 +191,7 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::reset
|
|||||||
{
|
{
|
||||||
fixedValueFvPatchVectorField::reset(ptf);
|
fixedValueFvPatchVectorField::reset(ptf);
|
||||||
|
|
||||||
// See autoMap.
|
// See rmap.
|
||||||
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
|
||||||
initWallSf_ = patch().patchSlice(areas);
|
initWallSf_ = patch().patchSlice(areas);
|
||||||
initCyclicSf_ = patch().boundaryMesh()
|
initCyclicSf_ = patch().boundaryMesh()
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -178,7 +178,9 @@ public:
|
|||||||
const dictionary&
|
const dictionary&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping
|
//- Construct by mapping given
|
||||||
|
// activePressureForceBaffleVelocityFvPatchVectorField
|
||||||
|
// onto a new patch
|
||||||
activePressureForceBaffleVelocityFvPatchVectorField
|
activePressureForceBaffleVelocityFvPatchVectorField
|
||||||
(
|
(
|
||||||
const activePressureForceBaffleVelocityFvPatchVectorField&,
|
const activePressureForceBaffleVelocityFvPatchVectorField&,
|
||||||
@ -221,13 +223,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -183,28 +183,18 @@ Foam::dynamicPressureFvPatchScalarField::dynamicPressureFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::dynamicPressureFvPatchScalarField::autoMap
|
void Foam::dynamicPressureFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchScalarField::autoMap(m);
|
|
||||||
m(p0_, p0_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::dynamicPressureFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& psf,
|
const fvPatchScalarField& psf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchScalarField::rmap(psf, addr);
|
fixedValueFvPatchScalarField::map(psf, mapper);
|
||||||
|
|
||||||
const dynamicPressureFvPatchScalarField& dpsf =
|
const dynamicPressureFvPatchScalarField& dpsf =
|
||||||
refCast<const dynamicPressureFvPatchScalarField>(psf);
|
refCast<const dynamicPressureFvPatchScalarField>(psf);
|
||||||
|
|
||||||
p0_.rmap(dpsf.p0_, addr);
|
mapper(p0_, dpsf.p0_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -139,13 +139,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -115,28 +115,17 @@ Foam::tmp<Foam::Field<Type>> Foam::fixedJumpFvPatchField<Type>::jump() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::fixedJumpFvPatchField<Type>::autoMap
|
void Foam::fixedJumpFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
jumpCyclicFvPatchField<Type>::autoMap(m);
|
|
||||||
m(jump_, jump_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::fixedJumpFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
jumpCyclicFvPatchField<Type>::rmap(ptf, addr);
|
jumpCyclicFvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
const fixedJumpFvPatchField<Type>& tiptf =
|
const fixedJumpFvPatchField<Type>& tiptf =
|
||||||
refCast<const fixedJumpFvPatchField<Type>>(ptf);
|
refCast<const fixedJumpFvPatchField<Type>>(ptf);
|
||||||
jump_.rmap(tiptf.jump_, addr);
|
mapper(jump_, tiptf.jump_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -157,13 +157,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -110,28 +110,18 @@ fixedNormalInletOutletVelocityFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::fixedNormalInletOutletVelocityFvPatchVectorField::autoMap
|
void Foam::fixedNormalInletOutletVelocityFvPatchVectorField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
directionMixedFvPatchVectorField::autoMap(m);
|
|
||||||
normalVelocity_->autoMap(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::fixedNormalInletOutletVelocityFvPatchVectorField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchVectorField& ptf,
|
const fvPatchVectorField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
directionMixedFvPatchVectorField::rmap(ptf, addr);
|
directionMixedFvPatchVectorField::map(ptf, mapper);
|
||||||
|
|
||||||
const fixedNormalInletOutletVelocityFvPatchVectorField& fniovptf =
|
const fixedNormalInletOutletVelocityFvPatchVectorField& fniovptf =
|
||||||
refCast<const fixedNormalInletOutletVelocityFvPatchVectorField>(ptf);
|
refCast<const fixedNormalInletOutletVelocityFvPatchVectorField>(ptf);
|
||||||
|
|
||||||
normalVelocity_->rmap(fniovptf.normalVelocity(), addr);
|
mapper(normalVelocity_.ref(), fniovptf.normalVelocity());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -210,13 +210,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -85,29 +85,18 @@ Foam::fixedNormalSlipFvPatchField<Type>::fixedNormalSlipFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::fixedNormalSlipFvPatchField<Type>::autoMap
|
void Foam::fixedNormalSlipFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transformFvPatchField<Type>::autoMap(m);
|
|
||||||
m(fixedValue_, fixedValue_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::fixedNormalSlipFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
transformFvPatchField<Type>::rmap(ptf, addr);
|
transformFvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
const fixedNormalSlipFvPatchField<Type>& dmptf =
|
const fixedNormalSlipFvPatchField<Type>& dmptf =
|
||||||
refCast<const fixedNormalSlipFvPatchField<Type>>(ptf);
|
refCast<const fixedNormalSlipFvPatchField<Type>>(ptf);
|
||||||
|
|
||||||
fixedValue_.rmap(dmptf.fixedValue_, addr);
|
mapper(fixedValue_, dmptf.fixedValue_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -147,13 +147,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -266,34 +266,20 @@ flowRateInletVelocityFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::flowRateInletVelocityFvPatchVectorField::autoMap
|
void Foam::flowRateInletVelocityFvPatchVectorField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchVectorField::autoMap(m);
|
|
||||||
|
|
||||||
if (canEvaluate())
|
|
||||||
{
|
|
||||||
setWallDist();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::flowRateInletVelocityFvPatchVectorField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchVectorField& ptf,
|
const fvPatchVectorField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchVectorField::rmap(ptf, addr);
|
fixedValueFvPatchVectorField::map(ptf, mapper);
|
||||||
|
|
||||||
const flowRateInletVelocityFvPatchVectorField& tiptf =
|
const flowRateInletVelocityFvPatchVectorField& tiptf =
|
||||||
refCast<const flowRateInletVelocityFvPatchVectorField>(ptf);
|
refCast<const flowRateInletVelocityFvPatchVectorField>(ptf);
|
||||||
|
|
||||||
if (profile_.valid() && canEvaluate())
|
if (profile_.valid() && canEvaluate())
|
||||||
{
|
{
|
||||||
y_.rmap(tiptf.y_, addr);
|
mapper(y_, tiptf.y_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -251,21 +251,28 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
// Mapping functions
|
||||||
// Used to update fields following mesh topology change
|
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
|
||||||
|
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to reconstruct fields
|
virtual void map
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
virtual void reset(const fvPatchVectorField&);
|
virtual void reset(const fvPatchVectorField&);
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
|
|
||||||
|
// I-O
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -118,28 +118,18 @@ inletOutletTotalTemperatureFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::inletOutletTotalTemperatureFvPatchScalarField::autoMap
|
void Foam::inletOutletTotalTemperatureFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
inletOutletFvPatchScalarField::autoMap(m);
|
|
||||||
m(T0_, T0_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::inletOutletTotalTemperatureFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
inletOutletFvPatchScalarField::rmap(ptf, addr);
|
inletOutletFvPatchScalarField::map(ptf, mapper);
|
||||||
|
|
||||||
const inletOutletTotalTemperatureFvPatchScalarField& tiptf =
|
const inletOutletTotalTemperatureFvPatchScalarField& tiptf =
|
||||||
refCast<const inletOutletTotalTemperatureFvPatchScalarField>(ptf);
|
refCast<const inletOutletTotalTemperatureFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
T0_.rmap(tiptf.T0_, addr);
|
mapper(T0_, tiptf.T0_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -174,13 +174,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -88,28 +88,18 @@ interstitialInletVelocityFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::interstitialInletVelocityFvPatchVectorField::autoMap
|
void Foam::interstitialInletVelocityFvPatchVectorField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchVectorField::autoMap(m);
|
|
||||||
m(inletVelocity_, inletVelocity_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::interstitialInletVelocityFvPatchVectorField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchVectorField& ptf,
|
const fvPatchVectorField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchVectorField::rmap(ptf, addr);
|
fixedValueFvPatchVectorField::map(ptf, mapper);
|
||||||
|
|
||||||
const interstitialInletVelocityFvPatchVectorField& tiptf =
|
const interstitialInletVelocityFvPatchVectorField& tiptf =
|
||||||
refCast<const interstitialInletVelocityFvPatchVectorField>(ptf);
|
refCast<const interstitialInletVelocityFvPatchVectorField>(ptf);
|
||||||
|
|
||||||
inletVelocity_.rmap(tiptf.inletVelocity_, addr);
|
mapper(inletVelocity_, tiptf.inletVelocity_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -134,13 +134,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -149,28 +149,13 @@ mappedInternalValueFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::mappedInternalValueFvPatchField<Type>::autoMap
|
void Foam::mappedInternalValueFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchField<Type>::autoMap(m);
|
|
||||||
|
|
||||||
if (mapperPtr_.valid())
|
|
||||||
{
|
|
||||||
mapperPtr_->clearOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::mappedInternalValueFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchField<Type>::rmap(ptf, addr);
|
fixedValueFvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
if (mapperPtr_.valid())
|
if (mapperPtr_.valid())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -177,13 +177,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -207,28 +207,13 @@ Foam::mappedValueFvPatchField<Type>::mappedValueFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::mappedValueFvPatchField<Type>::autoMap
|
void Foam::mappedValueFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchField<Type>::autoMap(m);
|
|
||||||
|
|
||||||
if (mapperPtr_.valid())
|
|
||||||
{
|
|
||||||
mapperPtr_->clearOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::mappedValueFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchField<Type>::rmap(ptf, addr);
|
fixedValueFvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
if (mapperPtr_.valid())
|
if (mapperPtr_.valid())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -179,13 +179,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,29 +84,18 @@ Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::partialSlipFvPatchField<Type>::autoMap
|
void Foam::partialSlipFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transformFvPatchField<Type>::autoMap(m);
|
|
||||||
m(valueFraction_, valueFraction_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::partialSlipFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
transformFvPatchField<Type>::rmap(ptf, addr);
|
transformFvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
const partialSlipFvPatchField<Type>& dmptf =
|
const partialSlipFvPatchField<Type>& dmptf =
|
||||||
refCast<const partialSlipFvPatchField<Type>>(ptf);
|
refCast<const partialSlipFvPatchField<Type>>(ptf);
|
||||||
|
|
||||||
valueFraction_.rmap(dmptf.valueFraction_, addr);
|
mapper(valueFraction_, dmptf.valueFraction_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -145,13 +145,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,28 +92,18 @@ Foam::pressureFvPatchScalarField::pressureFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::pressureFvPatchScalarField::autoMap
|
void Foam::pressureFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchScalarField::autoMap(m);
|
|
||||||
m(p_, p_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::pressureFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchScalarField::rmap(ptf, addr);
|
fixedValueFvPatchScalarField::map(ptf, mapper);
|
||||||
|
|
||||||
const pressureFvPatchScalarField& tiptf =
|
const pressureFvPatchScalarField& tiptf =
|
||||||
refCast<const pressureFvPatchScalarField>(ptf);
|
refCast<const pressureFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
p_.rmap(tiptf.p_, addr);
|
mapper(p_, tiptf.p_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -157,13 +157,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -101,29 +101,19 @@ pressureDirectedInletOutletVelocityFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::autoMap
|
void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
mixedFvPatchVectorField::autoMap(m);
|
|
||||||
m(inletDir_, inletDir_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchVectorField& ptf,
|
const fvPatchVectorField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchVectorField::rmap(ptf, addr);
|
mixedFvPatchVectorField::map(ptf, mapper);
|
||||||
|
|
||||||
const pressureDirectedInletOutletVelocityFvPatchVectorField& tiptf =
|
const pressureDirectedInletOutletVelocityFvPatchVectorField& tiptf =
|
||||||
refCast<const pressureDirectedInletOutletVelocityFvPatchVectorField>
|
refCast<const pressureDirectedInletOutletVelocityFvPatchVectorField>
|
||||||
(ptf);
|
(ptf);
|
||||||
|
|
||||||
inletDir_.rmap(tiptf.inletDir_, addr);
|
mapper(inletDir_, tiptf.inletDir_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -199,13 +199,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -93,28 +93,18 @@ pressureDirectedInletVelocityFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::pressureDirectedInletVelocityFvPatchVectorField::autoMap
|
void Foam::pressureDirectedInletVelocityFvPatchVectorField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchVectorField::autoMap(m);
|
|
||||||
m(inletDir_, inletDir_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::pressureDirectedInletVelocityFvPatchVectorField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchVectorField& ptf,
|
const fvPatchVectorField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchVectorField::rmap(ptf, addr);
|
fixedValueFvPatchVectorField::map(ptf, mapper);
|
||||||
|
|
||||||
const pressureDirectedInletVelocityFvPatchVectorField& tiptf =
|
const pressureDirectedInletVelocityFvPatchVectorField& tiptf =
|
||||||
refCast<const pressureDirectedInletVelocityFvPatchVectorField>(ptf);
|
refCast<const pressureDirectedInletVelocityFvPatchVectorField>(ptf);
|
||||||
|
|
||||||
inletDir_.rmap(tiptf.inletDir_, addr);
|
mapper(inletDir_, tiptf.inletDir_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -196,13 +196,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,28 +92,18 @@ surfaceNormalFixedValueFvPatchVectorField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::surfaceNormalFixedValueFvPatchVectorField::autoMap
|
void Foam::surfaceNormalFixedValueFvPatchVectorField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchVectorField::autoMap(m);
|
|
||||||
m(refValue_, refValue_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::surfaceNormalFixedValueFvPatchVectorField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchVectorField& ptf,
|
const fvPatchVectorField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchVectorField::rmap(ptf, addr);
|
fixedValueFvPatchVectorField::map(ptf, mapper);
|
||||||
|
|
||||||
const surfaceNormalFixedValueFvPatchVectorField& tiptf =
|
const surfaceNormalFixedValueFvPatchVectorField& tiptf =
|
||||||
refCast<const surfaceNormalFixedValueFvPatchVectorField>(ptf);
|
refCast<const surfaceNormalFixedValueFvPatchVectorField>(ptf);
|
||||||
|
|
||||||
refValue_.rmap(tiptf.refValue_, addr);
|
mapper(refValue_, tiptf.refValue_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -149,13 +149,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchVectorField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchVectorField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -99,31 +99,18 @@ timeVaryingMappedFixedValueFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::autoMap
|
void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchField<Type>::autoMap(m);
|
|
||||||
fieldMapper_.autoMap(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchField<Type>::rmap(ptf, addr);
|
fixedValueFvPatchField<Type>::map(ptf, mapper);
|
||||||
fieldMapper_.rmap
|
fieldMapper_.map
|
||||||
(
|
(
|
||||||
refCast
|
refCast<const timeVaryingMappedFixedValueFvPatchField<Type>>(ptf)
|
||||||
<
|
.fieldMapper_,
|
||||||
const timeVaryingMappedFixedValueFvPatchField<Type>
|
mapper
|
||||||
>(ptf).fieldMapper_,
|
|
||||||
addr
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,10 +124,8 @@ void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::reset
|
|||||||
fixedValueFvPatchField<Type>::reset(ptf);
|
fixedValueFvPatchField<Type>::reset(ptf);
|
||||||
fieldMapper_.reset
|
fieldMapper_.reset
|
||||||
(
|
(
|
||||||
refCast
|
refCast<const timeVaryingMappedFixedValueFvPatchField<Type>>(ptf)
|
||||||
<
|
.fieldMapper_
|
||||||
const timeVaryingMappedFixedValueFvPatchField<Type>
|
|
||||||
>(ptf).fieldMapper_
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -185,13 +185,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -383,32 +383,14 @@ timeVaryingMappedFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::timeVaryingMappedFvPatchField<Type>::autoMap
|
void Foam::timeVaryingMappedFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (startSampledValues_.size())
|
|
||||||
{
|
|
||||||
m(startSampledValues_, startSampledValues_);
|
|
||||||
m(endSampledValues_, endSampledValues_);
|
|
||||||
}
|
|
||||||
// Clear interpolator
|
|
||||||
mapperPtr_.clear();
|
|
||||||
startSampleTime_ = -1;
|
|
||||||
endSampleTime_ = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::timeVaryingMappedFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const timeVaryingMappedFvPatchField<Type>& tiptf,
|
const timeVaryingMappedFvPatchField<Type>& tiptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
startSampledValues_.rmap(tiptf.startSampledValues_, addr);
|
mapper(startSampledValues_, tiptf.startSampledValues_);
|
||||||
endSampledValues_.rmap(tiptf.endSampledValues_, addr);
|
mapper(endSampledValues_, tiptf.endSampledValues_);
|
||||||
|
|
||||||
// Clear interpolator
|
// Clear interpolator
|
||||||
mapperPtr_.clear();
|
mapperPtr_.clear();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -215,15 +215,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given timeVaryingMappedFvPatchField
|
||||||
void autoMap(const fvPatchFieldMapper&);
|
|
||||||
|
|
||||||
//- Reverse map the given timeVaryingMappedFvPatchField
|
|
||||||
// onto this timeVaryingMappedFvPatchField
|
// onto this timeVaryingMappedFvPatchField
|
||||||
void rmap
|
void map
|
||||||
(
|
(
|
||||||
const timeVaryingMappedFvPatchField<Type>&,
|
const timeVaryingMappedFvPatchField<Type>&,
|
||||||
const labelList&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -108,28 +108,18 @@ Foam::totalTemperatureFvPatchScalarField::totalTemperatureFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::totalTemperatureFvPatchScalarField::autoMap
|
void Foam::totalTemperatureFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchScalarField::autoMap(m);
|
|
||||||
m(T0_, T0_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::totalTemperatureFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchScalarField::rmap(ptf, addr);
|
fixedValueFvPatchScalarField::map(ptf, mapper);
|
||||||
|
|
||||||
const totalTemperatureFvPatchScalarField& tiptf =
|
const totalTemperatureFvPatchScalarField& tiptf =
|
||||||
refCast<const totalTemperatureFvPatchScalarField>(ptf);
|
refCast<const totalTemperatureFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
T0_.rmap(tiptf.T0_, addr);
|
mapper(T0_, tiptf.T0_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -168,13 +168,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -118,28 +118,18 @@ transonicEntrainmentPressureFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::transonicEntrainmentPressureFvPatchScalarField::autoMap
|
void Foam::transonicEntrainmentPressureFvPatchScalarField::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
mixedFvPatchScalarField::autoMap(m);
|
|
||||||
m(p0_, p0_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::transonicEntrainmentPressureFvPatchScalarField::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& psf,
|
const fvPatchScalarField& psf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::rmap(psf, addr);
|
mixedFvPatchScalarField::map(psf, mapper);
|
||||||
|
|
||||||
const transonicEntrainmentPressureFvPatchScalarField& toppsf =
|
const transonicEntrainmentPressureFvPatchScalarField& toppsf =
|
||||||
refCast<const transonicEntrainmentPressureFvPatchScalarField>(psf);
|
refCast<const transonicEntrainmentPressureFvPatchScalarField>(psf);
|
||||||
|
|
||||||
p0_.rmap(toppsf.p0_, addr);
|
mapper(p0_, toppsf.p0_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -161,13 +161,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchScalarField&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -109,29 +109,18 @@ Foam::turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::turbulentInletFvPatchField<Type>::autoMap
|
void Foam::turbulentInletFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchField<Type>::autoMap(m);
|
|
||||||
m(referenceField_, referenceField_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::turbulentInletFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fixedValueFvPatchField<Type>::rmap(ptf, addr);
|
fixedValueFvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
const turbulentInletFvPatchField<Type>& tiptf =
|
const turbulentInletFvPatchField<Type>& tiptf =
|
||||||
refCast<const turbulentInletFvPatchField<Type>>(ptf);
|
refCast<const turbulentInletFvPatchField<Type>>(ptf);
|
||||||
|
|
||||||
referenceField_.rmap(tiptf.referenceField_, addr);
|
mapper(referenceField_, tiptf.referenceField_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -198,13 +198,12 @@ public:
|
|||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
//- Map the given fvPatchField onto this fvPatchField
|
||||||
// Used to update fields following mesh topology change
|
virtual void map
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
(
|
||||||
|
const fvPatchField<Type>&,
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
const fvPatchFieldMapper&
|
||||||
// Used to reconstruct fields
|
);
|
||||||
virtual void rmap(const fvPatchField<Type>&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
//- Reset the fvPatchField to the given fvPatchField
|
||||||
// Used for mesh to mesh mapping
|
// Used for mesh to mesh mapping
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -156,27 +156,13 @@ void Foam::uniformInletOutletFvPatchField<Type>::write(Ostream& os) const
|
|||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::uniformInletOutletFvPatchField<Type>::autoMap
|
void Foam::uniformInletOutletFvPatchField<Type>::map
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
mixedFvPatchField<Type>::autoMap(m);
|
|
||||||
|
|
||||||
// Override
|
|
||||||
this->refValue() =
|
|
||||||
uniformInletValue_->value(this->db().time().userTimeValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::uniformInletOutletFvPatchField<Type>::rmap
|
|
||||||
(
|
(
|
||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchField<Type>::rmap(ptf, addr);
|
mixedFvPatchField<Type>::map(ptf, mapper);
|
||||||
|
|
||||||
// Override
|
// Override
|
||||||
this->refValue() =
|
this->refValue() =
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user