Skip to content

Commit be2d605

Browse files
committed
fixed tests for optimization problems. Shortened transient test to 20 timesteps. Added diff forward output file instead of optimization reporter ref #42
1 parent 5c3f858 commit be2d605

17 files changed

+111
-80620
lines changed

examples/simpleTransient/adjoint.i

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
coord_y = measured_data/measurement_ycoord
5858
coord_z = measured_data/measurement_zcoord
5959
time = measured_data/measurement_time
60-
reverse_time_end = 1.01
60+
reverse_time_end = 1.05
6161
[]
6262
[]
6363

@@ -66,6 +66,7 @@
6666
type = CSVReader
6767
csv_file = source_params.csv
6868
header = true
69+
outputs = none
6970
[]
7071
[]
7172

@@ -84,19 +85,19 @@
8485
type = ElementOptimizationSourceFunctionInnerProduct
8586
variable = u
8687
function = source
87-
reverse_time_end = 1.01
88+
reverse_time_end = 1.05
8889
[]
8990
[]
9091

9192
[Executioner]
9293
type = Transient
9394

94-
num_steps = 100
95+
num_steps = 20
9596
end_time = 1
9697

9798
solve_type = NEWTON
98-
petsc_options_iname = '-pc_type -pc_hypre_type'
99-
petsc_options_value = 'hypre boomeramg'
99+
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
100+
petsc_options_value = 'preonly lu superlu_dist'
100101
[TimeIntegrator]
101102
type = ImplicitEuler
102103
[]

examples/simpleTransient/forward.i

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
type = CSVReader
2222
csv_file = source_params.csv
2323
header = true
24+
outputs=none
2425
[]
2526
[]
2627

@@ -73,12 +74,11 @@
7374

7475
[Executioner]
7576
type = Transient
76-
77-
num_steps = 100
77+
num_steps = 20
7878
end_time = 1
7979
solve_type = NEWTON
80-
petsc_options_iname = '-pc_type -pc_hypre_type'
81-
petsc_options_value = 'hypre boomeramg'
80+
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
81+
petsc_options_value = 'preonly lu superlu_dist'
8282
[TimeIntegrator]
8383
type = ImplicitEuler
8484
[]
@@ -95,11 +95,59 @@
9595
file_value = u
9696
variable = u
9797
execute_on = timestep_end
98-
outputs = csv
98+
outputs = none
99+
[]
100+
[]
101+
102+
[Postprocessors]
103+
[p0]
104+
type = PointValue
105+
outputs = 'out'
106+
point = '.5 .5 0'
107+
variable = u
108+
[]
109+
[p1]
110+
type = PointValue
111+
outputs = 'out'
112+
point = '.5 -.5 0'
113+
variable = u
114+
[]
115+
[p2]
116+
type = PointValue
117+
outputs = 'out'
118+
point = '-.5 -.5 0'
119+
variable = u
120+
[]
121+
[p3]
122+
type = PointValue
123+
outputs = 'out'
124+
point = '-.5 .5 0'
125+
variable = u
126+
[]
127+
[p4]
128+
type = PointValue
129+
outputs = 'out'
130+
point = '.7 -.7 0'
131+
variable = u
132+
[]
133+
[p5]
134+
type = PointValue
135+
outputs = 'out'
136+
point = '.4 -.6 0'
137+
variable = u
138+
[]
139+
[p6]
140+
type = PointValue
141+
outputs = 'out'
142+
point = '.6 -.4 0'
143+
variable = u
99144
[]
100145
[]
101146

102147
[Outputs]
103-
exodus = true
148+
exodus = false
104149
console = false
150+
[out]
151+
type = CSV
152+
[]
105153
[]

0 commit comments

Comments
 (0)