feat(poly): added first pass implimentation of 3D constrained lane-emden solver

This has not currently been tested and this commit should not be viewed as scientifically complete
This commit is contained in:
2025-02-19 14:35:15 -05:00
parent 98162d002e
commit b939fd68fa
9 changed files with 707 additions and 286 deletions

View File

@@ -0,0 +1,46 @@
#ifndef POLYSOLVER_H
#define POLYSOLVER_H
#include "mfem.hpp"
#include <iostream>
#include <string>
#include <memory>
#include "meshIO.h"
#include "polyCoeff.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<mfem::FiniteElementSpace> lambdaFeSpace;
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::Vector> oneVec;
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);
void solve();
};
#endif // POLYSOLVER_H