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 #12751 from aeslaughter/vpp-csv-11087
Create FINAL and LATEST symlinks for VPP files
- Loading branch information
Showing
9 changed files
with
304 additions
and
7 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
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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,68 @@ | |||
[Mesh] | |||
type = GeneratedMesh | |||
dim = 2 | |||
nx = 10 | |||
ny = 10 | |||
[] | |||
|
|||
[Variables] | |||
[./u] | |||
[../] | |||
[] | |||
|
|||
[Kernels] | |||
[./diff] | |||
type = CoefDiffusion | |||
variable = u | |||
coef = 0.1 | |||
[../] | |||
[./time] | |||
type = TimeDerivative | |||
variable = u | |||
[../] | |||
[] | |||
|
|||
[BCs] | |||
[./left] | |||
type = DirichletBC | |||
variable = u | |||
boundary = left | |||
value = 0 | |||
[../] | |||
[./right] | |||
type = DirichletBC | |||
variable = u | |||
boundary = right | |||
value = 1 | |||
[../] | |||
[] | |||
|
|||
[Executioner] | |||
type = Transient | |||
num_steps = 10 | |||
dt = 0.25 | |||
solve_type = PJFNK | |||
petsc_options_iname = '-pc_type -pc_hypre_type' | |||
petsc_options_value = 'hypre boomeramg' | |||
[] | |||
|
|||
# Vector Postprocessor System | |||
[VectorPostprocessors] | |||
[./line_sample] | |||
type = LineValueSampler | |||
execute_on = 'timestep_end final' | |||
variable = 'u' | |||
start_point = '0 0.5 0' | |||
end_point = '1 0.5 0' | |||
num_points = 11 | |||
sort_by = id | |||
[../] | |||
[] | |||
|
|||
[Outputs] | |||
[./out] | |||
type = CSV | |||
execute_on = 'TIMESTEP_END FINAL' | |||
create_latest_symlink = false | |||
[../] | |||
[] |
12 changes: 12 additions & 0 deletions
12
test/tests/outputs/csv_final_and_latest/gold/final_out_line_sample_FINAL.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,12 @@ | |||
x,y,z,id,u | |||
0,0.5,0,0,0 | |||
0.1,0.5,0,0.1,0.078663617984875 | |||
0.2,0.5,0,0.2,0.15936788915787 | |||
0.3,0.5,0,0.3,0.24397172256484 | |||
0.4,0.5,0,0.4,0.33398168255287 | |||
0.5,0.5,0,0.5,0.43040493832597 | |||
0.6,0.5,0,0.6,0.53363981759493 | |||
0.7,0.5,0,0.7,0.64341855974351 | |||
0.8,0.5,0,0.8,0.75881470939601 | |||
0.9,0.5,0,0.9,0.87832172561654 | |||
1,0.5,0,1,1 |
1 change: 1 addition & 0 deletions
1
test/tests/outputs/csv_final_and_latest/gold/latest_out_line_sample_LATEST.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
final_out_line_sample_FINAL.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,68 @@ | |||
[Mesh] | |||
type = GeneratedMesh | |||
dim = 2 | |||
nx = 10 | |||
ny = 10 | |||
[] | |||
|
|||
[Variables] | |||
[./u] | |||
[../] | |||
[] | |||
|
|||
[Kernels] | |||
[./diff] | |||
type = CoefDiffusion | |||
variable = u | |||
coef = 0.1 | |||
[../] | |||
[./time] | |||
type = TimeDerivative | |||
variable = u | |||
[../] | |||
[] | |||
|
|||
[BCs] | |||
[./left] | |||
type = DirichletBC | |||
variable = u | |||
boundary = left | |||
value = 0 | |||
[../] | |||
[./right] | |||
type = DirichletBC | |||
variable = u | |||
boundary = right | |||
value = 1 | |||
[../] | |||
[] | |||
|
|||
[Executioner] | |||
type = Transient | |||
num_steps = 10 | |||
dt = 0.25 | |||
solve_type = PJFNK | |||
petsc_options_iname = '-pc_type -pc_hypre_type' | |||
petsc_options_value = 'hypre boomeramg' | |||
[] | |||
|
|||
# Vector Postprocessor System | |||
[VectorPostprocessors] | |||
[./line_sample] | |||
type = LineValueSampler | |||
execute_on = 'timestep_end' | |||
variable = 'u' | |||
start_point = '0 0.5 0' | |||
end_point = '1 0.5 0' | |||
num_points = 11 | |||
sort_by = id | |||
[../] | |||
[] | |||
|
|||
[Outputs] | |||
[./out] | |||
type = CSV | |||
execute_on = 'TIMESTEP_END' | |||
create_final_symlink = false | |||
[../] | |||
[] |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,50 @@ | |||
[Tests] | |||
issues = "#11087" | |||
design = "/VectorPostprocessors/index.md /CSV.md" | |||
[final] | |||
type = CSVDiff | |||
input = final.i | |||
csvdiff = final_out_line_sample_FINAL.csv | |||
requirement = "The CSV output object shall create a symlink to the final output with " | |||
"with a '_FINAL' suffix for VectorPostprocessor data when there are execute flags " | |||
"in addition to FINAL." | |||
[] | |||
[final_only] | |||
type = CheckFiles | |||
input = final.i | |||
cli_args = Outputs/out/execute_on=FINAL | |||
check_not_exists = 'final_out_line_sample_0009.csv' | |||
check_files = 'final_out_line_sample_0011.csv final_out_line_sample_FINAL.csv' | |||
requirement = "The CSV output object shall create a symlink to the final output with " | |||
"with a '_FINAL' suffix for VectorPostprocessor data when the execute flag is " | |||
"set to FINAL." | |||
prereq = final | |||
[] | |||
[no_link] | |||
type = CheckFiles | |||
input = final.i | |||
cli_args = Outputs/out/create_final_symlink=false | |||
delete_output_before_running = false | |||
check_not_exists = 'final_out_line_sample_FINAL.csv' | |||
requirement = "The CSV output object 'create_final_symlink' parameter shall be able to disable " | |||
"the creation of the final symlink." | |||
prereq = final_only | |||
[] | |||
[latest] | |||
type = CSVDiff | |||
input = latest.i | |||
csvdiff = latest_out_line_sample_LATEST.csv | |||
requirement = "The CSV output object shall create a symlink to the most recent output with " | |||
"with a '_LATEST' suffix for VectorPostprocessor data." | |||
[] | |||
[no_latest] | |||
type = CheckFiles | |||
input = latest.i | |||
delete_output_before_running = false | |||
cli_args = Outputs/out/create_latest_symlink=false | |||
check_not_exists = 'latest_out_line_sample_LATEST.csv' | |||
requirement = "The CSV output object 'create_latest_symlink' parameter shall be able to disable " | |||
"the creation of the latest symlink." | |||
prereq = latest | |||
[] | |||
[] |