-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29706 from jessecarterMOOSE/element_material_prop…
…_sampler Allow material property names to be used in ElementMaterialSampler
- Loading branch information
Showing
11 changed files
with
434 additions
and
25 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
9 changes: 9 additions & 0 deletions
9
...lement_material_sampler/gold/property_sampler_multiple_blocks_elem_ids_out_props_0001.csv
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,9 @@ | ||
elem_id,prop1,prop2,propt,propx,qp_id,x,y,z | ||
0,1,2,1,0.10566243270259,0,0.10566243270259,0.10566243270259,0 | ||
0,1,2,1,0.39433756729741,1,0.39433756729741,0.10566243270259,0 | ||
0,1,2,1,0.10566243270259,2,0.10566243270259,0.39433756729741,0 | ||
0,1,2,1,0.39433756729741,3,0.39433756729741,0.39433756729741,0 | ||
1,10,20,1,0.60566243270259,0,0.60566243270259,0.10566243270259,0 | ||
1,10,20,1,0.89433756729741,1,0.89433756729741,0.10566243270259,0 | ||
1,10,20,1,0.60566243270259,2,0.60566243270259,0.39433756729741,0 | ||
1,10,20,1,0.89433756729741,3,0.89433756729741,0.39433756729741,0 |
9 changes: 9 additions & 0 deletions
9
...lement_material_sampler/gold/property_sampler_multiple_blocks_elem_ids_out_props_0002.csv
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,9 @@ | ||
elem_id,prop1,prop2,propt,propx,qp_id,x,y,z | ||
0,1,2,2,0.10566243270259,0,0.10566243270259,0.10566243270259,0 | ||
0,1,2,2,0.39433756729741,1,0.39433756729741,0.10566243270259,0 | ||
0,1,2,2,0.10566243270259,2,0.10566243270259,0.39433756729741,0 | ||
0,1,2,2,0.39433756729741,3,0.39433756729741,0.39433756729741,0 | ||
1,10,20,2,0.60566243270259,0,0.60566243270259,0.10566243270259,0 | ||
1,10,20,2,0.89433756729741,1,0.89433756729741,0.10566243270259,0 | ||
1,10,20,2,0.60566243270259,2,0.60566243270259,0.39433756729741,0 | ||
1,10,20,2,0.89433756729741,3,0.89433756729741,0.39433756729741,0 |
17 changes: 17 additions & 0 deletions
17
...cessors/element_material_sampler/gold/property_sampler_multiple_blocks_out_props_0001.csv
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,17 @@ | ||
elem_id,prop1,prop2,propt,propx,qp_id,x,y,z | ||
0,1,2,1,0.10566243270259,0,0.10566243270259,0.10566243270259,0 | ||
0,1,2,1,0.39433756729741,1,0.39433756729741,0.10566243270259,0 | ||
0,1,2,1,0.10566243270259,2,0.10566243270259,0.39433756729741,0 | ||
0,1,2,1,0.39433756729741,3,0.39433756729741,0.39433756729741,0 | ||
1,10,20,1,0.60566243270259,0,0.60566243270259,0.10566243270259,0 | ||
1,10,20,1,0.89433756729741,1,0.89433756729741,0.10566243270259,0 | ||
1,10,20,1,0.60566243270259,2,0.60566243270259,0.39433756729741,0 | ||
1,10,20,1,0.89433756729741,3,0.89433756729741,0.39433756729741,0 | ||
2,1,2,1,0.10566243270259,0,0.10566243270259,0.60566243270259,0 | ||
2,1,2,1,0.39433756729741,1,0.39433756729741,0.60566243270259,0 | ||
2,1,2,1,0.10566243270259,2,0.10566243270259,0.89433756729741,0 | ||
2,1,2,1,0.39433756729741,3,0.39433756729741,0.89433756729741,0 | ||
3,10,20,1,0.60566243270259,0,0.60566243270259,0.60566243270259,0 | ||
3,10,20,1,0.89433756729741,1,0.89433756729741,0.60566243270259,0 | ||
3,10,20,1,0.60566243270259,2,0.60566243270259,0.89433756729741,0 | ||
3,10,20,1,0.89433756729741,3,0.89433756729741,0.89433756729741,0 |
17 changes: 17 additions & 0 deletions
17
...cessors/element_material_sampler/gold/property_sampler_multiple_blocks_out_props_0002.csv
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,17 @@ | ||
elem_id,prop1,prop2,propt,propx,qp_id,x,y,z | ||
0,1,2,2,0.10566243270259,0,0.10566243270259,0.10566243270259,0 | ||
0,1,2,2,0.39433756729741,1,0.39433756729741,0.10566243270259,0 | ||
0,1,2,2,0.10566243270259,2,0.10566243270259,0.39433756729741,0 | ||
0,1,2,2,0.39433756729741,3,0.39433756729741,0.39433756729741,0 | ||
1,10,20,2,0.60566243270259,0,0.60566243270259,0.10566243270259,0 | ||
1,10,20,2,0.89433756729741,1,0.89433756729741,0.10566243270259,0 | ||
1,10,20,2,0.60566243270259,2,0.60566243270259,0.39433756729741,0 | ||
1,10,20,2,0.89433756729741,3,0.89433756729741,0.39433756729741,0 | ||
2,1,2,2,0.10566243270259,0,0.10566243270259,0.60566243270259,0 | ||
2,1,2,2,0.39433756729741,1,0.39433756729741,0.60566243270259,0 | ||
2,1,2,2,0.10566243270259,2,0.10566243270259,0.89433756729741,0 | ||
2,1,2,2,0.39433756729741,3,0.39433756729741,0.89433756729741,0 | ||
3,10,20,2,0.60566243270259,0,0.60566243270259,0.60566243270259,0 | ||
3,10,20,2,0.89433756729741,1,0.89433756729741,0.60566243270259,0 | ||
3,10,20,2,0.60566243270259,2,0.60566243270259,0.89433756729741,0 | ||
3,10,20,2,0.89433756729741,3,0.89433756729741,0.89433756729741,0 |
17 changes: 17 additions & 0 deletions
17
...ts/vectorpostprocessors/element_material_sampler/gold/property_sampler_out_props_0001.csv
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,17 @@ | ||
elem_id,prop1,prop2,propt,qp_id,x,y,z | ||
0,1,2,1,0,0.10566243270259,0.10566243270259,0 | ||
0,1,2,1,1,0.39433756729741,0.10566243270259,0 | ||
0,1,2,1,2,0.10566243270259,0.39433756729741,0 | ||
0,1,2,1,3,0.39433756729741,0.39433756729741,0 | ||
1,1,2,1,0,0.60566243270259,0.10566243270259,0 | ||
1,1,2,1,1,0.89433756729741,0.10566243270259,0 | ||
1,1,2,1,2,0.60566243270259,0.39433756729741,0 | ||
1,1,2,1,3,0.89433756729741,0.39433756729741,0 | ||
2,1,2,1,0,0.10566243270259,0.60566243270259,0 | ||
2,1,2,1,1,0.39433756729741,0.60566243270259,0 | ||
2,1,2,1,2,0.10566243270259,0.89433756729741,0 | ||
2,1,2,1,3,0.39433756729741,0.89433756729741,0 | ||
3,1,2,1,0,0.60566243270259,0.60566243270259,0 | ||
3,1,2,1,1,0.89433756729741,0.60566243270259,0 | ||
3,1,2,1,2,0.60566243270259,0.89433756729741,0 | ||
3,1,2,1,3,0.89433756729741,0.89433756729741,0 |
17 changes: 17 additions & 0 deletions
17
...ts/vectorpostprocessors/element_material_sampler/gold/property_sampler_out_props_0002.csv
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,17 @@ | ||
elem_id,prop1,prop2,propt,qp_id,x,y,z | ||
0,1,2,2,0,0.10566243270259,0.10566243270259,0 | ||
0,1,2,2,1,0.39433756729741,0.10566243270259,0 | ||
0,1,2,2,2,0.10566243270259,0.39433756729741,0 | ||
0,1,2,2,3,0.39433756729741,0.39433756729741,0 | ||
1,1,2,2,0,0.60566243270259,0.10566243270259,0 | ||
1,1,2,2,1,0.89433756729741,0.10566243270259,0 | ||
1,1,2,2,2,0.60566243270259,0.39433756729741,0 | ||
1,1,2,2,3,0.89433756729741,0.39433756729741,0 | ||
2,1,2,2,0,0.10566243270259,0.60566243270259,0 | ||
2,1,2,2,1,0.39433756729741,0.60566243270259,0 | ||
2,1,2,2,2,0.10566243270259,0.89433756729741,0 | ||
2,1,2,2,3,0.39433756729741,0.89433756729741,0 | ||
3,1,2,2,0,0.60566243270259,0.60566243270259,0 | ||
3,1,2,2,1,0.89433756729741,0.60566243270259,0 | ||
3,1,2,2,2,0.60566243270259,0.89433756729741,0 | ||
3,1,2,2,3,0.89433756729741,0.89433756729741,0 |
73 changes: 73 additions & 0 deletions
73
test/tests/vectorpostprocessors/element_material_sampler/property_sampler.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,73 @@ | ||
[Mesh] | ||
allow_renumbering = false | ||
[gen] | ||
type = GeneratedMeshGenerator | ||
dim = 2 | ||
xmin = 0 | ||
xmax = 1 | ||
ymin = 0 | ||
ymax = 1 | ||
nx = 2 | ||
ny = 2 | ||
[] | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
[./time] | ||
type = TimeDerivative | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./left] | ||
type = DirichletBC | ||
variable = u | ||
boundary = left | ||
value = 0 | ||
[../] | ||
[./right] | ||
type = DirichletBC | ||
variable = u | ||
boundary = right | ||
value = 1 | ||
[../] | ||
[] | ||
|
||
[Materials] | ||
[mat1] | ||
type = GenericFunctionMaterial | ||
prop_names = 'prop1 prop2 propt' | ||
prop_values = '1 2 t' | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
num_steps = 2 | ||
dt = 1.0 | ||
solve_type = PJFNK | ||
petsc_options_iname = '-pc_type -pc_hypre_type' | ||
petsc_options_value = 'hypre boomeramg' | ||
[] | ||
|
||
[VectorPostprocessors] | ||
[props] | ||
type = ElementMaterialSampler | ||
property = 'prop1 prop2 propt' | ||
execute_on = 'initial timestep_end' | ||
[] | ||
[] | ||
|
||
[Outputs] | ||
csv = true | ||
[] |
94 changes: 94 additions & 0 deletions
94
test/tests/vectorpostprocessors/element_material_sampler/property_sampler_multiple_blocks.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,94 @@ | ||
[Mesh] | ||
allow_renumbering = false | ||
[gen] | ||
type = GeneratedMeshGenerator | ||
dim = 2 | ||
xmin = 0 | ||
xmax = 1 | ||
ymin = 0 | ||
ymax = 1 | ||
nx = 2 | ||
ny = 2 | ||
[] | ||
[left] | ||
type = ParsedSubdomainMeshGenerator | ||
input = gen | ||
combinatorial_geometry = 'x < 0.5' | ||
block_id = 1 | ||
block_name = LEFT_SIDE | ||
[] | ||
[right] | ||
type = ParsedSubdomainMeshGenerator | ||
input = left | ||
combinatorial_geometry = 'x > 0.5' | ||
block_id = 2 | ||
block_name = RIGHT_SIDE | ||
[] | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
[./time] | ||
type = TimeDerivative | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./left] | ||
type = DirichletBC | ||
variable = u | ||
boundary = left | ||
value = 0 | ||
[../] | ||
[./right] | ||
type = DirichletBC | ||
variable = u | ||
boundary = right | ||
value = 1 | ||
[../] | ||
[] | ||
|
||
[Materials] | ||
[mat1] | ||
type = GenericFunctionMaterial | ||
prop_names = 'prop1 prop2 propt propx' | ||
prop_values = '1 2 t x' | ||
block = 1 | ||
[] | ||
[mat2] | ||
type = GenericFunctionMaterial | ||
prop_names = 'prop1 prop2 propt propx' | ||
prop_values = '10 20 t x' | ||
block = 2 | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
num_steps = 2 | ||
dt = 1.0 | ||
solve_type = PJFNK | ||
petsc_options_iname = '-pc_type -pc_hypre_type' | ||
petsc_options_value = 'hypre boomeramg' | ||
[] | ||
|
||
[VectorPostprocessors] | ||
[props] | ||
type = ElementMaterialSampler | ||
property = 'prop1 prop2 propt propx' | ||
execute_on = 'initial timestep_end' | ||
[] | ||
[] | ||
|
||
[Outputs] | ||
csv = true | ||
[] |
Oops, something went wrong.