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 BHEMeshData const& bhe_mesh_data);
60
61 void assemble(double const /*t*/, double const /*dt*/,
62 std::vector<double> const& /*local_x*/,
63 std::vector<double> const& /*local_x_prev*/,
64 std::vector<double>& /*local_M_data*/,
65 std::vector<double>& /*local_K_data*/,
66 std::vector<double>& /*local_b_data*/) override;
67
68 void assembleWithJacobian(double const t, double const dt,
69 std::vector<double> const& local_x,
70 std::vector<double> const& local_x_prev,
71 std::vector<double>& local_rhs_data,
72 std::vector<double>& local_Jac_data) override;
73
74 Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
75 const unsigned integration_point) const override
76 {
77 auto const& N = _secondary_data.N[integration_point];
78
79 // assumes N is stored contiguously in memory
80 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
81 }
82
83private:
85
86 std::vector<
88 Eigen::aligned_allocator<IntegrationPointDataBHE<ShapeMatricesType>>>
90
92
93 BHEType const& _bhe;
94
95 std::size_t const _element_id;
97
99
100 Eigen::Vector3d _element_direction;
101
102 // For multi-section support: section index for this element
104
105 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
108
109 typename ShapeMatricesType::template MatrixType<soil_temperature_size,
112
113 typename ShapeMatricesType::template MatrixType<bhe_unknowns_size,
116};
117} // namespace HeatTransportBHE
118} // namespace ProcessLib
119
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