Skip to content

Commit c4b6a38

Browse files
MurthyMurthy
authored andcommitted
Transient inversion: Introduced an example with gradient check,
modifying the code to make the gradient check pass (by making it consistent with discretize then differentiate strategy). Added Hessian inversion with associated test case, and verified that it converges as expected. Also added code functionality to facilitate consistent gradient inverse for time steppers beyond implicit Euler. ref #42
1 parent fba1b6a commit c4b6a38

File tree

16 files changed

+80775
-40465
lines changed

16 files changed

+80775
-40465
lines changed

examples/simpleTransient/adjoint.i

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
coord_y = src_values/coordy
7777
time = src_values/time
7878
value = src_values/values
79+
time_shift_factor = 0.5
7980
[]
8081
[]
8182

@@ -97,6 +98,9 @@
9798
solve_type = NEWTON
9899
petsc_options_iname = '-pc_type -pc_hypre_type'
99100
petsc_options_value = 'hypre boomeramg'
101+
[TimeIntegrator]
102+
type = ImplicitEuler
103+
[]
100104
[]
101105

102106
[Outputs]

examples/simpleTransient/forward.i

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
[]
2525
[]
2626

27-
[ICs]
28-
[initial]
29-
type = FunctionIC
30-
variable = u
31-
function = exact
32-
[]
33-
[]
27+
#[ICs]
28+
# [initial]
29+
# type = FunctionIC
30+
# variable = u
31+
# function = exact
32+
# []
33+
#[]
3434

3535
[Kernels]
3636
[dt]
@@ -76,10 +76,12 @@
7676

7777
num_steps = 100
7878
end_time = 1
79-
8079
solve_type = NEWTON
8180
petsc_options_iname = '-pc_type -pc_hypre_type'
8281
petsc_options_value = 'hypre boomeramg'
82+
[TimeIntegrator]
83+
type = ImplicitEuler
84+
[]
8385
[]
8486

8587
[Reporters]

0 commit comments

Comments
 (0)