ScaFaCoS  1.0.1
Scalable Fast Coulomb Solvers
fcs_interface_p.h File Reference

public interface definitions for the main solver-independent functionality of the ScaFaCoS library More...

#include <mpi.h>
#include "fcs_definitions.h"
#include "fcs_result_p.h"
+ Include dependency graph for fcs_interface_p.h:

Go to the source code of this file.

Macros

#define FCS_NULL   NULL
 
#define fcs_set_dimension   fcs_set_dimensions
 
#define fcs_get_dimension   fcs_get_dimensions
 
#define fcs_set_offset   fcs_set_box_origin
 
#define fcs_get_offset   fcs_get_box_origin
 
#define fcs_printHandle   fcs_print_parameters
 
#define fcs_method_has_near   fcs_delegate_near_field
 
#define fcs_parser   fcs_set_parameters
 
#define fcs_require_virial   fcs_set_compute_virial
 

Typedefs

typedef struct _FCS_t * FCS
 FCS-object representing an FCS solver. More...
 

Functions

FCSResult fcs_init (FCS *new_handle, const char *method_name, MPI_Comm communicator)
 function to initialize an FCS solver More...
 
FCSResult fcs_destroy (FCS handle)
 function to destroy an FCS solver More...
 
fcs_int fcs_get_method (FCS handle)
 function to return the numerical identifier of the solver method More...
 
const char * fcs_get_method_name (FCS handle)
 function to return the name of the solver method More...
 
MPI_Comm fcs_get_communicator (FCS handle)
 function to return the MPI communicator used for the parallel execution More...
 
FCSResult fcs_set_common (FCS handle, fcs_int near_field_flag, const fcs_float *box_a, const fcs_float *box_b, const fcs_float *box_c, const fcs_float *box_origin, const fcs_int *periodicity, fcs_int total_particles)
 function to set all obligatory parameters for an FCS solver More...
 
FCSResult fcs_set_dimensions (FCS handle, fcs_int dim)
 function to set the dimensions of the system More...
 
fcs_int fcs_get_dimensions (FCS handle)
 function to return the dimensions of the system More...
 
FCSResult fcs_set_near_field_flag (FCS handle, fcs_int near_field_flag)
 function to set the near-field flag More...
 
fcs_int fcs_get_near_field_flag (FCS handle)
 function to return the near-field flag More...
 
FCSResult fcs_set_redistribute (FCS handle, fcs_int redistribute)
 function to set the redistribution of particles before the computations (and back after the computations) More...
 
fcs_int fcs_get_redistribute (FCS handle)
 function to return the particle redistribution setting More...
 
FCSResult fcs_set_box_a (FCS handle, const fcs_float *box_a)
 function to set the first base vector of the system box More...
 
const fcs_float * fcs_get_box_a (FCS handle)
 function to return the first base vector of the system box More...
 
FCSResult fcs_set_box_b (FCS handle, const fcs_float *box_b)
 function to set the second base vector of the system box More...
 
const fcs_float * fcs_get_box_b (FCS handle)
 function to return the second base vector of the system box More...
 
FCSResult fcs_set_box_c (FCS handle, const fcs_float *box_c)
 function to set the third base vector of the system box More...
 
const fcs_float * fcs_get_box_c (FCS handle)
 function to return the third base vector of the system box More...
 
FCSResult fcs_set_box_origin (FCS handle, const fcs_float *box_origin)
 function to set the origin vector of the system box More...
 
const fcs_float * fcs_get_box_origin (FCS handle)
 function function to return the origin vector of the system box More...
 
FCSResult fcs_set_periodicity (FCS handle, const fcs_int *periodicity)
 function to set the periodicity of the system More...
 
const fcs_int * fcs_get_periodicity (FCS handle)
 function to return the periodicity of the system More...
 
FCSResult fcs_set_total_particles (FCS handle, fcs_int total_particles)
 function to set the total number of particles in the system More...
 
fcs_int fcs_get_total_particles (FCS handle)
 function to return the total number of particles in the system More...
 
FCSResult fcs_set_max_local_particles (FCS handle, fcs_int max_local_particles)
 function to set the maximum number of particles that can be stored in the specified local particle data arrays More...
 
