ScaFaCoS  1.0.1
Scalable Fast Coulomb Solvers
fcs_fmm_p.h File Reference

file containing all fmm specific functions (public version) More...

#include "fcs_definitions.h"
#include "fcs_result_p.h"
#include "fcs_interface_p.h"
+ Include dependency graph for fcs_fmm_p.h:

Go to the source code of this file.

Macros

#define FCS_FMM_COULOMB   64
 
#define FCS_FMM_CUSP   65
 
#define FCS_FMM_NO_DIPOLE_CORRECTION   -1
 
#define FCS_FMM_STANDARD_DIPOLE_CORRECTION   0
 
#define FCS_FMM_ACTIVE_DIPOLE_CORRECTION   1
 
#define FCS_FMM_STANDARD_ERROR   0
 
#define FCS_FMM_CUSTOM_ABSOLUTE   1
 
#define FCS_FMM_CUSTOM_RELATIVE   2
 
#define FCS_FMM_INHOMOGENOUS_SYSTEM   1LL
 
#define FCS_FMM_HOMOGENOUS_SYSTEM   0LL
 

Typedefs

typedef struct fcs_fmm_parameters_t * fcs_fmm_parameters
 

Functions

FCSResult fcs_fmm_set_absrel (FCS handle, fcs_int choice)
 function to set the optional fmm absrel parameter More...
 
FCSResult fcs_fmm_get_absrel (FCS handle, fcs_int *absrel)
 function to get the optional fmm absrel parameter More...
 
FCSResult fcs_fmm_set_tolerance_energy (FCS handle, fcs_float tolerance_energy)
 function to set the optional fmm deltaE parameter, which gives the energy tolerance for the FMM More...
 
FCSResult fcs_fmm_get_tolerance_energy (FCS handle, fcs_float *tolerance_energy)
 function to get the optional fmm energy tolerance (deltaE) parameter More...
 
FCSResult fcs_fmm_set_dipole_correction (FCS handle, fcs_int dipole_correction)
 function to set the optional fmm energy tolerance (deltaE) parameter More...
 
FCSResult fcs_fmm_get_dipole_correction (FCS handle, fcs_int *dipole_correction)
 function to get the optional fmm dipole correction parameter More...
 
FCSResult fcs_fmm_set_potential (FCS handle, fcs_int coulomb)
 function to set the fmm parameter parameter More...
 
FCSResult fcs_fmm_get_potential (FCS handle, fcs_int *coulomb)
 function to get the fmm coulomb parameter More...
 
FCSResult fcs_fmm_set_internal_tuning (FCS handle, fcs_int system)
 function to set the fmm internal tuning parameter More...
 
FCSResult fcs_fmm_get_internal_tuning (FCS handle, fcs_int *system)
 function to get the fmm internal tuning parameter More...
 
FCSResult fcs_fmm_set_cusp_radius (FCS handle, fcs_float radius)
 function to set the fmm cusp radius parameter More...
 
FCSResult fcs_fmm_get_cusp_radius (FCS handle, fcs_float *cusp_radius)
 function to get the fmm cusp radius parameter More...
 
FCSResult fcs_fmm_set_maxdepth (FCS handle, fcs_int depth)
 function to set the optional fmm absrel parameter More...
 
FCSResult fcs_fmm_get_maxdepth (FCS handle, fcs_int *depth)
 function to get the optional fmm absrel parameter More...
 
FCSResult fcs_fmm_set_unroll_limit (FCS handle, fcs_int limit)
 function to set the optional fmm absrel parameter More...
 
FCSResult fcs_fmm_get_unroll_limit (FCS handle, fcs_int *limit)
 function to get the optional fmm absrel parameter More...
 
FCSResult fcs_fmm_set_balanceload (FCS handle, fcs_int load)
 function to set the optional fmm absrel parameter More...
 
FCSResult fcs_fmm_get_balanceload (FCS handle, fcs_int *load)
 function to get the optional fmm absrel parameter More...
 
FCSResult fcs_fmm_set_define_loadvector (FCS handle, fcs_int define_loadvector)
 function to set the optional fmm loadvector parameter More...
 
FCSResult fcs_fmm_get_define_loadvector (FCS handle, fcs_int *define_loadvector)
 
FCSResult fcs_fmm_setup (FCS handle, fcs_int absrel, fcs_float tolerance_energy, fcs_int dipole_correction, fcs_int system, fcs_int maxdepth, fcs_int unroll_limit, fcs_int load)
 
void fcs_fmm_setup_f (void *handle, fcs_int absrel, fcs_float tolerance_energy, fcs_int dipole_correction, fcs_int *return_value)
 

Detailed Description

file containing all fmm specific functions (public version)

Author
Rene Halver

Definition in file fcs_fmm_p.h.

Macro Definition Documentation

◆ FCS_FMM_ACTIVE_DIPOLE_CORRECTION

#define FCS_FMM_ACTIVE_DIPOLE_CORRECTION   1

Definition at line 47 of file fcs_fmm_p.h.

◆ FCS_FMM_COULOMB

#define FCS_FMM_COULOMB   64

Definition at line 41 of file fcs_fmm_p.h.

◆ FCS_FMM_CUSP

#define FCS_FMM_CUSP   65

Definition at line 42 of file fcs_fmm_p.h.

◆ FCS_FMM_CUSTOM_ABSOLUTE

#define FCS_FMM_CUSTOM_ABSOLUTE   1

Definition at line 49 of file fcs_fmm_p.h.

◆ FCS_FMM_CUSTOM_RELATIVE

#define FCS_FMM_CUSTOM_RELATIVE   2

Definition at line 50 of file fcs_fmm_p.h.

◆ FCS_FMM_HOMOGENOUS_SYSTEM

#define FCS_FMM_HOMOGENOUS_SYSTEM   0LL

Definition at line 53 of file fcs_fmm_p.h.

◆ FCS_FMM_INHOMOGENOUS_SYSTEM

#define FCS_FMM_INHOMOGENOUS_SYSTEM   1LL

Definition at line 52 of file fcs_fmm_p.h.

◆ FCS_FMM_NO_DIPOLE_CORRECTION

#define FCS_FMM_NO_DIPOLE_CORRECTION   -1

Definition at line 43 of file fcs_fmm_p.h.

◆ FCS_FMM_STANDARD_DIPOLE_CORRECTION

#define FCS_FMM_STANDARD_DIPOLE_CORRECTION   0

Definition at line 44 of file fcs_fmm_p.h.

◆ FCS_FMM_STANDARD_ERROR

#define FCS_FMM_STANDARD_ERROR   0

Definition at line 48 of file fcs_fmm_p.h.

Typedef Documentation

◆ fcs_fmm_parameters

typedef struct fcs_fmm_parameters_t* fcs_fmm_parameters

Definition at line 39 of file fcs_fmm_p.h.

Function Documentation

◆ fcs_fmm_get_absrel()

FCSResult fcs_fmm_get_absrel ( FCS  handle,
fcs_int *  absrel 
)

function to get the optional fmm absrel parameter

Parameters
handleFCS-object that contains the parameter
absrelpointer to fcs_int
Returns
FCSResult-object containing the return state

◆ fcs_fmm_get_balanceload()

FCSResult fcs_fmm_get_balanceload ( FCS  handle,
fcs_int *  load 
)

function to get the optional fmm absrel parameter

Parameters
handleFCS-object that contains the parameter
loadfcs_int containing the load balancing status
Returns
FCSResult-object containing the return state

◆ fcs_fmm_get_cusp_radius()

FCSResult fcs_fmm_get_cusp_radius ( FCS  handle,
fcs_float *  cusp_radius 
)

function to get the fmm cusp radius parameter

Parameters
handleFCS-object that contains the parameter
cusp_radiuspointer to fcs_float variable where the function returns the cusp radius
Returns
FCSResult-object containing the return state

◆ fcs_fmm_get_define_loadvector()

FCSResult fcs_fmm_get_define_loadvector ( FCS  handle,
fcs_int *  define_loadvector 
)

◆ fcs_fmm_get_dipole_correction()

FCSResult fcs_fmm_get_dipole_correction ( FCS  handle,
fcs_int *  dipole_correction 
)

function to get the optional fmm dipole correction parameter

Parameters
handleFCS-object that contains the parameter
dipole_correctionpointer to fcs_int variable where the function returns the dipole correction
Returns
the parameter dipole correction

◆ fcs_fmm_get_internal_tuning()

FCSResult fcs_fmm_get_internal_tuning ( FCS  handle,
fcs_int *  system 
)

function to get the fmm internal tuning parameter

Parameters
handleFCS-object that contains the parameter
systempointer to fcs_int variable stating which kind of system is used
Returns
FCSResult-object containing the return state

◆ fcs_fmm_get_maxdepth()

FCSResult fcs_fmm_get_maxdepth ( FCS  handle,
fcs_int *  depth 
)

function to get the optional fmm absrel parameter

Parameters
handleFCS-object that contains the parameter
depthfcs_int containing the set maximum tree depth
Returns
FCSResult-object containing the return state

◆ fcs_fmm_get_potential()

FCSResult fcs_fmm_get_potential ( FCS  handle,
fcs_int *  coulomb 
)

function to get the fmm coulomb parameter

Parameters
handleFCS-object that contains the parameter
coulombpointer to fcs_int variable where the function returns the potential parameter
Returns
FCSResult-object containing the return state

◆ fcs_fmm_get_tolerance_energy()

