SDA (SDA flex)  7.2
Simulation of Diffusional Association
Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
DTGrid3Dex Class Reference

#include <DTGrid3Dex.hpp>

Collaboration diagram for DTGrid3Dex:

Public Member Functions

 DTGrid3Dex (char *)
 DTGrid3Dex constructor. More...
 
 ~DTGrid3Dex ()
 DTGrid3Dex destructor. More...
 
bool accessxyz (int, int, int)
 Random access function. More...
 
bool * getCell (bool *, int, int, int)
 Random access to grid cells. More...
 
bool * getCell2 (bool *, int, int, int)
 Random access to grid cells. (2nd version) More...
 

Public Attributes

struct {
   char *   Title
 
   int   grdflag
 
   int   one
 
   int   idummy1
 
   int   idummy2
 
   int   idummy3
 
   int   idummy4
 
   int   idummy5
 
   float   scale
 
   float   spacing
 
   float   dummy1
 
   float   dummy2
 
   float   dummy3
 
   float   dummy4
 
   float   dummy5
 
   float   dummy6
 
   float   dummy7
 
   struct dimensions {
      int   i
 
      int   j
 
      int   k
 
   }   dim
 
   struct origin {
      float   x
 
      float   y
 
      float   z
 
   }   o
 
uhbd
 UHBD header information. More...
 

Protected Member Functions

void getCellz (bool *, int, int, int, typename ArrayPrs< int >::PairArray *)
 Random access to grid cells in z direction. More...
 
void getCellyz (bool *, int, int, int, typename ArrayPrs< int >::PairArray *)
 Random access function for grid cells (y direction, DTGrid2D). More...
 

Private Member Functions

void set_zcoord_list (int *, int)
 zCoord array setup More...
 
void set_projection2D (int *, int *, int *, int *, int *, int *, int, int, int, int, int, int)
 proj2D setup More...
 
void set_uhbd_parameters (float, float, float, float, float, int, int, int)
 Read and set the grid parameters. More...
 
void Reset_pointers_3D (void)
 
void test_format_dtgrid (char *)
 Determine the DT-Grid file format. More...
 
void size_ds (unsigned int)
 Estimate the grid file size. More...
 
void format_ascii (char *)
 Open and Read the ascii grid file. More...
 
void format_binary (char *)
 Open and Read the binary grid file. More...
 

Private Attributes

ArrayReg< bool > * Value_List_3D
 
ArrayPrs< int > * Zcoord_List
 
ArrayPtr< bool, int > * Ptr_List_3D
 
DTGrid2D< bool, int > * proj2D
 
int Length_of_Value_List_3D
 
int Length_of_Zcoord_List
 
int Length_of_Ptr_List_3D
 
int iform
 grid file format: binary = 0; ascii = 1 More...
 
int grid_type
 grid type: exclusion grid = 0; normal grid = 1 More...
 
float scale
 
float spacing
 not used for data scaling More...
 
struct {
   int   i
 
   int   j
 
   int   k
 
dimensions
 grid resolution More...
 
struct {
   float   x
 
   float   y
 
