Skip to content
Snippets Groups Projects
Commit 9e6b53a6 authored by Simone Bnà's avatar Simone Bnà
Browse files

ENH: substitued sub_ with eqn_ in the prefix

parent 06a957b9
Branches
Tags v2012
No related merge requests found
...@@ -99,7 +99,7 @@ Foam::petscSolver::petscSolver ...@@ -99,7 +99,7 @@ Foam::petscSolver::petscSolver
), ),
petscDict_(solverControls.subDict("petsc")), petscDict_(solverControls.subDict("petsc")),
eqName_(fieldName), eqName_(fieldName),
prefix_("sub_" + eqName_ + "_") prefix_("eqn_" + eqName_ + "_")
{} {}
...@@ -305,7 +305,7 @@ void Foam::petscSolver::buildKsp ...@@ -305,7 +305,7 @@ void Foam::petscSolver::buildKsp
// Create parallel solver context // Create parallel solver context
KSPCreate(PETSC_COMM_WORLD, &ksp); KSPCreate(PETSC_COMM_WORLD, &ksp);
// Set the prefix for the options db (e.g. -sub_p_) // Set the prefix for the options db (e.g. -eqn_p_)
KSPSetOptionsPrefix(ksp, prefix_.c_str()); KSPSetOptionsPrefix(ksp, prefix_.c_str());
// ksp set operator and preconditioner // ksp set operator and preconditioner
...@@ -408,7 +408,7 @@ void Foam::petscSolver::computeMatAllocation ...@@ -408,7 +408,7 @@ void Foam::petscSolver::computeMatAllocation
MatCreate(PETSC_COMM_WORLD, &Amat); MatCreate(PETSC_COMM_WORLD, &Amat);
MatSetSizes(Amat, nrows_, nrows_, PETSC_DECIDE, PETSC_DECIDE); MatSetSizes(Amat, nrows_, nrows_, PETSC_DECIDE, PETSC_DECIDE);
// Set the prefix for the options db (e.g. -sub_p_) // Set the prefix for the options db (e.g. -eqn_p_)
MatSetOptionsPrefix(Amat, prefix_.c_str()); MatSetOptionsPrefix(Amat, prefix_.c_str());
dictionary matDict = petscDict_.subOrEmptyDict("matCoeffs"); dictionary matDict = petscDict_.subOrEmptyDict("matCoeffs");
PetscUtils::setFlags(prefix_ + "mat_", matDict); PetscUtils::setFlags(prefix_ + "mat_", matDict);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment