[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Salome (MED) -> Getfem C++ interface

From: Jaime A V
Subject: Re: [Getfem-users] Salome (MED) -> Getfem C++ interface
Date: Fri, 1 Jul 2011 10:05:51 +0200

I have not read the list for a few weeks, and reading this is amazing.

I am really interested in this kind on interface between salome and getfem. I will try it and let you all know.

I think if this is useful  to more users could be very interesting to give some kind of official support. Salome powerfull is quite amazing and combining it with the powerfull of getfem could be great.

Thanks Andriy

On Sun, Jun 12, 2011 at 12:18 PM, Andriy Andreykiv <address@hidden> wrote:
Dear Christof,

Attached you can find the interface code (files MED_mesh.h and MED_mesh_implementation.cpp) with a working example that uses it.

I don't know if this is much better from what you've already built. The code is raw, no
exception interception from MED, etc. .. you'll see. But it can be used for to import several mesh types from Salome.

In order to build the example do the following:

1) Install the latest Salome. The attached interface is built with Make and gcc (it uses GCC specific hash table, it can be easily replaced with hash table from, say MS Visual C++) under Ubuntu 64-bit.
2) Copy script from your Salome to the build directory of the interface
3) Check the Make file, regarding the LIBS that are used to build Getfem programs, you might have something different than me.
4) Inspect the CFLAGS in Make, if you're using 64 bit system, then leave the flag -DPCLINUX62, if you're using 32 bit, replace this  
    flag with  -DPCLINUX
5) run: ./ (it's a simple make run that initialized all the Salome environments first)

the build will produce a program that is called finite_strain. It imports a simple mesh from MED file, looking like a simple beam. It is clamped on the sides and a distributed load is gradually applied at the bottom. If you run the program via script (you'll see that it first initializes Salome environment) it produces the results as .vtk files and a med result file:

If you want to use the MED interface in your code just read the public section of the MED_mesh class in MED_mesh.h, it should be easy to understand.  But I would appreciate if you try it on all sorts of elements, supported in Salome. 

Best regards,

2011/6/12 Christof Baeuerle <address@hidden>
Dear Andriy,

thank you very much for your reply. Yes it would be interesting in
collaborating on this. I only developed an in initial draft version of a
MED interface based on the MEDMEM tutorial. It would be great if you
could send me your code.

Best regards

Am Sonntag, den 12.06.2011, 09:56 +0200 schrieb Andriy Andreykiv:
> Dear Christof,
> I'd like to say that I've built and have been using a Salome-Getfem
> interface for a while.
> More specifically I can read MED files with Salome meshes with
> element,
> boundary and node groups that are imported into equivalent getfem mesh
> entities.
> The interface is in C++ created based in MEDMED tutorial, available in
> Salome documentation.
> It is supposed to work with all Salome generated elements, but it yet
> has to be checked for
> each element, as node numbering in Salome and getfem is sometimes
> different.
> So far I checked that it works with linear and quadratic trias, linear
> quads,
> and linear tets in 3D.  You can also write solution fields into the
> MED file from Getfem,
> but only as DOF in the nodes, hence not  yet into the Gauss points
> (the way to postrocess
> stresses and strains in Salome).
> If you or anybody else is interested in collaborating on this, I could
> send you my code.
> Best regards,
>                        Andriy Andreykiv

Getfem-users mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]