OGS
HeatTransportBHELocalAssemblerBHE.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <vector>
14
20#include "SecondaryData.h"
21
22namespace ProcessLib
23{
24namespace HeatTransportBHE
25{
26template <typename ShapeFunction, typename BHEType>
29{
30 static constexpr int bhe_unknowns = BHEType::number_of_unknowns;
31 static constexpr int single_bhe_unknowns_size = ShapeFunction::NPOINTS;
32 static constexpr int soil_temperature_size = ShapeFunction::NPOINTS;
33 static constexpr int soil_temperature_index = 0;
34 static constexpr int bhe_unknowns_size =
36 static constexpr int bhe_unknowns_index = ShapeFunction::NPOINTS;
37 static constexpr int local_matrix_size =
39
40public:
42 ShapeMatrixPolicyType<ShapeFunction, 3 /* GlobalDim */>;
46 // Using dynamic size, because the number of unknowns in the BHE is runtime
47 // value.
49 typename ShapeMatricesType::template MatrixType<local_matrix_size,
52 typename ShapeMatricesType::template VectorType<local_matrix_size>;
53
55 HeatTransportBHELocalAssemblerBHE const&) = delete;
57 delete;
58
60 MeshLib::Element const& e,
61 NumLib::GenericIntegrationMethod const& integration_method,
62 BHEType const& bhe,
63 bool const is_axially_symmetric,
64 HeatTransportBHEProcessData& process_data);
65
66 void assemble(double const /*t*/, double const /*dt*/,
67 std::vector<double> const& /*local_x*/,
68 std::vector<double> const& /*local_x_prev*/,
69 std::vector<double>& /*local_M_data*/,
70 std::vector<double>& /*local_K_data*/,
71 std::vector<double>& /*local_b_data*/) override;
72
73 void assembleWithJacobian(double const t, double const dt,
74 std::vector<double> const& local_x,
75 std::vector<double> const& local_x_prev,
76 std::vector<double>& /*local_M_data*/,
77 std::vector<double>& /*local_K_data*/,
78 std::vector<double>& local_rhs_data,
79 std::vector<double>& local_Jac_data) override;
80
81 Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
82 const unsigned integration_point) const override
83 {
84 auto const& N = _secondary_data.N[integration_point];
85
86 // assumes N is stored contiguously in memory
87 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
88 }
89
90private:
92
93 std::vector<
95 Eigen::aligned_allocator<IntegrationPointDataBHE<ShapeMatricesType>>>
97
99
100 BHEType const& _bhe;
101
102 std::size_t const _element_id;
103
105
106 Eigen::Vector3d _element_direction;
107
108 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
111
112 typename ShapeMatricesType::template MatrixType<soil_temperature_size,
115
116 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
119};
120} // namespace HeatTransportBHE
121} // namespace ProcessLib
122
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 > &, std::vector< double > &, 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
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N