Skip to content
Snippets Groups Projects
Commit 1f9d9eb3 authored by Tom Fischer's avatar Tom Fischer
Browse files

[PL/HT] Use object directly instead of unique_ptr.

parent a72f8b22
No related branches found
No related tags found
No related merge requests found
...@@ -139,14 +139,10 @@ std::unique_ptr<Process> createHTProcess( ...@@ -139,14 +139,10 @@ std::unique_ptr<Process> createHTProcess(
auto media_map = auto media_map =
MaterialPropertyLib::createMaterialSpatialDistributionMap(media, mesh); MaterialPropertyLib::createMaterialSpatialDistributionMap(media, mesh);
std::unique_ptr<HTMaterialProperties> material_properties = HTMaterialProperties material_properties{
std::make_unique<HTMaterialProperties>( std::move(media_map), has_fluid_thermal_expansion,
std::move(media_map), *solid_thermal_expansion, *biot_constant,
has_fluid_thermal_expansion, specific_body_force, has_gravity};
*solid_thermal_expansion,
*biot_constant,
specific_body_force,
has_gravity);
SecondaryVariableCollection secondary_variables; SecondaryVariableCollection secondary_variables;
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "ProcessLib/SurfaceFlux/SurfaceFluxData.h" #include "ProcessLib/SurfaceFlux/SurfaceFluxData.h"
#include "ProcessLib/Utils/CreateLocalAssemblers.h" #include "ProcessLib/Utils/CreateLocalAssemblers.h"
#include "HTMaterialProperties.h"
#include "MonolithicHTFEM.h" #include "MonolithicHTFEM.h"
#include "StaggeredHTFEM.h" #include "StaggeredHTFEM.h"
...@@ -32,7 +31,7 @@ HTProcess::HTProcess( ...@@ -32,7 +31,7 @@ HTProcess::HTProcess(
unsigned const integration_order, unsigned const integration_order,
std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&& std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
process_variables, process_variables,
std::unique_ptr<HTMaterialProperties>&& material_properties, HTMaterialProperties&& material_properties,
SecondaryVariableCollection&& secondary_variables, SecondaryVariableCollection&& secondary_variables,
NumLib::NamedFunctionCaller&& named_function_caller, NumLib::NamedFunctionCaller&& named_function_caller,
bool const use_monolithic_scheme, bool const use_monolithic_scheme,
...@@ -68,14 +67,14 @@ void HTProcess::initializeConcreteProcess( ...@@ -68,14 +67,14 @@ void HTProcess::initializeConcreteProcess(
mesh.getDimension(), mesh.getElements(), dof_table, mesh.getDimension(), mesh.getElements(), dof_table,
pv.getShapeFunctionOrder(), _local_assemblers, pv.getShapeFunctionOrder(), _local_assemblers,
mesh.isAxiallySymmetric(), integration_order, mesh.isAxiallySymmetric(), integration_order,
*_material_properties); _material_properties);
} }
else else
{ {
ProcessLib::createLocalAssemblers<StaggeredHTFEM>( ProcessLib::createLocalAssemblers<StaggeredHTFEM>(
mesh.getDimension(), mesh.getElements(), dof_table, mesh.getDimension(), mesh.getElements(), dof_table,
pv.getShapeFunctionOrder(), _local_assemblers, pv.getShapeFunctionOrder(), _local_assemblers,
mesh.isAxiallySymmetric(), integration_order, *_material_properties, mesh.isAxiallySymmetric(), integration_order, _material_properties,
_heat_transport_process_id, _hydraulic_process_id); _heat_transport_process_id, _hydraulic_process_id);
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <array> #include <array>
#include "HTMaterialProperties.h"
#include "ProcessLib/Process.h" #include "ProcessLib/Process.h"
namespace NumLib namespace NumLib
...@@ -25,7 +26,6 @@ struct SurfaceFluxData; ...@@ -25,7 +26,6 @@ struct SurfaceFluxData;
namespace HT namespace HT
{ {
class HTLocalAssemblerInterface; class HTLocalAssemblerInterface;
struct HTMaterialProperties;
/** /**
* # HT process * # HT process
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
unsigned const integration_order, unsigned const integration_order,
std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&& std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
process_variables, process_variables,
std::unique_ptr<HTMaterialProperties>&& material_properties, HTMaterialProperties&& material_properties,
SecondaryVariableCollection&& secondary_variables, SecondaryVariableCollection&& secondary_variables,
NumLib::NamedFunctionCaller&& named_function_caller, NumLib::NamedFunctionCaller&& named_function_caller,
bool const use_monolithic_scheme, bool const use_monolithic_scheme,
...@@ -116,7 +116,7 @@ private: ...@@ -116,7 +116,7 @@ private:
std::tuple<NumLib::LocalToGlobalIndexMap*, bool> std::tuple<NumLib::LocalToGlobalIndexMap*, bool>
getDOFTableForExtrapolatorData() const override; getDOFTableForExtrapolatorData() const override;
const std::unique_ptr<HTMaterialProperties> _material_properties; HTMaterialProperties _material_properties;
std::vector<std::unique_ptr<HTLocalAssemblerInterface>> _local_assemblers; std::vector<std::unique_ptr<HTLocalAssemblerInterface>> _local_assemblers;
......
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