Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Revert 2D/3D support

Merged vinciguerra_a requested to merge revert-2d into master
Files
8
+ 6
41
@@ -145,32 +145,16 @@ namespace ippl {
detail::HaloCells<T, Dim>& getHalo() { return halo_m; }
// Assignment from a constant.
template <unsigned dim = Dim, std::enable_if_t<(dim == 2), bool> = true>
BareField<T, Dim>& operator=(T x);
template <unsigned dim = Dim, std::enable_if_t<(dim == 3), bool> = true>
BareField<T, Dim>& operator=(T x);
/*!
* Assign an arbitrary BareField expression (2D version)
* @tparam E expression type
* @tparam N size of the expression, this is necessary for running on the
* device since otherwise it does not allocate enough memory
* @param expr is the expression
*/
template <typename E, size_t N,
unsigned dim = Dim, std::enable_if_t<(dim == 2), bool> = true>
BareField<T, Dim>& operator=(const detail::Expression<E, N>& expr);
/*!
* Assign an arbitrary BareField expression (3D version)
* Assign an arbitrary BareField expression
* @tparam E expression type
* @tparam N size of the expression, this is necessary for running on the
* device since otherwise it does not allocate enough memory
* @param expr is the expression
*/
template <typename E, size_t N,
unsigned dim = Dim, std::enable_if_t<(dim == 3), bool> = true>
template <typename E, size_t N>
BareField<T, Dim>& operator=(const detail::Expression<E, N>& expr);
/*!
@@ -199,16 +183,6 @@ namespace ippl {
return Kokkos::create_mirror(dview_m);
}
template <unsigned dim = Dim, std::enable_if_t<(dim == 2), bool> = true>
policy_type getRangePolicy(const int nghost = 0) const {
PAssert_LE(nghost, nghost_m);
const size_t shift = nghost_m - nghost;
return policy_type({shift, shift},
{dview_m.extent(0) - shift,
dview_m.extent(1) - shift});
}
template <unsigned dim = Dim, std::enable_if_t<(dim == 3), bool> = true>
policy_type getRangePolicy(const int nghost = 0) const {
PAssert_LE(nghost, nghost_m);
const size_t shift = nghost_m - nghost;
@@ -224,19 +198,11 @@ namespace ippl {
*/
void write(std::ostream& out = std::cout) const;
#define DefineOperation(fun) \
template <unsigned dim = Dim, \
std::enable_if_t<(dim == 2), bool> = true> \
T fun(int nghost = 0); \
\
template <unsigned dim = Dim, \
std::enable_if_t<(dim == 3), bool> = true> \
T fun(int nghost = 0);
T sum(int nghost = 0);
T max(int nghost = 0);
T min(int nghost = 0);
T prod(int nghost = 0);
DefineOperation(sum)
DefineOperation(max)
DefineOperation(min)
DefineOperation(prod)
private:
//! Number of ghost layers on each field boundary
@@ -261,6 +227,5 @@ namespace ippl {
}
#include "Field/BareField.hpp"
#include "Field/BareFieldOperations.hpp"
#endif
Loading