[Dune] Two GridPtrs do not work
Andreas Dedner
andreas.dedner at mathematik.uni-freiburg.de
Wed Jun 18 23:04:06 CEST 2008
This seems to be difficult:
runs on my pc:
g++ 4.1.2
AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
and on my laptop:
g++ 4.1.1
Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
do not have g++ 4.1.3 at the moment.
Using dune release in both cases.
Does anybody else have this problem?
To make tests simples I have added test2ug.cc test2ug.dgf
and updated Makefile.am to grid/io/file/dgfparser/test
which I will remove again soon.
Andreas
On Wed, 18 Jun 2008 14:56:14 +0200
Yufei Cao <cao at ians.uni-stuttgart.de> wrote:
> Dear Andreas,
>
> PS: sorry, in the last email I attached the wrong file.
>
> Thank you for your help!
>
> I have constructed two UG Grids using the insert methods
> directly (see the
> attached file) and implemented it on my PC and my laptop.
> This time it works
> well for both computers.
>
> Does it mean that this is a problem in the DGF part?
> Thank you in advance!
>
> 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!
>
> Thank you in advance!
>
> 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
>
-------------------------------------------------------------------------------
>
More information about the Dune
mailing list