Commit 1fe2209a authored by wenqing's avatar wenqing
Browse files

[ProcessLib/ComponentTransportProcess] Removed global vector member its associated funtion

parent 4364d986
......@@ -67,8 +67,6 @@ void ComponentTransportProcess::initializeConcreteProcess(
{
transport_process_variables.push_back((*pv_iter)[0]);
}
_xs_previous_timestep.resize(_process_variables.size());
}
ProcessLib::createLocalAssemblers<LocalAssemblerData>(
......@@ -101,7 +99,6 @@ void ComponentTransportProcess::assembleConcreteProcess(
}
else
{
setCoupledSolutionsOfPreviousTimeStep();
std::generate_n(
std::back_inserter(dof_tables), _process_variables.size(),
[&]() { return std::ref(*_local_to_global_index_map); });
......@@ -113,19 +110,6 @@ void ComponentTransportProcess::assembleConcreteProcess(
b);
}
void ComponentTransportProcess::setCoupledSolutionsOfPreviousTimeStep()
{
unsigned const number_of_coupled_solutions =
_coupled_solutions->coupled_xs.size();
_coupled_solutions->coupled_xs_t0.clear();
_coupled_solutions->coupled_xs_t0.reserve(number_of_coupled_solutions);
for (unsigned i = 0; i < number_of_coupled_solutions; ++i)
{
auto const& x_t0 = _xs_previous_timestep[i];
_coupled_solutions->coupled_xs_t0.emplace_back(x_t0.get());
}
}
void ComponentTransportProcess::assembleWithJacobianConcreteProcess(
const double t, double const dt, std::vector<GlobalVector*> const& x,
std::vector<GlobalVector*> const& xdot, const double dxdot_dx,
......@@ -274,31 +258,6 @@ void ComponentTransportProcess::extrapolateIntegrationPointValuesToNodes(
}
}
void ComponentTransportProcess::preTimestepConcreteProcess(
std::vector<GlobalVector*> const& x, const double /*t*/,
const double /*delta_t*/, int const process_id)
{
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 ComponentTransportProcess::postTimestepConcreteProcess(
std::vector<GlobalVector*> const& x,
const double t,
......
......@@ -125,11 +125,6 @@ public:
std::vector<GlobalVector*> const& integration_point_values_vectors,
std::vector<GlobalVector*>& nodal_values_vectors) override;
void preTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
const double /*t*/,
const double /*delta_t*/,
int const process_id) override;
void postTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
const double t,
const double delta_t,
......@@ -153,16 +148,11 @@ private:
const double dx_dx, int const process_id, GlobalMatrix& M,
GlobalMatrix& K, GlobalVector& b, GlobalMatrix& Jac) override;
void setCoupledSolutionsOfPreviousTimeStep();
ComponentTransportProcessData _process_data;
std::vector<std::unique_ptr<ComponentTransportLocalAssemblerInterface>>
_local_assemblers;
/// Solutions of the previous time step
std::vector<std::unique_ptr<GlobalVector>> _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