From 64c2869d4e2e7f6b041e019a9d0c584f94919cab Mon Sep 17 00:00:00 2001 From: Corentin Prigent Date: Tue, 5 Mar 2024 17:13:52 +0100 Subject: [PATCH] added cast to MMG5_int for max number of entities in MMG2D and MMGS --- src/mmg2d/zaldy_2d.c | 4 ++-- src/mmgs/zaldy_s.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mmg2d/zaldy_2d.c b/src/mmg2d/zaldy_2d.c index 4686ca2de..3489dbc0a 100644 --- a/src/mmg2d/zaldy_2d.c +++ b/src/mmg2d/zaldy_2d.c @@ -238,8 +238,8 @@ int MMG2D_memOption(MMG5_pMesh mesh) { mesh->memMax = MMG5_memSize(); - mesh->npmax = MG_MAX(1.5*mesh->np,MMG2D_NPMAX); - mesh->ntmax = MG_MAX(1.5*mesh->nt,MMG2D_NEMAX); + mesh->npmax = MG_MAX((MMG5_int)(1.5*mesh->np),MMG2D_NPMAX); + mesh->ntmax = MG_MAX((MMG5_int)(1.5*mesh->nt),MMG2D_NEMAX); mesh->namax = mesh->na; return MMG2D_memOption_memSet(mesh); diff --git a/src/mmgs/zaldy_s.c b/src/mmgs/zaldy_s.c index cb1ea4ff4..a4f079042 100644 --- a/src/mmgs/zaldy_s.c +++ b/src/mmgs/zaldy_s.c @@ -206,8 +206,8 @@ int MMGS_memOption(MMG5_pMesh mesh) { mesh->memMax = MMG5_memSize(); - mesh->npmax = MG_MAX(1.5*mesh->np,MMGS_NPMAX); - mesh->ntmax = MG_MAX(1.5*mesh->nt,MMGS_NTMAX); + mesh->npmax = MG_MAX((MMG5_int)(1.5*mesh->np),MMGS_NPMAX); + mesh->ntmax = MG_MAX((MMG5_int)(1.5*mesh->nt),MMGS_NTMAX); return MMGS_memOption_memSet(mesh); }