138 const std::shared_ptr<StructuredBlockForest> &blocks,
139 BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_,
140 BlockDataID rho_3ID_, BlockDataID rho_4ID_,
double order_0,
141 double order_1,
double order_2,
double order_3,
double order_4,
142 double rate_coefficient,
double stoech_0,
double stoech_1,
143 double stoech_2,
double stoech_3,
double stoech_4)
150 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
153 indexVectorID = blocks->addStructuredBlockData<
IndexVectors>(
155 "IndexField_ReactionKernelIndexed_5_double_precision_CUDA");
203 ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID,
204 FlagUID domainFlagUID) {
205 for (
auto blockIt = blocks->begin(); blockIt != blocks->end(); ++blockIt)
206 fillFromFlagField<FlagField_T>(&*blockIt, flagFieldID, boundaryFlagUID,
212 FlagUID boundaryFlagUID, FlagUID domainFlagUID) {
218 auto *flagField =
block->getData<FlagField_T>(flagFieldID);
220 if (!(flagField->flagExists(boundaryFlagUID) and
221 flagField->flagExists(domainFlagUID)))
224 auto boundaryFlag = flagField->getFlag(boundaryFlagUID);
225 auto domainFlag = flagField->getFlag(domainFlagUID);
227 auto inner = flagField->xyzSize();
228 inner.expand(cell_idx_t(-1));
230 indexVectorAll.clear();
231 indexVectorInner.clear();
232 indexVectorOuter.clear();
234 auto flagWithGLayers = flagField->xyzSizeWithGhostLayer();
235 for (
auto it = flagField->beginWithGhostLayerXYZ(); it != flagField->end();
238 if (!isFlagSet(it, boundaryFlag))
240 if (flagWithGLayers.contains(it.x() + cell_idx_c(0),
241 it.y() + cell_idx_c(0),
242 it.z() + cell_idx_c(0)) &&
243 isFlagSet(it.neighbor(0, 0, 0, 0), domainFlag)) {
245 auto element =
IndexInfo(it.x(), it.y(), it.z(), 0);
247 indexVectorAll.emplace_back(element);
248 if (
inner.contains(it.x(), it.y(), it.z()))
249 indexVectorInner.emplace_back(element);
251 indexVectorOuter.emplace_back(element);