added: allow specifying solver params for L2-projection

This commit is contained in:
Arne Morten Kvarving 2020-11-25 16:45:46 +01:00
parent 5578028655
commit 03e565e3a5

View File

@ -807,8 +807,14 @@ bool SIMinput::parse (const TiXmlElement* elem)
result &= mySolParams->read(elem);
if (GlbL2::MatrixType == LinAlg::PETSC)
{
// For now use same solver parameters in the L2-projection
myGl2Params = new LinSolParams(*mySolParams,LinAlg::SYMMETRIC);
const TiXmlElement* l2 = elem->FirstChildElement("l2params");
if (l2) {
myGl2Params = new LinSolParams(LinAlg::SYMMETRIC);
myGl2Params->read(l2);
} else {
// Use regular solver parameters in the L2-projection
myGl2Params = new LinSolParams(*mySolParams,LinAlg::SYMMETRIC);
}
GlbL2::SolverParams = myGl2Params;
}
}