fcs_int fcs_get_max_local_particles (FCS handle)
 function to return the maximum number of particles that can be stored in the specified local particle data arrays More...
 
FCSResult fcs_set_tolerance (FCS handle, fcs_int tolerance_type, fcs_float tolerance)
 function to set the error tolerance of the FCS solver More...
 
FCSResult fcs_get_tolerance (FCS handle, fcs_int *tolerance_type, fcs_float *tolerance)
 function to return the error tolerance of the FCS solver More...
 
FCSResult fcs_set_r_cut (FCS handle, fcs_float r_cut)
 function to set a user-defined cutoff radius for the near-field computations of the FCS solver (if supported) More...
 
FCSResult fcs_unset_r_cut (FCS handle)
 function to disable a user-defined cutoff radius for the near-field computations of the FCS solver (if supported) More...
 
FCSResult fcs_get_r_cut (FCS handle, fcs_float *r_cut)
 function to return the user-defined cutoff radius for the near-field computations of the FCS solver (if supported) More...
 
FCSResult fcs_set_parameters (FCS handle, const char *parameters, fcs_int continue_on_errors)
 function to set the parameters of the FCS solver based on a parameter string More...
 
FCSResult fcs_print_parameters (FCS handle)
 function to print the parameters of an FCS solver to stdout More...
 
FCSResult fcs_tune (FCS handle, fcs_int local_particles, fcs_float *positions, fcs_float *charges)
 function to tune method specific parameters depending on the particles More...
 
FCSResult fcs_run (FCS handle, fcs_int local_particles, fcs_float *positions, fcs_float *charges, fcs_float *field, fcs_float *potentials)
 function to run the solver method More...
 
FCSResult fcs_compute_dipole_correction (FCS handle, fcs_int local_particles, fcs_float *positions, fcs_float *charges, fcs_float epsilon, fcs_float *field_correction, fcs_float *energy_correction)
 function to compute the correction to the field and total energy when periodic boundary conditions with a finite dielectric constant of the surrounding medium epsilon are used More...
 
FCSResult fcs_get_near_field_delegation (FCS handle, fcs_int *near_field_delegation)
 function to return whether the solver method supports the delegation of near-field computations to an external application More...
 
FCSResult fcs_compute_near (FCS handle, fcs_float dist, fcs_float *potential, fcs_float *field)
 function to compute the near-field components of the potential and the field for the solver method More...
 
FCSResult fcs_compute_near_potential (FCS handle, fcs_float dist, fcs_float *potential)
 function to compute the near-field component of the potential for the solver method More...
 
FCSResult fcs_compute_near_field (FCS handle, fcs_float dist, fcs_float *field)
 function to compute the near-field component of the field for the solver method More...
 
FCSResult fcs_set_compute_virial (FCS handle, fcs_int compute_virial)
 function to set whether the virial should be computed More...
 
FCSResult fcs_get_compute_virial (FCS handle, fcs_int *compute_virial)
 function to return whether the virial should be computed More...
 
FCSResult fcs_get_virial (FCS handle, fcs_float *virial)
 function to return the comuputed virial More...
 
FCSResult fcs_set_max_particle_move (FCS handle, fcs_float max_particle_move)
 function to set the maximum distance the particles have moved since the call of fcs_run More...
 
FCSResult fcs_set_resort (FCS handle, fcs_int resort)
 function to set whether resort support is requested (default is no resort support) if resort support is requested (and supported by the solver) then the solver tries to retain its sorted particle data order, i.e., the distribution and order of the given particles is changed by fcs_run such that the position, charge, field, and potential values correspond to the sorted particle order of the solver, this can only be performed successfully if the local sizes of the particle arrays (specified by the local_max_particles of fcs_run) on all processes are large enough to store the sorted particle order, after performing fcs_run, function fcs_get_resort_availability can be used to determine whether resort support is available or not, if resort support is available then fcs_get_resort_particles returns the new local number of particles and fcs_resort_[ints,floats,bytes] can be used to bring additional particle data into the new sorted order More...
 
FCSResult fcs_get_resort (FCS handle, fcs_int *resort)
 function to return whether resort support is requested More...
 
FCSResult fcs_get_resort_availability (FCS handle, fcs_int *availability)
 function to return whether resort support is available after executing fcs_run More...
 
