Class documentation of Concepts

Loading...
Searching...
No Matches
Inheritance diagram for graphics::MatlabElasticityGraphics:
graphics::MatlabBinaryGraphics concepts::MatfileIO graphics::DenseMatrixGraphics concepts::OutputOperator

Public Member Functions

template<class G , class F >
 MatlabElasticityGraphics (const concepts::Space< G > &spc, const std::string &filename, const concepts::Vector< F > &sol_u1, const concepts::Vector< F > &sol_u2, F lambda, F mu, bool plain_stress)
 
template<class F , class G >
void addSolution (const concepts::Space< G > &spc, const std::string name, const concepts::Vector< F > &sol, const concepts::ElementFunction< F, G > *fun=0)
 
template<class F , class G >
void addFunction (const concepts::Space< G > &spc, const std::string name, const concepts::ElementFormula< F, G > &frm)
 
template<class T >
void add (const T &u, const std::string varName, enum matio_compression compress=MAT_COMPRESSION_NONE)
 
template<class T >
void get (T &u, const std::string varName)
 
void reopen ()
 
void close ()
 
void clear ()
 
bool isOpen () const
 
bool isEmpty () const
 
bool remove (const std::string varName)
 
std::string filename () const
 
void overWrite (bool toOverWrite)
 
bool exists (const std::string &varName) const
 
bool isReal (const std::string &varName) const
 
bool isCmplx (const std::string &varName) const
 
bool isScalar (const std::string &varName) const
 
bool isDense (const std::string &varName) const
 
bool isSparse (const std::string &varName) const
 
bool isInt (const std::string &varName) const
 
bool isUint (const std::string &varName) const
 
uint lengthVector (const std::string &varName) const
 
void assertCmplx (const std::string &varName) const
 
void assertExistence (const std::string &varName) const
 
void assertVector (const std::string &varName) const
 
void assertQuadratic (const std::string &varName) const
 

Static Public Attributes

static uint noPoints
 

Protected Member Functions

template<class G >
void addSpace_ (const concepts::Space< G > &spc)
 
template<class G >
void storeData_ (DenseMatrixCollection< G > &dense_ptr_)
 Stores data hold by dense_ptr.
 
virtual std::ostream & info (std::ostream &os) const
 
template<class F , class G >
concepts::RCP< concepts::ElementMatrix< F > > getSolution (const concepts::Space< G > &spc, const concepts::Vector< F > &sol, const concepts::ElementFunction< F, G > *fun=0)
 
template<class F , class G >
concepts::RCP< concepts::ElementMatrix< typename concepts::Datatype< F >::type > > getFunction (const concepts::Space< G > &spc, const concepts::ElementFormula< F, G > &frm)
 
template<class G >
DenseMatrixCollection< G > getSpace (const concepts::Space< G > &spc)
 
DenseMatrixCollection< Real > getMesh (concepts::Mesh &msh, const uint points=5)
 

Protected Attributes

uint data_
 Information which data should be stored.
 

Detailed Description

Examples
elasticity2D_tutorial.cc.

Definition at line 15 of file matlabElasticityGraphics.hh.

Constructor & Destructor Documentation

◆ MatlabElasticityGraphics()

template<class G , class F >
graphics::MatlabElasticityGraphics::MatlabElasticityGraphics ( const concepts::Space< G > &  spc,
const std::string &  filename,
const concepts::Vector< F > &  sol_u1,
const concepts::Vector< F > &  sol_u2,
lambda,
mu,
bool  plain_stress 
)

Definition at line 32 of file matlabElasticityGraphics.hh.

◆ ~MatlabElasticityGraphics()

virtual graphics::MatlabElasticityGraphics::~MatlabElasticityGraphics ( )
inlinevirtual

Definition at line 25 of file matlabElasticityGraphics.hh.

Member Function Documentation

◆ add()

template<class T >
void concepts::MatfileIO::add ( const T &  u,
const std::string  varName,
enum matio_compression  compress = MAT_COMPRESSION_NONE 
)
inlineinherited

Method to add various objects to a current open MatfileIO. Objects that can be added are:

  • ElementMatrix<T> (i.e. DenseMatrix<T>)
  • Array<Point<T, dim>>
  • DiagonalMatrix<T>
  • SparseMatrix<T>
  • Array<T>,
  • std::vector<T> (i.e. Sequence<T>)
  • Vector<T>,
  • Point<T, dim>,
  • Mapping<T, dim>,
  • Scalars (Real, Cmplx)

This add routine controls the Input quantities and throws an exception, if the MatfileIO instance is not open; the Input class type T is not supported (yet); a variable with the same name varName is added in the current MatfileIO instance, before closing it; a variable with the same name varName already exists in the *.mat-file and is set not to be rewritable. If no error occurs the desired object is added.

Parameters
uThe object you want to add to the current open *.mat-file
varNameName of the variable.
compressMAT_COMPRESSION_NONE / MAT_COMPRESSION_ZLIB
Examples
matfileTutorial.cc.

Definition at line 160 of file matfileIO.hh.

◆ addFunction()

