How to create the problem type.gid folder with the new problem type generator

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
m
(Removing instructions to modify the Windows PATH variable, this is no longer needed for new problemtypes)
Line 28: Line 28:
  
 
If you use Windows, to create an environment variable open the system window from the control panel. Go to the ''Advanced options'' tab and click the ''environment variables'' button. If you want this variable to be available to all users on this computer, click the ''New'' button under system variables and provide "KRATOS_PATH" as name and the path as value. To create the variable only for the current user, click the ''New'' button under user variables instead.
 
If you use Windows, to create an environment variable open the system window from the control panel. Go to the ''Advanced options'' tab and click the ''environment variables'' button. If you want this variable to be available to all users on this computer, click the ''New'' button under system variables and provide "KRATOS_PATH" as name and the path as value. To create the variable only for the current user, click the ''New'' button under user variables instead.
 
In addition, Windows users should make sure that the folder containing python.exe is included the system path. To test this, open a DOS prompt and type ''python''. If everything is correct python.exe will be executed. Otherwise, you need to modify the PATH environment variable. Follow the procedure described before to access the PATH variable and modify its content. For example, if your path to python is C:\python25\python.exe, write ";C:\python25" at the end of the ''value'' field.
 
 
  
 
[[Category:How To]]
 
[[Category:How To]]

Revision as of 09:53, 18 January 2011

For some of the applications are already availables the folders that allows you to automatically create the problem type. That is the case of the edgebase_levelset problem type, for instance

How to create the custom_problemtype.gid folder

Go to the directory of your application where you put all the files for the construction of the problem type. For instance in the case of the incompressible fluid application, go to

  kratos/applications/incompressible_fluid_application/custom_problemtype/problemtype_generator/

be sure to have the custom_text_file (without extension) where, among all other settings you have to chose the name of your custom_problem_type (first line of the customized text file) and type

  python /home/.../kratos/problemtype_generator/problemtype.py CUSTOM_TEXT_FILE

this procedure allows the creation of the folder CUSTOM_PROBLEMTYPE_NAME.gid to be copied into the GiD problem_type folder.

Using the problem type

Problem types generated using this method will attempt to launch a Python script file when GiD's Calculate button is clicked. This means that the problem type needs to know where to find both Python and Kratos in your computer. To achieve this, some additional configuration is required.

In Linux

Add the following line at the end of your .bashrc file, containing the path to your kratos folder:

    export KRATOS_PATH=/home/.../kratos

This will create an environment variable containing the path to kratos.

In Windows

If you use Windows, to create an environment variable open the system window from the control panel. Go to the Advanced options tab and click the environment variables button. If you want this variable to be available to all users on this computer, click the New button under system variables and provide "KRATOS_PATH" as name and the path as value. To create the variable only for the current user, click the New button under user variables instead.

Personal tools
Categories