OGS
HeatTransportBHELocalAssemblerBHE.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <vector>
7
14#include "SecondaryData.h"
15
16namespace ProcessLib
17{
18namespace HeatTransportBHE
19{
20template <typename ShapeFunction, typename BHEType>
23{
24 static constexpr int bhe_unknowns = BHEType::number_of_unknowns;
25 static constexpr int single_bhe_unknowns_size = ShapeFunction::NPOINTS;
26 static constexpr int soil_temperature_size = ShapeFunction::NPOINTS;
27 static constexpr int soil_temperature_index = 0;
28 static constexpr int bhe_unknowns_size =
30 static constexpr int bhe_unknowns_index = ShapeFunction::NPOINTS;
31 static constexpr int local_matrix_size =
33
34public:
36 ShapeMatrixPolicyType<ShapeFunction, 3 /* GlobalDim */>;
40 // Using dynamic size, because the number of unknowns in the BHE is runtime
41 // value.
43 typename ShapeMatricesType::template MatrixType<local_matrix_size,
46 typename ShapeMatricesType::template VectorType<local_matrix_size>;
47
49 HeatTransportBHELocalAssemblerBHE const&) = delete;
51 delete;
52
54 MeshLib::Element const& e,
55 NumLib::GenericIntegrationMethod const& integration_method,
56 BHEType const& bhe,
57 bool const is_axially_symmetric,
58 HeatTransportBHEProcessData& process_data);
59
60 void assemble(double const /*t*/, double const /*dt*/,
61 std::vector<double> const& /*local_x*/,
62 std::vector<double> const& /*local_x_prev*/,
63 std::vector<double>& /*local_M_data*/,
64 std::vector<double>& /*local_K_data*/,
65 std::vector<double>& /*local_b_data*/) override;
66
67 void assembleWithJacobian(double const t, double const dt,
68 std::vector<double> const& local_x,
69 std::vector<double> const& local_x_prev,
70 std::vector<double>& local_rhs_data,
71 std::vector<double>& local_Jac_data) override;
72
73 Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
74 const unsigned integration_point) const override
75 {
76 auto const& N = _secondary_data.N[integration_point];
77
78 // assumes N is stored contiguously in memory
79 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
80 }
81
82private:
84
85 std::vector<
87 Eigen::aligned_allocator<IntegrationPointDataBHE<ShapeMatricesType>>>
89
91
92 BHEType const& _bhe;
93
94 std::size_t const _element_id;
95
99
101
102 Eigen::Vector3d _element_direction;
103
104 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
107
108 typename ShapeMatricesType::template MatrixType<soil_temperature_size,
111
112 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
115};
116} // namespace HeatTransportBHE
117} // namespace ProcessLib
118
EigenFixedShapeMatrixPolicy< ShapeFunction, GlobalDim > ShapeMatrixPolicyType
ShapeMatricesType::template MatrixType< bhe_unknowns_size, bhe_unknowns_size > _R_matrix
ShapeMatricesType::template MatrixType< soil_temperature_size, soil_temperature_size > _R_s_matrix
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
HeatTransportBHELocalAssemblerBHE(HeatTransportBHELocalAssemblerBHE &&)=delete
std::vector< IntegrationPointDataBHE< ShapeMatricesType >, Eigen::aligned_allocator< IntegrationPointDataBHE< ShapeMatricesType > > > _ip_data
ShapeMatricesType::template MatrixType< bhe_unknowns_size, soil_temperature_size > _R_pi_s_matrix
void assemble(double const, double const, std::vector< double > const &, std::vector< double > const &, std::vector< double > &, std::vector< double > &, std::vector< double > &) override
void assembleWithJacobian(double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_rhs_data, std::vector< double > &local_Jac_data) override
HeatTransportBHELocalAssemblerBHE(HeatTransportBHELocalAssemblerBHE const &)=delete
typename ShapeMatricesType::template MatrixType< local_matrix_size, local_matrix_size > BheLocalMatrixType
typename ShapeMatricesType::template VectorType< local_matrix_size > BheLocalVectorType
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
VectorType< ShapeFunction::NPOINTS > NodalVectorType