Point
Table of Contents
1. Context
1.1. Data structure
The following data stored in the context:
| Variable | Type | Description |
|---|---|---|
num |
int64_t |
Total number of points |
date |
uint64_t |
Last modification date of the coordinates |
coord |
qmckl_matrix |
num × 3 matrix |
We consider that the matrix is stored 'transposed' and 'normal'
corresponds to the 3 × num matrix.
1.2. Access functions
Access functions return QMCKL_SUCCESS when the data has been
successfully retrieved. They return QMCKL_INVALID_CONTEXT when
the context is not a valid context. If the function returns
successfully, the variable pointed by the pointer given in argument
contains the requested data. Otherwise, this variable is untouched.
1.2.1. Number of points
qmckl_exit_code qmckl_get_point_num (const qmckl_context context, int64_t* const num);
Returns the number of points stored in the context.
1.2.2. Point coordinates
qmckl_exit_code qmckl_get_point(const qmckl_context context, const char transp, double* const coord, const int64_t size_max);
Returns the point coordinates as sequences of (x,y,z).
The pointer is assumed to point on a memory block of size
size_max ≥ 3 * point_num.
1.3. Initialization functions
When the data is set in the context, if the arrays are large enough, we overwrite the data contained in them.
To set the data relative to the points in the context, the
following function need to be called. Here, num is the number of
points to set.
qmckl_exit_code qmckl_set_point (qmckl_context context, const char transp, const int64_t num, const double* coord, const int64_t size_max);
It copies a sequence of num points \((x,y,z)\) into the context.