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

GModelIO.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    • Christophe Geuzaine's avatar
      1b063ef2
      · 1b063ef2
      Christophe Geuzaine authored
      Added support (both read and write) for the Nastran Bulk Data File
      format (BDF).
      
      This might need some adjustments depending on what the actual spec
      is: I just reverse engineered some BDF files I found on the web :-)
      1b063ef2
      History
      Christophe Geuzaine authored
      Added support (both read and write) for the Nastran Bulk Data File
      format (BDF).
      
      This might need some adjustments depending on what the actual spec
      is: I just reverse engineered some BDF files I found on the web :-)
    fourierEdge.cpp 1.27 KiB
    #include "fourierEdge.h"
    #include "Context.h"
    
    extern Context_T CTX;
    
    #if defined(HAVE_FOURIER_MODEL)
    
    fourierEdge::fourierEdge(GModel *model, FM::TopoEdge* edge_, int tag,
    			 GVertex *v0, GVertex *v1) 
      : GEdge(model, tag, v0, v1), edge(edge_) 
    {
      //meshAttributes.Method = TRANSFINI; 
      //meshAttributes.coeffTransfinite = 1.;
      //meshAttributes.nbPointsTransfinite = 10;
    }
    
    Range<double> fourierEdge::parBounds(int i) const
    { 
      return(Range<double>(0.,1.));
    }
    
    GPoint fourierEdge::point(double p) const 
    {
      double x, y, z;
      edge->F(p,x,y,z);
      return GPoint(x,y,z);
    }
    
    double fourierEdge::parFromPoint(const SPoint3 &pt) const
    {
      double p;
      edge->Inverse(pt.x(),pt.y(),pt.z(),p);
      return p;
    }
    
    SVector3 fourierEdge::firstDer(double par) const
    {
      double x,y,z;
      edge->Dfdt(par,x,y,z);
      return SVector3(x,y,z);
    }
    
    int fourierEdge::minimumMeshSegments() const
    {
      if(geomType() == Line || geomType() == Unknown)
        return GEdge::minimumMeshSegments();
      else
        return 2; // always put at least one mid-point on non-straight lines
    }
    
    int fourierEdge::minimumDrawSegments() const
    {
      int n = GEdge::minimumDrawSegments();
    
      if(geomType() == Line)
        return n;
      else if(geomType() == Circle || geomType() == Ellipse)
        return CTX.geom.circle_points;
      else
        return 20 * n;
    }
    
    #endif