Skip to content

Commit

Permalink
enable parallel testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mohd-afeef-badri committed Aug 2, 2024
1 parent 89fdc67 commit f786330
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
8 changes: 8 additions & 0 deletions acoustics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ arcane_add_arcane_libraries_to_target(Acoustics)
target_include_directories(Acoustics PUBLIC . ${CMAKE_CURRENT_BINARY_DIR})
configure_file(Acoustics.config ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
configure_file(Test.sub.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
configure_file(Test.sub.hypre.arc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
configure_file(${MSH_DIR}/sub.msh ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)

file(COPY "tests/" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
Expand All @@ -18,3 +19,10 @@ target_link_libraries(Acoustics PUBLIC FemUtils)
enable_testing()

add_test(NAME [Acoustics]2D_submarine COMMAND Acoustics Test.sub.arc)

if(FEMUTILS_HAS_SOLVER_BACKEND_HYPRE)
add_test(NAME [Acoustics]2D_submarine_hypre COMMAND Acoustics Test.sub.hypre.arc)
if(FEMUTILS_HAS_PARALLEL_SOLVER AND MPIEXEC_EXECUTABLE)
add_test(NAME [Acoustics]2D_submarine_hypret_2pe COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Acoustics Test.sub.hypre.arc)
endif()
endif()
67 changes: 67 additions & 0 deletions acoustics/Test.sub.hypre.arc
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0"?>
<!--
Case configuration for an acoustics simulation.
The following sections define:
- General simulation settings
- Mesh configurations details
- Finite Element Method (FEM) configurations
- Post-processing options
-->
<case codename="Acoustics" xml:lang="en" codeversion="1.0">

<!--
Arcane-specific settings:
- title: The name or description of the case.
- timeloop: Defines the time-stepping loop for the simulation.
-->
<arcane>
<title>Submarine Toy Case</title>
<timeloop>AcousticsLoop</timeloop>
</arcane>


<!--
Mesh configurations:
- filename: Path to the mesh file used in the simulation.
-->
<meshes>
<mesh>
<filename>sub.msh</filename>
</mesh>
</meshes>


<!--
FEM (Finite Element Method) settings:
- kc2: Coefficient used in the FEM calculations.
- neumann-boundary-condition: Defines boundary conditions for the simulation.
- linear-system: Specifies the linear system solver to use.
- result-file: File for validation (optional)
-->
<fem>
<kc2>.11e1</kc2>
<neumann-boundary-condition>
<surface>inner1</surface>
<value>1.0</value>
</neumann-boundary-condition>
<linear-system>
<solver-backend>hypre</solver-backend>
<solver-method>bicgstab</solver-method>
<epsilon>1e-8</epsilon>
</linear-system>
<result-file>sub_2D.txt</result-file>
</fem>

<!--
Post-processing settings:
- output-period: Defines how often output should be generated.
- output: Specifies which variables are to be outputted.
-->
<arcane-post-processing>
<output-period>1</output-period>
<output>
<variable>U</variable>
</output>
</arcane-post-processing>

</case>

0 comments on commit f786330

Please sign in to comment.