File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 20
20
- name : Create Conda environment
21
21
shell : bash -l {0}
22
22
run : |
23
- conda install -c conda-forge fenics-dolfinx=0.8 .0
23
+ conda install -c conda-forge fenics-dolfinx=0.9 .0
24
24
25
25
- name : Install local package and dependencies
26
26
shell : bash -l {0}
Original file line number Diff line number Diff line change 6
6
runs-on : ubuntu-latest
7
7
strategy :
8
8
matrix :
9
- container_version : [v0.8 .0, nightly]
9
+ container_version : [v0.9 .0, nightly]
10
10
container : dolfinx/dolfinx:${{ matrix.container_version }}
11
11
steps :
12
12
- name : Checkout code
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ def __init__(
24
24
subdomains = None ,
25
25
boundary_conditions = None ,
26
26
settings = None ,
27
+ petcs_options = None ,
27
28
) -> None :
28
29
self .mesh = mesh
29
30
# for arguments to initialise as empty list
@@ -42,6 +43,7 @@ def __init__(
42
43
self .formulation = None
43
44
self .bc_forms = []
44
45
self .show_progress_bar = True
46
+ self .petcs_options = petcs_options
45
47
46
48
@property
47
49
def volume_subdomains (self ):
@@ -102,6 +104,13 @@ def create_solver(self):
102
104
self .solver .rtol = self .settings .rtol
103
105
self .solver .max_it = self .settings .max_iterations
104
106
107
+ if self .petcs_options is None :
108
+ ksp = self .solver .krylov_solver
109
+ ksp .setType ("preonly" )
110
+ ksp .getPC ().setType ("lu" )
111
+ ksp .getPC ().setFactorSolverType ("mumps" )
112
+ ksp .setErrorIfNotConverged (True )
113
+
105
114
def run (self ):
106
115
"""Runs the model"""
107
116
You can’t perform that action at this time.
0 commit comments