Skip to content

Commit

Permalink
resolved material model merge
Browse files Browse the repository at this point in the history
  • Loading branch information
djdunning committed Mar 18, 2024
2 parents dd07554 + 1542245 commit 391872d
Show file tree
Hide file tree
Showing 180 changed files with 64,559 additions and 28,240 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ubuntu-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Ubuntu Build

on: workflow_dispatch


jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: update the package list
run:
sudo apt-get update
shell: bash
- name: Install build tools
run:
sudo apt-get install build-essential
shell: bash
- name: Install LaPack
run:
sudo apt-get install libblas-dev liblapack-dev
shell: bash
- name: Install MPI
run: |
sudo apt-get install libopenmpi-dev openmpi-bin
echo "MPI_OPTS=--oversubscribe" >> $GITHUB_ENV
- name: Install cmake
run:
sudo apt-get -y install cmake
shell: bash
- name: Install python
run:
sudo apt-get install python3.6
shell: bash
- name: Run build script
run: |
chmod +x ./scripts/build-fierro.sh
./scripts/build-fierro.sh --build_action=full-app --solver=all --kokkos_build_type=openmp --build_cores=2
shell: bash

- name: Run tests
run: |
python3 test_fierro.py
working-directory: ./integrated-tests/Test-scripts
shell: bash
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
path = lib/Elements
url = https://github.com/lanl/ELEMENTS.git
branch = master
[submodule "dev-utils/uncrustify"]
path = dev-utils/uncrustify
url = https://github.com/uncrustify/uncrustify.git
1 change: 1 addition & 0 deletions dev-utils/uncrustify
Submodule uncrustify added at e312b0
11 changes: 11 additions & 0 deletions docs/formatting/ClassDefinitionComment.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/////////////////////////////////////////////////////////////////////////////
///
/// \class $(class)
///
/// \brief <insert brief description>
///
/// < Insert longer more detailed
/// description which can span
/// multiple lines if needed >
///
/////////////////////////////////////////////////////////////////////////////
16 changes: 16 additions & 0 deletions docs/formatting/FunctionDefinitionComment.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/////////////////////////////////////////////////////////////////////////////
///
/// \fn $(function)
///
/// \brief <insert brief description>
///
/// <Insert longer more detailed description which
/// can span multiple lines if needed>
///
/// \param <function parameter description>
/// \param <function parameter description>
/// \param <function parameter description>
///
/// \return <return type and definition description if not void>
///
/////////////////////////////////////////////////////////////////////////////
34 changes: 34 additions & 0 deletions docs/formatting/HeaderForSources.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**********************************************************************************************
© 2020. Triad National Security, LLC. All rights reserved.
This program was produced under U.S. Government contract 89233218CNA000001 for Los Alamos
National Laboratory (LANL), which is operated by Triad National Security, LLC for the U.S.
Department of Energy/National Nuclear Security Administration. All rights in the program are
reserved by Triad National Security, LLC, and the U.S. Department of Energy/National Nuclear
Security Administration. The Government is granted for itself and others acting on its behalf a
nonexclusive, paid-up, irrevocable worldwide license in this material to reproduce, prepare
derivative works, distribute copies to the public, perform publicly and display publicly, and
to permit others to do so.
This program is open source under the BSD-3 License.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used
to endorse or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************************************/

51 changes: 44 additions & 7 deletions docs/formatting/uncrustify.cfg
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ indent_func_call_param = true # false/true
# Same as indent_func_call_param, but for function defs
indent_func_def_param = false # false/true

# for function definitions, only if indent_func_def_param is false
# Allows to align params when appropriate and indent them when not
# behave as if it was true if paren position is more than this value
# if paren position is more than the option value
indent_func_def_param_paren_pos_threshold = 6 # unsigned number

# Same as indent_func_call_param, but for function protos
indent_func_proto_param = false # false/true

Expand Down Expand Up @@ -94,13 +100,13 @@ nl_struct_brace = force # ignore/add/remove/force
nl_union_brace = force # ignore/add/remove/force

# Add or remove newline between 'if' and '{'
nl_if_brace = force # ignore/add/remove/force
nl_if_brace = remove # ignore/add/remove/force

# Add or remove newline between '}' and 'else'
nl_brace_else = force # ignore/add/remove/force

# Add or remove newline between 'else' and '{'
nl_else_brace = force # ignore/add/remove/force
nl_else_brace = remove # ignore/add/remove/force

# Add or remove newline between 'else' and 'if'
nl_else_if = remove # ignore/add/remove/force
Expand All @@ -115,7 +121,7 @@ nl_finally_brace = force # ignore/add/remove/force
nl_try_brace = force # ignore/add/remove/force

# Add or remove newline between 'for' and '{'
nl_for_brace = force # ignore/add/remove/force
nl_for_brace = remove # ignore/add/remove/force

# Add or remove newline between 'catch' and '{'
nl_catch_brace = force # ignore/add/remove/force
Expand All @@ -130,7 +136,7 @@ nl_do_brace = force # ignore/add/remove/force
nl_brace_while = force # ignore/add/remove/force

# Add or remove newline between 'switch' and '{'
nl_switch_brace = force # ignore/add/remove/force
nl_switch_brace = remove # ignore/add/remove/force

