File mask.hxx#

class BoutMask#
#include <mask.hxx>

3D array of bools to mask Field3Ds

Wrapper around a 3D vector of bools to enable masking of Field3Ds. Masking is not automatic, but can be accomplished by

// Create mask the size of mesh with all false values
BoutMask mask(mesh, false);
// Set an index to true to skip this index
mask(3, 4, 5) = true;
// Iterate over field
for (const auto &index : field) {
  // Skip any indices which are set to true in the mask
  if (mask(index.x, index.y, index.z)) continue;
  ...
}

Public Functions

inline BoutMask(int nx, int ny, int nz, bool value = false)#
inline explicit BoutMask(const Mesh &mesh, bool value = false)#
inline explicit BoutMask(const Mesh *mesh = nullptr, bool value = false)#
inline BoutMask &operator=(bool value)#
inline bool &operator()(int jx, int jy, int jz)#
inline const bool &operator()(int jx, int jy, int jz) const#

Private Members

Tensor<bool> mask#