Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/bout/mask.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,12 @@ inline std::unique_ptr<Region<Ind3D>> regionFromMask(const BoutMask& mask,
}
return std::make_unique<Region<Ind3D>>(indices);
}

inline BoutMask maskFromRegion(const Region<Ind3D>& region, const Mesh* mesh) {
BoutMask mask{mesh, false};

BOUT_FOR(i, region) { mask[i] = true; }
Comment thread
dschwoerer marked this conversation as resolved.
return mask;
}

#endif //BOUT_MASK_H
Loading