102 const std::shared_ptr<StructuredBlockForest> &blocks,
103 BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_,
104 double order_0,
double order_1,
double order_2,
double rate_coefficient,
105 double stoech_0,
double stoech_1,
double stoech_2)
110 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
113 indexVectorID = blocks->addStructuredBlockData<
IndexVectors>(
114 createIdxVector,
"IndexField_ReactionKernelIndexed_3_double_precision");
149 ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID,
150 FlagUID domainFlagUID) {
151 for (
auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt)
152 fillFromFlagField<FlagField_T>(&*blockIt, flagFieldID, boundaryFlagUID,
158 FlagUID boundaryFlagUID, FlagUID domainFlagUID) {
164 auto *flagField =
block->getData<FlagField_T>(flagFieldID);
166 assert(flagField->flagExists(boundaryFlagUID) and
167 flagField->flagExists(domainFlagUID));
169 auto boundaryFlag = flagField->getFlag(boundaryFlagUID);
170 auto domainFlag = flagField->getFlag(domainFlagUID);
172 auto inner = flagField->xyzSize();
173 inner.expand(cell_idx_t(-1));
175 indexVectorAll.clear();
176 indexVectorInner.clear();
177 indexVectorOuter.clear();
179 auto flagWithGLayers = flagField->xyzSizeWithGhostLayer();
180 for (
auto it = flagField->beginWithGhostLayerXYZ(); it != flagField->end();
183 if (!isFlagSet(it, boundaryFlag))
185 if (flagWithGLayers.contains(it.x() + cell_idx_c(0),
186 it.y() + cell_idx_c(0),
187 it.z() + cell_idx_c(0)) &&
188 isFlagSet(it.neighbor(0, 0, 0, 0), domainFlag)) {
190 auto element =
IndexInfo(it.x(), it.y(), it.z(), 0);
192 indexVectorAll.push_back(element);
193 if (
inner.contains(it.x(), it.y(), it.z()))
194 indexVectorInner.push_back(element);
196 indexVectorOuter.push_back(element);