FCSResult fcs_get_resort_particles (FCS handle, fcs_int *resort_particles)
 function to return the new local number of particles More...
 
FCSResult fcs_resort_ints (FCS handle, fcs_int *src, fcs_int *dst, fcs_int n)
 function to sort additional integer particle data into the new sorted particle order More...
 
FCSResult fcs_resort_floats (FCS handle, fcs_float *src, fcs_float *dst, fcs_int n)
 function to sort additional float particle data into the new sorted particle order More...
 
FCSResult fcs_resort_bytes (FCS handle, void *src, void *dst, fcs_int n)
 function to sort additional byte particle data into the new sorted particle order More...
 

Detailed Description

public interface definitions for the main solver-independent functionality of the ScaFaCoS library

Author
Rene Halver, Olaf Lenz, Michael Hofmann

Definition in file fcs_interface_p.h.

Macro Definition Documentation

◆ fcs_get_dimension

#define fcs_get_dimension   fcs_get_dimensions

Definition at line 521 of file fcs_interface_p.h.

◆ fcs_get_offset

#define fcs_get_offset   fcs_get_box_origin

Definition at line 523 of file fcs_interface_p.h.

◆ fcs_method_has_near

#define fcs_method_has_near   fcs_delegate_near_field

Definition at line 525 of file fcs_interface_p.h.

◆ FCS_NULL

#define FCS_NULL   NULL

Definition at line 49 of file fcs_interface_p.h.

◆ fcs_parser

#define fcs_parser   fcs_set_parameters

Definition at line 526 of file fcs_interface_p.h.

◆ fcs_printHandle

#define fcs_printHandle   fcs_print_parameters

Definition at line 524 of file fcs_interface_p.h.

◆ fcs_require_virial

#define fcs_require_virial   fcs_set_compute_virial

Definition at line 527 of file fcs_interface_p.h.

◆ fcs_set_dimension

#define fcs_set_dimension   fcs_set_dimensions

Definition at line 520 of file fcs_interface_p.h.

◆ fcs_set_offset

#define fcs_set_offset   fcs_set_box_origin

Definition at line 522 of file fcs_interface_p.h.

Typedef Documentation

◆ FCS

typedef struct _FCS_t* FCS

FCS-object representing an FCS solver.

Definition at line 47 of file fcs_interface_p.h.

Function Documentation

◆ fcs_compute_dipole_correction()

FCSResult fcs_compute_dipole_correction ( FCS  handle,
fcs_int  local_particles,
fcs_float *  positions,
fcs_float *  charges,
fcs_float  epsilon,
fcs_float *  field_correction,
fcs_float *  energy_correction 
)

function to compute the correction to the field and total energy when periodic boundary conditions with a finite dielectric constant of the surrounding medium epsilon are used

Parameters
handleFCS-object representing an FCS solver
local_particleslocal number of particles
positionspositions of the local particles. These positions should NOT be folded into the system box.
chargescharges of the local particles
epsilonvalue of the dielectric constant of the surrounding medium. For metallic boundary conditions, use -1.0 (or simply do not use this function!).
[out]field_correctionrequired correction to the field values caused by the dipole term.
[out]energy_correctionrequired correction to the total energy caused by the dipole term.
Returns
FCSResult-object containing the return state

◆ fcs_compute_near()

FCSResult fcs_compute_near ( FCS  handle,
fcs_float  dist,
fcs_float *  potential,
fcs_float *  field 
)

function to compute the near-field components of the potential and the field for the solver method

Parameters
handleFCS-object representing an FCS solver
distdistance between interacting particles
potentialnear-field component of the potential
fieldnear-field component of the field

Note: The computed near-field components of the potential and the field do NOT include the charge values of the charges of the interacting particles.

Note: For performance reasons, this function does not perform any error checking. It is the responsibility of the user of this function to use it only (1) with a valid FCS-object, (2) when the FCS solver supports the delegation of near-field computations, and (3) all necessary parameters of the FCS solver are set (e.g., with fcs_set_common, fcs_set_... setters, or after fcs_run). Furthermore, it is the responsibility of the user of this function to use only dist values between 0.0 and the user-defined cutoff radius of the near-field computations (see fcs_set_r_cut).

