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

[PL/LiquidFlow] Create/use LiquidFlowData.

parent c8e72b79
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@
#include <algorithm>
#include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h"
#include "MaterialLib/PhysicalConstant.h"
#include "ParameterLib/Utils.h"
#include "ProcessLib/Output/CreateSecondaryVariables.h"
......@@ -112,11 +113,17 @@ std::unique_ptr<Process> createLiquidFlowProcess(
*calculatesurfaceflux_config, meshes, output_directory);
}
auto media_map =
MaterialPropertyLib::createMaterialSpatialDistributionMap(media, mesh);
LiquidFlowData process_data{std::move(media_map)};
return std::make_unique<LiquidFlowProcess>(
std::move(name), mesh, std::move(jacobian_assembler), parameters,
integration_order, std::move(process_variables),
std::move(secondary_variables), material_ids, gravity_axis_id, g,
reference_temperature, mat_config, std::move(surfaceflux));
std::move(process_data), std::move(secondary_variables), material_ids,
gravity_axis_id, g, reference_temperature, mat_config,
std::move(surfaceflux));
}
} // namespace LiquidFlow
......
/**
* \file
* \copyright
* Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#pragma once
#include <memory>
namespace MaterialPropertyLib
{
class MaterialSpatialDistributionMap;
}
namespace ProcessLib
{
namespace LiquidFlow
{
struct LiquidFlowData final
{
std::unique_ptr<MaterialPropertyLib::MaterialSpatialDistributionMap>
media_map;
};
} // namespace LiquidFlow
} // namespace ProcessLib
......@@ -14,6 +14,7 @@
#include "LiquidFlowLocalAssembler.h"
#include "MaterialLib/MPL/MaterialSpatialDistributionMap.h"
#include "NumLib/Function/Interpolation.h"
namespace ProcessLib
......
......@@ -34,6 +34,7 @@ LiquidFlowProcess::LiquidFlowProcess(
unsigned const integration_order,
std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
process_variables,
LiquidFlowData&& process_data,
SecondaryVariableCollection&& secondary_variables,
MeshLib::PropertyVector<int> const* const material_ids,
int const gravitational_axis_id,
......@@ -49,6 +50,7 @@ LiquidFlowProcess::LiquidFlowProcess(
_reference_temperature(reference_temperature),
_material_properties(
createLiquidFlowMaterialProperties(config, parameters, material_ids)),
_process_data(std::move(process_data)),
_surfaceflux(std::move(surfaceflux))
{
DBUG("Create Liquid flow process.");
......
......@@ -16,6 +16,7 @@
#include "LiquidFlowLocalAssembler.h"
#include "LiquidFlowMaterialProperties.h"
#include "LiquidFlowData.h"
#include "MaterialLib/Fluid/FluidProperties/FluidProperties.h"
#include "NumLib/DOF/LocalToGlobalIndexMap.h"
#include "ProcessLib/Process.h"
......@@ -65,6 +66,7 @@ public:
unsigned const integration_order,
std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
process_variables,
LiquidFlowData&& process_data,
SecondaryVariableCollection&& secondary_variables,
MeshLib::PropertyVector<int> const* const material_ids,
int const gravitational_axis_id,
......@@ -116,6 +118,7 @@ private:
const double _gravitational_acceleration;
const double _reference_temperature;
const std::unique_ptr<LiquidFlowMaterialProperties> _material_properties;
LiquidFlowData _process_data;
std::vector<std::unique_ptr<LiquidFlowLocalAssemblerInterface>>
_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