-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Component-wise training example for linear elasticity (#29)
* Added config generation for componentwise training * Added parameterized problem * updated yaml * Update linelast_comp.py Distances were wrong for horizontal rods * New component training procedure * Componentwise training efficiency improved * Added "optimized" component meshes * Correct mesh size * copy config * New mesh * added fespace * fixed training * Component generation * Sinusoidal BCs * changed config * Added componentwise training files * removed complicated meshes * Updated component wise training * Removed unecessary copies * removed unnecessary config * Refactored python scripts * Removed unnecessary function definition * Renamed confusing variables * Gitignore was wrong --------- Co-authored-by: Axel Larsson <[email protected]>
- Loading branch information
Showing
10 changed files
with
870 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
main: | ||
mode: single_run | ||
use_rom: true | ||
solver: linelast | ||
|
||
mesh: | ||
type: component-wise | ||
component-wise: | ||
global_config: "config/linelast.comp_train.h5" | ||
components: | ||
- name: "joint2D" | ||
file: "meshes/joint2D.mesh" | ||
- name: "rod2D_H" | ||
file: "meshes/rod2D_H.mesh" | ||
- name: "rod2D_V" | ||
file: "meshes/rod2D_V.mesh" | ||
uniform_refinement: 0 | ||
|
||
domain-decomposition: | ||
type: interior_penalty | ||
|
||
solver: | ||
direct_solve: true | ||
|
||
discretization: | ||
order: 1 | ||
full-discrete-galerkin: true | ||
|
||
visualization: | ||
enabled: false | ||
unified_paraview: true | ||
file_path: | ||
prefix: paraview_output | ||
|
||
parameterized_problem: | ||
name: linelast_cwtrain | ||
|
||
single_run: | ||
linelast_cwtrain: | ||
l_ux: 0.0 | ||
l_uy: 0.0 | ||
r_fx: 0.0 | ||
r_fy: -2.0e-2 | ||
u_fx: 0.0 | ||
u_fy: 0.0 | ||
d_fx: 0.0 | ||
d_fy: 0.0 | ||
lx: 0.5 | ||
ly: 0.5 | ||
rx: 0.0 | ||
ry: 0.5 | ||
dx: 0.0 | ||
dy: 0.0 | ||
ux: 0.0 | ||
uy: 0.0 | ||
xu_amp: 1.0 | ||
xu_freq: 1.0 | ||
xu_offset: 0.0 | ||
xf_amp: 1.0 | ||
xf_freq: 1.0 | ||
xf_offset: 0.0 | ||
yu_amp: 1.0 | ||
yu_freq: 1.0 | ||
yu_offset: 0.0 | ||
yf_amp: 1.0 | ||
yf_freq: 1.0 | ||
yf_offset: 0.0 | ||
|
||
sample_generation: | ||
maximum_number_of_snapshots: 70000 | ||
component_sampling: true | ||
type: random | ||
random_sample_generator: | ||
number_of_samples: 100 | ||
file_path: | ||
prefix: "linelast_cwtrain" | ||
parameters: | ||
- key: single_run/linelast_cwtrain/l_ux | ||
type: double | ||
minimum: 0.0 | ||
maximum: 10.0 | ||
- key: single_run/linelast_cwtrain/l_uy | ||
type: double | ||
minimum: 0.0 | ||
maximum: 10.0 | ||
- key: single_run/linelast_cwtrain/r_fx | ||
type: double | ||
minimum: -20.0 | ||
maximum: 20.0 | ||
- key: single_run/linelast_cwtrain/r_fy | ||
type: double | ||
minimum: -20.0 | ||
maximum: 20.0 | ||
- key: single_run/linelast_cwtrain/u_fx | ||
type: double | ||
minimum: -20.0 | ||
maximum: 20.0 | ||
- key: single_run/linelast_cwtrain/u_fy | ||
type: double | ||
minimum: -20.0 | ||
maximum: 20.0 | ||
- key: single_run/linelast_cwtrain/d_fx | ||
type: double | ||
minimum: -20.0 | ||
maximum: 20.0 | ||
- key: single_run/linelast_cwtrain/d_fy | ||
type: double | ||
minimum: -20.0 | ||
maximum: 20.0 | ||
- key: single_run/linelast_cwtrain/rx | ||
type: double | ||
minimum: 0.2 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/ry | ||
type: double | ||
minimum: 0.2 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/lx | ||
type: double | ||
minimum: 0.5 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/ly | ||
type: double | ||
minimum: 0.5 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/dx | ||
type: double | ||
minimum: 0.3 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/dy | ||
type: double | ||
minimum: 0.3 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/ux | ||
type: double | ||
minimum: 0.3 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/uy | ||
type: double | ||
minimum: 0.3 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/xu_offset | ||
type: double | ||
minimum: 0.0 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/yu_offset | ||
type: double | ||
minimum: 0.0 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/xf_offset | ||
type: double | ||
minimum: 0.0 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/yf_offset | ||
type: double | ||
minimum: 0.0 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/xu_amp | ||
type: double | ||
minimum: -10.0 | ||
maximum: 10.0 | ||
- key: single_run/linelast_cwtrain/yu_amp | ||
type: double | ||
minimum: -10.0 | ||
maximum: 10.0 | ||
- key: single_run/linelast_cwtrain/xf_amp | ||
type: double | ||
minimum: -10.0 | ||
maximum: 10.0 | ||
- key: single_run/linelast_cwtrain/yf_amp | ||
type: double | ||
minimum: -10.0 | ||
maximum: 10.0 | ||
- key: single_run/linelast_cwtrain/xu_freq | ||
type: double | ||
minimum: 0.1 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/yu_freq | ||
type: double | ||
minimum: 0.1 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/xf_freq | ||
type: double | ||
minimum: 0.1 | ||
maximum: 1.0 | ||
- key: single_run/linelast_cwtrain/yf_freq | ||
type: double | ||
minimum: 0.1 | ||
maximum: 1.0 | ||
|
||
basis: | ||
prefix: "linelast_cwtrain" | ||
number_of_basis: 16 | ||
tags: | ||
- name: "joint2D" | ||
number_of_basis: 16 | ||
snapshot_format: | ||
minimum: 0 | ||
maximum: 3 | ||
format: "linelast_cwtrain_sample_joint2D_snapshot%01d" | ||
- name: "rod2D_H" | ||
number_of_basis: 64 | ||
snapshot_format: | ||
minimum: 0 | ||
maximum: 3 | ||
format: "linelast_cwtrain_sample_rod2D_H_snapshot%01d" | ||
- name: "rod2D_V" | ||
number_of_basis: 64 | ||
snapshot_format: | ||
minimum: 0 | ||
maximum: 3 | ||
format: "linelast_cwtrain_sample_rod2D_V_snapshot%01d" | ||
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_cw.rom_elem" | ||
compare_solution: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.