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_rhs_data,
77 std::vector<double>& local_Jac_data) override;
78
79 Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
80 const unsigned integration_point) const override
81 {
82 auto const& N = _secondary_data.N[integration_point];
83
84 // assumes N is stored contiguously in memory
85 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
86 }
87
88private:
90
91 std::vector<
93 Eigen::aligned_allocator<IntegrationPointDataBHE<ShapeMatricesType>>>
95
97
98 BHEType const& _bhe;
99
100 std::size_t const _element_id;
101
103
104 Eigen::Vector3d _element_direction;
105
106 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
109
110 typename ShapeMatricesType::template MatrixType<soil_temperature_size,
113
114 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
117};
118} // namespace HeatTransportBHE
119} // namespace ProcessLib
120
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
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N