FCSResult fcs_fmm_get_tolerance_energy ( FCS  handle,
fcs_float *  tolerance_energy 
)

function to get the optional fmm energy tolerance (deltaE) parameter

Parameters
handleFCS-object that contains the parameter
tolerance_energypointer to a fcs_float variable (only applicable if absrel is either 1 or 2)
Returns
FCSResult-object containing the return state

◆ fcs_fmm_get_unroll_limit()

FCSResult fcs_fmm_get_unroll_limit ( FCS  handle,
fcs_int *  limit 
)

function to get the optional fmm absrel parameter

Parameters
handleFCS-object that contains the parameter
limitfcs_int containing the limit for the unrolled functions
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_absrel()

FCSResult fcs_fmm_set_absrel ( FCS  handle,
fcs_int  choice 
)

function to set the optional fmm absrel parameter

Parameters
handleFCS-object that is modified
choicechoice for fmm which error boundary should be used: FCS_FMM_STANDARD_ERROR - relative error with 10^(-3) FCS_FMM_CUSTOM_RELATIVE - relative error with deltaE FCS_FMM_CUSTOM_ABSOLUTE - absolute error with deltaE
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_balanceload()

FCSResult fcs_fmm_set_balanceload ( FCS  handle,
fcs_int  load 
)

function to set the optional fmm absrel parameter

Parameters
handleFCS-object that is modified
loadfcs_int activates load balancing routines (0 (deactivated) or 1 (activated))
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_cusp_radius()

FCSResult fcs_fmm_set_cusp_radius ( FCS  handle,
fcs_float  radius 
)

function to set the fmm cusp radius parameter

Parameters
handleFCS-object that is modified
radiusfcs_float the radius for the cusp potential
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_define_loadvector()

FCSResult fcs_fmm_set_define_loadvector ( FCS  handle,
fcs_int  define_loadvector 
)

function to set the optional fmm loadvector parameter

Parameters
handleFCS-object that contains the parameter
define_loadvectorfcs_int containing the load balancing initialization status
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_dipole_correction()

FCSResult fcs_fmm_set_dipole_correction ( FCS  handle,
fcs_int  dipole_correction 
)

function to set the optional fmm energy tolerance (deltaE) parameter

Parameters
handleFCS-object that is modified
dipole_correctionchooses which form of dipole correction fmm should use: FCS_FMM_NO_DIPOLE_CORRECTION no dipole correction FCS_FMM_STANDARD_DIPOLE_CORRECTION standard dipole correction FCS_FMM_ACTIVE_DIPOLE_CORRECTION dipole correction activated
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_internal_tuning()

FCSResult fcs_fmm_set_internal_tuning ( FCS  handle,
fcs_int  system 
)

function to set the fmm internal tuning parameter

Parameters
handleFCS-object that is modified
systemfcs_int defining the kind of system to tune for
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_maxdepth()

FCSResult fcs_fmm_set_maxdepth ( FCS  handle,
fcs_int  depth 
)

function to set the optional fmm absrel parameter

Parameters
handleFCS-object that is modified
depthfcs_int containing the maximum tree depth for the FMM (0 to 19)
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_potential()

FCSResult fcs_fmm_set_potential ( FCS  handle,
fcs_int  coulomb 
)

function to set the fmm parameter parameter

Parameters
handleFCS-object that is modified
coulombfcs_int indicates if coulomb potential is used FCS_FMM_COULOMB if coulomb potential is not used FCS_FMM_CUSP if cusp potential is used (exclusive to FFM_cusp!)
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_tolerance_energy()

FCSResult fcs_fmm_set_tolerance_energy ( FCS  handle,
fcs_float  tolerance_energy 
)

function to set the optional fmm deltaE parameter, which gives the energy tolerance for the FMM

Parameters
handleFCS-object that is modified
tolerance_energythe error boundary to be used by fmm (only applicable if absrel is either 1 or 2)
Returns
FCSResult-object containing the return state

◆ fcs_fmm_set_unroll_limit()

FCSResult fcs_fmm_set_unroll_limit ( FCS  handle,
fcs_int  limit 
)

function to set the optional fmm absrel parameter

Parameters
handleFCS-object that is modified
limitfcs_int the limit for unrolled functions within the FMM (0 to 50)
Returns
FCSResult-object containing the return state

◆ fcs_fmm_setup()

FCSResult fcs_fmm_setup ( FCS  handle,
fcs_int  absrel,
fcs_float  tolerance_energy,
fcs_int  dipole_correction,
fcs_int  system,
fcs_int  maxdepth,
fcs_int  unroll_limit,
fcs_int  load 
)

◆ fcs_fmm_setup_f()

void fcs_fmm_setup_f ( void *  handle,
fcs_int  absrel,
fcs_float  tolerance_energy,
fcs_int  dipole_correction,
fcs_int *  return_value 
)