Now resets accretion buffer at every step.
This commit is contained in:
@@ -434,7 +434,6 @@ solve(Scalar dt) {
|
|||||||
out_accretion = rk3(out_accretion, accretion, accretion_profile(globalVertexIdx, lnrho, dt), dt);// unit now is rho!
|
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_lnrho = log(exp(out_lnrho) - out_accretion);
|
||||||
out_accretion = out_accretion * dsx * dsy * dsz;// unit is now mass!
|
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.
|
//TODO: implement accretion correction to contiunity equation and momentum equation.
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -256,9 +256,10 @@ run_simulation(void)
|
|||||||
printf("sink mass is: %e \n", sink_mass);
|
printf("sink mass is: %e \n", sink_mass);
|
||||||
printf("accreted mass is: %e \n", accreted_mass);
|
printf("accreted mass is: %e \n", accreted_mass);
|
||||||
acLoadDeviceConstant(AC_M_sink, sink_mass);
|
acLoadDeviceConstant(AC_M_sink, sink_mass);
|
||||||
|
vertex_buffer_set(VTXBUF_ACCRETION, 0.0, mesh);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LSINK
|
#if LFORCING
|
||||||
const ForcingParams forcing_params = generateForcingParams(mesh_info);
|
const ForcingParams forcing_params = generateForcingParams(mesh_info);
|
||||||
loadForcingParamsToDevice(forcing_params);
|
loadForcingParamsToDevice(forcing_params);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user