Skip to content

Commit

Permalink
start working on FunctionIC gradient test (idaholab#3312)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Jun 23, 2014
1 parent 6d7d73b commit ae595eb
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
69 changes: 69 additions & 0 deletions test/tests/ics/function_ic/parsed_function.i
@@ -0,0 +1,69 @@
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.141
ymin = 3.141
ymax = 1
nx = 10
ny = 10
[]

[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]

[Functions]
[./parsed_function]
type = ParsedGradFunction
value = 'sin(x)-cos(y/2)'
[../]
[./parsed_grad_function]
type =ParsedGradFunction
value = 'sin(x)-cos(y/2)'
grad_x = 'cos(x)'
grad_y = 'sin(y/2)/2'
[../]
[./parsed_zerograd_function]
type = ParsedGradFunction
value = 'sin(x)-cos(y/2)'
grad_x = '0'
grad_y = '0'
[../]
[]

[ICs]
[./u_ic]
type = FunctionIC
variable = 'u'
function = parsed_function
[../]
[]

[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]

[Executioner]
type = Steady
[]

[Outputs]
output_initial = true
file_base = parsed
[./OverSampling]
type = Exodus
refinements = 3
oversample = true
[../]
[./console]
type = Console
perf_log = false
[../]
[]
13 changes: 13 additions & 0 deletions test/tests/ics/function_ic/tests
@@ -0,0 +1,13 @@
[Tests]
[./parsed_function]
type = 'Exodiff'
input = 'parsed_function.i'
exodiff = 'parsed_function.e'
[../]

[./spline_function]
type = 'Exodiff'
input = 'spline_function.i'
exodiff = 'spline_function.e'
[../]
[]

0 comments on commit ae595eb

Please sign in to comment.