[Dune] AluCube grid in 2d?

Matteo Semplice matteo.semplice at uninsubria.it
Thu Nov 24 22:36:48 CET 2011


Sorry to bother ouy again. I got ug-grid and recompiled dune.

Now compiling the example with

make GRIDDIM=2 GRIDTYPE=UGGRID adaptivefinitevolume

produces a solution on a mesh with a mixture of squares and trapezoids: 
a big square is divided in four little squares or in 3 cells of which a 
square and 2 trapezoids. I tried to picture this below, but I am not an 
ASCII-art expert...

|--------|
|  \     |
|   |----|
|---|----|

Is there a way to force it to use only squares?

     Matteo

PS when compiling I get the warning

In file included from 
/home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/io/file/dgfparser/dgfug.hh:145,
                  from config.h:390,
                  from adaptivefinitevolume.cc:1:
/home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/io/file/dgfparser/dgfug.cc: 
In static member function ‘static Dune::UGGrid<dim>* 
Dune::MacroGrid::Impl<Dune::UGGrid<dim> >::generate(Dune::MacroGrid&, 
const char*, ompi_communicator_t*) [with int dim = 2]’:
/home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/io/file/dgfparser/dgfparser.hh:141:   
instantiated from ‘GridType* Dune::MacroGrid::createGrid() [with 
GridType = Dune::UGGrid<2>]’
/home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/io/file/dgfparser/dgfparser.hh:210:   
instantiated from ‘Dune::DGFGridFactory<GridType>::DGFGridFactory(const 
std::string&, ompi_communicator_t*) [with G = Dune::UGGrid<2>]’
/home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/io/file/dgfparser/dgfparser.hh:354:   
instantiated from ‘Dune::GridPtr<GridType>::GridPtr(const std::string&, 
ompi_communicator_t*) [with GridType = Dune::UGGrid<2>]’
adaptivefinitevolume.cc:107:   instantiated from here
/home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/io/file/dgfparser/dgfug.cc:28: 
warning: ‘Dune::UGGrid<dim>::UGGrid(unsigned int) [with int dim = 2]’ is 
deprecated (declared at 
/home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/uggrid.hh:427)

