Skip to content

Commit

Permalink
Merge pull request #213 from lanl/MaterialCentric2
Browse files Browse the repository at this point in the history
Material centric2
  • Loading branch information
nathanielmorgan authored Aug 7, 2024
2 parents 1dc8ac3 + 0ff5b0c commit cf29007
Show file tree
Hide file tree
Showing 34 changed files with 3,431 additions and 1,867 deletions.
3 changes: 0 additions & 3 deletions single-node-refactor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ include_directories(src/input)
add_subdirectory(src/input)


include_directories(src/Solvers/SGH_solver)
add_subdirectory(src/Solvers/SGH_solver)


add_subdirectory(src)

Expand Down
11 changes: 2 additions & 9 deletions single-node-refactor/input-impact-erosion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,13 @@ materials:
- 1.0E-4
- 1.0
erosion_model: basic
void_mat_id: 2
erode_tension_val: 2.0e-7
erode_density_val: 0.01

# eroded material
- material:
id: 2
eos_model_type: decoupled
eos_model: void


# background air
- material:
id: 3
id: 2
eos_model_type: decoupled
eos_model: gamma_law_gas
# strength_model: none
Expand All @@ -115,7 +108,7 @@ regions:
# air
- fill_volume:
type: global
material_id: 3
material_id: 2
den: 0.010
sie: 3.0e-4
velocity: cartesian
Expand Down
15 changes: 12 additions & 3 deletions single-node-refactor/input-origin-erosion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dynamic_options:
dt_min: 1.e-8
dt_max: 1.e-2
dt_start: 1.e-5
cycle_stop: 300000
cycle_stop: 30000


# mesh_options:
Expand Down Expand Up @@ -79,14 +79,23 @@ materials:
- 1.0E-14
- 1.0
erosion_model: basic
void_mat_id: 1
erode_tension_val: 0.00003
erode_density_val: 0.02


- material:
id: 1
eos_model_type: decoupled
eos_model: void
eos_model: gamma_law_gas
# strength_model: none
q1: 1.0
q2: 1.333
q1ex: 1.0
q2ex: 1.333
eos_global_vars:
- 1.666666666666667
- 1.0E-14
- 1.0

regions:
- fill_volume:
Expand Down
5 changes: 2 additions & 3 deletions single-node-refactor/input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ boundary_conditions:
geometry: x_plane
direction: x_dir
value: 0.0
u: 0.0
v: 0.0
w: 1.0
type: reflected_velocity


Expand All @@ -63,6 +60,8 @@ boundary_conditions:
direction: z_dir
value: 0.0
type: reflected_velocity



materials:
- material:
Expand Down
8 changes: 6 additions & 2 deletions single-node-refactor/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,9 @@ endif()

include_directories(common)

add_executable(Fierro main.cpp solver.cpp )
target_link_libraries(Fierro PRIVATE matar parse_yaml sgh_solver Kokkos::kokkos)
# Add SGH Solver
include_directories(Solvers/SGH_solver/include)
add_subdirectory(Solvers/SGH_solver)

add_executable(Fierro main.cpp solver.cpp ${YAML_SRC_Files} ${SGH_SRC_Files} )
target_link_libraries(Fierro PRIVATE matar Kokkos::kokkos) #sgh_solver parse_yaml
42 changes: 15 additions & 27 deletions single-node-refactor/src/Solvers/SGH_solver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
cmake_minimum_required(VERSION 3.1.3)


find_package(Matar REQUIRED)
find_package(Kokkos REQUIRED)

Expand All @@ -19,29 +18,18 @@ endif()
include_directories(include)
include_directories(src)


set(SRC_Files
src/boundary.cpp
src/energy_sgh.cpp
src/force_sgh.cpp
src/position.cpp
src/momentum.cpp
src/properties.cpp
src/sgh_solve.cpp
src/time_integration.cpp)

# set(SGH_Solver_SRC src/sgh_solver.cpp )

message("\n ****** ADDING SGH LIBRARY ******** \n ")

add_library(sgh_solver ${SRC_Files} ) # ${SGH_Solver_SRC}
target_include_directories(sgh_solver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)


target_link_libraries(sgh_solver matar Kokkos::kokkos)






message("\n ****** ADDING SGH SOURCE FILES ******** \n ")

set(SGH_SRC_Files
${CMAKE_CURRENT_SOURCE_DIR}/src/boundary.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/energy_sgh.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/force_sgh.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/position.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/momentum.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/properties.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/sgh_solve.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/time_integration.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/sgh_setup.cpp
${CMAKE_CURRENT_SOURCE_DIR}/include/sgh_solver.h
PARENT_SCOPE
)
Loading

0 comments on commit cf29007

Please sign in to comment.