gmsh and getdp in academia and industry - gnu octave · gmsh and getdp in academia and industry c....

50
Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

Upload: vothien

Post on 26-Nov-2018

235 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

GmshandGetDPinAcademiaandIndustry

C.GeuzaineUniversityofLiège,Belgium

OctConf2015-Darmstadt,September232015

Page 2: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

• IamaprofessorofElectricalEngineeringandComputerScienceattheUniversityofLiègeinBelgium,whereIleadtheACEresearchgroup

• Ourresearchinterests:modeling,analysis,algorithmdevelopment,andsimulaNonforproblemsarisinginvariousareasofengineeringandscience

• Wewritequitealotofcodes,mostlyPDEsolversinC++/Python

• TwocodesreleasedunderGNUGPL:

• Gmshmeshgenerator:hVp://gmsh.info

• GetDPfiniteelementsolver:hVp://getdp.info

• Thesearelongtermefforts(bothstartedin1997)

SomeBackground

Page 3: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

SomeBackground

Today,GmshandGetDPrepresent

• halfamillionlinesof(mostlyC++)code

• sNllonly3coredevs;butabout100withrepowriteaccess

• about1000peopleonmailinglists

• about5000binarydownloadsperweek(80%Windows)

• about400(googlescholar)citaNonsperyear

Page 4: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

SomeBackground

Today,GmshandGetDPrepresent

• halfamillionlinesof(mostlyC++)code

• sNllonly3coredevs;butabout100withrepowriteaccess

• about1000peopleonmailinglists

• about5000binarydownloadsperweek(80%Windows)

• about400(googlescholar)citaNonsperyear

Let’shavealook!

Page 5: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

QuickoverviewofGmsh

• Gmshisbasedaroundfourmodules:Geometry,Mesh,SolverandPost-processing;3levelsofuse:

• Developper:throughthe(undocumented…)C++orPythonAPI

• Advanceduser:throughthededicated“.geo”language

• Noviceuser:throughtheGUI(whichtranslatesmostacNonsinto“.geo”filecommands)

• MaincharacterisNc:allalgorithmsarewriVenintermsofabstractCADenNNes,usinga“BoundaryREPresentaNon”approach

Page 6: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

T2:InterfaceCAO/maillage

6

Page 7: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

T2:InterfaceCAO/maillage

8

Page 8: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

10 E. MARCHANDISE

10

51

50

60

61 62

41

00@T1

30

12

11

u00(x)

20

3140

Figure 5. Multiscale Laplace partitioning method of an aorta(G = 0, NB = 13, ⌘ = 17). In thisexample there are n = 6 di↵erent levels on which harmonic maps are computed. The red line showsthe partition line that recursively splits the mesh into two area balanced mesh partitions (see the

resulting mesh partition in Fig.6 ).

Copyright c� 2010 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2010; 00:1–6Prepared using nmeauth.cls

Page 9: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

Basic concepts

Any 3-D model can be defined using its Boundary Representation

(BRep): a volume is bounded by a set of surfaces, and a surface is

bounded by a series of curves; a curve is bounded by two end points.

Therefore, four kinds of model entities are defined:

1. Model Vertices G

0i

that are topological entities of dimension 0,

2. Model Edges G

1i

that are topological entities of dimension 1,

3. Model Faces G

2i

that are topological entities of dimension 2,

4. Model Regions G

3i

that are topological entities of dimension 3.

11

QuickoverviewofGmsh

Page 10: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

Model entities are topological entities, i.e., they only deal with adja-

cencies in the model, and we use a bi-directional data structure for

representing the graph of adjacencies.

Schematically, we have

G

0i

⌦ G

1i

⌦ G

2i

⌦ G

3i

.

Any model entity is able to build its list of adjacencies using local

operations.

12

QuickoverviewofGmsh

Page 11: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

The geometry of a model entity depends on the solid modeler for its

underlying representation. Solid modelers usually provide a parametriza-

tion of the shapes, i.e., a mapping p 2 R

d 7! x 2 R

3:

1. The geometry of a model vertex G

0i

is simply its 3-D location

x

i

= (xi

, y

i

, z

i

).

2. The geometry of a model edge G

1i

is its underlying curve Ci

with

its parametrization p(t) 2 Ci

, t 2 [t1, t2].

3. The geometry of a model face G

2i

is its underlying surface Si

with

its parametrization p(u, v) 2 Si

