Skip to content
Snippets Groups Projects
Select Git revision
  • c2aafb479e905eb649a339a74b5d4e49b0d4659e
  • 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

3D_Mesh.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    • Christophe Geuzaine's avatar
      c2aafb47
      Accelerate (a little bit) the default path for surface mesh · c2aafb47
      Christophe Geuzaine authored
      drawing. We are still very slow, though:
      
      - we should preprocess the mesh to draw large triangle/line strips
      - we should store the normals (and NOT IN A SET!!)
      - we should store the elements in a structure allowing a faster traversal
      - we should do all this in single precision
      
      The same remarks apply for the post-processing stuff. Worse, in
      post-pro, due to Get_Coord and SaturateValues, we basically copy ALL
      THE DATA SET at least one per drawing, even when we don't have to (no
      Raise/Offset/Saturate)... This is horrible, and makes us lose all the
      advantage of the fast list_PointerFast stuff I designed in the forst
      place. Ahhh, the cost of generality...
      c2aafb47
      History
      Accelerate (a little bit) the default path for surface mesh
      Christophe Geuzaine authored
      drawing. We are still very slow, though:
      
      - we should preprocess the mesh to draw large triangle/line strips
      - we should store the normals (and NOT IN A SET!!)
      - we should store the elements in a structure allowing a faster traversal
      - we should do all this in single precision
      
      The same remarks apply for the post-processing stuff. Worse, in
      post-pro, due to Get_Coord and SaturateValues, we basically copy ALL
      THE DATA SET at least one per drawing, even when we don't have to (no
      Raise/Offset/Saturate)... This is horrible, and makes us lose all the
      advantage of the fast list_PointerFast stuff I designed in the forst
      place. Ahhh, the cost of generality...
    BasisFactory.h 2.30 KiB
    // Gmsh - Copyright (C) 1997-2014 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@geuz.org>.
    
    #ifndef BASISFACTORY_H
    #define BASISFACTORY_H
    
    #include "JacobianBasis.h"
    #include "FuncSpaceData.h"
    class nodalBasis;
    class MetricBasis;
    class GradientBasis;
    class bezierBasis;
    
    class BasisFactory
    {
     private:
      static std::map<int, nodalBasis*> fs;
      static std::map<int, MetricBasis*> ms;
      static std::map<FuncSpaceData, JacobianBasis*> js;
      static std::map<FuncSpaceData, bezierBasis*> bs;
      static std::map<FuncSpaceData, GradientBasis*> gs;
    
     public:
      // Caution: the returned pointer can be NULL
    
      // Nodal
      static const nodalBasis* getNodalBasis(int tag);
    
      // Jacobian
      // Warning: bases returned by BasisFactory::getJacobianBasis(int tag) are the
      // only safe bases for using Bezier on the jacobian determinant!
      static const JacobianBasis* getJacobianBasis(FuncSpaceData);
      static const JacobianBasis* getJacobianBasis(int tag, int order) {
        const int type = ElementType::ParentTypeFromTag(tag);
        if (type != TYPE_PYR)
          return getJacobianBasis(FuncSpaceData(true, tag, order));
        else
          return getJacobianBasis(FuncSpaceData(true, tag, false, order+1, order));
      }
      static const JacobianBasis* getJacobianBasis(int tag) {
        const int order = JacobianBasis::jacobianOrder(tag);
        const int type = ElementType::ParentTypeFromTag(tag);
        if (type != TYPE_PYR)
          return getJacobianBasis(FuncSpaceData(true, tag, order));
        else
          return getJacobianBasis(FuncSpaceData(true, tag, false, order+2, order));
      }
    
      // Metric
      static const MetricBasis* getMetricBasis(int tag);
    
      // Gradients
      static const GradientBasis* getGradientBasis(FuncSpaceData);
      static const GradientBasis* getGradientBasis(int tag, int order) {
        return getGradientBasis(FuncSpaceData(true, tag, order));
      }
    
      // Bezier
      static const bezierBasis* getBezierBasis(FuncSpaceData);
      static const bezierBasis* getBezierBasis(int parentTag, int order) {
        int primaryTag = ElementType::getTag(parentTag, 1);
        return getBezierBasis(FuncSpaceData(true, primaryTag, order));
      }
      static const bezierBasis* getBezierBasis(int tag) {
        return getBezierBasis(FuncSpaceData(tag));
      }
    
      static void clearAll();
    };
    
    #endif