102 const std::shared_ptr<StructuredBlockForest> &blocks,
103 BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_,
104 BlockDataID rho_3ID_, BlockDataID rho_4ID_,
float order_0,
float order_1,
105 float order_2,
float order_3,
float order_4,
float rate_coefficient,
106 float stoech_0,
float stoech_1,
float stoech_2,
float stoech_3,
114 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
117 indexVectorID = blocks->addStructuredBlockData<
IndexVectors>(
118 createIdxVector,
"IndexField_ReactionKernelIndexed_5_single_precision");
157 ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID,
158 FlagUID domainFlagUID) {
159 for (
auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt)
160 fillFromFlagField<FlagField_T>(&*blockIt, flagFieldID, boundaryFlagUID,
166 FlagUID boundaryFlagUID, FlagUID domainFlagUID) {
172 auto *flagField =
block->getData<FlagField_T>(flagFieldID);
174 assert(flagField->flagExists(boundaryFlagUID) and
175 flagField->flagExists(domainFlagUID));
177 auto boundaryFlag = flagField->getFlag(boundaryFlagUID);
178 auto domainFlag = flagField->getFlag(domainFlagUID);
180 auto inner = flagField->xyzSize();
181 inner.expand(cell_idx_t(-1));
183 indexVectorAll.clear();
184 indexVectorInner.clear();
185 indexVectorOuter.clear();
187 auto flagWithGLayers = flagField->xyzSizeWithGhostLayer();
188 for (
auto it = flagField->beginWithGhostLayerXYZ(); it != flagField->end();
191 if (!isFlagSet(it, boundaryFlag))
193 if (flagWithGLayers.contains(it.x() + cell_idx_c(0),
194 it.y() + cell_idx_c(0),
195 it.z() + cell_idx_c(0)) &&
196 isFlagSet(it.neighbor(0, 0, 0, 0), domainFlag)) {
198 auto element =
IndexInfo(it.x(), it.y(), it.z(), 0);
200 indexVectorAll.push_back(element);
201 if (
inner.contains(it.x(), it.y(), it.z()))
202 indexVectorInner.push_back(element);
204 indexVectorOuter.push_back(element);