feat(poly): lagrangian constrained weak form of 3D lane-Emden
added a basic implimentation of the 3D lane emden equation using a lagrangian multiplier to constrain the value at the center of a spherical domain
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
#ifndef POLYMFEMUTILS_H
|
||||
#define POLYMFEMUTILS_H
|
||||
|
||||
#include "mfem.hpp"
|
||||
#include <string>
|
||||
|
||||
@@ -183,10 +186,10 @@ namespace polyMFEMUtils {
|
||||
|
||||
class AugmentedOperator : public mfem::Operator {
|
||||
private:
|
||||
std::unique_ptr<mfem::NonlinearForm> nfl;
|
||||
std::unique_ptr<mfem::LinearForm> C;
|
||||
mfem::NonlinearForm &nfl;
|
||||
mfem::LinearForm &C;
|
||||
int lambdaDofOffset;
|
||||
mfem::SparseMatrix *lastJacobian = nullptr;
|
||||
mutable mfem::SparseMatrix *lastJacobian = nullptr;
|
||||
|
||||
public:
|
||||
AugmentedOperator(mfem::NonlinearForm &nfl_, mfem::LinearForm &C_, int lambdaDofOffset_);
|
||||
@@ -196,4 +199,6 @@ namespace polyMFEMUtils {
|
||||
|
||||
virtual mfem::Operator &GetGradient(const mfem::Vector &x) const override;
|
||||
};
|
||||
} // namespace polyMFEMUtils
|
||||
} // namespace polyMFEMUtils
|
||||
|
||||
#endif // POLYMFEMUTILS_H
|
||||
Reference in New Issue
Block a user