Skip to content
Snippets Groups Projects
Select Git revision
  • 19bbbe2de922ac084f07c6e400a59190112dde5e
  • master default protected
  • rgpu
  • oras_vs_osm
  • refactor_coupled
  • lumi-stable
  • fix-compile-without-mpi
  • clean_multirhs
  • oras_comp
  • hpddm_integration
  • blockProduct
  • multiSrcs
  • splitPrePro
  • reuseGCR
  • helmholtz_2d_ddm
  • fix-template-instanciantion-clang-macos
  • customSchwarz
  • hp-convergence-test
  • fix_krylov
  • solverCorrection
  • boris-martin-master-patch-52103
  • gmshddm_1_0_0
22 results

ddm2D.cpp

Blame
  • GEdgeLoop.h 1.17 KiB
    // Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
    
    #ifndef GEDGE_LOOP_H
    #define GEDGE_LOOP_H
    
    #include "GEdge.h"
    
    class GEdgeSigned {
    public:
      int _sign;
      GEdge *ge;
      GEdgeSigned(int i, GEdge *g) : _sign(i), ge(g) {}
      GVertex *getBeginVertex() const
      {
        return (_sign == 1) ? ge->getBeginVertex() : ge->getEndVertex();
      }
      GVertex *getEndVertex() const
      {
        return (_sign != 1) ? ge->getBeginVertex() : ge->getEndVertex();
      }
      void print() const;
      int getSign() const { return _sign; }
    };
    
    class GEdgeLoop {
    private:
      std::list<GEdgeSigned> loop;
    
    public:
      typedef std::list<GEdgeSigned>::iterator iter;
      typedef std::list<GEdgeSigned>::const_iterator citer;
      GEdgeLoop(const std::vector<GEdge *> &);
      inline iter begin() { return loop.begin(); }
      inline iter end() { return loop.end(); }
      inline citer begin() const { return loop.begin(); }
      inline citer end() const { return loop.end(); }
      inline void erase(iter it) { loop.erase(it); }
      int count(GEdge *) const;
      int count() const { return (int)loop.size(); }
    };
    
    #endif