writeCloopinput_dke_ft

PURPOSE ^

SYNOPSIS ^

function writeCloopinput_dke_ft(nit_f,boundary_mode_f,bounce_mode,coll_mode,norm_mode_f,prec0_f,display_mode,betath_ref,xTe_norm,xne_norm,dtn,mhu,nmhu,npn,ns_f,nr,sm_f,masku,maskl,dpn,dmhu,xpn,xpn2,xpn3,xsigma,xgamma,xz,xz2,pn,pn2,pn3,sigma,gamma,z,z2,xJ1,xJ2,xJ3,xJ4,J1,J2,J3,J4,Xmhu,XXsinksource,Xmask_r_edge,XXfM,XXfinit,XXRlambda_b_p1p1,rdke,Xpn2,Zpn2_t,Zmask_f0_t,MMXT_f_t,MMXR_f_t,MMXP_f_t,MMXPC_f_t,MMXPDI_f_t,XXI,XXf0,time_scheme,dkepath)

DESCRIPTION ^

 Write input parameters for internal C loop (unsing PETSc)

   INPUTS:

       - list of parmeters above

   OUTPUTS:
   
       - none

 by Fr�d�ric Teisseire (CEA/DRFC), Yves Peysson <yves.peysson@cea.fr> (CEA/DRFC) and Joan Decker <joan.decker@cea.fr> (CEA/DRFC)


 Writing loop constants and initializing variables
 Control parameters

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function writeCloopinput_dke_ft(nit_f,boundary_mode_f,bounce_mode,coll_mode,norm_mode_f,prec0_f,display_mode,betath_ref,xTe_norm,xne_norm,dtn,mhu,nmhu,npn,ns_f,nr,sm_f,...
0002    masku,maskl,dpn,dmhu,xpn,xpn2,xpn3,xsigma,xgamma,xz,xz2,pn,pn2,pn3,...
0003    sigma,gamma,z,z2,xJ1,xJ2,xJ3,xJ4,J1,J2,J3,J4,...
0004    Xmhu,XXsinksource,Xmask_r_edge,XXfM,XXfinit,XXRlambda_b_p1p1,rdke,Xpn2,Zpn2_t,...
0005    Zmask_f0_t,...
0006    MMXT_f_t,MMXR_f_t,MMXP_f_t,MMXPC_f_t,MMXPDI_f_t,...
0007    XXI,XXf0,time_scheme,dkepath)
0008 %
0009 % Write input parameters for internal C loop (unsing PETSc)
0010 %
0011 %   INPUTS:
0012 %
0013 %       - list of parmeters above
0014 %
0015 %   OUTPUTS:
0016 %
0017 %       - none
0018 %
0019 % by Fr�d�ric Teisseire (CEA/DRFC), Yves Peysson <yves.peysson@cea.fr> (CEA/DRFC) and Joan Decker <joan.decker@cea.fr> (CEA/DRFC)
0020 %
0021 %
0022 % Writing loop constants and initializing variables
0023 % Control parameters
0024 %
0025 if ~exist([dkepath.temppath,'/DKESolver_variables']),
0026     mkdir([dkepath.temppath,'/DKESolver_variables']);%Create input directory
0027 end
0028 if ~exist([dkepath.temppath,'/DKESolver_output']),
0029     mkdir([dkepath.temppath,'/DKESolver_output']);%Create output directory
0030 end
0031 %
0032 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/nit_f'],int32(nit_f));
0033 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/boundary_mode_f'],int32(boundary_mode_f));
0034 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/bounce_mode'],int32(bounce_mode));
0035 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/coll_mode'],int32(coll_mode));
0036 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/norm_mode_f'],int32(norm_mode_f));
0037 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/prec0_f'],prec0_f);
0038 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/display_mode'],int32(display_mode));
0039 %
0040 %Writing Binary files
0041 %
0042 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/betath_ref'],betath_ref);
0043 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xTe_norm'],xTe_norm);
0044 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xne_norm'],xne_norm);
0045 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/dtn'],dtn);
0046 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/mhu'],mhu);
0047 %
0048 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/nmhu'],int32(nmhu));
0049 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/npn'],int32(npn));
0050 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/ns_f'],int32(ns_f));
0051 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/nr'],int32(nr));
0052 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/sm_f'],int32(sm_f));
0053 %
0054 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/masku'],masku);
0055 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/maskl'],maskl)
0056 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/dpn'],dpn);
0057 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/dmhu'],dmhu);
0058 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xpn'],xpn);
0059 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xpn2'],xpn2);
0060 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xpn3'],xpn3);
0061 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xsigma'],xsigma);
0062 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xgamma'],xgamma);
0063 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xz'],xz);
0064 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xz2'],xz2);
0065 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/pn'],pn);
0066 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/pn2'],pn2);
0067 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/pn3'],pn3);
0068 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/sigma'],sigma);
0069 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/gamma'],gamma);
0070 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/z'],z);
0071 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/z2'],z2);
0072 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xJ1'],xJ1);
0073 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xJ2'],xJ2);
0074 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xJ3'],xJ3);
0075 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/xJ4'],xJ4);
0076 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/J1'],J1);
0077 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/J2'],J2);
0078 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/J3'],J3);
0079 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/J4'],J4);
0080 %
0081 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/Xmhu'],Xmhu);
0082 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/XXsinksource'],XXsinksource);
0083 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/Xmask_r_edge'],Xmask_r_edge);
0084 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/XXfM'],XXfM);
0085 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/XXfinit'],XXfinit);
0086 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/XXRlambda_b_p1p1'],XXRlambda_b_p1p1);
0087 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/rdke'],rdke);
0088 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/Xpn2'],Xpn2);
0089 writeBinaryArray_mex_c([dkepath.temppath,'/DKESolver_variables/Zpn2_t'],Zpn2_t);
0090 %
0091 % for i=1:length(Zmask_g)
0092 %     Zmask_g2{i}=int32(Zmask_g{i})
0093 % end
0094 %writeBinaryArray_mex_c([dkepath.temppath,'/DKESolver_variables/Zmask_g'],Zmask_g2);
0095 %
0096 for i=1:length(Zmask_f0_t)
0097     Zmask_f0_t2{i}=int32(Zmask_f0_t{i});
0098 end
0099 writeBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/Zmask_f0_t'],Zmask_f0_t2);
0100 %
0101 %SparseMats
0102 %
0103 writeBinarySparseMat_mex_c([dkepath.temppath,'/DKESolver_variables/MMXT_f_t'],MMXT_f_t);
0104 writeBinarySparseMat_mex_c([dkepath.temppath,'/DKESolver_variables/MMXR_f_t'],MMXR_f_t);
0105 writeBinarySparseMat_mex_c([dkepath.temppath,'/DKESolver_variables/MMXP_f_t'],MMXP_f_t);
0106 writePetscBin_DKE_ft([dkepath.temppath,'/DKESolver_variables/PMMXPC_f_t'],MMXPC_f_t,0,0);
0107 writeBinarySparseMat_mex_c([dkepath.temppath,'/DKESolver_variables/MMXPC_f_t'],MMXPC_f_t); 
0108 writeBinarySparseMat_mex_c([dkepath.temppath,'/DKESolver_variables/MMXPDI_f_t'],MMXPDI_f_t);
0109 %
0110 % Initializing
0111 %
0112 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/XXI'],XXI);
0113 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/XXf0'],XXf0);
0114 writeBinaryTensor_mex_c([dkepath.temppath,'/DKESolver_variables/time_scheme'],time_scheme);
0115 %
0116 debug_petsc = 0;
0117 if debug_petsc,
0118     nit_f_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/nit_f']);nit_f,nit_f_out
0119     boundary_mode_f_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/boundary_mode_f']);boundary_mode_f,boundary_mode_f_out
0120     bounce_mode_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/bounce_mode']);bounce_mode,bounce_mode_out
0121     coll_mode_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/coll_mode']);coll_mode,coll_mode_out
0122     norm_mode_f_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/norm_mode_f']);norm_mode_f,norm_mode_f_out
0123     prec0_f_out = ReadBinaryArray_mex_c([dkepath.temppath,'/DKESolver_variables/prec0_f']);prec0_f,prec0_f_out
0124     display_mode_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/display_mode']);display_mode,display_mode_out
0125 %
0126     nmhu_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/nmhu']);nmhu,nmhu_out
0127     npn_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/npn']);npn,npn_out
0128     ns_f_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/ns_f']);ns_f,ns_f_out
0129     nr_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/nr']);nr,nr_out
0130     sm_f_out = ReadBinaryIntArray_mex_c([dkepath.temppath,'/DKESolver_variables/sm_f']);sm_f,sm_f_out    
0131 end

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.