Compadre
1.6.0
src
Compadre_USER_ManifoldTargetFunctionals.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 computeTargetFunctionalsOnManifold function
10
#ifndef _USER_MANIFOLD_TARGET_FUNCTIONALS_HPP_
11
#define _USER_MANIFOLD_TARGET_FUNCTIONALS_HPP_
12
13
bool
some_conditions_for_a_user_defined_operation
=
false
;
14
bool
some_conditions_for_another_user_defined_operation
=
false
;
15
16
// hint: look in Compadre_GMLS_Target.hpp for examples
17
18
if
(
some_conditions_for_a_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 target functional goes here
23
24
25
});
26
}
else
if
(
some_conditions_for_another_user_defined_operation
) {
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
some_conditions_for_another_user_defined_operation
bool some_conditions_for_another_user_defined_operation
Definition:
Compadre_USER_ManifoldTargetFunctionals.hpp:14
some_conditions_for_a_user_defined_operation
bool some_conditions_for_a_user_defined_operation
Definition:
Compadre_USER_ManifoldTargetFunctionals.hpp:13
Generated on Mon Dec 9 2024 20:20:51 for Compadre by
1.9.1