Kratos: [Discussion] Unify normal computation utilities

Created on 25 Jun 2018  路  14Comments  路  Source: KratosMultiphysics/Kratos

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:

https://github.com/KratosMultiphysics/Kratos/blob/master/kratos/utilities/body_normal_calculation_utils.h

And in the mortar utilities:

https://github.com/KratosMultiphysics/Kratos/blob/1714b801d7719de135495d46a71cf71bd22a3fde/kratos/utilities/mortar_utilities.h#L418

https://github.com/KratosMultiphysics/Kratos/blob/1714b801d7719de135495d46a71cf71bd22a3fde/kratos/utilities/mortar_utilities.h#L475

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.


List of requirements

  • should work with and without MPI
  • should work for all (or at least the main geometry types not just tri and tet)
  • should be able to compute the NORMAL historical or non-historical in order to save memory
Cleanup Discussion Duplicate Kratos Core

Most helpful comment

Well, do you mind I propose a new common utility and I deprecate the rest?

All 14 comments

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KlausBSautter picture KlausBSautter  路  6Comments

Vahid-Galavi picture Vahid-Galavi  路  4Comments

josep-m-carbonell picture josep-m-carbonell  路  6Comments

najianaslreza picture najianaslreza  路  7Comments

riccardotosi picture riccardotosi  路  7Comments