sospin is hosted by Hepforge, IPPP Durham
SOSpin  1.0.0

Container for form specifications. More...

#include <include/form.h>

Public Member Functions

 ToForm (void)
 Constructor. More...
 
 ~ToForm ()
 Destructor. More...
 
void clear ()
 
bool function (string f)
 Store a field, one at each time $H^{ij}_{klm}$. More...
 
void contractions (string f)
 Store a type of contractions for the fields and (anti)symmetric options $H^{ij}_{klm}$. More...
 
string getFC ()
 Return all type of contractions for the fields. More...
 
string getFunction ()
 Returns all the field names. More...
 
void setFilename (string name)
 Sets the beginning of a input/output FORM file. More...
 
string file ()
 Returns the beginning of a input/output FORM file. More...
 
string & rpath ()
 Returns the full path name and form binary file. More...
 
void run (Braket &exp, bool print, bool all, string newidlabel)
 Simplify expression in FORM. Create file input for FORM and run the FORM program and return the result to file and/or screen. More...
 
bool getIndexSum ()
 
void setIndexSum (bool flag)
 
void setRenumber (bool flag=true)
 Set "renumber 1;" in FORM input file. This option is used to renumber indices in order to allow further simplifications However, in big expressions this must be avoid since it increases the computational time in FORM The best way to use is simplify the expression with FORM with this option unset, and then send a second time to FORM with this option active. More...
 
bool getRenumberOption ()
 
ToFormoperator<< (const string &func)
 Store a field, one at each time $H^{ij}_{klm}$. More...
 
ToFormoperator+ (const string &func)
 Store a type of contractions for the fields and (anti)symmetric options $H^{ij}_{klm}$. More...
 

Private Attributes

vector< string > Functions
 Function declaration storage. More...
 
vector< string > FormContraction
 Function contractions storage. More...
 
string filename
 Form input/output filename, input(output) filename is given by filename_in(_out).frm. More...
 
string resource_path
 Path to Form file. More...
 
bool formRenumber
 Set(true) or unset(false) "renumber 1;" in FORM. More...
 
bool indexSum
 Set(true) or unset(false) indice sum in FORM, useful when using expressions without fields. More...
 

Detailed Description

Container for form specifications.

Definition at line 123 of file form.h.

Constructor & Destructor Documentation

sospin::ToForm::ToForm ( void  )

Constructor.

Definition at line 61 of file form.cpp.

sospin::ToForm::~ToForm ( )

Destructor.

Definition at line 67 of file form.cpp.

Member Function Documentation

void sospin::ToForm::clear ( )

Clear all allocated memory and sets default values

Definition at line 72 of file form.cpp.

void sospin::ToForm::contractions ( string  func)

Store a type of contractions for the fields and (anti)symmetric options $H^{ij}_{klm}$.

Store all field contractions

is writted as "H23(i,j,k,l,m)" in bra/ket/braket constant part
form.contractions("antisymmetrize H23 1,2;");
form.contractions("antisymmetrize H23 3,4,5;");

The first entry corresponds to the antisymmetrization of the first two indices (upper indices) and the second to the antisymmetrization of the three lower indices

if there is only one or no indice there is no need to declare it.

Definition at line 343 of file form.cpp.

string sospin::ToForm::file ( )
inline

Returns the beginning of a input/output FORM file.

Definition at line 176 of file form.h.

bool sospin::ToForm::function ( string  func)

Store a field, one at each time $H^{ij}_{klm}$.

Store a field name

this is declared as
form.function("H23");

the first number (2) after the field name corresponds to the number of up indices

and the second (3) for the lower indices

if there are no up or lower indices then the respective position is filled with the zero number, "0".

Definition at line 320 of file form.cpp.

string sospin::ToForm::getFC ( )

Return all type of contractions for the fields.

Definition at line 352 of file form.cpp.

string sospin::ToForm::getFunction ( )

Returns all the field names.

Returns all the fields.

Definition at line 364 of file form.cpp.

bool sospin::ToForm::getIndexSum ( )

Returns the state of the indexSum flag

Definition at line 87 of file form.cpp.

bool sospin::ToForm::getRenumberOption ( )

Returns the state of the formRenumber flag

Definition at line 84 of file form.cpp.

ToForm & sospin::ToForm::operator+ ( const string &  func)

Store a type of contractions for the fields and (anti)symmetric options $H^{ij}_{klm}$.

is writted as "H23(i,j,k,l,m)" in bra/ket/braket constant part
form + "antisymmetrize H23 1,2;" + "antisymmetrize H23 3,4,5;";

The first entry corresponds to the antisymmetrization of the first two indices (upper indices) and the second to the antisymmetrization of the three lower indices

if there is only one or no indice there is no need to declare it.

Definition at line 412 of file form.cpp.

ToForm & sospin::ToForm::operator<< ( const string &  func)

Store a field, one at each time $H^{ij}_{klm}$.

this is declared as
form << "H23";

the first number (2) after the field name corresponds to the number of up indices

and the second (3) for the lower indices

if there are no up or lower indices then the respective position is filled with the zero number, "0".

Definition at line 393 of file form.cpp.

string& sospin::ToForm::rpath ( )
inline

Returns the full path name and form binary file.

Definition at line 180 of file form.h.

void sospin::ToForm::run ( Braket exp,
bool  print,
bool  all,
string  newidlabel 
)

Simplify expression in FORM. Create file input for FORM and run the FORM program and return the result to file and/or screen.

Parameters
[in,out]expBraket expression to be simplified in FORM, the result is written back
[in]printif TRUE prints final result to screen
[in]allif TRUE write all the expression members separately in ouput FORM file, if @ FALSE only writes the full result together.
[in]newindice label to be used when teh option to sum indices is active
void sospin::ToForm::setFilename ( string  name)

Sets the beginning of a input/output FORM file.

Definition at line 99 of file form.cpp.

void sospin::ToForm::setIndexSum ( bool  flag)

Sets the state of the indexSum flag

Definition at line 90 of file form.cpp.

void sospin::ToForm::setRenumber ( bool  flag = true)

Set "renumber 1;" in FORM input file. This option is used to renumber indices in order to allow further simplifications However, in big expressions this must be avoid since it increases the computational time in FORM The best way to use is simplify the expression with FORM with this option unset, and then send a second time to FORM with this option active.

By default this option is unset.

Definition at line 94 of file form.cpp.

Member Data Documentation

string sospin::ToForm::filename
private

Form input/output filename, input(output) filename is given by filename_in(_out).frm.

Definition at line 135 of file form.h.

vector<string> sospin::ToForm::FormContraction
private

Function contractions storage.

Definition at line 131 of file form.h.

bool sospin::ToForm::formRenumber
private

Set(true) or unset(false) "renumber 1;" in FORM.

Definition at line 143 of file form.h.

vector<string> sospin::ToForm::Functions
private

Function declaration storage.

Definition at line 127 of file form.h.

bool sospin::ToForm::indexSum
private

Set(true) or unset(false) indice sum in FORM, useful when using expressions without fields.

Definition at line 148 of file form.h.

string sospin::ToForm::resource_path
private

Path to Form file.

Definition at line 139 of file form.h.


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