7 #include <athena/athena.hpp>
8 #include <athena/mesh/mesh.hpp>
9 #include <athena/parameter_input.hpp>
24 std::string task = pin->GetString(
"inversion",
"task");
28 if (task ==
"atm_profile") {
31 std::stringstream msg;
32 msg <<
"### FATAL ERROR in InversionTasks::InversionTasks" << std::endl
33 <<
"Unrecognized inversion task";
41 task_list_[ntasks].task_id = id;
42 task_list_[ntasks].dependency = dep;
45 task_list_[ntasks].TaskFunc =
46 static_cast<enum TaskStatus (
TaskList::*)(MeshBlock *,
int)
>(
49 task_list_[ntasks].TaskFunc =
50 static_cast<enum TaskStatus (
TaskList::*)(MeshBlock *,
int)
>(
53 task_list_[ntasks].TaskFunc =
54 static_cast<enum TaskStatus (
TaskList::*)(MeshBlock *,
int)
>(
57 std::stringstream msg;
58 msg <<
"### FATAL ERROR in InversionTasks::AddTask" << std::endl
59 <<
"Invalid Task is specified" << std::endl;
70 return TaskStatus::success;
75 return TaskStatus::success;
81 return TaskStatus::success;
void StartupTaskList(MeshBlock *pmb, int stage) override
TaskStatus Optimize(MeshBlock *pmb, int step)
void AddTask(const TaskID &id, const TaskID &dep) override
InversionTasks(ParameterInput *pin, Mesh *pm)
TaskStatus CalculateGradient(MeshBlock *pmb, int step)
TaskStatus Sample(MeshBlock *pmb, int step)
const TaskID CALC_GRAD(1)