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:
46
src/poly/solver/public/polySolver.h
Normal file
46
src/poly/solver/public/polySolver.h
Normal 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
|
||||
Reference in New Issue
Block a user