From 55e062a9efe5766b628e89f894b187911f1d7a9b Mon Sep 17 00:00:00 2001 From: JGonzalez Date: Sat, 11 Oct 2025 14:00:16 +0200 Subject: [PATCH] Fixed issue with volume in triangles The right value in 2D Cartesian is used for calculating the volume. --- src/modules/init/moduleInput.f90 | 4 ++-- src/modules/mesh/2DCart/moduleMesh2DCart.f90 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/init/moduleInput.f90 b/src/modules/init/moduleInput.f90 index 18c6e65..9a8ace6 100644 --- a/src/modules/init/moduleInput.f90 +++ b/src/modules/init/moduleInput.f90 @@ -968,9 +968,9 @@ MODULE moduleInput !Read the 0D mesh CALL mesh%readMesh(pathMeshParticle) - !Get the volumne + !Get the volume CALL config%get(object // '.volume', volume, found) - !Rescale the volumne + !Rescale the volume IF (found) THEN mesh%cells(1)%obj%volume = mesh%cells(1)%obj%volume*volume / Vol_ref mesh%nodes(1)%obj%v = mesh%cells(1)%obj%volume diff --git a/src/modules/mesh/2DCart/moduleMesh2DCart.f90 b/src/modules/mesh/2DCart/moduleMesh2DCart.f90 index 126d40c..dcd2128 100644 --- a/src/modules/mesh/2DCart/moduleMesh2DCart.f90 +++ b/src/modules/mesh/2DCart/moduleMesh2DCart.f90 @@ -577,7 +577,7 @@ MODULE moduleMesh2DCart fPsi = self%fPsi(Xi, 4) !Compute total volume of the cell - self%volume = detJ*4.D0/L_ref + self%volume = detJ*4.D0 !Compute volume per node self%n1%v = self%n1%v + fPsi(1)*self%volume self%n2%v = self%n2%v + fPsi(2)*self%volume