User:Jcotela
From KratosWiki
(Difference between revisions)
Line 1: | Line 1: | ||
+ | = Kratos Course 2013 = | ||
+ | |||
+ | == Before we start == | ||
+ | |||
+ | Usually, the Python interpreter can be called from command line. To execute the commands in a file, lets say script.py, we can use the instruction | ||
+ | |||
+ | python script.py | ||
+ | |||
+ | Exceptionally, for this course, we are using a non-standard python installation so, for today, download the following file [https://dl.dropboxusercontent.com/u/24737069/run.sh] and copy it to your problem’s folder (for example, inside cylinder.gid) | ||
+ | |||
+ | To run a python script, on a command window, go to the model’s folder and type | ||
+ | |||
+ | ./run.sh script.py | ||
+ | |||
+ | First, we will create a new Python file to work on. To do this, we create a copyuse the default script (KratosOpenMP.py) to use as a starting point: | ||
+ | |||
+ | cp KratosOpenMP.py script.py | ||
+ | |||
+ | Open script.py on a text editor. | ||
+ | |||
+ | == A first Python example == | ||
+ | |||
+ | |||
+ | |||
+ | = Older stuff = | ||
+ | |||
[[Required components]] | [[Required components]] | ||
[[How to refine an existing triangular or tetrahedral mesh]] | [[How to refine an existing triangular or tetrahedral mesh]] |
Revision as of 16:35, 18 September 2013
Contents |
Kratos Course 2013
Before we start
Usually, the Python interpreter can be called from command line. To execute the commands in a file, lets say script.py, we can use the instruction
python script.py
Exceptionally, for this course, we are using a non-standard python installation so, for today, download the following file [1] and copy it to your problem’s folder (for example, inside cylinder.gid)
To run a python script, on a command window, go to the model’s folder and type
./run.sh script.py
First, we will create a new Python file to work on. To do this, we create a copyuse the default script (KratosOpenMP.py) to use as a starting point:
cp KratosOpenMP.py script.py
Open script.py on a text editor.
A first Python example
Older stuff
Required components How to refine an existing triangular or tetrahedral mesh