144 const std::shared_ptr<StructuredBlockForest> &blocks,
145 BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_,
146 double order_0,
double order_1,
double order_2,
double rate_coefficient,
147 double stoech_0,
double stoech_1,
double stoech_2)
152 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
155 indexVectorID = blocks->addStructuredBlockData<
IndexVectors>(
157 "IndexField_ReactionKernelIndexed_3_double_precision_CUDA");
201 ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID,
202 FlagUID domainFlagUID) {
203 for (
auto &
block : *blocks)
204 fillFromFlagField<FlagField_T>(&
block, flagFieldID, boundaryFlagUID,
210 FlagUID boundaryFlagUID, FlagUID domainFlagUID) {
216 auto *flagField =
block->getData<FlagField_T>(flagFieldID);
218 if (!(flagField->flagExists(boundaryFlagUID) and
219 flagField->flagExists(domainFlagUID)))
222 auto boundaryFlag = flagField->getFlag(boundaryFlagUID);
223 auto domainFlag = flagField->getFlag(domainFlagUID);
225 auto inner = flagField->xyzSize();
226 inner.expand(cell_idx_t(-1));
228 indexVectorAll.clear();
229 indexVectorInner.clear();
230 indexVectorOuter.clear();
232 auto flagWithGLayers = flagField->xyzSizeWithGhostLayer();
233 for (
auto it = flagField->beginWithGhostLayerXYZ(); it != flagField->end();
236 if (!isFlagSet(it, boundaryFlag))
238 if (flagWithGLayers.contains(it.x() + cell_idx_c(0),
239 it.y() + cell_idx_c(0),
240 it.z() + cell_idx_c(0)) &&
241 isFlagSet(it.neighbor(0, 0, 0, 0), domainFlag)) {
243 auto element =
IndexInfo(it.x(), it.y(), it.z(), 0);
245 indexVectorAll.emplace_back(element);
246 if (
inner.contains(it.x(), it.y(), it.z()))
247 indexVectorInner.emplace_back(element);
249 indexVectorOuter.emplace_back(element);