[Kratos] openMP utils
rrossi en cimne.upc.edu
rrossi en cimne.upc.edu
Mar Jun 15 16:50:10 CEST 2010
Hi Jordi,
i think your approach is correct! could it be applied inside the
residual_based_builderandsolver?
ciao
Riccardo
On Tue, 15 Jun 2010 15:14:42 +0200, Jordi Cotela <jcotela en cimne.upc.edu>
wrote:
> Hello all,
> Recently, I have been using OpenMP to parallelize my code. In my
> (limited) experience, it is cleaner to develop the code assuming that it
> will be used in parallel, so I find myself defining auxiliary functions
> that perform basic OpenMP tasks (such as getting the thread id or
> generating a partition) or a suitable replacement for a scalar
> compilation.
>
> To avoid having to define this kind of functions for each particular
> piece of code, I have defined the OpenMPUtils class in
> kratos/utilities/openmp_utils.h. At the moment, it only contains three
> very basic functions, but I intend to add more when I need them.
>
> I am telling you this because I think that someone else might find this
> approach useful. You can find an example of use of this in
> vel_pr_criteria.h, a new convergence criteria in incompressible fluid
> application.
More information about the Kratos
mailing list