forked from idaholab/moose
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable ElementalIndicators to work with FV variables. Refs idaholab#16069
- Loading branch information
Showing
8 changed files
with
198 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
test/tests/indicators/analytical_indicator/analytical_indicator_fv.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
nx = 20 | ||
ny = 1 | ||
[] | ||
|
||
[Variables] | ||
[u] | ||
order = CONSTANT | ||
family = MONOMIAL | ||
fv = true | ||
[] | ||
[] | ||
|
||
[Problem] | ||
kernel_coverage_check = false | ||
[] | ||
|
||
[Functions] | ||
[solution] | ||
type = ParsedFunction | ||
value = (exp(x)-1)/(exp(1)-1) | ||
[] | ||
[] | ||
|
||
[FVKernels] | ||
[diff] | ||
type = FVDiffusion | ||
variable = u | ||
coeff = coeff | ||
[] | ||
[conv] | ||
type = FVAdvection | ||
variable = u | ||
velocity = '1 0 0' | ||
[] | ||
[] | ||
|
||
[FVBCs] | ||
[left] | ||
type = FVDirichletBC | ||
variable = u | ||
boundary = left | ||
value = 0 | ||
[] | ||
[right] | ||
type = FVDirichletBC | ||
variable = u | ||
boundary = right | ||
value = 1 | ||
[] | ||
[] | ||
|
||
[Materials] | ||
[diff] | ||
type = ADGenericConstantMaterial | ||
prop_names = 'coeff' | ||
prop_values = '1' | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Steady | ||
solve_type = NEWTON | ||
[] | ||
|
||
[Adaptivity] | ||
[Indicators] | ||
[error] | ||
type = AnalyticalIndicator | ||
variable = u | ||
function = solution | ||
[] | ||
[] | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[] |
Binary file added
BIN
+36.3 KB
test/tests/indicators/analytical_indicator/gold/analytical_indicator_fv_out.e
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
[Tests] | ||
issues = '#1275' | ||
issues = '#1275 #16069' | ||
design = 'AnalyticalIndicator.md' | ||
|
||
[./test] | ||
[analytical] | ||
type = 'Exodiff' | ||
input = 'analytical_indicator_test.i' | ||
exodiff = 'analytical_indicator_test_out.e' | ||
scale_refine = 2 | ||
|
||
requirement = "The system shall include the ability to compute the square of the difference between a solution variable and an analytical function for the purpose of performing automatic mesh adaptivity." | ||
[../] | ||
[] | ||
[analytical_fv] | ||
type = 'Exodiff' | ||
input = 'analytical_indicator_fv.i' | ||
exodiff = 'analytical_indicator_fv_out.e' | ||
requirement = "The system shall include the ability to compute the square of the difference between a FV solution variable and an analytical function for the purpose of performing automatic mesh adaptivity." | ||
[] | ||
[] |
92 changes: 92 additions & 0 deletions
92
test/tests/markers/error_fraction_marker/error_fraction_marker_fv.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
nx = 10 | ||
ny = 10 | ||
[] | ||
|
||
[Variables] | ||
[u] | ||
order = CONSTANT | ||
family = MONOMIAL | ||
fv = true | ||
[] | ||
[] | ||
|
||
[Problem] | ||
kernel_coverage_check = false | ||
[] | ||
|
||
[Functions] | ||
[solution] | ||
type = ParsedFunction | ||
value = (exp(x)-1)/(exp(1)-1) | ||
[] | ||
[] | ||
|
||
[FVKernels] | ||
[diff] | ||
type = FVDiffusion | ||
variable = u | ||
coeff = coeff | ||
[] | ||
[conv] | ||
type = FVAdvection | ||
variable = u | ||
velocity = '1 0 0' | ||
[] | ||
[] | ||
|
||
[FVBCs] | ||
[left] | ||
type = FVDirichletBC | ||
variable = u | ||
boundary = left | ||
value = 0 | ||
[] | ||
[right] | ||
type = FVDirichletBC | ||
variable = u | ||
boundary = right | ||
value = 1 | ||
[] | ||
[] | ||
|
||
[Materials] | ||
[diff] | ||
type = ADGenericConstantMaterial | ||
prop_names = 'coeff' | ||
prop_values = '1' | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
num_steps = 2 | ||
dt = 1 | ||
solve_type = NEWTON | ||
[] | ||
|
||
[Adaptivity] | ||
marker = marker | ||
max_h_level = 1 | ||
[Indicators] | ||
[error] | ||
type = AnalyticalIndicator | ||
variable = u | ||
function = solution | ||
[] | ||
[] | ||
[Markers] | ||
[marker] | ||
type = ErrorFractionMarker | ||
coarsen = 0.1 | ||
indicator = error | ||
refine = 0.3 | ||
[] | ||
[] | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[] |
Binary file added
BIN
+15.9 KB
test/tests/markers/error_fraction_marker/gold/error_fraction_marker_fv_out.e-s002
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters