HermesCommon  3.0
Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar > Class Template Reference

#include <algebra_mixins.h>

+ Inheritance diagram for Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >:

Public Member Functions

 MatrixRhsOutput ()
 
void process_matrix_output (Hermes::Algebra::SparseMatrix< Scalar > *matrix, int iteration)
 Processes the matrix.
 
void process_matrix_output (Hermes::Algebra::SparseMatrix< Scalar > *matrix)
 
void process_vector_output (Hermes::Algebra::Vector< Scalar > *rhs, int iteration)
 Processes the matrix.
 
void process_vector_output (Hermes::Algebra::Vector< Scalar > *rhs)
 
void output_matrix (bool only_last_iteration=true, int firstIterations=-1)
 
void set_print_zero_matrix_entries (bool to_set)
 Sets this instance to output matrix entries even though they are zero or not.
 
void set_matrix_filename (std::string name)
 
void set_matrix_varname (std::string name)
 
void set_matrix_export_format (Hermes::Algebra::MatrixExportFormat format)
 
void set_matrix_number_format (char *number_format)
 
void output_rhs (bool only_last_iteration=true, int firstIterations=-1)
 
void set_rhs_filename (std::string name)
 
void set_rhs_varname (std::string name)
 
void set_rhs_export_format (Hermes::Algebra::MatrixExportFormat format)
 
void set_rhs_number_format (char *number_format)
 

Protected Attributes

bool print_matrix_zero_values
 
bool output_matrixOn
 
bool only_lastMatrixIteration
 
int output_matrixIterations
 
std::string matrixFilename
 
std::string matrixVarname
 
Hermes::Algebra::MatrixExportFormat matrixFormat
 
char * matrix_number_format
 
bool output_rhsOn
 
bool only_lastRhsIteration
 
int output_rhsIterations
 
std::string RhsFilename
 
std::string RhsVarname
 
Hermes::Algebra::MatrixExportFormat RhsFormat
 
char * rhs_number_format
 

Detailed Description

template<typename Scalar>
class Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >

Mixin that interfaces linear algebra structures output on higher levels (for solvers).

Definition at line 42 of file algebra_mixins.h.

Constructor & Destructor Documentation

template<typename Scalar >
Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::MatrixRhsOutput ( )

Constructor. Sets defaults (see individual set methods for values of those).

Definition at line 34 of file algebra_mixins.cpp.

Member Function Documentation

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::output_matrix ( bool  only_last_iteration = true,
int  firstIterations = -1 
)

Sets this instance to output the matrix in several first iterations.

Parameters
[in]only_last_iterationIf true, only the last iteration is outputted, and the next parameter is ignored.
[in]firstIterationsOnly during so many first iterations. Default: -1 meaning, that during all iterations, the matrix will be saved.

Definition at line 119 of file algebra_mixins.cpp.

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::output_rhs ( bool  only_last_iteration = true,
int  firstIterations = -1 
)

Sets this instance to output the rhs in several first iterations.

Parameters
[in]only_last_iterationIf true, only the last iteration is outputted, and the next parameter is ignored.
[in]firstIterationsOnly during so many first iterations. Default: -1 meaning, that during all iterations, the rhs will be saved.

Definition at line 155 of file algebra_mixins.cpp.

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::set_matrix_export_format ( Hermes::Algebra::MatrixExportFormat  format)

Sets varname for the matrix Default: "DF_MATLAB_SPARSE - matlab file".

Definition at line 143 of file algebra_mixins.cpp.

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::set_matrix_filename ( std::string  name)

Sets filename for the matrix Default: Matrix_'iteration number' with the ".m" extension in the case of matlab format.

Parameters
[in]namesets the main part of the name, i.e. replacement for "Matrix_" in the default name.

Definition at line 126 of file algebra_mixins.cpp.

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::set_matrix_number_format ( char *  number_format)

Sets number format for the matrix output. Default: "%lf".

Definition at line 149 of file algebra_mixins.cpp.

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::set_matrix_varname ( std::string  name)

Sets varname for the matrix Default: "A".

Definition at line 138 of file algebra_mixins.cpp.

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::set_rhs_export_format ( Hermes::Algebra::MatrixExportFormat  format)

Sets varname for the rhs Default: "DF_MATLAB_SPARSE - matlab file".

Definition at line 172 of file algebra_mixins.cpp.

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::set_rhs_filename ( std::string  name)

Sets filename for the rhs Default: Rhs_'iteration number' with the ".m" extension in the case of matlab format.

Parameters
[in]namesets the main part of the name, i.e. replacement for "Rhs_" in the default name.

Definition at line 162 of file algebra_mixins.cpp.

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::set_rhs_number_format ( char *  number_format)

Sets number format for the vector output. Default: "%lf".

Definition at line 177 of file algebra_mixins.cpp.

template<typename Scalar >
void Hermes::Algebra::Mixins::MatrixRhsOutput< Scalar >::set_rhs_varname ( std::string  name)

Sets varname for the rhs Default: "b".

Definition at line 167 of file algebra_mixins.cpp.


The documentation for this class was generated from the following files: