Page 1 of 1

ElmerGrid gid mesh conversion

Posted: 05 Mar 2014, 15:17
by mark smith
Hi Elmer team
Having looked at the source code,. can you confirm that elmergrid can only handle GiD meshes consisting of lines, triangles and tetrahedra?
It does not seem to support quadrilaterals,pyramids,wedges or hexahedrons? If I'm correct are there any plans to extend it to include these element types?

Regards
Mark

Re: ElmerGrid gid mesh conversion

Posted: 05 Mar 2014, 16:06
by raback
Hi Mark

The ElmerGrid conversion was written as a first strategy before the following better solution came around:

The are some routines available in
http://www.csc.fi/english/pages/elmer/interfaces -> Elmer templates for GiD

These allow that the solver is directly saved as Elmer mesh. This was the primary strategy when we used GiD more. Unfortunately we are not currently actively using GiD currently so these could be broken. Perhaps some testing would tell it. If this works then we won't be working with ElmerGrid. Otherwise this could be considered.

-Peter

Re: ElmerGrid gid mesh conversion

Posted: 05 Mar 2014, 17:16
by mark smith
Hi Peter,
The elmer templates only seems to support lines,triangles,tets and hexahedra, elmergrid doesn't even support hexahedra at this moment so unfortunately I dont have a work around using GiD. I particularly would like to include hexahedra and wedges (prisms) so I can make some comparisons between comsol and elmer.

A fully functioning elmer problem type for GiD would be my preferred solution but using elmergrid would be more than acceptable. GMSH seems to be better supported but GiD is a better preprocessor IMHO albeit not free.

If I was to modify the elmer.bas file in the elmer.gid problem type to support element types 605,613,706 and 715 do you think that findparents.exe would still work correctly?

Thanks in advance, regards
Mark

Re: ElmerGrid gid mesh conversion

Posted: 05 Mar 2014, 17:27
by raback
Hi Mark

Yes, quickly reading the code it seems that it should almost work out of the box. Just replace

Code: Select all

           CASE( 5, 8 )
              ElementDim = 3
with

Code: Select all

           CASE( 5, 6, 7, 8 )
              ElementDim = 3
-Peter

Re: ElmerGrid gid mesh conversion

Posted: 05 Mar 2014, 18:19
by mark smith
Hi Peter,
Thanks, I'll give it a try. If all works OK I'll post the modified problem type. But don't expect something soon as I'm a bit snowed under at this moment.

Regards
Mark

Re: ElmerGrid gid mesh conversion

Posted: 14 Mar 2014, 14:13
by mark smith
Hi,
Find attached an updated Elmer problem type for GiD which now handles prism and pyramid elements, though not extensively tested it seems to do the job on windows.
Included are the original files : findparents.f90.orig and Elmer.bas.orig

Enjoy

Regards
Mark

Re: ElmerGrid gid mesh conversion

Posted: 14 Mar 2014, 14:25
by raback
Nice work Mark! I'm sure the community will appreciate your efforts. -Peter