# Add or remove newline between function signature and '{'
nl_fdef_brace = force # ignore/add/remove/force
Expand Down Expand Up @@ -369,18 +375,36 @@ align_var_class_span = 1 # number
align_var_class_thresh = 6 # number

# Whether to align variable definitions in prototypes and functions.
align_func_params = true # true/false
align_func_params = false # true/false

# The span for aligning parameter definitions in function on parameter name.
#
# 0: Don't align (default).
align_func_params_span = 1 # unsigned number


# The threshold for aligning function parameter definitions.
# Use a negative number for absolute thresholds.
#
# 0: No limit (default).
align_func_params_thresh = -5 # number

# The span for aligning on '=' in assignments.
#
# 0 = Don't align (default).
align_assign_span = 1 # unsigned number

# The span for aligning function prototypes (0=don't align)
align_func_proto_span = 0 # number

# The threshold for aligning on '=' in assignments.
# Use a negative number for absolute thresholds.
#
# 0 = No limit (default).
align_assign_thresh = 6 # number
align_assign_thresh = 4 # number

# The threshold for aligning variable definitions (0=no limit)
align_var_def_thresh = 4 # number

# Whether to align lines that start with '<<' with previous '<<'.
#
Expand Down Expand Up @@ -440,7 +464,20 @@ cmt_indent_multi = false # false/true

# The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment.
# Will substitute $(filename) with the current file's name.
# cmt_insert_file_header = "../HeaderForSources.txt"
cmt_insert_file_header = "HeaderForSources.txt"

# Path to a file that contains text to insert before a function definition if
# the function isn't preceded by a C/C++ comment. If the inserted text
# contains '$(function)', '$(javaparam)' or '$(fclass)', these will be
# replaced with, respectively, the name of the function, the javadoc '@param'
# and '@return' stuff, or the name of the class to which the member function
# belongs.
cmt_insert_func_header = "FunctionDefinitionComment.txt" # string

# Path to a file that contains text to insert before a class if the class
# isn't preceded by a C/C++ comment. If the inserted text contains '$(class)',
# that will be replaced with the class name.
cmt_insert_class_header = "" # string

# If a namespace body exceeds the specified number of newlines and doesn't have a comment after
# the close brace, a comment will be added.
Expand Down
70 changes: 70 additions & 0 deletions integrated-tests/Test-scripts/Solver-Inputs/SGH_Noh_simple.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
num_dims: 3
dynamic_options:
time_final: 0.6
dt_min: 1.e-8
dt_max: 1.e-2
dt_start: 1.e-5
cycle_stop: 2000000

mesh_generation_options:
type: Box
origin: [0, 0, 0]
length: [1.0, 1.0, 1.0]
num_elems: [10, 10, 10]

output_options:
timer_output_level: thorough
output_file_format: vtk
graphics_step: 0.6
write_initial: false
write_final: true


fea_module_parameters:
- type: SGH
material_id: 0
boundary_conditions:
# Tag X plane
- surface:
type: x_plane
plane_position: 0.0
type: reflected

# Tag Y plane
- surface:
type: y_plane
plane_position: 0.0
type: reflected

# Tag Z plane
- surface:
type: z_plane
plane_position: 0.0
type: reflected


materials:
- id: 0
eos_model: ideal_gas
strength_model: none
elastic_modulus: 10
poisson_ratio: 0.3
q1: 0.06
q2: 1.2
q1ex: 0.06
q2ex: 1.2
eos_global_vars:
- 1.666666666666667
- 1.0E-14
- 1.0

regions:
- volume:
type: global
material_id: 0
den: 1.0
sie: 1.e-10

velocity: spherical
speed: -1.0

82 changes: 82 additions & 0 deletions integrated-tests/Test-scripts/Solver-Inputs/SGH_Sedov_simple.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
num_dims: 3
dynamic_options:
time_final: 1.0
dt_min: 1.e-8
dt_max: 1.e-2
dt_start: 1.e-5
cycle_stop: 2000000

mesh_generation_options:
type: Box
origin: [0, 0, 0]
length: [1.2, 1.2, 1.2]
num_elems: [12, 12, 12]

output_options:
timer_output_level: thorough
output_file_format: vtk
graphics_step: 1.0
write_initial: false
write_final: true

fea_module_parameters:
- type: SGH
material_id: 0
boundary_conditions:
# Tag X plane
- surface:
type: x_plane
plane_position: 0.0
type: reflected

# Tag Y plane
- surface:
type: y_plane
plane_position: 0.0
type: reflected

# Tag Z plane
- surface:
type: z_plane
plane_position: 0.0
type: reflected


materials:
- id: 0
eos_model: ideal_gas
strength_model: none
elastic_modulus: 10
poisson_ratio: 0.3
q1: 0.06
q2: 1.0
q1ex: 0.06
q2ex: 1.0
eos_global_vars:
- 1.666666666666667
- 1.0E-14
- 1.0

regions:
- volume:
type: global
material_id: 0
den: 1.0
sie: 1.e-10

velocity: cartesian
u: 0.0
v: 0.0
w: 0.0
# energy source initial conditions
- volume:
type: sphere
radius1: 0.0
radius2: 0.1
material_id: 0
den: 1.0
ie: 0.25833839995946534
velocity: cartesian
u: 0.0
v: 0.0
w: 0.0
Loading

0 comments on commit 391872d

Please sign in to comment.