...
in fact can return a list with the batch_name and some extra parameters that will be added to the arguments of the call to run the calculationarguments 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)
...