Files
stroid/src/meson.build
Emily Boudreaux a5905e5fed feat(topology): vacuum coordinate and multi block
Two major changes in this version. First stroid now embeds a vacuum coordinate as part of its StroidMesh file (this is a packed set of mfem meshes and GridFunction). This is a logical coordinate from 0 at the stellar surface to 1 at the mesh surface / compactified infinity which can be used by consumers to much more stablly infer position in the vacuum region. Second, there is a new topology backend, multi_block, which has been made the default. See the readme for more information but the basic jist is that multi_block addes 6 transition blocks onto the edge of the core domain. This allows for a much more well conditioned transition from the internal cartesien region to the external spherical region. The mesh conditioning improves by roughly a factor of 1000 for the same refinement level when compared to the legacy topology. The legacy topology is maintained as a option if core_mapping is set to spherified in the config.
2026-09-09 08:11:08 -04:00

89 lines
2.4 KiB
Meson

dependencies = [
mfem_dep,
config_dep,
]
subdir('include/stroid')
stroid_include_files = include_directories('include')
stroid_sources = files(
'lib/topology/curvilinear.cpp',
'lib/topology/mapping.cpp',
'lib/topology/topology.cpp',
'lib/topology/optimize.cpp',
'lib/IO/mesh.cpp',
'lib/utils/mesh_utils.cpp',
'lib/utils/mesh_stats.cpp',
'lib/refinement/uniform.cpp',
)
if get_option('build_python')
if host_machine.system() == 'darwin'
stroid_lib_rpath_args = [
'-Wl,-rpath,@loader_path',
'-Wl,-rpath,@loader_path/../../fourdst/lib',
'-Wl,-rpath,@loader_path/../../fourdst/lib/vendor',
]
stroid_lib_rpath = ''
stroid_ext_rpath_args = [
'-Wl,-rpath,@loader_path/lib',
'-Wl,-rpath,@loader_path/../fourdst/lib',
'-Wl,-rpath,@loader_path/../fourdst/lib/vendor',
]
stroid_ext_rpath = ''
else
stroid_lib_rpath_args = []
stroid_lib_rpath = '$ORIGIN:' + '$ORIGIN/../../fourdst/lib:' + '$ORIGIN/../../fourdst/lib/vendor'
stroid_ext_rpath_args = []
stroid_ext_rpath = '$ORIGIN/lib:' + '$ORIGIN/../fourdst/lib:' + '$ORIGIN/../fourdst/lib/vendor'
endif
libstroid = static_library(
'stroid',
stroid_sources,
include_directories: stroid_include_files,
dependencies: dependencies,
install_dir: stroid_libdir,
link_args: stroid_lib_rpath_args,
build_rpath: stroid_lib_rpath,
install_rpath: stroid_lib_rpath,
)
else
libstroid = static_library(
'stroid',
stroid_sources,
include_directories: stroid_include_files,
dependencies: dependencies,
install: true
)
endif
if get_option('build_python')
stroid_iface_dep = declare_dependency(
dependencies: dependencies
).partial_dependency(compile_args: true, includes: true)
stroid_dep = declare_dependency(
link_with: libstroid,
include_directories: stroid_include_files,
dependencies: [stroid_iface_dep]
)
else
stroid_dep = declare_dependency(
link_with: libstroid,
include_directories: stroid_include_files,
dependencies: dependencies
)
endif
meson.override_dependency('stroid', stroid_dep)
message('stroid include dir: ' + stroid_includedir)
install_subdir(
'include/stroid',
install_dir: stroid_includedir,
exclude_files: ['version.h.in']
)