Skip to content
Snippets Groups Projects
Commit 45a00a13 authored by Henry's avatar Henry
Browse files

interstitialInletVelocity: corrected mapping for decomposition and reconstruction

parent 16a89a6f
Branches
Tags
No related merge requests found
......@@ -38,7 +38,7 @@ interstitialInletVelocityFvPatchVectorField
const DimensionedField<vector, volMesh>& iF
)
:
fixedValueFvPatchField<vector>(p, iF),
fixedValueFvPatchVectorField(p, iF),
inletVelocity_(p.size(), vector::zero),
alphaName_("alpha")
{}
......@@ -53,8 +53,8 @@ interstitialInletVelocityFvPatchVectorField
const fvPatchFieldMapper& mapper
)
:
fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
inletVelocity_(ptf.inletVelocity_),
fixedValueFvPatchVectorField(ptf, p, iF, mapper),
inletVelocity_(ptf.inletVelocity_, mapper),
alphaName_(ptf.alphaName_)
{}
......@@ -67,7 +67,7 @@ interstitialInletVelocityFvPatchVectorField
const dictionary& dict
)
:
fixedValueFvPatchField<vector>(p, iF, dict),
fixedValueFvPatchVectorField(p, iF, dict),
inletVelocity_("inletVelocity", dict, p.size()),
alphaName_(dict.lookupOrDefault<word>("alpha", "alpha"))
{}
......@@ -79,7 +79,7 @@ interstitialInletVelocityFvPatchVectorField
const interstitialInletVelocityFvPatchVectorField& ptf
)
:
fixedValueFvPatchField<vector>(ptf),
fixedValueFvPatchVectorField(ptf),
inletVelocity_(ptf.inletVelocity_),
alphaName_(ptf.alphaName_)
{}
......@@ -92,7 +92,7 @@ interstitialInletVelocityFvPatchVectorField
const DimensionedField<vector, volMesh>& iF
)
:
fixedValueFvPatchField<vector>(ptf, iF),
fixedValueFvPatchVectorField(ptf, iF),
inletVelocity_(ptf.inletVelocity_),
alphaName_(ptf.alphaName_)
{}
......@@ -100,6 +100,31 @@ interstitialInletVelocityFvPatchVectorField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::interstitialInletVelocityFvPatchVectorField::autoMap
(
const fvPatchFieldMapper& m
)
{
fixedValueFvPatchVectorField::autoMap(m);
inletVelocity_.autoMap(m);
}
void Foam::interstitialInletVelocityFvPatchVectorField::rmap
(
const fvPatchVectorField& ptf,
const labelList& addr
)
{
fixedValueFvPatchVectorField::rmap(ptf, addr);
const interstitialInletVelocityFvPatchVectorField& tiptf =
refCast<const interstitialInletVelocityFvPatchVectorField>(ptf);
inletVelocity_.rmap(tiptf.inletVelocity_, addr);
}
void Foam::interstitialInletVelocityFvPatchVectorField::updateCoeffs()
{
if (updated())
......@@ -111,7 +136,7 @@ void Foam::interstitialInletVelocityFvPatchVectorField::updateCoeffs()
patch().lookupPatchField<volScalarField, scalar>(alphaName_);
operator==(inletVelocity_/alphap);
fixedValueFvPatchField<vector>::updateCoeffs();
fixedValueFvPatchVectorField::updateCoeffs();
}
......
......@@ -141,8 +141,26 @@ public:
// Member functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const fvPatchVectorField&,
const labelList&
);
// Evaluation functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
//- Write
virtual void write(Ostream&) const;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment