feat(surface): major work on implementing surface constraints in a presciption agnostic manner

This commit is contained in:
2026-08-30 16:41:14 -04:00
parent 36adfa1174
commit 0a7f18c5c7
95 changed files with 30144 additions and 25766 deletions

View File

@@ -13,8 +13,7 @@ namespace mean_field::utils {
const int dim = fem.mesh->Dimension();
x_ref = x_phys_target;
mapping::GridFunctionMappingEvaluator mapping_evaluator(
*fem.domainMapperStateless, *fem.displacement,
*fem.compactificationCoordinate
*fem.domainMapperStateless, *fem.displacement, *fem.compactificationCoordinate
);
mfem::Array<int> init_elem;
@@ -39,8 +38,7 @@ namespace mean_field::utils {
mapping::MappingPointContext context;
MFEM_VERIFY(
mapping_evaluator.EvaluatePoint(*T0, origin_ip[0], context) ==
mapping::MappingStatus::valid,
mapping_evaluator.EvaluatePoint(*T0, origin_ip[0], context) == mapping::MappingStatus::valid,
"Reference-point initialization encountered an invalid mapping."
);
@@ -104,8 +102,7 @@ namespace mean_field::utils {
T->SetIntPoint(&ip);
mapping::MappingPointContext context;
if (mapping_evaluator.EvaluatePoint(*T, ip, context) !=
mapping::MappingStatus::valid) {
if (mapping_evaluator.EvaluatePoint(*T, ip, context) != mapping::MappingStatus::valid) {
return false;
}
const mfem::Vector &current_x_phys = context.physical_position;

View File

@@ -4,21 +4,25 @@ module;
module mean_field;
namespace mean_field::utils {
DOMAINS operator|(DOMAINS lhs, DOMAINS rhs) {
return static_cast<DOMAINS>(static_cast<uint8_t>(lhs) |
static_cast<uint8_t>(rhs));
}
DOMAINS operator|(
DOMAINS lhs,
DOMAINS rhs
) {
return static_cast<DOMAINS>(static_cast<uint8_t>(lhs) | static_cast<uint8_t>(rhs));
}
DOMAINS operator&(DOMAINS lhs, DOMAINS rhs) {
return static_cast<DOMAINS>(static_cast<uint8_t>(lhs) &
static_cast<uint8_t>(rhs));
}
DOMAINS operator&(
DOMAINS lhs,
DOMAINS rhs
) {
return static_cast<DOMAINS>(static_cast<uint8_t>(lhs) & static_cast<uint8_t>(rhs));
}
int get_mesh_order(const mfem::Mesh &mesh) {
if (mesh.GetNodes() != nullptr) {
return mesh.GetNodes()->FESpace()->GetMaxElementOrder();
}
return 1;
}
int get_mesh_order(const mfem::Mesh &mesh) {
if (mesh.GetNodes() != nullptr) {
return mesh.GetNodes()->FESpace()->GetMaxElementOrder();
}
return 1;
}
} // namespace mean_field::utils