Fixed issue with volume in triangles #56

Merged
JorgeGonz merged 1 commit from issue/triangles into development 2025-10-11 14:01:29 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 55e062a9ef - Show all commits

Fixed issue with volume in triangles

The right value in 2D Cartesian is used for calculating the volume.
Jorge Gonzalez 2025-10-11 14:00:16 +02:00

View file

@ -968,9 +968,9 @@ MODULE moduleInput
!Read the 0D mesh !Read the 0D mesh
CALL mesh%readMesh(pathMeshParticle) CALL mesh%readMesh(pathMeshParticle)
!Get the volumne !Get the volume
CALL config%get(object // '.volume', volume, found) CALL config%get(object // '.volume', volume, found)
!Rescale the volumne !Rescale the volume
IF (found) THEN IF (found) THEN
mesh%cells(1)%obj%volume = mesh%cells(1)%obj%volume*volume / Vol_ref mesh%cells(1)%obj%volume = mesh%cells(1)%obj%volume*volume / Vol_ref
mesh%nodes(1)%obj%v = mesh%cells(1)%obj%volume mesh%nodes(1)%obj%v = mesh%cells(1)%obj%volume

View file

@ -577,7 +577,7 @@ MODULE moduleMesh2DCart
fPsi = self%fPsi(Xi, 4) fPsi = self%fPsi(Xi, 4)
!Compute total volume of the cell !Compute total volume of the cell
self%volume = detJ*4.D0/L_ref self%volume = detJ*4.D0
!Compute volume per node !Compute volume per node
self%n1%v = self%n1%v + fPsi(1)*self%volume self%n1%v = self%n1%v + fPsi(1)*self%volume
self%n2%v = self%n2%v + fPsi(2)*self%volume self%n2%v = self%n2%v + fPsi(2)*self%volume