Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(fourc_mc_tests): convert dat to yaml #141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
# Run the linter.
# Needs to placed before black, isort, and other formatters
- id: ruff
args: [ --fix ]
args: [--fix]
- repo: local
hooks:
- id: trailing-whitespace
Expand All @@ -27,7 +27,7 @@ repos:
- id: check-license-header
name: check for correct license header
entry: licenseheaders
args: ["-t", "license_header.tmpl", '--files']
args: ["-t", "license_header.tmpl", "--files"]
language: python
types: ["python"]
pass_filenames: true
Expand All @@ -40,7 +40,7 @@ repos:
- id: commitizen
name: commitizen
entry: cz
args: ['check', '--commit-msg-file', '.git/COMMIT_EDITMSG']
args: ["check", "--commit-msg-file", ".git/COMMIT_EDITMSG"]
pass_filenames: false
language: system
stages: [commit-msg, manual]
Expand All @@ -65,7 +65,7 @@ repos:
args:
- > # This is needed to lint the jinja templates
-d={extends: default, rules: {braces: {max-spaces-inside: 1}
, brackets: disable, document-start: disable}}
, brackets: disable, document-start: disable, "line-length": {"max": 100}}}
- -f=colored
language: python
types: ["yaml"]
Expand Down
83 changes: 83 additions & 0 deletions tests/input_files/third_party/fourc/solid_runtime_hex8.4C.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the .4C in the file name really necessary if the file is already in a folder named fourc?

Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
TITLE: |
This is a simple test that tests the extrapolation of stressees from Gauss points to nodes for a
hex8 discretization tested date: 19.12.2024
Comment on lines +2 to +3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is a simple test that tests the extrapolation of stressees from Gauss points to nodes for a
hex8 discretization tested date: 19.12.2024
This is a simple test that tests the extrapolation of stresses from Gauss points to nodes for a
hex8 discretization. Tested date: 19.12.2024

PROBLEM TYPE:
PROBLEMTYPE: "Structure"
IO:
OUTPUT_SPRING: true
STRUCT_STRESS: "Cauchy"
STRUCT_STRAIN: "Yes"
VERBOSITY: "standard"
IO/RUNTIME VTK OUTPUT:
INTERVAL_STEPS: 1
OUTPUT_DATA_FORMAT: "ascii"
IO/RUNTIME VTK OUTPUT/STRUCTURE:
OUTPUT_STRUCTURE: true
DISPLACEMENT: true
STRESS_STRAIN: true
SOLVER 1:
SOLVER: "Superlu"
NAME: "Structure_Solver"
STRUCTURAL DYNAMIC:
INT_STRATEGY: "Standard"
DYNAMICTYPE: "Statics"
TIMESTEP: 0.5
NUMSTEP: 2
MAXTIME: 1
TOLDISP: 1e-09
TOLRES: 1e-09
LOADLIN: true
LINEAR_SOLVER: 1
STRUCT NOX/Printing:
Inner Iteration: false
Outer Iteration StatusTest: false
MATERIALS:
- MAT: 1
MAT_Struct_StVenantKirchhoff:
YOUNG: 100
NUE: 0
DENS: 0
FUNCT1:
- COMPONENT: 0
SYMBOLIC_FUNCTION_OF_SPACE_TIME: (1+{{ parameter_1 }}*y+{{ parameter_2 }}*z)*t
DESIGN SURF NEUMANN CONDITIONS:
- E: 2
NUMDOF: 6
ONOFF: [1, 0, 0, 0, 0, 0]
VAL: [10, 0, 0, 0, 0, 0]
FUNCT: [1, 0, 0, 0, 0, 0]
DESIGN SURF DIRICH CONDITIONS:
- E: 1
NUMDOF: 3
ONOFF: [1, 1, 1]
VAL: [0, 0, 0]
FUNCT: [0, 0, 0]
PROBLEM SIZE:
ELEMENTS: 2
NODES: 12
MATERIALS: 9999
DSURF-NODE TOPOLOGY:
- NODE 3 DSURFACE 1
- NODE 1 DSURFACE 1
- NODE 4 DSURFACE 1
- NODE 2 DSURFACE 1
- NODE 10 DSURFACE 2
- NODE 12 DSURFACE 2
- NODE 9 DSURFACE 2
- NODE 11 DSURFACE 2
NODE COORDS:
- NODE 1 COORD 0.0 0.0 0.0
- NODE 2 COORD 0.0 1.0 0.0
- NODE 3 COORD 0.0 0.0 1.0
- NODE 4 COORD 0.0 1.0 1.0
- NODE 5 COORD 1.0 0.0 0.0
- NODE 6 COORD 1.0 1.0 0.0
- NODE 7 COORD 1.0 0.0 1.0
- NODE 8 COORD 1.0 1.0 1.0
- NODE 9 COORD 2.0 0.0 0.0
- NODE 10 COORD 2.0 1.0 0.0
- NODE 11 COORD 2.0 0.0 1.0
- NODE 12 COORD 2.0 1.0 1.0
STRUCTURE ELEMENTS:
- 1 SOLID HEX8 1 5 6 2 3 7 8 4 MAT 1 KINEM nonlinear
- 2 SOLID HEX8 5 9 10 6 7 11 12 8 MAT 1 KINEM nonlinear
2 changes: 1 addition & 1 deletion tests/integration_tests/cluster/test_fourc_mc_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_fourc_mc_cluster(
fourc_example_expected_output (np.ndarray): Expected output for the MC samples
global_settings (GlobalSettings): object containing experiment name and tmp_path
"""
fourc_input_file_template = third_party_inputs / "fourc" / "solid_runtime_hex8.dat"
fourc_input_file_template = third_party_inputs / "fourc" / "solid_runtime_hex8.4C.yaml"

# Parameters
parameter_1 = UniformDistribution(lower_bound=0.0, upper_bound=1.0)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/fourc/test_fourc_mc.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_fourc_mc(
):
"""Test simple 4C run."""
# generate json input file from template
fourc_input_file_template = third_party_inputs / "fourc" / "solid_runtime_hex8.dat"
fourc_input_file_template = third_party_inputs / "fourc" / "solid_runtime_hex8.4C.yaml"
fourc_executable, _, _ = fourc_link_paths

# Parameters
Expand Down
Loading