surfaceNormalFixedValueFvPatchVectorField: Update fixedValue field to handle mesh-motion

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1667
This commit is contained in:
Henry 2015-04-28 22:27:24 +01:00
parent fd0b7d87c6
commit 62f0ad175f
2 changed files with 20 additions and 2 deletions

View file

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -132,6 +132,18 @@ void Foam::surfaceNormalFixedValueFvPatchVectorField::rmap
}
void Foam::surfaceNormalFixedValueFvPatchVectorField::updateCoeffs()
{
if (updated())
{
return;
}
fvPatchVectorField::operator=(refValue_*patch().nf());
fvPatchVectorField::updateCoeffs();
}
void Foam::surfaceNormalFixedValueFvPatchVectorField::write(Ostream& os) const
{
fvPatchVectorField::write(os);

View file

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -175,6 +175,12 @@ public:
);
// Evaluation functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
//- Write
virtual void write(Ostream&) const;
};