Changeset 567 for issm/trunk
- Timestamp:
- 05/21/09 14:17:28 (16 years ago)
- Location:
- issm/trunk/src/c/parallel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/parallel/OutputThermal.cpp
r561 r567 12 12 #include "../objects/objects.h" 13 13 14 void OutputThermal(Vec* t_g,Vec* m_g, FemModel* femmodels,char* filename){14 void OutputThermal(Vec* t_g,Vec* m_g, double* time,FemModel* femmodels,char* filename){ 15 15 16 16 int i; … … 90 90 WriteDataToDisk(&nsteps,NULL,NULL,"Integer",fid); 91 91 92 /*Write time steps: */ 93 WriteDataToDisk(&time,&nsteps,&one,"Mat",fid); 94 92 95 /*Write solutions to disk: */ 93 96 for(i=0;i<=nsteps;i++){ -
issm/trunk/src/c/parallel/thermal.cpp
r561 r567 32 32 double* u_g=NULL; 33 33 double* p_g=NULL; 34 double* time=NULL; 34 35 double dt; 35 36 double ndt; … … 100 101 if(sub_analysis_type==SteadyAnalysisEnum()){ 101 102 103 time=(double*)xmalloc(sizeof(double)); 104 time[0]=0; 105 102 106 /*allocate t_g and m_g arrays: */ 103 107 t_g=(Vec*)xmalloc(sizeof(Vec)); … … 111 115 if(debug)_printf_("computing melting:\n"); 112 116 diagnostic_core_linear(&m_g[0],&femmodels[1],inputs,MeltingAnalysisEnum(),SteadyAnalysisEnum()); 117 PetscSynchronizedPrintf(MPI_COMM_WORLD,"melting_offset=%g\n",melting_offset); 118 PetscSynchronizedFlush(MPI_COMM_WORLD); 119 VecView(m_g[0],PETSC_VIEWER_STDOUT_WORLD); 120 113 121 } 114 122 else{ 115 123 116 124 nsteps=(int)(ndt/dt); 125 time=(double*)xmalloc((nsteps+1)*sizeof(double)); 117 126 118 127 /*allocate t_g and m_g arrays: */ … … 132 141 for(i=0;i<nsteps;i++){ 133 142 if(debug)_printf_("time step: %i/%i\n",n,nsteps); 143 time[i]=n*dt; 134 144 135 145 if(debug)_printf_("computing temperatures:\n"); … … 145 155 146 156 _printf_("write results to disk:\n"); 147 OutputThermal(t_g,m_g, &femmodels[0],outputfilename);157 OutputThermal(t_g,m_g,time,&femmodels[0],outputfilename); 148 158 149 159 _printf_("write lock file:\n");
Note:
See TracChangeset
for help on using the changeset viewer.