Doxygen
1.9.1
|
Class providing manipulation of custom tabulated rules, file I/O and structured access to the points, weights, and meta-data. More...
#include <tsgCoreOneDimensional.hpp>
Public Member Functions | |
CustomTabulated () | |
Default constructor, create an empty table, need to read from file before any other data can be accessed. | |
template<typename iomode > | |
CustomTabulated (std::istream &is, iomode) | |
Read-constructor. | |
CustomTabulated (std::vector< int > &&cnum_nodes, std::vector< int > &&cprecision, std::vector< std::vector< double >> &&cnodes, std::vector< std::vector< double >> &&cweights, std::string &&cdescription) | |
Assume ownership of existing data instead of reading from a file. | |
template<bool useAscii> | |
void | write (std::ostream &os) const |
Write to an already open ASCII/binary file, used in conjunction with GlobalGrid::write() | |
template<bool useAscii> | |
void | read (std::istream &is) |
Read from an already open ASCII/binary file, used in conjunction with GlobalGrid::read() | |
void | read (const char *filename) |
Read from a custom user provided ASCII file, see the file-format section. | |
int | getNumLevels () const |
Returns the number of loaded levels. | |
int | getNumPoints (int level) const |
Returns the number of points associated with the selected level. | |
int | getIExact (int level) const |
Return the exactness of the interpolation rule at level, usually one less than the number of points. | |
int | getQExact (int level) const |
Return the exactness of the integration/quadrature rule at level, provided by the user in the custom file. | |
void | getWeightsNodes (int level, std::vector< double > &w, std::vector< double > &x) const |
Get the points x and quadrature weights w associated with the rule at the level. | |
void | getWeightsNodes (int level, double w[], double x[]) const |
Overload that writes to an array directly rather than a container. For interface purposes mostly, e.g. Python. | |
const char * | getDescription () const |
Returns the user provided human readable description string. | |
Protected Member Functions | |
void | checkLevel (int level, std::string const &op) const |
Throws a std::rumtime_error() if the given level is more than the stored levels, op is used to report the failed operation. | |
Class providing manipulation of custom tabulated rules, file I/O and structured access to the points, weights, and meta-data.