Skip to content

Commit

Permalink
Merge branch 'main' into par-train
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer2368 committed Feb 28, 2024
2 parents f09674d + 0d681b3 commit b277f72
Show file tree
Hide file tree
Showing 14 changed files with 1,396 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ scaleupROM is mainly built upon [MFEM](https://mfem.org/) and [libROM](https://w
- Poisson equation
- Stokes flow
- Steady Navier-Stokes flow
- Linear elasticity

## Features to be added

- Linear elasticity
- Nonlinear elasticity
- Time-dependent Navier-Stokes flow

Expand Down
8 changes: 8 additions & 0 deletions examples/linelast/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@
#
# SPDX-License-Identifier: MIT
file(COPY linelast.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast)
file(COPY linelast.simpleL.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast)
file(COPY config/linelast.simpleL.h5 DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast/config)
file(COPY linelast.lattice.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast)
file(COPY config/linelast.lattice.h5 DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast/config)

file(COPY meshes/beam-tri.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast/meshes)
file(COPY meshes/beam-tet.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast/meshes)
file(COPY meshes/joint2D.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast/meshes)
file(COPY meshes/rod2D_H.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast/meshes)
file(COPY meshes/rod2D_V.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/linelast/meshes)
Binary file added examples/linelast/config/linelast.lattice.h5
Binary file not shown.
Binary file added examples/linelast/config/linelast.simpleL.h5
Binary file not shown.
75 changes: 75 additions & 0 deletions examples/linelast/linelast.lattice.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
main:
mode: single_run
use_rom: true
solver: linelast

mesh:
type: component-wise
component-wise:
global_config: "config/linelast.lattice.h5"
components:
- name: "joint2D"
file: "meshes/joint2D.mesh"
- name: "rod2D_H"
file: "meshes/rod2D_H.mesh"
- name: "rod2D_V"
file: "meshes/rod2D_V.mesh"

domain-decomposition:
type: interior_penalty

discretization:
order: 1
full-discrete-galerkin: true

visualization:
enabled: false
unified_paraview: true
file_path:
prefix: lattice_output

parameterized_problem:
name: linelast_disp_lattice

single_run:
linelast_disp_lattice:
rdisp_f: 1.0

sample_generation:
maximum_number_of_snapshots: 400
component_sampling: false
file_path:
prefix: "linelast_lattice"
parameters:
- key: single_run/linelast_disp/rdisp_f
type: double
sample_size: 1
minimum: 1.0
maximum: 1.0

basis:
prefix: "linelast_lattice"
#number_of_basis: 8
tags:
- name: "joint2D"
number_of_basis: 12
- name: "rod2D_H"
number_of_basis: 8
- name: "rod2D_V"
number_of_basis: 9
svd:
save_spectrum: true
update_right_sv: false
visualization:
enabled: false

model_reduction:
rom_handler_type: mfem
subdomain_training: universal
linear_solver_type: direct
save_operator:
level: component
prefix: "linelast.rom_elem"
compare_solution:
enabled: true

68 changes: 68 additions & 0 deletions examples/linelast/linelast.simpleL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
main:
mode: single_run
use_rom: true
solver: linelast

mesh:
type: component-wise
component-wise:
global_config: "config/linelast.simpleL.h5"
components:
- name: "joint2D"
file: "meshes/joint2D.mesh"
- name: "rod2D_H"
file: "meshes/rod2D_H.mesh"
- name: "rod2D_V"
file: "meshes/rod2D_V.mesh"

domain-decomposition:
type: interior_penalty

discretization:
order: 1
full-discrete-galerkin: true

visualization:
enabled: false
unified_paraview: true
file_path:
prefix: lcantilever_output

parameterized_problem:
name: linelast_disp_lcantilever

single_run:
linelast_disp_lcantilever:
rdisp_f: 10.0

sample_generation:
maximum_number_of_snapshots: 400
component_sampling: false
file_path:
prefix: "linelast_Lbeam"
parameters:
- key: single_run/linelast_disp/rdisp_f
type: double
sample_size: 6
minimum: 10.0
maximum: 10.0

basis:
prefix: "linelast_Lbeam"
number_of_basis: 2
tags:
- name: "comp0"
svd:
save_spectrum: true
update_right_sv: false
visualization:
enabled: false

model_reduction:
rom_handler_type: mfem
subdomain_training: universal
save_operator:
level: component
prefix: "linelast.rom_elem"
compare_solution:
enabled: true
129 changes: 129 additions & 0 deletions examples/linelast/meshes/joint2D.mesh
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
MFEM mesh v1.0

#
# MFEM Geometry Types (see mesh/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
# TRIANGLE = 2
# SQUARE = 3
# TETRAHEDRON = 4
# CUBE = 5
# PRISM = 6
# PYRAMID = 7
#

dimension
2

elements
16
1 3 0 1 6 5
1 3 1 2 7 6
1 3 2 3 8 7
1 3 3 4 9 8
1 3 5 6 11 10
1 3 6 7 12 11
1 3 7 8 13 12
1 3 8 9 14 13
1 3 10 11 16 15
1 3 11 12 17 16
1 3 12 13 18 17
1 3 13 14 19 18
1 3 15 16 21 20
1 3 16 17 22 21
1 3 17 18 23 22
1 3 18 19 24 23

boundary
16
1 1 0 1
1 1 1 2
1 1 2 3
1 1 3 4
3 1 21 20
3 1 22 21
3 1 23 22
3 1 24 23
4 1 5 0
4 1 10 5
4 1 15 10
4 1 20 15
2 1 4 9
2 1 9 14
2 1 14 19
2 1 19 24

vertices
25

nodes
FiniteElementSpace
FiniteElementCollection: L2_T1_2D_P1
VDim: 2
Ordering: 1

0 0
0.25 0
0 0.25
0.25 0.25
0.25 0
0.5 0
0.25 0.25
0.5 0.25
0.5 0
0.75 0
0.5 0.25
0.75 0.25
0.75 0
1 0
0.75 0.25
1 0.25
0 0.25
0.25 0.25
0 0.5
0.25 0.5
0.25 0.25
0.5 0.25
0.25 0.5
0.5 0.5
0.5 0.25
0.75 0.25
0.5 0.5
0.75 0.5
0.75 0.25
1 0.25
0.75 0.5
1 0.5
0 0.5
0.25 0.5
0 0.75
0.25 0.75
0.25 0.5
0.5 0.5
0.25 0.75
0.5 0.75
0.5 0.5
0.75 0.5
0.5 0.75
0.75 0.75
0.75 0.5
1 0.5
0.75 0.75
1 0.75
0 0.75
0.25 0.75
0 1
0.25 1
0.25 0.75
0.5 0.75
0.25 1
0.5 1
0.5 0.75
0.75 0.75
0.5 1
0.75 1
0.75 0.75
1 0.75
0.75 1
1 1
Loading

0 comments on commit b277f72

Please sign in to comment.