GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
KernelInverse.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
// See LICENSE for details.
4
31
32
#ifndef GPR_LINALG_KERNEL_INVERSE_H_
33
#define GPR_LINALG_KERNEL_INVERSE_H_
34
35
#include <Eigen/Core>
36
37
#include "
../../backend/Macros.h
"
38
39
namespace
gpr
{
40
namespace
linalg
{
41
42
class
KernelInverse
{
43
public
:
44
enum class
Kind
{
45
// The operator's solve / solve_mat run rank-locally on whatever
46
// CPU the caller invokes them on. ProbeExecutor parallelises the
47
// probe loop by partitioning probes round-robin across MPI ranks
48
// and Allreduce-summing the per-rank partial result vectors.
49
RankLocal
,
50
// The operator's solve / solve_mat are MPI collectives (e.g. the
51
// ScaLAPACK pdtrsm path). ProbeExecutor runs the probe loop on
52
// every rank because all ranks must enter each solve together.
53
Distributed
,
54
};
55
56
virtual
~KernelInverse
() =
default
;
57
61
[[nodiscard]]
virtual
Kind
kind
() const noexcept = 0;
62
64
[[nodiscard]] virtual
Eigen
::VectorXd
solve
(
65
const
Eigen
::VectorXd& b) const = 0;
66
68
[[nodiscard]] virtual
EigenMatrix
solve_mat
(const
EigenMatrix
& B) const = 0;
69
71
[[nodiscard]] virtual
double
log_det
() const = 0;
72
81
[[nodiscard]] virtual
double
trace_inv_times
(
82
const
EigenMatrix
& A) const = 0;
83
};
84
85
}
// namespace linalg
86
}
// namespace gpr
87
88
#endif
// GPR_LINALG_KERNEL_INVERSE_H_
Macros.h
gpr::linalg::KernelInverse
Definition
KernelInverse.h:42
gpr::linalg::KernelInverse::trace_inv_times
virtual double trace_inv_times(const EigenMatrix &A) const =0
gpr::linalg::KernelInverse::solve_mat
virtual EigenMatrix solve_mat(const EigenMatrix &B) const =0
Solve K X = B for a multi right-hand side.
gpr::linalg::KernelInverse::log_det
virtual double log_det() const =0
Returns the log determinant of K.
gpr::linalg::KernelInverse::~KernelInverse
virtual ~KernelInverse()=default
gpr::linalg::KernelInverse::kind
virtual Kind kind() const noexcept=0
gpr::linalg::KernelInverse::Kind
Kind
Definition
KernelInverse.h:44
gpr::linalg::KernelInverse::Kind::Distributed
@ Distributed
Definition
KernelInverse.h:53
gpr::linalg::KernelInverse::Kind::RankLocal
@ RankLocal
Definition
KernelInverse.h:49
gpr::linalg::KernelInverse::solve
virtual Eigen::VectorXd solve(const Eigen::VectorXd &b) const =0
Solve K x = b for a single right-hand side.
Eigen
Definition
CountedReal.h:166
gpr::linalg
Dense and structured linear algebra behind the GP: Cholesky and eigen solvers, linear operators,...
Definition
ConditionedKernel.h:14
gpr
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition
Macros.h:16
gpr::EigenMatrix
Eigen::Matrix< double, EigenDynamic, EigenDynamic, EigenMatrixStorage > EigenMatrix
Definition
Macros.h:20
gpr
linalg
KernelInverse.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf