Should I always be parallelizing the UDFs?
It is not necessary to parallelize all UDFs. It will depend on the macro and processing content that you are using. Generally, it requires a parallel reduction in the following cases.
- With a cell-face loop, the mean value and if you are doing the integral average even if they are not using the loop in the DEFINE macro value and integral value, if you are using a variable such as the maximum and minimum values, you will need parallel processing.
- If preparing to output a file
For compute node becomes the cause of the defect and to input and output to lose a file, input and output to a file, compute hosts must be performed in batch management. Parallel of the file input and output, a sample of the following UDF manual will be helpful.
Good case even without parallelization, for example, if you have defined the source term only variable in the cell by using a DEFINE_SOURCE, such as when you are in a function of position and time the boundary conditions using DEFINE_PROFILE. For DPM, because the access of cell variables that are the particles and particle data belongs is the main, it is not required in particular parallelism in that case.