GiD_Event_SelectGIDBatFile: must be used to switch the default batch file for special cases.
This procedure must return as a value the alternative pathname of the batch file. For example it is used as a trick to select a different analysis from a list of batch calculation files.
in fact can return a list with the batch_name and some extra arguments to be added to the bat call
Note: The batch_name must be relative to the problemtypes folder, not absolute, and the extra arguments will be added to the four default arguments
Code Block |
---|
proc GiD_Event_SelectGIDBatFile { dir basename } {
...body...
set value ...
return $value
} |
example:
This example maintain the default bat filename to be called, but add the the four default arguments a 5th extra argument (with the number of threads, specified by the user in the preferences window)
Code Block | ||
---|---|---|
| ||
proc GiD_Event_SelectGIDBatFile { project_name basename } {
set problemtype_tail [file tail [GiD_Info Project ProblemType]]
set filename_bat $problemtype_tail.win.bat
if { $::tcl_platform(platform) != "windows" } {
set filename_bat $problemtype_tail.unix.bat
}
set ncpus [GiD_Set GID_OMP_NUM_THREADS]
return [list $filename_bat $ncpus]
} |
GiD_Event_BeforeCalculate: will be called a little earlier than GiD_Event_BeforeRunCalculation, e.g. to allow renumber the mesh before write the calculation file and calculate
remote is 0 in case of local calculation, 1 in case or remote (sending to procserverd)
...