102 const std::shared_ptr<StructuredBlockForest> &blocks,
103 BlockDataID rho_0ID_, BlockDataID rho_1ID_,
double order_0,
104 double order_1,
double rate_coefficient,
double stoech_0,
double stoech_1)
108 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
111 indexVectorID = blocks->addStructuredBlockData<
IndexVectors>(
112 createIdxVector,
"IndexField_ReactionKernelIndexed_2_double_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);