Files
MeanField_SERiF/src/include/serif/backend/mfem/discretization/schema.hpp
Emily Boudreaux 811bbd9694 feat(backend): Added backend FEM code (specifically MFEM backend)
Much of the code to do actual finite element computations lives in this backend. The idea here is that the physics is all seperate and more descriptive than the backend. Further, we could, in principal swap out to another finite element backend (e.g. deal.II) without messing up stuff outside of this backend. Note LLM's made signifigant contributions to this module

LLMs (ChatGPT6 astra max and Claude Opus 5.5 medium) made signifigant contributions to this module. All LLM written code has been read over and verified.
2026-11-09 13:48:09 -05:00

27 lines
1.0 KiB
C++

#pragma once
/**
* @file schema.hpp
* @author Emily M. Boudreaux
* @brief Adapt MFEM meshes to domain schema validation.
*/
#include "mfem/mesh/mesh.hpp"
#include "serif/backend/mfem/discretization/topology.hpp"
#include "serif/discretization/domain/concepts.hpp"
#include "serif/discretization/domain/schema/validation/all.hpp"
namespace serif::backend::mfem::discretization {
/**
* @brief Validate an MFEM mesh against a physical domain schema.
* @tparam SchemaT The schema type to validate against.
* @param mesh The MFEM mesh to validate.
* @return The validation result for every relation in the schema.
* @note Reuse make_mesh_topology when several schemas inspect the same mesh.
*/
template <::serif::discretization::domain::schema::IsSchema SchemaT>
[[nodiscard]] ::serif::discretization::domain::schema::validation::SchemaValidationResult validate_schema(const ::mfem::Mesh& mesh) {
return ::serif::discretization::domain::schema::validation::validate_schema<SchemaT>(make_mesh_topology(mesh));
}
}