template<class F , class G >
void graphics::MatlabBinaryGraphics::addFunction ( const concepts::Space< G > &  spc,
const std::string  name,
const concepts::ElementFormula< F, G > &  frm 
)
inherited

Adds a solution vector to the current matfile

Parameters
spcThe space from which the solution vector was generated
nameThe name of the variable, e.g. "frm"
frmThe function represented by an element formula

Definition at line 191 of file matlabBinaryGraphics.hh.

◆ addSolution()

template<class F , class G >
void graphics::MatlabBinaryGraphics::addSolution ( const concepts::Space< G > &  spc,
const std::string  name,
const concepts::Vector< F > &  sol,
const concepts::ElementFunction< F, G > *  fun = 0 
)
inherited

Adds a solution vector to the current matfile

Parameters
spcThe space from which the solution vector was generated
nameThe name of the variable, e.g. "u0"
solThe solution vector
funThe type of vector you need (i.e. values, gradient, Laplacian etc.), default argument is Values
Examples
howToGetStarted.cc, and parallelizationTutorial.cc.

Definition at line 178 of file matlabBinaryGraphics.hh.

◆ addSpace_()

template<class G >
void graphics::MatlabBinaryGraphics::addSpace_ ( const concepts::Space< G > &  spc)
protectedinherited

Adds informations of a given Space to the matfile

Parameters
spcThe space that should be stored

Definition at line 201 of file matlabBinaryGraphics.hh.

◆ assertCmplx()

void concepts::MatfileIO::assertCmplx ( const std::string &  varName) const
inherited

Throws an exception if the variable is not (at least) a complex

◆ assertExistence()

void concepts::MatfileIO::assertExistence ( const std::string &  varName) const
inherited

Throws an exception if the variable does not exist

◆ assertQuadratic()

void concepts::MatfileIO::assertQuadratic ( const std::string &  varName) const
inherited

Throws an exception if the variable is not a quadratic rank 2 object.

◆ assertVector()

void concepts::MatfileIO::assertVector ( const std::string &  varName) const
inherited

Throws an exception if the variable has no vector struct, that is at most one dimension is larger than one.

◆ clear()

void concepts::MatfileIO::clear ( )
inherited

Method to remove all variable in the current *.mat-file.

◆ close()

void concepts::MatfileIO::close ( )
inherited

Method to close the current *.mat-file. This method has the effect to finish the writing to the *.mat-file. It may be used in combination with reopen(). If you don't close the current MatfileIO-object the deconstructor will do it anyway.

Examples
matfileTutorial.cc.

◆ exists()

bool concepts::MatfileIO::exists ( const std::string &  varName) const
inherited

Returns true if the variable /c varName exists, false otherwise. It throws an exception if no file is opened currently.

Examples
matfileTutorial.cc.

◆ filename()

std::string concepts::MatfileIO::filename ( ) const
inlineinherited

Returns the name of the current open *.mat-file.

Definition at line 306 of file matfileIO.hh.

◆ get()

template<class T >
void concepts::MatfileIO::get ( T &  u,
const std::string  varName 
)
inlineinherited

Method to get various objects out of the current open MatfileIO. Objects that can be gained:

  • ElementMatrix<T> (i.e. DenseMatrix<T>)
  • DiagonalMatrix<T>
  • SparseMatrix<T>
  • Array<T>,
  • std::vector<T> (i.e.Sequence<T>)
  • std::vector<Vector<T> > (i.e. Sequence<Vector< T > >)
  • Vector<T>,
  • Point<T, dim>,
  • Mapping<T, dim>,
  • Scalars (Real, Cmplx)

This get routine controlls the Input quantities and throws an exception, if no variable named varName exists in the current open *.mat-file; if the field of the requested variable in the *.mat-file and the field of u differs, that is concepts::Real or concepts::Cmplx; if the class of u is not supported (yet). Matlab's multidimensional arrays with rank > 2 are not supported to be read out of a *.mat-file (yet). If no error occurs the desired object gets filled. The object u does not need to be preallocated, it gets resized due to the *.mat-file informations.

Parameters
uThe object you want to get out of the current open *.mat-file
varNameName of the requested variable.
Examples
matfileTutorial.cc.

Definition at line 234 of file matfileIO.hh.

◆ getFunction()

template<class F , class G >
concepts::RCP< concepts::ElementMatrix< typename concepts::Datatype< F >::type > > graphics::DenseMatrixGraphics::getFunction ( const concepts::Space< G > &  spc,
const concepts::ElementFormula< F, G > &  frm 
)
protectedinherited

Returns a vector with the value of the function on the quadrature-points of a given space using the given concepts::ElementFormula.

Parameters
spcThe space on which the Element Formula is defined
frmThe ElementFormula of the function that should be plotted

Definition at line 194 of file denseMatrixGraphics.hh.

◆ getMesh()

DenseMatrixCollection< Real > graphics::DenseMatrixGraphics::getMesh ( concepts::Mesh msh,
const uint  points = 5 
)
protectedinherited

