As @jcotela pointed, there are duplicated utilities for normal computation:
The normal computation utils:
https://github.com/KratosMultiphysics/Kratos/blob/master/kratos/utilities/normal_calculation_utils.h
The body normal computation:
And in the mortar utilities:
These were developed by me and are oriented to compute normals for any condition geometry (not only for triangles)
We can open a discussion to agreed a common interface and create a common utilities for the normal computation, and deprecate the current ones.
NORMAL historical or non-historical in order to save memory@loumalouomega there is at least one more method (also for triangles/tetra only):
https://github.com/KratosMultiphysics/Kratos/blob/1714b801d7719de135495d46a71cf71bd22a3fde/kratos/processes/tetrahedral_mesh_orientation_check.h#L34-L41
Is there any trilinos version of these?
No idea about the new ones, but the old ones work in MPI (they assemble the NORMAL variable when required).
Well, do you mind I propose a new common utility and I deprecate the rest?
is this solved?
Nope, yet
Some comments from my side:
there is also a trilinos/mpi version: https://github.com/KratosMultiphysics/Kratos/blob/master/applications/trilinos_application/custom_utilities/mpi_normal_calculation_utilities.h
I think that the new utility should be able to work both with and without mpi otherwise we again have to reimplement stuff multiple times
With the new MPICore this should be doable :+1:
And ofc it should not be restricted to tets/trias
Plus I like the recent work done by @loumalouomega such that sth can be computed historical/non-historical
Some comments from my side:
there is also a trilinos/mpi version: https://github.com/KratosMultiphysics/Kratos/blob/master/applications/trilinos_application/custom_utilities/mpi_normal_calculation_utilities.hI think that the new utility should be able to work both with and without mpi otherwise we again have to reimplement stuff multiple times
With the new MPICore this should be doable +1And ofc it should not be restricted to tets/trias
Plus I like the recent work done by @loumalouomega such that sth can be computed historical/non-historical
I will, when I have the time, sorry for that
@loumalouomega as a first step, I think it would be good if we can have a list of the requirements/features of the eventual utility. In this way, maybe other people could collaborate on it if you do not have the time for it (which I completely understand).
OK, I assume that the methods implemented on normal calculation utilities are the desired ones. What do you think @RiccardoRossi ?
I modified the first comment and started with a list of requirements
Please feel free to add more requirements
Are we still needed in the NormalCalcUtils now that the Geometry can also provide it?
guus, body and surface normals have a different role...and they may play very differently on corners
Are we still needed in the NormalCalcUtils now that the Geometry can also provide it?
As @RiccardoRossi an average normal is not the same as a punctual normal
Most helpful comment
Well, do you mind I propose a new common utility and I deprecate the rest?