Commit 83ae8985 by Jonathan Lambrechts

2 less bugs

parent d8ea6124
Pipeline #9676 passed with stages
in 3 minutes and 9 seconds
 ... ... @@ -150,7 +150,7 @@ void fluid_problem_node_force_volume(FluidProblem *problem, const double *soluti f1[P][d] += pspg*f[d]; for (int e = 0; e < D; ++e) { double supg = drag_in_stab?sold[U+e]*problem->taup[iel]:0; f1[U+d][d] += supg*f[d]; f1[U+d][e] += supg*f[d]; } } fe_fields_add_to_local_vector(problem->fields, f0, f1, sf, dsf, 1, local_vector); ... ... @@ -164,7 +164,7 @@ void fluid_problem_node_force_volume(FluidProblem *problem, const double *soluti for (int e = 0; e < D; ++e) { double supg = drag_in_stab?sold[U+e]*problem->taup[iel]:0; f10[(U+d)*n_fields+U+d][e] += supg*dfdu; f11[(U+d)*n_fields+P][d][e] += supg*dfddp; f11[(U+d)*n_fields+P][e][d] += supg*dfddp; } } fe_fields_add_to_local_matrix(problem->fields, f00, f01, f10, f11, sf, dsf, 1, local_matrix); ... ... @@ -458,12 +458,13 @@ static void fluid_problem_f(const FluidProblem *problem, const double *sol, doub f11[(U+i)*n_fields+(U+j)][i][j] += lsic; } f1[P][i] = -u[i]; f10[P*n_fields+U+i][i] += -1; // PSPG double pspg = taup/rho; f1[P][i] += pspg*(f0[U+i]+(problem->drag_in_stab?0:(1-c)*dp[i])) + problem->stab_param*dp[i]; f11[P*n_fields+P][i][i] += pspg*(f01[(U+i)*n_fields+P][i]+(problem->drag_in_stab?0:1-c))+problem->stab_param; f10[P*n_fields+U][i] += pspg*f00[(U+i)*n_fields+(U+i)]; f10[P*n_fields+U+i][i] += pspg*f00[(U+i)*n_fields+(U+i)]; for (int j = 0; j < D; ++j) { f11[P*n_fields+U+i][i][j] = pspg*f01[(U+i)*n_fields+(U+i)][j]; } ... ...
 ... ... @@ -476,7 +476,6 @@ class FluidProblem : norm0 = np.linalg.norm(rhs) self.solution()[:] -= sys.solve(rhs).reshape([-1,self.n_fields()])[periodic_map] if check_residual_norm > 0 : sys.zero_matrix() rhs[:] = 0 self._lib.fluid_problem_assemble_system(self._fp,_np2c(rhs),_np2c(solution_old),c_double(dt),_np2c(localv),_np2c(localm)) sys.local_to_global(localv,localm,rhs) ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment