Skip to content
Snippets Groups Projects
Commit 1acc4362 authored by wenqing's avatar wenqing
Browse files

[HT] Introduced two members of process IDs for the staggered scheme

parent 6382411a
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,10 @@ std::unique_ptr<Process> createHTProcess(
process_variables.push_back(std::move(per_process_variables));
}
}
// Process IDs, which are set according to the appearance order of the
// process variables.
const int _heat_transport_process_id = 0;
const int _hydraulic_process_id = 1;
MaterialLib::PorousMedium::PorousMediaProperties porous_media_properties{
MaterialLib::PorousMedium::createPorousMediaProperties(mesh, config,
......@@ -239,7 +243,8 @@ std::unique_ptr<Process> createHTProcess(
mesh, std::move(jacobian_assembler), parameters, integration_order,
std::move(process_variables), std::move(material_properties),
std::move(secondary_variables), std::move(named_function_caller),
use_monolithic_scheme, std::move(surfaceflux));
use_monolithic_scheme, std::move(surfaceflux),
_heat_transport_process_id, _hydraulic_process_id);
}
} // namespace HT
......
......@@ -35,13 +35,17 @@ HTProcess::HTProcess(
SecondaryVariableCollection&& secondary_variables,
NumLib::NamedFunctionCaller&& named_function_caller,
bool const use_monolithic_scheme,
std::unique_ptr<ProcessLib::SurfaceFluxData>&& surfaceflux)
std::unique_ptr<ProcessLib::SurfaceFluxData>&& surfaceflux,
const int heat_transport_process_id,
const int hydraulic_process_id)
: Process(mesh, std::move(jacobian_assembler), parameters,
integration_order, std::move(process_variables),
std::move(secondary_variables), std::move(named_function_caller),
use_monolithic_scheme),
_material_properties(std::move(material_properties)),
_surfaceflux(std::move(surfaceflux))
_surfaceflux(std::move(surfaceflux)),
_heat_transport_process_id(heat_transport_process_id),
_hydraulic_process_id(hydraulic_process_id)
{
}
......@@ -67,14 +71,11 @@ void HTProcess::initializeConcreteProcess(
}
else
{
const int heat_transport_process_id = 0;
const int hydraulic_process_id = 1;
ProcessLib::createLocalAssemblers<StaggeredHTFEM>(
mesh.getDimension(), mesh.getElements(), dof_table,
pv.getShapeFunctionOrder(), _local_assemblers,
mesh.isAxiallySymmetric(), integration_order, *_material_properties,
heat_transport_process_id, hydraulic_process_id);
_heat_transport_process_id, _hydraulic_process_id);
}
_secondary_variables.addSecondaryVariable(
......@@ -99,7 +100,7 @@ void HTProcess::assembleConcreteProcess(const double t,
}
else
{
if (_coupled_solutions->process_id == 0)
if (_coupled_solutions->process_id == _heat_transport_process_id)
{
DBUG(
"Assemble the equations of heat transport process within "
......@@ -259,7 +260,7 @@ Eigen::Vector3d HTProcess::getFlux(std::size_t element_id,
return _local_assemblers[element_id]->getFlux(p, t, local_x);
}
// this is almost a copy of the implemention in the GroundwaterFlow
// this is almost a copy of the implementation in the GroundwaterFlow
void HTProcess::postTimestepConcreteProcess(GlobalVector const& x,
const double t,
const double /*delta_t*/,
......@@ -272,7 +273,7 @@ void HTProcess::postTimestepConcreteProcess(GlobalVector const& x,
"The condition of process_id = 0 must be satisfied for "
"monolithic HTProcess, which is a single process.");
}
if (!_use_monolithic_scheme && process_id != 1)
if (!_use_monolithic_scheme && process_id != _hydraulic_process_id)
{
DBUG("This is the thermal part of the staggered HTProcess.");
return;
......
......@@ -61,8 +61,9 @@ public:
SecondaryVariableCollection&& secondary_variables,
NumLib::NamedFunctionCaller&& named_function_caller,
bool const use_monolithic_scheme,
std::unique_ptr<ProcessLib::SurfaceFluxData>&& surfaceflux);
std::unique_ptr<ProcessLib::SurfaceFluxData>&& surfaceflux,
const int heat_transport_process_id,
const int hydraulic_process_id);
//! \name ODESystem interface
//! @{
......@@ -118,6 +119,9 @@ private:
std::array<std::unique_ptr<GlobalVector>, 2> _xs_previous_timestep;
std::unique_ptr<ProcessLib::SurfaceFluxData> _surfaceflux;
const int _heat_transport_process_id;
const int _hydraulic_process_id;
};
} // namespace HT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment