64 template<
typename T,
typename K>
130 void set_projection2D(K*, K*, K*, K*, K*, K*,
int,
int,
int,
int,
int,
int);
176 T *
getCell(T *,
int,
int,
int);
195 template <
typename T,
typename K>
202 else if (grid_type == 1){
204 delete Value_List_3D;
220 template <
typename T,
typename K>
223 set_gamma_values(gamma, gamma);
224 test_format_dtgrid(file_name);
226 format_binary(file_name);
228 format_ascii(file_name);
230 std::cout <<
"Error: Unknown file format" << std::endl;
242 template <
typename T,
typename K>
246 Length_of_Value_List_3D = 0;
248 else if (grid_type == 1){
251 Length_of_Value_List_3D = length;
264 template <
typename T,
typename K>
268 Length_of_Zcoord_List = length;
277 template <
typename T,
typename K>
281 Length_of_Ptr_List_3D = 0;
283 else if (grid_type == 1){
286 Length_of_Ptr_List_3D = length;
309 template <
typename T,
typename K>
311 K* values4, K* values5, K* values6,
int length1,
int length2, \
312 int length3,
int length4,
int length5,
int length6){
316 proj2D->set_ycoord_list(values2,length2);
317 proj2D->set_ptr_list_2D(values3,length3);
318 proj2D->set_projection1D(values4, values5, values6, length4, length5, length6);
345 template <
typename T,
typename K>
370 template <
typename T,
typename K>
390 template <
typename T,
typename K>
395 int countdown_1 = proj2D->proj1D->set_countdown_1;
400 for (;countdown_1>0;countdown_1--){
402 key1 = a>=coo1->
v1 ? (a<=coo1->
v2 ? true :
false) :
false;
404 return access_fast_yz(b,
c, *(ptt1) + a - coo1->
v1);
423 template <
typename T,
typename K>
428 K checkpoint_21 = coord2->
v2;
429 K checkpoint_22 = (coord2+1)->v2;
430 K countdown_2 = checkpoint_22 - checkpoint_21;
433 if (countdown_2 == 0){
return gamma_o;}
439 for (; countdown_2 >= 1; countdown_2--){
441 key2 = b>=coo2->
v1 ? (b<=coo2->
v2 ? true :
false) :
false;
443 return access_fast_z(
c, *(ptt2) + b - coo2->
v1);
463 template <
typename T,
typename K>
468 K checkpoint_31 = coord3->
v2;
469 K checkpoint_32 = (coord3+1)->v2;
470 K countdown_3 = checkpoint_32 - checkpoint_31;
472 if (countdown_3 == 0)
return gamma_o;
474 T ** ptt3 = Ptr_List_3D->PtrArrayReg+checkpoint_31;
479 for (; countdown_3 >= 1; countdown_3--){
481 key3 =
c>=coo3->
v1 ? (
c<=coo3->
v2 ? true :
false) :
false;
483 return *(*(ptt3)+
c-coo3->
v1);
509 template <
typename T,
typename K>
516 if (coord3 == NULL)
return gamma_o;
521 K checkpoint_31 = coord3->
v2;
522 K checkpoint_32 = (coord3+1)->v2;
523 K countdown_3 = checkpoint_32 - checkpoint_31;
526 if (countdown_3 == 0)
return gamma_o;
528 T ** ptt3 = Ptr_List_3D->PtrArrayReg+checkpoint_31;
533 for (; countdown_3 >= 1; countdown_3--){
535 key3 =
c>=coo3->
v1 ? (
c<=coo3->
v2 ? true :
false) :
false;
537 return *(*(ptt3)+
c-coo3->
v1);
591 template <
typename T,
typename K>
597 K checkpoint_31 = coord3->
v2;
598 K checkpoint_32 = (coord3+1)->v2;
599 K countdown_3 = checkpoint_32 - checkpoint_31;
601 T ** ptt3 = Ptr_List_3D->PtrArrayReg+checkpoint_31;
605 for (; countdown_3 >= 1; countdown_3--){
607 skey3 =
c>=coo3->
v1 ? (cinc<=coo3->
v2 ? 1 : (
c<=coo3->
v2 ? 2 : 0) ) : (cinc>=coo3->
v1 ? (cinc<=coo3->
v2 ? 3 : 0) : 0);
617 Cell[4*x+2*y] = *(*(ptt3)+
c-coo3->
v1);
618 Cell[4*x+2*y+1] = *(*(ptt3)+cinc-coo3->
v1);
622 Cell[4*x+2*y] = *(*(ptt3)+
c-coo3->
v1);
626 Cell[4*x+2*y+1] = *(*(ptt3)+cinc-coo3->
v1);
642 template <
typename T,
typename K>
648 K checkpoint_21 = coord2->
v2;
649 K checkpoint_22 = (coord2+1)->v2;
650 K countdown_2 = checkpoint_22 - checkpoint_21;
652 if (countdown_2 == 0){
return;}
658 for (; countdown_2 >= 1; countdown_2--){
660 skey2 = b>=coo2->
v1 ? (binc<=coo2->
v2 ? 1 : (b<=coo2->
v2 ? 2 : 0) ) : (binc>=coo2->
v1 ? (binc<=coo2->
v2 ? 3 : 0) : 0);
670 getCellz(Cell, x,0,
c, *(ptt2)+b-coo2->
v1);
672 getCellz(Cell, x,1,
c, *(ptt2)+binc-coo2->
v1);
676 getCellz(Cell, x,0,
c, *(ptt2)+b-coo2->
v1);
680 getCellz(Cell, x,1,
c, *(ptt2)+binc-coo2->
v1);
699 template <
typename T,
typename K>
704 int countdown_1 = proj2D->proj1D->set_countdown_1;
710 for (;countdown_1>0;countdown_1--){
712 skey1 = a>=coo1->
v1 ? (ainc<=coo1->
v2 ? 1 : (a<=coo1->
v2 ? 2 : 0) ) : (ainc>=coo1->
v1 ? (ainc<=coo1->
v2 ? 3 : 0) : 0);
722 getCellyz(Cell, 0,b,
c, *(ptt1) + a - coo1->
v1);
723 getCellyz(Cell, 1,b,
c, *(ptt1) + ainc - coo1->
v1);
727 getCellyz(Cell, 0,b,
c, *(ptt1) + a - coo1->
v1);
731 getCellyz(Cell, 1,b,
c, *(ptt1) + ainc - coo1->
v1);
748 template <
typename T,
typename K>
758 skey1 = a>=coo1->
v1 ? (ainc<=coo1->
v2 ? 1 : (a<=coo1->
v2 ? 2 : 0) ) : (ainc>=coo1->
v1 ? (ainc<=coo1->
v2 ? 3 : 0) : 0);
763 getCellyz(Cell, 0,b,
c, *(ptt1) + a - coo1->
v1);
764 getCellyz(Cell, 1,b,
c, *(ptt1) + ainc - coo1->
v1);
768 getCellyz(Cell, 0,b,
c, *(ptt1) + a - coo1->
v1);
772 getCellyz(Cell, 1,b,
c, *(ptt1) + ainc - coo1->
v1);
784 template <
typename T,
typename K>
787 std::ifstream file_bt;
788 file_bt.open(Input, std::ifstream::in | std::ifstream::binary);
791 file_bt.read((
char *) &flag,
sizeof(
int));
793 char * buffer =
new char [120];
794 file_bt.read(buffer, 120);
797 binary_test = (
char*) memchr (buffer,
'\n', 120);
802 std::cout <<
"Test format DT-Grid: No return statement, binary zeros found" << std::endl;
803 std::cout <<
"The file was detected to be of type binary" << std::endl;
806 if (binary_test == NULL) {
807 binary_test = (
char*) memchr (buffer,
'\0', 120);
808 if (binary_test == NULL){
810 std::cout <<
"Test format DT-Grid: No return statement, no binary zeros" << std::endl;
811 std::cout <<
"The file was detected to be of type ASCII" << std::endl;
815 std::cout <<
"Test format DT-Grid: No return statement, binary zeros found" << std::endl;
816 std::cout <<
"The file was detected to be of type binary" << std::endl;
821 std::cout <<
"Test format DT-Grid: Return statement found" << std::endl;
822 std::cout <<
"The file was detected to be of type ASCII" << std::endl;
838 template <
typename T,
typename K>
841 std::ifstream dtgrid_file;
842 dtgrid_file.open(file_binary, std::ifstream::in | std::ifstream::binary);
848 int dimi, dimj, dimk;
855 dtgrid_file.read((
char *) &flag_binary,
sizeof(
int));
856 uhbd.Title =
new char [72];
857 dtgrid_file.read(uhbd.Title, 72);
858 dtgrid_file.read((
char *) &uhbd.scale,
sizeof(
float));
859 dtgrid_file.read((
char *) &uhbd.dummy1,
sizeof(
float));
860 dtgrid_file.read((
char *) &uhbd.grdflag,
sizeof(
int));
861 dtgrid_file.read((
char *) &uhbd.idummy1,
sizeof(
int));
862 dtgrid_file.read((
char *) &uhbd.idummy2,
sizeof(
int));
863 dtgrid_file.read((
char *) &uhbd.one,
sizeof(
int));
864 dtgrid_file.read((
char *) &uhbd.idummy3,
sizeof(
int));
865 dtgrid_file.read((
char *) &uhbd.dim.i,
sizeof(
int));
866 dtgrid_file.read((
char *) &uhbd.dim.j,
sizeof(
int));
867 dtgrid_file.read((
char *) &uhbd.dim.k,
sizeof(
int));
868 dtgrid_file.read((
char *) &uhbd.spacing,
sizeof(
float));
869 dtgrid_file.read((
char *) &uhbd.o.x,
sizeof(
float));
870 dtgrid_file.read((
char *) &uhbd.o.y,
sizeof(
float));
871 dtgrid_file.read((
char *) &uhbd.o.z,
sizeof(
float));
872 dtgrid_file.read((
char *) &uhbd.dummy2,
sizeof(
float));
873 dtgrid_file.read((
char *) &uhbd.dummy3,
sizeof(
float));
874 dtgrid_file.read((
char *) &uhbd.dummy4,
sizeof(
float));
875 dtgrid_file.read((
char *) &uhbd.dummy5,
sizeof(
float));
876 dtgrid_file.read((
char *) &uhbd.dummy6,
sizeof(
float));
877 dtgrid_file.read((
char *) &uhbd.dummy7,
sizeof(
float));
878 dtgrid_file.read((
char *) &uhbd.idummy4,
sizeof(
int));
879 dtgrid_file.read((
char *) &uhbd.idummy5,
sizeof(
int));
883 int len_Value, len_xcoord, len_ycoord, len_zcoord;
884 int len_acc, len_acc2, len_acc3, len_projection, len_projection2;
887 dtgrid_file.read((
char *) &flag_grid_type,
sizeof(
int));
888 dtgrid_file.read((
char *) &len_Value,
sizeof(
int));
889 dtgrid_file.read((
char *) &len_xcoord,
sizeof(
int));
890 dtgrid_file.read((
char *) &len_ycoord,
sizeof(
int));
891 dtgrid_file.read((
char *) &len_zcoord,
sizeof(
int));
892 dtgrid_file.read((
char *) &len_acc,
sizeof(
int));
893 dtgrid_file.read((
char *) &len_acc2,
sizeof(
int));
894 dtgrid_file.read((
char *) &len_acc3,
sizeof(
int));
895 dtgrid_file.read((
char *) &len_projection,
sizeof(
int));
896 dtgrid_file.read((
char *) &len_projection2,
sizeof(
int));
898 grid_type = flag_grid_type;
900 std::cout <<
"Type of grid: Excluded volume" << std::endl;
901 else if (grid_type == 1)
902 std::cout <<
"Type of grid: Potential/Energy" << std::endl;
904 std::cout <<
"Type of grid: Unknown/Not-Set" << std::endl;
907 std::cout <<
"DT-Grid Header information: " << std::endl;
908 std::cout <<
"Length of Value array:\t" << len_Value << std::endl;
909 std::cout <<
"Length of xCoord array:\t" << len_xcoord<< std::endl;
910 std::cout <<
"Length of yCoord array:\t" << len_ycoord << std::endl;
911 std::cout <<
"Length of zCoord array:\t" << len_zcoord << std::endl;
912 std::cout <<
"Length of acc1D array:\t" << len_acc << std::endl;
913 std::cout <<
"Length of acc2D array:\t" << len_acc2 << std::endl;
914 std::cout <<
"Length of acc3D array:\t" << len_acc3 << std::endl;
915 std::cout <<
"Length of proj1D array:\t" << len_projection << std::endl;
916 std::cout <<
"Length of proj2D array:\t" << len_projection2 << std::endl << std::endl;
920 dtgrid_size =
sizeof(T) * len_Value +
sizeof(K) * (len_xcoord + len_ycoord + len_zcoord + \
921 len_acc + len_acc2 + len_acc3) +
sizeof(K *) * (len_projection + len_projection2);
922 size_ds(dtgrid_size);
932 else if (grid_type == 1){
934 Value =
new T [len_Value];
935 for (
int i=0;i<len_Value;i++){
936 dtgrid_file.read((
char *) &fval,
sizeof(
float));
937 if (
typeid(T) ==
typeid(
bool))
940 Value[i] = (T) fval * scfct;
950 zcoord =
new K [len_zcoord];
951 for (
int i=0;i<len_zcoord;i++){
952 dtgrid_file.read((
char *) &ival,
sizeof(int));
953 zcoord[i] = (K) ival;
958 acc =
new K [len_acc];
959 for (
int i=0;i<len_acc;i++){
960 dtgrid_file.read((
char *) &ival,
sizeof(int));
966 projection =
new K [len_projection];
967 for (
int i=0;i<len_projection;i++){
968 dtgrid_file.read((
char *) &ival,
sizeof(int));
969 projection[i] = (K) ival;
974 ycoord =
new K [len_ycoord];
975 for (
int i=0;i<len_ycoord;i++){
976 dtgrid_file.read((
char *) &ival,
sizeof(int));
977 ycoord[i] = (K) ival;
982 acc2 =
new K [len_acc2];
983 for (
int i=0;i<len_acc2;i++){
984 dtgrid_file.read((
char *) &ival,
sizeof(int));
990 projection2 =
new K [len_projection2];
991 for (
int i=0;i<len_projection2;i++){
992 dtgrid_file.read((
char *) &ival,
sizeof(int));
993 projection2[i] = (K) ival;
998 xcoord =
new K [len_xcoord];
999 for (
int i=0;i<len_xcoord;i++){
1000 dtgrid_file.read((
char *) &ival,
sizeof(int));
1001 xcoord[i] = (K) ival;
1006 acc3 =
new K [len_acc3];
1007 for (
int i=0;i<len_acc3;i++){
1008 dtgrid_file.read((
char *) &ival,
sizeof(int));
1013 set_uhbd_parameters(uhbd.scale, uhbd.spacing, uhbd.o.x, uhbd.o.y, uhbd.o.z, uhbd.dim.i, uhbd.dim.j, uhbd.dim.k);
1014 set_value_list_3D(Value,len_Value);
1015 set_zcoord_list(zcoord,len_zcoord);
1016 set_ptr_list_3D(acc,len_acc);
1017 set_projection2D(projection,ycoord,acc2,projection2,xcoord,acc3,len_projection, \
1018 len_ycoord,len_acc2,len_projection2,len_xcoord,len_acc3);
1021 if (grid_type == 0){
1024 else if (grid_type == 1){
1032 delete[] projection;
1035 delete[] projection2;
1039 dtgrid_file.close();
1049 template <
typename T,
typename K>
1052 std::ifstream dtgrid_file;
1053 dtgrid_file.open(file_ascii, std::ifstream::in);
1055 std::string title_str, line;
1056 std::string scale_str, dum1_str, grdflag_str, idum1_str, idum2_str, one_str, idum3_str;
1057 std::string i_str, j_str, k_str;
1058 std::string spacing_str, ox_str, oy_str, oz_str;
1059 std::string dum2_str, dum3_str, dum4_str, dum5_str;
1060 std::string dum6_str, dum7_str, idum4_str, idum5_str;
1065 int len_Value, len_xcoord, len_ycoord, len_zcoord;
1066 int len_acc, len_acc2, len_acc3, len_projection, len_projection2;
1069 getline(dtgrid_file,line);
1070 title_str = line.substr(0,72);
1074 getline(dtgrid_file,line);
1075 scale_str = line.substr(0,12);
1076 dum1_str = line.substr(12,12);
1077 grdflag_str = line.substr(24,7);
1078 idum1_str = line.substr(31,7);
1079 idum2_str = line.substr(38,7);
1080 one_str = line.substr(45,7);
1081 idum3_str = line.substr(52,7);
1082 getline(dtgrid_file,line);
1083 i_str = line.substr(0,7);
1084 j_str = line.substr(7,7);
1085 k_str = line.substr(14,7);
1086 spacing_str = line.substr(21,12);
1087 ox_str = line.substr(33,12);
1088 oy_str = line.substr(45,12);
1089 oz_str = line.substr(57,12);
1090 getline(dtgrid_file,line);
1091 dum2_str = line.substr(0,12);
1092 dum3_str = line.substr(12,12);
1093 dum4_str = line.substr(24,12);
1094 dum5_str = line.substr(36,12);
1095 getline(dtgrid_file,line);
1096 dum6_str = line.substr(0,12);
1097 dum7_str = line.substr(12,12);
1098 idum4_str = line.substr(24,7);
1099 idum5_str = line.substr(31,7);
1102 uhbd.Title =
new char [72];
1103 std::strncpy (uhbd.Title, title_str.c_str(), 72);
1105 std::stringstream (scale_str) >> uhbd.scale;
1106 std::stringstream (dum1_str) >> uhbd.dummy1;
1107 std::stringstream (grdflag_str) >> uhbd.grdflag;
1108 std::stringstream (idum1_str) >> uhbd.idummy1;
1109 std::stringstream (idum2_str) >> uhbd.idummy2;
1110 std::stringstream (one_str) >> uhbd.one;
1111 std::stringstream (idum3_str) >> uhbd.idummy3;
1112 std::stringstream (i_str) >> uhbd.dim.i;
1113 std::stringstream (j_str) >> uhbd.dim.j;
1114 std::stringstream (k_str) >> uhbd.dim.k;
1115 std::stringstream (spacing_str) >> uhbd.spacing;
1116 std::stringstream (ox_str) >> uhbd.o.x;
1117 std::stringstream (oy_str) >> uhbd.o.y;
1118 std::stringstream (oz_str) >> uhbd.o.z;
1119 std::stringstream (dum2_str) >> uhbd.dummy2;
1120 std::stringstream (dum3_str) >> uhbd.dummy3;
1121 std::stringstream (dum4_str) >> uhbd.dummy4;
1122 std::stringstream (dum5_str) >> uhbd.dummy5;
1123 std::stringstream (dum6_str) >> uhbd.dummy6;
1124 std::stringstream (dum7_str) >> uhbd.dummy7;
1125 std::stringstream (idum4_str) >> uhbd.idummy4;
1126 std::stringstream (idum5_str) >> uhbd.idummy5;
1131 dtgrid_file >> flag_grid_type;
1132 dtgrid_file >> len_Value;
1133 dtgrid_file >> len_xcoord;
1134 dtgrid_file >> len_ycoord;
1135 dtgrid_file >> len_zcoord;
1136 dtgrid_file >> len_acc;
1137 dtgrid_file >> len_acc2;
1138 dtgrid_file >> len_acc3;
1139 dtgrid_file >> len_projection;
1140 dtgrid_file >> len_projection2;
1142 grid_type = flag_grid_type;
1144 std::cout <<
"Type of grid: Excluded volume" << std::endl;
1145 else if (grid_type == 1)
1146 std::cout <<
"Type of grid: Potential/Energy" << std::endl;
1148 std::cout <<
"Type of grid: Unknown/Not-Set" << std::endl;
1151 std::cout <<
"DT-Grid Header information: " << std::endl;
1152 std::cout <<
"Length of Value array:\t" << len_Value << std::endl;
1153 std::cout <<
"Length of xCoord array:\t" << len_xcoord<< std::endl;
1154 std::cout <<
"Length of yCoord array:\t" << len_ycoord << std::endl;
1155 std::cout <<
"Length of zCoord array:\t" << len_zcoord << std::endl;
1156 std::cout <<
"Length of acc1D array:\t" << len_acc << std::endl;
1157 std::cout <<
"Length of acc2D array:\t" << len_acc2 << std::endl;
1158 std::cout <<
"Length of acc3D array:\t" << len_acc3 << std::endl;
1159 std::cout <<
"Length of proj1D array:\t" << len_projection << std::endl;
1160 std::cout <<
"Length of proj2D array:\t" << len_projection2 << std::endl << std::endl;
1162 unsigned int dtgrid_size;
1163 dtgrid_size =
sizeof(T) * len_Value +
sizeof(K) * (len_xcoord + len_ycoord + len_zcoord + \
1164 len_acc + len_acc2 + len_acc3) +
sizeof(K *) * (len_projection + len_projection2);
1165 size_ds(dtgrid_size);
1170 if (grid_type == 0){
1174 else if (grid_type == 1){
1176 Value =
new T [len_Value];
1177 for (
int i=0;i<len_Value;i++){
1178 dtgrid_file >> fval;
1179 if (
typeid(T) ==
typeid(
bool))
1182 Value[i] = fval * scfct;
1192 zcoord =
new K [len_zcoord];
1193 for (
int i=0;i<len_zcoord;i++){
1194 dtgrid_file >> ival;
1200 acc =
new K [len_acc];
1201 for (
int i=0;i<len_acc;i++){
1202 dtgrid_file >> ival;
1208 projection =
new K [len_projection];
1209 for (
int i=0;i<len_projection;i++){
1210 dtgrid_file >> ival;
1211 projection[i] = ival;
1216 ycoord =
new K [len_ycoord];
1217 for (
int i=0;i<len_ycoord;i++){
1218 dtgrid_file >> ival;
1224 acc2 =
new K [len_acc2];
1225 for (
int i=0;i<len_acc2;i++){
1226 dtgrid_file >> ival;
1231 projection2 =
new K [len_projection2];
1232 for (
int i=0;i<len_projection2;i++){
1233 dtgrid_file >> ival;
1234 projection2[i] = ival;
1239 xcoord =
new K [len_xcoord];
1240 for (
int i=0;i<len_xcoord;i++){
1241 dtgrid_file >> ival;
1247 acc3 =
new K [len_acc3];
1248 for (
int i=0;i<len_acc3;i++){
1249 dtgrid_file >> ival;
1254 set_uhbd_parameters(uhbd.scale, uhbd.spacing, uhbd.o.x, uhbd.o.y, uhbd.o.z, uhbd.dim.i, uhbd.dim.j, uhbd.dim.k);
1255 set_value_list_3D(Value,len_Value);
1256 set_zcoord_list(zcoord,len_zcoord);
1257 set_ptr_list_3D(acc,len_acc);
1258 set_projection2D(projection,ycoord,acc2,projection2,xcoord,acc3,len_projection, \
1259 len_ycoord,len_acc2,len_projection2,len_xcoord,len_acc3);
1261 if (grid_type == 0){
1264 else if (grid_type == 1){
1272 delete[] projection;
1275 delete[] projection2;
1279 dtgrid_file.close();
1286 template <
typename T,
typename K>
1294 gb = 1024 * 1024 * 1024;
1296 if (((
float)val / (
float) gb) >= 1.0) {
1297 dtgrid_size = (float) val / (
float) gb;
1298 std::cout <<
"Size of DT-Grid data structure is " << dtgrid_size <<
" GB" << std::endl;
1301 if (((
float)val / (
float) mb) >= 1.0) {
1302 dtgrid_size = (float) val / (
float) mb;
1303 std::cout <<
"Size of DT-Grid data structure is " << dtgrid_size <<
" MB" << std::endl;
1306 dtgrid_size = (float) val / (
float) kb;
1307 std::cout <<
"Size of DT-Grid data structure is " << dtgrid_size <<
" KB" << std::endl;
Define the array for storing pairs of indices.
Define the array for storing pointers into ArrayPrs.
Define arrays of regular type used in any of the DT-Grid layers.
Define 2D DT-Grid class and group its functions.
Definition: ArrayPrs.hpp:42
K v2
index into the icoord array (min connected component)
Definition: ArrayPrs.hpp:45
K v1
Definition: ArrayPrs.hpp:44
Definition: ArrayPrs.hpp:19
void Set_Pair_Array_Values(K *, int)
Setup the array that stores the complete icoord values.
Definition: ArrayPrs.hpp:74
Definition: ArrayPtr.hpp:20
void Set_Pointer_Array_Values(typename ArrayPrs< K >::PairArray *, K *, int, int)
Setup the array that stores the IndexPair values.
Definition: ArrayPtr.hpp:108
Definition: ArrayReg.hpp:18
void Set_Regular_Array_Values(T *, int)
Array setup.
Definition: ArrayReg.hpp:57
Definition: DTGrid2D.hpp:17
void set_value_list_2D(K *, int)
DTGrid2D 'value' array setup.
Definition: DTGrid2D.hpp:83
Definition: DTGrid3D.hpp:65
int idummy3
Definition: DTGrid3D.hpp:148
int Length_of_Ptr_List_3D
Definition: DTGrid3D.hpp:80
struct DTGrid3D::@1 origin
hold the coordinates (in x, y and z) of the grid origin.
int grdflag
Definition: DTGrid3D.hpp:144
float dummy5
Definition: DTGrid3D.hpp:157
T access_fast(int, int, int)
Random access function.
Definition: DTGrid3D.hpp:391
float dummy7
Definition: DTGrid3D.hpp:159
float z
Definition: DTGrid3D.hpp:122
DTGrid3D(char *, T, T)
DTGrid3D constructor.
Definition: DTGrid3D.hpp:221
T gamma_o
Definition: DTGrid3D.hpp:83
void getCellyz(T *, int, int, int, typename ArrayPrs< K >::PairArray *)
Random access function for grid cells (y direction, DTGrid2D).
Definition: DTGrid3D.hpp:643
float dummy3
Definition: DTGrid3D.hpp:155
float dummy6
Definition: DTGrid3D.hpp:158
char * Title
Definition: DTGrid3D.hpp:143
float x
Definition: DTGrid3D.hpp:120
ArrayReg< T > * Value_List_3D
Definition: DTGrid3D.hpp:72
void format_ascii(char *)
Open and Read the ascii grid file.
Definition: DTGrid3D.hpp:1050
int iform
grid file format: binary = 0; ascii = 1
Definition: DTGrid3D.hpp:86
struct DTGrid3D::@2::origin o
void test_format_dtgrid(char *)
Determine the DT-Grid file format.
Definition: DTGrid3D.hpp:785
int grid_type
grid type: exclusion grid = 0; normal grid = 1
Definition: DTGrid3D.hpp:89
float y
Definition: DTGrid3D.hpp:121
void format_binary(char *)
Open and Read the binary grid file.
Definition: DTGrid3D.hpp:839
~DTGrid3D()
DTGrid3D destructor.
Definition: DTGrid3D.hpp:196
void set_gamma_values(T, T)
Set the default gamma value.
Definition: DTGrid3D.hpp:371
float scale
scaling factor
Definition: DTGrid3D.hpp:92
struct DTGrid3D::@0 dimensions
grid dimensions in x, y and z directions given by i, j and k, respectively
int j
Definition: DTGrid3D.hpp:114
T access_fast_z(int, typename ArrayPrs< K >::PairArray *)
Random access function for DTGrid3D.
Definition: DTGrid3D.hpp:464
float dummy1
Definition: DTGrid3D.hpp:153
DTGrid2D< T, K > * proj2D
Definition: DTGrid3D.hpp:76
T gamma_i
Definition: DTGrid3D.hpp:82
void set_zcoord_list(K *, int)
zCoord array setup
Definition: DTGrid3D.hpp:265
void size_ds(unsigned int)
Estimate the grid file size.
Definition: DTGrid3D.hpp:1287
void Reset_pointers_3D(void)
void set_value_list_3D(T *, int)
DTGrid3D 'value' array setup.
Definition: DTGrid3D.hpp:243
ArrayPtr< T, K > * Ptr_List_3D
Definition: DTGrid3D.hpp:74
T access_fast_yz(int, int, typename ArrayPrs< K >::PairArray *)
Random access function for DTGrid2D.
Definition: DTGrid3D.hpp:424
int Length_of_Zcoord_List
Definition: DTGrid3D.hpp:79
float spacing
Definition: DTGrid3D.hpp:93
int i
Definition: DTGrid3D.hpp:113
void set_projection2D(K *, K *, K *, K *, K *, K *, int, int, int, int, int, int)
proj2D setup
Definition: DTGrid3D.hpp:310
int idummy2
Definition: DTGrid3D.hpp:147
void set_uhbd_parameters(float, float, float, float, float, int, int, int)
Reset pointers that temporarily store addresses for random access.
Definition: DTGrid3D.hpp:346
bool excl_accessxyz(int, int, int)
int idummy4
Definition: DTGrid3D.hpp:149
int Length_of_Value_List_3D
Definition: DTGrid3D.hpp:78
ArrayPrs< K > * Zcoord_List
Definition: DTGrid3D.hpp:73
T * getCell2(T *, int, int, int)
Random access to grid cells. (2nd version)
Definition: DTGrid3D.hpp:749
int type_of_grid(void)
Definition: DTGrid3D.hpp:179
float dummy4
Definition: DTGrid3D.hpp:156
struct DTGrid3D::@2 uhbd
UHBD header information.
T scfct
Definition: DTGrid3D.hpp:91
void getCellz(T *, int, int, int, typename ArrayPrs< K >::PairArray *)
A random access function suited for excluded volume grids, based on the function.
Definition: DTGrid3D.hpp:592
void set_ptr_list_3D(K *, int)
acc (3D) array setup
Definition: DTGrid3D.hpp:278
int k
Definition: DTGrid3D.hpp:115
int idummy5
Definition: DTGrid3D.hpp:150
struct DTGrid3D::@2::dimensions dim
int idummy1
Definition: DTGrid3D.hpp:146
T * getCell(T *, int, int, int)
Random access to grid cells.
Definition: DTGrid3D.hpp:700
int one
Definition: DTGrid3D.hpp:145
T accessxyz(int, int, int)
Random access function.
Definition: DTGrid3D.hpp:510
float dummy2
Definition: DTGrid3D.hpp:154
real(kind=8), parameter c
Definition: mod_gouy_chapman.f90:39