Wrapper for linking C++ and Fortran functions. More...
#include <stdlib.h>#include <stdint.h>#include <iostream>#include <fstream>#include <typeinfo>#include "./tools/DT-Grid/datastructures/DTGrid3D.hpp"#include "./tools/DT-Grid/datastructures/DTGrid3Dex.hpp"Enumerations | |
| enum | grid_type_enum { double_type = 1 , logical_type = 2 } |
Functions | |
| int | associate_grid_ (intptr_t **grdptr, char *file_name, double *scfct_f, int *grid_type) |
| Associate the pointer received from SDA code to a DT-Grid pointer. | |
| int | deallocate_grid_ (intptr_t *grdptr, int *grid_type) |
| Deallocator for the DT-Grid object. | |
| int | access_ (intptr_t *grdptr, int *i, int *j, int *k, double *value) |
| Random access to grid points stored in a data grid. | |
| int | access_voxel_ (intptr_t *grdptr, int *i, int *j, int *k, double *voxel) |
| Random access to grid points stored in an excluded-volume grid. | |
| int | access_exclusion_ (intptr_t *grdptr, int *i, int *j, int *k, bool *b_value) |
| Random access to grid cells stored in a data grid. | |
| int | access_voxel_exclusion_ (intptr_t *grdptr, int *i, int *j, int *k, bool *b_voxel) |
| Random access to grid cells stored in an excluded-volume grid. | |
Wrapper for linking C++ and Fortran functions.
C++ wrapper for DT-GRID functions to call from SDA code
| enum grid_type_enum |
| int access_ | ( | intptr_t * | grdptr, |
| int * | i, | ||
| int * | j, | ||
| int * | k, | ||
| double * | value ) |
Random access to grid points stored in a data grid.
| grdptr | the address that stores the pointer of a DT-Grid object |
| i | grid point coordinate 'i' |
| j | grid point coordinate 'j' |
| k | grid point coordinate 'k' |
| value | pointer to copy the grid point value into |
| int access_exclusion_ | ( | intptr_t * | grdptr, |
| int * | i, | ||
| int * | j, | ||
| int * | k, | ||
| bool * | b_value ) |
Random access to grid cells stored in a data grid.
| grdptr | the address that stores the pointer of a DT-Grid object |
| i | grid cell origin coordinate 'i' |
| j | grid cell origin coordinate 'j' |
| k | grid cell origin coordinate 'k' |
| b_voxel | pointer to a unit cell to copy the grid cell values into |
| int access_voxel_ | ( | intptr_t * | grdptr, |
| int * | i, | ||
| int * | j, | ||
| int * | k, | ||
| double * | voxel ) |
Random access to grid points stored in an excluded-volume grid.
| grdptr | the address that stores the pointer of a DT-Grid object |
| i | grid point coordinate 'i' |
| j | grid point coordinate 'j' |
| k | grid point coordinate 'k' |
| value | pointer to copy the grid point value into |
| int access_voxel_exclusion_ | ( | intptr_t * | grdptr, |
| int * | i, | ||
| int * | j, | ||
| int * | k, | ||
| bool * | b_voxel ) |
Random access to grid cells stored in an excluded-volume grid.
| grdptr | the address that stores the pointer of a DT-Grid object |
| i | grid cell origin coordinate 'i' |
| j | grid cell origin coordinate 'j' |
| k | grid cell origin coordinate 'k' |
| b_voxel | pointer to a unit cell to copy the grid cell values into |
| int associate_grid_ | ( | intptr_t ** | grdptr, |
| char * | file_name, | ||
| double * | scfct_f, | ||
| int * | grid_type ) |
Associate the pointer received from SDA code to a DT-Grid pointer.
This function is called from mod_grid.f90 and associates a DT-Grid object (created and allocated inside) with the pointer address provided by the fortran module.
| grdptr | the address that stores the pointer of a DT-Grid object and will be known by the fortran modules |
| file_name | the name of the UHBD file input to SDA. |
| scfct_f | the scaling factor from the SDA code. |
| grid_type | type of grid: excluded-volume or data. 1 for data, 2 for excluded-volume (or other logical type) grids |
| int deallocate_grid_ | ( | intptr_t * | grdptr, |
| int * | grid_type ) |
Deallocator for the DT-Grid object.
This function is called from mod_grid.f90 and will deallocate the associated DT-Grid object accessible with the pointer given.
| grdptr | the address that stores the pointer of a DT-Grid object |
| grid_type | type of grid: excluded-volume or data |
1.15.0
Imprint/Privacy