Hello everyone,
I’m trying the integrateProcessingFunctional for the MultiLevelCoupling3D. For example, I’d like to compute velocity and then use the velocity to compute other quantities every step. Therefore, I learned the gridrefinment3d cases and set my cases as:
std::auto_ptr<MultiLevelTensorField3D<T, 3>> velocity = generateMultiLevelTensorField3D<T, 3>(lattices.getOgs(), coarsestBoundingBox, levelOfDomain, Array<T, 3>(0.0, 0.0, 0.0));
std::map<plint, bool> useExecuteInternalProcessors;
for (plint iLevel = 0; iLevel <= param.finestLevel; iLevel++)
{
useExecuteInternalProcessors[iLevel] = false;
}
std::vector<std::vector<plint>> ids;
std::vector<std::vector<std::vector<T>>> results(param.finestLevel + 1);
const plint statsId = -200;
bool computeStats = false;
// main loop
for (plint iT = iniIter; iT < iniIter+1000; ++iT)
{
lattices.collideAndStream(0, useExecuteInternalProcessors, extProcFunIds, computeStats, statsId, ids, results);
if (iT == iniIter + 1)
{
plint compFields = -100;
integrateProcessingFunctional(
new BoxVelocityFunctional3D<T, DESCRIPTOR>(), coarsestBoundingBox, 0, lattices, *velocity, compFields);
extProcFunIds.push_back(compFields);
}
}
But it did not work. The velocity is always zero. It seems that the integrateProcessingFunctional was not implemented.
I don’t know what’s the problem.
And, in the gridrefinement3d case, I don’t know why compFields = -100? I think that compFields is the level for integrateProcessingFunctional, but the user guide says that the level should be no less than 0.
About other parameters in the collideAndStream, I think extProcFunIds are the vector of the level ID of the integrateProcessingFunctional, that should be implemented. Is that right? And what does computeStats, statsId, ids, results mean?
Thank you.
best wishes,
steed188