.

4. The geometry associated to a model region is R

3.

13

QuickoverviewofGmsh

Page 12: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

u = u(t), v = v(t)

S

p(u, v)

C

v

u

x

x = x(t), y = y(t), z = z(t)

v = v(x, y, z)

C

S

p(x, y, z)

t1 p(t)tt2

C

u = u(x, y, z)

z

y

Point p located on the curve C that is itself embedded in surface S

14

QuickoverviewofGmsh

Page 13: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

CAD kernel idiosyncrasies: seam edges and degenerated edges

15

QuickoverviewofGmsh

Page 14: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

CAD kernel idiosyncrasies: seam edges and degenerated edges

15

QuickoverviewofGmsh

C.#Geuzaine#+#Onera#Scien0fic#Day#+#Oct.#3#2012 2

Surface&meshes

Surface#triangula?ons#can#be#generated

• either#directly#in#the#embedding#3MD#Euclidean#space

• or#in#the#parametric#plane#of#the#surface,#which#is#far#more#robust#(Delaunay#and#variants)

Surface mesh generation techniques

Surface meshes can be1 generated directly in the “real” 3D space; or2 generated in the parametric plane of the surface.

Several algorithms implemented: Delaunay, “Frontal Delaunay”, localmesh modifications (collapse and splits only)

C. Geuzaine WIAS, December 4th, 2008

Surface mesh generation techniques

When a decent parametrization of the surface exists, building themesh in the parametric plane is more robustIssues like seam and/or degenerated edges have to be taken intoaccount,Need ability to generate (highly) anisotropic meshes.

C. Geuzaine WIAS, December 4th, 2008

Page 15: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

Abstract interface

• For the geometry:

GModel

GVertex

GEdge

GFace

GRegion

Concrete implementation for each CAD kernel (e.g. gmshFace, OCCFace,

parasolidFace, fourierFace, levelsetFace, discreteFace).

Direct access via CAD kernel APIs: never translate/convert formats!

16

QuickoverviewofGmsh

Page 16: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

class GEdge : public GEntity {//bi-directional data structure

GVertex *v1, *v2;

std::list<GFace*> faces;

public:

//pure virtual functions that have to be overloaded for every

//solid modeler

virtual std::pair<double> parRange() = 0;

virtual Point3 point(double t) = 0;

virtual Vector3 firstDer(double t) = 0;

virtual Point2 reparam(GFace *f, double t, int dir) = 0;

virtual bool isSeam(GFace *f) = 0;

//other functions of the class are non pure virtual

//..

};

17

QuickoverviewofGmsh

Page 17: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

class GFace : public GEntity {//bi-directional data structure

GRegion *r1, *r2;

std::list<GEdge*> edges;

public:

//pure virtual functions that have to be overloaded for every

//solid modeler

virtual std::pair<double> parRange(int dir) const = 0;

virtual Point3 point(double u, double v) const = 0;

virtual std::pair<Vector3> firstDer(double u, double v) const = 0;

//other functions of the class are non pure virtual

virtual double curvature(double u, double v) const;

//...

};

18

QuickoverviewofGmsh

Page 18: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

Abstract interface (cont’d)

• For the mesh:

MElement

MVertex

Each GEntity stores its “internal” vertices. Parallel I/O through GModel.

Minimal storage:

- 44 bytes per vertex, 28 bytes per tetrahedron (12 Mtets/Gb)

- Enriched for specific algorithms

- MEdge and MFace created on demand

MElement provides access to mapping, Jacobian and integration

Library can be compiled with mesh generation algorithms built-in

19

QuickoverviewofGmsh

Page 19: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

Recentfeatures:

• ReparameterizaNonofsurfaces(“STLremeshing”)

• Coarsegrained(distributed,viaMPI)andfine-grained(sharedmemory,viaOpenMP)parallel3DDelaunaymeshingalgorithm

• AutomaNcquadandhex-dominantmeshing

• Anisotropicmeshesandboundarylayers

• Homologyandcohomologysolver

QuickoverviewofGmsh

Page 20: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

QuickoverviewofGetDP

• GetDPlanguage(“.pro”files)forthenaturalexpressionoffiniteelementproblems(explicitfuncNonspacesandweakforms,…)

• Solvingondomaintranslatesinto:

i.e.aquitedirecttranscripNonoftheweakformoftheproblem:Findsuchthat,

r · (aru) = f ⌦

