File writer for writing output data to MATLAB .mat files. More...
#include <ptems/io/matlabmatfilewriter.hpp>
Public Types | |
template<typename T > | |
using | ContinuousFunction = std::function< T(const Vector< DIM > &)> |
Type used for an argument denoting a continuous function. More... | |
template<typename T > | |
using | PiecewiseFunction = std::function< T(std::size_t, const Vector< DIM > &)> |
Type used for an argument denoting a piecewise function on a mesh. More... | |
template<typename T > | |
using | PiecewiseConstantFunction = std::function< T(std::size_t)> |
Type used for an argument denoting a piecewise constant function on a mesh. More... | |
Public Member Functions | |
MatlabMATFileWriter (std::ostream &file, const std::shared_ptr< FEMesh< DIM >> &mesh, bool discontinuous) | |
Create object for writing data to a MATLAB .mat file. More... | |
virtual bool | HasError () const override |
Checks if the writer is invalid (as error) More... | |
virtual void | OutputFunction (const std::string &name, const ContinuousFunction< int64_t > &func) override |
Write out a continuous function of integer values. More... | |
virtual void | OutputFunction (const std::string &name, const ContinuousFunction< double > &func) override |
Write out a continuous function of double values. More... | |
virtual void | OutputFunction (const std::string &name, const ContinuousFunction< std::complex< double >> func) override |
Write out a continuous function of complex values. More... | |
virtual void | OutputPiecewiseFunction (const std::string &name, const PiecewiseFunction< int64_t > &func, bool continuous) override |
Write out a piecewise function of integer values which is defined over a mesh (continuous on each element) More... | |
virtual void | OutputPiecewiseFunction (const std::string &name, const PiecewiseFunction< double > &func, bool continuous) override |
Write out a piecewise function of double values which is defined over a mesh (continuous on each element) More... | |
virtual void | OutputPiecewiseFunction (const std::string &name, const PiecewiseFunction< std::complex< double >> &func, bool continuous) override |
Write out a piecewise function of complex values which is defined over a mesh (continuous on each element) More... | |
virtual void | OutputPiecewiseConstantFunction (const std::string &name, const PiecewiseConstantFunction< int64_t > &func) override |
Write out a piecewise constant function of integer values which is defined over a mesh (constant for each each element) More... | |
virtual void | OutputPiecewiseConstantFunction (const std::string &name, const PiecewiseConstantFunction< double > &func) override |
Write out a piecewise constant function of double values which is defined over a mesh (constant for each each element) More... | |
virtual void | OutputPiecewiseConstantFunction (const std::string &name, const PiecewiseConstantFunction< std::complex< double >> &func) override |
Write out a piecewise constant function of complex values which is defined over a mesh (constant for each each element) More... | |
virtual | operator bool () const |
Checks if the writer is still valid. More... | |
template<typename T > | |
void | OutputFunction (const std::string &name, const T &func) |
Write out a continuous function. More... | |
template<typename T > | |
void | OutputPiecewiseFunction (const std::string &name, const T &func, bool continuous) |
Write out a continuous function. More... | |
template<typename T > | |
void | OutputPiecewiseConstantFunction (const std::string &name, const T &func) |
Write out a continuous function. More... | |
File writer for writing output data to MATLAB .mat files.
https://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf
|
inherited |
Type used for an argument denoting a continuous function.
T | The return type of the function |
|
inherited |
Type used for an argument denoting a piecewise constant function on a mesh.
T | The return type of the function |
|
inherited |
Type used for an argument denoting a piecewise function on a mesh.
T | The return type of the function |
|
inline |
Create object for writing data to a MATLAB .mat file.
file | The stream to write to, must be opened in binary mode |
mesh | The mesh to write to the file |
discontinuous | Specifies whether data can be written as discontinuous data |
|
inlineoverridevirtual |
Checks if the writer is invalid (as error)
Implements ptems::DataFileWriter< DIM >.
|
inlineexplicitvirtualinherited |
Checks if the writer is still valid.
|
inlineoverridevirtual |
Write out a continuous function of double values.
name | Name of the function |
func | Functor which takes a point and returns the function value at that point |
Implements ptems::DataFileWriter< DIM >.
|
inlineoverridevirtual |
Write out a continuous function of integer values.
name | Name of the function |
func | Functor which takes a point and returns the function value at that point |
Implements ptems::DataFileWriter< DIM >.
|
inlineoverridevirtual |
Write out a continuous function of complex values.
name | Name of the function |
func | Functor which takes a point and returns the function value at that point |
Implements ptems::DataFileWriter< DIM >.
|
inlineinherited |
Write out a continuous function.
T | Type of the functor |
name | Name of the function |
func | Functor which takes a point and returns the function value at that point |
|
inlineoverridevirtual |
Write out a piecewise constant function of double values which is defined over a mesh (constant for each each element)
name | Name of the function |
func | Functor which takes an element index and returns the constant function value for that element |
Implements ptems::DataFileWriter< DIM >.
|
inlineoverridevirtual |
Write out a piecewise constant function of integer values which is defined over a mesh (constant for each each element)
name | Name of the function |
func | Functor which takes an element index and returns the constant function value for that element |
Implements ptems::DataFileWriter< DIM >.
|
inlineoverridevirtual |
Write out a piecewise constant function of complex values which is defined over a mesh (constant for each each element)
name | Name of the function |
func | Functor which takes an element index and returns the constant function value for that element |
Implements ptems::DataFileWriter< DIM >.
|
inlineinherited |
Write out a continuous function.
T | Type of the functor |
name | Name of the function |
func | Functor which takes a point and returns the function value at that point |
|
inlineoverridevirtual |
Write out a piecewise function of double values which is defined over a mesh (continuous on each element)
name | Name of the function |
func | Functor which takes an element index and a point in the element's local coordinate system and returns the function value at that point |
continuous | Specifies if the function is continuous |
Implements ptems::DataFileWriter< DIM >.
|
inlineoverridevirtual |
Write out a piecewise function of integer values which is defined over a mesh (continuous on each element)
name | Name of the function |
func | Functor which takes an element index and a point in the element's local coordinate system and returns the function value at that point |
continuous | Specifies if the function is continuous |
Implements ptems::DataFileWriter< DIM >.
|
inlineoverridevirtual |
Write out a piecewise function of complex values which is defined over a mesh (continuous on each element)
name | Name of the function |
func | Functor which takes an element index and a point in the element's local coordinate system and returns the function value at that point |
continuous | Specifies if the function is continuous |
Implements ptems::DataFileWriter< DIM >.
|
inlineinherited |
Write out a continuous function.
T | Type of the functor |
name | Name of the function |
func | Functor which takes a point and returns the function value at that point |
continuous | Specifies if the function is continuous |