Skip to content
Snippets Groups Projects
Select Git revision
  • 9e76055a0721f9ce3d96b13d3460fe11cd7e00f1
  • master default protected
  • alphashapes
  • quadMeshingTools
  • cygwin_conv_path
  • macos_arm64
  • add-transfiniteautomatic-to-geo
  • patch_releases_4_10
  • HierarchicalHDiv
  • isuruf-master-patch-63355
  • hyperbolic
  • hexdom
  • hxt_update
  • jf
  • 1618-pythonocc-and-gmsh-api-integration
  • octreeSizeField
  • hexbl
  • alignIrregularVertices
  • getEdges
  • patch_releases_4_8
  • isuruf-master-patch-51992
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
  • gmsh_4_8_4
  • gmsh_4_8_3
  • gmsh_4_8_2
  • gmsh_4_8_1
  • gmsh_4_8_0
  • gmsh_4_7_1
  • gmsh_4_7_0
41 results

linearSystem.h

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    linearSystem.h 1.38 KiB
    // Gmsh - Copyright (C) 1997-2010 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to <gmsh@geuz.org>.
    
    #ifndef _LINEAR_SYSTEM_H_
    #define _LINEAR_SYSTEM_H_
    #include <map>
    #include <string>
    
    // A class that encapsulates a linear system solver interface :
    // building a sparse matrix, solving a linear system
    class binding;
    class linearSystemBase {
      protected:
      std::map<std::string, std::string> _parameters;
      public :
      virtual bool isAllocated() const = 0;
      virtual void allocate(int nbRows) = 0;
      virtual void clear() = 0;
      virtual void zeroMatrix() = 0;
      virtual void zeroRightHandSide() = 0;
      virtual int systemSolve() = 0;
      void setParameter (std::string key, std::string value);
      virtual void insertInSparsityPattern(int _row, int _col){};
    };
    
    template <class scalar>
    class linearSystem : public linearSystemBase {
     public :
      linearSystem (){}
      virtual ~linearSystem (){}
      virtual void addToMatrix(int _row, int _col, const scalar &val) = 0;
      virtual void getFromMatrix(int _row, int _col, scalar &val) const = 0;
      virtual void addToRightHandSide(int _row, const scalar &val) = 0;
      virtual void getFromRightHandSide(int _row, scalar &val) const = 0;
      virtual void getFromSolution(int _row, scalar &val) const = 0;
      static void registerBindings (binding*);
      virtual double normInfRightHandSide() const = 0;
    };
    
    #endif