Skip to content
Snippets Groups Projects
Select Git revision
  • 024e951747a7f152756f40bbaa3c50b14038d134
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

Callbacks.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    • Christophe Geuzaine's avatar
      024e9517
      · 024e9517
      Christophe Geuzaine authored
      - First draft (pretty much untested!) of new "Integrate" plugin to
        * integrate scalar fields over all the elements in a view
        * integrate the circulation of vector fields along line elements
        * integrate the flux of vector fields across surface elements
      
        Used with Plugin(DisplacementRaise) and Plugin(Evaluate) this
        permits for example to compute the area/volume of deformed
        configurations; and, with Plugin(CutPlane)+Plugin(Skin), the
        perimeter of deformed sections. Another interesting application is
        to use it on a vector field with Plugin(CutPlane), in order to
        compute fluxes across arbitrary cross-sections.
      
      - Added "connectPoints" option to Plugin(CutParametric) so
        that we can feed its output to Plugin(Integrate)
      
      - Added Normals and Tangents options to visualize the orientation of
        elements in post-processing views
      
      - Added "swapOrientation" in Plugin(Transform) to change the
        orientation of the elements (in place) (+ moved the transformation
        routines from the view class into the plugin)
      
      - fixed #defines in some of the plugin header files
      024e9517
      History
      Christophe Geuzaine authored
      - First draft (pretty much untested!) of new "Integrate" plugin to
        * integrate scalar fields over all the elements in a view
        * integrate the circulation of vector fields along line elements
        * integrate the flux of vector fields across surface elements
      
        Used with Plugin(DisplacementRaise) and Plugin(Evaluate) this
        permits for example to compute the area/volume of deformed
        configurations; and, with Plugin(CutPlane)+Plugin(Skin), the
        perimeter of deformed sections. Another interesting application is
        to use it on a vector field with Plugin(CutPlane), in order to
        compute fluxes across arbitrary cross-sections.
      
      - Added "connectPoints" option to Plugin(CutParametric) so
        that we can feed its output to Plugin(Integrate)
      
      - Added Normals and Tangents options to visualize the orientation of
        elements in post-processing views
      
      - Added "swapOrientation" in Plugin(Transform) to change the
        orientation of the elements (in place) (+ moved the transformation
        routines from the view class into the plugin)
      
      - fixed #defines in some of the plugin header files
    CondNumBasis.h 5.85 KiB
    // Gmsh - Copyright (C) 1997-2016 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to the public mailing list <gmsh@onelab.info>.
    
    #ifndef _CONDNUMBASIS_H_
    #define _CONDNUMBASIS_H_
    
    #include <map>
    #include <vector>
    #include "fullMatrix.h"
    #include "JacobianBasis.h"
    
    class CondNumBasis {
     private:
      const GradientBasis *_gradBasis;
    
      const int _tag, _dim, _condNumOrder;
    
      fullVector<double> primGradShapeBarycenterX, primGradShapeBarycenterY,
                         primGradShapeBarycenterZ;
    
      int _nCondNumNodes;
      int _nMapNodes, _nPrimMapNodes;
    
     public :
      CondNumBasis(int tag, int cnOrder = -1);
    
      // Get methods
      inline int getCondNumOrder() const { return _condNumOrder; }
      inline int getNumCondNumNodes() const { return _nCondNumNodes; }
      inline int getNumMapNodes() const { return _nMapNodes; }
      inline int getNumPrimMapNodes() const { return _nPrimMapNodes; }
    
      // Order calculation
      static int condNumOrder(int tag);
      static int condNumOrder(int parentType, int order);
    
      // Condition number evaluation methods
      inline void getInvCondNum(const fullMatrix<double> &nodesXYZ,
                                fullVector<double> &invCond) const {
        getInvCondNumGeneral(_nCondNumNodes,
                             _gradBasis->gradShapeIdealMatX,
                             _gradBasis->gradShapeIdealMatY,
                             _gradBasis->gradShapeIdealMatZ,
                             nodesXYZ, invCond);
      }
      inline void getSignedInvCondNum(const fullMatrix<double> &nodesXYZ,
                                      const fullMatrix<double> &normals,
                                      fullVector<double> &invCond) const {
        getSignedInvCondNumGeneral(_nCondNumNodes,
                                   _gradBasis->gradShapeIdealMatX,
                                   _gradBasis->gradShapeIdealMatY,
                                   _gradBasis->gradShapeIdealMatZ,
                                   nodesXYZ, normals, invCond);
      }
      inline void getInvCondNumAndGradients(const fullMatrix<double> &nodesXYZ,
                                            fullMatrix<double> &IDI) const {
        getInvCondNumAndGradientsGeneral(_nCondNumNodes,
                                         _gradBasis->gradShapeIdealMatX,
                                         _gradBasis->gradShapeIdealMatY,
                                         _gradBasis->gradShapeIdealMatZ,
                                         nodesXYZ, IDI);
      }
      inline void getSignedInvCondNumAndGradients(const fullMatrix<double> &nodesXYZ,
                                                  const fullMatrix<double> &normals,
                                                  fullMatrix<double> &IDI) const {
        getSignedInvCondNumAndGradientsGeneral(_nCondNumNodes,
                                               _gradBasis->gradShapeIdealMatX,
                                               _gradBasis->gradShapeIdealMatY,
                                               _gradBasis->gradShapeIdealMatZ,
                                               nodesXYZ, normals, IDI);
      }
    
    
     private :
      template<bool sign>
      void getInvCondNumGeneral(int nCondNumNodes,
                                const fullMatrix<double> &gSMatX,
                                const fullMatrix<double> &gSMatY,
                                const fullMatrix<double> &gSMatZ,
                                const fullMatrix<double> &nodesXYZ,
                                const fullMatrix<double> &normals,
                                fullVector<double> &invCond) const;
      void getInvCondNumGeneral(int nCondNumNodes,
                                const fullMatrix<double> &gSMatX,
                                const fullMatrix<double> &gSMatY,
                                const fullMatrix<double> &gSMatZ,
                                const fullMatrix<double> &nodesXYZ,
                                fullVector<double> &invCond) const;
      void getSignedInvCondNumGeneral(int nCondNumNodes,
                                      const fullMatrix<double> &gSMatX,
                                      const fullMatrix<double> &gSMatY,
                                      const fullMatrix<double> &gSMatZ,
                                      const fullMatrix<double> &nodesXYZ,
                                      const fullMatrix<double> &normals,
                                      fullVector<double> &invCond) const;
    
      template<bool sign>
      void getInvCondNumAndGradientsGeneral(int nCondNumNodes,
                                            const fullMatrix<double> &gSMatX,
                                            const fullMatrix<double> &gSMatY,
                                            const fullMatrix<double> &gSMatZ,
                                            const fullMatrix<double> &nodesXYZ,
                                            const fullMatrix<double> &normals,
                                            fullMatrix<double> &IDI) const;
      void getInvCondNumAndGradientsGeneral(int nCondNumNodes,                          // No normal given -> unsigned measure
                                            const fullMatrix<double> &gSMatX,
                                            const fullMatrix<double> &gSMatY,
                                            const fullMatrix<double> &gSMatZ,
                                            const fullMatrix<double> &nodesXYZ,
                                            fullMatrix<double> &IDI) const;
      void getSignedInvCondNumAndGradientsGeneral(int nCondNumNodes,                    // Normals given -> signed measure
                                                  const fullMatrix<double> &gSMatX,
                                                  const fullMatrix<double> &gSMatY,
                                                  const fullMatrix<double> &gSMatZ,
                                                  const fullMatrix<double> &nodesXYZ,
                                                  const fullMatrix<double> &normals,
                                                  fullMatrix<double> &IDI) const;
    
    
    };
    
    #endif