From 0e2ef37b215deb18d0b519d583db0d115ea449fa Mon Sep 17 00:00:00 2001 From: Afeef Date: Tue, 23 Jul 2024 10:43:41 +0200 Subject: [PATCH 1/6] Reorg better naming of tests used 2 Procs with GPU more stable updated Readme with a resume table --- poisson/CMakeLists.txt | 58 +++++++++---------- poisson/Readme.md | 39 ++++++++++--- .../{Test.poisson.arc => Test.L-shape.2D.arc} | 0 ...est.poisson.3D.arc => Test.L-shape.3D.arc} | 0 ...sson.direct.arc => Test.direct-solver.arc} | 0 ...{Test.poisson.hypre.arc => Test.hypre.arc} | 0 ...hypre_direct.arc => Test.hypre_direct.arc} | 0 ...t.poisson.neumann.arc => Test.neumann.arc} | 0 ...{Test.poisson.petsc.arc => Test.petsc.arc} | 0 ...est.poisson.porous.arc => Test.porous.arc} | 0 ...isson.sphere.3D.arc => Test.sphere.3D.arc} | 0 ...poisson.trilinos.arc => Test.trilinos.arc} | 0 12 files changed, 61 insertions(+), 36 deletions(-) rename poisson/{Test.poisson.arc => Test.L-shape.2D.arc} (100%) rename poisson/{Test.poisson.3D.arc => Test.L-shape.3D.arc} (100%) rename poisson/{Test.poisson.direct.arc => Test.direct-solver.arc} (100%) rename poisson/{Test.poisson.hypre.arc => Test.hypre.arc} (100%) rename poisson/{Test.poisson.hypre_direct.arc => Test.hypre_direct.arc} (100%) rename poisson/{Test.poisson.neumann.arc => Test.neumann.arc} (100%) rename poisson/{Test.poisson.petsc.arc => Test.petsc.arc} (100%) rename poisson/{Test.poisson.porous.arc => Test.porous.arc} (100%) rename poisson/{Test.poisson.sphere.3D.arc => Test.sphere.3D.arc} (100%) rename poisson/{Test.poisson.trilinos.arc => Test.trilinos.arc} (100%) diff --git a/poisson/CMakeLists.txt b/poisson/CMakeLists.txt index abb2585..e2a95d7 100644 --- a/poisson/CMakeLists.txt +++ b/poisson/CMakeLists.txt @@ -37,16 +37,16 @@ arcane_generate_axl(Fem) arcane_add_arcane_libraries_to_target(Poisson) target_include_directories(Poisson PUBLIC . ${CMAKE_CURRENT_BINARY_DIR}) configure_file(Poisson.config ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.3D.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.sphere.3D.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.direct.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.neumann.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.porous.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.trilinos.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.hypre.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.hypre_direct.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.poisson.petsc.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.L-shape.2D.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.L-shape.3D.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.sphere.3D.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.direct-solver.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.neumann.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.porous.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.trilinos.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.hypre.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.hypre_direct.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.petsc.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/L-shape.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/random.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/porous-medium.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) @@ -82,51 +82,51 @@ file(COPY "tests/" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) enable_testing() -add_test(NAME [poisson]poisson_3D_Dirichlet COMMAND Poisson Test.poisson.3D.arc) +add_test(NAME [poisson]3D_Dirichlet COMMAND Poisson Test.L-shape.3D.arc) if(FEMUTILS_HAS_SOLVER_BACKEND_HYPRE) - add_test(NAME [poisson]poisson_hypre_direct_3D COMMAND Poisson Test.poisson.sphere.3D.arc) + add_test(NAME [poisson]hypre_direct_3D COMMAND Poisson Test.sphere.3D.arc) if(FEMUTILS_HAS_PARALLEL_SOLVER AND MPIEXEC_EXECUTABLE) - add_test(NAME [poisson]poisson_hypre_direct_3D_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Poisson Test.poisson.sphere.3D.arc) + add_test(NAME [poisson]hypre_direct_3D_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Poisson Test.sphere.3D.arc) endif() endif() -add_test(NAME [poisson]poisson_direct COMMAND Poisson Test.poisson.direct.arc) +add_test(NAME [poisson]direct-solver COMMAND Poisson Test.direct-solver.arc) if(FEMUTILS_HAS_SOLVER_BACKEND_TRILINOS) - add_test(NAME [poisson]poisson_trilinos COMMAND Poisson Test.poisson.trilinos.arc) + add_test(NAME [poisson]trilinos COMMAND Poisson Test.trilinos.arc) endif() if(FEMUTILS_HAS_SOLVER_BACKEND_HYPRE) - add_test(NAME [poisson]poisson_hypre COMMAND Poisson Test.poisson.hypre.arc) - add_test(NAME [poisson]poisson_hypre_direct COMMAND Poisson Test.poisson.hypre_direct.arc) + add_test(NAME [poisson]hypre COMMAND Poisson Test.hypre.arc) + add_test(NAME [poisson]hypre_direct COMMAND Poisson Test.hypre_direct.arc) if(FEMUTILS_HAS_PARALLEL_SOLVER AND MPIEXEC_EXECUTABLE) - add_test(NAME [poisson]poisson_hypre_direct_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Poisson Test.poisson.hypre_direct.arc) - add_test(NAME [poisson]poisson_hypre_direct_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Poisson Test.poisson.hypre_direct.arc) + add_test(NAME [poisson]hypre_direct_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Poisson Test.hypre_direct.arc) + add_test(NAME [poisson]hypre_direct_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Poisson Test.hypre_direct.arc) endif() endif() if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC) - add_test(NAME [poisson]poisson COMMAND Poisson Test.poisson.arc) - add_test(NAME [poisson]poisson_petsc COMMAND Poisson Test.poisson.petsc.arc) - add_test(NAME [poisson]poisson_neumann COMMAND Poisson Test.poisson.neumann.arc) - add_test(NAME [poisson]poisson_porous COMMAND Poisson Test.poisson.porous.arc) + add_test(NAME [poisson]L-shape_2D COMMAND Poisson Test.L-shape.2D.arc) + add_test(NAME [poisson]petsc COMMAND Poisson Test.petsc.arc) + add_test(NAME [poisson]neumann COMMAND Poisson Test.neumann.arc) + add_test(NAME [poisson]porous COMMAND Poisson Test.porous.arc) endif() -arcanefem_add_gpu_test(NAME [poisson]poisson_gpu COMMAND ./Poisson ARGS Test.poisson.petsc.arc) +arcanefem_add_gpu_test(NAME [poisson]gpu COMMAND ./Poisson ARGS Test.petsc.arc) if(FEMUTILS_HAS_SOLVER_BACKEND_HYPRE) - arcanefem_add_gpu_test(NAME [poisson]poisson_hypre_direct_gpu COMMAND ./Poisson ARGS Test.poisson.hypre_direct.arc) - arcanefem_add_gpu_test(NAME [poisson]poisson_hypre_direct_3D_gpu COMMAND ./Poisson ARGS Test.poisson.sphere.3D.arc) + arcanefem_add_gpu_test(NAME [poisson]hypre_direct_gpu COMMAND ./Poisson ARGS Test.hypre_direct.arc) + arcanefem_add_gpu_test(NAME [poisson]hypre_direct_3D_gpu COMMAND ./Poisson ARGS Test.sphere.3D.arc) if(FEMUTILS_HAS_PARALLEL_SOLVER) - arcanefem_add_gpu_test(NAME [poisson]poisson_hypre_direct_gpu_4pe NB_MPI 4 COMMAND ./Poisson ARGS Test.poisson.hypre_direct.arc) - arcanefem_add_gpu_test(NAME [poisson]poisson_hypre_direct_3D_gpu_4pe NB_MPI 4 COMMAND ./Poisson ARGS Test.poisson.sphere.3D.arc) + arcanefem_add_gpu_test(NAME [poisson]hypre_direct_gpu_2pe NB_MPI 2 COMMAND ./Poisson ARGS Test.hypre_direct.arc) + arcanefem_add_gpu_test(NAME [poisson]hypre_direct_3D_gpu_2pe NB_MPI 2 COMMAND ./Poisson ARGS Test.sphere.3D.arc) endif() endif() # If parallel part is available, add some tests if(FEMUTILS_HAS_PARALLEL_SOLVER AND MPIEXEC_EXECUTABLE) - add_test(NAME [poisson]poisson_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Poisson Test.poisson.arc) + add_test(NAME [poisson]L-shape_2D_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Poisson Test.L-shape.2D.arc) endif() diff --git a/poisson/Readme.md b/poisson/Readme.md index a282dc1..12516f8 100644 --- a/poisson/Readme.md +++ b/poisson/Readme.md @@ -2,7 +2,7 @@ poisson_1_large -Here, we utilize ArcaneFEM to solve the Poisson equation, which is a fundamental elliptic partial differential equation (PDE). The provided code demonstrates a straightforward implementation of a 2D/3D unstructured mesh Galerkin finite element method (FEM) solver on an L-shaped domain. Although we shall explain here only 2D for keping the text simple. +Here, we utilize ArcaneFEM to solve the Poisson equation, which is a fundamental elliptic partial differential equation (PDE). The provided code demonstrates a straightforward implementation of a 2D/3D unstructured mesh Galerkin finite element method (FEM) solver on an L-shaped domain. Although we shall explain here only 2D for keeping the text simple. The Poisson equation is encountered in various physical scenarios, including heat conduction, substance diffusion, membrane elasticity, inviscid fluid flow, electrostatics, twisting of elastic rods, and water waves. It serves as a vital tool for modeling and understanding these phenomena. @@ -48,7 +48,7 @@ $\int_{\Omega^h}{\mathcal{f}} v^h=1\times10^5$, and #### properties ### -The value of constant source term $\mathcal{f}$ can be provided in `Test.poisson.arc` file +The value of constant source term $\mathcal{f}$ can be provided in `Test.L-shape.2D.arc` file ```xml @@ -58,7 +58,7 @@ The value of constant source term $\mathcal{f}$ can be provided in `Test.poiss #### Mesh #### -The mesh `L-shape.msh` is provided in the `Test.poisson.arc` file +The mesh `L-shape.msh` is provided in the `Test.L-shape.2D.arc` file ```xml @@ -74,7 +74,7 @@ Please not that use version 4.1 `.msh` file from `Gmsh`. #### Boundary conditions #### -The Dirichlet boundary conditions are provided in `Test.poisson.arc` file +The Dirichlet boundary conditions are provided in `Test.L-shape.2D.arc` file ```xml @@ -85,7 +85,7 @@ The Dirichlet boundary conditions are provided in `Test.poisson.arc` file So in the snippet above, three Dirichlet condition $u=0$ is applied to border ('boundary') which is a group of edges in the mesh file `L-shape.msh`. -If needed, the Neumann boundary conditions can also be provided in `Test.poission.arc` file +If needed, the Neumann boundary conditions can also be provided in `Test.L-shape.2D.arc` file ```xml @@ -100,10 +100,34 @@ If needed, the Neumann boundary conditions can also be provided in `Test.poiss poisson_1_large -For post processing the `ensight.case` file is outputted, which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). +For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). + + + + + +#### Tests available in this module #### + +The tests are present in the form of `.arc` files with a prefix `Text.`: + +| Name | Dimension | Boundary Condition | Solver | Comment | +| ------------- | --------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- | +| L-shape.2D | 2D | Homogeneous Dirichlet
Homogeneous source term | Default (PETSc) | - Serves as validation test | +| L-shape.3D | 3D | Dirichlet + Null flux
Homogeneous source term | PETSc | - Serves as validation test
- Uses BLCSR matrix format | +| sphere.3D | 3D | Dirichlet only
Homogeneous source term | HYPRE (ArcaneFEM) | - Uses BLCSR matrix format | +| direct-solver | 2D | Homogeneous Dirichlet
Homogeneous source term | Sequential Direct LU | | +| neumann | 2D | Neumann only | Default (PETSc) | - Serves as validation test | +| porous | 2D | Multiple Dirichlet only
Homogeneous source term | PETSc | - Used for Benchmarking | +| trilinos | 2D | Homogeneous Dirichlet
Homogeneous source term | TRILINOS | - Used to test TRILINOS | +| petsc | 2D | Homogeneous Dirichlet
Homogeneous source term | PETSc | - Serves as validation test | +| hypre | 2D | Homogeneous Dirichlet
Homogeneous source term | HYPRE (Arcane) | - Serves as validation test | +| hypre_direct | 2D | Homogeneous Dirichlet
Homogeneous source term | HYPRE (ArcaneFEM) | - Serves as validation test
- Uses BLCSR matrix format | +| | | | | | + + ### Time analysis ### -By setting the REGISTER_TIME flag to ON during the compilation, it is possible to generate a timer.txt file during the execution which contains the execution time of the +By setting the REGISTER_TIME flag to ON during the compilation, it is possible to generate a `timer.txt` file during the execution which contains the execution time of the different parts of poisson. Here is an example of compilation with this flag : @@ -115,3 +139,4 @@ cmake -S ${SOURCE_PATH} -B ${BUILD_DIR} -DCMAKE_PREFIX_PATH=${ARCANE_INSTALL_DIR cmake --build ${BUILD_DIR} ~~~ + diff --git a/poisson/Test.poisson.arc b/poisson/Test.L-shape.2D.arc similarity index 100% rename from poisson/Test.poisson.arc rename to poisson/Test.L-shape.2D.arc diff --git a/poisson/Test.poisson.3D.arc b/poisson/Test.L-shape.3D.arc similarity index 100% rename from poisson/Test.poisson.3D.arc rename to poisson/Test.L-shape.3D.arc diff --git a/poisson/Test.poisson.direct.arc b/poisson/Test.direct-solver.arc similarity index 100% rename from poisson/Test.poisson.direct.arc rename to poisson/Test.direct-solver.arc diff --git a/poisson/Test.poisson.hypre.arc b/poisson/Test.hypre.arc similarity index 100% rename from poisson/Test.poisson.hypre.arc rename to poisson/Test.hypre.arc diff --git a/poisson/Test.poisson.hypre_direct.arc b/poisson/Test.hypre_direct.arc similarity index 100% rename from poisson/Test.poisson.hypre_direct.arc rename to poisson/Test.hypre_direct.arc diff --git a/poisson/Test.poisson.neumann.arc b/poisson/Test.neumann.arc similarity index 100% rename from poisson/Test.poisson.neumann.arc rename to poisson/Test.neumann.arc diff --git a/poisson/Test.poisson.petsc.arc b/poisson/Test.petsc.arc similarity index 100% rename from poisson/Test.poisson.petsc.arc rename to poisson/Test.petsc.arc diff --git a/poisson/Test.poisson.porous.arc b/poisson/Test.porous.arc similarity index 100% rename from poisson/Test.poisson.porous.arc rename to poisson/Test.porous.arc diff --git a/poisson/Test.poisson.sphere.3D.arc b/poisson/Test.sphere.3D.arc similarity index 100% rename from poisson/Test.poisson.sphere.3D.arc rename to poisson/Test.sphere.3D.arc diff --git a/poisson/Test.poisson.trilinos.arc b/poisson/Test.trilinos.arc similarity index 100% rename from poisson/Test.poisson.trilinos.arc rename to poisson/Test.trilinos.arc From 9b6c30931e0efd9a4803623769b6e15b0ddfe8bc Mon Sep 17 00:00:00 2001 From: Afeef Date: Tue, 23 Jul 2024 13:39:06 +0200 Subject: [PATCH 2/6] Test renaming / reorg --- laplace/CMakeLists.txt | 20 +++++++++---------- laplace/Readme.md | 20 ++++++++++++++++--- ...est.laplace.3D.arc => Test.L-shape.3D.arc} | 0 ...0K.arc => Test.PointDirichlet-refined.arc} | 0 ...tDirichlet.arc => Test.PointDirichlet.arc} | 0 laplace/{Test.laplace.arc => Test.ring.arc} | 0 poisson/Readme.md | 7 +++---- 7 files changed, 30 insertions(+), 17 deletions(-) rename laplace/{Test.laplace.3D.arc => Test.L-shape.3D.arc} (100%) rename laplace/{Test.laplace.PointDirichlet.10K.arc => Test.PointDirichlet-refined.arc} (100%) rename laplace/{Test.laplace.PointDirichlet.arc => Test.PointDirichlet.arc} (100%) rename laplace/{Test.laplace.arc => Test.ring.arc} (100%) diff --git a/laplace/CMakeLists.txt b/laplace/CMakeLists.txt index d746d0e..ce3d41a 100644 --- a/laplace/CMakeLists.txt +++ b/laplace/CMakeLists.txt @@ -8,10 +8,10 @@ arcane_generate_axl(Fem) arcane_add_arcane_libraries_to_target(Laplace) target_include_directories(Laplace PUBLIC . ${CMAKE_CURRENT_BINARY_DIR}) configure_file(Laplace.config ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.laplace.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.laplace.3D.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.laplace.PointDirichlet.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.laplace.PointDirichlet.10K.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.ring.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.L-shape.3D.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.PointDirichlet.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.PointDirichlet-refined.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/ring.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/plancher.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/L-shape-3D.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) @@ -39,17 +39,17 @@ endif() enable_testing() if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC) - add_test(NAME [laplace]laplace COMMAND Laplace Test.laplace.arc) + add_test(NAME [laplace]2D_Dirichlet COMMAND Laplace Test.ring.arc) endif() -add_test(NAME [laplace]laplace_3D_Dirichlet COMMAND Laplace Test.laplace.3D.arc) -add_test(NAME [laplace]laplace_pointDirichlet COMMAND Laplace Test.laplace.PointDirichlet.arc) +add_test(NAME [laplace]3D_Dirichlet COMMAND Laplace Test.L-shape.3D.arc) +add_test(NAME [laplace]pointDirichlet COMMAND Laplace Test.PointDirichlet.arc) # If parallel part is available, add some tests if(FEMUTILS_HAS_PARALLEL_SOLVER AND MPIEXEC_EXECUTABLE) - add_test(NAME [laplace]laplace_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Laplace Test.laplace.arc) - add_test(NAME [laplace]laplace_3D_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Laplace Test.laplace.3D.arc) + add_test(NAME [laplace]2D_Dirichlet_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Laplace Test.ring.arc) + add_test(NAME [laplace]3D_Dirichlet_3D_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Laplace Test.L-shape.3D.arc) if(FEMTEST_HAS_GMSH_TEST) - add_test(NAME [laplace]laplace_pointDirichlet_10k_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Laplace Test.laplace.PointDirichlet.10K.arc) + add_test(NAME [laplace]pointDirichlet_10k_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Laplace Test.PointDirichlet-refined.arc) endif() endif() diff --git a/laplace/Readme.md b/laplace/Readme.md index 46f5dfa..70995d9 100644 --- a/laplace/Readme.md +++ b/laplace/Readme.md @@ -45,7 +45,7 @@ $\int_{\Omega^h_{{N}}}(\mathbf{q} \cdot \mathbf{n}) v^h=0$ #### Mesh #### -The mesh `plancher.msh` is provided in the `Test.laplace.arc` file +The mesh `plancher.msh` is provided in the `Test.ring.arc` file ```xml @@ -59,7 +59,7 @@ Please not that use version 4.1 `.msh` file from `Gmsh`. #### Boundary conditions #### -The Dirichlet (constant temperature) boundary conditions are provided in `Test.conduction.arc` file +The Dirichlet (constant $u$) boundary conditions are provided in `Test.ring.arc` file ```xml @@ -87,7 +87,21 @@ The Neumann boundary conditions are absent but could be provided in such a way #### Post Process #### -For post processing the `ensight.case` file is outputted, which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). +For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). + + + +#### Tests available in this module #### + +The tests are present in the form of `.arc` files with a prefix `Test.`: + +| Name | Dimension | Boundary Condition | Solver | Comment | +| ---------------------- | --------- | --------------------------- | -------------------- | --------------------------- | +| L-shape | 3D | Dirichlet + Null flux | Default (PETSc) | - Serves as validation test | +| ring | 2D | Dirichlet only | Default (PETSc) | | +| PointDirichlet | 2D | Point Dirichlet + Null flux | Sequential Direct LU | - Serves as validation test | +| PointDirichlet-refined | 2D | Point Dirichlet + Null flux | Default (PETSc) | - Refined version of test | +| | | | | | #### Point loading example #### diff --git a/laplace/Test.laplace.3D.arc b/laplace/Test.L-shape.3D.arc similarity index 100% rename from laplace/Test.laplace.3D.arc rename to laplace/Test.L-shape.3D.arc diff --git a/laplace/Test.laplace.PointDirichlet.10K.arc b/laplace/Test.PointDirichlet-refined.arc similarity index 100% rename from laplace/Test.laplace.PointDirichlet.10K.arc rename to laplace/Test.PointDirichlet-refined.arc diff --git a/laplace/Test.laplace.PointDirichlet.arc b/laplace/Test.PointDirichlet.arc similarity index 100% rename from laplace/Test.laplace.PointDirichlet.arc rename to laplace/Test.PointDirichlet.arc diff --git a/laplace/Test.laplace.arc b/laplace/Test.ring.arc similarity index 100% rename from laplace/Test.laplace.arc rename to laplace/Test.ring.arc diff --git a/poisson/Readme.md b/poisson/Readme.md index 12516f8..e2d6561 100644 --- a/poisson/Readme.md +++ b/poisson/Readme.md @@ -2,7 +2,7 @@ poisson_1_large -Here, we utilize ArcaneFEM to solve the Poisson equation, which is a fundamental elliptic partial differential equation (PDE). The provided code demonstrates a straightforward implementation of a 2D/3D unstructured mesh Galerkin finite element method (FEM) solver on an L-shaped domain. Although we shall explain here only 2D for keeping the text simple. +Here, we utilize ArcaneFEM to solve the Poisson equation, which is a fundamental elliptic partial differential equation (PDE). The provided code demonstrates a straightforward implementation of a 2D/3D unstructured mesh Galerkin finite element method (FEM) solver on an L-shaped domain. Although we shall explain here only 2D for keeping the text simple. The Poisson equation is encountered in various physical scenarios, including heat conduction, substance diffusion, membrane elasticity, inviscid fluid flow, electrostatics, twisting of elastic rods, and water waves. It serves as a vital tool for modeling and understanding these phenomena. @@ -68,7 +68,7 @@ The mesh `L-shape.msh` is provided in the `Test.L-shape.2D.arc` file ``` -Note, here `L-shape.msh` is a 2D mesh, if any other 3D mesh was loaded ArcaneFEM will run 3D calculations it is as simple as that. +Note, here `L-shape.msh` is a 2D mesh, if any other 3D mesh was loaded ArcaneFEM will run 3D calculations it is as simple as that. Please not that use version 4.1 `.msh` file from `Gmsh`. @@ -108,7 +108,7 @@ For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/ #### Tests available in this module #### -The tests are present in the form of `.arc` files with a prefix `Text.`: +The tests are present in the form of `.arc` files with a prefix `Test.`: | Name | Dimension | Boundary Condition | Solver | Comment | | ------------- | --------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- | @@ -139,4 +139,3 @@ cmake -S ${SOURCE_PATH} -B ${BUILD_DIR} -DCMAKE_PREFIX_PATH=${ARCANE_INSTALL_DIR cmake --build ${BUILD_DIR} ~~~ - From 9fcfc359310ce6864a515faf5592512b9032c2ab Mon Sep 17 00:00:00 2001 From: Afeef Date: Tue, 23 Jul 2024 14:01:00 +0200 Subject: [PATCH 3/6] Test renaming / reorg --- bilaplacian/CMakeLists.txt | 8 +-- bilaplacian/Readme.md | 51 ++++++++++++++++++- ...Bilaplacian.direct.arc => Test.direct.arc} | 0 ...internal_pcg.arc => Test.internal_pcg.arc} | 0 elasticity/Readme.md | 2 +- elastodynamics/Readme.md | 6 +-- electrostatics/Readme.md | 12 ++--- fourier/Readme.md | 4 +- heat/Readme.md | 10 ++-- 9 files changed, 71 insertions(+), 22 deletions(-) rename bilaplacian/{Test.Bilaplacian.direct.arc => Test.direct.arc} (100%) rename bilaplacian/{Test.Bilaplacian.internal_pcg.arc => Test.internal_pcg.arc} (100%) diff --git a/bilaplacian/CMakeLists.txt b/bilaplacian/CMakeLists.txt index 7dd72f3..539e17a 100644 --- a/bilaplacian/CMakeLists.txt +++ b/bilaplacian/CMakeLists.txt @@ -13,13 +13,13 @@ arcane_generate_axl(Fem) arcane_add_arcane_libraries_to_target(Bilaplacian) target_include_directories(Bilaplacian PUBLIC . ../fem ${CMAKE_CURRENT_BINARY_DIR}) configure_file(Bilaplacian.config ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Bilaplacian.internal_pcg.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Bilaplacian.direct.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.internal_pcg.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.direct.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/bilap.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) target_link_libraries(Bilaplacian PUBLIC FemUtils) enable_testing() -add_test(NAME [bilaplacian]direct_solver COMMAND Bilaplacian Test.Bilaplacian.direct.arc) -add_test(NAME [bilaplacian]internal_PCG_solver COMMAND Bilaplacian Test.Bilaplacian.internal_pcg.arc) +add_test(NAME [bilaplacian]direct_solver COMMAND Bilaplacian Test.direct.arc) +add_test(NAME [bilaplacian]internal_PCG_solver COMMAND Bilaplacian Test.internal_pcg.arc) diff --git a/bilaplacian/Readme.md b/bilaplacian/Readme.md index aac92a7..4045452 100644 --- a/bilaplacian/Readme.md +++ b/bilaplacian/Readme.md @@ -56,8 +56,57 @@ $\int_{\Omega^h}f v_1^h=1\times10^5$ ## The code ## +This XML configuration file (e.g `Test.direct.arc`) is used for setting up a Finite Element Method (FEM) simulation in ArcaneFEM. Below is a detailed breakdown of each section in the configuration. + +##### Mesh Configuration ###### + +The mesh configuration section specifies the mesh file to be used in the simulation: + +```xml + + + bilap.msh + + +``` + +- Defines the mesh file (`bilap.msh`) to be used in the simulation. Note that this file should be compatible with version 4.1 `.msh` format from `Gmsh`. + +###### FEM Configuration + +```xml + + -1.0 + WeakPenalty + 1.e30 + + boundary + 0.05 + + + direct + + +``` + +- **Source Term (f):** The source term in the partial differential equation (PDE) is set to `-1.0`. +- **Dirichlet Method:** Specifies the method (`WeakPenalty`) for enforcing Dirichlet boundary conditions. And we set the penalty parameter (`1.e30`) for weak enforcement of boundary conditions. +- **Dirichlet Boundary Condition:** Defines the boundary condition on the specified surface (`boundary`) with a given value (`0.05`). +- **Linear System Configuration:** Specifies the linear system settings, including the solver method (`direct`) to be used for solving the FEM problem. + #### Post Process #### -For post processing the `ensight.case` file is outputted, which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). +For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). + +#### Tests available in this module #### + +The tests are present in the form of `.arc` files with a prefix `Test.`: + +| Name | Dimension | Boundary Condition | Solver | Comment | +| ------------ | --------- | -------------------------------------- | -------------------- | --------------------------------- | +| direct | 2D | Dirichlet only
Homogeneous Source | Sequential Direct LU | - Test Weak Penalty method for BC | +| internal_pcg | 2D | Dirichlet only
Homogeneous Source | Arcane's PCG solver | | +| | | | | | + diff --git a/bilaplacian/Test.Bilaplacian.direct.arc b/bilaplacian/Test.direct.arc similarity index 100% rename from bilaplacian/Test.Bilaplacian.direct.arc rename to bilaplacian/Test.direct.arc diff --git a/bilaplacian/Test.Bilaplacian.internal_pcg.arc b/bilaplacian/Test.internal_pcg.arc similarity index 100% rename from bilaplacian/Test.Bilaplacian.internal_pcg.arc rename to bilaplacian/Test.internal_pcg.arc diff --git a/elasticity/Readme.md b/elasticity/Readme.md index 310e6e4..779914b 100644 --- a/elasticity/Readme.md +++ b/elasticity/Readme.md @@ -37,4 +37,4 @@ $$\varepsilon_{ij}(\mathbf{u}) = \frac{1}{2}(\frac{\partial{u}_i}{\partial{x}_j} #### Post Process #### -For post processing the `ensight.case` file is output, which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). +For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). diff --git a/elastodynamics/Readme.md b/elastodynamics/Readme.md index 3adcd4f..61a785c 100644 --- a/elastodynamics/Readme.md +++ b/elastodynamics/Readme.md @@ -18,7 +18,7 @@ here, $\sigma(\mathbf{x})$ is stress tensor, $\mathbf{f}(\mathbf{x})$ is the bod $$ \sigma(\mathbf{x}) = \lambda(\nabla\cdot\mathbf{u}(\mathbf{x}))\mathbb{I} + \mu (\nabla\mathbf{u}(\mathbf{x}) + \left(\nabla\mathbf{u}(\mathbf{x})\right)^\text{T}) $$ -here, $\lambda\in\mathbb{R}^{+}$ and $\mu\in\mathbb{R}^{+}$ are the Lame's elasticity parameters for the homogeneous material, $\mathbb{I}$ is the identity tensor, and $\mathbf{u}(\mathbf{x})$ is the displacement field vector. This governing PDE iis also knows as Navier's equation. +here, $\lambda\in\mathbb{R}^{+}$ and $\mu\in\mathbb{R}^{+}$ are the Lame's elasticity parameters for the homogeneous material, $\mathbb{I}$ is the identity tensor, and $\mathbf{u}(\mathbf{x})$ is the displacement field vector. This governing PDE iis also knows as Navier's equation. #### Variational formulation #### @@ -28,7 +28,7 @@ $$\int_{\Omega} \rho \ddot{\mathbf{u}}(\mathbf{x})\cdot \mathbf{v}(\mathbf{x}) + here, $\mathbf{t}(\mathbf{x})$ is the traction vector imposed on Neumann boundary $\Omega_N$, and $\varepsilon(\mathbf{u}(\mathbf{x})) = \varepsilon_{ij}(\mathbf{u}(\mathbf{x}))$ is the strain tensor given by -$$\varepsilon_{ij}(\mathbf{u}) = \frac{1}{2}(\frac{\partial{u}_i}{\partial{x}_j} + \frac{\partial{u}_j}{\partial{x}_i} )$$ +$$\varepsilon_{ij}(\mathbf{u}) = \frac{1}{2}(\frac{\partial{u}_i}{\partial{x}_j} + \frac{\partial{u}_j}{\partial{x}_i} )$$ ## The code ## @@ -36,7 +36,7 @@ $$\varepsilon_{ij}(\mathbf{u}) = \frac{1}{2}(\frac{\partial{u}_i}{\partial{x}_j} #### Post Process #### -For post processing the `ensight.case` file is outputted, which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). +For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). diff --git a/electrostatics/Readme.md b/electrostatics/Readme.md index e1d0fe9..22cd0d9 100644 --- a/electrostatics/Readme.md +++ b/electrostatics/Readme.md @@ -16,11 +16,11 @@ $$\text{curl}\mathbf{E} = 0 \quad \forall (x,y)\in\Omega^h $$ here, $\rho$ and $\epsilon$ are charge density and permittivity of free space, respectively. -Introducing, electrostatic potential $\phi$ such that +Introducing, electrostatic potential $\phi$ such that $$\mathbf{E}=-\nabla\phi$$ -we get the following form of equation +we get the following form of equation $$-\nabla\phi=\rho/\epsilon \quad \forall (x,y)\in\Omega^h$$ @@ -28,7 +28,7 @@ To complete the problem description, first type (Dirichlet) boundary condition $\phi = 0.0 \quad \forall(x,y)\in\partial\Omega^h_{\text{external}}\subset\partial \Omega^h,$ -and internally there are two rods held at +1 and -1 volt receptively, which is again translated to two Dirichlet boundary conditions +and internally there are two rods held at +1 and -1 volt receptively, which is again translated to two Dirichlet boundary conditions $\phi = 1.0 \quad \forall(x,y)\in\partial\Omega^h_{\text{rod1}}\subset\partial \Omega^h,$ @@ -98,7 +98,7 @@ The Dirichlet boundary conditions are provided in `Test.Electrostatics.arc` fil
``` -So in the snippet above, three Dirichlet condition $\phi=0$ is applied to border ('external') which is a group of edges in the mesh file `box-rods.msh`. Similar logic applies to other two Dirichlet conditions. +So in the snippet above, three Dirichlet condition $\phi=0$ is applied to border ('external') which is a group of edges in the mesh file `box-rods.msh`. Similar logic applies to other two Dirichlet conditions. If needed, the Neumann boundary conditions can also be provided in `Test.Electrostatics.arc` file @@ -113,10 +113,10 @@ If needed, the Neumann boundary conditions can also be provided in `Test.Elect #### Post Process #### -For post processing the `ensight.case` file is outputted, which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). +For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). -## Gallery ## +## Gallery ## - E-type interdigital capacitor ![image](https://github.com/arcaneframework/arcanefem/assets/52162083/822a3b8c-5a55-4a5b-8450-74224d2a257d) diff --git a/fourier/Readme.md b/fourier/Readme.md index 36ce05a..56d9b91 100644 --- a/fourier/Readme.md +++ b/fourier/Readme.md @@ -71,7 +71,7 @@ $\int_{\Omega^h}\dot{\mathcal{Q}} v^h=1\times10^5$, and $\lambda=1.75$ -Please note that the above equation is often called as the weak formulation of the Fourier equation and in fact the finite element variable $u^h$ is an appoximation of temperature $T$. +Please note that the above equation is often called as the weak formulation of the Fourier equation and in fact the finite element variable $u^h$ is an appoximation of temperature $T$. ## The code ## @@ -138,7 +138,7 @@ The Neumann boundary conditions are also provided in `Test.conduction.arc` fil #### Post Process #### -For post processing the `ensight.case` file is outputted, which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). +For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). #### multi-material example #### diff --git a/heat/Readme.md b/heat/Readme.md index a39a0ba..a08c9e3 100644 --- a/heat/Readme.md +++ b/heat/Readme.md @@ -26,7 +26,7 @@ in addition, we are provided with initial conditions: $T(x,y,0)=30.0$ -Finally no heat-source is present within the domain +Finally no heat-source is present within the domain $\dot{\mathcal{Q}}=0$ @@ -69,9 +69,9 @@ The value of thermal conductivity $\lambda$ and heat source $t_{max}, \delta t$ ``` -#### Mesh #### +#### Mesh #### -The mesh `plate.msh` is provided in the `Test.conduction.arc` file +The mesh `plate.msh` is provided in the `Test.conduction.arc` file ```xml @@ -81,7 +81,7 @@ The mesh `plate.msh` is provided in the `Test.conduction.arc` file ``` -Please not that use version 4.1 `.msh` file from `Gmsh`. +Please not that use version 4.1 `.msh` file from `Gmsh`. #### Boundary conditions #### @@ -128,7 +128,7 @@ See `Test.conduction.convection.arc` for this. Here the 'Left' border has Diric #### Post Process #### -For post processing the `ensight.case` file is outputted, which can be read by PARAVIS. +For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). The output can be $\mathbb{P}_1$ FE order (on nodes) or $\mathbb{P}_0$ FE order (on cells). In the `Test.conduction.arc` file we post-process both types From 128a4df131df557d981f993ea32decd40d2dde04 Mon Sep 17 00:00:00 2001 From: Afeef Date: Tue, 23 Jul 2024 14:38:51 +0200 Subject: [PATCH 4/6] Elasticity Test renaming / reorg --- elasticity/CMakeLists.txt | 26 ++--- elasticity/Readme.md | 100 ++++++++++++++++++ ....bar.DirichletViaRowColumnElimination.arc} | 0 ...> Test.bar.DirichletViaRowElimination.arc} | 0 ...ichlet.arc => Test.bar.PointDirichlet.arc} | 0 .../{Test.Elasticity.arc => Test.bar.arc} | 0 ...ity.traction.arc => Test.bar.traction.arc} | 0 7 files changed, 113 insertions(+), 13 deletions(-) rename elasticity/{Test.Elasticity.DirichletViaRowColumnElimination.arc => Test.bar.DirichletViaRowColumnElimination.arc} (100%) rename elasticity/{Test.Elasticity.DirichletViaRowElimination.arc => Test.bar.DirichletViaRowElimination.arc} (100%) rename elasticity/{Test.Elasticity.PointDirichlet.arc => Test.bar.PointDirichlet.arc} (100%) rename elasticity/{Test.Elasticity.arc => Test.bar.arc} (100%) rename elasticity/{Test.Elasticity.traction.arc => Test.bar.traction.arc} (100%) diff --git a/elasticity/CMakeLists.txt b/elasticity/CMakeLists.txt index ceb6113..993f708 100644 --- a/elasticity/CMakeLists.txt +++ b/elasticity/CMakeLists.txt @@ -8,11 +8,11 @@ arcane_generate_axl(Fem) arcane_add_arcane_libraries_to_target(Elasticity) target_include_directories(Elasticity PUBLIC . ../fem ${CMAKE_CURRENT_BINARY_DIR}) configure_file(Elasticity.config ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elasticity.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elasticity.traction.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elasticity.PointDirichlet.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elasticity.DirichletViaRowElimination.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elasticity.DirichletViaRowColumnElimination.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.traction.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.PointDirichlet.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.DirichletViaRowElimination.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.DirichletViaRowColumnElimination.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/bar.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) target_link_libraries(Elasticity PUBLIC FemUtils) @@ -25,17 +25,17 @@ enable_testing() file(COPY "tests/" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC) - add_test(NAME [elasticity] COMMAND Elasticity Test.Elasticity.arc) - add_test(NAME [elasticity]Dirichlet_traction COMMAND Elasticity Test.Elasticity.traction.arc) - add_test(NAME [elasticity]Dirichlet_pointBC COMMAND Elasticity Test.Elasticity.PointDirichlet.arc) - add_test(NAME [elasticity]Dirichlet_via_RowElimination COMMAND Elasticity Test.Elasticity.DirichletViaRowElimination.arc) - add_test(NAME [elasticity]Dirichlet_via_RowColElimination COMMAND Elasticity Test.Elasticity.DirichletViaRowColumnElimination.arc) + add_test(NAME [elasticity] COMMAND Elasticity Test.bar.arc) + add_test(NAME [elasticity]Dirichlet_traction COMMAND Elasticity Test.bar.traction.arc) + add_test(NAME [elasticity]Dirichlet_pointBC COMMAND Elasticity Test.bar.PointDirichlet.arc) + add_test(NAME [elasticity]Dirichlet_via_RowElimination COMMAND Elasticity Test.bar.DirichletViaRowElimination.arc) + add_test(NAME [elasticity]Dirichlet_via_RowColElimination COMMAND Elasticity Test.bar.DirichletViaRowColumnElimination.arc) endif() # If parallel part is available, add some tests if(FEMUTILS_HAS_PARALLEL_SOLVER AND MPIEXEC_EXECUTABLE) # Temporarely remove this test because there is a difference on node 37 - add_test(NAME [elasticity]parallel_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Elasticity Test.Elasticity.arc) - add_test(NAME [elasticity]parallel_Dirichlet_RowElimination_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Elasticity Test.Elasticity.DirichletViaRowElimination.arc) - add_test(NAME [elasticity]parallel_Dirichlet_RowColElimination_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Elasticity Test.Elasticity.DirichletViaRowColumnElimination.arc) + add_test(NAME [elasticity]parallel_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Elasticity Test.bar.arc) + add_test(NAME [elasticity]parallel_Dirichlet_RowElimination_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Elasticity Test.bar.DirichletViaRowElimination.arc) + add_test(NAME [elasticity]parallel_Dirichlet_RowColElimination_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Elasticity Test.bar.DirichletViaRowColumnElimination.arc) endif() diff --git a/elasticity/Readme.md b/elasticity/Readme.md index 779914b..58453cd 100644 --- a/elasticity/Readme.md +++ b/elasticity/Readme.md @@ -33,8 +33,108 @@ $$\varepsilon_{ij}(\mathbf{u}) = \frac{1}{2}(\frac{\partial{u}_i}{\partial{x}_j} ## The code ## +This XML configuration file is used for setting up an Elasticity problem simulation in ArcaneFEM. Below is a detailed explanation of each section in the configuration for one of the tests `Test.bar.arc`. + +###### Mesh Configuration + +The mesh configuration section specifies the mesh file to be used in the simulation: + +```xml + + + bar.msh + + + +``` + +- **Mesh File:** Defines the mesh file (`bar.msh`) to be used in the simulation. Note that this file should be compatible with version 4.1 `.msh` format from `Gmsh`. + +###### FEM Configuration + +The Finite Element Method (FEM) configuration is provided in the `Test.bar.arc`. + +```xml + + test_elasticity_results.txt + 21.0e5 + 0.28 + -1.0 + Penalty + + left + 0.0 + 0.0 + + +``` + +Let us explain this point wise + +- **Result File:** Specifies the file for validation test (OPTIONAL). Use only if you want to compare solutions + + ```xml + test_elasticity_results.txt + ``` + +- **Material Properties:** The Young's Modulus (E) for the material, defined as `21.0e5`. The Poisson's Ratio (nu) for the material, defined as `0.28`. + + ```xml + 21.0e5 + 0.28 + ``` + +- **Source Term (f2):** The source term in Y direction hence (f2) in the PDE, set to `-1.0`. + + ```xml + -1.0 + ``` + +- **Dirichlet Method:** Specifies the method (`Penalty`) for enforcing Dirichlet boundary conditions. And the boundary condition on the specified surface (`left`) with given values for `u1` and `u2`, which we set to 0 since the end is clamped. + + ```xml + Penalty + + left + 0.0 + 0.0 + + ``` + +###### Post-Processing Configuration + +The post-processing configuration is specified to control how and when results are saved: + +```xml + + 1 + + + U + + +``` + +- **Output Period:** Sets the interval at which results are saved. + +- **Format:** Specifies the format for the output files (`VtkHdfV2PostProcessor`). + +- **Output Variables:** Lists the variables (`U`) which is the displacement vector to be included in the output. + #### Post Process #### For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). + +#### Tests available in this module #### + +The tests are present in the form of `.arc` files with a prefix `Test.`: + +| Name | Dimension | Boundary Condition | Solver | Comment | +| ------------------------------------ | --------- | ----------------------------------------------------------- | --------------- | ------------------------------------------------------------ | +| bar | 2D | Clamped Dirichlet + Null flux
Body force (Source Term) | Default (PETSc) | - Serves as validation test | +| bar.DirichletViaRowElimination | 2D | Clamped Dirichlet + Null flux
Body force (Source Term) | PETSc | - Row Elimination for BC
- GMRES with ILU(0) Solver | +| bar.DirichletViaRowColumnElimination | 2D | Clamped Dirichlet + Null flux
Body force (Source Term) | PETSc | - Row and Column Elimination for BC
- CG with AMG Solver | +| bar.traction | 2D | Clamped Dirichlet
Traction (Neumann) | Default (PETSc) | | +| | | | | | diff --git a/elasticity/Test.Elasticity.DirichletViaRowColumnElimination.arc b/elasticity/Test.bar.DirichletViaRowColumnElimination.arc similarity index 100% rename from elasticity/Test.Elasticity.DirichletViaRowColumnElimination.arc rename to elasticity/Test.bar.DirichletViaRowColumnElimination.arc diff --git a/elasticity/Test.Elasticity.DirichletViaRowElimination.arc b/elasticity/Test.bar.DirichletViaRowElimination.arc similarity index 100% rename from elasticity/Test.Elasticity.DirichletViaRowElimination.arc rename to elasticity/Test.bar.DirichletViaRowElimination.arc diff --git a/elasticity/Test.Elasticity.PointDirichlet.arc b/elasticity/Test.bar.PointDirichlet.arc similarity index 100% rename from elasticity/Test.Elasticity.PointDirichlet.arc rename to elasticity/Test.bar.PointDirichlet.arc diff --git a/elasticity/Test.Elasticity.arc b/elasticity/Test.bar.arc similarity index 100% rename from elasticity/Test.Elasticity.arc rename to elasticity/Test.bar.arc diff --git a/elasticity/Test.Elasticity.traction.arc b/elasticity/Test.bar.traction.arc similarity index 100% rename from elasticity/Test.Elasticity.traction.arc rename to elasticity/Test.bar.traction.arc From b932f96216bb10b94b7e3e3541e4dc0d3d57cbd9 Mon Sep 17 00:00:00 2001 From: Afeef Date: Tue, 23 Jul 2024 15:01:13 +0200 Subject: [PATCH 5/6] Test renaming / reorg --- elastodynamics/CMakeLists.txt | 24 ++-- elastodynamics/Readme.md | 116 ++++++++++++++++++ ...ynamics.Galpha.arc => Test.bar.Galpha.arc} | 0 .../{Test.Elastodynamics.arc => Test.bar.arc} | 4 +- ...amics.damping.arc => Test.bar.damping.arc} | 0 ...Test.bar.dirichlet.traction.bodyforce.arc} | 0 ...on.arc => Test.bar.transient-traction.arc} | 0 ...intBC.arc => Test.semi-circle.pointBC.arc} | 0 electrostatics/CMakeLists.txt | 14 +-- electrostatics/Readme.md | 13 ++ ...atics.Capacitor.arc => Test.Capacitor.arc} | 0 ...t.Electrostatics.arc => Test.box-rods.arc} | 0 ...ics.rod-circle.arc => Test.rod-circle.arc} | 0 13 files changed, 149 insertions(+), 22 deletions(-) rename elastodynamics/{Test.Elastodynamics.Galpha.arc => Test.bar.Galpha.arc} (100%) rename elastodynamics/{Test.Elastodynamics.arc => Test.bar.arc} (96%) rename elastodynamics/{Test.Elastodynamics.damping.arc => Test.bar.damping.arc} (100%) rename elastodynamics/{Test.Elastodynamics.dirichlet.traction.bodyforce.arc => Test.bar.dirichlet.traction.bodyforce.arc} (100%) rename elastodynamics/{Test.Elastodynamics.transient-traction.arc => Test.bar.transient-traction.arc} (100%) rename elastodynamics/{Test.Elastodynamics.pointBC.arc => Test.semi-circle.pointBC.arc} (100%) rename electrostatics/{Test.Electrostatics.Capacitor.arc => Test.Capacitor.arc} (100%) rename electrostatics/{Test.Electrostatics.arc => Test.box-rods.arc} (100%) rename electrostatics/{Test.Electrostatics.rod-circle.arc => Test.rod-circle.arc} (100%) diff --git a/elastodynamics/CMakeLists.txt b/elastodynamics/CMakeLists.txt index cc56bfd..d8ea5dd 100644 --- a/elastodynamics/CMakeLists.txt +++ b/elastodynamics/CMakeLists.txt @@ -8,12 +8,12 @@ arcane_generate_axl(Fem) arcane_add_arcane_libraries_to_target(Elastodynamics) target_include_directories(Elastodynamics PUBLIC . ../fem ${CMAKE_CURRENT_BINARY_DIR}) configure_file(Elastodynamics.config ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elastodynamics.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elastodynamics.pointBC.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elastodynamics.damping.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elastodynamics.dirichlet.traction.bodyforce.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elastodynamics.Galpha.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Elastodynamics.transient-traction.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.semi-circle.pointBC.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.damping.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.dirichlet.traction.bodyforce.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.Galpha.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.bar.transient-traction.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(traction_bar_test_1.txt ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/bar_dynamic.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/semi-circle.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) @@ -23,13 +23,13 @@ target_link_libraries(Elastodynamics PUBLIC FemUtils) enable_testing() if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC) - add_test(NAME [elastodynamics] COMMAND Elastodynamics Test.Elastodynamics.arc) - add_test(NAME [elastodynamics]transient_traction COMMAND Elastodynamics Test.Elastodynamics.transient-traction.arc) - add_test(NAME [elastodynamics]Dirichlet_pointBc COMMAND Elastodynamics Test.Elastodynamics.pointBC.arc) - add_test(NAME [elastodynamics]constant_traction_and_damping COMMAND Elastodynamics Test.Elastodynamics.damping.arc) - add_test(NAME [elastodynamics]time-discretization_Galpha COMMAND Elastodynamics Test.Elastodynamics.Galpha.arc) + add_test(NAME [elastodynamics] COMMAND Elastodynamics Test.bar.arc) + add_test(NAME [elastodynamics]transient_traction COMMAND Elastodynamics Test.bar.transient-traction.arc) + add_test(NAME [elastodynamics]Dirichlet_pointBc COMMAND Elastodynamics Test.semi-circle.pointBC.arc) + add_test(NAME [elastodynamics]constant_traction_and_damping COMMAND Elastodynamics Test.bar.damping.arc) + add_test(NAME [elastodynamics]time-discretization_Galpha COMMAND Elastodynamics Test.bar.Galpha.arc) endif() if(FEMUTILS_HAS_SOLVER_BACKEND_HYPRE) - add_test(NAME [elastodynamics]Dirichlet_traction_bodyforce COMMAND Elastodynamics Test.Elastodynamics.dirichlet.traction.bodyforce.arc) + add_test(NAME [elastodynamics]Dirichlet_traction_bodyforce COMMAND Elastodynamics Test.bar.dirichlet.traction.bodyforce.arc) endif() diff --git a/elastodynamics/Readme.md b/elastodynamics/Readme.md index 61a785c..bd19bcb 100644 --- a/elastodynamics/Readme.md +++ b/elastodynamics/Readme.md @@ -32,6 +32,122 @@ $$\varepsilon_{ij}(\mathbf{u}) = \frac{1}{2}(\frac{\partial{u}_i}{\partial{x}_j} ## The code ## +This XML configuration file is used for setting up an Elastodynamics problem simulation in ArcaneFEM. Below is a detailed explanation of each section in the configuration for one such file `Test.bar.arc`. + +###### Mesh Configuration + +The mesh configuration section specifies the mesh file to be used in the simulation: + +```xml + + + bar_dynamic.msh + + +``` + +- **Mesh File:** Defines the mesh file (`bar_dynamic.msh`) to be used in the simulation. Note that this file should be compatible with version 4.1 `.msh` format from `Gmsh`. + +###### FEM Configuration + +The Finite Element Method (FEM) configuration is provided in the `Test.bar.arc`. + +```xml + + Newmark-beta + 2. +
0.08
+ 1.0 + 576.9230769 + 384.6153846 + Penalty + 1.e64 + + surfaceleft + 0.0 + 0.0 + + + surfaceright + 0.01 + + + petsc + ilu + +
+``` + +Let us explain this point wise + +- **Time parameters:** The Maximum Time (tmax) time is set to `2.0`. Time Step (dt) for the simulation is set to `0.08`. Time Discretization is set via Newmark-beta + + ```xml + Newmark-beta + 2. +
0.08
+ ``` + +- **Material Properties:** The Density (rho) of the material is set to `1.0`. Lame's First Parameter (lambda) is set to `576.9230769`. The Shear Modulus (mu) is set to `384.6153846`. + + ```xml + 1.0 + 576.9230769 + 384.6153846 + ``` + +- **Dirichlet Boundary Condition:** Penalty method (`Penalty`) for enforcing Dirichlet boundary conditions, with penalty parameter for enforcing Dirichlet conditions to `1.e64`. And the boundary condition on the specified surface (`left`) with given values for `u1` and `u2`, which we set to 0 since the end is clamped. + + ```xml + Penalty + 1.e64 + + left + 0.0 + 0.0 + + ``` + +- **Traction Boundary Condition:** Defines the traction boundary condition on the specified surface (`surfaceright`) with a given value for `t2`. + + ```xml + + surfaceright + 0.01 + + ``` + +- **Linear System Configuration:** Specifies the linear system settings, including the solver backend (`petsc`) and the preconditioner (`ilu`). + + ```xml + + petsc + ilu + + ``` + + + +###### Post-Processing Configuration + +The post-processing configuration is specified to control how and when results are saved: + +```xml + + 1 + + + U + + +``` + +- **Output Period:** Sets the interval at which results are saved. + +- **Format:** Specifies the format for the output files (`VtkHdfV2PostProcessor`). + +- **Output Variables:** Lists the variables (`U`) which is the displacement vector to be included in the output. + #### Post Process #### diff --git a/elastodynamics/Test.Elastodynamics.Galpha.arc b/elastodynamics/Test.bar.Galpha.arc similarity index 100% rename from elastodynamics/Test.Elastodynamics.Galpha.arc rename to elastodynamics/Test.bar.Galpha.arc diff --git a/elastodynamics/Test.Elastodynamics.arc b/elastodynamics/Test.bar.arc similarity index 96% rename from elastodynamics/Test.Elastodynamics.arc rename to elastodynamics/Test.bar.arc index efb0aad..77fa77b 100644 --- a/elastodynamics/Test.Elastodynamics.arc +++ b/elastodynamics/Test.bar.arc @@ -22,16 +22,14 @@
+ Newmark-beta 2.
0.08
- 0.20 - 0.40 1.0 576.9230769 384.6153846 Penalty 1.e64 - Newmark-beta surfaceleft 0.0 diff --git a/elastodynamics/Test.Elastodynamics.damping.arc b/elastodynamics/Test.bar.damping.arc similarity index 100% rename from elastodynamics/Test.Elastodynamics.damping.arc rename to elastodynamics/Test.bar.damping.arc diff --git a/elastodynamics/Test.Elastodynamics.dirichlet.traction.bodyforce.arc b/elastodynamics/Test.bar.dirichlet.traction.bodyforce.arc similarity index 100% rename from elastodynamics/Test.Elastodynamics.dirichlet.traction.bodyforce.arc rename to elastodynamics/Test.bar.dirichlet.traction.bodyforce.arc diff --git a/elastodynamics/Test.Elastodynamics.transient-traction.arc b/elastodynamics/Test.bar.transient-traction.arc similarity index 100% rename from elastodynamics/Test.Elastodynamics.transient-traction.arc rename to elastodynamics/Test.bar.transient-traction.arc diff --git a/elastodynamics/Test.Elastodynamics.pointBC.arc b/elastodynamics/Test.semi-circle.pointBC.arc similarity index 100% rename from elastodynamics/Test.Elastodynamics.pointBC.arc rename to elastodynamics/Test.semi-circle.pointBC.arc diff --git a/electrostatics/CMakeLists.txt b/electrostatics/CMakeLists.txt index 83a52ad..66123ed 100644 --- a/electrostatics/CMakeLists.txt +++ b/electrostatics/CMakeLists.txt @@ -8,9 +8,9 @@ arcane_generate_axl(Fem) arcane_add_arcane_libraries_to_target(Electrostatics) target_include_directories(Electrostatics PUBLIC . ${CMAKE_CURRENT_BINARY_DIR}) configure_file(Electrostatics.config ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Electrostatics.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Electrostatics.rod-circle.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -configure_file(Test.Electrostatics.Capacitor.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.box-rods.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.rod-circle.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) +configure_file(Test.Capacitor.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/box-rods.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/box-rod-circle.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) configure_file(${MSH_DIR}/interdigital_capacitor.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) @@ -25,12 +25,12 @@ file(COPY "tests/" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) enable_testing() if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC) - add_test(NAME [electrostatics] COMMAND Electrostatics Test.Electrostatics.arc) - add_test(NAME [electrostatics]Capacitor COMMAND Electrostatics Test.Electrostatics.Capacitor.arc) - add_test(NAME [electrostatics]rod-circle COMMAND Electrostatics Test.Electrostatics.rod-circle.arc) + add_test(NAME [electrostatics]box-rods COMMAND Electrostatics Test.box-rods.arc) + add_test(NAME [electrostatics]capacitor COMMAND Electrostatics Test.Capacitor.arc) + add_test(NAME [electrostatics]rod-circle COMMAND Electrostatics Test.rod-circle.arc) endif() # If parallel part is available, add some tests if(FEMUTILS_HAS_PARALLEL_SOLVER AND MPIEXEC_EXECUTABLE) - add_test(NAME [electrostatics]parallel_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Electrostatics Test.Electrostatics.arc) + add_test(NAME [electrostatics]parallel_4pe COMMAND ${MPIEXEC_EXECUTABLE} -n 4 ./Electrostatics Test.box-rods.arc) endif() diff --git a/electrostatics/Readme.md b/electrostatics/Readme.md index 22cd0d9..973db91 100644 --- a/electrostatics/Readme.md +++ b/electrostatics/Readme.md @@ -116,6 +116,19 @@ If needed, the Neumann boundary conditions can also be provided in `Test.Elect For post processing the `Mesh0.hdf` file is outputted (in `output/depouillement/vtkhdfv2` folder), which can be read by PARAVIS. The output is of the $\mathbb{P}_1$ FE order (on nodes). +#### Tests available in this module #### + +The tests are present in the form of `.arc` files with a prefix `Test.`: + +| Name | Dimension | Boundary Condition | Solver | Comment | +| ---------- | --------- | -------------------------------------- | --------------- | --------------------------- | +| box-rods | 2D | Dirichlet only
Homogeneous Source | PETSc (Default) | - Serves as validation test | +| rod-circle | 2D | Dirichlet only
Homogeneous Source | PETSc (Default) | - Serves as validation test | +| Capacitor | 2D | Dirichlet only
Homogeneous Source | PETSc (Default) | | +| | | | | | + + + ## Gallery ## - E-type interdigital capacitor ![image](https://github.com/arcaneframework/arcanefem/assets/52162083/822a3b8c-5a55-4a5b-8450-74224d2a257d) diff --git a/electrostatics/Test.Electrostatics.Capacitor.arc b/electrostatics/Test.Capacitor.arc similarity index 100% rename from electrostatics/Test.Electrostatics.Capacitor.arc rename to electrostatics/Test.Capacitor.arc diff --git a/electrostatics/Test.Electrostatics.arc b/electrostatics/Test.box-rods.arc similarity index 100% rename from electrostatics/Test.Electrostatics.arc rename to electrostatics/Test.box-rods.arc diff --git a/electrostatics/Test.Electrostatics.rod-circle.arc b/electrostatics/Test.rod-circle.arc similarity index 100% rename from electrostatics/Test.Electrostatics.rod-circle.arc rename to electrostatics/Test.rod-circle.arc From b8d9dfcccdd187eb891ad70901b3903fc27bae77 Mon Sep 17 00:00:00 2001 From: Afeef Date: Tue, 23 Jul 2024 15:31:19 +0200 Subject: [PATCH 6/6] supress test --- bilaplacian/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bilaplacian/CMakeLists.txt b/bilaplacian/CMakeLists.txt index 539e17a..7eb54cb 100644 --- a/bilaplacian/CMakeLists.txt +++ b/bilaplacian/CMakeLists.txt @@ -22,4 +22,4 @@ target_link_libraries(Bilaplacian PUBLIC FemUtils) enable_testing() add_test(NAME [bilaplacian]direct_solver COMMAND Bilaplacian Test.direct.arc) -add_test(NAME [bilaplacian]internal_PCG_solver COMMAND Bilaplacian Test.internal_pcg.arc) +#add_test(NAME [bilaplacian]internal_PCG_solver COMMAND Bilaplacian Test.internal_pcg.arc)