◆ fcs_compute_near_field()

FCSResult fcs_compute_near_field ( FCS  handle,
fcs_float  dist,
fcs_float *  field 
)

function to compute the near-field component of the field for the solver method

Parameters
handleFCS-object representing an FCS solver
distdistance between interacting particles
fieldnear-field component of the field
Returns
FCSResult-object containing the return state

Note: See fcs_compute_near for details.

◆ fcs_compute_near_potential()

FCSResult fcs_compute_near_potential ( FCS  handle,
fcs_float  dist,
fcs_float *  potential 
)

function to compute the near-field component of the potential for the solver method

Parameters
handleFCS-object representing an FCS solver
distdistance between interacting particles
potentialnear-field component of the potential
Returns
FCSResult-object containing the return state

Note: See fcs_compute_near for details.

◆ fcs_destroy()

FCSResult fcs_destroy ( FCS  handle)

function to destroy an FCS solver

Parameters
handleFCS-object representing an FCS solver
Returns
FCSResult-object containing the return state

◆ fcs_get_box_a()

const fcs_float* fcs_get_box_a ( FCS  handle)

function to return the first base vector of the system box

Parameters
handleFCS-object representing an FCS solver
Returns
first base vector of the system box

◆ fcs_get_box_b()

const fcs_float* fcs_get_box_b ( FCS  handle)

function to return the second base vector of the system box

Parameters
handleFCS-object representing an FCS solver
Returns
second base vector of the system box

◆ fcs_get_box_c()

const fcs_float* fcs_get_box_c ( FCS  handle)

function to return the third base vector of the system box

Parameters
handleFCS-object representing an FCS solver
Returns
third base vector of the system box

◆ fcs_get_box_origin()

const fcs_float* fcs_get_box_origin ( FCS  handle)

function function to return the origin vector of the system box

Parameters
handleFCS-object representing an FCS solver
Returns
origin vector of the system box

◆ fcs_get_communicator()

MPI_Comm fcs_get_communicator ( FCS  handle)

function to return the MPI communicator used for the parallel execution

Parameters
handleFCS-object representing an FCS solver
Returns
MPI communicator used for the parallel execution

◆ fcs_get_compute_virial()

FCSResult fcs_get_compute_virial ( FCS  handle,
fcs_int *  compute_virial 
)

function to return whether the virial should be computed

Parameters
handleFCS-object representing an FCS solver
compute_virialwhether the virial should be computed
Returns
FCSResult-object containing the return state

◆ fcs_get_dimensions()

fcs_int fcs_get_dimensions ( FCS  handle)

function to return the dimensions of the system

Parameters
handleFCS handle representing an FCS solver object
Returns
dim dimensions of the system

◆ fcs_get_max_local_particles()

fcs_int fcs_get_max_local_particles ( FCS  handle)

function to return the maximum number of particles that can be stored in the specified local particle data arrays

Parameters
handleFCS-object representing an FCS solver
Returns
maximum number of particles that can be stored locally

◆ fcs_get_method()

fcs_int fcs_get_method ( FCS  handle)

function to return the numerical identifier of the solver method

Parameters
handleFCS-object representing an FCS solver
Returns
numerical identifier of the solver method

◆ fcs_get_method_name()

const char* fcs_get_method_name ( FCS  handle)

function to return the name of the solver method

Parameters
handleFCS-object representing an FCS solver
Returns
name of the solver method

◆ fcs_get_near_field_delegation()

FCSResult fcs_get_near_field_delegation ( FCS  handle,
fcs_int *  near_field_delegation 
)

function to return whether the solver method supports the delegation of near-field computations to an external application

Parameters
handleFCS-object representing an FCS solver
near_field_delegationwhether the delegation of near field computation is supported
Returns
FCSResult-object containing the return state

◆ fcs_get_near_field_flag()

fcs_int fcs_get_near_field_flag ( FCS  handle)

function to return the near-field flag

Parameters
handleFCS-object representing an FCS solver
Returns
value of near-field flag (see fcs_set_near_field_flag)

◆ fcs_get_periodicity()

const fcs_int* fcs_get_periodicity ( FCS  handle)

function to return the periodicity of the system

