feat(poly): started work on penalty term in variational form

This commit is contained in:
2025-03-19 10:09:37 -04:00
parent f512f10096
commit b98f6b6ebd
4 changed files with 47 additions and 104 deletions

View File

@@ -25,17 +25,17 @@
namespace polycoeff{
double nonlinearSourceCoeff(const mfem::Vector &x)
{
double r = x.Norml2();
return std::pow(r, 2);
return 1;
// double r = x(0)*x(0) + x(1)*x(1) + x(2)*x(2);
// return std::pow(r, 2);
}
void diffusionCoeff(const mfem::Vector &x, mfem::Vector &v)
{
v.SetSize(3);
double r = x.Norml2();
for (int i = 0; i < 3; i++) {
v(i) = -std::pow(r, 2);
}
v = -1;
// double r = x(0)*x(0) + x(1)*x(1) + x(2)*x(2);
// v = -std::pow(r, 2);
}
double x1(const double n)