-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgsBiharmonicAssembler.h
89 lines (65 loc) · 2.83 KB
/
gsBiharmonicAssembler.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
76
77
78
79
80
81
82
83
84
85
86
87
88
/** @file gsBiharmonicAssembler.h
@brief Provides stiffness matrix for bi-harmonic equation in the mixed formulation
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):
A.Shamanskiy (2016 - ...., TU Kaiserslautern)
*/
#pragma once
#include <gsElasticity/gsBaseAssembler.h>
namespace gismo
{
template <class T>
class gsBiharmonicAssembler : public gsBaseAssembler<T>
{
public:
typedef gsBaseAssembler<T> Base;
/// @brief This assebmler uses mixed finite elements
gsBiharmonicAssembler(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 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;}
/// @}
//--------------------- SOLUTION CONSTRUCTION ----------------------------------//
/// @brief construct the solution of the equation
virtual void constructSolution(const gsMatrix<T> & solVector,
const std::vector<gsMatrix<T> > & fixedDoFs,
gsMultiPatch<T> & solution) const;
/// @brief construct the Laplacian of the solution
virtual void constructSolutionAux(const gsMatrix<T> & solVector,
const std::vector<gsMatrix<T> > & fixedDoFs,
gsMultiPatch<T> & solutionAux) const;
/// @brief construct both the solution and the Laplactian
virtual void constructSolution(const gsMatrix<T> & solVector,
const std::vector<gsMatrix<T> > & fixedDoFs,
gsMultiPatch<T> & solutionMain, gsMultiPatch<T> & solutionAux) const;
using Base::constructSolution;
protected:
/// a custom reserve function to allocate memory for the sparse matrix
virtual void reserve();
protected:
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