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

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
hp2D::Models< F > Class Template Reference

Base class for 2D models. More...

#include <Models.hh>

Inheritance diagram for hp2D::Models< F >:
Inheritance graph
[legend]
Collaboration diagram for hp2D::Models< F >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void basisFunctions (const std::string path="")
 Writes matlab graphics files for each basis function.
virtual void dataOut (concepts::InOutParameters &parameters, const bool store=false, const std::string path="")
 Append the parameters of the calculation to parameters and writes it in matlab format if path is given.
virtual void graphicsOut (const uint numPoints, const std::string path="")=0
 Writes matlab graphics files.
virtual void loadSolution (const std::string vectorFile)
 Loads solution vector from vectorFile.
virtual void loadSolution (const uint l=0, const uint p=1, const uint g=0, const std::string path="")
 Loads solution vector from standard file in path with use of l, p and g.
void matrixBuild (const uint l=0, const uint p=1, const uint g=0, const std::string matrixFile="")
 Build the space, matrices and the load vector.
void matrixBuild (InputModels &input)
 Models (const std::string problemName, const uint geomRefAttr=100)
void solve (InputModels &input)
void solve (const uint l=0, const uint p=1, const uint g=0, const std::string vectorFile="", const std::string matrixFile="")
 Build the space, matrices and the load vector and solve the system.
const hp2D::Spacespace () const
void spaceBuild (const uint l=0, const uint p=1, const uint g=0)
 Builds only the space.
virtual ~Models ()

Protected Member Functions

virtual void dataOut_ ()=0
 Collect the parameters.
std::string filename_ (const std::string varname, const std::string subpath, const bool p=false)
 Gives a file name, which consists of p, l, g.
template<class G >
void formulaOut_ (const concepts::PiecewiseFormulaBase< G > &frm, const std::string frmstr, const std::string path="")
 graphical output of formulas
virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.
virtual void matrices_ ()=0
 Pure virtual method for building the matrices.
virtual concepts::Mesh2mesh_ ()=0
 Mesh.
virtual const std::string mshAbbr_ ()=0
 Mesh abbreviation string.
virtual void solve_ ()=0
 Pure virtual method for solving, to be implemented in derived classes.

Protected Attributes

std::auto_ptr
< concepts::BoundaryConditions
bc_
 Boundary conditions.
const uint geomRefAttr_
 Attribute of vertices or edges for geometric refinement.
std::string matrixFile_
 matlab file for matrices and load vector output
concepts::InOutParameters parameters_
 Parameters of the calculation.
const std::string problemName_
 Name of the problem.
std::auto_ptr
< concepts::Vector< F > > 
sol_
 Solution vector.
std::auto_ptr< hp2D::Spacespc_
 FEM space.
std::string vectorFile_
 file for solution output, which can be reloaded into concepts

Private Member Functions

void newfile_ (std::string &name, const std::string varname, const std::string ending)
 Tries, if given file can be opened for writing or if its a path.
uint nextCounter_ (const std::string path="") const
 Returns next data base counter.
std::string nodenameLetter_ () const
 Returns a capital letter as abbreviation of the node.
void refine_ (uint attrib, int pMax[2])
 Refine to marked nodes or edges.

Detailed Description

template<class F>
class hp2D::Models< F >

Base class for 2D models.

Author:
Kersten Schmidt, 2005

Definition at line 48 of file Models.hh.


Constructor & Destructor Documentation

template<class F>
hp2D::Models< F >::Models ( const std::string  problemName,
const uint  geomRefAttr = 100 
)
template<class F>
virtual hp2D::Models< F >::~Models ( ) [inline, virtual]

Definition at line 52 of file Models.hh.


Member Function Documentation

template<class F>
void hp2D::Models< F >::basisFunctions ( const std::string  path = "")

Writes matlab graphics files for each basis function.

template<class F>
virtual void hp2D::Models< F >::dataOut ( concepts::InOutParameters parameters,
const bool  store = false,
const std::string  path = "" 
) [virtual]

Append the parameters of the calculation to parameters and writes it in matlab format if path is given.

template<class F>
virtual void hp2D::Models< F >::dataOut_ ( ) [protected, pure virtual]

Collect the parameters.

Implemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, and hp2D::Poisson2D.

template<class F>
std::string hp2D::Models< F >::filename_ ( const std::string  varname,
const std::string  subpath,
const bool  p = false 
) [protected]

Gives a file name, which consists of p, l, g.

template<class F >
template<class G >
void hp2D::Models< F >::formulaOut_ ( const concepts::PiecewiseFormulaBase< G > &  frm,
const std::string  frmstr,
const std::string  path = "" 
) [protected]

graphical output of formulas

Definition at line 147 of file Models.hh.

template<class F>
virtual void hp2D::Models< F >::graphicsOut ( const uint  numPoints,
const std::string  path = "" 
) [pure virtual]

Writes matlab graphics files.

Parameters:
numPointsnumber of points per cell in one direction

Implemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, and hp2D::Poisson2D.

