ENH: add solverPerformance::fieldName(), simplified data::setSolverPerformance

This commit is contained in:
Mark Olesen
2010-06-02 10:21:26 +02:00
parent 4712e131d9
commit e1801bc74c
3 changed files with 24 additions and 2 deletions

View File

@ -152,6 +152,13 @@ public:
} }
//- Return field name
const word& fieldName() const
{
return fieldName_;
}
//- Return initial residual //- Return initial residual
scalar initialResidual() const scalar initialResidual() const
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -69,4 +69,13 @@ void Foam::data::setSolverPerformance
} }
void Foam::data::setSolverPerformance
(
const lduMatrix::solverPerformance& sp
) const
{
setSolverPerformance(sp.fieldName(), sp);
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -90,6 +90,12 @@ public:
const word& name, const word& name,
const lduMatrix::solverPerformance& const lduMatrix::solverPerformance&
) const; ) const;
//- Add/set the solverPerformance entry, using its fieldName
void setSolverPerformance
(
const lduMatrix::solverPerformance&
) const;
}; };