Formulation{{NameF;TypeFemEquation;Quantity{{Nameu;TypeLocal;NameOfSpaceH1_0;}}Equation{Galerkin{[a[]*Dof{du},{du}];InOmega;…}Galerkin{[f[],{u}];InOmega;…}}}}

u 2 H10 (⌦)

Z

⌦aru ·ru0 d⌦+

Z

⌦f u0 d⌦ = 0

8u0 2 H10 (⌦)

Page 21: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

QuickoverviewofGetDP

• NodisNncNonbetween1D,2Dor3D;staNc,transient,Nme-(mulN-)harmonic,eigenproblems

• EasycouplingoffieldsandformulaNons(physics),staggeredormonolithic,e.g.forexplicitJacobianmatrices/sensiNvityanalysisofstronglycouplednonlinearproblems

• Naturalhandlingofnon-local(global,integral)quanNNes,e.g.forcircuitcoupling

• LinearalgebrathroughPETSc/SLEPcand/orSparksit/Arpack

Page 22: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

QuickoverviewofGetDP

• Recentdevelopments:

• UseofGmshlibraryforIO,post-processing,mesh-to-meshinterpolaNon

• LargescalecalculaNonsthroughdomaindecomposiNonmethods(>1billionDoFson10,000CPUsforNme-harmonicwavescaVering)

• High-ordereigenvalueproblems

• Built-inOctaveandPythoninterpreters

Page 23: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

GmshandGetDPinacademiaandinindustry

Actualuseisdifficulttoassess,buttodayweesNmatethat

• Gmshisprobablythemostpopularopensourcemeshgenerator;itisusedinhundredsofuniversiNes,researchcentersandcommercialcompaniesaroundtheworld

• GetDPisusedintensivelyinafewdozensuniversiNesandcompanies

Severalcommercialtoolsuseorintegrate(withduallicensing)thecodes,e.g.hVp://www.nxmagneNcs.de

Page 24: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

GmshandGetDPinacademiaandinindustry

Actualuseisdifficulttoassess,buttodayweesNmatethat

• Gmshisprobablythemostpopularopensourcemeshgenerator;itisusedinhundredsofuniversiNes,researchcentersandcommercialcompaniesaroundtheworld

• GetDPisusedintensivelyinafewdozensuniversiNesandcompanies

Severalcommercialtoolsuseorintegrate(withduallicensing)thecodes,e.g.hVp://www.nxmagneNcs.de

Wheredowegofromhere?TheONELABproject:hVp://onelab.info

Page 25: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

• Economic• GrowingimportanceofnumericalsimulaNonineducaNonandindustry

• ProhibiNvecostofcommercialpackagesforasignificantsubsetofpotenNalusers(SMEs,educaNon,occasionaluse)

• ScienIfic• Highqualityoffree/open-sourcesoowaredevelopedinuniversiNesandresearchcenters

• SomeNmesaheadofcommercialequivalents

• PracIcal• Nouser-friendlyinterfaceand/orpoordocumentaNonformostopensourceFiniteElementAnalysis(FEA)codes

ContextoftheONELABproject

Page 26: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

DevelopaplapormforintegraIngfreeFiniteElementAnalysis(FEA)sooware:

• allowingtheintegraNon(byco-simultaNon)ofanyopen-sourcecode,whatevertheircharacterisNcs

• withanintuiNveGUIallowingnewbieuserstogetstartedandguidedintotheworldofFEmodeling—butwiththepossibilitytoconstructsophis1cated,upgradable,mul1-code,mul1-pla8ormscriptsforthespecializeduser

• andwiththepossibilitytoconstructbotheducaNon-andbusiness-specifictools

GeneralgoaloftheONELABproject

Page 27: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

ThesoluNonshouldovercometwodifficulNesassociatedwithfreeFEAsooware:

(1) Theheterogeneityofthetools

(2) Themissing“expertlayer”,top-downvalidaIonanddocumentaIonfoundincommercialofferings

GeneralgoaloftheONELABproject

Page 28: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

• Manyclosed,commercialtools(COMSOL,AnsysWorkbench,…)

