GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
ScalapackPDPotrfInverse.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
// See LICENSE for details.
4
44
45
#ifndef GPR_LINALG_SCALAPACK_PDPOTRF_INVERSE_H_
46
#define GPR_LINALG_SCALAPACK_PDPOTRF_INVERSE_H_
47
48
#ifdef GPR_LINALG_SCALAPACK
49
#include <cstdint>
50
#include <memory>
51
#include <vector>
52
53
#include "
CanonicalTriangular.h
"
54
#include "
CholeskyPanels.h
"
55
#include "
KernelInverse.h
"
56
57
namespace
gpr
{
58
namespace
linalg
{
59
60
class
DistributedState
;
61
62
class
ScalapackPDPotrfInverse final :
public
KernelInverse
{
63
public
:
64
ScalapackPDPotrfInverse() =
default
;
65
explicit
ScalapackPDPotrfInverse(std::shared_ptr<DistributedState> state);
67
[[nodiscard]]
bool
factorise(
const
EigenMatrix& covariance);
84
// Knob types match the distributed factorisation input so no narrowing
85
// happens at the call site.
86
[[nodiscard]]
bool
factorise(std::vector<double> K_distributed,
87
const
int
desc[9],
int
n);
88
89
[[nodiscard]]
Kind
kind() const noexcept
override
90
{
91
return
Kind::Distributed;
92
}
93
[[nodiscard]] Eigen::VectorXd solve(
94
const
Eigen::VectorXd& b)
const override
;
95
[[nodiscard]]
EigenMatrix
solve_mat(
const
EigenMatrix& B)
const override
;
96
[[nodiscard]]
double
log_det()
const override
;
97
[[nodiscard]]
double
trace_inv_times(
const
EigenMatrix& A)
const override
;
98
100
[[nodiscard]]
EigenMatrix
lowerFactor()
const
;
101
103
[[nodiscard]] CholeskyPanels lowerFactorPanels()
const
;
104
107
[[nodiscard]]
EigenMatrix
precision()
const
;
108
109
private
:
110
[[nodiscard]] DistributedState& state()
const
;
111
void
require_factor()
const
;
112
113
std::shared_ptr<DistributedState> state_;
114
std::uint64_t grid_generation_ = 0;
115
std::uint64_t factorization_generation_ = 0;
116
std::vector<double> L_dist_{};
117
mutable
canonical::SubstitutionCache substitution_{};
118
int
L_desc_[9] = {};
119
int
n_{0};
120
bool
factored_{
false
};
121
};
122
123
}
// namespace linalg
124
}
// namespace gpr
125
126
#endif
// GPR_LINALG_SCALAPACK
127
128
#endif
// GPR_LINALG_SCALAPACK_PDPOTRF_INVERSE_H_
CanonicalTriangular.h
Triangular solves and Cholesky inverse whose floating-point result does not depend on the process gri...
CholeskyPanels.h
KernelInverse.h
Abstract operator interface for K^{-1} actions used by Laplace Hessian probe loops and Williams-Rasmu...
gpr::linalg::DistributedState
Definition
DistributedState.h:72
gpr::linalg::KernelInverse
Definition
KernelInverse.h:42
gpr::htst::Kind
Kind
Definition
HarmonicPrefactor.h:29
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
ScalapackPDPotrfInverse.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf