Skip to content

Get the environment id for a MatVarIndex #922

Description

@DavidDureau

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 ...

Activity

  1. grospelliergilles commented on Oct 11, 2023

    @grospelliergilles
    Member

    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.

  2. grospelliergilles commented on Oct 11, 2023

    @grospelliergilles
    Member

    A preview is available in #925

  3. DavidDureau commented on Oct 12, 2023

    @DavidDureau
    CollaboratorAuthor

    For performance reason, I would prefer a solution with light objects like MatVarIndex, CellLocalId and a MatItemVariableScalarInViewT<Cell,Integer>.

    Would it be possible?

  4. grospelliergilles commented on Oct 12, 2023

    @grospelliergilles
    Member

    Yes. #925 is a temporary solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions