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