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
13#include "SecondaryData.h"
14
15namespace ProcessLib
16{
17namespace HeatTransportBHE
18{
19template <typename ShapeFunction, typename BHEType>
22{
23 static constexpr int bhe_unknowns = BHEType::number_of_unknowns;
24 static constexpr int single_bhe_unknowns_size = ShapeFunction::NPOINTS;
25 static constexpr int soil_temperature_size = ShapeFunction::NPOINTS;
26 static constexpr int soil_temperature_index = 0;
27 static constexpr int bhe_unknowns_size =
29 static constexpr int bhe_unknowns_index = ShapeFunction::NPOINTS;
30 static constexpr int local_matrix_size =
32
33public:
35 ShapeMatrixPolicyType<ShapeFunction, 3 /* GlobalDim */>;
39 // Using dynamic size, because the number of unknowns in the BHE is runtime
40 // value.
42 typename ShapeMatricesType::template MatrixType<local_matrix_size,
45 typename ShapeMatricesType::template VectorType<local_matrix_size>;
46
48 HeatTransportBHELocalAssemblerBHE const&) = delete;
50 delete;
51
53 MeshLib::Element const& e,
54 NumLib::GenericIntegrationMethod const& integration_method,
55 BHEType const& bhe,
56 bool const is_axially_symmetric,
57 HeatTransportBHEProcessData& process_data);
58
59 void assemble(double const /*t*/, double const /*dt*/,
60 std::vector<double> const& /*local_x*/,
61 std::vector<double> const& /*local_x_prev*/,
62 std::vector<double>& /*local_M_data*/,
63 std::vector<double>& /*local_K_data*/,
64 std::vector<double>& /*local_b_data*/) override;
65
66 void assembleWithJacobian(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_rhs_data,
70 std::vector<double>& local_Jac_data) override;
71
72 Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
73 const unsigned integration_point) const override
74 {
75 auto const& N = _secondary_data.N[integration_point];
76
77 // assumes N is stored contiguously in memory
78 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
79 }
80
81private:
83
84 std::vector<
86 Eigen::aligned_allocator<IntegrationPointDataBHE<ShapeMatricesType>>>
88
90
91 BHEType const& _bhe;
92
93 std::size_t const _element_id;
94
96
97 Eigen::Vector3d _element_direction;
98
99 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
102
103 typename ShapeMatricesType::template MatrixType<soil_temperature_size,
106
107 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
110};
111} // namespace HeatTransportBHE
112} // namespace ProcessLib
113
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