From a8a111a88a9443cd183d349df0080f53fb694902 Mon Sep 17 00:00:00 2001 From: "CombustionLab.POSTECH" Date: Tue, 20 Aug 2019 23:58:55 +0900 Subject: [PATCH] functions for positive and negative only filters --- code/m_calculate.f90 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/code/m_calculate.f90 b/code/m_calculate.f90 index e2e7519..b1ef3f9 100644 --- a/code/m_calculate.f90 +++ b/code/m_calculate.f90 @@ -252,4 +252,28 @@ contains end function threshold_min_max + real function positive (c) + + real :: c + + if (c > 0.0d0) then + positive = c + else + positive = 0. + end if + + end function positive + + real function negative (c) + + real :: c + + if (c < 0.0d0) then + negative = c + else + negative = 0. + end if + + end function negative + end module m_calculate