KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.02k stars 244 forks source link

[Core][Geometries]Triangle2D3 has only one integration point by default #2367

Closed loumalouomega closed 6 years ago

loumalouomega commented 6 years ago

@KratosMultiphysics/technical-committee

https://github.com/KratosMultiphysics/Kratos/blob/c4c4fc35f587a5ccfc0d65d77c8b0a5684c3476f/kratos/geometries/triangle_2d_3.h#L2131

In the other hand the Quadrilateral2D4 uses 4 GP by default:

https://github.com/KratosMultiphysics/Kratos/blob/c4c4fc35f587a5ccfc0d65d77c8b0a5684c3476f/kratos/geometries/quadrilateral_2d_4.h#L1115

philbucher commented 6 years ago

I think this is on purpose Dont the fluid elements rely on this for being fast? @jcotela

loumalouomega commented 6 years ago

This can be configured in the element itself, but in my opinion the default should be the minimum necessary to get a good aproximation in the case of a linear function. Three gauss points for the triangle

loumalouomega commented 6 years ago

In fact the tetrahedra has the same problem

https://github.com/KratosMultiphysics/Kratos/blob/c4c4fc35f587a5ccfc0d65d77c8b0a5684c3476f/kratos/geometries/tetrahedra_3d_4.h#L1808

loumalouomega commented 6 years ago

@jcotela is this on pourpose as @philbucher says?

josep-m-carbonell commented 6 years ago

It is correct, they are the minimum, where is the problem?

loumalouomega commented 6 years ago

Well, I expected to be the same at least the minimal necessary to integrate a linear function

josep-m-carbonell commented 6 years ago

If the primary variable is approached by a linear field, one integration point is the minimum. In quadrilaters, we use four to avoid free energy modes.

loumalouomega commented 6 years ago

OK, I will close this then

jcotela commented 6 years ago

@loumalouomega @philbucher As far as I know, the criteria for the default integration point is "as many as needed to integrate the stiffness matrix for an elastic linear problem/a Poisson equation".

jcotela commented 6 years ago

@loumalouomega since you reopened it, can I ask you to clarify what is your goal with the issue?

The current setup matches the stated "rule": for elements with linear shape functions (triangles/tetras) one gauss point is enough to exactly integrate the stiffness matrix or a Laplacian. For bi-linear elements (quads) you need four, otherwise you get zero energy modes as @josep-m-carbonell is saying.

loumalouomega commented 6 years ago

I reopened because you commented, and I thought that the discussion wasn't finished. I am happy with the answer, so I will close again, sorry for the misunderstood

jcotela commented 6 years ago

@loumalouomega no problem, thanks for clarifying.