[Dune] How can I read a curved surface from gmsh?

Simon Praetorius Simon.Praetorius at tu-dresden.de
Thu Mar 15 15:35:52 CET 2018


Hi Dmitry,

I work a lot with surface grids, so maybe I can help you. First of  
all, you need a grid-type that supports
dimension != dimensionworld, i.e. the dimension of the grid (=2) is  
not the same as the dimension of the coordinates/world (=3). As far as  
I know, UGGrid does not support this. But there are some other grid  
implementations supporting surface grids: AlbertaGrid, FoamGrid,  
ALUGrid, (maybe more)

The GmshReader, takes the dimension of the coordinates (and the  
dimension of the elements) from the grid-type. So, it should work fine  
for surface grid files, when the grid-type is changed. Other  
file-readers support surface grids as well, e.g. alberta grid-reader.

Best wishes,
Simon


Zitat von Dmitry Mikhailovich Mazilkin <dmitry.mazilkin at tu-clausthal.de>:

> Dear colleagues,
>
> I'm reading a grid from a msh file in the same way, how it was in  
> dune-pdelab-tutorials:
>
>     typedef Dune::UGGrid<2> Grid;
>     Dune::GridFactory<Grid> factory;
>     Dune::GmshReader<Grid>::read(factory,"2d.msh",true,true);
>     std::shared_ptr<Grid> gridp(factory.createGrid());
>
> The object I want to read is a curved surface.
> Vertices of the grid in msh file have 3 components.
> And Z component is meaningful because the surface is not flat.
> But GmshReader ignores Z coordinates and takes only X and Y.
>
> How can I read 2D unstructured grid of curved surface in 3D space?
>
> Dmitry Mazilkin,
> TU Clausthal.
>
> _______________________________________________
> Dune mailing list
> Dune at lists.dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune



-- 
Dr. Simon Praetorius
Institut für Wissenschaftliches Rechnen
Fakultät Mathematik
Technische Universität Dresden
Tel.: TUD-34432
Mail: simon.praetorius at tu-dresden.de
Web: www.math.tu-dresden.de/~spraetor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5753 bytes
Desc: S/MIME-Signatur
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20180315/5930a495/attachment.bin>


More information about the Dune mailing list