yanera_quadrature.c File Reference


Detailed Description

This file containts the necessary function for creating the small slab represnetation of the rsld profile.

Definition in file yanera_quadrature.c.

Go to the source code of this file.

Functions

double slabs_trap (yanera_container *p, yanera_model *m, unsigned short i)
 Trapazoidal rule integration.
double slabs_midp (yanera_container *p, yanera_model *m, unsigned short i)
 Mipoint rule integration.
void slabs_insert (yanera_model *model, unsigned short j, double np)
 Add a slab.
void slabs_zero (yanera_model *model, double start, double end)
 Initializes the slabs for a model.
void slabs_doit (yanera_model *m, yanera_container *p)
 Do the quadrature.
void doQuadrature (yanera_model *model, yanera_container *yanera)
 Do the quadrature public function.
void yanera_write_slabs (yanera_container *yanera)
 Write the SLD profile to file.


Function Documentation

double slabs_trap ( yanera_container p,
yanera_model m,
unsigned short  i 
)

Parameters:
p The full yanea_container struct.
m The model currently being evaluated.
i The slab within the model currently being evaluated.
Returns:
The vlaue of the trapzoid area of i to i+1

Definition at line 24 of file yanera_quadrature.c.

double slabs_midp ( yanera_container p,
yanera_model m,
unsigned short  i 
)

Parameters:
p The full yanea_container struct.
m The model currently being evaluated.
i The slab within the model currently being evaluated.
Returns:
The vlaue of the rectangular area of i to i+1

Definition at line 34 of file yanera_quadrature.c.

void slabs_insert ( yanera_model model,
unsigned short  j,
double  np 
)

Parameters:
model The model currently being evaluated.
j The new number of the new slab.
np The z position of the new slab.
This function adds a new slab, and renumbers all the slabs at larger z values.

Definition at line 43 of file yanera_quadrature.c.

void slabs_zero ( yanera_model model,
double  start,
double  end 
)

Parameters:
model The model currently being evaluated.
start The start z position of the profile.
end The end z position of the profile.
This function initalizes a new slab section, starting with one interface and two slabs

Definition at line 61 of file yanera_quadrature.c.

void slabs_doit ( yanera_model m,
yanera_container p 
)

This function performs the logic of the quadrature.

Definition at line 73 of file yanera_quadrature.c.

void doQuadrature ( yanera_model model,
yanera_container yanera 
)

This is the function that should be called by fitting routines, etc., when a paramter changes and a new quadrature needs to be performed. It breakes up the profile into little slabs and stores the scattering length density, thickness of each slab so that the reflectivity can be calculated.

Definition at line 123 of file yanera_quadrature.c.

void yanera_write_slabs ( yanera_container yanera  ) 

If selected in the XML file, this function will write the scattering profile as little slabs to a file. This is useful to examine the correctnes of the quadrature.

Definition at line 173 of file yanera_quadrature.c.


Generated on Thu May 29 10:56:33 2008 by  doxygen 1.5.5