OGS
LookupTable.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <iterator>
14#include <map>
15#include <vector>
16
17#include "BaseLib/Logging.h"
19
20namespace ProcessLib
21{
22namespace ComponentTransport
23{
25{
26 std::pair<double, double> bounding_points;
27 double value;
28};
29
30struct Field
31{
32 Field(std::vector<std::vector<std::size_t>> point_id_groups_,
33 std::vector<double> seed_points_, std::string name_, int variable_id_)
34 : point_id_groups(std::move(point_id_groups_)),
35 seed_points(std::move(seed_points_)),
36 name(std::move(name_)),
37 variable_id(variable_id_)
38 {
39 }
40
41 std::pair<double, double> getBoundingSeedPoints(double const value) const;
42
43 std::vector<std::vector<std::size_t>> const point_id_groups;
44 std::vector<double> const seed_points;
45 std::string const name;
46 int const variable_id;
47};
48
50{
51 LookupTable(std::vector<Field> input_fields_,
52 std::map<std::string, std::vector<double>>
53 tabular_data_)
54 : input_fields(std::move(input_fields_)),
55 tabular_data(std::move(tabular_data_))
56 {
57 }
58
59 void lookup(std::vector<GlobalVector*> const& x,
60 std::vector<GlobalVector*> const& x_prev,
61 std::size_t const n_nodes) const;
62
63 std::size_t getTableEntryID(std::vector<double> const& entry_input) const;
64
65 std::vector<Field> const input_fields;
66 std::map<std::string, std::vector<double>> const tabular_data;
67};
68} // namespace ComponentTransport
69} // namespace ProcessLib
std::pair< double, double > getBoundingSeedPoints(double const value) const
std::vector< double > const seed_points
Definition LookupTable.h:44
std::vector< std::vector< std::size_t > > const point_id_groups
Definition LookupTable.h:43
Field(std::vector< std::vector< std::size_t > > point_id_groups_, std::vector< double > seed_points_, std::string name_, int variable_id_)
Definition LookupTable.h:32
LookupTable(std::vector< Field > input_fields_, std::map< std::string, std::vector< double > > tabular_data_)
Definition LookupTable.h:51
void lookup(std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, std::size_t const n_nodes) const
std::size_t getTableEntryID(std::vector< double > const &entry_input) const
std::map< std::string, std::vector< double > > const tabular_data
Definition LookupTable.h:66
std::vector< Field > const input_fields
Definition LookupTable.h:65