Parameters
handleFCS-object representing an FCS solver
Returns
periodicity of the system (see fcs_set_periodicity)

◆ fcs_get_r_cut()

FCSResult fcs_get_r_cut ( FCS  handle,
fcs_float *  r_cut 
)

function to return the user-defined cutoff radius for the near-field computations of the FCS solver (if supported)

Parameters
handleFCS handle representing an FCS solver object
r_cutcutoff radius for the near-field computations
Returns
FCSResult-object containing the return state

◆ fcs_get_redistribute()

fcs_int fcs_get_redistribute ( FCS  handle)

function to return the particle redistribution setting

Parameters
handleFCS-object representing an FCS solver
Returns
value of the particle redistribution setting (see fcs_set_redistribute)

◆ fcs_get_resort()

FCSResult fcs_get_resort ( FCS  handle,
fcs_int *  resort 
)

function to return whether resort support is requested

Parameters
handleFCS-object representing an FCS solver
resortwhether resort support is requested
Returns
FCSResult-object containing the return state

◆ fcs_get_resort_availability()

FCSResult fcs_get_resort_availability ( FCS  handle,
fcs_int *  availability 
)

function to return whether resort support is available after executing fcs_run

Parameters
handleFCS-object representing an FCS solver
availabilitywhether resort support is available
Returns
FCSResult-object containing the return state

◆ fcs_get_resort_particles()

FCSResult fcs_get_resort_particles ( FCS  handle,
fcs_int *  resort_particles 
)

function to return the new local number of particles

Parameters
handleFCS-object representing an FCS solver
resort_particlesnew local number of particles
Returns
FCSResult-object containing the return state

◆ fcs_get_tolerance()

FCSResult fcs_get_tolerance ( FCS  handle,
fcs_int *  tolerance_type,
fcs_float *  tolerance 
)

function to return the error tolerance of the FCS solver

Parameters
handleFCS-object representing an FCS solver
tolerance_typeconstant to select the type of the error tolerance value (see fcs_definitions.h)
toleranceerror tolerance value
Returns
FCSResult-object containing the return state

◆ fcs_get_total_particles()

fcs_int fcs_get_total_particles ( FCS  handle)

function to return the total number of particles in the system

Parameters
handleFCS-object representing an FCS solver
Returns
total number of particles in the system

◆ fcs_get_virial()

FCSResult fcs_get_virial ( FCS  handle,
fcs_float *  virial 
)

function to return the comuputed virial

Parameters
handleFCS-object representing an FCS solver
virialcomputed virial
Returns
FCSResult-object containing the return state

◆ fcs_init()

FCSResult fcs_init ( FCS new_handle,
const char *  method_name,
MPI_Comm  communicator 
)

function to initialize an FCS solver

Parameters
new_handlepointer to an FCS-object that will represent the FCS solver
method_namestring for selecting the solver method
communicatorMPI communicator to be used for the parallel execution
Returns
FCSResult-object containing the return state

◆ fcs_print_parameters()

FCSResult fcs_print_parameters ( FCS  handle)

function to print the parameters of an FCS solver to stdout

Parameters
handleFCS-object representing an FCS solver
Returns
FCSResult-object containing the return state

◆ fcs_resort_bytes()

FCSResult fcs_resort_bytes ( FCS  handle,
void *  src,
void *  dst,
fcs_int  n 
)

function to sort additional byte particle data into the new sorted particle order

Parameters
handleFCS-object representing an FCS solver
srcarray of byte values in unsorted (original) order
dstarray to store the sorted byte values
nfcs_int number of byte values for each particle
Returns
FCSResult-object containing the return state

◆ fcs_resort_floats()

FCSResult fcs_resort_floats ( FCS  handle,
fcs_float *  src,
fcs_float *  dst,
fcs_int  n 
)

function to sort additional float particle data into the new sorted particle order

Parameters
handleFCS-object representing an FCS solver
srcarray of float values in unsorted (original) order
dstarray to store the sorted float values
nfcs_int number of float values for each particle
Returns
FCSResult-object containing the return state

◆ fcs_resort_ints()

FCSResult fcs_resort_ints ( FCS  handle,
fcs_int *  src,
fcs_int *  dst,
fcs_int  n 
)

function to sort additional integer particle data into the new sorted particle order

