Merge branch 'master' into sink_20190723
Conflicts: acc/mhd_solver/stencil_defines.h src/standalone/simulation.cc
This commit is contained in:
@@ -27,13 +27,13 @@
|
||||
#include "run.h"
|
||||
|
||||
#include "config_loader.h"
|
||||
#include "src/core/errchk.h"
|
||||
#include "src/core/math_utils.h"
|
||||
#include "model/host_forcing.h"
|
||||
#include "model/host_memory.h"
|
||||
#include "model/host_timestep.h"
|
||||
#include "model/model_reduce.h"
|
||||
#include "model/model_rk3.h"
|
||||
#include "src/core/errchk.h"
|
||||
#include "src/core/math_utils.h"
|
||||
#include "timer_hires.h"
|
||||
|
||||
#include <string.h>
|
||||
@@ -216,6 +216,7 @@ run_simulation(void)
|
||||
write_mesh_info(&mesh_info);
|
||||
print_diagnostics(0, AcReal(.0), t_step, diag_file);
|
||||
|
||||
acBoundcondStep();
|
||||
acStore(mesh);
|
||||
save_mesh(*mesh, 0, t_step);
|
||||
|
||||
@@ -229,13 +230,13 @@ run_simulation(void)
|
||||
/* initialize random seed: */
|
||||
srand(312256655);
|
||||
|
||||
//TODO_SINK. init_sink_particle()
|
||||
// TODO_SINK. init_sink_particle()
|
||||
// Initialize the basic variables of the sink particle to a suitable initial value.
|
||||
// 1. Location of the particle
|
||||
// 2. Mass of the particle
|
||||
// (3. Velocity of the particle)
|
||||
// This at the level of Host in this case.
|
||||
// acUpdate_sink_particle() will do the similar trick to the device.
|
||||
// This at the level of Host in this case.
|
||||
// acUpdate_sink_particle() will do the similar trick to the device.
|
||||
|
||||
/* Step the simulation */
|
||||
for (int i = 1; i < max_steps; ++i) {
|
||||
@@ -247,28 +248,28 @@ run_simulation(void)
|
||||
loadForcingParamsToDevice(forcing_params);
|
||||
#endif
|
||||
|
||||
|
||||
//TODO_SINK acUpdate_sink_particle()
|
||||
// Update properties of the sing particle for acIntegrate(). Essentially:
|
||||
// 1. Location of the particle
|
||||
// 2. Mass of the particle
|
||||
// (3. Velocity of the particle)
|
||||
// 3. Velocity of the particle)
|
||||
// These can be used for calculating he gravitational field.
|
||||
// This is my first comment! by Jack
|
||||
// This is my second comment! by Jack
|
||||
|
||||
acIntegrate(dt);
|
||||
//TODO_SINK acAdvect_sink_particle()
|
||||
// THIS IS OPTIONAL. We will start from unmoving particle.
|
||||
// 1. Calculate the equation of motion for the sink particle.
|
||||
// NOTE: Might require embedding with acIntegrate(dt).
|
||||
// TODO_SINK acAdvect_sink_particle()
|
||||
// THIS IS OPTIONAL. We will start from unmoving particle.
|
||||
// 1. Calculate the equation of motion for the sink particle.
|
||||
// NOTE: Might require embedding with acIntegrate(dt).
|
||||
|
||||
//TODO_SINK acAccrete_sink_particle()
|
||||
// Calculate accretion of the sink particle from the surrounding medium
|
||||
// 1. Transfer density into sink particle mass
|
||||
// 2. Transfer momentum into sink particle
|
||||
// (OPTIONAL: Affection the motion of the particle)
|
||||
// NOTE: Might require embedding with acIntegrate(dt).
|
||||
// This is the hardest part. Please see Lee et al. ApJ 783 (2014) for reference.
|
||||
// TODO_SINK acAccrete_sink_particle()
|
||||
// Calculate accretion of the sink particle from the surrounding medium
|
||||
// 1. Transfer density into sink particle mass
|
||||
// 2. Transfer momentum into sink particle
|
||||
// (OPTIONAL: Affection the motion of the particle)
|
||||
// NOTE: Might require embedding with acIntegrate(dt).
|
||||
// This is the hardest part. Please see Lee et al. ApJ 783 (2014) for reference.
|
||||
|
||||
t_step += dt;
|
||||
|
||||
@@ -311,9 +312,10 @@ run_simulation(void)
|
||||
assumed to be asynchronous, so the meshes must be also synchronized
|
||||
before transferring the data to the CPU. Like so:
|
||||
|
||||
acSynchronize();
|
||||
acBoundcondStep();
|
||||
acStore(mesh);
|
||||
*/
|
||||
acBoundcondStep();
|
||||
acStore(mesh);
|
||||
|
||||
save_mesh(*mesh, i, t_step);
|
||||
|
Reference in New Issue
Block a user