[Gmsh] trouble with latest svn

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Jun 19 18:30:02 CEST 2012


Hi Christophe - Can't you just use 

> void list(std::list<int> value){ modified(); val = value; }


to set the list?

Ch.

On 15 Jun 2012, at 18:03, trophime wrote:

> Hi,
> I use gmsh api to perform mesh adaptation in feel++.
> There has been some changes in PView.h which cause me some trouble:
> 
> Index: trunk/Mesh/Field.h
> ===================================================================
> --- trunk/Mesh/Field.h (revision 11862)
> +++ trunk/Mesh/Field.h (revision 12314)
> @@ -217,5 +217,5 @@
>   FieldOptionList(std::list<int> &_val, std::string _help, bool
> *_status=0) 
>     : FieldOption(_help, _status), val(_val) {}
> -  std::list<int> &list(){ modified(); return val; }
> +  void list(std::list<int> value){ modified(); val = value; }
>   const std::list<int>& list() const { return val; }
>   void getTextRepresentation(std::string & v_str)
> 
> In feel++ we use to add elements to the list of FieldIndex attached
> to a MinAniso Field:
> 
>        // /* Create minAniso field, with all the posfiles
> (intersection) */
>        int id = myFieldManager->newId();
> 
>        if (aniso)
>            myFieldManager->newField(id, "MinAniso");
>        else
>            myFieldManager->newField(id, "Min");
>        ::Field *f = myFieldManager->get(id);
> 
>        /// Check if list of field for MinAniso is empty
>        assert ( f->options["FieldsList"]->list().size() != 0);
>        /// Copy idlist vector into algorithm fieldlist
>        std::copy(idList.begin(), idList.end(),
> std::back_inserter(f->options["FieldsList"]->list()) );
> 
> This is no longer possible as list() is now returning a "const list"
> unless I'm wrong.
> 
> Could you please make the list() accessible from the api?
> 
> Best
> C
> 
> 
> 
> _______________________________________________
> 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