-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgsALE.h
101 lines (76 loc) · 2.64 KB
/
gsALE.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
89
90
91
92
93
94
95
96
97
98
99
100
101
/** @file gsALE.h
@brief Implementation of mesh deformation method for partitioned FSI solver.
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 <gsIO/gsOptionList.h>
#include <gsElasticity/gsBaseUtils.h>
#include <gsCore/gsMultiPatch.h>
#include <gsElasticity/gsIterative.h>
#include <gsElasticity/gsBaseAssembler.h>
namespace gismo
{
template <class T>
class gsBaseAssembler;
template <class T>
class gsIterative;
template <class T>
class gsALE
{
public:
gsALE(gsMultiPatch<T> & geometry, const gsMultiPatch<T> & displacement,
const gsBoundaryInterface & interfaceStr2Mesh, ale_method::method method);
/// default option list. used for initialization
static gsOptionList defaultOptions();
/// get options list to read or set parameters
gsOptionList & options() { return m_options; }
/// number of degrees of freedom
index_t numDofs() const {return assembler->numDofs();}
/// construct ALE displacement field
void constructSolution(gsMultiPatch<T> & solution) const;
/// update mesh to comply with the current displacement field
index_t updateMesh();
/// save module state
void saveState();
/// recover module state from saved state
void recoverState();
/// get FSI interface container to access patch sides
const gsBoundaryInterface & interface() { return m_interface;}
protected:
void initialize();
/// update mesh using HE, LE or BHE methods
index_t linearMethod();
/// update mesh using IHE, ILE or IBHE methods
index_t linearIncrementalMethod();
/// update mesh using TINE or TINE_StVK methods
index_t nonlinearMethod();
protected:
/// outer displacement field that drives the mesh deformation
const gsMultiPatch<T> & disp;
/// mapping between patch sides of the fluid and solid
const gsBoundaryInterface & m_interface;
/// mesh deformation method
ale_method::method methodALE;
/// option list
gsOptionList m_options;
/// assembler
typename gsBaseAssembler<T>::uPtr assembler;
/// nonlinear solver
typename gsIterative<T>::uPtr solverNL;
/// current ALE displacement field
gsMultiPatch<T> ALEdisp;
/// initialization flag
bool initialized;
/// saved state
bool hasSavedState;
gsMultiPatch<T> ALEdispSaved;
};
} // namespace ends
#ifndef GISMO_BUILD_LIB
#include GISMO_HPP_HEADER(gsALE.hpp)
#endif