The ParaMonte Documentation Website
Current view: top level - kernel - SpecBase_SilentModeRequested_mod.f90 (source / functions) Hit Total Coverage
Test: ParaMonte 1.5.1 :: Coarray Parallel Kernel - Code Coverage Report Lines: 12 12 100.0 %
Date: 2021-01-08 12:59:07 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       2             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       3             : !!!!
       4             : !!!!   MIT License
       5             : !!!!
       6             : !!!!   ParaMonte: plain powerful parallel Monte Carlo library.
       7             : !!!!
       8             : !!!!   Copyright (C) 2012-present, The Computational Data Science Lab
       9             : !!!!
      10             : !!!!   This file is part of the ParaMonte library.
      11             : !!!!
      12             : !!!!   Permission is hereby granted, free of charge, to any person obtaining a 
      13             : !!!!   copy of this software and associated documentation files (the "Software"), 
      14             : !!!!   to deal in the Software without restriction, including without limitation 
      15             : !!!!   the rights to use, copy, modify, merge, publish, distribute, sublicense, 
      16             : !!!!   and/or sell copies of the Software, and to permit persons to whom the 
      17             : !!!!   Software is furnished to do so, subject to the following conditions:
      18             : !!!!
      19             : !!!!   The above copyright notice and this permission notice shall be 
      20             : !!!!   included in all copies or substantial portions of the Software.
      21             : !!!!
      22             : !!!!   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
      23             : !!!!   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
      24             : !!!!   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
      25             : !!!!   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
      26             : !!!!   DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
      27             : !!!!   OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
      28             : !!!!   OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
      29             : !!!!
      30             : !!!!   ACKNOWLEDGMENT
      31             : !!!!
      32             : !!!!   ParaMonte is an honor-ware and its currency is acknowledgment and citations.
      33             : !!!!   As per the ParaMonte library license agreement terms, if you use any parts of 
      34             : !!!!   this library for any purposes, kindly acknowledge the use of ParaMonte in your 
      35             : !!!!   work (education/research/industry/development/...) by citing the ParaMonte 
      36             : !!!!   library as described on this page:
      37             : !!!!
      38             : !!!!       https://github.com/cdslaborg/paramonte/blob/main/ACKNOWLEDGMENT.md
      39             : !!!!
      40             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      41             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      42             : 
      43             : !> \brief
      44             : !> This module contains the classes and procedures for setting up the `silentModeRequested` attribute of ParaMonte samplers.
      45             : !> For more information, see the description of this attribute in the body of the module.
      46             : !> \author Amir Shahmoradi
      47             : 
      48             : module SpecBase_SilentModeRequested_mod
      49             : 
      50             :     implicit none
      51             : 
      52             :     ! namelist input
      53             :     logical                         :: silentModeRequested
      54             : 
      55             :     type                            :: SilentModeRequested_type
      56             :         logical                     :: val
      57             :         logical                     :: def
      58             :         logical                     :: isFalse
      59             :         character(:), allocatable   :: desc
      60             :     contains
      61             :         procedure, pass             :: set => setSilentModeRequested, nullifyNameListVar
      62             :     end type SilentModeRequested_type
      63             : 
      64             :     interface SilentModeRequested_type
      65             :         module procedure            :: constructSilentModeRequested
      66             :     end interface SilentModeRequested_type
      67             : 
      68             :     private :: constructSilentModeRequested, setSilentModeRequested
      69             : 
      70             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      71             : 
      72             : contains
      73             : 
      74             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      75             : 
      76        1047 :     function constructSilentModeRequested(methodName) result(SilentModeRequestedObj)
      77             : #if INTEL_COMPILER_ENABLED && defined DLL_ENABLED && (OS_IS_WINDOWS || defined OS_IS_DARWIN)
      78             :         !DEC$ ATTRIBUTES DLLEXPORT :: constructSilentModeRequested
      79             : #endif
      80             :         use String_mod, only: log2str
      81             :         implicit none
      82             :         character(*), intent(in)        :: methodName
      83             :         type(SilentModeRequested_type) :: SilentModeRequestedObj
      84        1047 :         SilentModeRequestedObj%def = .false.
      85        1047 :         SilentModeRequestedObj%isFalse = .true.
      86             :         SilentModeRequestedObj%desc = &
      87             :         "A logical (boolean) variable. If TRUE (or .true. or true or .t. from within an input file), then the following contents &
      88             :         &will not be printed in the output report file of " // methodName // ":\n\n&
      89             :         &    + " // methodName // " interface, compiler, and platform specifications.\n&
      90             :         &    + " // methodName // " simulation specification-descriptions.\n\n&
      91             :         &Setting this variable to true may break the functionality of the report-file parser methods of the ParaMonte library in &
      92        1047 :         &high-level languages (e.g., MATLAB, Python, R, ...). The default value is " // log2str(SilentModeRequestedObj%def) // "."
      93        1047 :     end function constructSilentModeRequested
      94             : 
      95             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      96             : 
      97        1047 :     subroutine nullifyNameListVar(SilentModeRequestedObj)
      98             : #if INTEL_COMPILER_ENABLED && defined DLL_ENABLED && (OS_IS_WINDOWS || defined OS_IS_DARWIN)
      99             :         !DEC$ ATTRIBUTES DLLEXPORT :: nullifyNameListVar
     100             : #endif
     101             :         implicit none
     102             :         class(SilentModeRequested_type), intent(in) :: SilentModeRequestedObj
     103        1047 :         silentModeRequested = SilentModeRequestedObj%def
     104        2094 :     end subroutine nullifyNameListVar
     105             : 
     106             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     107             : 
     108        1047 :     subroutine setSilentModeRequested(SilentModeRequestedObj,silentModeRequested)
     109             : #if INTEL_COMPILER_ENABLED && defined DLL_ENABLED && (OS_IS_WINDOWS || defined OS_IS_DARWIN)
     110             :         !DEC$ ATTRIBUTES DLLEXPORT :: setSilentModeRequested
     111             : #endif
     112             :         implicit none
     113             :         class(SilentModeRequested_type), intent(inout)  :: SilentModeRequestedObj
     114             :         logical, intent(in)                             :: silentModeRequested
     115        1047 :         SilentModeRequestedObj%val = silentModeRequested
     116        1047 :         SilentModeRequestedObj%isFalse = .not. silentModeRequested
     117        2094 :     end subroutine setSilentModeRequested
     118             : 
     119             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     120             : 
     121             : end module SpecBase_SilentModeRequested_mod ! LCOV_EXCL_LINE

ParaMonte: Plain Powerful Parallel Monte Carlo Library 
The Computational Data Science Lab
© Copyright 2012 - 2021