• Moreopentools,e.g.GiD(hVp://gid.cimne.upc.es),butnotfree

• Closestfreesooware:SALOME(hVp://salome-plaporm.org),butverylargeproject,notwellsuitedforbuilding“fastandlight”domain-specificapplicaNons

• Otheropensourceprojects:“mulN-physic”codes(Elmer,etc.)sNllmainlyfocusedonasingledomain(CFD,solids,E-M);theimplementaNonofnewphysicsleadstobare-bonesfeatures,farfromtherefinementofspecializedcodes;noeasy-to-useinterfaceandnodrivingofothercodes

Stateoftheart

Page 29: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

• Don’treimplement,interfacetheexisNng!

• Makeitassmall,lightweightandaseasytomaintainaspossible(nosolver-dependentcodeintheinterface)

• Makeiteasytoprovidetemplates,withinteracNveparametermodificaNon

• ONELABrole=datacentralizaIon,(opNonal)modificaIonandredispatching

ONELABguidingprinciples

Page 30: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

• Don’treimplement,interfacetheexisNng!

• Makeitassmall,lightweightandaseasytomaintainaspossible(nosolver-dependentcodeintheinterface)

• Makeiteasytoprovidetemplates,withinteracNveparametermodificaNon

• ONELABrole=datacentralizaIon,(opNonal)modificaIonandredispatching

Issuesofcompletenessandconsistencyoftheparametersetarecompletelydealtwithonthesolverside

ONELABguidingprinciples

Page 31: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

(1)Heterogeneityofthetools

(2)Missing“expert”layer,top-downvalidaIonanddocumentaIon

ONELABfeatures

Page 32: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

(1)AbstractinterfacetoFEAcodes

ONELABfeatures

Page 33: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

(1)AbstractinterfacetoFEAcodes

• CAD&meshing;physicalproperNes,constraints&codedrivers;post-processing

ONELABfeatures

Page 34: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

(1)AbstractinterfacetoFEAcodes

• CAD&meshing;physicalproperNes,constraints&codedrivers;post-processing

• ImplementedinGmsh:

ONELABfeatures

Page 35: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

(1)AbstractinterfacetoFEAcodes

• CAD&meshing;physicalproperNes,constraints&codedrivers;post-processing

• ImplementedinGmsh:

• Parameterexchangelibrary

ONELABfeatures

Page 36: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

(1)AbstractinterfacetoFEAcodes

• CAD&meshing;physicalproperNes,constraints&codedrivers;post-processing

• ImplementedinGmsh:

• Parameterexchangelibrary

• NaNveC++andPythonclients;Parserfornon-naNveclients

ONELABfeatures

Page 37: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

(1)AbstractinterfacetoFEAcodes

• CAD&meshing;physicalproperNes,constraints&codedrivers;post-processing

• ImplementedinGmsh:

• Parameterexchangelibrary

• NaNveC++andPythonclients;Parserfornon-naNveclients

(2)DevelopmentanddocumentaIonoftemplates(“meta-models”)

ONELABfeatures

Page 38: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

(1)AbstractinterfacetoFEAcodes

• CAD&meshing;physicalproperNes,constraints&codedrivers;post-processing

• ImplementedinGmsh:

• Parameterexchangelibrary

• NaNveC++andPythonclients;Parserfornon-naNveclients

(2)DevelopmentanddocumentaIonoftemplates(“meta-models”)

• Model:blackbox,parameterizableviaabstractinterface

ONELABfeatures

Page 39: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

(1)AbstractinterfacetoFEAcodes

• CAD&meshing;physicalproperNes,constraints&codedrivers;post-processing

• ImplementedinGmsh:

• Parameterexchangelibrary

• NaNveC++andPythonclients;Parserfornon-naNveclients

(2)DevelopmentanddocumentaIonoftemplates(“meta-models”)

• Model:blackbox,parameterizableviaabstractinterface

• Meta-model:setofmodels+selecNonlogic

ONELABfeatures

Page 40: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

Client-server:

• Clients:CADkernels,meshers,solvers,post-processors

• Server:Gmsh(currently)+database

Abstractinterface:

• Theserverhasnoaprioriknowledgeoftheclients(nometa-languageorexchangefileformat)

• Theserverdoesnotwriteinputfilesfor(naIve)clients:theclientcommunicateswiththeservertodefinewhatinformaNonshouldbeexchanged

ONELABimplementaIon

Page 41: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

AbstractinterfacetophysicalproperNes,constraints&codedrivers:

• Libraryforparameterexchange:

• ReferenceserverinC++forportability,e.g.oniOS/Android(onelab::server)

• ClientsinC++(onelab::client)orPython

• Exchangeparameters(onelab::parameter)throughTCP/IPorUnixsockets,orin-memory

ONELABimplementaIon

Page 42: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

AbstractinterfacetophysicalproperNes,constraints&codedrivers:

• Libraryforparameterexchange:

• ReferenceserverinC++forportability,e.g.oniOS/Android(onelab::server)

• ClientsinC++(onelab::client)orPython

• Exchangeparameters(onelab::parameter)throughTCP/IPorUnixsockets,orin-memory

• “NaNve”clientsuseC++orPythondirectly

• “Non-naNve”clientsusePython,byinstrumenNngtheirinputfiles

• Currently:Elmer,OpenFOAM,Code_Aster,Abaqus,Gnuplot

ONELABimplementaIon

Page 43: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

ONELABimplementaIon

NaNveclient:overloadingofexisNngfuncNons(GetDP)...DefineConstant[Numstep={50,Name"Elmer/Numberoftimesteps"}];DefineConstant[TimeStep={0.1,Name"Elmer/Timestep"}];...

Non-naNveclients:instrumentaNontheinputfilesoftheclient(Elmer)...OL.lineNumStep.number(50,Elmer/,Numberoftimesteps);OL.lineTimeStep.number(0.1,Elmer/,Timestep);SimulationSimulationType=TransientTimestepsizes=OL.get(TimeStep)TimestepIntervals=OL.get(NumStep)...

Preprocessing:conversionintoavalidinputfilefortheclient(Elmer)...SimulationSimulationType=TransientTimestepsizes=0.1TimestepIntervals=50...

Page 44: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

onelab::parameter

• nameas‘/’-separatedpath

• dynamicdependencylistofclientsandstatuschange

• decoraNons(help,bounds,choices,...)

• serializaNonanddeserializaNon

ONELABimplementaIon

Page 45: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

onelab::parameter

• nameas‘/’-separatedpath

• dynamicdependencylistofclientsandstatuschange

• decoraNons(help,bounds,choices,...)

• serializaNonanddeserializaNon

ExamplefornaNveGmsh&GetDPclients(in.geoor.profiles):DefineConstant[N={32,Name“Numberofslices”}];

ExampleforPythonclient:c=onelab.client()

N=c.defineNumber('Numberofslices',value=32)

ONELABimplementaIon

Page 46: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

onelab::parameter

• nameas‘/’-separatedpath

• dynamicdependencylistofclientsandstatuschange

• decoraNons(help,bounds,choices,...)

• serializaNonanddeserializaNon

ExamplefornaNveGmsh&GetDPclients(in.geoor.profiles):DefineConstant[N={32,Name“Numberofslices”}];

ExampleforPythonclient:c=onelab.client()

N=c.defineNumber('Numberofslices',value=32)

ONELABimplementaIon

Let’shaveanotherlook!

Page 47: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

• GrowinguseofGmshandGetDPinacademiaandindustry

• “VulgarizaNon”requiresquiteabitofwork,hencetheONELABproject:

• Asimple(trivial?)waytointerfaceFEAsolvers

• InteracNve,basedonGmsh,andfree

• AndnowavailableoniOSandAndroid

• Giveitatry:

• Wishlist:wewantanOctaveserver(andclient)!

hVp://onelab.info

Conclusion

Page 48: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

CommentaboutGmshonhVp://www.fltk.org(sic): >From Anonymous, 20:33 May 18, 2004 (score=1) Je suis outre du programme pour des intellectuels vous devrez avoir plus d’imagination vous faite onte au genie informatique

PS:Doingopensourceisrewarding!

Page 49: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

CommentaboutGmshonhVp://www.fltk.org(sic): >From Anonymous, 20:33 May 18, 2004 (score=1) Je suis outre du programme pour des intellectuels vous devrez avoir plus d’imagination vous faite onte au genie informatique

TranslaNon(includingmisspellings!)forthenon-frenchspeaking:

>From Anonymous, 20:33 May 18, 2004 (score=1) I am ashamed of the program for intelectuals you should have more imagination you are the schame of computer science

PS:Doingopensourceisrewarding!

Page 50: Gmsh and GetDP in Academia and Industry - GNU Octave · Gmsh and GetDP in Academia and Industry C. Geuzaine University of Liège, Belgium OctConf 2015 - Darmstadt, September 23 2015

ThanksforyouraVenNon!

[email protected]