   float   z
 
origin
 hold the coordinates (in x, y and z) of the grid origin. More...
 

Constructor & Destructor Documentation

◆ DTGrid3Dex()

DTGrid3Dex::DTGrid3Dex ( char *  file_name)

DTGrid3Dex constructor.

Parameters
file_nameinput dt-grid file.
Here is the call graph for this function:

◆ ~DTGrid3Dex()

DTGrid3Dex::~DTGrid3Dex ( )

DTGrid3Dex destructor.

Member Function Documentation

◆ accessxyz()

bool DTGrid3Dex::accessxyz ( int  a,
int  b,
int  c 
)

Random access function.

A different implementation of random data access function

See also
access_fast In SDA random cell access function is used. This function returns the data for a single grid point.
Parameters
aindex x of the data value to be returned
bindex y of the data value to be returned
cindex z of the data value to be returned
Attention
Check for parallel safety! The function is not used in current SDA implementation, though.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_ascii()

void DTGrid3Dex::format_ascii ( char *  file_ascii)
private

Open and Read the ascii grid file.

Note
very similar to
See also
format_binary function. Can these two functions be merged? Detailed description of the variables used in this function is available in the
format_binary function
Parameters
file_asciiname of the grid file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_binary()

void DTGrid3Dex::format_binary ( char *  file_binary)
private

Open and Read the binary grid file.

The header of a DT-Grid file is same as that of a UHBD file. Therefore the parameter definitions are identical.

Note
This function and the rest of the file related functions, as well as parameters can be put together in a class.
See also
format_ascii and
size_ds
Parameters
file_binaryname of the grid file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCell()

bool * DTGrid3Dex::getCell ( bool *  Cell,
int  a,
int  b,
int  c 
)

Random access to grid cells.

This function returns a cubic grid cell that contains the data stored in the grid point whose indices are input by the user, as well as the other 7 neighbor points that make up the 8 point grid cell. The given set of index: x, y and z defines the origin of the grid cell that is to be accessed. The other grid points are: {(x,y,z),(x,y,z+1),(x,y+1,z),(x,y+1,z+1),(x+1,y,z),(x+1,y+1,z),(x+1,y,z+1),(x+1,y+1,z+1)}

Parameters
Cellarray to copy the values stored inside the grid cell that accessed randomly.
aindex x of the origin of the data cell inside the complete grid to be returned.
bindex y of the origin of the data cell inside the complete grid to be returned.
cindex z of the origin of the data cell inside the complete grid to be returned.
Here is the call graph for this function:

◆ getCell2()

bool * DTGrid3Dex::getCell2 ( bool *  Cell,
int  a,
int  b,
int  c 
)

Random access to grid cells. (2nd version)

This function assumes that there is only one connected component in DTGrid1D level. Structures, potential fields are usually one connected piece in 3D. So care should be taken when this function is used

Parameters
Cellarray to copy the values stored inside the grid cell that accessed randomly.
aindex x of the origin of the data cell inside the complete grid to be returned.
bindex y of the origin of the data cell inside the complete grid to be returned.
cindex z of the origin of the data cell inside the complete grid to be returned.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCellyz()

void DTGrid3Dex::getCellyz ( bool *  Cell,
int  x,
int  b,
int  c,
typename ArrayPrs< int >::PairArray *  coord2 
)
protected

Random access function for grid cells (y direction, DTGrid2D).

Call to this function returns the last function call (

See also
getCellz) in order to fill the corresponding points in the cubic cell input.
Parameters
Cellarray to copy the values stored inside the grid cell that accessed randomly.
xindex of the grid cell point in x direction (0 or 1 for a 3dimensional cubic cell)
bindex y of the origin of the data cell inside the complete grid to be returned.
cindex z of the origin of the data cell inside the complete grid to be returned
coord2pointer to the index pair stored in yCoord array that list the indices to the first connected component in the 2D tubular grid.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCellz()

void DTGrid3Dex::getCellz ( bool *  Cell,
int  x,
int  y,
int  c,
typename ArrayPrs< int >::PairArray *  coord3 
)
protected

Random access to grid cells in z direction.

Call to this function fills the corresponding points in the cubic cell input by looking up the values from the actual grid.

Parameters
Cellarray to copy the values stored inside the grid cell that accessed randomly.
xindex of the grid cell point in x direction (0 or 1 for a 3dimensional cubic cell)
yindex of the grid cell point in y direction (0 or 1 for a 3dimensional cubic cell)
cindex z of the origin of the data cell inside the complete grid to be returned
coord3pointer to the index pair stored in zCoord array that list the indices to the first connected component in the 3D tubular grid.
Here is the caller graph for this function:

◆ Reset_pointers_3D()

void DTGrid3Dex::Reset_pointers_3D ( void  )
private

◆ set_projection2D()

void DTGrid3Dex::set_projection2D ( int *  values1,
int *  values2,
int *  values3,
int *  values4,
int *  values5,
int *  values6,
int  length1,
int  length2,
int  length3,
int  length4,
int  length5,
int  length6 
)
private

proj2D setup

Create an instance of a DTGrid2D class and set up this proj2D object that contain yCoord, acc (2D) and the 'value' (2D) arrays.

Parameters
values1pointer to the 'value' array of the DTGrid2D.
values2pointer to the yCoord array of the DTGrid2D.
values3pointer to the acc array of the DTGrid2D.
values4pointer (to be passed to DTGrid1D) to the 'value' array of the DTGrid1D.
values5pointer (to be passed to DTGrid1D) to the xCoord array of the DTGrid1D.
values6pointer (to be passed to DTGrid1D) to the acc array of the DTGrid1D.
length1the length of the 'value' (2D) array.
length2the length of the yCoord array.
length3the length of the acc (2D) array.
length4the length of the 'value' (1D) array.
length5the length of the xcoord array.
length6the length of the acc (1D) array.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uhbd_parameters()

void DTGrid3Dex::set_uhbd_parameters ( float  sc,
float  sp,
float  ox,
float  oy,
float  oz,
int  dimi,
int  dimj,
int  dimk 
)
private

Read and set the grid parameters.

These parameters are inherited from the UHBD file format and kept in DTGrid files.

Parameters
scthe scaling factor.
spthe uniform spacing value of the grid.
oxcoordinate x of the origin.
oycoordinate y of the origin.
ozcoordinate z of the origin.
dimidimension of the grid in x direction.
dimjdimension of the grid in y direction.
dimkdimension of the grid in z direction.
Here is the caller graph for this function:

◆ set_zcoord_list()

void DTGrid3Dex::set_zcoord_list ( int *  values,
int  length 
)
private

zCoord array setup

Read and store the zCoord array that stores in minimum and maximum coordinates of the connected components in z direction.

Parameters
valuesa pointer that holds the zCoord array.
lengththe length of the zCoord array.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size_ds()

void DTGrid3Dex::size_ds ( unsigned int  val)
private

Estimate the grid file size.

Parameters
valsize of file in bytes
Here is the caller graph for this function:

◆ test_format_dtgrid()

void DTGrid3Dex::test_format_dtgrid ( char *  Input)
private

Determine the DT-Grid file format.

This function opens and reads the dt-grid file in order to determine whether it is binary or ASCII.

Parameters
Inputname of input dt-grid file.
Here is the caller graph for this function:

Member Data Documentation

◆ 

struct { ... } ::dimensions DTGrid3Dex::dim

◆ 

struct { ... } DTGrid3Dex::dimensions

grid resolution

grid dimensions in x, y and z directions given by i, j and k, respectively

◆ dummy1

float DTGrid3Dex::dummy1

◆ dummy2

float DTGrid3Dex::dummy2

◆ dummy3

float DTGrid3Dex::dummy3

◆ dummy4

float DTGrid3Dex::dummy4

◆ dummy5

float DTGrid3Dex::dummy5

◆ dummy6

float DTGrid3Dex::dummy6

◆ dummy7

float DTGrid3Dex::dummy7

◆ grdflag

int DTGrid3Dex::grdflag

◆ grid_type

int DTGrid3Dex::grid_type
private

grid type: exclusion grid = 0; normal grid = 1

◆ i

int DTGrid3Dex::i

◆ idummy1

int DTGrid3Dex::idummy1

◆ idummy2

int DTGrid3Dex::idummy2

◆ idummy3

int DTGrid3Dex::idummy3

◆ idummy4

int DTGrid3Dex::idummy4

◆ idummy5

int DTGrid3Dex::idummy5

◆ iform

int DTGrid3Dex::iform
private

grid file format: binary = 0; ascii = 1

◆ j

int DTGrid3Dex::j

◆ k

int DTGrid3Dex::k

◆ Length_of_Ptr_List_3D

int DTGrid3Dex::Length_of_Ptr_List_3D
private

◆ Length_of_Value_List_3D

int DTGrid3Dex::Length_of_Value_List_3D
private

◆ Length_of_Zcoord_List

int DTGrid3Dex::Length_of_Zcoord_List
private

◆ 

struct { ... } ::origin DTGrid3Dex::o

◆ one

int DTGrid3Dex::one

◆ 

struct { ... } DTGrid3Dex::origin

hold the coordinates (in x, y and z) of the grid origin.

◆ proj2D

DTGrid2D<bool,int>* DTGrid3Dex::proj2D
private

◆ Ptr_List_3D

ArrayPtr<bool,int>* DTGrid3Dex::Ptr_List_3D
private

◆ scale

float DTGrid3Dex::scale
private

◆ spacing

float DTGrid3Dex::spacing
private

not used for data scaling

◆ Title

char* DTGrid3Dex::Title

◆ 

struct { ... } DTGrid3Dex::uhbd

UHBD header information.

◆ Value_List_3D

ArrayReg<bool>* DTGrid3Dex::Value_List_3D
private

◆ x

float DTGrid3Dex::x

◆ y

float DTGrid3Dex::y

◆ z

float DTGrid3Dex::z

◆ Zcoord_List

ArrayPrs<int>* DTGrid3Dex::Zcoord_List
private

The documentation for this class was generated from the following file:
Imprint/Privacy