Skip to content
Snippets Groups Projects
Select Git revision
  • 3013af52babced9c914cff711b36bf112fba736e
  • master default protected
  • test-dof-hash
  • dof-renumbering
  • gdemesy-master-patch-30528
  • eval-space-time
  • oscillating_multiharm
  • MH_movement
  • axisqu
  • write_vtu_and_ensight_formats
  • movingband
  • CP_1972_add_vtu_file_writing
  • mortar
  • fast_freq_sweep_Resolution
  • applyresolvent_again
  • marteaua-master-patch-54323
  • patch-1
  • binde-master-patch-08072
  • binde-master-patch-52461
  • BCGSL
  • resolvent
  • getdp_3_5_0
  • getdp_3_4_0
  • getdp_3_3_0
  • getdp_3_2_0
  • getdp_3_1_0
  • getdp_3_0_4
  • getdp_3_0_3
  • getdp_3_0_2
  • getdp_3_0_1
  • getdp_3_0_0
  • onelab_mobile_2.1.0
  • getdp_2_11_3 protected
  • getdp_2_11_2 protected
  • getdp_2_11_1 protected
  • getdp_2_11_0 protected
  • getdp_2_10_0 protected
  • getdp_2_9_2 protected
  • getdp_2_9_1 protected
  • getdp_2_9_0 protected
  • getdp_2_8_0 protected
41 results

ProParser.output

Blame
  • GenericVertex.h 2.19 KiB
    // Gmsh - Copyright (C) 1997-2017 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>.
    //
    // Contributed by Paul-Emile Bernard
    
    #ifndef _GENERIC_VERTEX_H_
    #define _GENERIC_VERTEX_H_
    
    #include "GmshConfig.h"
    #include "GModel.h"
    #include "GVertex.h"
    #include "Context.h"
    #include <vector>
    
    /* The set of Generic Entities is a generic interface to any other modeler.
       Callbacks (function pointers) are given, sending requests, enquiries, to the
       native modeler. */
    
    class GenericVertex : public GVertex {
    protected:
      int id;
      double _x, _y, _z;
    public:
      // callbacks typedef
      typedef bool (*ptrfunction_int_vector)(int, std::vector<double>&);
      typedef bool (*ptrfunction_int_doubleptr_voidptr)(int, double*, void*);
    
      GenericVertex(GModel *m, int num, int _native_id);
      GenericVertex(GModel *m, int num, int _native_id, const std::vector<double> &vec);
      virtual ~GenericVertex();
    
      virtual GPoint point() const { return GPoint(x(), y(), z()); }
      virtual double x() const { return _x; }
      virtual double y() const { return _y; }
      virtual double z() const { return _z; }
    
      virtual void setPosition(GPoint &p);
      virtual SPoint2 reparamOnFace(const GFace *gf, int) const;
    
      ModelType getNativeType() const { return GenericModel; }
      virtual int getNativeInt()const{return id;};
    
      // sets the callbacks
      static void setVertexXYZ(ptrfunction_int_vector fct){VertexXYZ = fct;};
      static void setVertexMeshSize(ptrfunction_int_doubleptr_voidptr fct){VertexMeshSize = fct;};
    
      // meshing-related methods:
      virtual void setPrescribedMeshSizeAtVertex(double l)
      {
        Msg::Error("GenericVertex::setPrescribedMeshSizeAtVertex");
      }
      virtual inline double prescribedMeshSizeAtVertex() const
      {
        double size;
        void *chose = NULL;
        if (!VertexMeshSize(id,&size,chose)){
          Msg::Error("GenericVertex::ERROR from callback VertexMeshSize");
          return CTX::instance()->lc;
        }
        return size;
      }
    
    private:
      // the callbacks:
      // --------------
      // fills vector xyz for vertex of int id
      static ptrfunction_int_vector VertexXYZ;
      static ptrfunction_int_doubleptr_voidptr VertexMeshSize;
    };
    
    #endif