The ParaMonte Documentation Website
Current view: top level - kernel - ParaMCMC_mod.f90 (source / functions) Hit Total Coverage
Test: ParaMonte 1.5.1 :: Coarray Parallel Kernel - Code Coverage Report Lines: 3 3 100.0 %
Date: 2021-01-08 12:59:07 Functions: 1 1 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 This module implements the [ParaMCMC_type](@ref paramcmc_mod::paramcmc_type) class and its constructor.
      44             : !>  \author Amir Shahmoradi
      45             : 
      46             : module ParaMCMC_mod
      47             : 
      48             :     use Constants_mod, only: RK, IK
      49             :     use SpecMCMC_mod, only: SpecMCMC_type
      50             :     use ParaMonte_mod, only: ParaMonte_type, ParaMonteLogFuncMode_type, ParaMonteStatistics_type, Moment_type
      51             :     use ParaMCMCRefinedChain_mod, only: RefinedChain_type
      52             :     implicit none
      53             : 
      54             :     character(*), parameter                     :: MODULE_NAME = "@ParaMCMC_mod"
      55             : 
      56             :     type                                        :: ParaMCMC_Chain_type
      57             :         integer(IK)                             :: compact, verbose
      58             :     end type ParaMCMC_Chain_type
      59             : 
      60             :     type, extends(ParaMonteLogFuncMode_type)    :: ParaMCMC_LogFuncMode_type
      61             :         type(ParaMCMC_Chain_type)               :: Loc
      62             :     end type ParaMCMC_LogFuncMode_type
      63             : 
      64             :     type, extends(ParaMonteStatistics_type)     :: ParaMCMC_Statistics_type
      65             :         type(Moment_type)                       :: Chain
      66             :         type(ParaMCMC_Chain_type)               :: BurninLoc
      67             :         type(ParaMCMC_LogFuncMode_type)         :: LogFuncMode
      68             :     end type ParaMCMC_Statistics_type
      69             : 
      70             :     !> The `ParaMCMC_type` class.
      71             :     type, extends(ParaMonte_type)               :: ParaMCMC_type
      72             :        type(RefinedChain_type)                  :: RefinedChain
      73             :        type(SpecMCMC_type)                      :: SpecMCMC
      74             :     contains
      75             :         procedure, pass                         :: setupParaMCMC
      76             :     end type ParaMCMC_type
      77             : 
      78             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      79             : 
      80             : contains
      81             : 
      82             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      83             : 
      84             :     !> Setup the properties of the ParaMCMC parent sampler.
      85             :     !>
      86             :     !> @param[inout] PMPM : An object of class [ParaMCMC_type](@ref paramcmc_type).
      87        1047 :     subroutine setupParaMCMC(PMPM)
      88             : #if INTEL_COMPILER_ENABLED && defined DLL_ENABLED && (OS_IS_WINDOWS || defined OS_IS_DARWIN)
      89             :         !DEC$ ATTRIBUTES DLLEXPORT :: setupParaMCMC
      90             : #endif
      91             :         use SpecMCMC_mod, only: SpecMCMC_type
      92             :         implicit none
      93             :         class(ParaMCMC_type), intent(inout)    :: PMPM
      94             :         character(*), parameter :: PROCEDURE_NAME = "@setupParaMCMC()"
      95        1047 :         PMPM%SpecMCMC = SpecMCMC_type(nd=PMPM%nd%val,methodName=PMPM%name)
      96        1047 :     end subroutine setupParaMCMC
      97             : 
      98             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      99             : 
     100             : end module ParaMCMC_mod ! LCOV_EXCL_LINE

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