-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgsThermoAssembler.h
70 lines (53 loc) · 2.25 KB
/
gsThermoAssembler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/** @file gsThermoAssembler.h
@brief Provides a thermal expansion solver for 2D plain strain and 3D continua.
This file is part of the G+Smo library.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Author(s):
D. Fusseder (2012 - 2015, TU Kaiserslautern),
A.Shamanskiy (2016 - ...., TU Kaiserslautern)
*/
#pragma once
#include <gsElasticity/gsElasticityAssembler.h>
namespace gismo
{
/** @brief Assembles stiffness and mass matrices and right-hand side vector for linear and nonlinear elasticity
for 2D plain stress and 3D continua. Matrices and vector have a block structure associated with
components of the displacement vector, each block corresponding to one component.
*/
template <class T>
class gsThermoAssembler : public gsElasticityAssembler<T>
{
public:
typedef gsElasticityAssembler<T> Base;
/// @brief Constructor of the assembler object.
gsThermoAssembler(const gsMultiPatch<T> & patches,
const gsMultiBasis<T> & bases,
const gsBoundaryConditions<T> & b_conditions,
const gsFunction<T> & body_force,
const gsFunctionSet<T> & temperature_field);
/// @brief Assembles the stiffness matrix and the RHS
/// @{
using Base::assemble;
virtual void assemble(bool /* saveEliminationMatrix */);
virtual void assemble() { assemble(false); };
/// @}
/// @brief Assembles the thermal expanstion contribution to the RHS
void assembleThermo();
protected:
/// @brief Marks all non-Dirichlet sides for assembly of the boundary thermal stresses
void findNonDirichletSides();
protected:
const gsFunctionSet<T> & m_temperatureField;
bool assembledElasticity;
std::vector<std::pair<index_t,boxSide> > nonDirichletSides;
/// elasticity contribution to the rhs; stored separately to efficiently reassemble the thermal contribution
gsMatrix<T> elastRhs;
using Base::m_pde_ptr;
using Base::m_options;
}; // class definition ends
} // namespace ends
#ifndef GISMO_BUILD_LIB
#include GISMO_HPP_HEADER(gsThermoAssembler.hpp)
#endif