102 const std::shared_ptr<StructuredBlockForest> &blocks,
103 BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_,
104 BlockDataID rho_3ID_,
double order_0,
double order_1,
double order_2,
105 double order_3,
double rate_coefficient,
double stoech_0,
double stoech_1,
106 double stoech_2,
double stoech_3)
112 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
115 indexVectorID = blocks->addStructuredBlockData<
IndexVectors>(
116 createIdxVector,
"IndexField_ReactionKernelIndexed_4_double_precision");
152 ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID,
153 FlagUID domainFlagUID) {
154 for (
auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt)
155 fillFromFlagField<FlagField_T>(&*blockIt, flagFieldID, boundaryFlagUID,
161 FlagUID boundaryFlagUID, FlagUID domainFlagUID) {
167 auto *flagField =
block->getData<FlagField_T>(flagFieldID);
169 assert(flagField->flagExists(boundaryFlagUID) and
170 flagField->flagExists(domainFlagUID));
172 auto boundaryFlag = flagField->getFlag(boundaryFlagUID);
173 auto domainFlag = flagField->getFlag(domainFlagUID);
175 auto inner = flagField->xyzSize();
176 inner.expand(cell_idx_t(-1));
178 indexVectorAll.clear();
179 indexVectorInner.clear();
180 indexVectorOuter.clear();
182 auto flagWithGLayers = flagField->xyzSizeWithGhostLayer();
183 for (
auto it = flagField->beginWithGhostLayerXYZ(); it != flagField->end();
186 if (!isFlagSet(it, boundaryFlag))
188 if (flagWithGLayers.contains(it.x() + cell_idx_c(0),
189 it.y() + cell_idx_c(0),
190 it.z() + cell_idx_c(0)) &&
191 isFlagSet(it.neighbor(0, 0, 0, 0), domainFlag)) {
193 auto element =
IndexInfo(it.x(), it.y(), it.z(), 0);
195 indexVectorAll.push_back(element);
196 if (
inner.contains(it.x(), it.y(), it.z()))
197 indexVectorInner.push_back(element);
199 indexVectorOuter.push_back(element);