[Gmsh] error!

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Jul 11 23:04:32 CEST 2013


On 11 Jul 2013, at 17:13, jyqxp <jyqxp at 126.com> wrote:

> Sir!
>      In new version gmesh2.8 ,when I  compiled it ,there were two errors :
> in OptHomRun.cpp

Thanks for the report; these two errors should now be fixed in SVN.

(You could also disable this optional module by setting ENABLE_OPTHOM to false in cmake)


> static MElement *getWorstElement(const std::set<MElement*> &badasses, OptHomParameters &p){
>   double worst = 1.e300;
>   MElement *worstEl = 0;
>   for (std::set<MElement*>::iterator it=badasses.begin(); it!=badasses.end(); it++) {
>     double jmin, jmax, val;
>     (*it)->scaledJacRange(jmin,jmax);
>     val = jmin-p.BARRIER_MIN + p.BARRIER_MAX-jmax;
>     if (val < worst) {
>       worst = val;
>       worstEl = *it;
>     }
>   }
> Error 1 error C2440: 'initializing' : cannot convert from 'std::_Tree<_Traits>::const_iterator' to 'std::_Tree<_Traits>::iterator' N:\GMsh2.8\source\contrib\HighOrderMeshOptimizer\OptHomRun.cpp 340 1 gmsh
> static bool detectNewBrokenElement(const std::set<MElement*> &layer,
>                                    const std::set<MElement*> &badasses, OptHomParameters &p){
>   for (std::set<MElement*>::iterator it=layer.begin(); it!=layer.end(); it++)
>     if (badasses.find(*it) == badasses.end()) {
>       double jmin, jmax, val;
>       (*it)->scaledJacRange(jmin,jmax);
>       if ((jmin < p.BARRIER_MIN) || (jmax > p.BARRIER_MAX)) return true;
>     }
>   return false;
> }
> Error 2 error C2440: 'initializing' : cannot convert from 'std::_Tree<_Traits>::const_iterator' to 'std::_Tree<_Traits>::iterator' N:\GMsh2.8\source\contrib\HighOrderMeshOptimizer\OptHomRun.cpp 442 1 gmsh
>  
>  
>  
>  
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine