Now resets accretion buffer at every step.

This commit is contained in:
JackHsu
2019-08-15 17:51:39 +08:00
parent c7df5be068
commit a5bb56873a
2 changed files with 2 additions and 2 deletions

View File

@@ -434,7 +434,6 @@ solve(Scalar dt) {
out_accretion = rk3(out_accretion, accretion, accretion_profile(globalVertexIdx, lnrho, dt), dt);// unit now is rho!
out_lnrho = log(exp(out_lnrho) - out_accretion);
out_accretion = out_accretion * dsx * dsy * dsz;// unit is now mass!
//TODO: reset accretion buffer in the beginning.
//TODO: implement accretion correction to contiunity equation and momentum equation.
#endif
}

View File

@@ -256,9 +256,10 @@ run_simulation(void)
printf("sink mass is: %e \n", sink_mass);
printf("accreted mass is: %e \n", accreted_mass);
acLoadDeviceConstant(AC_M_sink, sink_mass);
vertex_buffer_set(VTXBUF_ACCRETION, 0.0, mesh);
#endif
#if LSINK
#if LFORCING
const ForcingParams forcing_params = generateForcingParams(mesh_info);
loadForcingParamsToDevice(forcing_params);
#endif