From a06cb417b9e4a1a1a32f78431c09620d107e3bab Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Thu, 16 Jun 2022 01:22:14 +1000 Subject: [PATCH] add fvolumesum to GNUmakefile (#2836) * add fvolumesum to GNUmakefile and CMakeLists.txt * initialize vol as NAN --- Tools/Plotfile/CMakeLists.txt | 1 + Tools/Plotfile/GNUmakefile | 1 + Tools/Plotfile/fvolumesum.cpp | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Tools/Plotfile/CMakeLists.txt b/Tools/Plotfile/CMakeLists.txt index caf1450646d..44f99d9523c 100644 --- a/Tools/Plotfile/CMakeLists.txt +++ b/Tools/Plotfile/CMakeLists.txt @@ -15,6 +15,7 @@ set(_exe_names fsnapshot ftime fvarnames + fvolumesum ) # Build targets one by one diff --git a/Tools/Plotfile/GNUmakefile b/Tools/Plotfile/GNUmakefile index 704a42559b3..336dc59f212 100644 --- a/Tools/Plotfile/GNUmakefile +++ b/Tools/Plotfile/GNUmakefile @@ -21,6 +21,7 @@ ifeq ($(strip $(programs)),) programs += fsnapshot programs += ftime programs += fvarnames + programs += fvolumesum endif include $(AMREX_HOME)/Tools/GNUMake/Make.defs diff --git a/Tools/Plotfile/fvolumesum.cpp b/Tools/Plotfile/fvolumesum.cpp index e12418254f4..0451ec3e792 100644 --- a/Tools/Plotfile/fvolumesum.cpp +++ b/Tools/Plotfile/fvolumesum.cpp @@ -120,7 +120,7 @@ void main_main() problo[2]+static_cast(k+0.5)*dx[2])}; // compute the volume - Real vol; + Real vol = std::numeric_limits::quiet_NaN(); if (coord == 0) { // Cartesian vol = 1.0_rt; @@ -163,7 +163,7 @@ void main_main() problo[2]+static_cast(k+0.5)*dx[2])}; // compute the volume - Real vol; + Real vol = std::numeric_limits::quiet_NaN(); if (coord == 0) { // Cartesian vol = 1.0_rt;