test(tests): tests for vacuum region
Test suite has been updated to include a much more robust suite of tools for validating mesh quality and mesh usability (including but not limited to things such as validating that integrating over a sphere provides the correct volume, that the mesh is confirming, and that no elements are inverted)
This commit is contained in:
15
tests/sandbox/default.toml
Normal file
15
tests/sandbox/default.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[main]
|
||||
core_steepness = 1.0
|
||||
flattening = 0.0
|
||||
include_external_domain = true
|
||||
inf_bdr_id = 2
|
||||
order = 3
|
||||
r_core = 1.5
|
||||
r_infinity = 10.0
|
||||
r_instability = 1e-14
|
||||
r_star = 5.0
|
||||
refinement_levels = 2
|
||||
surface_bdr_id = 1
|
||||
core_id = 1
|
||||
envelope_id = 2
|
||||
vacuum_id = 3
|
||||
@@ -0,0 +1 @@
|
||||
executable('sandbox_test', 'sandbox_test.cpp', dependencies: [stroid_dep])
|
||||
@@ -0,0 +1,37 @@
|
||||
#include "fourdst/config/config.h"
|
||||
#include "stroid/config/config.h"
|
||||
#include "stroid/IO/mesh.h"
|
||||
#include "stroid/topology/curvilinear.h"
|
||||
#include "stroid/topology/mapping.h"
|
||||
#include "stroid/topology/topology.h"
|
||||
|
||||
#include "mfem.hpp"
|
||||
|
||||
#include <print>
|
||||
|
||||
struct SandboxConfig {
|
||||
std::string host = "localhost";
|
||||
int port = 19916;
|
||||
bool visualize = true;
|
||||
};
|
||||
|
||||
using MeshConfig = fourdst::config::Config<stroid::config::MeshConfig>;
|
||||
using UserConfig = fourdst::config::Config<SandboxConfig>;
|
||||
|
||||
int main() {
|
||||
MeshConfig mesh_cfg;
|
||||
mesh_cfg.load("default.toml");
|
||||
|
||||
UserConfig user_cfg;
|
||||
|
||||
|
||||
std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(mesh_cfg);
|
||||
stroid::topology::Finalize(*mesh, mesh_cfg);
|
||||
stroid::topology::PromoteToHighOrder(*mesh, mesh_cfg);
|
||||
stroid::topology::ProjectMesh(*mesh, mesh_cfg);
|
||||
stroid::IO::ViewMesh(*mesh, "Sandbox Mesh", stroid::IO::VISUALIZATION_MODE::ELEMENT_ID, user_cfg->host, user_cfg->port);
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user