Skip to content
Snippets Groups Projects
Select Git revision
  • 7040c5a2680215183aa6b6ed6617e7de79b75a4d
  • master default protected
  • dev_mm_pf
  • cyrielle
  • ujwal_05_08_2025
  • vinayak
  • complexpetsc
  • ujwal_21_08_2024
  • dev_mm_torchSCRU
  • debug_mm_pf
  • newStructureNonLocal
  • Mohamed_stochasticDMN
  • dev_mm_bench
  • stochdmn
  • revert-351ff7aa
  • ujwal_29April2024
  • dev_mm_ann
  • mohamed_vevp
  • ujwal_debug
  • ujwal_2ndApril2024
  • ujwal_October_2023
  • v4.0
  • v3.2.3_multiplePhase
  • v3.5
  • v3.3.2
  • v3.4
  • v3.3
  • ver3.2
  • verJulienWork
  • ver3.1
  • ver2
  • ver1.1.2
  • ver1.1.1
  • ver1.1
34 results

SEN.msh

Blame
  • dgSystemOfEquations.h 1.66 KiB
    #ifndef _DG_SYSTEM_OF_EQUATIONS_
    #define _DG_SYSTEM_OF_EQUATIONS_
    #include <vector>
    #include <utility>
    #include "GmshConfig.h"
    #include "GModel.h"
    #include "dgGroupOfElements.h"
    #include "dgConservationLaw.h"
    #include "Gmsh.h"
    #include "dgLimiter.h"
    #include "dgDofContainer.h"
    
    
    class binding;
    
    
    class dgSystemOfEquations {
      private:
      // the mesh and the model
      GModel *_gm;
      dgGroupCollection _groups;
      // the conservation law
      dgConservationLaw *_claw;
      std::string _cLawName;
      // polynomial order (should be more general)
      int _order;
      // dimension of the problem
      int _dimension;
      // solution and righ hand sides
      dgDofContainer *_solution;
      dgDofContainer *_rightHandSide;
      dgSystemOfEquations(const dgSystemOfEquations &) {}
      double computeTimeStepMethodOfLines () const;
    public:
      const dgConservationLaw * getLaw() const {return _claw;}
      const GModel            * getModel() const {return _gm;}
      void setOrder (int order); // set the polynomial order
      void setConservationLaw (dgConservationLaw *law); // set the conservationLaw
      dgSystemOfEquations(GModel *_gm);
      void setup (); // setup the groups and allocate
      void exportSolution (std::string filename); // export the solution
      void limitSolution (); // apply the limiter on the solution
      void L2Projection (std::string functionName); // assign the solution to a given function
      double RK44(double dt);
      double RK44_limiter(double dt);
      double ForwardEuler(double dt);
    
      double computeInvSpectralRadius();
    
      static void registerBindings(binding *b);
    
      void saveSolution (std::string fileName) ;
      void loadSolution (std::string fileName);
    
      ~dgSystemOfEquations();
    };
    
    #endif // _DG_SYSTEM_OF_EQUATIONS_