v2DM-DOCI  1.0
doci2DM::Lineq Class Reference

#include <Lineq.h>

+ Collaboration diagram for doci2DM::Lineq:

Public Member Functions

 Lineq (int L, int N, bool=false)
 
virtual ~Lineq ()=default
 
int gN () const
 
int gnr () const
 
int gL () const
 
const TPMgE (int) const
 
double ge (int) const
 
const TPMgE_ortho (int) const
 
double ge_ortho (int) const
 
const SUPgu_0 (int) const
 
const SUPgu_0_ortho (int) const
 
void check (const TPM &tpm) const
 
void orthogonalize ()
 

Private Member Functions

void constr_u_0 ()
 
void orthogonalize_u_0 ()
 

Private Attributes

std::vector< TPME
 double pointer to TPM object, will contain the linear equality constraints More...
 
std::vector< double > e
 pointer of doubles, will contain the values of the projections. (the desired equalities) More...
 
std::vector< TPME_ortho
 orthogonalized constraints, these will be hidden from the public. More...
 
std::vector< double > e_ortho
 the values accompanying the orthogonalized constraints More...
 
std::vector< SUPu_0
 will contain the matrices that span u^0 space More...
 
std::vector< SUPu_0_ortho
 will contain the orthogonalized matrices that span u^0 space More...
 
int N
 nr of particles More...
 
int L
 nr of sp orbs More...
 

Friends

std::ostream & operator<< (std::ostream &output, Lineq &lineq_p)
 

Detailed Description

Author
Brecht Verstichel
Date
09-09-2010

This is a class written for handling linear equality constraints in the program. Contains a collection of the matrices on which the tpm has to have a certain projection, these values are stored in a pointer of doubles.

Definition at line 43 of file Lineq.h.

Constructor & Destructor Documentation

Lineq::Lineq ( int  L,
int  N,
bool  partial_trace = false 
)

standard constructor, only norm and DOCI constraints

Parameters
Lnr of levels
Nnr of particles
partial_traceuse constraints for the block and vector seperatly

Definition at line 36 of file Lineq.cpp.

+ Here is the call graph for this function:

virtual doci2DM::Lineq::~Lineq ( )
virtualdefault

Member Function Documentation

void Lineq::check ( const TPM tpm) const

Definition at line 321 of file Lineq.cpp.

+ Here is the call graph for this function:

void Lineq::constr_u_0 ( )
private

construct's the u_0 matrices with the input provided in the constructor. Again reusable code for the different constructers. and again private because I say so.

Definition at line 243 of file Lineq.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const TPM & Lineq::gE ( int  i) const

access to the individual constraint TPM's

Parameters
ithe index
Returns
The E TPM on index i.

Definition at line 113 of file Lineq.cpp.

+ Here is the caller graph for this function:

double Lineq::ge ( int  i) const

access to the individual constraint values

Parameters
ithe index
Returns
the e values on index i: e[i] or something

Definition at line 123 of file Lineq.cpp.

+ Here is the caller graph for this function:

const TPM & Lineq::gE_ortho ( int  i) const

access to the individual orthogonalized constraint TPM's: private function

Parameters
ithe index
Returns
The E_ortho TPM on index i.

Definition at line 133 of file Lineq.cpp.

+ Here is the caller graph for this function:

double Lineq::ge_ortho ( int  i) const

access to the individual orthogonalized constraint values: private function

Parameters
ithe index
Returns
the e values on index i: e_ortho[i] or something

Definition at line 143 of file Lineq.cpp.

+ Here is the caller graph for this function:

int Lineq::gL ( ) const
Returns
nr of sp orbitals

Definition at line 103 of file Lineq.cpp.

int Lineq::gN ( ) const
Returns
nr of particles

Definition at line 87 of file Lineq.cpp.

int Lineq::gnr ( ) const
Returns
nr of constraints

Definition at line 95 of file Lineq.cpp.

+ Here is the caller graph for this function:

const SUP & Lineq::gu_0 ( int  i) const

access to the u_0 matrices

Parameters
ithe index of the specific u_0 matrix you are interested in.
Returns
u_0[i]

Definition at line 224 of file Lineq.cpp.

+ Here is the caller graph for this function:

const SUP & Lineq::gu_0_ortho ( int  i) const

access to the orthogonalized u_0 matrices

Parameters
ithe index of the specific u_0_ortho matrix you are interested in.
Returns
u_0_ortho[i]

Definition at line 234 of file Lineq.cpp.

void Lineq::orthogonalize ( )

orthogonalize the constraints, will take E and e, and construct E_ortho and e_ortho with them.

Definition at line 179 of file Lineq.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Lineq::orthogonalize_u_0 ( )
private

orthogonalize the u_0 matrices, will take the u_0's and construct the u_0_ortho's.

Definition at line 262 of file Lineq.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  output,
doci2DM::Lineq lineq_p 
)
friend

Output stream operator overloaded: prints all the constraint matrices with a whitespace between them.

Parameters
outputThe stream to which you are writing (e.g. cout)
lineq_pThe Lineq you want to print

Definition at line 150 of file Lineq.cpp.

Member Data Documentation

std::vector<TPM> doci2DM::Lineq::E
private

double pointer to TPM object, will contain the linear equality constraints

Definition at line 87 of file Lineq.h.

std::vector<double> doci2DM::Lineq::e
private

pointer of doubles, will contain the values of the projections. (the desired equalities)

Definition at line 89 of file Lineq.h.

std::vector<TPM> doci2DM::Lineq::E_ortho
private

orthogonalized constraints, these will be hidden from the public.

Definition at line 92 of file Lineq.h.

std::vector<double> doci2DM::Lineq::e_ortho
private

the values accompanying the orthogonalized constraints

Definition at line 94 of file Lineq.h.

int doci2DM::Lineq::L
private

nr of sp orbs

Definition at line 106 of file Lineq.h.

int doci2DM::Lineq::N
private

nr of particles

Definition at line 103 of file Lineq.h.

std::vector<SUP> doci2DM::Lineq::u_0
private

will contain the matrices that span u^0 space

Definition at line 97 of file Lineq.h.

std::vector<SUP> doci2DM::Lineq::u_0_ortho
private

will contain the orthogonalized matrices that span u^0 space

Definition at line 100 of file Lineq.h.


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