-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgsPartitionedFSI.h
97 lines (77 loc) · 2.91 KB
/
gsPartitionedFSI.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
/** @file gsPartitionedFSI.h
@brief 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>
namespace gismo
{
template <class T>
class gsNsTimeIntegrator;
template <class T>
class gsElTimeIntegrator;
template <class T>
class gsALE;
template <class T>
class gsMultiPatch;
template <class T>
class gsPartitionedFSI
{
public:
gsPartitionedFSI(gsNsTimeIntegrator<T> & nsSolver,
gsMultiPatch<T> & velocity, gsMultiPatch<T> & pressure,
gsElTimeIntegrator<T> & elSolver,
gsMultiPatch<T> & displacement,
gsALE<T> & aleSolver,
gsMultiPatch<T> & aleDisplacement, gsMultiPatch<T> & aleVelocity);
/// default option list. used for initialization
static gsOptionList defaultOptions();
/// get options list to read or set parameters
gsOptionList & options() { return m_options; }
/// make the next time step
bool makeTimeStep(T timeStep);
/// form a residual vector
void formVector(const gsMultiPatch<T> & disp, gsMatrix<T> & vector);
/// perform Aitken relaxation step
void aitken(gsMultiPatch<T> & dispA, gsMultiPatch<T> & dispB,
gsMultiPatch<T> & dispB2, gsMultiPatch<T> & dispC);
/// number of iterations the solver took to converge at the last time step
index_t numberIterations() { return numIter; }
/// amount of time consumed by each component at the last time step
T timeNS() { return nsTime; }
T timeEL() { return elTime; }
T timeALE() { return aleTime; }
/// aitken relaxation parameter used to at the last time step
T aitkenOmega() { return omega;}
/// FSI interface residual norm
T residualNormAbs() { return absResNorm;}
/// FSI interface relative residual norm
T residualNormRel() { return absResNorm/initResNorm; }
protected:
/// component solvers
gsNsTimeIntegrator<T> & m_nsSolver;
gsMultiPatch<T> & m_velocity;
gsMultiPatch<T> & m_pressure;
gsElTimeIntegrator<T> & m_elSolver;
gsMultiPatch<T> & m_displacement;
gsALE<T> & m_aleSolver;
gsMultiPatch<T> & m_ALEdisplacment;
gsMultiPatch<T> & m_ALEvelocity;
/// option list
gsOptionList m_options;
/// status variables
index_t numIter; // number of iterations at the last time step
bool converged; // convergence flag
T nsTime, elTime, aleTime; // component computational times
T omega; // aitken relaxation parameter
T absResNorm, initResNorm; // residual norms for convergence cretirion
};
} // namespace ends
#ifndef GISMO_BUILD_LIB
#include GISMO_HPP_HEADER(gsPartitionedFSI.hpp)
#endif