TBTK
Need a break? Support the development by playing Polarity Puzzles
TBTK::Solver::Solver Class Reference

Base class for Solvers. More...

#include <Solver.h>

Inheritance diagram for TBTK::Solver::Solver:
TBTK::Solver::ArnoldiIterator TBTK::Solver::BlockDiagonalizer TBTK::Solver::ChebyshevExpander TBTK::Solver::Diagonalizer TBTK::Solver::LinearEquationSolver

Public Member Functions

 Solver ()
 
virtual ~Solver ()
 
virtual void setModel (Model &model)
 
ModelgetModel ()
 
const ModelgetModel () const
 

Detailed Description

Base class for Solvers.

The Solver is a base class for other Solvers. See therefore the documentation for the Diagonalizer, BlockDiagonalizer, ArnoldiIterator, and ChebyshevExpander examples of specific production ready Solvers.

Example

#include "TBTK/Model.h"
#include "TBTK/Streams.h"
#include "TBTK/TBTK.h"
using namespace TBTK;
int main(){
Model model;
model.setTemperature(300);
solver.setModel(model);
Streams::out << solver.getModel() << "\n";
}

Output

Model
Temperature: 300K (300 n.u.)
Chemical potential: 10eV (10 n.u.)
Statistics: Fermi-Dirac
Basis size: Not yet constructed.

Constructor & Destructor Documentation

◆ Solver()

TBTK::Solver::Solver::Solver ( )

Constructs a Solver::Solver.

◆ ~Solver()

virtual TBTK::Solver::Solver::~Solver ( )
virtual

Destructor.

Member Function Documentation

◆ getModel() [1/2]

const Model & TBTK::Solver::Solver::getModel ( )
inline

Get model.

Returns
The Model that the Solver is solving.

◆ getModel() [2/2]

const Model& TBTK::Solver::Solver::getModel ( ) const

Get model.

Returns
The Model that the Solver is solving.

◆ setModel()

void TBTK::Solver::Solver::setModel ( Model model)
inlinevirtual

Set model to solve.

Parameters
modelThe Model that is to be solved.

The documentation for this class was generated from the following file:
TBTK::Model
Container of Model related information.
Definition: Model.h:57
Model.h
Container of Model related information.
Streams.h
Streams for TBTK output.
TBTK::Model::setChemicalPotential
void setChemicalPotential(double chemicalPotential)
Definition: Model.h:347
Solver.h
Base class for Solvers.
TBTK::Initialize
void Initialize()
TBTK::Solver::Solver::setModel
virtual void setModel(Model &model)
Definition: Solver.h:69
TBTK::Model::setTemperature
void setTemperature(double temperature)
Definition: Model.h:339
TBTK::Streams::out
static std::ostream out
Definition: Streams.h:70
TBTK::Solver::Solver::getModel
Model & getModel()
Definition: Solver.h:73
TBTK::Solver::Solver
Base class for Solvers.
Definition: Solver.h:42
TBTK.h
TBTK initialization.