8 #ifndef TEST_ASSIMILATION_SPECTRALLMP_H_
9 #define TEST_ASSIMILATION_SPECTRALLMP_H_
15 #define ECKIT_TESTING_SELF_REGISTER_CASES 0
17 #include "eckit/config/LocalConfiguration.h"
18 #include "eckit/testing/Test.h"
23 #include "oops/util/Expect.h"
24 #include "oops/util/FloatCompare.h"
35 std::vector<std::unique_ptr<Vector3D>> hvecs;
36 std::vector<std::unique_ptr<Vector3D>> vvecs;
37 std::vector<std::unique_ptr<Vector3D>> zvecs;
38 std::vector<double> alphas;
39 std::vector<double> betas;
42 hvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 1, 1)));
43 hvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 1, 1)));
44 hvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 1, 1)));
45 vvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 1, 1)));
46 vvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 1, 1)));
47 vvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 1, 1)));
48 zvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 1, 1)));
49 zvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 1, 1)));
50 zvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 1, 1)));
52 alphas.push_back(1.0);
53 alphas.push_back(1.0);
57 spectralLMP.
update(vvecs, hvecs, zvecs, alphas, betas);
70 hvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(10, 1, -10)));
71 hvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 10, 100)));
72 hvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(-5, 5, 20)));
73 vvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 3, 11)));
74 vvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(-1, 2, 100)));
75 vvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(6, 77, 7)));
76 zvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 10, 1)));
77 zvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(1, 21, 21)));
78 zvecs.emplace_back(std::unique_ptr<Vector3D>(
new Vector3D(100, 3, 70)));
80 alphas.push_back(1000.0);
81 alphas.push_back(33.0);
82 betas.push_back(93.0);
85 spectralLMP.
update(vvecs, hvecs, zvecs, alphas, betas);
95 std::string
testid()
const override {
return "test::SpectralLMP";}
98 std::vector<eckit::testing::Test>& ts = eckit::testing::specification();
101 for (
const std::string & testCaseName : conf.keys())
105 ts.emplace_back(
CASE(
"SpectralLMP/" + testCaseName, testCaseConf)
The solvers represent matrices as objects that implement a "multiply" method.
void multiply(const VECTOR &, VECTOR &) const
void update(std::vector< std::unique_ptr< VECTOR >> &, std::vector< std::unique_ptr< VECTOR >> &, std::vector< std::unique_ptr< VECTOR >> &, std::vector< double > &, std::vector< double > &)
std::string testid() const override
void clear() const override
void register_tests() const override
static const eckit::Configuration & config()
void test_SpectralLMP(const eckit::LocalConfiguration &conf)
CASE("test_linearmodelparameterswrapper_valid_name")