Returns a graphics::DenseMatrixCollection<G> that contains informations for graphical output of the given mesh.

Parameters
mshThe mesh
dimThe dimension of the mesh

◆ getSolution()

template<class F , class G >
concepts::RCP< concepts::ElementMatrix< F > > graphics::DenseMatrixGraphics::getSolution ( const concepts::Space< G > &  spc,
const concepts::Vector< F > &  sol,
const concepts::ElementFunction< F, G > *  fun = 0 
)
protectedinherited

Returns a vector with the value of the solution on the quadrature-points of a given space using a given coefficient vector.

Parameters
spcThe space from which the solution vector was generated
solThe solution vector
funFunction of the solution (e.g. solution itself, its gradient, it's Laplacien etc.)

Definition at line 130 of file denseMatrixGraphics.hh.

◆ getSpace()

template<class G >
DenseMatrixCollection< G > graphics::DenseMatrixGraphics::getSpace ( const concepts::Space< G > &  spc)
protectedinherited

Returns a graphics::DenseMatrixCollection<G> that contains informations for graphical output of the given space.

Parameters
spcThe space
dimThe dimension of the space

Definition at line 171 of file denseMatrixGraphics.hh.

◆ info()

virtual std::ostream & concepts::MatfileIO::info ( std::ostream &  os) const
protectedvirtualinherited

Gives an overview about the variables that are in a current open *.mat-file.

Reimplemented from concepts::OutputOperator.

◆ isCmplx()

bool concepts::MatfileIO::isCmplx ( const std::string &  varName) const
inherited

Return true if the variable /c varName is of type double complex

Examples
matfileTutorial.cc.

◆ isDense()

bool concepts::MatfileIO::isDense ( const std::string &  varName) const
inherited

Returns true if the variable /c varName is dense, else 0

Examples
matfileTutorial.cc.

◆ isEmpty()

bool concepts::MatfileIO::isEmpty ( ) const
inlineinherited

Routine to check if a *.mat-file is empty, i.e. does not contain any variables.

Definition at line 290 of file matfileIO.hh.

◆ isInt()

bool concepts::MatfileIO::isInt ( const std::string &  varName) const
inherited

Returns true if the variable /c varname is int, else 0.

Examples
matfileTutorial.cc.

◆ isOpen()

bool concepts::MatfileIO::isOpen ( ) const
inlineinherited

Routine to check if a *.mat-file is currently open. Might be use with reopen() and close() routines.

Definition at line 283 of file matfileIO.hh.

◆ isReal()

bool concepts::MatfileIO::isReal ( const std::string &  varName) const
inherited

Return true if the variable /c varName is of type double

Examples
matfileTutorial.cc.

◆ isScalar()

bool concepts::MatfileIO::isScalar ( const std::string &  varName) const
inherited

Return true if the variable /c varName is a scalar

Examples
matfileTutorial.cc.

◆ isSparse()

bool concepts::MatfileIO::isSparse ( const std::string &  varName) const
inherited

Returns true if the variable /c varName is sparse, else 0.

Examples
matfileTutorial.cc.

◆ isUint()

bool concepts::MatfileIO::isUint ( const std::string &  varName) const
inherited

Returns true if the variable /c varname is uint, else 0.

Examples
matfileTutorial.cc.

◆ lengthVector()

uint concepts::MatfileIO::lengthVector ( const std::string &  varName) const
inherited

Return its length if /c varName is a vector, 0 otherwise

◆ overWrite()

void concepts::MatfileIO::overWrite ( bool  toOverWrite)
inlineinherited

Method with that u can secure already existing variables in a current open *.mat-file. By default variables get overwritten. If you disable overwriting and try to overwrite a secured variable, it will be asserted.

Parameters
toOverWriteParameter to secure (false) or to unsecure (true) variables from overwriting.

Definition at line 316 of file matfileIO.hh.

◆ remove()

bool concepts::MatfileIO::remove ( const std::string  varName)
inherited

Removes the requested variable named 'str' if it exist in the current matfile. Therefore, first the MatfileIO gets closed to finish writing and then a attempt to delete is performed. If the removal was successful it returns 1, else (i.e. the requested var does not exist in the *.mat-file) it returns 0.

◆ reopen()

void concepts::MatfileIO::reopen ( )
inherited

Method to reopen the *.mat-file that was once opened with the constructor. This could be used in combination with the close()-routine. It may has an application when using the same name for different variables in iterations, where they will be overwritten at each iteration.

◆ storeData_()

template<class G >
void graphics::MatlabBinaryGraphics::storeData_ ( DenseMatrixCollection< G > &  dense_ptr_)
protectedinherited

Stores data hold by dense_ptr.

Definition at line 209 of file matlabBinaryGraphics.hh.

Member Data Documentation

◆ data_

uint graphics::MatlabBinaryGraphics::data_
protectedinherited

Information which data should be stored.

Definition at line 134 of file matlabBinaryGraphics.hh.

◆ noPoints

uint graphics::DenseMatrixGraphics::noPoints
staticinherited

Definition at line 78 of file denseMatrixGraphics.hh.


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