concepts::ModelControlBase< F > Class Template Reference

Base class for controlling a model. More...

#include <models.hh>

Public Member Functions

void basisFunctions (const std::string path="")
 Writes matlab graphics files for each basis function of the space of the model. More...
 
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. More...
 
void loadSolution (const std::string vectorFile)
 Loads solution vector from vectorFile. More...
 
virtual F & model ()
 Returns the model. More...
 
virtual const F & model () const
 
 ModelControlBase (F &model)
 Constructor. More...
 
const concepts::InOutParametersparameters () const
 Return parameters of the calculation. More...
 
void writeSolution (const std::string vectorFile, bool verbose=true)
 Writes solution vector to vectorFile. More...
 
virtual ~ModelControlBase ()
 

Protected Member Functions

virtual std::string filename_ (const std::string varname, const std::string path, const bool flag=false)
 Gives a file name for different outputs. More...
 
template<class G >
void formulaOut_ (const concepts::PiecewiseFormulaBase< G > &frm, const std::string frmstr, const std::string name)
 graphical output of formulas More...
 
virtual std::ostream & info (std::ostream &os) const
 
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. More...
 

Protected Attributes

F & model_
 The model. More...
 
concepts::InOutParameters parameters_
 Parameters of the calculation. More...
 

Detailed Description

template<class F>
class concepts::ModelControlBase< F >

Base class for controlling a model.

Implemenent a model with an appropiate space and solver. Use ModelControl and derived classes to enclose methods, which are called when using a model.

Definition at line 27 of file models.hh.

Constructor & Destructor Documentation

◆ ModelControlBase()

template<class F >
concepts::ModelControlBase< F >::ModelControlBase ( F &  model)
inline

Constructor.

Definition at line 97 of file models.hh.

◆ ~ModelControlBase()

template<class F >
virtual concepts::ModelControlBase< F >::~ModelControlBase ( )
inlinevirtual

Definition at line 100 of file models.hh.

Member Function Documentation

◆ basisFunctions()

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

Writes matlab graphics files for each basis function of the space of the model.

◆ dataOut()

template<class F >
virtual void concepts::ModelControlBase< 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.

◆ filename_()

template<class F >
virtual std::string concepts::ModelControlBase< F >::filename_ ( const std::string  varname,
const std::string  path,
const bool  flag = false 
)
protectedvirtual

Gives a file name for different outputs.

Due to derivation the name can be adopted. At the moment its like "path/varname_mshAbbr".

Parameters
varnamename of an variable
pathpath
psome flag

◆ formulaOut_()

template<class F >
template<class G >
void concepts::ModelControlBase< F >::formulaOut_ ( const concepts::PiecewiseFormulaBase< G > &  frm,
const std::string  frmstr,
const std::string  name 
)
protected

graphical output of formulas

Definition at line 160 of file models.hh.

◆ info()

◆ loadSolution()

template<class F >
void concepts::ModelControlBase< F >::loadSolution ( const std::string  vectorFile)

Loads solution vector from vectorFile.

◆ model() [1/2]

◆ model() [2/2]

◆ newfile_()

template<class F >
void concepts::ModelControlBase< F >::newfile_ ( std::string &  name,
const std::string  varname,
const std::string  ending 
)
protected

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 to name.

◆ parameters()

template<class F >
const concepts::InOutParameters& concepts::ModelControlBase< F >::parameters ( ) const
inline

Return parameters of the calculation.

Definition at line 121 of file models.hh.

◆ writeSolution()

template<class F >
void concepts::ModelControlBase< F >::writeSolution ( const std::string  vectorFile,
bool  verbose = true 
)

Writes solution vector to vectorFile.

Writes a message to cout, if not verbose.

Member Data Documentation

◆ model_

template<class F >
F& concepts::ModelControlBase< F >::model_
protected

The model.

Definition at line 127 of file models.hh.

◆ parameters_

template<class F >
concepts::InOutParameters concepts::ModelControlBase< F >::parameters_
protected

Parameters of the calculation.

Definition at line 129 of file models.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich