QMCPACK
NaNguard.h
Go to the documentation of this file.
1
//////////////////////////////////////////////////////////////////////////////////////
2
// This file is distributed under the University of Illinois/NCSA Open Source License.
3
// See LICENSE file in top directory for details.
4
//
5
// Copyright (c) 2023 QMCPACK developers.
6
//
7
// File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8
//
9
// File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10
//////////////////////////////////////////////////////////////////////////////////////
11
12
13
#ifndef QMCPLUSPLUS_NANGUARD_H
14
#define QMCPLUSPLUS_NANGUARD_H
15
16
#include "
Configuration.h
"
17
18
namespace
qmcplusplus
19
{
20
21
class
NaNguard
22
{
23
using
PsiValue
=
QMCTraits::QTFull::ValueType
;
24
using
GradType
=
QMCTraits::GradType
;
25
26
public
:
27
/** check if ratio is NaN and throw an error if yes.
28
* @param ratio psi ratio to be checked
29
* @param message printout to indicate what the issue is.
30
*/
31
static
void
checkOneParticleRatio
(
const
PsiValue
& ratio,
const
std::string_view info);
32
33
/** check if any gradient component (x,y,z) is NaN and throw an error if yes.
34
* @param grads gradients to be checked
35
* @param message printout to indicate what the issue is.
36
*/
37
static
void
checkOneParticleGradients
(
const
GradType
& grads,
const
std::string_view info);
38
};
39
}
// namespace qmcplusplus
40
#endif
qmcplusplus::NaNguard::PsiValue
QMCTraits::QTFull::ValueType PsiValue
Definition:
NaNguard.h:23
qmcplusplus::TinyVector
Fixed-size array.
Definition:
OhmmsTinyMeta.h:30
qmcplusplus
helper functions for EinsplineSetBuilder
Definition:
Configuration.h:43
qmcplusplus::QMCTraits::GradType
QTBase::GradType GradType
Definition:
Configuration.h:62
qmcplusplus::QMCTypes::ValueType
RealType ValueType
Definition:
QMCTypes.h:42
qmcplusplus::NaNguard
Definition:
NaNguard.h:21
Configuration.h
qmcplusplus::NaNguard::checkOneParticleRatio
static void checkOneParticleRatio(const PsiValue &ratio, const std::string_view info)
check if ratio is NaN and throw an error if yes.
Definition:
NaNguard.cpp:18
qmcplusplus::NaNguard::checkOneParticleGradients
static void checkOneParticleGradients(const GradType &grads, const std::string_view info)
check if any gradient component (x,y,z) is NaN and throw an error if yes.
Definition:
NaNguard.cpp:29
src
QMCWaveFunctions
NaNguard.h
Generated on Fri Jun 28 2024 10:45:27 for QMCPACK by
1.8.14