Difference between revisions of "GetDP"

From ONELAB
Jump to: navigation, search
(How does it work?)
(How does it work?)
Line 30: Line 30:
 
= How does it work? =
 
= How does it work? =
  
ONELAB variables can be defined directly in the '''.pro''' files through the '''DefineConstant''' syntax:
+
ONELAB numeric variables can be defined directly in the '''.pro''' files through the '''DefineConstant''' syntax:
 
<small><pre>
 
<small><pre>
 
DefineConstant[ x = 1 ];
 
DefineConstant[ x = 1 ];
 
DefineConstant[ x = {1, Label "My variable"} ];
 
DefineConstant[ x = {1, Label "My variable"} ];
 +
DefineConstant[ x = {1, Label "My variable", Choices {0,1}} ];
 +
DefineConstant[ x = {1, Label "My variable", Choices {0,3,5}} ];
 +
DefineConstant[ x = {1, Label "My variable", Choices {0="Zero",3="Three", 5="Five"}} ];
 
DefineConstant[ x = {1, Label "My variable", Min 0, Max 50, Step 5} ]
 
DefineConstant[ x = {1, Label "My variable", Min 0, Max 50, Step 5} ]
 
DefineConstant[ x = {1, Label "My variable", Min 0, Max 50, Step 5, Path "Variables/input/"} ];
 
DefineConstant[ x = {1, Label "My variable", Min 0, Max 50, Step 5, Path "Variables/input/"} ];
 
</pre></small>
 
</pre></small>
When the '''.pro''' file is analyzed, if the variable has not been previously defined, it takes the value provided in '''DefineConstant''' and is sent to the ONELAB server. If the '''.pro''' file is re-analyzed later, the value will be updated using the value from the server (unless it is labeled '''ReadOnly''': see below).  
+
When the '''.pro''' file is analyzed, if the variable has not been previously defined, it takes the value provided in '''DefineConstant''' and is sent to the ONELAB server. If the '''.pro''' file is re-analyzed later, the value will be updated using the value from the server (unless it is labeled '''ReadOnly''': see below). The same syntax can be used to define string variables:
 +
<small><pre>
 +
DefineConstant[ s = "a" ];
 +
DefineConstant[ s = {"a", Label "My string variable"} ];
 +
DefineConstant[ s = {"a", Label "My string variable", Choices {"a", "b", "c"} } ];
 +
DefineConstant[ x = {"a", Label "My string variable", Kind "File"} ]
 +
DefineConstant[ x = {1, Label "My variable", Path "Variables/input/"} ];
 +
</pre></small>
 +
 
  
 
Here's the list of available options when defining ONELAB numbers:
 
Here's the list of available options when defining ONELAB numbers:

Revision as of 07:46, 8 June 2013

GetDP is a rather general open source finite element solver using mixed elements to discretize de Rham-type complexes in one, two and three dimensions. GetDP is developed by the ACE group from the Montefiore Institute at the University of Liège, and is released under the GNU GPL.

Getting started

ONELAB allows to use GetDP as a black-box solver: you don't need to know anything about finite elements or de Rham complexes in order to run your first simulations:

  1. Download and uncompress the Gmsh/GetDP bundle for Windows64, Windows32, Linux64, Linux32 or MacOSX. (If you prefer you can of course also download and install Gmsh and GetDP independently.)
  2. Double-click on the Gmsh executable (gmsh.exe
    Error creating thumbnail: Unable to save thumbnail to destination
    on Windows).
  3. Load one of the GetDP models (.pro file) through the File/Open menu, e.g. magnet.pro for the Template:GetDPFile example.
  4. Click on Run.
  5. ... that's it!

Featured GetDP models

All GetDP models

Category:GetDP

How does it work?

ONELAB numeric variables can be defined directly in the .pro files through the DefineConstant syntax:

DefineConstant[ x = 1 ];
DefineConstant[ x = {1, Label "My variable"} ];
DefineConstant[ x = {1, Label "My variable", Choices {0,1}} ];
DefineConstant[ x = {1, Label "My variable", Choices {0,3,5}} ];
DefineConstant[ x = {1, Label "My variable", Choices {0="Zero",3="Three", 5="Five"}} ];
DefineConstant[ x = {1, Label "My variable", Min 0, Max 50, Step 5} ]
DefineConstant[ x = {1, Label "My variable", Min 0, Max 50, Step 5, Path "Variables/input/"} ];

When the .pro file is analyzed, if the variable has not been previously defined, it takes the value provided in DefineConstant and is sent to the ONELAB server. If the .pro file is re-analyzed later, the value will be updated using the value from the server (unless it is labeled ReadOnly: see below). The same syntax can be used to define string variables:

DefineConstant[ s = "a" ];
DefineConstant[ s = {"a", Label "My string variable"} ];
DefineConstant[ s = {"a", Label "My string variable", Choices {"a", "b", "c"} } ];
DefineConstant[ x = {"a", Label "My string variable", Kind "File"} ]
DefineConstant[ x = {1, Label "My variable", Path "Variables/input/"} ];


Here's the list of available options when defining ONELAB numbers:

Label string
User-friendly label used in the graphical user interface
ReadOnly 0|1
If ReadOnly is set, the value cannot be changed server-side, and the value provided in DefineConstant is always used
Min number
Max number
Step number
Range
ReadOnlyRange
Highlight

Other options include Help, ...