Parameters
handleFCS-object representing an FCS solver
srcarray of integer values in unsorted (original) order
dstarray to store the sorted integer values
nnumber of integer values for each particle
Returns
FCSResult-object containing the return state

◆ fcs_run()

FCSResult fcs_run ( FCS  handle,
fcs_int  local_particles,
fcs_float *  positions,
fcs_float *  charges,
fcs_float *  field,
fcs_float *  potentials 
)

function to run the solver method

Parameters
handleFCS-object representing an FCS solver
local_particleslocal number of particles
positionspositions of the local particles
chargescharges of the local particles
fieldcalculated field values of the local particles
potentialscalculated potential values of the local particles
Returns
FCSResult-object containing the return state

◆ fcs_set_box_a()

FCSResult fcs_set_box_a ( FCS  handle,
const fcs_float *  box_a 
)

function to set the first base vector of the system box

Parameters
handleFCS-object representing an FCS solver
box_afirst base vector of the system box
Returns
FCSResult-object containing the return state

◆ fcs_set_box_b()

FCSResult fcs_set_box_b ( FCS  handle,
const fcs_float *  box_b 
)

function to set the second base vector of the system box

Parameters
handleFCS-object representing an FCS solver
box_bsecond base vector of the system box
Returns
FCSResult-object containing the return state

◆ fcs_set_box_c()

FCSResult fcs_set_box_c ( FCS  handle,
const fcs_float *  box_c 
)

function to set the third base vector of the system box

Parameters
handleFCS-object representing an FCS solver
box_cthird base vector of the system box
Returns
FCSResult-object containing the return state

◆ fcs_set_box_origin()

FCSResult fcs_set_box_origin ( FCS  handle,
const fcs_float *  box_origin 
)

function to set the origin vector of the system box

Parameters
handleFCS-object representing an FCS solver
box_originorigin vector of the system box
Returns
FCSResult-object containing the return state

◆ fcs_set_common()

FCSResult fcs_set_common ( FCS  handle,
fcs_int  near_field_flag,
const fcs_float *  box_a,
const fcs_float *  box_b,
const fcs_float *  box_c,
const fcs_float *  box_origin,
const fcs_int *  periodicity,
fcs_int  total_particles 
)

function to set all obligatory parameters for an FCS solver

Parameters
handleFCS-object representing an FCS solver
near_field_flagwhether near-field computations should be performed by the solver method (value 1) or not (value 0)
box_afirst base vector of the system box
box_bsecond base vector of the system box
box_cthird base vector of the system box
box_originorigin vector of the system box
periodicityperiodicity of the system in each dimension (value 0: open, value 1: periodic)
total_particlestotal number of particles in the system
Returns
FCSResult-object containing the return state

◆ fcs_set_compute_virial()

FCSResult fcs_set_compute_virial ( FCS  handle,
fcs_int  compute_virial 
)

function to set whether the virial should be computed

Parameters
handleFCS-object representing an FCS solver
compute_virialwhether the virial should be computed
Returns
FCSResult-object containing the return state

◆ fcs_set_dimensions()

FCSResult fcs_set_dimensions ( FCS  handle,
fcs_int  dim 
)

function to set the dimensions of the system

Parameters
handleFCS-object representing an FCS solver
dimdimensions of the system (values 1-3, default: 3)
Returns
FCSResult-object containing the return state

◆ fcs_set_max_local_particles()

FCSResult fcs_set_max_local_particles ( FCS  handle,
fcs_int  max_local_particles 
)

function to set the maximum number of particles that can be stored in the specified local particle data arrays

Parameters
handleFCS-object representing an FCS solver
max_local_particlesmaximum number of particles that can be stored locally
Returns
FCSResult-object containing the return state

◆ fcs_set_max_particle_move()

FCSResult fcs_set_max_particle_move ( FCS  handle,
fcs_float  max_particle_move 
)

function to set the maximum distance the particles have moved since the call of fcs_run

Parameters
handleFCS-object representing an FCS solver
max_particle_movemaximum distance the particles have moved
Returns
FCSResult-object containing the return state

◆ fcs_set_near_field_flag()

FCSResult fcs_set_near_field_flag ( FCS  handle,
fcs_int  near_field_flag 
)

