[Dune] Fwd: Re: Two GridPtrs do not work

Yufei Cao cao at ians.uni-stuttgart.de
Thu Apr 24 10:36:07 CEST 2008



----------  Forwarded Message  ----------

Subject: Re: [Dune] Two GridPtrs do not work
Date: Tuesday 22 April 2008 15:46
From: Yufei Cao <cao at ians.uni-stuttgart.de>
To: "Andreas Dedner" <andreas.dedner at mathematik.uni-freiburg.de>

Dear Andreas,

By the way, now I'm using the trunk version of dune on both computers.  But
about one month ago, I used the release version on both computers and for
this version of dune,  the construction of two UG grids by the dgf file
worked well on both computers!

Best regards,
Yufei


> > On Tuesday 15 April 2008 13:03, you wrote:
> > > Hi,
> > > could you figure out if this is a UG problem
> > > or a problem in the DGF part?
> > > If you simply construct two UG Grids using the
> > > insert methods directly, does that work for you on
> > > your PC and your laptop?
> > > Andreas
> > >
> > > Yufei Cao wrote:
> > > > Dear Dune,
> > > >
> > > > it would be great if you could help me on this:
> >
> > declaring two GridPtr
> >
> > > > objects leads to a segmentation fault on my PC
> >
> > (Intel(R) Core(TM)2 Duo
> >
> > > > CPU E6850 @ 3.00GHz, gcc 4.1.2). Nevertheless, it
> >
> > runs on my laptop
> >
> > > > (Intel Centrino, gcc 4.1.3).
> > > >
> > > > I attached an example with corresponding grid.
> > > >
> > > > Thank you!
> > > > Yufei
>
> ------------------------------------------------------------------------
>
> > > > #include "config.h"
> > > > #include <dune/grid/io/file/dgfparser/dgfparser.hh>
> > > > #include <dune/grid/io/file/dgfparser/dgfug.hh>
> > > >
> > > >
> > > >
> > > > int main(int argc, char** argv)
> > > > {
> > > >   try{
> > > >     // define the problem dimensions
> > > >     const int dim=2;
> > > >
> > > >     // create a grid object
> > > >     typedef Dune::UGGrid<dim> GridType;
> > > >     typedef GridType::ctype DT;
> > > >     typedef double NumberType;
> > > >
> > > >     std::stringstream dgfFileName;
> > > >     dgfFileName << "mesh.dgf";
> > > >
> > > >     // create grid pointer
> > > >     Dune::GridPtr<GridType> gridPtr1(
> >
> > dgfFileName.str() );
> >
> > > >     Dune::GridPtr<GridType> gridPtr2(
> >
> > dgfFileName.str() );
> >
> > > >     return 0;
> > > >   }
> > > >   catch (Dune::Exception &e){
> > > >     std::cerr << "Dune reported error: " << e <<
> >
> > std::endl;
> >
> > > >   }
> > > >   catch (...){
> > > >     std::cerr << "Unknown exception thrown!" <<
> >
> > std::endl;
> >
> > > >   }
> > > > }
>
> ------------------------------------------------------------------------
>
> > > > DGF
> > > > VERTEX
> > > > firstindex 1
> > > >     0.0000000000    0.0000000000
> > > >     0.2500000000    0.0000000000
> > > >     0.5000000000    0.0000000000
> > > >     0.7500000000    0.0000000000
> > > >     1.0000000000    0.0000000000
> > > >     0.0000000000    0.2500000000
> > > >     0.2500000000    0.2500000000
> > > >     0.5000000000    0.2500000000
> > > >     0.7500000000    0.2500000000
> > > >     1.0000000000    0.2500000000
> > > >     0.0000000000    0.5000000000
> > > >     0.2500000000    0.5000000000
> > > >     0.5000000000    0.5000000000
> > > >     0.7500000000    0.5000000000
> > > >     1.0000000000    0.5000000000
> > > >     0.0000000000    0.7500000000
> > > >     0.2500000000    0.7500000000
> > > >     0.5000000000    0.7500000000
> > > >     0.7500000000    0.7500000000
> > > >     1.0000000000    0.7500000000
> > > >     0.0000000000    1.0000000000
> > > >     0.2500000000    1.0000000000
> > > >     0.5000000000    1.0000000000
> > > >     0.7500000000    1.0000000000
> > > >     1.0000000000    1.0000000000
> > > > #
> > > > CUBE
> > > > map 0 1 3 2 4 5 7 6
> > > >        1       2       7       6
> > > >        2       3       8       7
> > > >        3       4       9       8
> > > >        4       5      10       9
> > > >        6       7      12      11
> > > >        7       8      13      12
> > > >        8       9      14      13
> > > >        9      10      15      14
> > > >       11      12      17      16
> > > >       12      13      18      17
> > > >       13      14      19      18
> > > >       14      15      20      19
> > > >       16      17      22      21
> > > >       17      18      23      22
> > > >       18      19      24      23
> > > >       19      20      25      24
> > > > #
> > > > BOUNDARYDOMAIN
> > > > default 1
> > > > #
> > > > #
>
> ------------------------------------------------------------------------
>
> > > > _______________________________________________
> > > > Dune mailing list
> > > > Dune at dune-project.org
> > > > http://lists.dune-project.org/mailman/listinfo/dune
> >
> > --
>
> ---------------------------------------------------------------------------
>----
>
> > Yufei Cao
> > Universität Stuttgart
> > Institut für Angewandte Analysis und Numerische
> > Simulation
> > Lehrstuhl für Numerische Mathematik für
> > Höchstleistungsrechner
> > Pfaffenwaldring 57
> > 70569 Stuttgart
> > Germany
> >
> > Tel.:  +49 (0)711 685-65558
> > Fax:  +49 (0)711 685-65507
> >
> > Email: cao at ians.uni-stuttgart.de
>
> ---------------------------------------------------------------------------
>----

--
-----------------------------------------------------------------------------
-- Yufei Cao
Universität Stuttgart
Institut für Angewandte Analysis und Numerische Simulation
Lehrstuhl für Numerische Mathematik für Höchstleistungsrechner
Pfaffenwaldring 57
70569 Stuttgart
Germany

Tel.:  +49 (0)711 685-65558
Fax:  +49 (0)711 685-65507

Email: cao at ians.uni-stuttgart.de
-----------------------------------------------------------------------------
--

-------------------------------------------------------

-- 
------------------------------------------------------------------------------- 
Yufei Cao
Universität Stuttgart
Institut für Angewandte Analysis und Numerische Simulation
Lehrstuhl für Numerische Mathematik für Höchstleistungsrechner
Pfaffenwaldring 57 
70569 Stuttgart
Germany

Tel.:  +49 (0)711 685-65558
Fax:  +49 (0)711 685-65507

Email: cao at ians.uni-stuttgart.de 
------------------------------------------------------------------------------- 




More information about the Dune mailing list