feat(mean_field): added dimensions, discritization, and start of eos
The full rewrite of mean_field into something maintainable is progressing. dimensions is mostly done, discritization (domain, blocks, and fields) is done, and eos is progressing quickly
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <mfem.hpp>
|
||||
|
||||
#include "serif/discretization/domain/mesh/topology.hpp"
|
||||
#include "serif/discretization/domain/schema/concepts.hpp"
|
||||
#include "serif/discretization/domain/schema/validation/results.hpp"
|
||||
#include "serif/discretization/domain/schema/validation/validator.hpp"
|
||||
|
||||
// Every RelationValidator specialization must be visible before
|
||||
// SchemaRelationValidator is instantiated, so they are all included here and
|
||||
// validate_schema is defined only in this header. Include this file to validate
|
||||
// a mesh; including validator.hpp alone is not enough.
|
||||
#include "serif/discretization/domain/schema/validation/boundary.hpp"
|
||||
#include "serif/discretization/domain/schema/validation/connected.hpp"
|
||||
#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.
|
||||
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.
|
||||
template <IsSchema SchemaT>
|
||||
[[nodiscard]] SchemaValidationResult validate_schema(const mfem::Mesh &mfemMesh) {
|
||||
const mesh::MeshTopology topology{mfemMesh};
|
||||
return validate_schema<SchemaT>(topology);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user