Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Allows to export a tailored IRK solver based on Gaussian elimination of specific dimensions. More...

#include <irk_4stage_simplified_newton_export.hpp>

Inheritance diagram for ExportIRK4StageSimplifiedNewton:
Inheritance graph
[legend]

Public Member Functions

returnValue appendVariableNames (std::stringstream &string)
 
 ExportIRK4StageSimplifiedNewton (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
 
virtual returnValue getCode (ExportStatementBlock &code)
 
virtual returnValue getDataDeclarations (ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
 
virtual returnValue getFunctionDeclarations (ExportStatementBlock &declarations) const
 
returnValue setEigenvalues (const DMatrix &_eig)
 
returnValue setImplicit (BooleanType _implicit)
 
returnValue setStepSize (double _stepsize)
 
returnValue setTransformations (const DMatrix &_transf1, const DMatrix &_transf2, const DMatrix &_transf1_T, const DMatrix &_transf2_T)
 
virtual returnValue setup ()
 
virtual returnValue transformRightHandSide (ExportStatementBlock &code, const ExportVariable &b_mem1, const ExportVariable &b_mem2, const ExportVariable &b_full_, const ExportVariable &transf_, const ExportIndex &index, const bool transpose)
 
virtual returnValue transformSolution (ExportStatementBlock &code, const ExportVariable &b_mem1, const ExportVariable &b_mem2, const ExportVariable &b_full_, const ExportVariable &transf_, const ExportIndex &index, const bool transpose)
 
virtual ~ExportIRK4StageSimplifiedNewton ()
 
- Public Member Functions inherited from ExportGaussElim
 ExportGaussElim (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
 
virtual ExportVariable getGlobalExportVariable (const uint factor) const
 
virtual ~ExportGaussElim ()
 
- Public Member Functions inherited from ExportLinearSolver
 ExportLinearSolver (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
 
uint getDim () const
 
const std::string getNameSolveFunction ()
 
const std::string getNameSolveReuseFunction ()
 
const std::string getNameSolveTransposeReuseFunction ()
 
bool getReuse () const
 
bool getTranspose () const
 
bool getUnrolling () const
 
returnValue init (const uint newDim, const bool &reuse=true, const bool &unrolling=false)
 
returnValue init (const uint newDim, const uint _nRightHandSides, const bool &reuse=true, const bool &unrolling=false)
 
returnValue init (const uint newDim, const bool &reuse, const bool &unrolling, const std::string &newId)
 
returnValue init (unsigned _nRows, unsigned _nCols, unsigned _nBacksolves, bool _reuse, bool _unroll, const std::string &_id)
 
returnValue init (unsigned _nRows, unsigned _nCols, unsigned _nBacksolves, unsigned _nRightHandSides, bool _reuse, bool _unroll, const std::string &_id)
 
returnValue setReuse (const bool &reuse)
 
returnValue setTranspose (const bool &transpose)
 
returnValue setUnrolling (const bool &unrolling)
 
virtual ~ExportLinearSolver ()
 
- Public Member Functions inherited from ExportAlgorithm
 ExportAlgorithm (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName=std::string())
 
uint getN () const
 
uint getNDX () const
 
uint getNOD () const
 
uint getNP () const
 
uint getNU () const
 
uint getNX () const
 
uint getNXA () const
 
uint getNY () const
 
uint getNYN () const
 
returnValue setDimensions (uint _NX=0, uint _NU=0, uint _NP=0, uint _NI=0, uint _NOD=0)
 
returnValue setDimensions (uint _NX, uint _NDX, uint _NXA, uint _NU, uint _NP, uint _NI, uint _NOD)
 
void setNY (uint NY_)
 
void setNYN (uint NYN_)
 
virtual ~ExportAlgorithm ()
 
- Public Member Functions inherited from AlgorithmicBase
int addLogRecord (LogRecord &_record)
 
returnValue addOption (OptionsName name, int value)
 
returnValue addOption (OptionsName name, double value)
 
returnValue addOption (uint idx, OptionsName name, int value)
 
returnValue addOption (uint idx, OptionsName name, double value)
 
returnValue addOptionsList ()
 
 AlgorithmicBase ()
 
 AlgorithmicBase (UserInteraction *_userInteraction)
 
 AlgorithmicBase (const AlgorithmicBase &rhs)
 
returnValue get (OptionsName name, int &value) const
 
returnValue get (OptionsName name, double &value) const
 
returnValue get (OptionsName name, std::string &value) const
 
returnValue get (uint idx, OptionsName name, int &value) const
 
returnValue get (uint idx, OptionsName name, double &value) const
 
returnValue getAll (LogName _name, MatrixVariablesGrid &values) const
 
returnValue getFirst (LogName _name, DMatrix &firstValue) const
 
returnValue getFirst (LogName _name, VariablesGrid &firstValue) const
 
returnValue getLast (LogName _name, DMatrix &lastValue) const
 
returnValue getLast (LogName _name, VariablesGrid &lastValue) const
 
Options getOptions (uint idx) const
 
BooleanType haveOptionsChanged () const
 
BooleanType haveOptionsChanged (uint idx) const
 
AlgorithmicBaseoperator= (const AlgorithmicBase &rhs)
 
returnValue plot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
returnValue printLogRecord (std::ostream &_stream, int idx, LogPrintMode _mode=PRINT_ITEM_BY_ITEM) const
 
returnValue replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
returnValue set (OptionsName name, int value)
 
returnValue set (OptionsName name, double value)
 
returnValue set (OptionsName name, const std::string &value)
 
returnValue set (uint idx, OptionsName name, int value)
 
returnValue set (uint idx, OptionsName name, double value)
 
returnValue setAll (LogName _name, const MatrixVariablesGrid &values)
 
returnValue setLast (LogName _name, int lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, double lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DVector &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DMatrix &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const VariablesGrid &lastValue, double time=-INFTY)
 
returnValue setOptions (const Options &arg)
 
returnValue setOptions (uint idx, const Options &arg)
 
virtual ~AlgorithmicBase ()
 

Protected Member Functions

const std::string getNameSolveComplexFunction ()
 
const std::string getNameSolveComplexReuseFunction ()
 
const std::string getNameSolveComplexTransposeReuseFunction ()
 
- Protected Member Functions inherited from ExportGaussElim
virtual returnValue setupFactorization (ExportFunction &_solve, ExportVariable &_swap, ExportVariable &_determinant, const std::string &absF)
 
virtual returnValue setupSolve (ExportFunction &_solve, ExportFunction &_solveTriangular, ExportVariable &_swap, ExportVariable &_determinant, const std::string &absF)
 
virtual returnValue setupSolveReuse (ExportFunction &_solveReuse, ExportFunction &_solveTriangular, ExportVariable &_bPerm)
 
virtual returnValue setupSolveReuseComplete (ExportFunction &_solveReuse, ExportVariable &_bPerm)
 
virtual returnValue setupSolveReuseTranspose (ExportFunction &_solveReuse, ExportVariable &_bPerm)
 
virtual returnValue setupSolveUpperTriangular (ExportFunction &_solveTriangular)
 

Protected Attributes

ExportVariable A_complex
 
ExportVariable A_full
 
ExportVariable A_mem_complex1
 
ExportVariable A_mem_complex2
 
ExportVariable b_complex
 
ExportVariable b_complex_trans
 
ExportVariable b_full
 
ExportVariable b_full_trans
 
ExportVariable b_mem_complex1
 
ExportVariable b_mem_complex1_trans
 
ExportVariable b_mem_complex2
 
ExportVariable b_mem_complex2_trans
 
ExportVariable determinant_complex
 
DMatrix eig
 
ExportVariable I_full
 
BooleanType implicit
 
ExportVariable rk_bPerm_complex
 
ExportVariable rk_bPerm_complex_trans
 
ExportVariable rk_perm_complex
 
ExportVariable rk_perm_full
 
ExportVariable rk_swap_complex
 
ExportFunction solve_complex
 
ExportFunction solve_full
 
ExportFunction solveReuse_complex
 
ExportFunction solveReuse_complexTranspose
 
ExportFunction solveReuse_full
 
ExportFunction solveReuseTranspose_full
 
double stepsize
 
DMatrix transf1
 
DMatrix transf1_T
 
DMatrix transf2
 
DMatrix transf2_T
 
- Protected Attributes inherited from ExportGaussElim
ExportVariable b_trans
 
ExportVariable rk_bPerm
 
ExportVariable rk_bPerm_trans
 
ExportVariable rk_perm
 
ExportVariable rk_swap
 
- Protected Attributes inherited from ExportLinearSolver
ExportVariable A
 
ExportVariable b
 
ExportVariable determinant
 
uint dim
 
std::string identifier
 
unsigned nBacksolves
 
unsigned nCols
 
unsigned nRightHandSides
 
unsigned nRows
 
bool REUSE
 
ExportFunction solve
 
ExportFunction solveReuse
 
ExportFunction solveReuseTranspose
 
ExportFunction solveTriangular
 
bool TRANSPOSE
 
bool UNROLLING
 
- Protected Attributes inherited from ExportAlgorithm
std::string commonHeaderName
 
uint N
 
uint NDX
 
uint NOD
 
uint NP
 
uint NU
 
uint NX
 
uint NXA
 
uint NY
 
uint NYN
 
- Protected Attributes inherited from AlgorithmicBase
int outputLoggingIdx
 
BooleanType useModuleStandalone
 
UserInteractionuserInteraction
 

Detailed Description

Allows to export a tailored IRK solver based on Gaussian elimination of specific dimensions.

The class ExportIRK3StageSolver allows to export a tailored IRK solver based on Gaussian elimination of specific dimensions.

Author
Rien Quirynen

Definition at line 54 of file irk_4stage_simplified_newton_export.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO ExportIRK4StageSimplifiedNewton::ExportIRK4StageSimplifiedNewton ( UserInteraction _userInteraction = 0,
const std::string &  _commonHeaderName = "" 
)

Default constructor.

    @param[in] _userInteraction             Pointer to corresponding user interface.
    @param[in] _commonHeaderName    Name of common header file to be included.

Definition at line 44 of file irk_4stage_simplified_newton_export.cpp.

ExportIRK4StageSimplifiedNewton::~ExportIRK4StageSimplifiedNewton ( )
virtual

Destructor.

Definition at line 52 of file irk_4stage_simplified_newton_export.cpp.

Member Function Documentation

returnValue ExportIRK4StageSimplifiedNewton::appendVariableNames ( std::stringstream &  string)
virtual

Appends the names of the used variables to a given stringstream.

@param[in] string                           The string to which the names of the used variables are appended.

\return SUCCESSFUL_RETURN

Reimplemented from ExportGaussElim.

Definition at line 294 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::getCode ( ExportStatementBlock code)
virtual

Exports source code of the auto-generated algorithm into the given directory.

@param[in] code                             Code block containing the auto-generated algorithm.

\return SUCCESSFUL_RETURN

Reimplemented from ExportGaussElim.

Definition at line 100 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::getDataDeclarations ( ExportStatementBlock declarations,
ExportStruct  dataStruct = ACADO_ANY 
) const
virtual

Adds all data declarations of the auto-generated algorithm to given list of declarations.

@param[in] declarations             List of declarations.

\return SUCCESSFUL_RETURN

Reimplemented from ExportGaussElim.

Definition at line 55 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::getFunctionDeclarations ( ExportStatementBlock declarations) const
virtual

Adds all function (forward) declarations of the auto-generated algorithm to given list of declarations.

@param[in] declarations             List of declarations.

\return SUCCESSFUL_RETURN

Reimplemented from ExportGaussElim.

Definition at line 81 of file irk_4stage_simplified_newton_export.cpp.

const std::string ExportIRK4StageSimplifiedNewton::getNameSolveComplexFunction ( )
protected

Definition at line 417 of file irk_4stage_simplified_newton_export.cpp.

const std::string ExportIRK4StageSimplifiedNewton::getNameSolveComplexReuseFunction ( )
protected

Definition at line 423 of file irk_4stage_simplified_newton_export.cpp.

const std::string ExportIRK4StageSimplifiedNewton::getNameSolveComplexTransposeReuseFunction ( )
protected

Definition at line 429 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::setEigenvalues ( const DMatrix _eig)

This routine sets the eigenvalues of the inverse of the AA matrix.

Definition at line 385 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::setImplicit ( BooleanType  _implicit)

Definition at line 434 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::setStepSize ( double  _stepsize)

This routine sets the step size used in the IRK method.

Definition at line 410 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::setTransformations ( const DMatrix _transf1,
const DMatrix _transf2,
const DMatrix _transf1_T,
const DMatrix _transf2_T 
)

This routine sets the transformation matrices, defined by the inverse of the AA matrix.

Definition at line 396 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::setup ( )
virtual

Initializes code export into given file.

\return SUCCESSFUL_RETURN

Reimplemented from ExportGaussElim.

Definition at line 307 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::transformRightHandSide ( ExportStatementBlock code,
const ExportVariable b_mem1,
const ExportVariable b_mem2,
const ExportVariable b_full_,
const ExportVariable transf_,
const ExportIndex index,
const bool  transpose 
)
virtual

Exports source code of the auto-generated algorithm into the given directory.

@param[in] code                             Code block containing the auto-generated algorithm.

\return SUCCESSFUL_RETURN

Definition at line 201 of file irk_4stage_simplified_newton_export.cpp.

returnValue ExportIRK4StageSimplifiedNewton::transformSolution ( ExportStatementBlock code,
const ExportVariable b_mem1,
const ExportVariable b_mem2,
const ExportVariable b_full_,
const ExportVariable transf_,
const ExportIndex index,
const bool  transpose 
)
virtual

Exports source code of the auto-generated algorithm into the given directory.

@param[in] code                             Code block containing the auto-generated algorithm.

\return SUCCESSFUL_RETURN

Definition at line 247 of file irk_4stage_simplified_newton_export.cpp.

Member Data Documentation

ExportVariable ExportIRK4StageSimplifiedNewton::A_complex
protected

Variable containing the matrix of the complex linear system.

Definition at line 179 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::A_full
protected

Variable containing the matrix for the complete linear system.

Definition at line 189 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::A_mem_complex1
protected

Variable containing the factorized matrix of the complex linear system.

Definition at line 200 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::A_mem_complex2
protected

Variable containing the factorized matrix of the complex linear system.

Definition at line 202 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::b_complex
protected

Variable containing the right-hand side of the complex linear system and it will also contain the solution.

Definition at line 180 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::b_complex_trans
protected

Variable containing the right-hand side of the complex linear system and it will also contain the solution.

Definition at line 181 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::b_full
protected

Variable containing the right-hand side of the complete linear system and it will also contain the solution.

Definition at line 191 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::b_full_trans
protected

Variable containing the right-hand side of the complete linear system and it will also contain the solution.

Definition at line 192 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::b_mem_complex1
protected

Variable containing the right-hand side for the complex linear system.

Definition at line 201 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::b_mem_complex1_trans
protected

Variable containing the right-hand side for the complex linear system.

Definition at line 205 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::b_mem_complex2
protected

Variable containing the right-hand side for the complex linear system.

Definition at line 203 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::b_mem_complex2_trans
protected

Variable containing the right-hand side for the complex linear system.

Definition at line 206 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::determinant_complex
protected

Variable containing the matrix determinant.

Definition at line 174 of file irk_4stage_simplified_newton_export.hpp.

DMatrix ExportIRK4StageSimplifiedNewton::eig
protected

Definition at line 167 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::I_full
protected

Variable containing the matrix for the complete linear system.

Definition at line 190 of file irk_4stage_simplified_newton_export.hpp.

BooleanType ExportIRK4StageSimplifiedNewton::implicit
protected

Definition at line 165 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::rk_bPerm_complex
protected

Variable containing the reordered right-hand side.

Definition at line 176 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::rk_bPerm_complex_trans
protected

Variable containing the reordered right-hand side.

Definition at line 177 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::rk_perm_complex
protected

Variable containing the order of the rows.

Definition at line 182 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::rk_perm_full
protected

Variable containing the order of the rows.

Definition at line 193 of file irk_4stage_simplified_newton_export.hpp.

ExportVariable ExportIRK4StageSimplifiedNewton::rk_swap_complex
protected

Variable that is used to swap rows for pivoting.

Definition at line 175 of file irk_4stage_simplified_newton_export.hpp.

ExportFunction ExportIRK4StageSimplifiedNewton::solve_complex
protected

Function that solves the complex linear system.

Definition at line 184 of file irk_4stage_simplified_newton_export.hpp.

ExportFunction ExportIRK4StageSimplifiedNewton::solve_full
protected

Function that solves the complete linear system.

Definition at line 195 of file irk_4stage_simplified_newton_export.hpp.

ExportFunction ExportIRK4StageSimplifiedNewton::solveReuse_complex
protected

Function that solves a complex linear system with the same matrix, reusing previous results.

Definition at line 185 of file irk_4stage_simplified_newton_export.hpp.

ExportFunction ExportIRK4StageSimplifiedNewton::solveReuse_complexTranspose
protected

Function that solves a complex linear system with the same matrix, reusing previous results.

Definition at line 186 of file irk_4stage_simplified_newton_export.hpp.

ExportFunction ExportIRK4StageSimplifiedNewton::solveReuse_full
protected

Function that solves a complete linear system with the same matrix, reusing previous results.

Definition at line 196 of file irk_4stage_simplified_newton_export.hpp.

ExportFunction ExportIRK4StageSimplifiedNewton::solveReuseTranspose_full
protected

Function that solves a complete linear system with the same matrix, reusing previous results.

Definition at line 197 of file irk_4stage_simplified_newton_export.hpp.

double ExportIRK4StageSimplifiedNewton::stepsize
protected

Definition at line 166 of file irk_4stage_simplified_newton_export.hpp.

DMatrix ExportIRK4StageSimplifiedNewton::transf1
protected

Definition at line 168 of file irk_4stage_simplified_newton_export.hpp.

DMatrix ExportIRK4StageSimplifiedNewton::transf1_T
protected

Definition at line 170 of file irk_4stage_simplified_newton_export.hpp.

DMatrix ExportIRK4StageSimplifiedNewton::transf2
protected

Definition at line 169 of file irk_4stage_simplified_newton_export.hpp.

DMatrix ExportIRK4StageSimplifiedNewton::transf2_T
protected

Definition at line 171 of file irk_4stage_simplified_newton_export.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:23