@@ -25,6 +25,31 @@ reader = pylith.meshio.MeshIOCubit
2525reader.filename = mesh_tri.exo
2626reader.coordsys.space_dim = 2
2727
28+ # ----------------------------------------------------------------------
29+ # solution
30+ # ----------------------------------------------------------------------
31+ [pylithapp.problem]
32+ # For a quastistatic simulation with a fault, we have two solution fields:
33+ # (1) displacement and (2) Lagrange multiplier. We use a predefined containter
34+ # to create a solution field with these two subfields.
35+ solution = pylith.problems.SolnDispLagrange
36+
37+ [pylithapp.problem.solution.subfields]
38+ displacement.basis_order = 1
39+ displacement.quadrature_order = 1
40+
41+ lagrange_fault.basis_order = 1
42+ lagrange_fault.quadrature_order = 1
43+
44+ [pylithapp.problem.solution_observers.domain]
45+ writer.filename = output/step01_slip_tri-domain.h5
46+
47+ [pylithapp.problem.solution_observers.top_boundary]
48+ writer.filename = output/step01_slip_tri-boundary_ypos.h5
49+
50+ [pylithapp.problem.solution_observers.bot_boundary]
51+ writer.filename = output/step01_slip_tri-boundary_yneg.h5
52+
2853# ----------------------------------------------------------------------
2954# solution
3055# ----------------------------------------------------------------------
@@ -46,14 +71,17 @@ solution_observers.top_boundary = pylith.meshio.OutputSolnBoundary
4671solution_observers.bot_boundary = pylith.meshio.OutputSolnBoundary
4772
4873[pylithapp.problem.solution_observers.domain]
74+ data_fields = [displacement]
4975# writer.filename = output/SIMULATION-domain.h5
5076
5177[pylithapp.problem.solution_observers.top_boundary]
5278label = face_ypos
79+ data_fields = [displacement]
5380# writer.filename = output/SIMULATION-boundary_ypos.h5
5481
5582[pylithapp.problem.solution_observers.bot_boundary]
5683label = face_yneg
84+ data_fields = [displacement]
5785# writer.filename = output/SIMULATION-boundary_yneg.h5
5886
5987# ----------------------------------------------------------------------
@@ -78,6 +106,7 @@ db_auxiliary_field = spatialdata.spatialdb.SimpleDB
78106db_auxiliary_field.label = Elastic properties xneg
79107db_auxiliary_field.iohandler.filename = elastic_xneg_matfields.spatialdb
80108
109+ observers.observer.data_fields = [displacement, cauchy_stress, cauchy_strain]
81110# observers.observer.writer.filename = output/SIMULATION-elastic_xneg.h5
82111
83112auxiliary_subfields.density.basis_order = 0
@@ -105,8 +134,8 @@ db_auxiliary_field = spatialdata.spatialdb.SimpleDB
105134db_auxiliary_field.label = Elastic properties xpos
106135db_auxiliary_field.iohandler.filename = elastic_xpos_matfields.spatialdb
107136
137+ observers.observer.data_fields = [displacement, cauchy_stress, cauchy_strain]
108138# observers.observer.writer.filename = output/SIMULATION-elastic_xpos.h5
109- observers.observer.field_filter = pylith.meshio.FieldFilterNone
110139
111140auxiliary_subfields.density.basis_order = 0
112141auxiliary_subfields.density.quadrature_order = 1
@@ -124,13 +153,65 @@ auxiliary_subfields.bulk_modulus.quadrature_order = 1
124153auxiliary_subfields.shear_modulus.basis_order = 0
125154auxiliary_subfields.shear_modulus.quadrature_order = 1
126155
156+ # ----------------------------------------------------------------------
157+ # fault
158+ # ----------------------------------------------------------------------
159+ [pylithapp.problem]
160+ interfaces = [fault]
161+
162+ [pylithapp.problem.interfaces.fault]
163+ # The label corresponds to the nodeset we created in CUBIT/Trelis for the fault.
164+ label = fault
165+
166+ # For the fault, we need to specify an id associated with the cohesive cells that is
167+ # different from any of the ids for the materials.
168+ id = 10
169+ observers.observer.data_fields = [slip]
170+ # observers.observer.writer.filename = output/SIMULATION_slip-fault.h5
171+
172+ # ----------------------------------------------------------------------
173+ # boundary conditions
174+ # ----------------------------------------------------------------------
175+ [pylithapp.problem]
176+ bc = [x_neg, x_pos]
177+ bc.x_neg = pylith.bc.DirichletTimeDependent
178+ bc.x_pos = pylith.bc.DirichletTimeDependent
179+
180+ [pylithapp.problem.bc.x_pos]
181+ constrained_dof = [0, 1]
182+ label = face_xpos
183+ db_auxiliary_field = pylith.bc.ZeroDB
184+ db_auxiliary_field.label = Dirichlet BC +x boundary
185+
186+ observers.observer.data_fields = [displacement]
187+ # observers.observer.writer.filename = output/SIMULATION_slip-bc_xpos.h5
188+
189+ [pylithapp.problem.bc.x_neg]
190+ constrained_dof = [0, 1]
191+ label = face_xneg
192+ db_auxiliary_field = pylith.bc.ZeroDB
193+ db_auxiliary_field.label = Dirichlet BC -x boundary
194+
195+ observers.observer.data_fields = [displacement]
196+ # observers.observer.writer.filename = output/SIMULATION_slip-bc_xneg.h5
197+
127198# ----------------------------------------------------------------------
128199# PETSc
129200# ----------------------------------------------------------------------
130201[pylithapp.petsc]
131202ts_type = beuler
132203
133- pc_type = ilu
204+ pc_type = fieldsplit
205+ pc_use_amat = true
206+ pc_fieldsplit_type = schur
207+ pc_fieldsplit_schur_factorization_type = full
208+ pc_fieldsplit_dm_splits = true
209+ fieldsplit_displacement_ksp_type = preonly
210+ fieldsplit_displacement_pc_type = lu
211+ fieldsplit_lagrange_multiplier_fault_pc_type = jacobi
212+ fieldsplit_lagrange_multiplier_fault_ksp_type = gmres
213+ fieldsplit_lagrange_multiplier_fault_ksp_rtol = 1.0e-11
214+ fieldsplit_lagrange_multiplier_fault_ksp_converged_reason = true
134215
135216ksp_rtol = 1.0e-8
136217ksp_atol = 1.0e-12
@@ -150,8 +231,8 @@ snes_monitor = true
150231snes_converged_reason = true
151232snes_linesearch_monitor = true
152233
153- ksp_view = true
154- snes_view = true
234+ # ksp_view = true
235+ # snes_view = true
155236
156237
157238# End of file
0 commit comments