| 
    STARS-H
    
   Software for Testing Accuracy, Reliability and  Scalability of Hierarchical computations 
   | 
 
Template for electrostatics problems. More...
Modules | |
| Kernels | |
| Set of kernels for electrostatics problems.  | |
Enumerations | |
| enum | STARSH_ELECTROSTATICS_KERNEL { STARSH_ELECTROSTATICS_COULOMB_POTENTIAL = 1, STARSH_ELECTROSTATICS_COULOMB_POTENTIAL_SIMD = 2 } | 
| List of built-in kernels for starsh_esdata_get_kernel().  More... | |
| enum | STARSH_ELECTROSTATICS_PARAM { STARSH_ELECTROSTATICS_NDIM = 1, STARSH_ELECTROSTATICS_PLACE = 2 } | 
| List of parameters for starsh_application().  More... | |
Functions | |
| int | starsh_esdata_new (STARSH_esdata **data, STARSH_int count, int ndim) | 
| Allocate memory for STARSH_esdata object.  More... | |
| int | starsh_esdata_init (STARSH_esdata **data, STARSH_int count, int ndim, double *point) | 
| Initialize STARSH_esdata object by given data.  More... | |
| int | starsh_esdata_generate (STARSH_esdata **data, STARSH_int count, int ndim, enum STARSH_PARTICLES_PLACEMENT place) | 
| Generate STARSH_esdata object by given distribution.  More... | |
| int | starsh_esdata_generate_va (STARSH_esdata **data, STARSH_int count, va_list args) | 
| Generate STARSH_esdata object with incomplete set of parameters.  More... | |
| int | starsh_esdata_generate_el (STARSH_esdata **data, STARSH_int count,...) | 
| Generate STARSH_esdata object with incomplete set of parameters.  More... | |
| void | starsh_esdata_free (STARSH_esdata *data) | 
| Free memory of STARSH_esdata object.  More... | |
Template for electrostatics problems.
STARSH_esdata holds all the necessary data.
List of built-in kernels for starsh_esdata_get_kernel().
For more info on exact formulas inside kernels, take a look at functions starsh_esdata_block_coulomb_potential_kernel_nd(), starsh_esdata_block_coulomb_potential_kernel_nd_simd().
| Enumerator | |
|---|---|
| STARSH_ELECTROSTATICS_COULOMB_POTENTIAL | Coulomb potential kernel.  | 
| STARSH_ELECTROSTATICS_COULOMB_POTENTIAL_SIMD | Coulomb potential kernel.  | 
List of parameters for starsh_application().
In the table below each constant corresponds to a given argument and type for starsh_esdata_generate(). These constants are used to generate problem with incomplete set of parameters via starsh_application(), starsh_esdata_generate_va() or starsh_esdata_generate_el().
| Enumerator | |
|---|---|
| STARSH_ELECTROSTATICS_NDIM | Dimensionality of space (  | 
| STARSH_ELECTROSTATICS_PLACE | Distribution of particles (  | 
| void starsh_esdata_free | ( | STARSH_esdata * | data | ) | 
Free memory of STARSH_esdata object.
| int starsh_esdata_generate | ( | STARSH_esdata ** | data, | 
| STARSH_int | count, | ||
| int | ndim, | ||
| enum STARSH_PARTICLES_PLACEMENT | place | ||
| ) | 
Generate STARSH_esdata object by given distribution.
| [out] | data | Address of pointer to STARSH_esdata object. | 
| [in] | count | Number of particles. | 
| [in] | ndim | Dimensionality of space. | 
| [in] | place | Placement strategy for spatial points. | 
| int starsh_esdata_generate_el | ( | STARSH_esdata ** | data, | 
| STARSH_int | count, | ||
| ... | |||
| ) | 
Generate STARSH_esdata object with incomplete set of parameters.
Parses possibly incomplete set of parameters for starsh_esdata_generate(). If argument is not in the ..., then its default value is used:
| Argument | Default value | Type – | 
|---|---|---|
ndim   | 2 | int | 
place   | STARSH_PARTICLES_UNIFORM | STARSH_PARTICLES_PLACEMENT | 
List of arguments in ... should look as pairs (Arg.constant, Value) with 0 as a last argument. For correspondance of arguments and arg.constants take a look at STARSH_ELECTROSTATICS_PARAM.
| [out] | data | Address of pointer to STARSH_esdata object. | 
| [in] | count | Number of particles. | 
| [in] | ... | Variable amount of arguments. | 
| int starsh_esdata_generate_va | ( | STARSH_esdata ** | data, | 
| STARSH_int | count, | ||
| va_list | args | ||
| ) | 
Generate STARSH_esdata object with incomplete set of parameters.
Parss possibly incomplete set of parameters for starsh_esdata_generate(). If argument is not in the args, then its default value is used:
| Argument | Default value | Type – | 
|---|---|---|
ndim   | 2 | int | 
place   | STARSH_PARTICLES_UNIFORM | STARSH_PARTICLES_PLACEMENT | 
List of arguments args should look as pairs (Arg.constant, Value) with 0 as a last argument. For correspondance of arguments and arg.constants take a look at STARSH_ELECTROSTATICS_PARAM.
| [out] | data | Address of pointer to STARSH_esdata object. | 
| [in] | count | Number of particles. | 
| [in] | args | Arguments, packed into va_args. | 
| int starsh_esdata_init | ( | STARSH_esdata ** | data, | 
| STARSH_int | count, | ||
| int | ndim, | ||
| double * | point | ||
| ) | 
Initialize STARSH_esdata object by given data.
Array point should be stored in a special way: x_1 x_2 ... x_count y_1 y_2 ... y_count z_1 z_2 .... This function does not allocate memory for coordinates and uses provided pointer point. Do not free memory of point until you finish using returned STARSH_esdata object. Do not forget to sort data->particles by starsh_particles_zsort_inplace() to take advantage of low-rank submatrices.
| [out] | data | Address of pointer to STARSH_esdata object. | 
| [in] | count | Number of particles. | 
| [in] | ndim | Dimensionality of space. | 
| [in] | point | Pointer to array of coordinates of particles. | 
| int starsh_esdata_new | ( | STARSH_esdata ** | data, | 
| STARSH_int | count, | ||
| int | ndim | ||
| ) | 
Allocate memory for STARSH_esdata object.
This functions only allocates memory for particles without setting coordinates to any value. Do not forget to sort data->particles by starsh_particles_zsort_inplace() to take advantage of low-rank submatrices.
| [out] | data | Address of pointer to STARSH_esdata object. | 
| [in] | count | Number of particles. | 
| [in] | ndim | Dimensionality of space. |