/[escript]/branches/windows_from_1456_trunk_1490_merged_in/paso/src/SolverFCT_solve.c
ViewVC logotype

Diff of /branches/windows_from_1456_trunk_1490_merged_in/paso/src/SolverFCT_solve.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1497 by trankine, Mon Apr 14 06:43:51 2008 UTC revision 1498 by trankine, Mon Apr 14 09:02:47 2008 UTC
# Line 95  double Paso_FCTransportProblem_getSafeTi Line 95  double Paso_FCTransportProblem_getSafeTi
95  void Paso_SolverFCT_solve(Paso_FCTransportProblem* fctp, double* u, double dt, double* source, Paso_Options* options) {  void Paso_SolverFCT_solve(Paso_FCTransportProblem* fctp, double* u, double dt, double* source, Paso_Options* options) {
96    
97     index_t i;     index_t i;
98     int n_substeps,n, m;     long n_substeps,n, m;
99     double dt_max, omega, dt2,t;     double dt_max, omega, dt2,t;
100     double local_norm[2],norm[2],local_norm_u,local_norm_du,norm_u,norm_du, tolerance;     double local_norm_u,local_norm_du,norm_u,norm_du, tolerance;
101     register double rtmp1,rtmp2,rtmp3,rtmp4, rtmp;     register double rtmp1,rtmp2,rtmp3,rtmp4, rtmp;
102     double *b_n=NULL, *sourceP=NULL, *sourceN=NULL, *uTilde_n=NULL, *QN_n=NULL, *QP_n=NULL, *RN_m=NULL, *RP_m=NULL, *z_m=NULL, *du_m=NULL;     double *b_n=NULL, *sourceP=NULL, *sourceN=NULL, *uTilde_n=NULL, *QN_n=NULL, *QP_n=NULL, *RN_m=NULL, *RP_m=NULL, *z_m=NULL, *du_m=NULL;
103     Paso_SystemMatrix *flux_matrix=NULL;     Paso_SystemMatrix *flux_matrix=NULL;
104     dim_t n_rows=Paso_SystemMatrix_getTotalNumRows(fctp->transport_matrix);     dim_t n_rows=Paso_SystemMatrix_getTotalNumRows(fctp->transport_matrix);
105     bool_t converged;     bool_t converged;
106    #ifdef PASO_MPI
107       double local_norm[2],norm[2];
108    #endif
109    
110     if (dt<=0.) {     if (dt<=0.) {
111         Paso_setError(TYPE_ERROR,"Paso_SolverFCT_solve: dt must be positive.");         Paso_setError(TYPE_ERROR,"Paso_SolverFCT_solve: dt must be positive.");
112     }     }
# Line 146  void Paso_SolverFCT_solve(Paso_FCTranspo Line 150  void Paso_SolverFCT_solve(Paso_FCTranspo
150            
151         /* decide on substepping */         /* decide on substepping */
152         if (fctp->dt_max < LARGE_POSITIVE_FLOAT) {         if (fctp->dt_max < LARGE_POSITIVE_FLOAT) {
153            n_substeps=ceil(dt/dt_max);            n_substeps=(long)ceil(dt/dt_max);
154         } else {         } else {
155            n_substeps=1;            n_substeps=1;
156         }         }

Legend:
Removed from v.1497  
changed lines
  Added in v.1498

  ViewVC Help
Powered by ViewVC 1.1.26