Get the environment id for a MatVarIndex
In a accelerator loop, we would like to get the environment id for a given MatVarIndex:
CellToAllEnvCellAcessor c2ae(....);
command << RUNCOMMAND_ENUMERATE_CELL_ALLENVCELL(c2ae, cid, cell_group)
{
ENUMERATE_CELL_ALLENVCELL(iev, cid, c2ae) {
Integer env_id = envId(*iev);
func(env_id);
}
};
envId(MatVarIndex) could be a function, a method, or address an MaterialVariableCellInteger managed by Arcane ...
I have looked at this problem. I will provide a workaround for it. I will make some methods of EnvCell and AllEnvCell available on accelerator. It may not be ideal in term of performance because there is a pointer indirection to access the information but it should work.
I will do it last week of October.
A preview is available in #925
For performance reason, I would prefer a solution with light objects like MatVarIndex, CellLocalId and a MatItemVariableScalarInViewT<Cell,Integer>.
Would it be possible?
Yes. #925 is a temporary solution.