DOLFINx
0.1.0
DOLFINx C++ interface
|
41 Table(std::string title =
"",
bool right_justify =
true);
62 void set(std::string row, std::string col,
63 std::variant<std::string, int, double> value);
69 std::variant<std::string, int, double>
get(std::string row,
70 std::string col)
const;
82 std::string
str()
const;
86 std::vector<std::string> _rows, _cols;
89 std::map<std::pair<std::string, std::string>,
90 std::variant<std::string, int, double>>
Table & operator=(const Table &table)=default
Assignment operator.
std::string str() const
Return string representation of the table.
Definition: Table.cpp:193
Table(std::string title="", bool right_justify=true)
Create empty table.
Definition: Table.cpp:34
This class provides storage and pretty-printing for tables. Example usage:
Definition: Table.h:28
Table reduce(MPI_Comm comm, Reduction reduction) const
Do MPI reduction on Table.
Definition: Table.cpp:70
~Table()=default
Destructor.
Reduction
Types of MPI reduction available for Table, to get the max, min or average values over an MPI_Comm.
Definition: Table.h:33
std::variant< std::string, int, double > get(std::string row, std::string col) const
Get value of table entry.
Definition: Table.cpp:56
std::string name
Table name.
Definition: Table.h:79
void set(std::string row, std::string col, std::variant< std::string, int, double > value)
Set table entry.
Definition: Table.cpp:40