function to set the near-field flag

Parameters
handleFCS-object representing an FCS solver
near_field_flagwhether near-field computations should be performed by the solver method (value 1) or not (value 0)
Returns
FCSResult-object containing the return state

◆ fcs_set_parameters()

FCSResult fcs_set_parameters ( FCS  handle,
const char *  parameters,
fcs_int  continue_on_errors 
)

function to set the parameters of the FCS solver based on a parameter string

Parameters
handleFCS-object representing an FCS solver
parameterschar* parameter string (format: "<1st parameter name>,<1st comma-separated value(s)>,<2nd parameter name>,<2nd comma-separated value(s)>,...")
continue_on_errorswhether to continue if setting a parameter fails
Returns
FCSResult-object containing the return state

◆ fcs_set_periodicity()

FCSResult fcs_set_periodicity ( FCS  handle,
const fcs_int *  periodicity 
)

function to set the periodicity of the system

Parameters
handleFCS-object representing an FCS solver
periodicityperiodicity of the system in each dimension (value 0: open, value 1: periodic)
Returns
FCSResult-object containing the return state

◆ fcs_set_r_cut()

FCSResult fcs_set_r_cut ( FCS  handle,
fcs_float  r_cut 
)

function to set a user-defined cutoff radius for the near-field computations of the FCS solver (if supported)

Parameters
handleFCS handle representing an FCS solver object
r_cutcutoff radius for the near-field computations
Returns
FCSResult-object containing the return state

◆ fcs_set_redistribute()

FCSResult fcs_set_redistribute ( FCS  handle,
fcs_int  redistribute 
)

function to set the redistribution of particles before the computations (and back after the computations)

Parameters
handleFCS-object representing an FCS solver
redistributewhether the particles should remain where they are (value 0) or be equally distributed among all processes (value 1)
Returns
FCSResult-object containing the return state

◆ fcs_set_resort()

FCSResult fcs_set_resort ( FCS  handle,
fcs_int  resort 
)

function to set whether resort support is requested (default is no resort support) if resort support is requested (and supported by the solver) then the solver tries to retain its sorted particle data order, i.e., the distribution and order of the given particles is changed by fcs_run such that the position, charge, field, and potential values correspond to the sorted particle order of the solver, this can only be performed successfully if the local sizes of the particle arrays (specified by the local_max_particles of fcs_run) on all processes are large enough to store the sorted particle order, after performing fcs_run, function fcs_get_resort_availability can be used to determine whether resort support is available or not, if resort support is available then fcs_get_resort_particles returns the new local number of particles and fcs_resort_[ints,floats,bytes] can be used to bring additional particle data into the new sorted order

Parameters
handleFCS-object representing an FCS solver
resortwhether resort support is requested
Returns
FCSResult-object containing the return state

◆ fcs_set_tolerance()

FCSResult fcs_set_tolerance ( FCS  handle,
fcs_int  tolerance_type,
fcs_float  tolerance 
)

function to set the error tolerance of the FCS solver

Parameters
handleFCS-object representing an FCS solver
tolerance_typeconstant to select the type of the error tolerance value (see fcs_definitions.h)
toleranceerror tolerance value
Returns
FCSResult-object containing the return state

◆ fcs_set_total_particles()

FCSResult fcs_set_total_particles ( FCS  handle,
fcs_int  total_particles 
)

function to set the total number of particles in the system

Parameters
handleFCS-object representing an FCS solver
total_particlestotal number of particles in the system
Returns
FCSResult-object containing the return state

◆ fcs_tune()

FCSResult fcs_tune ( FCS  handle,
fcs_int  local_particles,
fcs_float *  positions,
fcs_float *  charges 
)

function to tune method specific parameters depending on the particles

Parameters
handleFCS-object representing an FCS solver
local_particleslocal number of particles
positionspositions of the local particles used for the tuning
chargescharges of the local particles used for the tuning
Returns
FCSResult-object containing the return state

◆ fcs_unset_r_cut()

FCSResult fcs_unset_r_cut ( FCS  handle)

function to disable a user-defined cutoff radius for the near-field computations of the FCS solver (if supported)

Parameters
handleFCS handle representing an FCS solver object
Returns
FCSResult-object containing the return state