KASKADE 7 development version
|
Input and Output functionality. More...
Modules | |
Grid input | |
Grid creation or input. | |
Entropy coding | |
Tools for entropy coding, i.e. storing sequences of symbols with different frequencies in a (small) bitstream. | |
Classes | |
struct | Kaskade::IoOptions |
options for VTK/AMIRA output More... | |
class | Kaskade::TimeSeriesVTKWriter |
Functions | |
template<class Scalar , int n, int m, class Allocator > | |
void | bcrsPrint (Dune::BCRSMatrix< Dune::FieldMatrix< Scalar, n, m >, Allocator > const &A, std::ostream &os=std::cout) |
Pretty prints the sparse matrix A to the given output stream. More... | |
template<class Scalar , int n, int m, class Allocator > | |
std::ostream & | operator<< (std::ostream &os, Dune::BCRSMatrix< Dune::FieldMatrix< Scalar, n, m >, Allocator > const &A) |
Pretty prints the sparse matrix A to the given output stream. More... | |
std::string | Kaskade::paddedString (int n, int places=3) |
creates a zero-padded string representation of the given number More... | |
template<class GridView , class Writer , class VariableSet , class Filter , class Options > | |
void | Kaskade::writePartialFile (GridView const &gridView, Writer &writer, VariableSet const &vars, std::string const &filename, Filter const &filter, Options const &options) |
template<class Entry , class Index , class VEntry > | |
void | Kaskade::writeToMatlabBinary (NumaBCRSMatrix< Entry, Index > const &A, Dune::BlockVector< VEntry > const &b, std::string const &basename, std::string const &path, int precision=16) |
Writes the given matrix and vector to an binary file based zero. More... | |
template<class Entry , class Index > | |
void | Kaskade::writeToMatlab (NumaBCRSMatrix< Entry, Index > const &A, std::string const &basename, std::string const &outPath, int precision=16) |
Writes the given matrix to an executable matlab file. More... | |
template<class Entry , class Index , class VEntry > | |
void | Kaskade::writeToMatlab (NumaBCRSMatrix< Entry, Index > const &A, Dune::BlockVector< VEntry > const &b, std::string const &basename, int precision=16) |
Writes the given matrix and vector to an executable matlab file. More... | |
template<class Assembler > | |
void | Kaskade::writeToMatlab (Assembler const &assembler, std::string const &basename, int precision=16) |
template<class Function > | |
void | Kaskade::writeVTK (Function const &f, std::string const &filename, IoOptions options, std::string fname) |
Writes a single finite element function to a VTK file. More... | |
template<class VariableSet > | |
void | Kaskade::writeVTK (VariableSet const &vars, IoOptions options, std::ostream &s) |
Writes a set of finite element functions in VTK XML format to a stream. More... | |
template<class VariableSet > | |
void | Kaskade::writeVTK (VariableSet const &vars, std::string fname, IoOptions const &options) |
Writes a set of finite element functions in VTK XML format to a file. More... | |
Input and Output functionality.
void bcrsPrint | ( | Dune::BCRSMatrix< Dune::FieldMatrix< Scalar, n, m >, Allocator > const & | A, |
std::ostream & | os = std::cout |
||
) |
Pretty prints the sparse matrix A to the given output stream.
Definition at line 799 of file fixdune.hh.
Referenced by operator<<().
std::ostream & operator<< | ( | std::ostream & | os, |
Dune::BCRSMatrix< Dune::FieldMatrix< Scalar, n, m >, Allocator > const & | A | ||
) |
Pretty prints the sparse matrix A to the given output stream.
Definition at line 817 of file fixdune.hh.
std::string Kaskade::paddedString | ( | int | n, |
int | places = 3 |
||
) |
creates a zero-padded string representation of the given number
Use this to construct sequences of filenames.
n | the number to represent as string |
places | the total number of digits |
Referenced by Kaskade::TimeSeriesVTKWriter::add(), and Kaskade::VariableSetDescription< SpaceList, VariableList >::makeVariableSetDescription().
void Kaskade::writePartialFile | ( | GridView const & | gridView, |
Writer & | writer, | ||
VariableSet const & | vars, | ||
std::string const & | filename, | ||
Filter const & | filter, | ||
Options const & | options | ||
) |
Writes a subset of variables contained in the variable set vars with names taken from the description to an Amira or VTK XML file with the name specified by filename. The subset is specified by the STL predicate filter working on the variable names.
gridView | GridView, i.e. LeafGridView |
writer | writer for mesh data and solution data, e.g., LeafAmiraMeshWriter, VTKWriter |
vars | data of variables |
filename | name of output file |
filter | filter for selecting variables to be written |
options | defines the format for the output,e.g., ascii/binary |
Definition at line 191 of file iobase.hh.
Referenced by Kaskade::writeAMIRAFile().
void Kaskade::writeToMatlab | ( | Assembler const & | assembler, |
std::string const & | basename, | ||
int | precision = 16 |
||
) |
Writes the assembled matrix and right hand side of a VariationalFunctionalAssembler to the given file. The contents is a Matlab function that can be executed. The file extension .m is appended automatically.
[in] | assembler | a VariationalFunctionalAssembler containing the matrix and the right hand side |
[in] | basename | the file name to be written to. A ".m" suffix is appended automatically. |
[in] | precision | the number of valid decimal digits written for each scalar |
void Kaskade::writeToMatlab | ( | NumaBCRSMatrix< Entry, Index > const & | A, |
Dune::BlockVector< VEntry > const & | b, | ||
std::string const & | basename, | ||
int | precision = 16 |
||
) |
void Kaskade::writeToMatlab | ( | NumaBCRSMatrix< Entry, Index > const & | A, |
std::string const & | basename, | ||
std::string const & | outPath, | ||
int | precision = 16 |
||
) |
void Kaskade::writeToMatlabBinary | ( | NumaBCRSMatrix< Entry, Index > const & | A, |
Dune::BlockVector< VEntry > const & | b, | ||
std::string const & | basename, | ||
std::string const & | path, | ||
int | precision = 16 |
||
) |
void Kaskade::writeVTK | ( | Function const & | f, |
std::string const & | filename, | ||
IoOptions | options, | ||
std::string | fname | ||
) |
Writes a single finite element function to a VTK file.
Function | the finite element function type |
[in] | f | the function to plot |
[in] | filename | the name of the output file (.vtu is appended automatically) |
[in] | options | |
[in] | fname | name of the function in the VTK output file. If empty, the filename is used. |
Definition at line 56 of file vtk.hh.
Referenced by Kaskade::TimeSeriesVTKWriter::add(), and Kaskade::writeVTK().
void Kaskade::writeVTK | ( | VariableSet const & | vars, |
IoOptions | options, | ||
std::ostream & | s | ||
) |
Writes a set of finite element functions in VTK XML format to a stream.
vars | a set of finite element functions to write |
options | specifies how the data shall be written |
s | the output stream |
Definition at line 530 of file vtkwriter.hh.
void Kaskade::writeVTK | ( | VariableSet const & | vars, |
std::string | fname, | ||
IoOptions const & | options | ||
) |
Writes a set of finite element functions in VTK XML format to a file.
vars | a set of finite element functions |
fname | file name (without trailing .vtu) |
Note that Paraview can create a time line implicitly from numbered files. Use paddedString for easy creation of numbered file names.
Definition at line 650 of file vtkwriter.hh.