102 const std::shared_ptr<StructuredBlockForest> &blocks,
103 BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_,
104 float order_0,
float order_1,
float order_2,
float rate_coefficient,
105 float stoech_0,
float stoech_1,
float stoech_2)
110 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
113 indexVectorID = blocks->addStructuredBlockData<
IndexVectors>(
114 createIdxVector,
"IndexField_ReactionKernelIndexed_3_single_precision");
148 ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID,
149 FlagUID domainFlagUID) {
150 for (
auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt)
151 fillFromFlagField<FlagField_T>(&*blockIt, flagFieldID, boundaryFlagUID,
157 FlagUID boundaryFlagUID, FlagUID domainFlagUID) {
163 auto *flagField =
block->getData<FlagField_T>(flagFieldID);
165 assert(flagField->flagExists(boundaryFlagUID) and
166 flagField->flagExists(domainFlagUID));
168 auto boundaryFlag = flagField->getFlag(boundaryFlagUID);
169 auto domainFlag = flagField->getFlag(domainFlagUID);
171 auto inner = flagField->xyzSize();
172 inner.expand(cell_idx_t(-1));
174 indexVectorAll.clear();
175 indexVectorInner.clear();
176 indexVectorOuter.clear();
178 auto flagWithGLayers = flagField->xyzSizeWithGhostLayer();
179 for (
auto it = flagField->beginWithGhostLayerXYZ(); it != flagField->end();
182 if (!isFlagSet(it, boundaryFlag))
184 if (flagWithGLayers.contains(it.x() + cell_idx_c(0),
185 it.y() + cell_idx_c(0),
186 it.z() + cell_idx_c(0)) &&
187 isFlagSet(it.neighbor(0, 0, 0, 0), domainFlag)) {
189 auto element =
IndexInfo(it.x(), it.y(), it.z(), 0);
191 indexVectorAll.push_back(element);
192 if (
inner.contains(it.x(), it.y(), it.z()))
193 indexVectorInner.push_back(element);
195 indexVectorOuter.push_back(element);