next up previous
Next: potential_energy(int term, float *field_values) Up: Writing a Model File Previous: modelinfo(file *info)


This function is mainly included for the sake of flexibility. It is called once just before the initial field values are set and once afterwards. The input parameter which_call tells the function which of those times it is being called; it is set to $1$ or $2$ for the different calls. You can use this function for any initializations required by your model or to check that appropriate constants have been defined (e.g. if your model requires a certain number of fields). If you want to use an initialization different from the usual quantum modes for the fields you can do so here and then set the global variable no_initialization to one, which tells the program not to initialize quantum modes. Alternatively you can let the program do its usual initialization and then when this function is called a second time (i.e. when which_call=2) you can add to or otherwise alter the initial conditions.

Go to The LATTICEEASY Home Page
Go to Gary Felder's Home Page
Send email to Gary Felder at
Send email to Igor Tkachev at

This documentation was generated on 2008-01-21