Skip to content

Commit 58e7c22

Browse files
committed
Put Compadre typedefs in Compadre:: namespace
- Helps to avoid naming collisions with external packages
1 parent 0610eb7 commit 58e7c22

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

examples/GMLS_Manifold.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ double sphere_harmonic54(double x, double y, double z) {
7676

7777
KOKKOS_INLINE_FUNCTION
7878
void curl_sphere_harmonic54(double *curl, double x, double y, double z) {
79-
const scalar_type lon = longitude(x, y, z); // theta
80-
const scalar_type lat = acos(z); // phi
81-
const scalar_type sigma_lon_comp = std::pow(sin(lat), 2) * (5.0* std::pow(cos(lat), 2) - 1.0) * cos(4.0 *lon);
82-
const scalar_type sigma_lat_comp = 4*cos(lat) * std::pow(sin(lat), 3) * sin(4.0 * lon);
79+
const Compadre::scalar_type lon = longitude(x, y, z); // theta
80+
const Compadre::scalar_type lat = acos(z); // phi
81+
const Compadre::scalar_type sigma_lon_comp = std::pow(sin(lat), 2) * (5.0* std::pow(cos(lat), 2) - 1.0) * cos(4.0 *lon);
82+
const Compadre::scalar_type sigma_lat_comp = 4*cos(lat) * std::pow(sin(lat), 3) * sin(4.0 * lon);
8383
// solution oriented for inward normal, so we flip sign for outward
8484
curl[0] = -(-sin(lat)*sin(lon)*sigma_lon_comp + cos(lat)*cos(lon)*sigma_lat_comp);
8585
curl[1] = -(sin(lat)*cos(lon)*sigma_lon_comp + cos(lat)*sin(lon)*sigma_lat_comp);

src/Compadre_Typedefs.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <functional>
2121
#include <string>
2222

23+
namespace Compadre {
2324
/*!
2425
2526
Data types in Compadre Toolkit:
@@ -184,4 +185,6 @@ typename std::enable_if<2==T::rank,T>::type createView(std::string str, int dim_
184185
//! compadre_kernel_assert_extreme_debug is similar to compadre_assert_debug, but is a call on the device,
185186
//! namely inside of a function marked KOKKOS_INLINE_FUNCTION
186187

188+
} // Compadre namespace
189+
187190
#endif

0 commit comments

Comments
 (0)