...
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:
The This example maintain the default GiD bat arguments are the 4 provided, but are not compulsory, can provide others
here add a 5th extra argument 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 windowswindow)
Code Block | ||
---|---|---|
| ||
proc GiD_Event_SelectGIDBatFile { project_name basename } { set problemtype_tail [file tail [GiD_Info Project ProblemType] set problemtype_directory [GidUtils::GiveProblemTypeFullname $problemtype].gid set filename_bat [file join $problemtype_directory $problemtypetail.win.bat] if { $::tcl_platform(platform) != "windows" } { set filename_bat [file join $problemtype_directory $problemtypetail.unix.bat] } set gid_exe [info nameofexecutable] set result [list $filename_bat $basename $project_name $problemtype_directory $gid_exe] set cpus [ncpus [GiD_Set GID_OMP_NUM_THREADS] return lappend $result $ncpus return $result[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)
...