The test suite is extensive. Note that LLMs were used to aid in the development of the test suite. All LLM generated code was manually reviewed.
23 lines
1.1 KiB
C++
23 lines
1.1 KiB
C++
#include <print>
|
|
|
|
#include "serif/model/finite_elements.hpp"
|
|
#include "serif/backend/mfem/discretization/schema.hpp"
|
|
#include "serif/discretization/forms/forms.hpp"
|
|
#include "polytropic_model.hpp"
|
|
|
|
/** @brief Build term-selected spaces and inspect their physical support on an owned stellar mesh. */
|
|
int main() {
|
|
namespace blocks = serif::discretization::blocks;
|
|
using Schema = serif::discretization::domain::schema::CoreEnvelopeVacuumDomainSchema;
|
|
|
|
const auto star = serif::examples::make_polytropic_model();
|
|
const auto finite_elements = serif::model::make_stellar_discretization(star);
|
|
const auto& density = finite_elements.template binding<blocks::density::mass>();
|
|
const auto result = serif::backend::mfem::discretization::validate_schema<Schema>(density.mesh());
|
|
std::println("{}", result);
|
|
std::println("Density: {} coefficients; potential: {} coefficients", density.size(),
|
|
finite_elements.template binding<blocks::gravity::potential>().size());
|
|
std::println("{}", serif::discretization::forms::mass<blocks::gravity::potential, blocks::gravity::potential>::name);
|
|
return 0;
|
|
}
|