Nice. It is important to identify the source of that value (elem. number,
for example).
Is it safe to use the template parameter <T> as a custom class overriding
the sorting operators?
Something like:
class MyClass {
double number_to_classify;
unsigned int elem_id;
operator< ( ... ) { ... number_to_classify ...}
}
On Wed, Jun 27, 2018 at 7:00 PM, John Peterson <[email protected]> wrote:
>
>
> On Wed, Jun 27, 2018 at 3:58 PM, Renato Poli <[email protected]> wrote:
>
>> Hi,
>>
>> I need to evaluate the "greatest" value of a vector that is created in
>> parallel. It is a matter of iterating over all the local elements and
>> calculate the parts of this distributed vector.
>>
>> What is the best way to syncronize this vector to all processors - so they
>> can have the whole set of data and can find out the "greatest" value? Any
>> example to suggest?
>>
>
> Are you using NumericVector? It has a max() member.
>
> --
> John
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users