2026-09-15 10:42:00 -04:00
|
|
|
sandboxes = [
|
2026-11-09 13:53:17 -05:00
|
|
|
'rayfem_sandbox',
|
2026-09-15 10:42:00 -04:00
|
|
|
'discritization_sandbox',
|
|
|
|
|
'eos_sandbox',
|
|
|
|
|
'finite_sandbox',
|
2026-09-19 07:35:57 -04:00
|
|
|
'dimensions_sandbox',
|
|
|
|
|
'quadrature_sandbox',
|
|
|
|
|
'meta_sandbox',
|
2026-11-09 13:53:17 -05:00
|
|
|
'mapping_sandbox',
|
|
|
|
|
'equations_sandbox',
|
|
|
|
|
'geometry_sandbox',
|
|
|
|
|
'surface_sandbox',
|
|
|
|
|
'deformation_sandbox',
|
|
|
|
|
'solver_sandbox',
|
|
|
|
|
'complete_sandbox',
|
|
|
|
|
'normalization_sandbox',
|
|
|
|
|
'preconditioner_sandbox',
|
|
|
|
|
'model_sandbox',
|
|
|
|
|
'lane-emden_sandbox',
|
2026-09-15 10:42:00 -04:00
|
|
|
]
|
|
|
|
|
|
2026-09-20 14:37:11 -04:00
|
|
|
expected_errors = {}
|
|
|
|
|
foreach entry : get_option('sandbox_expected_errors')
|
|
|
|
|
parts = entry.split(':')
|
|
|
|
|
if parts.length() != 2 or parts[0] not in sandboxes or parts[1] == ''
|
|
|
|
|
error('Invalid sandbox_expected_errors entry: ' + entry)
|
|
|
|
|
endif
|
|
|
|
|
expected_errors += {parts[0]: parts[1]}
|
|
|
|
|
endforeach
|
|
|
|
|
|
2026-09-15 10:42:00 -04:00
|
|
|
foreach sandbox: sandboxes
|
2026-11-09 13:53:17 -05:00
|
|
|
sandbox_timeout = sandbox in ['solver_sandbox', 'complete_sandbox'] ? 3600 : 30
|
|
|
|
|
sandbox_cpp_args = []
|
|
|
|
|
sandbox_link_depends = []
|
|
|
|
|
sandbox_dependencies = [serif_dep, nameof_dep]
|
|
|
|
|
sandbox_includes = []
|
|
|
|
|
if sandbox == 'complete_sandbox'
|
|
|
|
|
viewer_path = ''
|
|
|
|
|
if rayfem_project.get_variable('build_viewer')
|
|
|
|
|
viewer_target = rayfem_project.get_variable('rayfem_viewer')
|
|
|
|
|
viewer_path = viewer_target.full_path()
|
|
|
|
|
sandbox_link_depends += [viewer_target]
|
|
|
|
|
endif
|
|
|
|
|
sandbox_cpp_args += ['-DSERIF_RAYFEM_EXECUTABLE="' + viewer_path + '"']
|
|
|
|
|
# Streamed frames report the vacuum virial measured by the solver tests.
|
|
|
|
|
sandbox_dependencies += [stroid_dep]
|
|
|
|
|
sandbox_includes += [include_directories('../include')]
|
|
|
|
|
endif
|
2026-09-20 14:37:11 -04:00
|
|
|
sandbox_exe = executable(
|
2026-09-15 10:42:00 -04:00
|
|
|
sandbox,
|
|
|
|
|
sandbox + '.cpp',
|
2026-11-09 13:53:17 -05:00
|
|
|
dependencies: sandbox_dependencies,
|
|
|
|
|
include_directories: sandbox_includes,
|
|
|
|
|
cpp_args: sandbox_cpp_args,
|
|
|
|
|
link_depends: sandbox_link_depends,
|
2026-09-15 10:42:00 -04:00
|
|
|
build_rpath: mfem_runtime_prefix == '' ? '' : mfem_runtime_prefix / 'lib',
|
|
|
|
|
)
|
2026-11-09 13:53:17 -05:00
|
|
|
if sandbox in ['solver_sandbox', 'complete_sandbox'] and not mfem_has_mpi
|
|
|
|
|
# These examples select the default AMG inverse, which requires MPI/Hypre.
|
|
|
|
|
continue
|
|
|
|
|
endif
|
2026-09-20 14:37:11 -04:00
|
|
|
if expected_errors.has_key(sandbox)
|
|
|
|
|
test(
|
|
|
|
|
sandbox, python_build,
|
|
|
|
|
args: [files('../../tools/check_sandbox_error.py'), sandbox_exe, expected_errors[sandbox]],
|
|
|
|
|
workdir: meson.project_source_root(),
|
|
|
|
|
suite: 'sandbox',
|
|
|
|
|
)
|
|
|
|
|
else
|
2026-11-09 13:53:17 -05:00
|
|
|
test(sandbox, sandbox_exe, workdir: meson.project_source_root(), suite: 'sandbox', timeout: sandbox_timeout)
|
2026-09-20 14:37:11 -04:00
|
|
|
endif
|
2026-09-15 10:42:00 -04:00
|
|
|
endforeach
|
2026-11-09 13:53:17 -05:00
|
|
|
|
|
|
|
|
# This example uses only the dependency headers, independently of MFEM and SERiF linking.
|
|
|
|
|
dependencies_sandbox = executable(
|
|
|
|
|
'dependencies_sandbox',
|
|
|
|
|
'dependencies_sandbox.cpp',
|
|
|
|
|
dependencies: [magic_enum_dep],
|
|
|
|
|
include_directories: include_dir,
|
|
|
|
|
)
|
|
|
|
|
test('dependencies_sandbox', dependencies_sandbox, suite: 'sandbox')
|
|
|
|
|
|
|
|
|
|
# Demonstrate archive ownership and continuation without leaving a file in the source tree.
|
|
|
|
|
serialization_sandbox = executable(
|
|
|
|
|
'serialization_sandbox',
|
|
|
|
|
'serialization_sandbox.cpp',
|
|
|
|
|
dependencies: [serif_dep],
|
|
|
|
|
build_rpath: mfem_runtime_prefix == '' ? '' : mfem_runtime_prefix / 'lib',
|
|
|
|
|
)
|
|
|
|
|
if mfem_has_mpi
|
|
|
|
|
test('serialization_sandbox', serialization_sandbox, suite: 'sandbox', timeout: 1800, is_parallel: false)
|
|
|
|
|
endif
|