Package aloha :: Module aloha_writers :: Class ALOHAWriterForCPP
[hide private]
[frames] | no frames]

Class ALOHAWriterForCPP

source code

WriteALOHA --+
             |
            ALOHAWriterForCPP
Known Subclasses:

Routines for writing out helicity amplitudes as C++ .h and .cc files.

Nested Classes [hide private]
  writer
Routines for writing C++ lines.
Instance Methods [hide private]
 
change_number_format(self, number)
Formating the number
source code
 
shift_indices(self, match)
shift the indices for non impulsion object
source code
 
change_var_format(self, name)
Format the variable name to C++ format
source code
 
get_fct_format(self, fct)
Put the function in the correct format
source code
 
get_header_txt(self, name=None, couplings=None, mode='')
Define the Header of the fortran file.
source code
 
get_declaration_txt(self, add_i=True)
Prototype for how to write the declaration of variable Include the symmetry line (entry FFV_2)
source code
 
get_foot_txt(self)
Prototype for language specific footer
source code
 
get_momenta_txt(self)
Define the Header of the fortran file.
source code
 
get_one_momenta_def(self, i, strfile) source code
 
define_expression(self)
Write the helicity amplitude in C++ format
source code
 
define_symmetry(self, new_nb, couplings=None)
Write the call for symmetric routines
source code
 
get_h_text(self, couplings=None)
Return the full contents of the .h file
source code
 
write_combined_cc(self, lor_names, offshell=None, sym=True, mode='')
Return the content of the .cc file linked to multiple lorentz call.
source code
 
write(self, **opt)
Write the .h and .cc files
source code
 
write_combined(self, lor_names, mode='', offshell=None, **opt)
Write the .h and .cc files associated to the combined file
source code

Inherited from WriteALOHA: __init__, define_argument_list, define_content, get_P_sign, get_momentum_conservation_sign, make_call_list, make_declaration_list, pass_to_HELAS, write_MultContainer, write_MultVariable, write_indices_part, write_obj, write_obj_Add, write_variable, write_variable_id

Class Variables [hide private]
  extension = '.c'
  type2def = {'complex': 'std::complex<double> ', 'double': 'dou...
  realoperator = '.real()'
  imagoperator = '.imag()'
  ci_definition = 'static std::complex<double> cI = std::complex...
  remove_double = re.compile(r'std::complex<double> (?P<name>\w+...

Inherited from WriteALOHA: power_symbol, type_to_size, type_to_variable

Method Details [hide private]

change_number_format(self, number)

source code 

Formating the number

Overrides: change_number_format

change_var_format(self, name)

source code 

Format the variable name to C++ format

Overrides: WriteALOHA.change_var_format

get_header_txt(self, name=None, couplings=None, mode='')

source code 

Define the Header of the fortran file. This include

  • function tag
  • definition of variable
Overrides: WriteALOHA.get_header_txt

get_declaration_txt(self, add_i=True)

source code 

Prototype for how to write the declaration of variable Include the symmetry line (entry FFV_2)

Overrides: WriteALOHA.get_declaration_txt

get_foot_txt(self)

source code 

Prototype for language specific footer

Overrides: WriteALOHA.get_foot_txt

get_momenta_txt(self)

source code 

Define the Header of the fortran file. This include

  • momentum conservation
  • definition of the impulsion
Overrides: WriteALOHA.get_momenta_txt

write(self, **opt)

source code 

Write the .h and .cc files

Overrides: WriteALOHA.write

Class Variable Details [hide private]

type2def

Value:
{'complex': 'std::complex<double> ',
 'double': 'double ',
 'int': 'int '}

ci_definition

Value:
'''static std::complex<double> cI = std::complex<double>(0.,1.);
'''

remove_double

Value:
re.compile(r'std::complex<double> (?P<name>\w+)\[\]')