mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-27 17:50:59 -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 );
|
CHKERRXX( err );
|
||||||
MatSetFromOptions( A );
|
MatSetFromOptions( A );
|
||||||
MatSetUp( A );
|
MatSetUp( A );
|
||||||
|
|
||||||
|
KSPCreate( PETSC_COMM_WORLD, &ksp );
|
||||||
}
|
}
|
||||||
|
|
||||||
~OEM_DATA() {
|
~OEM_DATA() {
|
||||||
@ -203,7 +205,6 @@ namespace{
|
|||||||
PetscReal residual;
|
PetscReal residual;
|
||||||
KSPConvergedReason reason;
|
KSPConvergedReason reason;
|
||||||
|
|
||||||
KSPCreate( PETSC_COMM_WORLD, &t.ksp );
|
|
||||||
KSPSetOperators( t.ksp, t.A, t.A, DIFFERENT_NONZERO_PATTERN );
|
KSPSetOperators( t.ksp, t.A, t.A, DIFFERENT_NONZERO_PATTERN );
|
||||||
KSPGetPC( t.ksp, &t.preconditioner );
|
KSPGetPC( t.ksp, &t.preconditioner );
|
||||||
auto err = KSPSetType( t.ksp, method );
|
auto err = KSPSetType( t.ksp, method );
|
||||||
|
Loading…
Reference in New Issue
Block a user