Hi Lorenzo,

for 2d Grids you have to adapt your input file providing only two coordinates, i.e.:


[Grid]

LowerLeft = 0 0

UpperRight = 1 1

Cells = 10 10

CellType = Simplex


and where you specify the grid property (this is most probably your problem file), you have to set:

SET_TYPE_PROP(MYTYPETAG, Grid, Dune::ALUGrid<2, 2, Dune::simplex, Dune::conforming>);

MYTYPETAG is to be substituted by the actual name of your type tag and the last argument specifies if you want conforming or nonconforming refinement. You see that you have to tell ALUGrid at compile time already which type of elements you want to use and in your case there was probably Dune::cube specified.

I hope this helps!

Dennis




On 24.10.2018 11:49, lc wrote:
Thank you Timo,

but as I understand, also from the return message:

Dune reported error: GridError [assertGeometryType:/usr/local/include/dune/alugrid/3d/gridfactory.hh:438]: Only cube geometries can be inserted into ALUGrid< 3, 3, cube, refrule >.

only 3D geometries can be handled by Alugrid, is it correct?

Maybe UGGrid can manage also 2d unstructured geometries? In this case it is advisable to use it?

Indeed, which is the main difference between these packages?


Best regards,

Lorenzo

On 24/10/2018 11:28, Timo Koch wrote:
Hi Lorenzo,

You download (https://gitlab.dune-project.org/extensions/dune-alugrid), configure, and compile dune-alugrid, like any other Dune module.

You can set Dune::ALUGrid as grid manager, by setting the "Grid" property in Dumux to this type.

(1) For a simple rectangular mesh with simplices, just use the structured grid factory through the DuMux input file by putting something like this in your input file:

[Grid]

LowerLeft = 0 0 0

UpperRight = 1 1 1

Cells = 10 10 10

CellType = Simplex


(2) For more complicated simplex grids you typically generate the mesh with gmsh (http://gmsh.info/) which will produce an *msh file. You can tell ALUGrid to use this file through the input file

[Grid]

File = mygrid.msh


For more informations on grid managers and how to use them, please have a look at the Dumux handbook (http://www.dumux.org/documents/dumux-handbook-2.12.pdf).


Best wishes

Timo


On 24.10.18 09:55, lc wrote:
Good morning developers and users,

I'd like to ask how to use alugrid. Where can I find some examples/references just to create simplices mesh even for simple rectangular geometries.

Thank you,

Lorenzo

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to