fvPatchField: Corrected propagation of patchType
The construction of some patch fields has been corrected so that the patchType setting always propagates on mapping, IO, clone, etc... Dictionary and mapping-based patch field constructors now call the corresponding constructor from the base class, regardless of whether dictionary settings or mapping are actually needed. A "mappingRequired" flag has been added to some of the base constructors in order to prevent unecessary mapping of field data and retain the previous level of optimisation. Resolves bug report https://bugs.openfoam.org/view.php?id=3144
This commit is contained in:
@ -123,11 +123,10 @@ ${typeName}FixedValuePointPatch${FieldType}
|
|||||||
(
|
(
|
||||||
const pointPatch& p,
|
const pointPatch& p,
|
||||||
const DimensionedField<${TemplateType}, pointMesh>& iF,
|
const DimensionedField<${TemplateType}, pointMesh>& iF,
|
||||||
const dictionary& dict,
|
const dictionary& dict
|
||||||
const bool valueRequired
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<${TemplateType}>(p, iF, dict, valueRequired)
|
fixedValuePointPatchField<${TemplateType}>(p, iF, dict)
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
|
|||||||
@ -73,8 +73,7 @@ public:
|
|||||||
(
|
(
|
||||||
const pointPatch&,
|
const pointPatch&,
|
||||||
const DimensionedField<${TemplateType}, pointMesh>&,
|
const DimensionedField<${TemplateType}, pointMesh>&,
|
||||||
const dictionary&,
|
const dictionary&
|
||||||
const bool valueRequired=true
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping a copy onto a new patch
|
//- Construct by mapping a copy onto a new patch
|
||||||
|
|||||||
@ -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) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -210,11 +210,10 @@ Foam::codedFixedValuePointPatchField<Type>::codedFixedValuePointPatchField
|
|||||||
(
|
(
|
||||||
const pointPatch& p,
|
const pointPatch& p,
|
||||||
const DimensionedField<Type, pointMesh>& iF,
|
const DimensionedField<Type, pointMesh>& iF,
|
||||||
const dictionary& dict,
|
const dictionary& dict
|
||||||
const bool valueRequired
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<Type>(p, iF, dict, valueRequired),
|
fixedValuePointPatchField<Type>(p, iF, dict),
|
||||||
codedBase(),
|
codedBase(),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
name_
|
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) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -167,8 +167,7 @@ public:
|
|||||||
(
|
(
|
||||||
const pointPatch&,
|
const pointPatch&,
|
||||||
const DimensionedField<Type, pointMesh>&,
|
const DimensionedField<Type, pointMesh>&,
|
||||||
const dictionary&,
|
const dictionary&
|
||||||
const bool valueRequired=true
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given codedFixedValuePointPatchField
|
//- Construct by mapping given codedFixedValuePointPatchField
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -67,10 +67,11 @@ Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
|
|||||||
const calculatedFvPatchField<Type>& ptf,
|
const calculatedFvPatchField<Type>& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper,
|
||||||
|
const bool mappingRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fvPatchField<Type>(ptf, p, iF, mapper)
|
fvPatchField<Type>(ptf, p, iF, mapper, mappingRequired)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -94,7 +94,8 @@ public:
|
|||||||
const calculatedFvPatchField<Type>&,
|
const calculatedFvPatchField<Type>&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<Type, volMesh>&,
|
const DimensionedField<Type, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&,
|
||||||
|
const bool mappingRequired=true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,11 +58,12 @@ Foam::coupledFvPatchField<Type>::coupledFvPatchField
|
|||||||
const coupledFvPatchField<Type>& ptf,
|
const coupledFvPatchField<Type>& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper,
|
||||||
|
const bool mappingRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
LduInterfaceField<Type>(refCast<const lduInterface>(p)),
|
LduInterfaceField<Type>(refCast<const lduInterface>(p)),
|
||||||
fvPatchField<Type>(ptf, p, iF, mapper)
|
fvPatchField<Type>(ptf, p, iF, mapper, mappingRequired)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -93,7 +93,8 @@ public:
|
|||||||
const coupledFvPatchField<Type>&,
|
const coupledFvPatchField<Type>&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<Type, volMesh>&,
|
const DimensionedField<Type, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&,
|
||||||
|
const bool mappingRequired=true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -69,12 +69,13 @@ Foam::fixedValueFvPatchField<Type>::fixedValueFvPatchField
|
|||||||
const fixedValueFvPatchField<Type>& ptf,
|
const fixedValueFvPatchField<Type>& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper,
|
||||||
|
const bool mappingRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fvPatchField<Type>(ptf, p, iF, mapper)
|
fvPatchField<Type>(ptf, p, iF, mapper, mappingRequired)
|
||||||
{
|
{
|
||||||
if (notNull(iF) && mapper.hasUnmapped())
|
if (mappingRequired && notNull(iF) && mapper.hasUnmapped())
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "On field " << iF.name() << " patch " << p.name()
|
<< "On field " << iF.name() << " patch " << p.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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -107,7 +107,8 @@ public:
|
|||||||
const fixedValueFvPatchField<Type>&,
|
const fixedValueFvPatchField<Type>&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<Type, volMesh>&,
|
const DimensionedField<Type, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&,
|
||||||
|
const bool mappingRequired=true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,15 +64,16 @@ Foam::mixedFvPatchField<Type>::mixedFvPatchField
|
|||||||
const mixedFvPatchField<Type>& ptf,
|
const mixedFvPatchField<Type>& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper,
|
||||||
|
const bool mappingRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fvPatchField<Type>(ptf, p, iF, mapper),
|
fvPatchField<Type>(ptf, p, iF, mapper, mappingRequired),
|
||||||
refValue_(ptf.refValue_, mapper),
|
refValue_(ptf.refValue_, mapper),
|
||||||
refGrad_(ptf.refGrad_, mapper),
|
refGrad_(ptf.refGrad_, mapper),
|
||||||
valueFraction_(ptf.valueFraction_, mapper)
|
valueFraction_(ptf.valueFraction_, mapper)
|
||||||
{
|
{
|
||||||
if (notNull(iF) && mapper.hasUnmapped())
|
if (mappingRequired && notNull(iF) && mapper.hasUnmapped())
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "On field " << iF.name() << " patch " << p.name()
|
<< "On field " << iF.name() << " patch " << p.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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -125,7 +125,8 @@ public:
|
|||||||
const mixedFvPatchField<Type>&,
|
const mixedFvPatchField<Type>&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<Type, volMesh>&,
|
const DimensionedField<Type, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&,
|
||||||
|
const bool mappingRequired=true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
|
|||||||
@ -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) 2016-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -34,8 +34,10 @@ Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
|
|||||||
const DimensionedField<vector, volMesh>& iF
|
const DimensionedField<vector, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchVectorField(p, iF, Zero)
|
fixedValueFvPatchVectorField(p, iF)
|
||||||
{}
|
{
|
||||||
|
operator==(Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
|
Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
|
||||||
@ -45,8 +47,10 @@ Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchVectorField(p, iF, Zero)
|
fixedValueFvPatchVectorField(p, iF, dict, false)
|
||||||
{}
|
{
|
||||||
|
operator==(Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
|
Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
|
||||||
@ -57,8 +61,10 @@ Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchVectorField(p, iF, Zero)
|
fixedValueFvPatchVectorField(ptf, p, iF, mapper, false) // Don't map
|
||||||
{}
|
{
|
||||||
|
operator==(Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
|
Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -76,7 +76,7 @@ Foam::uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(p, iF), // Don't map
|
fixedValueFvPatchField<Type>(ptf, p, iF, mapper, false), // Don't map
|
||||||
uniformValue_(ptf.uniformValue_, false)
|
uniformValue_(ptf.uniformValue_, false)
|
||||||
{
|
{
|
||||||
// Evaluate since value not mapped
|
// Evaluate since value not mapped
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,7 +84,7 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchField<Type>(p, iF), // Don't map
|
mixedFvPatchField<Type>(ptf, p, iF, mapper, false), // Don't map
|
||||||
phiName_(ptf.phiName_),
|
phiName_(ptf.phiName_),
|
||||||
uniformInletValue_(ptf.uniformInletValue_, false)
|
uniformInletValue_(ptf.uniformInletValue_, false)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -88,7 +88,7 @@ uniformTotalPressureFvPatchScalarField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(p, iF), // Don't map
|
fixedValueFvPatchScalarField(ptf, p, iF, mapper, false), // Don't map
|
||||||
UName_(ptf.UName_),
|
UName_(ptf.UName_),
|
||||||
phiName_(ptf.phiName_),
|
phiName_(ptf.phiName_),
|
||||||
rhoName_(ptf.rhoName_),
|
rhoName_(ptf.rhoName_),
|
||||||
|
|||||||
@ -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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,40 +47,6 @@ Foam::fvPatchField<Type>::fvPatchField
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Foam::fvPatchField<Type>::fvPatchField
|
|
||||||
(
|
|
||||||
const fvPatch& p,
|
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
|
||||||
const Type& value
|
|
||||||
)
|
|
||||||
:
|
|
||||||
Field<Type>(p.size(), value),
|
|
||||||
patch_(p),
|
|
||||||
internalField_(iF),
|
|
||||||
updated_(false),
|
|
||||||
manipulatedMatrix_(false),
|
|
||||||
patchType_(word::null)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Foam::fvPatchField<Type>::fvPatchField
|
|
||||||
(
|
|
||||||
const fvPatch& p,
|
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
|
||||||
const word& patchType
|
|
||||||
)
|
|
||||||
:
|
|
||||||
Field<Type>(p.size()),
|
|
||||||
patch_(p),
|
|
||||||
internalField_(iF),
|
|
||||||
updated_(false),
|
|
||||||
manipulatedMatrix_(false),
|
|
||||||
patchType_(patchType)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::fvPatchField<Type>::fvPatchField
|
Foam::fvPatchField<Type>::fvPatchField
|
||||||
(
|
(
|
||||||
@ -141,7 +107,8 @@ Foam::fvPatchField<Type>::fvPatchField
|
|||||||
const fvPatchField<Type>& ptf,
|
const fvPatchField<Type>& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper,
|
||||||
|
const bool mappingRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Field<Type>(p.size()),
|
Field<Type>(p.size()),
|
||||||
@ -151,12 +118,15 @@ Foam::fvPatchField<Type>::fvPatchField
|
|||||||
manipulatedMatrix_(false),
|
manipulatedMatrix_(false),
|
||||||
patchType_(ptf.patchType_)
|
patchType_(ptf.patchType_)
|
||||||
{
|
{
|
||||||
|
if (mappingRequired)
|
||||||
|
{
|
||||||
// For unmapped faces set to internal field value (zero-gradient)
|
// For unmapped faces set to internal field value (zero-gradient)
|
||||||
if (notNull(iF) && mapper.hasUnmapped())
|
if (notNull(iF) && mapper.hasUnmapped())
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::operator=(this->patchInternalField());
|
fvPatchField<Type>::operator=(this->patchInternalField());
|
||||||
}
|
}
|
||||||
this->map(ptf, mapper);
|
this->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-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -171,22 +171,6 @@ public:
|
|||||||
const DimensionedField<Type, volMesh>&
|
const DimensionedField<Type, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from patch, internal field and value
|
|
||||||
fvPatchField
|
|
||||||
(
|
|
||||||
const fvPatch&,
|
|
||||||
const DimensionedField<Type, volMesh>&,
|
|
||||||
const Type& value
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from patch and internal field and patch type
|
|
||||||
fvPatchField
|
|
||||||
(
|
|
||||||
const fvPatch&,
|
|
||||||
const DimensionedField<Type, volMesh>&,
|
|
||||||
const word& patchType
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from patch and internal field and patch field
|
//- Construct from patch and internal field and patch field
|
||||||
fvPatchField
|
fvPatchField
|
||||||
(
|
(
|
||||||
@ -210,7 +194,8 @@ public:
|
|||||||
const fvPatchField<Type>&,
|
const fvPatchField<Type>&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<Type, volMesh>&,
|
const DimensionedField<Type, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&,
|
||||||
|
const bool mappingRequired=true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
|
|||||||
Reference in New Issue
Block a user