feat(surface): major work on implementing surface constraints in a presciption agnostic manner
This commit is contained in:
@@ -15,7 +15,11 @@ namespace mean_field::mapping {
|
||||
Coefficient &coeff,
|
||||
const COORDINATE_SPACE coord_space
|
||||
)
|
||||
: m_mapping(mapper, displacement, compactification_coordinate),
|
||||
: m_mapping(
|
||||
mapper,
|
||||
displacement,
|
||||
compactification_coordinate
|
||||
),
|
||||
m_coeff(coeff),
|
||||
m_coord_space(coord_space) { };
|
||||
|
||||
@@ -28,7 +32,7 @@ namespace mean_field::mapping {
|
||||
|
||||
switch (m_coord_space) {
|
||||
case COORDINATE_SPACE::PHYSICAL: {
|
||||
f_val = eval_at_point(m_coeff, T, ip);
|
||||
f_val = eval_at_point(m_coeff, T, ip);
|
||||
VolumeMappingContext context;
|
||||
MFEM_VERIFY(
|
||||
m_mapping.EvaluateVolume(T, ip, context) == MappingStatus::valid,
|
||||
@@ -63,7 +67,11 @@ namespace mean_field::mapping {
|
||||
const int dim
|
||||
)
|
||||
: MatrixCoefficient(dim),
|
||||
m_mapping(mapper, displacement, compactification_coordinate),
|
||||
m_mapping(
|
||||
mapper,
|
||||
displacement,
|
||||
compactification_coordinate
|
||||
),
|
||||
m_scalar(&sigma),
|
||||
m_tensor(nullptr) { };
|
||||
|
||||
@@ -74,7 +82,11 @@ namespace mean_field::mapping {
|
||||
MatrixCoefficient &sigma
|
||||
)
|
||||
: MatrixCoefficient(sigma.GetHeight()),
|
||||
m_mapping(mapper, displacement, compactification_coordinate),
|
||||
m_mapping(
|
||||
mapper,
|
||||
displacement,
|
||||
compactification_coordinate
|
||||
),
|
||||
m_scalar(nullptr),
|
||||
m_tensor(&sigma) { };
|
||||
|
||||
@@ -92,7 +104,7 @@ namespace mean_field::mapping {
|
||||
"Mapped diffusion coefficient encountered an invalid mapping."
|
||||
);
|
||||
const mfem::DenseMatrix &JInv = context.mapping.inverse_mapping_jacobian;
|
||||
const double detJ = context.mapping.mapping_determinant;
|
||||
const double detJ = context.mapping.mapping_determinant;
|
||||
|
||||
if (m_scalar) {
|
||||
const double sig_val = m_scalar->Eval(T, ip);
|
||||
@@ -120,7 +132,11 @@ namespace mean_field::mapping {
|
||||
VectorCoefficient &coeff
|
||||
)
|
||||
: VectorCoefficient(coeff.GetVDim()),
|
||||
m_mapping(mapper, displacement, compactification_coordinate),
|
||||
m_mapping(
|
||||
mapper,
|
||||
displacement,
|
||||
compactification_coordinate
|
||||
),
|
||||
m_coeff(coeff) { };
|
||||
|
||||
void MappedVectorCoefficient::Eval(
|
||||
@@ -137,7 +153,7 @@ namespace mean_field::mapping {
|
||||
"Mapped vector coefficient encountered an invalid mapping."
|
||||
);
|
||||
const mfem::DenseMatrix &JInv = context.mapping.inverse_mapping_jacobian;
|
||||
const double detJ = context.mapping.mapping_determinant;
|
||||
const double detJ = context.mapping.mapping_determinant;
|
||||
|
||||
mfem::Vector C_phys(dim);
|
||||
m_coeff.Eval(C_phys, T, ip);
|
||||
@@ -157,7 +173,11 @@ namespace mean_field::mapping {
|
||||
Func f // std::function<double(const mfem::Vector&)>
|
||||
)
|
||||
: m_f(std::move(f)),
|
||||
m_mapping(mapper, displacement, compactification_coordinate) { };
|
||||
m_mapping(
|
||||
mapper,
|
||||
displacement,
|
||||
compactification_coordinate
|
||||
) { };
|
||||
|
||||
double PhysicalPositionFunctionCoefficient::Eval(
|
||||
mfem::ElementTransformation &T,
|
||||
@@ -179,7 +199,11 @@ namespace mean_field::mapping {
|
||||
const int dim
|
||||
)
|
||||
: MatrixCoefficient(dim),
|
||||
m_mapping(mapper, displacement, compactification_coordinate) {
|
||||
m_mapping(
|
||||
mapper,
|
||||
displacement,
|
||||
compactification_coordinate
|
||||
) {
|
||||
}
|
||||
|
||||
void MappedHDivMassCoefficient::Eval(
|
||||
@@ -195,7 +219,7 @@ namespace mean_field::mapping {
|
||||
"Mapped H(div) coefficient encountered an invalid mapping."
|
||||
);
|
||||
const mfem::DenseMatrix &map_jacobian = context.mapping.mapping_jacobian;
|
||||
const double map_determinant = context.mapping.mapping_determinant;
|
||||
const double map_determinant = context.mapping.mapping_determinant;
|
||||
|
||||
MFEM_VERIFY(map_determinant > 0.0, "Domain mapping has a non-positive Jacobian determinant.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user