Base class for 2D models. More...
#include <Models.hh>


Public Member Functions | |
| void | basisFunctions (const std::string path="") |
| Writes matlab graphics files for each basis function. | |
| virtual void | dataOut (concepts::InOutParameters ¶meters, 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::Space * | space () 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::Mesh2 & | mesh_ ()=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::Space > | spc_ |
| 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. | |
Base class for 2D models.
| hp2D::Models< F >::Models | ( | const std::string | problemName, |
| const uint | geomRefAttr = 100 |
||
| ) |
| virtual hp2D::Models< F >::~Models | ( | ) | [inline, virtual] |
| void hp2D::Models< F >::basisFunctions | ( | const std::string | path = "" | ) |
Writes matlab graphics files for each basis function.
| 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.
| virtual void hp2D::Models< F >::dataOut_ | ( | ) | [protected, pure virtual] |
Collect the parameters.
Implemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, and hp2D::Poisson2D.
| 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.
| void hp2D::Models< F >::formulaOut_ | ( | const concepts::PiecewiseFormulaBase< G > & | frm, |
| const std::string | frmstr, | ||
| const std::string | path = "" |
||
| ) | [protected] |
| virtual void hp2D::Models< F >::graphicsOut | ( | const uint | numPoints, |
| const std::string | path = "" |
||
| ) | [pure virtual] |
Writes matlab graphics files.
| numPoints | number of points per cell in one direction |
Implemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, and hp2D::Poisson2D.
| 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.
| virtual void hp2D::Models< F >::loadSolution | ( | const std::string | vectorFile | ) | [virtual] |
Loads solution vector from vectorFile.
| 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.
| 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.
| void hp2D::Models< F >::matrixBuild | ( | InputModels< F > & | input | ) |
| 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.
| virtual concepts::Mesh2& hp2D::Models< F >::mesh_ | ( | ) | [protected, pure virtual] |
Mesh.
Implemented in hp2D::Eddy2D_H, hp2D::Maxwell2D_H, and hp2D::Poisson2D.
| 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.
| 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.
| uint hp2D::Models< F >::nextCounter_ | ( | const std::string | path = "" | ) | const [private] |
Returns next data base counter.
| std::string hp2D::Models< F >::nodenameLetter_ | ( | ) | const [private] |
Returns a capital letter as abbreviation of the node.
| void hp2D::Models< F >::refine_ | ( | uint | attrib, |
| int | pMax[2] | ||
| ) | [private] |
Refine to marked nodes or edges.
| 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.
| void hp2D::Models< F >::solve | ( | InputModels< F > & | input | ) |
| 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.
| const hp2D::Space* hp2D::Models< F >::space | ( | ) | const [inline] |
Reimplemented in hp2D::Eddy2D_H, and hp2D::Maxwell2D_H.
| void hp2D::Models< F >::spaceBuild | ( | const uint | l = 0, |
| const uint | p = 1, |
||
| const uint | g = 0 |
||
| ) |
Builds only the space.
std::auto_ptr<concepts::BoundaryConditions> hp2D::Models< F >::bc_ [protected] |
const uint hp2D::Models< F >::geomRefAttr_ [protected] |
std::string hp2D::Models< F >::matrixFile_ [protected] |
concepts::InOutParameters hp2D::Models< F >::parameters_ [protected] |
const std::string hp2D::Models< F >::problemName_ [protected] |
std::auto_ptr<concepts::Vector<F> > hp2D::Models< F >::sol_ [protected] |
std::auto_ptr<hp2D::Space> hp2D::Models< F >::spc_ [protected] |
FEM space.
Reimplemented in hp2D::Eddy2D_H, and hp2D::Maxwell2D_H.
std::string hp2D::Models< F >::vectorFile_ [protected] |