Skip to content

Commit

Permalink
Example input/mesh files for the tutorial (#5)
Browse files Browse the repository at this point in the history
* main driver example.

* component mesh poisson example.

* paraview load macro.

* moved TrainMode train_mode to MultiBlockSolver from ROMHandler.

* GetBasisTag functions now does not belong to classes. GenerateSamples does not require to initiate ROMHandler.

* poisson base sampling example.

* 2d sampling example.

* random sampling example.

* TrainROM example.

* poisson build rom example.

* BuildROM: global operator is assembled only for ROMBuildingLevel::GLOBAL.

* poisson full workflow example.
  • Loading branch information
dreamer2368 authored Dec 18, 2023
1 parent 4f484cd commit b142c2d
Show file tree
Hide file tree
Showing 37 changed files with 9,511 additions and 119 deletions.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
examples/poisson/meshes/test.2x2.mesh filter=lfs diff=lfs merge=lfs -text
examples/poisson/meshes/square-circle.mesh filter=lfs diff=lfs merge=lfs -text
examples/poisson/meshes/square-square.mesh filter=lfs diff=lfs merge=lfs -text
examples/poisson/meshes/square-star.mesh filter=lfs diff=lfs merge=lfs -text
examples/poisson/meshes/square-triangle.mesh filter=lfs diff=lfs merge=lfs -text
examples/poisson/meshes/square.mesh filter=lfs diff=lfs merge=lfs -text
examples/poisson/config/2x2_config.h5 filter=lfs diff=lfs merge=lfs -text
examples/poisson/config/sample.config-02.h5 filter=lfs diff=lfs merge=lfs -text
examples/poisson/config/sample.config-03.h5 filter=lfs diff=lfs merge=lfs -text
examples/poisson/config/sample.config-04.h5 filter=lfs diff=lfs merge=lfs -text
examples/poisson/config/sample.config-01.h5 filter=lfs diff=lfs merge=lfs -text
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ add_library(scaleupROMObj OBJECT ${scaleupROMObj_SOURCES})
add_subdirectory(bin)
add_subdirectory(utils)
add_subdirectory(test)
add_subdirectory(examples)
if(BUILD_SKETCHES)
add_subdirectory(sketches)
endif(BUILD_SKETCHES)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ scaleupROM is mainly built upon [MFEM](https://mfem.org/) and [libROM](https://w

- Discontinuous Galerkin domain decomposition
- Projection-based reduced order model
- EQP for nonlinear partial differential equations
- Supporting physics equations:
- Poisson equation
- Stokes flow

## Features to be added

- Steady Navier-Stokes flow
- EQP for nonlinear partial differential equations

# Installation

Expand Down
5 changes: 5 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2023 Lawrence Livermore National Security, LLC. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: MIT

add_subdirectory(poisson)
29 changes: 29 additions & 0 deletions examples/poisson/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2023 Lawrence Livermore National Security, LLC. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: MIT

file(COPY poisson.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson)
file(COPY meshes/test.2x2.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/meshes)

file(COPY poisson.component.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson)
file(COPY config/2x2_config.h5 DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/config)
file(COPY meshes/square.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/meshes)
file(COPY meshes/square-circle.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/meshes)
file(COPY meshes/square-triangle.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/meshes)
file(COPY meshes/square-star.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/meshes)
file(COPY meshes/square-square.mesh DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/meshes)

file(COPY poisson.sample.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson)
file(COPY poisson.sample.2d.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson)
file(COPY poisson.sample.random.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson)
file(COPY config/sample.config-01.h5 DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/config)
file(COPY config/sample.config-02.h5 DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/config)
file(COPY config/sample.config-03.h5 DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/config)
file(COPY config/sample.config-04.h5 DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson/config)

file(COPY poisson.train.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson)
file(COPY poisson.train.dom.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson)

file(COPY poisson.build.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson)

file(COPY poisson.full.yml DESTINATION ${CMAKE_BINARY_DIR}/examples/poisson)
Binary file added examples/poisson/config/2x2_config.h5
Binary file not shown.
Binary file added examples/poisson/config/sample.config-01.h5
Binary file not shown.
Binary file added examples/poisson/config/sample.config-02.h5
Binary file not shown.
Binary file added examples/poisson/config/sample.config-03.h5
Binary file not shown.
Binary file added examples/poisson/config/sample.config-04.h5
Binary file not shown.
Loading

0 comments on commit b142c2d

Please sign in to comment.