Files
SERiF/src/poly/solver/public/polySolver.h
Emily Boudreaux ff299f8ce7 fix(poly): changed lambda from fespace to scalar
previously I had a lagrangian multipliers at every element; however, we are enforcing a global constraint so there need only be one lagrangian multiplier
2025-02-20 15:36:46 -05:00

45 lines
1.0 KiB
C++

#ifndef POLYSOLVER_H
#define POLYSOLVER_H
#include "mfem.hpp"
#include <iostream>
#include <string>
#include <memory>
#include "meshIO.h"
#include "polyCoeff.h"
#include "polyMFEMUtils.h"
class PolySolver {
private:
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;
void assembleNonlinearForm();
void assembleConstraintForm();
public:
PolySolver(double n, double order);
~PolySolver();
void solve();
};
#endif // POLYSOLVER_H