docs(discretization/domain): added doxygen comments throughout

This commit is contained in:
2026-10-05 13:22:51 -04:00
parent 54dcd9f3f9
commit 36585a9682
15 changed files with 537 additions and 90 deletions

View File

@@ -1,5 +1,12 @@
#pragma once
/**
* @file all.hpp
* @author Emily M. Boudreaux
*
* @brief File containing the overloads of validate_schema which automatically distributes the mesh to the correct validation function based on the schema type
*/
#include <mfem.hpp>
#include "serif/discretization/domain/mesh/topology.hpp"
@@ -16,15 +23,29 @@
#include "serif/discretization/domain/schema/validation/inscribed.hpp"
namespace serif::discretization::domain::schema::validation {
// Validate against connectivity that has already been extracted. Prefer
// this overload when validating several schemas against the same mesh.
/**
* @brief Validate a mesh against a schema.
*
* @tparam SchemaT The schema type to validate against.
* @param topology The mesh topology to validate.
* @return A SchemaValidationResult containing the validation results.
*/
template <IsSchema SchemaT>
[[nodiscard]] SchemaValidationResult validate_schema(const mesh::MeshTopology &topology) {
using RelationsT = typename SchemaT::relations_type;
return SchemaRelationValidator<SchemaT, RelationsT>::validate(topology);
}
// Extract the mesh connectivity once, then check every relation against it.
/**
* @brief Validate a mesh against a schema.
*
* @tparam SchemaT The schema type to validate against.
* @param mfemMesh The MFEM mesh to validate.
* @return A SchemaValidationResult containing the validation results.
*
* @note This overload is provided for convenience. It constructs a MeshTopology from the given MFEM mesh and then calls the other overload of validate_schema. It
* may be more efficient to construct a MeshTopology once and reuse it for multiple validations, rather than constructing it each time.
*/
template <IsSchema SchemaT>
[[nodiscard]] SchemaValidationResult validate_schema(const mfem::Mesh &mfemMesh) {
const mesh::MeshTopology topology{mfemMesh};