mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-27 01:31:00 -06:00
Moved KSPCreate to the Data constructor
This is where it was always intended to be called, so this fixes a mistake in earlier development.
This commit is contained in:
parent
7c78afa13d
commit
e69d92cca3
@ -139,6 +139,8 @@ namespace{
|
||||
CHKERRXX( err );
|
||||
MatSetFromOptions( A );
|
||||
MatSetUp( A );
|
||||
|
||||
KSPCreate( PETSC_COMM_WORLD, &ksp );
|
||||
}
|
||||
|
||||
~OEM_DATA() {
|
||||
@ -203,7 +205,6 @@ namespace{
|
||||
PetscReal residual;
|
||||
KSPConvergedReason reason;
|
||||
|
||||
KSPCreate( PETSC_COMM_WORLD, &t.ksp );
|
||||
KSPSetOperators( t.ksp, t.A, t.A, DIFFERENT_NONZERO_PATTERN );
|
||||
KSPGetPC( t.ksp, &t.preconditioner );
|
||||
auto err = KSPSetType( t.ksp, method );
|
||||
|
Loading…
Reference in New Issue
Block a user