Commit edf7413b authored by wenqing's avatar wenqing

[ProcessLib/HT] Removed _xs_previous_timestep

parent ab834ff5
......@@ -105,7 +105,6 @@ void HTProcess::assembleConcreteProcess(const double t, double const dt,
"Assemble the equations of single phase fully saturated "
"fluid flow process within HTProcess.");
}
setCoupledSolutionsOfPreviousTimeStep();
dof_tables.emplace_back(*_local_to_global_index_map);
dof_tables.emplace_back(*_local_to_global_index_map);
}
......@@ -130,7 +129,6 @@ void HTProcess::assembleWithJacobianConcreteProcess(
dof_tables;
if (!_use_monolithic_scheme)
{
setCoupledSolutionsOfPreviousTimeStep();
dof_tables.emplace_back(std::ref(*_local_to_global_index_map));
}
else
......@@ -147,34 +145,6 @@ void HTProcess::assembleWithJacobianConcreteProcess(
dxdot_dx, dx_dx, process_id, M, K, b, Jac);
}
void HTProcess::preTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
const double /*t*/,
const double /*delta_t*/,
const int process_id)
{
assert(process_id < 2);
if (_use_monolithic_scheme)
{
return;
}
if (!_xs_previous_timestep[process_id])
{
_xs_previous_timestep[process_id] =
MathLib::MatrixVectorTraits<GlobalVector>::newInstance(
*x[process_id]);
}
else
{
auto& x0 = *_xs_previous_timestep[process_id];
MathLib::LinAlg::copy(*x[process_id], x0);
}
auto& x0 = *_xs_previous_timestep[process_id];
MathLib::LinAlg::setLocalAccessibleVector(x0);
}
void HTProcess::setCoupledTermForTheStaggeredSchemeToLocalAssemblers(
int const process_id)
{
......@@ -210,31 +180,6 @@ HTProcess::getDOFTableForExtrapolatorData() const
manage_storage);
}
void HTProcess::setCoupledSolutionsOfPreviousTimeStepPerProcess(
const int process_id)
{
const auto& x_t0 = _xs_previous_timestep[process_id];
if (x_t0 == nullptr)
{
OGS_FATAL(
"Memory is not allocated for the global vector of the solution of "
"the previous time step for the staggered scheme.\n It can be done "
"by overriding Process::preTimestepConcreteProcess (ref. "
"HTProcess::preTimestepConcreteProcess) ");
}
_coupled_solutions->coupled_xs_t0[process_id] = x_t0.get();
}
void HTProcess::setCoupledSolutionsOfPreviousTimeStep()
{
_coupled_solutions->coupled_xs_t0.resize(2);
setCoupledSolutionsOfPreviousTimeStepPerProcess(
_process_data.heat_transport_process_id);
setCoupledSolutionsOfPreviousTimeStepPerProcess(
_process_data.hydraulic_process_id);
}
Eigen::Vector3d HTProcess::getFlux(std::size_t element_id,
MathLib::Point3d const& p,
double const t,
......
......@@ -104,17 +104,6 @@ private:
const double dx_dx, int const process_id, GlobalMatrix& M,
GlobalMatrix& K, GlobalVector& b, GlobalMatrix& Jac) override;
void preTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
double const t, double const dt,
const int process_id) override;
void setCoupledSolutionsOfPreviousTimeStepPerProcess(const int process_id);
/// Set the solutions of the previous time step to the coupled term.
/// It is only for the staggered scheme, and it must be called within
/// the coupling loop because that the coupling term is only created there.
void setCoupledSolutionsOfPreviousTimeStep();
/**
* @copydoc ProcessLib::Process::getDOFTableForExtrapolatorData()
*/
......@@ -125,9 +114,6 @@ private:
std::vector<std::unique_ptr<HTLocalAssemblerInterface>> _local_assemblers;
/// Solutions of the previous time step
std::array<std::unique_ptr<GlobalVector>, 2> _xs_previous_timestep;
std::unique_ptr<ProcessLib::SurfaceFluxData> _surfaceflux;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment