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

SuperEl.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    SuperEl.cpp 10.31 KiB
    // Copyright (C) 2013 ULg-UCL
    //
    // Permission is hereby granted, free of charge, to any person
    // obtaining a copy of this software and associated documentation
    // files (the "Software"), to deal in the Software without
    // restriction, including without limitation the rights to use, copy,
    // modify, merge, publish, distribute, and/or sell copies of the
    // Software, and to permit persons to whom the Software is furnished
    // to do so, provided that the above copyright notice(s) and this
    // permission notice appear in all copies of the Software and that
    // both the above copyright notice(s) and this permission notice
    // appear in supporting documentation.
    //
    // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    // NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
    // COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
    // ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
    // DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    // WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
    // ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
    // OF THIS SOFTWARE.
    //
    // Please report all bugs and problems to the public mailing list
    // <gmsh@geuz.org>.
    //
    // Contributor: Thomas Toulorge
    
    #include <iostream>
    #include <sstream>
    #include "GEdge.h"
    #include "MLine.h"
    #include "MQuadrangle.h"
    #include "MPrism.h"
    #include "MHexahedron.h"
    #include "SuperEl.h"
    
    
    
    SuperEl::SuperEl(int order, double dist, int type, const std::vector<MVertex*> &baseVert,
                     const std::vector<SVector3> &normals) {
    
    //  std::cout << "DBGTT: badEl = " << badEl->getNum() << ", _superEl = " << _superEl << std::endl;
    
      switch (type) {
        case TYPE_LIN:
          createSuperElQuad(order, dist, baseVert, normals[0], normals[1]);
          break;
        case TYPE_TRI:
          createSuperElPrism(order, dist, baseVert, normals[0], normals[1], normals[2]);
          break;
        case TYPE_QUA:
          createSuperElHex(order, dist, baseVert, normals[0], normals[1], normals[2], normals[3]);
          break;
        default:
          std::cout << "ERROR: SuperEl not implemented for element of type " << type << std::endl;
          _superEl = 0;
          break;
      }
    
      if (!_superEl) std::cout << "ERROR: SuperEl not created" << std::endl;
    
    }
    
    
    
    void SuperEl::createSuperElQuad(int order, double dist, const std::vector<MVertex*> &baseVert,
                                      const SVector3 &n0, const SVector3 &n1) {