-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgsMassAssembler.h
75 lines (56 loc) · 2.18 KB
/
gsMassAssembler.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
71
72
73
74
75
/** @file gsMassAssembler.h
@brief Provides mass matrix for elasticity systems in 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):
O. Weeger (2012 - 2015, TU Kaiserslautern),
A.Shamanskiy (2016 - ...., TU Kaiserslautern)
*/
#pragma once
#include <gsElasticity/gsBaseAssembler.h>
namespace gismo
{
/** @brief Assembles the mass matrix and right-hand side vector for linear and nonlinear elasticity
for 2D plain stress and 3D continua. The matrix has a block structure associated with
components of the displacement vector, each block corresponding to one component.
Supports mixed displacement-pressure formulation.
*/
template <class T>
class gsMassAssembler : public gsBaseAssembler<T>
{
public:
typedef gsBaseAssembler<T> Base;
gsMassAssembler(const gsMultiPatch<T> & patches,
const gsMultiBasis<T> & basis,
const gsBoundaryConditions<T> & bconditions,
const gsFunction<T> & body_force);
/// @brief Returns the list of default options for assembly
static gsOptionList defaultOptions();
/// @brief Refresh routine to set dof-mappers
virtual void refresh();
/// @brief Assembles the mass matrix
/// @{
virtual void assemble(bool saveEliminationMatrix);
virtual void assemble() { assemble(false); };
using Base::assemble;
virtual bool assemble(const gsMatrix<T> & /* solutionVector */,
const std::vector<gsMatrix<T> > & /* fixedDDoFs */)
{assemble(); return true;}
/// @}
protected:
/// Dimension of the problem
/// parametric dim = physical dim = deformation dim
short_t m_dim;
using Base::m_pde_ptr;
using Base::m_bases;
using Base::m_options;
using Base::m_system;
using Base::m_ddof;
using Base::eliminationMatrix;
};
} // namespace gismo ends
#ifndef GISMO_BUILD_LIB
#include GISMO_HPP_HEADER(gsElMassAssembler.hpp)
#endif