Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Member Functions | Private Member Functions | Private Attributes
graphics::DataMatlab Class Reference

Draws a picture of data in Matlab format and stores the result in files. More...

#include <dataMatlab.hh>

Collaboration diagram for graphics::DataMatlab:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DataMatlab (concepts::Space< Real > &spc, const std::string filename, uint dim=2, Real scl=1.0)
 Constructor.
void operator() (const concepts::Vector< Real > &sol)
 Application operator.
 ~DataMatlab ()

Private Member Functions

void closeStreams_ ()
 Closes the streams.
void createStreams_ (std::string filename)
 Create the streams.

Private Attributes

uint cnt_
 Number of vectors written to the files.
uint dim_
 Spatial dimension of the space.
std::auto_ptr< DataMatlabCellmtlb_
std::auto_ptr< std::ofstream > ofs1_
 Streams for coordinates.
std::auto_ptr< std::ofstream > ofs2_
std::auto_ptr< std::ofstream > ofs3_
std::auto_ptr< std::ofstream > ofsmsh_
 Stream for connections.
concepts::GlobalPostprocess< Real > postProcess_
 Post processor.
concepts::Space< Real > * spc_
 The space.

Detailed Description

Draws a picture of data in Matlab format and stores the result in files.

The data is stored in four files by appending '_1.m', '_2.m', '_3.m' and '_msh.m'. The data can be read into Matlab by giving the three four file names as commands (and ommiting the ending '_*.m'). The data is plotted by

trimesh(msh, x, y, z0)

or

trimesh(msh, x, y, z0, ones(size(x,1),1))

or in 3D

Msh = msh(:,[1:3 1])';
      fill3(x(Msh),y(Msh),z(Msh),z0(Msh))
      

This class opens and closes the four files and hands the streams to DataMatlabCell.

Definition at line 129 of file dataMatlab.hh.


Constructor & Destructor Documentation

graphics::DataMatlab::DataMatlab ( concepts::Space< Real > &  spc,
const std::string  filename,
uint  dim = 2,
Real  scl = 1.0 
)

Constructor.

Parameters:
spcSpace on which the data should be plotted
filenameName base for the files to be written
dimSpatial dimension of the data (only dim=2 supported)
sclData scaling factor
graphics::DataMatlab::~DataMatlab ( ) [inline]

Definition at line 139 of file dataMatlab.hh.

Here is the call graph for this function:


Member Function Documentation

void graphics::DataMatlab::closeStreams_ ( ) [private]

Closes the streams.

void graphics::DataMatlab::createStreams_ ( std::string  filename) [private]

Create the streams.

void graphics::DataMatlab::operator() ( const concepts::Vector< Real > &  sol)

Application operator.

Parameters:
solThe solution which should be plotted

Member Data Documentation

Number of vectors written to the files.

Definition at line 157 of file dataMatlab.hh.

Spatial dimension of the space.

Definition at line 155 of file dataMatlab.hh.

std::auto_ptr<DataMatlabCell> graphics::DataMatlab::mtlb_ [private]

Definition at line 165 of file dataMatlab.hh.

std::auto_ptr<std::ofstream> graphics::DataMatlab::ofs1_ [private]

Streams for coordinates.

Definition at line 161 of file dataMatlab.hh.

std::auto_ptr<std::ofstream> graphics::DataMatlab::ofs2_ [private]

Definition at line 161 of file dataMatlab.hh.

std::auto_ptr<std::ofstream> graphics::DataMatlab::ofs3_ [private]

Definition at line 161 of file dataMatlab.hh.

std::auto_ptr<std::ofstream> graphics::DataMatlab::ofsmsh_ [private]

Stream for connections.

Definition at line 159 of file dataMatlab.hh.

Post processor.

Definition at line 164 of file dataMatlab.hh.

The space.

Definition at line 153 of file dataMatlab.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)