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:
79
tests/discritization/domain/ids/lists/lists.cpp
Normal file
79
tests/discritization/domain/ids/lists/lists.cpp
Normal file
@@ -0,0 +1,79 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include "serif/discretization/domain/ids/boundary.hpp"
|
||||
#include "serif/discretization/domain/ids/domain.hpp"
|
||||
#include "serif/discretization/domain/ids/lists/lists.hpp"
|
||||
#include "serif/discretization/domain/types.hpp"
|
||||
|
||||
#include "serif/tests/test_tags.hpp"
|
||||
#include "serif/tests/discritization/domain/domain_test_utils.hpp"
|
||||
|
||||
namespace domain = serif::discretization::domain;
|
||||
namespace ids = domain::ids;
|
||||
|
||||
TEST_CASE(
|
||||
"Material Lists Reject Duplicate Ids And Duplicate Semantic Domains",
|
||||
tags::unit &tags::mesh &tags::utils &tags::domain
|
||||
) {
|
||||
STATIC_REQUIRE(
|
||||
domain_test_utils::CanFormDomainIDList<
|
||||
ids::DomainID<domain::CoreDomain, 1>,
|
||||
ids::DomainID<domain::EnvelopeDomain, 2>>
|
||||
);
|
||||
|
||||
STATIC_REQUIRE_FALSE(
|
||||
domain_test_utils::CanFormDomainIDList<
|
||||
ids::DomainID<domain::CoreDomain, 1>,
|
||||
ids::DomainID<domain::EnvelopeDomain, 1>>
|
||||
);
|
||||
|
||||
STATIC_REQUIRE_FALSE(
|
||||
domain_test_utils::CanFormDomainIDList<
|
||||
ids::DomainID<domain::CoreDomain, 1>,
|
||||
ids::DomainID<domain::CoreDomain, 2>>
|
||||
);
|
||||
|
||||
/*
|
||||
* The schema intentionally imposes no convention on the
|
||||
* numerical range or indexing scheme used by a mesh producer.
|
||||
*/
|
||||
STATIC_REQUIRE(
|
||||
domain_test_utils::CanFormDomainIDList<
|
||||
ids::DomainID<domain::CoreDomain, 0>,
|
||||
ids::DomainID<domain::EnvelopeDomain, -7>,
|
||||
ids::DomainID<domain::VacuumDomain, 42>>
|
||||
);
|
||||
|
||||
CHECK(true);
|
||||
}
|
||||
|
||||
TEST_CASE(
|
||||
"Boundary Lists Reject Duplicate Ids And Duplicate Semantic Boundaries",
|
||||
tags::unit &tags::mesh &tags::utils &tags::domain
|
||||
) {
|
||||
STATIC_REQUIRE(
|
||||
domain_test_utils::CanFormBoundaryIDList<
|
||||
ids::BoundaryID<domain::StellarSurfaceBoundary, 1>,
|
||||
ids::BoundaryID<domain::InfinitySurfaceBoundary, 2>>
|
||||
);
|
||||
|
||||
STATIC_REQUIRE_FALSE(
|
||||
domain_test_utils::CanFormBoundaryIDList<
|
||||
ids::BoundaryID<domain::StellarSurfaceBoundary, 1>,
|
||||
ids::BoundaryID<domain::InfinitySurfaceBoundary, 1>>
|
||||
);
|
||||
|
||||
STATIC_REQUIRE_FALSE(
|
||||
domain_test_utils::CanFormBoundaryIDList<
|
||||
ids::BoundaryID<domain::StellarSurfaceBoundary, 1>,
|
||||
ids::BoundaryID<domain::StellarSurfaceBoundary, 2>>
|
||||
);
|
||||
|
||||
STATIC_REQUIRE(
|
||||
domain_test_utils::CanFormBoundaryIDList<
|
||||
ids::BoundaryID<domain::StellarSurfaceBoundary, 0>,
|
||||
ids::BoundaryID<domain::InfinitySurfaceBoundary, -13>>
|
||||
);
|
||||
|
||||
CHECK(true);
|
||||
}
|
||||
Reference in New Issue
Block a user