fix(poly): working on 3D polytrope
not working yet
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "mfem.hpp"
|
||||
#include <string>
|
||||
#include "config.h"
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +23,7 @@ namespace polyMFEMUtils {
|
||||
*/
|
||||
class NonlinearPowerIntegrator: public mfem::NonlinearFormIntegrator {
|
||||
private:
|
||||
Config& config = Config::getInstance();
|
||||
mfem::Coefficient &coeff_;
|
||||
double polytropicIndex;
|
||||
public:
|
||||
@@ -187,19 +189,30 @@ namespace polyMFEMUtils {
|
||||
|
||||
class AugmentedOperator : public mfem::Operator {
|
||||
private:
|
||||
Config& config = Config::getInstance();
|
||||
mfem::NonlinearForm &nfl;
|
||||
mfem::LinearForm &C;
|
||||
double C_val;
|
||||
int lambdaDofOffset;
|
||||
mutable mfem::SparseMatrix *lastJacobian = nullptr;
|
||||
|
||||
public:
|
||||
AugmentedOperator(mfem::NonlinearForm &nfl_, mfem::LinearForm &C_, int lambdaDofOffset_);
|
||||
AugmentedOperator(mfem::NonlinearForm &nfl_, mfem::LinearForm &C_, int lambdaDofOffset_, double C_val_);
|
||||
~AugmentedOperator();
|
||||
|
||||
virtual void Mult(const mfem::Vector &x, mfem::Vector &y) const override;
|
||||
|
||||
virtual mfem::Operator &GetGradient(const mfem::Vector &x) const override;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Calculates the Gaussian integral.
|
||||
*
|
||||
* @param mesh The mesh.
|
||||
* @param gaussianCoeff The Gaussian coefficient.
|
||||
* @return The Gaussian integral.
|
||||
*/
|
||||
double calculateGaussianIntegral(mfem::Mesh &mesh, polyMFEMUtils::GaussianCoefficient &gaussianCoeff);
|
||||
} // namespace polyMFEMUtils
|
||||
|
||||
#endif // POLYMFEMUTILS_H
|
||||
Reference in New Issue
Block a user