BUG: atmBoundaryLayer: missing mapping functions

This commit is contained in:
mattijs
2012-07-23 15:11:42 +01:00
parent f28d44d680
commit ea4e23eedf
3 changed files with 56 additions and 8 deletions

View File

@ -71,9 +71,9 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
kappa_(ptf.kappa_), kappa_(ptf.kappa_),
Uref_(ptf.Uref_), Uref_(ptf.Uref_),
Href_(ptf.Href_), Href_(ptf.Href_),
z0_(ptf.z0_), z0_(ptf.z0_, mapper),
zGround_(ptf.zGround_), zGround_(ptf.zGround_, mapper),
Ustar_(ptf.Ustar_) Ustar_(ptf.Ustar_, mapper)
{} {}

View File

@ -68,14 +68,14 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
) )
: :
fixedValueFvPatchVectorField(ptf, p, iF, mapper), fixedValueFvPatchVectorField(ptf, p, iF, mapper),
Ustar_(ptf.Ustar_), Ustar_(ptf.Ustar_, mapper),
n_(ptf.n_), n_(ptf.n_),
z_(ptf.z_), z_(ptf.z_),
z0_(ptf.z0_), z0_(ptf.z0_, mapper),
kappa_(ptf.kappa_), kappa_(ptf.kappa_),
Uref_(ptf.Uref_), Uref_(ptf.Uref_),
Href_(ptf.Href_), Href_(ptf.Href_),
zGround_(ptf.zGround_) zGround_(ptf.zGround_, mapper)
{} {}
@ -145,6 +145,35 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap
(
const fvPatchFieldMapper& m
)
{
fixedValueFvPatchVectorField::autoMap(m);
z0_.autoMap(m);
zGround_.autoMap(m);
Ustar_.autoMap(m);
}
void atmBoundaryLayerInletVelocityFvPatchVectorField::rmap
(
const fvPatchVectorField& ptf,
const labelList& addr
)
{
fixedValueFvPatchVectorField::rmap(ptf, addr);
const atmBoundaryLayerInletVelocityFvPatchVectorField& blptf =
refCast<const atmBoundaryLayerInletVelocityFvPatchVectorField>(ptf);
z0_.rmap(blptf.z0_, addr);
zGround_.rmap(blptf.zGround_, addr);
Ustar_.rmap(blptf.Ustar_, addr);
}
void atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs() void atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs()
{ {
const vectorField& c = patch().Cf(); const vectorField& c = patch().Cf();

View File

@ -198,8 +198,27 @@ public:
return z_; return z_;
} }
//- Update coefficients // Mapping functions
virtual void updateCoeffs();
//- 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 coefficients
virtual void updateCoeffs();
//- Write //- Write
virtual void write(Ostream&) const; virtual void write(Ostream&) const;