feat(poly): added full constraint integrator function
not yet debugged
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
// *********************************************************************** */
|
||||
#include "mfem.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -102,6 +103,13 @@ void PolySolver::assembleNonlinearForm() {
|
||||
auto nonlinearIntegrator = std::make_unique<polyMFEMUtils::NonlinearPowerIntegrator>(*nonlinearSourceCoeff, n);
|
||||
compositeIntegrator->add_integrator(nonlinearIntegrator.release());
|
||||
|
||||
// Add the contraint term \gamma(\nabla \theta(0)\cdot\nabla v(0))^{2}
|
||||
double gamma = config.get<double>("Poly:Solver:Constraint:Gamma", 1e2);
|
||||
auto constraintIntegrator = std::make_unique<polyMFEMUtils::BilinearIntegratorWrapper>(
|
||||
new polyMFEMUtils::ConstraintIntegrator(gamma, &mesh)
|
||||
);
|
||||
compositeIntegrator->add_integrator(constraintIntegrator.release());
|
||||
|
||||
nonlinearForm->AddDomainIntegrator(compositeIntegrator.release());
|
||||
}
|
||||
|
||||
@@ -110,7 +118,7 @@ void PolySolver::solve(){
|
||||
mfem::FunctionCoefficient initCoeff (
|
||||
[this](const mfem::Vector &x) {
|
||||
double r = x.Norml2();
|
||||
double theta = laneEmden::thetaSerieseExpansion(r, n, 12);
|
||||
double theta = laneEmden::thetaSerieseExpansion(r, n, 10);
|
||||
return theta;
|
||||
// double radius = Probe::getMeshRadius(mesh);
|
||||
// double u = 1/radius;
|
||||
|
||||
Reference in New Issue
Block a user