template<class F>
virtual std::ostream& hp2D::Models< F >::info ( std::ostream &  os) const [protected, virtual]

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

Reimplemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, hp2D::Poisson2D, hp2D::Eddy2D_H, and hp2D::Maxwell2D_H.

template<class F>
virtual void hp2D::Models< F >::loadSolution ( const std::string  vectorFile) [virtual]

Loads solution vector from vectorFile.

template<class F>
virtual void hp2D::Models< F >::loadSolution ( const uint  l = 0,
const uint  p = 1,
const uint  g = 0,
const std::string  path = "" 
) [virtual]

Loads solution vector from standard file in path with use of l, p and g.

template<class F>
virtual void hp2D::Models< F >::matrices_ ( ) [protected, pure virtual]

Pure virtual method for building the matrices.

Implemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, hp2D::Poisson2D, hp2D::Eddy2D_H, and hp2D::Maxwell2D_H.

template<class F>
void hp2D::Models< F >::matrixBuild ( InputModels< F > &  input)
template<class F>
void hp2D::Models< F >::matrixBuild ( const uint  l = 0,
const uint  p = 1,
const uint  g = 0,
const std::string  matrixFile = "" 
)

Build the space, matrices and the load vector.

template<class F>
virtual concepts::Mesh2& hp2D::Models< F >::mesh_ ( ) [protected, pure virtual]

Mesh.

Implemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, and hp2D::Poisson2D.

template<class F>
virtual const std::string hp2D::Models< F >::mshAbbr_ ( ) [protected, pure virtual]

Mesh abbreviation string.

Implemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, hp2D::Poisson2D, and hp2D::Eddy2D_H.

template<class F>
void hp2D::Models< F >::newfile_ ( std::string &  name,
const std::string  varname,
const std::string  ending 
) [private]

Tries, if given file can be opened for writing or if its a path.

In latter case opens gives back a standard filename with ending and use of varname.

If the given string is neither possible to open or a path a empty string is given back.

template<class F>
uint hp2D::Models< F >::nextCounter_ ( const std::string  path = "") const [private]

Returns next data base counter.

template<class F>
std::string hp2D::Models< F >::nodenameLetter_ ( ) const [private]

Returns a capital letter as abbreviation of the node.

template<class F>
void hp2D::Models< F >::refine_ ( uint  attrib,
int  pMax[2] 
) [private]

Refine to marked nodes or edges.

template<class F>
void hp2D::Models< F >::solve ( const uint  l = 0,
const uint  p = 1,
const uint  g = 0,
const std::string  vectorFile = "",
const std::string  matrixFile = "" 
)

Build the space, matrices and the load vector and solve the system.

template<class F>
void hp2D::Models< F >::solve ( InputModels< F > &  input)
template<class F>
virtual void hp2D::Models< F >::solve_ ( ) [protected, pure virtual]

Pure virtual method for solving, to be implemented in derived classes.

Should throw exception when solving wasn't successfull

Implemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, hp2D::Poisson2D, hp2D::Eddy2D_H, and hp2D::Maxwell2D_H.

template<class F>
const hp2D::Space* hp2D::Models< F >::space ( ) const [inline]

Reimplemented in hp2D::Eddy2D_H, and hp2D::Maxwell2D_H.

Definition at line 87 of file Models.hh.

template<class F>
void hp2D::Models< F >::spaceBuild ( const uint  l = 0,
const uint  p = 1,
const uint  g = 0 
)

Builds only the space.


Member Data Documentation

template<class F>
std::auto_ptr<concepts::BoundaryConditions> hp2D::Models< F >::bc_ [protected]

Boundary conditions.

Reimplemented in hp2D::Eddy2D_H.

Definition at line 101 of file Models.hh.

template<class F>
const uint hp2D::Models< F >::geomRefAttr_ [protected]

Attribute of vertices or edges for geometric refinement.

Definition at line 97 of file Models.hh.

template<class F>
std::string hp2D::Models< F >::matrixFile_ [protected]

matlab file for matrices and load vector output

Definition at line 105 of file Models.hh.

template<class F>
concepts::InOutParameters hp2D::Models< F >::parameters_ [protected]

Parameters of the calculation.

Definition at line 125 of file Models.hh.

template<class F>
const std::string hp2D::Models< F >::problemName_ [protected]

Name of the problem.

Definition at line 95 of file Models.hh.

template<class F>
std::auto_ptr<concepts::Vector<F> > hp2D::Models< F >::sol_ [protected]

Solution vector.

Definition at line 103 of file Models.hh.

template<class F>
std::auto_ptr<hp2D::Space> hp2D::Models< F >::spc_ [protected]

FEM space.

Reimplemented in hp2D::Eddy2D_H, and hp2D::Maxwell2D_H.

Definition at line 99 of file Models.hh.

template<class F>
std::string hp2D::Models< F >::vectorFile_ [protected]

file for solution output, which can be reloaded into concepts

Definition at line 107 of file Models.hh.


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

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