Nektar++
solvers
IncNavierStokesSolver
EquationSystems
SubSteppingExtrapolate.h
Go to the documentation of this file.
1
///////////////////////////////////////////////////////////////////////////////
2
//
3
// File: SubSteppingExtrapolate.h
4
//
5
// For more information, please see: http://www.nektar.info
6
//
7
// The MIT License
8
//
9
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10
// Department of Aeronautics, Imperial College London (UK), and Scientific
11
// Computing and Imaging Institute, University of Utah (USA).
12
//
13
// Permission is hereby granted, free of charge, to any person obtaining a
14
// copy of this software and associated documentation files (the "Software"),
15
// to deal in the Software without restriction, including without limitation
16
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17
// and/or sell copies of the Software, and to permit persons to whom the
18
// Software is furnished to do so, subject to the following conditions:
19
//
20
// The above copyright notice and this permission notice shall be included
21
// in all copies or substantial portions of the Software.
22
//
23
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29
// DEALINGS IN THE SOFTWARE.
30
//
31
// Description: Abstract base class for SubSteppingExtrapolate.
32
//
33
///////////////////////////////////////////////////////////////////////////////
34
35
#ifndef NEKTAR_SOLVERS_SUBSTEPPINGEXTRAPOLATE_H
36
#define NEKTAR_SOLVERS_SUBSTEPPINGEXTRAPOLATE_H
37
38
#include <
IncNavierStokesSolver/EquationSystems/Extrapolate.h
>
39
#include <
LibUtilities/BasicUtils/NekFactory.hpp
>
40
#include <
LibUtilities/BasicUtils/SessionReader.h
>
41
#include <
LibUtilities/BasicUtils/SharedArray.hpp
>
42
#include <
LibUtilities/Memory/NekMemoryManager.hpp
>
43
#include <
LibUtilities/TimeIntegration/TimeIntegrationTypes.hpp
>
44
#include <
MultiRegions/ExpList.h
>
45
#include <
SolverUtils/AdvectionSystem.h
>
46
47
namespace
Nektar
48
{
49
//--------
50
// Substepping
51
// --------
52
53
class
SubSteppingExtrapolate;
54
55
typedef
std::shared_ptr<SubSteppingExtrapolate>
SubSteppingExtrapolateSharedPtr
;
56
57
class
SubSteppingExtrapolate
:
public
Extrapolate
58
{
59
public
:
60
/// Creates an instance of this class
61
static
ExtrapolateSharedPtr
create
(
62
const
LibUtilities::SessionReaderSharedPtr
&pSession,
63
Array<OneD, MultiRegions::ExpListSharedPtr>
&pFields,
64
MultiRegions::ExpListSharedPtr
&pPressure,
const
Array<OneD, int>
&pVel,
65
const
SolverUtils::AdvectionSharedPtr
&advObject)
66
{
67
ExtrapolateSharedPtr
p
=
68
MemoryManager<SubSteppingExtrapolate>::AllocateSharedPtr
(
69
pSession, pFields, pPressure, pVel, advObject);
70
return
p
;
71
}
72
73
/// Name of class
74
static
std::string
className
;
75
76
SubSteppingExtrapolate
(
const
LibUtilities::SessionReaderSharedPtr
pSession,
77
Array<OneD, MultiRegions::ExpListSharedPtr>
pFields,
78
MultiRegions::ExpListSharedPtr
pPressure,
79
const
Array<OneD, int>
pVel,
80
const
SolverUtils::AdvectionSharedPtr
advObject);
81
82
~SubSteppingExtrapolate
()
override
;
83
84
protected
:
85
void
v_EvaluatePressureBCs
(
86
const
Array
<
OneD
,
const
Array<OneD, NekDouble>
> &fields,
87
const
Array
<
OneD
,
const
Array<OneD, NekDouble>
> &N,
88
NekDouble
kinvis)
override
;
89
90
void
v_SubSteppingTimeIntegration
(
91
const
LibUtilities::TimeIntegrationSchemeSharedPtr
&IntegrationScheme)
92
override
;
93
94
void
v_SubStepSaveFields
(
int
nstep)
override
;
95
96
void
v_SubStepSetPressureBCs
(
97
const
Array
<
OneD
,
const
Array<OneD, NekDouble>
> &inarray,
98
NekDouble
Aii_Dt,
NekDouble
kinvis)
override
;
99
100
void
v_AccelerationBDF
(
Array
<
OneD
,
Array<OneD, NekDouble>
> &array)
override
;
101
102
void
v_SubStepAdvance
(
int
nstep,
NekDouble
time)
override
;
103
104
void
v_MountHOPBCs
(
int
HBCdata,
NekDouble
kinvis,
Array<OneD, NekDouble>
&Q,
105
Array<OneD, const NekDouble>
&
Advection
)
override
;
106
107
std::string
v_GetSubStepName
(
void
)
override
;
108
109
void
SubStepAdvection
(
110
const
Array
<
OneD
,
const
Array<OneD, NekDouble>
> &inarray,
111
Array
<
OneD
,
Array<OneD, NekDouble>
> &outarray,
const
NekDouble
time);
112
113
void
SubStepProjection
(
114
const
Array
<
OneD
,
const
Array<OneD, NekDouble>
> &inarray,
115
Array
<
OneD
,
Array<OneD, NekDouble>
> &outarray,
const
NekDouble
time);
116
117
void
SubStepExtrapolateField
(
NekDouble
toff,
118
Array
<
OneD
,
Array<OneD, NekDouble>
> &ExtVel,
119
Array<OneD, NekDouble>
&ExtVn);
120
121
void
AddAdvectionPenaltyFlux
(
122
const
Array<OneD, NekDouble>
&Vn,
123
const
Array
<
OneD
,
const
Array<OneD, NekDouble>
> &physfield,
124
Array
<
OneD
,
Array<OneD, NekDouble>
> &outarray);
125
126
NekDouble
GetSubstepTimeStep
();
127
128
LibUtilities::TimeIntegrationSchemeSharedPtr
m_intScheme
;
129
LibUtilities::TimeIntegrationSchemeSharedPtr
m_subStepIntegrationScheme
;
130
LibUtilities::TimeIntegrationSchemeOperators
m_subStepIntegrationOps
;
131
132
Array<OneD, Array<OneD, NekDouble>
>
m_previousVelFields
;
133
Array<OneD, Array<OneD, NekDouble>
>
m_previousVnFields
;
134
135
NekDouble
m_cflSafetyFactor
;
136
int
m_infosteps
;
137
int
m_minsubsteps
;
138
int
m_maxsubsteps
;
139
};
140
}
// namespace Nektar
141
142
#endif
AdvectionSystem.h
NekFactory.hpp
SharedArray.hpp
ExpList.h
Extrapolate.h
NekMemoryManager.hpp
SessionReader.h
TimeIntegrationTypes.hpp
Nektar::Array
Definition:
BasicUtils/SharedArray.hpp:57
Nektar::Extrapolate
Definition:
Extrapolate.h:74
Nektar::LibUtilities::TimeIntegrationSchemeOperators
Binds a set of functions for use by time integration schemes.
Definition:
TimeIntegrationSchemeOperators.h:62
Nektar::MemoryManager::AllocateSharedPtr
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Definition:
NekMemoryManager.hpp:166
Nektar::SolverUtils::Advection
An abstract base class encapsulating the concept of advection of a vector field.
Definition:
Advection.h:81
Nektar::SubSteppingExtrapolate
Definition:
SubSteppingExtrapolate.h:58
Nektar::SubSteppingExtrapolate::m_minsubsteps
int m_minsubsteps
Definition:
SubSteppingExtrapolate.h:137
Nektar::SubSteppingExtrapolate::m_subStepIntegrationOps
LibUtilities::TimeIntegrationSchemeOperators m_subStepIntegrationOps
Definition:
SubSteppingExtrapolate.h:130
Nektar::SubSteppingExtrapolate::v_MountHOPBCs
void v_MountHOPBCs(int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection) override
Definition:
SubSteppingExtrapolate.cpp:635
Nektar::SubSteppingExtrapolate::~SubSteppingExtrapolate
~SubSteppingExtrapolate() override
Definition:
SubSteppingExtrapolate.cpp:73
Nektar::SubSteppingExtrapolate::m_maxsubsteps
int m_maxsubsteps
Definition:
SubSteppingExtrapolate.h:138
Nektar::SubSteppingExtrapolate::m_subStepIntegrationScheme
LibUtilities::TimeIntegrationSchemeSharedPtr m_subStepIntegrationScheme
Definition:
SubSteppingExtrapolate.h:129
Nektar::SubSteppingExtrapolate::m_infosteps
int m_infosteps
Definition:
SubSteppingExtrapolate.h:136
Nektar::SubSteppingExtrapolate::className
static std::string className
Name of class.
Definition:
SubSteppingExtrapolate.h:74
Nektar::SubSteppingExtrapolate::v_SubStepSaveFields
void v_SubStepSaveFields(int nstep) override
Definition:
SubSteppingExtrapolate.cpp:334
Nektar::SubSteppingExtrapolate::create
static ExtrapolateSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, MultiRegions::ExpListSharedPtr &pPressure, const Array< OneD, int > &pVel, const SolverUtils::AdvectionSharedPtr &advObject)
Creates an instance of this class.
Definition:
SubSteppingExtrapolate.h:61
Nektar::SubSteppingExtrapolate::SubStepAdvection
void SubStepAdvection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Definition:
SubSteppingExtrapolate.cpp:161
Nektar::SubSteppingExtrapolate::SubStepProjection
void SubStepProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Definition:
SubSteppingExtrapolate.cpp:238
Nektar::SubSteppingExtrapolate::m_intScheme
LibUtilities::TimeIntegrationSchemeSharedPtr m_intScheme
Definition:
SubSteppingExtrapolate.h:128
Nektar::SubSteppingExtrapolate::v_SubSteppingTimeIntegration
void v_SubSteppingTimeIntegration(const LibUtilities::TimeIntegrationSchemeSharedPtr &IntegrationScheme) override
Definition:
SubSteppingExtrapolate.cpp:85
Nektar::SubSteppingExtrapolate::v_SubStepAdvance
void v_SubStepAdvance(int nstep, NekDouble time) override
Definition:
SubSteppingExtrapolate.cpp:415
Nektar::SubSteppingExtrapolate::v_GetSubStepName
std::string v_GetSubStepName(void) override
Definition:
SubSteppingExtrapolate.cpp:642
Nektar::SubSteppingExtrapolate::m_previousVnFields
Array< OneD, Array< OneD, NekDouble > > m_previousVnFields
Definition:
SubSteppingExtrapolate.h:133
Nektar::SubSteppingExtrapolate::v_AccelerationBDF
void v_AccelerationBDF(Array< OneD, Array< OneD, NekDouble > > &array) override
Definition:
SubSteppingExtrapolate.cpp:295
Nektar::SubSteppingExtrapolate::v_SubStepSetPressureBCs
void v_SubStepSetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, NekDouble Aii_Dt, NekDouble kinvis) override
Definition:
SubSteppingExtrapolate.cpp:259
Nektar::SubSteppingExtrapolate::SubSteppingExtrapolate
SubSteppingExtrapolate(const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
Definition:
SubSteppingExtrapolate.cpp:50
Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux
void AddAdvectionPenaltyFlux(const Array< OneD, NekDouble > &Vn, const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &outarray)
Definition:
SubSteppingExtrapolate.cpp:522
Nektar::SubSteppingExtrapolate::SubStepExtrapolateField
void SubStepExtrapolateField(NekDouble toff, Array< OneD, Array< OneD, NekDouble > > &ExtVel, Array< OneD, NekDouble > &ExtVn)
Definition:
SubSteppingExtrapolate.cpp:582
Nektar::SubSteppingExtrapolate::m_previousVelFields
Array< OneD, Array< OneD, NekDouble > > m_previousVelFields
Definition:
SubSteppingExtrapolate.h:132
Nektar::SubSteppingExtrapolate::m_cflSafetyFactor
NekDouble m_cflSafetyFactor
Definition:
SubSteppingExtrapolate.h:135
Nektar::SubSteppingExtrapolate::v_EvaluatePressureBCs
void v_EvaluatePressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis) override
Definition:
SubSteppingExtrapolate.cpp:77
Nektar::SubSteppingExtrapolate::GetSubstepTimeStep
NekDouble GetSubstepTimeStep()
Definition:
SubSteppingExtrapolate.cpp:481
CellMLToNektar.cellml_metadata.p
p
Definition:
cellml_metadata.py:350
Nektar::LibUtilities::SessionReaderSharedPtr
std::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition:
SessionReader.h:113
Nektar::LibUtilities::TimeIntegrationSchemeSharedPtr
std::shared_ptr< TimeIntegrationScheme > TimeIntegrationSchemeSharedPtr
Definition:
TimeIntegrationTypes.hpp:65
Nektar::MultiRegions::ExpListSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
Definition:
LocTraceToTraceMap.h:56
Nektar::SolverUtils::AdvectionSharedPtr
std::shared_ptr< Advection > AdvectionSharedPtr
A shared pointer to an Advection object.
Definition:
Advection.h:54
Nektar
Definition:
CoupledSolver.h:2
Nektar::SubSteppingExtrapolateSharedPtr
std::shared_ptr< SubSteppingExtrapolate > SubSteppingExtrapolateSharedPtr
Definition:
SubSteppingExtrapolate.h:55
Nektar::ExtrapolateSharedPtr
std::shared_ptr< Extrapolate > ExtrapolateSharedPtr
Definition:
Extrapolate.h:60
Nektar::NekDouble
double NekDouble
Definition:
NektarUnivTypeDefs.hpp:43
Nektar::OneD
Definition:
NektarUnivTypeDefs.hpp:54
Generated on Wed Oct 30 2024 16:07:34 for Nektar++ by
1.9.4