On 24/11/2011 17:27, Oliver Sander wrote:
> Use UGGrid if you want 2d cube grids.
> --
> Oliver
>
> Am 24.11.2011 17:21, schrieb Andreas Dedner:
>    
>> The error is correct at least with alu 1.23. There's a alu 1.5 on the
>> way which includes cubes in 2d and surface grids 2d/3d - should be
>> released within a week or two.
>>
>> Andreas
>>
>> On 24/11/11 16:13, Matteo Semplice wrote:
>>      
>>> Hi.
>>> Does the error reported below point to some mistake in my library
>>> setup/compilation or is it the intended behaviour (i.e. dune cannot
>>> handle ALUCube grid in 2d?)
>>>
>>> So, I downloaded ALUGrid-1.23 , configured it with
>>> ./configure --prefix=/home/matteo/
>>> --includedir=/home/matteo/include/alugrid
>>> and installed with "make all" and "make install". No errors were
>>> reported.
>>>
>>> Then I downloaded dune-common, grid, istl and grid-howto, and
>>> configured, compiled, installed with dunecontrol.opts
>>>
>>> PKG_CONFIG_PATH="/home/matteo/lib/pkgconfig"
>>> CONFIGURE_FLAGS="--enable-parallel
>>> --with-alugrid=/home/matteo/ALUGrid-1.23 --prefix=$HOME"
>>> (There is no newline in the definition of CONFIGURE_FLAGS in the actual
>>> file)
>>>
>>> Both the previously compiled alugrid libraries and the alberta libraries
>>> already in my system were found. Again, I noticed no errors.
>>>
>>> Then, I moved to the dune-grid-2.1.0 directory and tried to recompile
>>> adaptivefinitevolume with GRIDTYPE set to ALUGRID_SIMPLEX and
>>> ALUGRID_CONFORM, as suggested in the grid-howto. They compile and run
>>> correctly.
>>>
>>> Next I tried ALUGRID_CUBE and got the following error.
>>> I noticed that the error mentions dune/grid/alugrid/2d/alugrid.hh,
>>> dune/grid/alugrid.hh and lugrid/3d/capabilities.hh... is this ok?
>>>
>>> Thanks for any tip...
>>>
>>> Matteo
>>>
>>> ==========
>>> matteo at montebianco:~/dune2.1/dune-grid-howto-2.1.0$ make GRIDDIM=2
>>> GRIDTYPE=ALUGRID_CUBE adaptivefinitevolume
>>> g++ -std=c++0x -DHAVE_CONFIG_H -I.
>>> -I/home/matteo/dune2.1/dune-common-2.1.0
>>> -I/home/matteo/dune2.1/dune-grid-2.1.0
>>> -I/home/matteo/dune2.1/dune-istl-2.1.0 -I. -I/usr/include
>>> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread
>>> -DMPIPP_H -DENABLE_MPI=1 -I/usr/include
>>> -I/home/matteo/dune2.1/dune-common-2.1.0
>>> -I/home/matteo/dune2.1/dune-grid-2.1.0
>>> -I/home/matteo/dune2.1/dune-istl-2.1.0 -I/usr/lib/openmpi/include
>>> -I/usr/lib/openmpi/include/openmpi -pthread -DMPIPP_H -DENABLE_MPI=1
>>> -I/home/matteo/dune2.1/dune-common-2.1.0 -DGRIDDIM=2 -DWORLDDIM=2
>>> -DALUGRID_CUBE -I/usr/include/alberta -DALBERTA_DIM=2 -DENABLE_ALBERTA
>>> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread
>>> -DMPIPP_H -DENABLE_MPI=1 -I/home/matteo/include/alugrid
>>> -I/home/matteo/include/alugrid/serial
>>> -I/home/matteo/include/alugrid/duneinterface -DENABLE_ALUGRID
>>> -I/home/matteo/include/alugrid/parallel -I/usr/include -DENABLE_GMP=1
>>> -I/home/matteo/dune2.1/dune-grid-2.1.0 -I/usr/include/superlu
>>> -DENABLE_SUPERLU -I/home/matteo/dune2.1/dune-istl-2.1.0 -g -O2 -MT
>>> adaptivefinitevolume-adaptivefinitevolume.o -MD -MP -MF
>>> .deps/adaptivefinitevolume-adaptivefinitevolume.Tpo -c -o
>>> adaptivefinitevolume-adaptivefinitevolume.o `test -f
>>> 'adaptivefinitevolume.cc' || echo './'`adaptivefinitevolume.cc
>>> In file included from
>>> /home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/alugrid/2d/alugrid.hh:8,
>>> from /home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/alugrid.hh:11,
>>> from config.h:457,
>>> from adaptivefinitevolume.cc:1:
>>> /home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/alugrid/2d/grid.hh: In
>>> instantiation of ‘Dune::ALU2dGrid<2, 2, (ALUGridSpace::ElementType)1u>’:
>>> /home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/alugrid/3d/capabilities.hh:21:
>>>
>>> instantiated from ‘Dune::ALUCubeGrid<2, 2>’
>>> adaptivefinitevolume.cc:104: instantiated from here
>>> /home/matteo/dune2.1/dune-grid-2.1.0/dune/grid/alugrid/2d/grid.hh:192:
>>> error: static assertion failed: "ALU2dGrid only implemented for
>>> triangles."
>>> make: *** [adaptivefinitevolume-adaptivefinitevolume.o] Error 1
>>> ===============
>>>
>>> _______________________________________________
>>> Dune mailing list
>>> Dune at dune-project.org
>>> http://lists.dune-project.org/mailman/listinfo/dune
>>>        
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>>      
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>    


-- 
Matteo Semplice				Dip. di Fisica e Matematica
Phone: 031-2386132			Università dell'Insubria
Fax:   031-2386209			Via Valleggio, 11
					22100 Como





More information about the Dune mailing list