1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef nompi
#include "mimic_mpi.h"
#else
#include <mpi.h>
#endif
#define YOUSO10 100
#include "tran_prototypes.h"
#include "tran_variables.h"
#define print_stdout 0
/****************************************************************
purpose: save and load data to restart without input file
from RestartFileDFT.c
------------------------------------------
"read" mode allocates
int *WhatSpecies_l;
int *Spe_Total_CNO_l;
int *Spe_Total_NO_l;
int *FNAN_l;
int **natn_l;
int **ncn_l;
int **atv_ijk_l;
double *****OLP_l;
double *****H_l;
double ******DM_l;
or
int *WhatSpecies_r;
int *Spe_Total_CNO_r;
int *Spe_Total_NO_r;
int *FNAN_r;
int **natn_r;
int **ncn_r;
int **atv_ijk_r;
double *****OLP_r;
double *****H_r;
double ******DM_r;
*****************************************************************/
/*
e.g. Overlap_Band, which gives hints of data to be saved
for (MA_AN=1; MA_AN<=Matomnum; MA_AN++){
GA_AN = M2G[MA_AN];
wanA = WhatSpecies[GA_AN]; int* WhatSpecies[atomnum+1]
tnoA = Spe_Total_CNO[wanA]; int* Spe_Total_CNO[SpeciesNum]
Anum = MP[GA_AN]; int *MP, neglect!
for (LB_AN=0; LB_AN<=FNAN[GA_AN]; LB_AN++){
GB_AN = natn[GA_AN][LB_AN]; int** natn[atomnum+1][Max_FSNAN*ScaleSize+1]
Rn = ncn[GA_AN][LB_AN]; int** ncn[atomnum+1][Max_FSNAN*ScaleSize+1]
wanB = WhatSpecies[GB_AN];
tnoB = Spe_Total_CNO[wanB];
l1 = atv_ijk[Rn][1]; int** atv_ijk[TCpyCell+1][4];
l2 = atv_ijk[Rn][2];
l3 = atv_ijk[Rn][3];
kRn = k1*(double)l1 + k2*(double)l2 + k3*(double)l3;
si = sin(2.0*PI*kRn);
co = cos(2.0*PI*kRn);
Bnum = MP[GB_AN];
for (i=0; i<tnoA; i++){
for (j=0; j<tnoB; j++){
s = OLP[MA_AN][LB_AN][i][j]; double****
size: OLP[4]
[Matomnum+MatomnumF+MatomnumS+1]
[FNAN[Gc_AN]+1]
[Spe_Total_NO[Cwan]]
[Spe_Total_NO[Hwan]]
int *Spe_Total_NO Spe_Total_NO[SpeciesNum]
*/
/***************************************************************************/
static double ScaleSize_t;
static int SpinP_switch_t, atomnum_t, SpeciesNum_t, Max_FSNAN_t, TCpyCell_t, Matomnum_t, MatomnumF_t, MatomnumS_t;
static int *WhatSpecies_t;
static int *Spe_Total_CNO_t;
static int *Spe_Total_NO_t;
static int *FNAN_t;
static int **natn_t;
static int **ncn_t;
static int **atv_ijk_t;
static double Grid_Origin_t[4];
static double Gxyz_t[2][4];
static double *****OLP_t;
static double *****H_t;
static double ******DM_t;
static double **Density_Grid_t;
static double *dVHart_Grid_t;
static int Ngrid1_t, Ngrid2_t, Ngrid3_t;
static int Num_Cells0_t;
static double tv_t[4][4];
static double gtv_t[4][4];
static double ScaleSize_t;
static int TCpyCell_t;
static double ChemP_t;
#define ORDER_C
#ifdef ORDER_C
#undef ORDER_C
#endif
#ifdef ORDER_C
static void TRAN_Change_axis_Grid(
int n1, int n2, int n3,
double *grid)
/* order n2, n3, n1 */
#define v_ref(i,j,k) v[ (i)*n3*n1+(j)*n1+k ]
#define grid_ref(i,j,k) grid[ (i)*n2*n3+(j)*n3+k ]
{
int i,j,k;
double *v;
v = (double*)malloc(sizeof(double)*n1*n2*n3);
for (i=0;i<n1*n2*n3;i++) v[i]=grid[i];
for (i=0;i<n1;i++) {
for (j=0;j<n2;j++) {
for (k=0;k<n3;k++) {
grid_ref(i,j,k) = v_ref(j,k,i);
}
}
}
free(v);
}
#endif
int TRAN_Input_HKS( MPI_Comm comm1, char *fileHKS)
{
FILE *fp;
int i_vec[100],i2_vec[2];
double d_vec[100];
int i,id,j;
int size1,size;
int *ia_vec;
int Gc_AN, k,Mc_AN, tno0, Cwan, h_AN, tno1, Gh_AN, Hwan,m,N;
int numprocs,myid,ID;
MPI_Comm_size(comm1,&numprocs);
MPI_Comm_rank(comm1,&myid);
if (myid==Host_ID) printf("<TRAN_Input_HKS>\n");fflush(stdout);
/* make a filename */
if ( (fp=fopen(fileHKS,"r"))==NULL) {
printf("can not open %s\n",fileHKS);
exit(0);
}
if (print_stdout){
printf("file=%s\n",fileHKS);
}
/* save data to the file (*fp) */
/* parameter to allocate memory */
fread(i_vec,sizeof(int),2,fp);
/*i_vec[i++]=1; major version */
/*i_vec[i++]=0; minor version*/
fread(i_vec,sizeof(int),12,fp);
i=0;
SpinP_switch_t = i_vec[i++];
atomnum_t = i_vec[i++];
SpeciesNum_t = i_vec[i++];
Max_FSNAN_t = i_vec[i++];
TCpyCell_t = i_vec[i++];
Matomnum_t = i_vec[i++];
MatomnumF_t = i_vec[i++];
MatomnumS_t = i_vec[i++];
Ngrid1_t = i_vec[i++];
Ngrid2_t = i_vec[i++];
Ngrid3_t = i_vec[i++];
Num_Cells0_t = i_vec[i++];
#ifdef ORDER_C
{ int it1,it2,it3;
it1=Ngrid1_t;
it2=Ngrid2_t;
it3=Ngrid3_t;
Ngrid1_t = it3;
Ngrid2_t = it1;
Ngrid3_t = it2;
Num_Cells0_t = Ngrid1_t;
}
#endif
#if 0
if (print_stdout){
printf("%d %d %d %d %d %d\n",SpinP_switch_t,atomnum_t,SpeciesNum_t,
Max_FSNAN_t, TCpyCell_t, Matomnum_t );
printf("%d %d %d %d %d %d\n",MatomnumF_t,MatomnumS_t,Ngrid1_t,
Ngrid2_t,Ngrid3_t,Num_Cells0_t);
}
#endif
fread(d_vec,sizeof(double),19+3+3+1,fp);
i=0;
ScaleSize_t=d_vec[i++];
for (j=1;j<=3;j++) {
for (k=1;k<=3;k++) {
tv_t[j][k]=d_vec[i++];
}
}
for (j=1;j<=3;j++) {
for (k=1;k<=3;k++) {
gtv_t[j][k]=d_vec[i++];
}
}
for (j=1;j<=3;j++) {
Grid_Origin_t[j]= d_vec[i++];
}
for (j=1;j<=3;j++) {
Gxyz_t[1][j]= d_vec[i++];
}
ChemP_t = d_vec[i++];
if (print_stdout){
printf("Grid_Origin=%lf %lf %lf\n",Grid_Origin_t[1],Grid_Origin_t[2],Grid_Origin_t[3]);
printf("Gxyz=%lf %lf %lf\n",Gxyz_t[1][1],Gxyz_t[1][2],Gxyz_t[1][3]);
printf("ChemP=%le\n",ChemP_t);
}
#ifdef ORDER_C
{
double v[4][4];
double v1[4];
for (i=1;i<=3;i++) {
for (j=1;j<=3;j++) {
v[i][j]= tv_t[i][j];
}
}
for (j=1;j<=3;j++) {
tv_t[1][j] = v[3][j];
tv_t[2][j]= v[1][j];
tv_t[3][j]= v[2][j];
}
for (i=1;i<=3;i++) {
for (j=1;j<=3;j++) {
v[i][j]= gtv_t[i][j];
}
}
for (j=1;j<=3;j++) {
gtv_t[1][j] = v[3][j];
gtv_t[2][j]= v[1][j];
gtv_t[3][j]= v[2][j];
}
for (j=1;j<=3;j++) {
v1[j] = Grid_Origin_t[j];
}
}
#endif
#if 0
if (print_stdout){
printf("Scale =%lf\n",ScaleSize_t);
}
#endif
/* data in arrays */
WhatSpecies_t=(int*)malloc(sizeof(int)*(atomnum_t+1));
fread(WhatSpecies_t, sizeof(int), atomnum_t+1, fp);
Spe_Total_CNO_t=(int*)malloc(sizeof(int)*SpeciesNum_t);
fread(Spe_Total_CNO_t, sizeof(int), SpeciesNum_t, fp);
Spe_Total_NO_t=(int*)malloc(sizeof(int)*SpeciesNum_t);
fread(Spe_Total_NO_t,sizeof(int),SpeciesNum_t,fp);
FNAN_t=(int*)malloc(sizeof(int)*(atomnum_t+1));
fread(FNAN_t,sizeof(int),atomnum_t+1,fp);
size1=(int)Max_FSNAN_t*ScaleSize_t+1;
natn_t=(int**)malloc(sizeof(int*)*(atomnum_t+1) );
for (i=0;i<= atomnum_t; i++) {
natn_t[i]=(int*)malloc(sizeof(int)*size1);
fread(natn_t[i],sizeof(int),size1,fp);
}
ncn_t=(int**)malloc(sizeof(int*)*(atomnum_t+1) );
for (i=0;i<= atomnum_t; i++) {
ncn_t[i]=(int*)malloc(sizeof(int)*size1);
fread(ncn_t[i],sizeof(int),size1,fp);
}
#if 0
if (print_stdout){
printf("ncn\n");
for (i=0;i<=atomnum_t;i++) {
for (j=0;j<size1;j++) {
printf("%d ",ncn_t[i][j]);
}
printf("\n");
}
}
#endif
/* printf("atv_ijk\n"); */
size1=(TCpyCell_t+1)*4;
ia_vec=(int*)malloc(sizeof(int)*size1);
id=0;
fread(ia_vec,sizeof(int),size1,fp);
atv_ijk_t=(int**)malloc(sizeof(int*)*(TCpyCell_t+1));
for (i=0;i<TCpyCell_t+1;i++) {
atv_ijk_t[i]=(int*)malloc(sizeof(int)*4);
for (j=0;j<=3;j++) {
atv_ijk_t[i][j]=ia_vec[id++];
/* printf("%d ",atv_ijk_t[i][j]); */
}
#ifdef ORDER_C
{
int t1,t2,t3;
t1 = atv_ijk_t[i][1];
t2 = atv_ijk_t[i][2];
t3 = atv_ijk_t[i][3];
atv_ijk_t[i][1] = t3;
atv_ijk_t[i][2] = t1;
atv_ijk_t[i][3] = t2;
}
#endif
/* printf("\n"); */
}
free(ia_vec);
/* OLP, this is complex */
OLP_t = (double*****)malloc(sizeof(double****)*4);
for (k=0; k<4 ; k++){
OLP_t[k] = (double****)malloc(sizeof(double***)*(atomnum_t+1));
for (Mc_AN=1; Mc_AN<=atomnum_t; Mc_AN++){
if (Mc_AN==0){
Gc_AN = 0;
tno0 = 1;
}
else{
Gc_AN = Mc_AN;
Cwan = WhatSpecies_t[Gc_AN];
tno0 = Spe_Total_NO_t[Cwan];
}
OLP_t[k][Mc_AN] = (double***)malloc(sizeof(double**)*(FNAN_t[Gc_AN]+1));
for (h_AN=0; h_AN<=FNAN_t[Gc_AN]; h_AN++){
if (Mc_AN==0){
tno1 = 1;
}
else{
Gh_AN = natn_t[Gc_AN][h_AN];
Hwan = WhatSpecies_t[Gh_AN];
tno1 = Spe_Total_NO_t[Hwan];
}
OLP_t[k][Mc_AN][h_AN] = (double**)malloc(sizeof(double*)*tno0);
for (i=0; i<tno0; i++){
OLP_t[k][Mc_AN][h_AN][i]=(double*)malloc(sizeof(double)*tno1);
fread(OLP_t[k][Mc_AN][h_AN][i],sizeof(double),tno1,fp);
/* printf("%le ",OLP_t[k][Mc_AN][h_AN][i][0]); */
}
}
}
}
#if 0
/*debug*/
int GA_AN, wanA, tnoA, Anum;
int LB_AN, GB_AN, wanB, tnoB;
int *MP,num_e;
TRAN_set_MP(0, atomnum_t, WhatSpecies_t, Spe_Total_CNO_t, &num_e, MP);
MP = (int*)malloc(sizeof(int)*(num_e+1));
TRAN_set_MP(1, atomnum_t, WhatSpecies_t, Spe_Total_CNO_t, &num_e, MP);
printf("OLP_e\n");
for (GA_AN=1;GA_AN<=atomnum_t; GA_AN++) {
wanA = WhatSpecies_t[GA_AN];
tnoA = Spe_Total_CNO_t[wanA];
Anum = MP[GA_AN];
for (LB_AN=0; LB_AN<=FNAN_t[GA_AN]; LB_AN++){
GB_AN = natn_t[GA_AN][LB_AN];
wanB = WhatSpecies_t[GB_AN];
tnoB = Spe_Total_CNO_t[wanB];
printf("GA_AN=%d LB_AN=%d GB_AN=%d tnoA=%d tnoB=%d S=%lf\n",
GA_AN,LB_AN, GB_AN,tnoA,tnoB, OLP_t[0][GA_AN][LB_AN][0][0]);
}
}
free(MP);
#endif
/* H */
H_t = (double*****)malloc(sizeof(double****)*(SpinP_switch_t+1));
for (k=0; k<=SpinP_switch_t; k++){
H_t[k] = (double****)malloc(sizeof(double***)*(atomnum_t+1));
for (Mc_AN=1; Mc_AN<=atomnum_t; Mc_AN++){
if (Mc_AN==0){
Gc_AN = 0;
tno0 = 1;
}
else{
Gc_AN = Mc_AN;
Cwan = WhatSpecies_t[Gc_AN];
tno0 = Spe_Total_NO_t[Cwan];
}
H_t[k][Mc_AN] = (double***)malloc(sizeof(double**)*(FNAN_t[Gc_AN]+1));
for (h_AN=0; h_AN<=FNAN_t[Gc_AN]; h_AN++){
if (Mc_AN==0){
tno1 = 1;
}
else{
Gh_AN = natn_t[Gc_AN][h_AN];
Hwan = WhatSpecies_t[Gh_AN];
tno1 = Spe_Total_NO_t[Hwan];
}
H_t[k][Mc_AN][h_AN] = (double**)malloc(sizeof(double*)*tno0);
for (i=0; i<tno0; i++){
H_t[k][Mc_AN][h_AN][i] = (double*)malloc(sizeof(double)*tno1);
fread(H_t[k][Mc_AN][h_AN][i],sizeof(double),tno1,fp);
}
}
}
}
/* DM */
DM_t = (double******)malloc(sizeof(double*****)*1);
for (m=0; m<1; m++){
DM_t[m] = (double*****)malloc(sizeof(double****)*(SpinP_switch_t+1));
for (k=0; k<=SpinP_switch_t; k++){
DM_t[m][k] = (double****)malloc(sizeof(double***)*(atomnum_t+1));
FNAN_t[0] = 0;
for (Mc_AN=1; Mc_AN<=atomnum_t; Mc_AN++){
if (Mc_AN==0){
Gc_AN = 0;
tno0 = 1;
}
else{
Gc_AN = Mc_AN;
Cwan = WhatSpecies_t[Gc_AN];
tno0 = Spe_Total_NO_t[Cwan];
}
DM_t[m][k][Mc_AN] = (double***)malloc(sizeof(double**)*(FNAN_t[Gc_AN]+1));
for (h_AN=0; h_AN<=FNAN_t[Gc_AN]; h_AN++){
if (Mc_AN==0){
tno1 = 1;
}
else{
Gh_AN = natn_t[Gc_AN][h_AN];
Hwan = WhatSpecies_t[Gh_AN];
tno1 = Spe_Total_NO_t[Hwan];
}
DM_t[m][k][Mc_AN][h_AN] = (double**)malloc(sizeof(double*)*tno0);
for (i=0; i<tno0; i++){
DM_t[m][k][Mc_AN][h_AN][i] = (double*)malloc(sizeof(double)*tno1);
fread(DM_t[m][k][Mc_AN][h_AN][i],sizeof(double),tno1,fp);
}
}
}
}
}
N= Ngrid1_t*Ngrid2_t*Ngrid3_t;
Density_Grid_t=(double**)malloc(sizeof(double*)*(SpinP_switch_t+1));
for (m=0;m<=SpinP_switch_t;m++) {
Density_Grid_t[m]=(double*)malloc(sizeof(double)*N);
fread(Density_Grid_t[m],sizeof(double), N,fp);
#ifdef ORDER_C
TRAN_Change_axis_Grid(Ngrid1_t, Ngrid2_t, Ngrid3_t, Density_Grid_t[m]);
#endif
}
/* printf("the first of Density_Grid = %20.10le\n",Density_Grid_t[0][0]); */
if (print_stdout){
printf("the last of Density_Grid = %20.10le\n",Density_Grid_t[SpinP_switch_t][N-1]);
}
/* dVHart_Grid */
dVHart_Grid_t=(double*)malloc(sizeof(double)*N);
fread(dVHart_Grid_t,sizeof(double), N,fp);
#ifdef ORDER_C
TRAN_Change_axis_Grid(Ngrid1_t, Ngrid2_t, Ngrid3_t, dVHart_Grid_t);
#endif
/* debug */
if (print_stdout){
printf("the last of dVHart_Grid=%20.10le\n",dVHart_Grid_t[N-1]);
}
#ifdef DEBUG
{ double R[4];
R[1]=0.0; R[2]=0.0; R[3]=0.0;
TRAN_Print_Grid_z("dVHart_e2", Grid_Origin_t, gtv_t,
Ngrid1_t,Ngrid2_t,0, Ngrid3_t-1,R,
dVHart_Grid_t);
}
#endif
fclose(fp);
return 1;
}
int TRAN_RestartFile(MPI_Comm comm1, char *mode, char *position,char *filepath, char *filename)
{
int i,side,j,k;
char fileHKS[YOUSO10];
int numprocs,myid,ID;
MPI_Comm_size(comm1,&numprocs);
MPI_Comm_rank(comm1,&myid);
if (myid==Host_ID){
printf("<TRAN_RestartFile called, mode=%s pos=%s>\n", mode,position);fflush(stdout);
}
if (strcasecmp(position,"left")==0) {
side=0;
} else if (strcasecmp(position,"right")==0) {
side=1;
} else {
printf("mode=%s position=%s, not supported\n",mode, position);
return 1;
}
if (strcasecmp(position,"left")==0) {
sprintf(fileHKS,"%s%s",filepath,filename);
}
else if (strcasecmp(position,"right")==0) {
sprintf(fileHKS,"%s%s",filepath,filename);
}
else {
printf("***ERROR***\n\nmode=%s position=%s, not supported\n\n\n",mode, position);
return 1;
}
/*******************
write
*******************/
if (strcasecmp(mode,"write")==0) {
TRAN_Output_HKS(fileHKS);
}
/*******************
read
*******************/
else if (strcasecmp(mode,"read")==0) {
TRAN_Input_HKS(comm1, fileHKS);
#if 0
if (strcasecmp(position,"left")==0) {
side=0;
} else if (strcasecmp(position,"right")==0) {
side=1;
} else {
printf("mode=%s position=%s, not supported\n",mode, position);
return 1;
}
#endif
ScaleSize_e[side]=ScaleSize_t;
SpinP_switch_e[side]=SpinP_switch_t;
atomnum_e[side]=atomnum_t;
SpeciesNum_e[side]=SpeciesNum_t;
Max_FSNAN_e[side]=Max_FSNAN_t;
TCpyCell_e[side]=TCpyCell_t;
Matomnum_e[side]=Matomnum_t;
MatomnumF_e[side]=MatomnumF_t;
MatomnumS_e[side]=MatomnumS_t;
WhatSpecies_e[side]=WhatSpecies_t;
Spe_Total_CNO_e[side]=Spe_Total_CNO_t;
Spe_Total_NO_e[side]=Spe_Total_NO_t;
FNAN_e[side]=FNAN_t;
natn_e[side]=natn_t;
ncn_e[side]=ncn_t;
atv_ijk_e[side]=atv_ijk_t;
OLP_e[side]=OLP_t;
H_e[side]=H_t;
DM_e[side]=DM_t;
Density_Grid_e[side]=Density_Grid_t;
dVHart_Grid_e[side] = dVHart_Grid_t;
Ngrid1_e[side]=Ngrid1_t;
Ngrid2_e[side]=Ngrid2_t;
Ngrid3_e[side]=Ngrid3_t;
Num_Cells0_e[side]=Num_Cells0_t;
for (j=1;j<=3;j++) {
for (k=1;k<=3;k++) {
tv_e[side][j][k]= tv_t[j][k];
}
}
for (j=1;j<=3;j++) {
for (k=1;k<=3;k++) {
gtv_e[side][j][k]=gtv_t[j][k];
}
}
for (i=1;i<=3;i++) {
Grid_Origin_e[side][i]=Grid_Origin_t[i];
}
for (i=1;i<=3;i++) {
Gxyz_e[side][1][i]=Gxyz_t[1][i];
}
ChemP_e[side]=ChemP_t;
}
return 0;
}
|