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; ... }