Canoe
Comprehensive Atmosphere N' Ocean Engine
|
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include <configure.hpp>
#include <athena/athena.hpp>
Go to the source code of this file.
Typedefs | |
using | DataVector = std::map< std::string, std::vector< double > > |
Functions | |
bool | FileExists (std::string fname) |
test file existance More... | |
bool | IsBlankLine (char const *line) |
test a blank line More... | |
bool | IsBlankLine (std::string const &line) |
std::string | DecommentFile (std::string fname) |
decomment a file More... | |
int | GetNumCols (std::string fname, char c=' ') |
get number of columns in a data table More... | |
int | GetNumRows (std::string fname) |
get number of rows in a data table More... | |
void | replaceChar (char *buf, char c_old, char c_new) |
replace a character in a string More... | |
char * | StripLine (char *line) |
char * | NextLine (char *line, int num, FILE *stream) |
void | read_data_table (char const *fname, double **data, int *rows, int *cols) |
void | ReadDataTable (AthenaArray< Real > *data, std::string fname, char c=' ') |
DataVector | read_data_vector (std::string fname) |
using DataVector = std::map<std::string, std::vector<double> > |
Definition at line 43 of file fileio.hpp.
bool FileExists | ( | std::string | fname | ) |
test file existance
Definition at line 16 of file fileio.cpp.
bool IsBlankLine | ( | char const * | line | ) |
test a blank line
Definition at line 21 of file fileio.cpp.
bool IsBlankLine | ( | std::string const & | line | ) |
Definition at line 28 of file fileio.cpp.
std::string DecommentFile | ( | std::string | fname | ) |
decomment a file
Definition at line 30 of file fileio.cpp.
int GetNumCols | ( | std::string | fname, |
char | c = ' ' |
||
) |
get number of columns in a data table
Definition at line 50 of file fileio.cpp.
int GetNumRows | ( | std::string | fname | ) |
get number of rows in a data table
Definition at line 62 of file fileio.cpp.
void replaceChar | ( | char * | buf, |
char | c_old, | ||
char | c_new | ||
) |
replace a character in a string
Definition at line 71 of file fileio.cpp.
char* StripLine | ( | char * | line | ) |
Definition at line 77 of file fileio.cpp.
char* NextLine | ( | char * | line, |
int | num, | ||
FILE * | stream | ||
) |
Definition at line 93 of file fileio.cpp.
void read_data_table | ( | char const * | fname, |
double ** | data, | ||
int * | rows, | ||
int * | cols | ||
) |
Definition at line 10 of file read_data_table.cpp.
void ReadDataTable | ( | AthenaArray< Real > * | data, |
std::string | fname, | ||
char | c = ' ' |
||
) |
Definition at line 35 of file read_data_table.cpp.
DataVector read_data_vector | ( | std::string | fname | ) |
Definition at line 102 of file fileio.cpp.