109 const std::shared_ptr<StructuredBlockForest> &blocks,
110 BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_,
111 double order_0,
double order_1,
double order_2,
double rate_coefficient,
112 double stoech_0,
double stoech_1,
double stoech_2)
117 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
120 indexVectorID = blocks->addStructuredBlockData<
IndexVectors>(
121 createIdxVector,
"IndexField_ReactionKernelIndexed_3_double_precision");
163 ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID,
164 FlagUID domainFlagUID) {
165 for (
auto &
block : *blocks)
166 fillFromFlagField<FlagField_T>(&
block, flagFieldID, boundaryFlagUID,
172 FlagUID boundaryFlagUID, FlagUID domainFlagUID) {
178 auto *flagField =
block->getData<FlagField_T>(flagFieldID);
180 if (!(flagField->flagExists(boundaryFlagUID) and
181 flagField->flagExists(domainFlagUID)))
184 auto boundaryFlag = flagField->getFlag(boundaryFlagUID);
185 auto domainFlag = flagField->getFlag(domainFlagUID);
187 auto inner = flagField->xyzSize();
188 inner.expand(cell_idx_t(-1));
190 indexVectorAll.clear();
191 indexVectorInner.clear();
192 indexVectorOuter.clear();
194 auto flagWithGLayers = flagField->xyzSizeWithGhostLayer();
195 for (
auto it = flagField->beginWithGhostLayerXYZ(); it != flagField->end();
198 if (!isFlagSet(it, boundaryFlag))
200 if (flagWithGLayers.contains(it.x() + cell_idx_c(0),
201 it.y() + cell_idx_c(0),
202 it.z() + cell_idx_c(0)) &&
203 isFlagSet(it.neighbor(0, 0, 0, 0), domainFlag)) {
205 auto element =
IndexInfo(it.x(), it.y(), it.z(), 0);
207 indexVectorAll.emplace_back(element);
208 if (
inner.contains(it.x(), it.y(), it.z()))
209 indexVectorInner.emplace_back(element);
211 indexVectorOuter.emplace_back(element);