102 const std::shared_ptr<StructuredBlockForest> &blocks,
103 BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_,
104 BlockDataID rho_3ID_,
float order_0,
float order_1,
float order_2,
105 float order_3,
float rate_coefficient,
float stoech_0,
float stoech_1,
106 float stoech_2,
float stoech_3)
112 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
115 indexVectorID = blocks->addStructuredBlockData<
IndexVectors>(
116 createIdxVector,
"IndexField_ReactionKernelIndexed_4_single_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);