Nektar++
IncBaseCondition.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: IncBaseCondition.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 Extrapolate.
32// params {
33// "X", "Y", "Z", "Theta_x", "Theta_y", "Theta_z", "X0", "Y0",
34// "Z0", "U", "V", "W", "Omega_x", "Omega_y", "Omega_z", "A_x", "A_y",
35// "A_z", "DOmega_x", "DOmega_y", "DOmega_z"};
36// (x, y, z), (x0, y0, z0), (theta, omega, domega) vector in absolute frame
37// (U, V, W), (A_x, A_y, A_z) vector in body frame
38///////////////////////////////////////////////////////////////////////////////
39
40#ifndef NEKTAR_SOLVERS_INCBASECONDITION_H
41#define NEKTAR_SOLVERS_INCBASECONDITION_H
42
49
50namespace Nektar
51{
52class IncBaseCondition;
53typedef std::shared_ptr<IncBaseCondition> IncBaseConditionSharedPtr;
54
61
63
65{
66public:
67 virtual ~IncBaseCondition();
68
69 void Update(const Array<OneD, const Array<OneD, NekDouble>> &fields,
70 const Array<OneD, const Array<OneD, NekDouble>> &Adv,
71 std::map<std::string, NekDouble> &params)
72 {
73 v_Update(fields, Adv, params);
74 };
75
77 {
78 v_Initialise(pSession);
79 }
80
81protected:
86 int spacedim, int bnddim);
87
88 virtual void v_Initialise(
90
91 virtual void v_Update(
92 const Array<OneD, const Array<OneD, NekDouble>> &fields,
93 const Array<OneD, const Array<OneD, NekDouble>> &Adv,
94 std::map<std::string, NekDouble> &params);
95
97 const int numCalls,
99
101
103 const Array<OneD, const Array<OneD, NekDouble>> &fields,
105 std::map<std::string, NekDouble> &params);
106
108 std::map<std::string, NekDouble> &params, int npts0);
109
110 // void AddDuDtPressureBCs(
111 // const Array<OneD, const Array<OneD, NekDouble>> &fields,
112 // Array<OneD, Array<OneD, NekDouble>> &N,
113 // std::map<std::string, NekDouble> &params);
114
116 std::map<std::string, NekDouble> &params, int npts0);
117 void InitialiseCoords(std::map<std::string, NekDouble> &params);
118 void SetNumPointsOnPlane0(int &npointsPlane0);
119
121 /// bounday dimensionality
124
127 std::map<int, SpatialDomains::BoundaryConditionShPtr> m_BndConds;
128 std::map<int, MultiRegions::ExpListSharedPtr> m_BndExp;
135
139 std::string classname;
140};
141
142} // namespace Nektar
143
144#endif
#define SOLVER_UTILS_EXPORT
std::map< int, MultiRegions::ExpListSharedPtr > m_BndExp
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_viscous
MultiRegions::ExpListSharedPtr m_field
static NekDouble StifflyStable_Alpha_Coeffs[3][3]
int m_bnddim
bounday dimensionality
void InitialiseCoords(std::map< std::string, NekDouble > &params)
IncBaseCondition(const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, Array< OneD, SpatialDomains::BoundaryConditionShPtr > cond, Array< OneD, MultiRegions::ExpListSharedPtr > exp, int nbnd, int spacedim, int bnddim)
virtual void v_Update(const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &Adv, std::map< std::string, NekDouble > &params)
void ExtrapolateArray(const int numCalls, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &array)
void RigidBodyVelocity(Array< OneD, Array< OneD, NekDouble > > &velocities, std::map< std::string, NekDouble > &params, int npts0)
MultiRegions::ExpListSharedPtr m_bndElmtExps
void RollOver(Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &input)
void AddRigidBodyAcc(Array< OneD, Array< OneD, NekDouble > > &N, std::map< std::string, NekDouble > &params, int npts0)
virtual void v_Initialise(const LibUtilities::SessionReaderSharedPtr &pSession)
static NekDouble StifflyStable_Betaq_Coeffs[3][3]
void Update(const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &Adv, std::map< std::string, NekDouble > &params)
static NekDouble StifflyStable_Gamma0_Coeffs[3]
void SetNumPointsOnPlane0(int &npointsPlane0)
std::map< int, SpatialDomains::BoundaryConditionShPtr > m_BndConds
void Initialise(const LibUtilities::SessionReaderSharedPtr &pSession)
void AddVisPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &N, std::map< std::string, NekDouble > &params)
Array< OneD, Array< OneD, NekDouble > > m_coords
Provides a generic Factory class.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< IncBaseCondition > IncBaseConditionSharedPtr
IncBCFactory & GetIncBCFactory()
LibUtilities::NekFactory< std::string, IncBaseCondition, const LibUtilities::SessionReaderSharedPtr, Array< OneD, MultiRegions::ExpListSharedPtr >, Array< OneD, SpatialDomains::BoundaryConditionShPtr >, Array< OneD, MultiRegions::ExpListSharedPtr >, int, int, int > IncBCFactory
double NekDouble