Nektar++
NoSchemeTimeIntegrationScheme.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: NoSchemeTimeIntegrationScheme.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: Header file of time integration scheme NoScheme class
32// This integration scheme does nothing
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#ifndef NEKTAR_LIB_UTILITIES_NOSCHEME_TIME_INTEGRATION_TIME_INTEGRATION_SCHEME
37#define NEKTAR_LIB_UTILITIES_NOSCHEME_TIME_INTEGRATION_TIME_INTEGRATION_SCHEME
38
39#define LUE LIB_UTILITIES_EXPORT
40
42
44{
45
46/**
47 * @brief Base class for No time integration schemes.
48 */
50{
51public:
52 LUE NoSchemeTimeIntegrationScheme(std::string variant, unsigned int order,
53 std::vector<NekDouble> freeParams)
54 : TimeIntegrationScheme(variant, order, freeParams)
55 {
56 }
58 {
59 }
60
62 std::string variant, unsigned int order,
63 std::vector<NekDouble> freeParams)
64 {
67 variant, order, freeParams);
68 return p;
69 }
70
71 // Access methods
72 LUE std::string v_GetName() const override;
73 // Values stored by each integration phase.
74 LUE std::string v_GetVariant() const override;
75 LUE size_t v_GetOrder() const override;
76 LUE std::vector<NekDouble> v_GetFreeParams() const override;
77
78 LUE NekDouble v_GetTimeStability() const override;
79
81
82 LUE size_t v_GetNumIntegrationPhases() const override;
83
84 // Gets the solution Vector
85 inline const TripleArray &v_GetSolutionVector() const override
86 {
88 }
89
90 // Sets the solution Vector
92 [[maybe_unused]] const size_t Offset,
93 [[maybe_unused]] const DoubleArray &y) override
94 {
95 }
96
97 // The worker methods
99 const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time,
100 const TimeIntegrationSchemeOperators &op) override;
101
102 LUE ConstDoubleArray &v_TimeIntegrate(const size_t timestep,
103 const NekDouble delta_t) override;
104
105 LUE void v_print(std::ostream &os) const override;
106 LUE void v_printFull(std::ostream &os) const override;
108
109 static std::string className;
110
111protected:
113
115
116}; // end class TimeIntegrationScheme
117
118} // namespace Nektar::LibUtilities
119
120#endif
LUE void v_print(std::ostream &os) const override
Worker method to print details on the integration scheme.
void v_SetSolutionVector(const size_t Offset, const DoubleArray &y) override
static NoTimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
LUE void v_InitializeScheme(const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override
Worker method to initialize the integration scheme.
LUE std::vector< NekDouble > v_GetFreeParams() const override
LUE NoSchemeTimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const override
LUE ConstDoubleArray & v_TimeIntegrate(const size_t timestep, const NekDouble delta_t) override
Worker method that actually does the time integration.
Base class for time integration schemes.
Binds a set of functions for use by time integration schemes.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< NoSchemeTimeIntegrationScheme > NoTimeIntegrationSchemeSharedPtr
static Array< OneD, Array< OneD, Array< OneD, NekDouble > > > NullNekDoubleTensorOfArray3D
double NekDouble