feat(poly): constraint integrator
The NewtonSolver has been subclassed to try to auto enforce the zero boundary central condition by modifying the residual vector and the gradient matrix. This is a work in progress BREAKING CHANGE:
This commit is contained in:
@@ -25,32 +25,24 @@ private:
|
||||
Probe::LogManager& logManager = Probe::LogManager::getInstance();
|
||||
quill::Logger* logger;
|
||||
double n, order;
|
||||
MeshIO meshIO;
|
||||
mfem::Mesh& mesh;
|
||||
|
||||
std::unique_ptr<mfem::H1_FECollection> feCollection;
|
||||
|
||||
std::unique_ptr<mfem::FiniteElementSpace> feSpace;
|
||||
|
||||
std::unique_ptr<polyMFEMUtils::CompositeNonlinearIntegrator> compositeIntegrator;
|
||||
|
||||
std::unique_ptr<mfem::NonlinearForm> nonlinearForm;
|
||||
std::unique_ptr<mfem::LinearForm> C; // For the constraint equation
|
||||
|
||||
std::unique_ptr<mfem::GridFunction> u;
|
||||
|
||||
std::unique_ptr<mfem::VectorConstantCoefficient> diffusionCoeff;
|
||||
std::unique_ptr<mfem::ConstantCoefficient> nonLinearSourceCoeff;
|
||||
std::unique_ptr<polyMFEMUtils::GaussianCoefficient> gaussianCoeff;
|
||||
|
||||
double C_val;
|
||||
std::unique_ptr<mfem::VectorFunctionCoefficient> diffusionCoeff;
|
||||
std::unique_ptr<mfem::FunctionCoefficient> nonlinearSourceCoeff;
|
||||
|
||||
void assembleNonlinearForm();
|
||||
void assembleConstraintForm();
|
||||
|
||||
|
||||
public:
|
||||
PolySolver(double n, double order);
|
||||
PolySolver(double n, double order, mfem::Mesh& mesh_);
|
||||
~PolySolver();
|
||||
void solve();
|
||||
mfem::Mesh& getMesh() { return mesh; }
|
||||
|
||||
Reference in New Issue
Block a user