Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion source/boundary_temperature/dynamic_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,16 @@ namespace aspect

const Postprocess::CoreStatistics<dim> &core_statistics
= this->get_postprocess_manager().template get_matching_active_plugin<const Postprocess::CoreStatistics<dim>>();
const internal::CoreData &postprocessor_core_data = core_statistics.get_core_data();
const bool restored_core_data = postprocessor_core_data.is_initialized;

// The restart data is stored in 'core statistics' postprocessor.
// If restart from checkpoint, extract data from there.
core_data = core_statistics.get_core_data();
// In a fresh run, the postprocessor has not seen valid dynamic core
// data yet, so keep the boundary model's CoreData object and
// initialize it from the parameter file below.
if (restored_core_data)
core_data = postprocessor_core_data;

// Read data of other energy source
read_data_OES();
Expand Down Expand Up @@ -130,6 +137,7 @@ namespace aspect
core_data.Xi = compute_X(core_data.Ri);

core_data.Q = 0.;
core_data.H = 0.;
core_data.dt = 0.;
core_data.dT_dt = init_dT_dt;
core_data.dR_dt = init_dR_dt;
Expand All @@ -147,6 +155,12 @@ namespace aspect
<<std::setw(15)<<core_data.dX_dt *year_in_seconds<<std::endl;
this->get_pcout() << output.str();
}
else if (restored_core_data)
{
core_data.dt = this->get_timestep();
core_data.H = compute_radioheating_rate();
update_core_data();
}
is_first_call = false;
}

Expand Down