ENH: fieldSources - added ability to apply source to eqn with specified name

This commit is contained in:
andy
2011-11-03 15:00:20 +00:00
parent 3a4d247cee
commit 99cbc2726d
2 changed files with 11 additions and 2 deletions

View File

@ -100,6 +100,10 @@ public:
template<class Type>
void apply(fvMatrix<Type>& eqn);
//- Apply sources to equation with specified name
template<class Type>
void apply(fvMatrix<Type>& eqn, const word& name);
// I-O

View File

@ -28,9 +28,14 @@ License
template<class Type>
void Foam::basicSourceList::apply(fvMatrix<Type>& eqn)
{
checkApplied();
apply(eqn, eqn.psi().name());
}
const word& fieldName = eqn.psi().name();
template<class Type>
void Foam::basicSourceList::apply(fvMatrix<Type>& eqn, const word& fieldName)
{
checkApplied();
forAll(*this, i)
{