Compadre
1.5.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
Compadre_USER_ManifoldTargetFunctionals.hpp
Go to the documentation of this file.
1
// this file picks up at the beginning of the computeTargetFunctionalsOnManifold function
2
#ifndef _USER_MANIFOLD_TARGET_FUNCTIONALS_HPP_
3
#define _USER_MANIFOLD_TARGET_FUNCTIONALS_HPP_
4
5
bool
some_conditions_for_a_user_defined_operation
=
false
;
6
bool
some_conditions_for_another_user_defined_operation
=
false
;
7
8
// hint: look in Compadre_GMLS_Target.hpp for examples
9
10
if
(
some_conditions_for_a_user_defined_operation
) {
11
// these operations are being called at the Team level,
12
// so we call single to only perform the operation on one thread
13
Kokkos::single(Kokkos::PerThread(teamMember), [&] () {
14
// user definition for a target functional goes here
15
16
17
});
18
}
else
if
(
some_conditions_for_another_user_defined_operation
) {
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 different target functional goes here
23
24
25
});
26
}
else
{
27
// if the operation was not caught by any user defined TargetFunctional,
28
// then it is returned to the toolkit to try to handle the operation
29
operation_handled =
false
;
30
}
31
32
#endif
some_conditions_for_a_user_defined_operation
bool some_conditions_for_a_user_defined_operation
Definition:
Compadre_USER_ManifoldTargetFunctionals.hpp:5
some_conditions_for_another_user_defined_operation
bool some_conditions_for_another_user_defined_operation
Definition:
Compadre_USER_ManifoldTargetFunctionals.hpp:6
Generated on Wed Jun 26 2024 09:27:27 for Compadre by
1.8.5