Difference between revisions of "GetDP"
(→Getting started) |
|||
Line 7: | Line 7: | ||
# Download and uncompress the Gmsh/GetDP bundle for [http://onelab.info/files/gmsh-getdp-Windows64.zip Windows64], [http://onelab.info/files/gmsh-getdp-Windows32.zip Windows32], [http://onelab.info/files/gmsh-getdp-Linux64.zip Linux64], [http://onelab.info/files/gmsh-getdp-Linux32.zip Linux32] or [http://onelab.info/files/gmsh-getdp-MacOSX.zip MacOSX]. (If you prefer you can of course also download and install [http://geuz.org/gmsh/#Download Gmsh] and [http://geuz.org/getdp/#Download GetDP] independently.) | # Download and uncompress the Gmsh/GetDP bundle for [http://onelab.info/files/gmsh-getdp-Windows64.zip Windows64], [http://onelab.info/files/gmsh-getdp-Windows32.zip Windows32], [http://onelab.info/files/gmsh-getdp-Linux64.zip Linux64], [http://onelab.info/files/gmsh-getdp-Linux32.zip Linux32] or [http://onelab.info/files/gmsh-getdp-MacOSX.zip MacOSX]. (If you prefer you can of course also download and install [http://geuz.org/gmsh/#Download Gmsh] and [http://geuz.org/getdp/#Download GetDP] independently.) | ||
# Double-click on the Gmsh executable ('''gmsh.exe''' [[File:GmshIcon.png|GmshIcon.png]] on Windows). | # Double-click on the Gmsh executable ('''gmsh.exe''' [[File:GmshIcon.png|GmshIcon.png]] on Windows). | ||
− | # Load one of the GetDP models ('''.pro''' file) through the '''File/Open''' menu, e.g. '''inductor.pro''' for the [[Inductor|simple inductor | + | # Load one of the GetDP models ('''.pro''' file) through the '''File/Open''' menu, e.g. '''inductor.pro''' for the [[Inductor|simple inductor/core]] example. |
# Click on '''Run'''. | # Click on '''Run'''. | ||
# ... that's it! | # ... that's it! |
Revision as of 19:10, 2 September 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.
Contents
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:
- 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.)
- Double-click on the Gmsh executable (gmsh.exe Error creating thumbnail: Unable to save thumbnail to destinationon Windows).
- Load one of the GetDP models (.pro file) through the File/Open menu, e.g. inductor.pro for the simple inductor/core example.
- Click on Run.
- ... that's it!
- GmshGetDP 2.png
Click on Run to launch a computation. You can change any parameter and then Run again!
Featured GetDP models
- Simple inductor/core system
- Rotating electric machines
- Electromechanical relay
- Magnetodynamics with cohomology conditions
- Multiple scattering with Sommerfeld ABC and with Perfectly Matched Layer (PML)
- Time reversal in free space
All GetDP models
How does it work?
ONELAB numeric parameters can be defined directly in the input files through the DefineConstant syntax: <syntaxhighlight lang="cpp"> 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/"} ]; </syntaxhighlight>
When the input file is analyzed, if the parameter has not been previously defined, it takes the value provided in DefineConstant and is sent to the ONELAB server. If the input 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 parameters: <syntaxhighlight lang="cpp"> 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 = {"a", Label "My variable", Path "Variables/Input/"} ]; </syntaxhighlight>
Note that when the code is run without the ONELAB server, the parameters take the default values provided by DefineConstant.
Common parameter attributes
Here's the list of attributes available for all ONELAB parameters:
- Label string
- User-friendly label used in the graphical user interface
- Path string
- Full path of the parameter in the ONELAB server (represented as a tree 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
- Highlight string
- Color used to draw the widget in the graphical interface
- Visible 0|1
- Should the parameter be visible in the interface?
- Closed 0|1
- Should the subtree containing this variable be closed?
- Help string
- Help string for this parameter
- AutoCheck 0|1
- Allows to disable automatic "check" (rebuild of the interface) when the value is changed
- GmshOption string
- Treat the parameter as the name of a Gmsh option (e.g. Mesh.Algorithm)
Number attributes
In addition, numbers can take the following specific attributes:
- Min number
- Minimum value allowed when scrolling in the interface, and when looping on the parameter
- Max number
- Maximum value allowed when scrolling in the interface, and when looping on the parameter
- Step number
- Step value used when scrolling in the interface, and when looping on the parameter
- Range {min, max, step}
- Alternate syntax for Min, Max and Step
- Choices{number, number, ...}
- Possible choices for the parameter
- Choices{number=string, number=string, ...}
- Possible choices for the parameter, with string labels for each choice
- ReadOnlyRange 0|1
- Treat the range (or the choices, if they are provided) as read-only
- Loop string
- Loop over the parameter (the string indicates the loop imbrication level: currently "1", "2" or "3")
- Graph string
String attributes
String accepts the following specific attributes:
- Kind string
- Mutable kind of the string (currently: "file")
- Choices {string, string, ...}
- Possible choices for the parameter
- MultipleSelection 0|1
- Allow multiple selection in choices
- Macro string
- Treat the parameter as the filename of a macro that will be run when the parameter is clicked in the interface