Merge branch 'master' of /home/dm4/OpenFOAM/repositories/OpenFOAM-dev

This commit is contained in:
william
2014-01-02 17:38:02 +00:00
4 changed files with 46 additions and 9 deletions

View File

@ -132,6 +132,11 @@ int main(int argc, char *argv[])
)
);
// Note: both IOsampledSets and IOsampledSurfaces read the
// same dictionary. Unregister one to make sure no duplicates
// trying to register
sSetsPtr().checkOut();
sSurfsPtr.reset
(
new IOsampledSurfaces
@ -160,6 +165,8 @@ int main(int argc, char *argv[])
)
);
sSetsPtr().checkOut();
sSurfsPtr.reset
(
new IOsampledSurfaces

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,6 +25,7 @@ License
#include "fvSchemes.H"
#include "Time.H"
#include "steadyStateDdtScheme.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -108,6 +109,11 @@ void Foam::fvSchemes::read(const dictionary& dict)
)
{
defaultDdtScheme_ = ddtSchemes_.lookup("default");
steady_ =
(
word(defaultDdtScheme_)
== fv::steadyStateDdtScheme<scalar>::typeName
);
}
@ -364,7 +370,8 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
tokenList()
)()
),
defaultFluxRequired_(false)
defaultFluxRequired_(false),
steady_(false)
{
// persistent settings across reads is incorrect
clear();

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-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,6 +78,10 @@ class fvSchemes
dictionary fluxRequired_;
bool defaultFluxRequired_;
//- Steady-state run indicator
// Set true if the default ddtScheme is steadyState
bool steady_;
// Private Member Functions
@ -128,6 +132,18 @@ public:
bool fluxRequired(const word& name) const;
//- Return true if the default ddtScheme is steadyState
bool steady() const
{
return steady_;
}
//- Return true if the default ddtScheme is not steadyState
bool transient() const
{
return !steady_;
}
// Read

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -2348,12 +2348,19 @@ Foam::operator&
GeometricField<Type, fvPatchField, volMesh>& Mphi = tMphi();
// Loop over field components
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
if (M.hasDiag())
{
scalarField psiCmpt(psi.field().component(cmpt));
scalarField boundaryDiagCmpt(M.diag());
M.addBoundaryDiag(boundaryDiagCmpt, cmpt);
Mphi.internalField().replace(cmpt, -boundaryDiagCmpt*psiCmpt);
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
{
scalarField psiCmpt(psi.field().component(cmpt));
scalarField boundaryDiagCmpt(M.diag());
M.addBoundaryDiag(boundaryDiagCmpt, cmpt);
Mphi.internalField().replace(cmpt, -boundaryDiagCmpt*psiCmpt);
}
}
else
{
Mphi.internalField() = pTraits<Type>::zero;
}
Mphi.internalField() += M.lduMatrix::H(psi.field()) + M.source();