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

mainAntTweakBar.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    OptHomRun.cpp 29.72 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>.
    //
    // Contributors: Thomas Toulorge, Jonathan Lambrechts
    
    #include <stdio.h>
    #include <sstream>
    #include <iterator>
    #include <string.h>
    #include "GmshConfig.h"
    #include "OptHOM.h"
    #include "OptHomRun.h"
    #include "GModel.h"
    #include "Gmsh.h"
    #include "MTriangle.h"
    #include "MQuadrangle.h"
    #include "MTetrahedron.h"
    #include "MHexahedron.h"
    #include "MPrism.h"
    #include "MLine.h"
    #include "OS.h"
    #include <stack>
    
    #if defined(HAVE_BFGS)
    
    typedef std::vector<MElement*> elVec;
    typedef elVec::const_iterator elVecConstIter;
    typedef std::set<MElement*> elSet;
    typedef elSet::iterator elSetIter;
    typedef std::set<MVertex*> vertSet;
    
    typedef std::map<MVertex*, elVec> vertElVecMap;
    typedef std::map<MElement*, elSet> elElSetMap;
    typedef std::pair<elSet, vertSet> elSetVertSetPair;
    
    double distMaxStraight(MElement *el)
    {
      const polynomialBasis *lagrange = (polynomialBasis*)el->getFunctionSpace();
      const polynomialBasis *lagrange1 = (polynomialBasis*)el->getFunctionSpace(1);
      int nV = lagrange->points.size1();
      int nV1 = lagrange1->points.size1();
      int dim = lagrange1->dimension;
      SPoint3 sxyz[256];
      for (int i = 0; i < nV1; ++i) {
        sxyz[i] = el->getVertex(i)->point();
      }