Compadre  1.6.0
Compadre_USER_StandardTargetFunctionals.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Compadre: COMpatible PArticle Discretization and REmap Toolkit
4 //
5 // Copyright 2018 NTESS and the Compadre contributors.
6 // SPDX-License-Identifier: BSD-2-Clause
7 // *****************************************************************************
8 // @HEADER
9 // this file picks up at the beginning of the computeTargetFunctionals function
10 #ifndef _USER_STANDARD_TARGET_FUNCTIONALS_HPP_
11 #define _USER_STANDARD_TARGET_FUNCTIONALS_HPP_
12 
15 
16 // hint: look in Compadre_GMLS_Target.hpp for examples
17 
19  // these operations are being called at the Team level,
20  // so we call single to only perform the operation on one thread
21  Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
22  // user definition for a target functional goes here
23 
24 
25  });
27  // these operations are being called at the Team level,
28  // so we call single to only perform the operation on one thread
29  Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
30  // user definition for a different target functional goes here
31 
32 
33  });
34 } else {
35  // if the operation was not caught by any user defined TargetFunctional,
36  // then it is returned to the toolkit to try to handle the operation
37  operation_handled = false;
38 }
39 
40 #endif
bool some_conditions_for_another_user_defined_operation
bool some_conditions_for_a_user_defined_operation