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

Public Member Functions | Private Member Functions | Private Attributes
graphics::MeshMatlab< F > Class Template Reference

Creates data for Matlab to draw the mesh. More...

#include <meshMatlab.hh>

List of all members.

Public Member Functions

 MeshMatlab (concepts::Mesh &msh, std::string filename)
 Constructor.
 MeshMatlab (concepts::Space< F > &spc, std::string filename)
 Constructor.
 ~MeshMatlab ()

Private Member Functions

void closeStreams_ ()
 Prints the footer and closes the streams.
void createStreams_ (std::string filename)
 Creates the streams and prints the header.

Private Attributes

std::auto_ptr< std::ofstream > ofs1_
 The streams.
std::auto_ptr< std::ofstream > ofs2_
std::auto_ptr< std::ofstream > ofs3_

Detailed Description

template<typename F>
class graphics::MeshMatlab< F >

Creates data for Matlab to draw the mesh.

This class is just an executor class for MeshMatlabCell, the real work is done there.

The data is stored in three file by appending '_1.m', '_2.m' and '_3.m' to the filename. The data can be read into Matlab by giving the three filenames as commands (and ommmiting the '.m'). Depending on the element type the mesh is either plotted by

plot3(a, b, c)

(if you want black lines in the plot, use

plot3(a, b, c, 'k')

) or

trimesh(b', a(1,:), a(2,:), a(3,:), ones(size(a,2),1))

This class opens and closes the three files and hands the streams to MeshMatlabCell.

See also:
drawMeshMatlab the trampoline function of this class
Author:
Philipp Frauenfelder, 2002

Definition at line 49 of file meshMatlab.hh.


Constructor & Destructor Documentation

template<typename F >
graphics::MeshMatlab< F >::MeshMatlab ( concepts::Mesh msh,
std::string  filename 
)

Constructor.

Creates a picture of the coarsest mesh.

template<typename F >
graphics::MeshMatlab< F >::MeshMatlab ( concepts::Space< F > &  spc,
std::string  filename 
)

Constructor.

Creates a picture of the current mesh of the space.

template<typename F >
graphics::MeshMatlab< F >::~MeshMatlab ( )

Member Function Documentation

template<typename F >
void graphics::MeshMatlab< F >::closeStreams_ ( ) [private]

Prints the footer and closes the streams.

template<typename F >
void graphics::MeshMatlab< F >::createStreams_ ( std::string  filename) [private]

Creates the streams and prints the header.


Member Data Documentation

template<typename F >
std::auto_ptr<std::ofstream> graphics::MeshMatlab< F >::ofs1_ [private]

The streams.

Definition at line 64 of file meshMatlab.hh.

template<typename F >
std::auto_ptr<std::ofstream> graphics::MeshMatlab< F >::ofs2_ [private]

Definition at line 64 of file meshMatlab.hh.

template<typename F >
std::auto_ptr<std::ofstream> graphics::MeshMatlab< F >::ofs3_ [private]

Definition at line 64 of file meshMatlab.hh.


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

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