Currently, when generating traces, we create 3 SharedEntityCommunication objects to exchange Vector, DenseMatrix, and SparseMatrix. All of them take "edge to true edge" table as input, and generate an entity (edge in this case) to proc table entity_proc_ within the object.
https://github.com/LLNL/smoothG/blob/0eca47efc06f45da4c14ed72547fb744ff6d7562/src/sharedentitycommunication.hpp#L345-L440
Is it right that entity_proc_ only needs to be generated once (i.e. it is independent of what type is being exchanged)? If so, can this class be modified to do that? One simple way may be to take the construction of entity_proc_ out of the class and take it as input instead of entity_trueentity. Otherwise, we can also split setup and the actual communication, and only template the communication part. Most likely the second approach will break template structure of the class.
If possible, it's always good to avoid redundant work. Nevertheless, I guess building entity_proc_ is not really that expensive, so if the modification is not easy to make, this issue can be ignored.
Currently, when generating traces, we create 3
SharedEntityCommunicationobjects to exchangeVector,DenseMatrix, andSparseMatrix. All of them take "edge to true edge" table as input, and generate an entity (edge in this case) to proc tableentity_proc_within the object.https://github.com/LLNL/smoothG/blob/0eca47efc06f45da4c14ed72547fb744ff6d7562/src/sharedentitycommunication.hpp#L345-L440
Is it right that
entity_proc_only needs to be generated once (i.e. it is independent of what type is being exchanged)? If so, can this class be modified to do that? One simple way may be to take the construction ofentity_proc_out of the class and take it as input instead ofentity_trueentity. Otherwise, we can also split setup and the actual communication, and only template the communication part. Most likely the second approach will break template structure of the class.If possible, it's always good to avoid redundant work. Nevertheless, I guess building
entity_proc_is not really that expensive, so if the modification is not easy to make, this issue can be ignored.