ASL  0.1.7
Advanced Simulation Library
aslTimeContinuations.h
Go to the documentation of this file.
1 /*
2  * Advanced Simulation Library <http://asl.org.il>
3  *
4  * Copyright 2015 Avtech Scientific <http://avtechscientific.com>
5  *
6  *
7  * This file is part of Advanced Simulation Library (ASL).
8  *
9  * ASL is free software: you can redistribute it and/or modify it
10  * under the terms of the GNU Affero General Public License as
11  * published by the Free Software Foundation, version 3 of the License.
12  *
13  * ASL is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Affero General Public License for more details.
17  *
18  * You should have received a copy of the GNU Affero General Public License
19  * along with ASL. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 
24 #ifndef ASLTIMECONTINUATIONS_H
25 #define ASLTIMECONTINUATIONS_H
26 
27 #include "aslNumMethod.h"
28 #include <acl/aclMath/aclVectorOfElementsDef.h>
29 
30 namespace acl
31 {
32  class Kernel;
33 }
34 
35 namespace asl
36 {
37  class VectorTemplate;
38  template <typename V> class DataWithGhostNodes;
39  typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
40  typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
41  class AbstractDataWithGhostNodes;
42  typedef std::shared_ptr<AbstractDataWithGhostNodes> SPAbstractDataWithGhostNodes;
43 
45 
50  {
51  public:
53  protected:
55  double factor;
56  unsigned int nStorages;
59  public:
60  void addData(Data inD);
62  virtual void execute()=0;
63  virtual void init()=0;
65  void reset();
66  };
67 
68 
70 
81  {
82  private:
83  acl::VectorOfElements storedData;
84  std::vector<std::shared_ptr<acl::Kernel>> kernels;
85  unsigned int order;
86  std::vector<double> coefs;
87 
88  public:
89  TimeContinPLagrange(Data inD, double f, unsigned int order);
90  TimeContinPLagrange(acl::VectorOfElementsData & inD, double f, unsigned int order);
91  virtual void execute();
92  virtual void init();
93  };
94 
95  typedef std::shared_ptr<TimeContinPLagrange> SPTimeContinPLagrange;
96 
98 
115  {
116  public:
119  private:
120  acl::VectorOfElements storedData;
121  std::vector<std::shared_ptr<acl::Kernel>> kernels;
122  unsigned int order;
123  double offset;
124  std::vector<double> coefs;
125 
126  public:
127  TimeContinPLagrangeFraction(Data inD, double f, unsigned int order);
129  double f, unsigned int order);
130  void execute();
131  virtual void init();
132  };
133 
134  typedef std::shared_ptr<TimeContinPLagrangeFraction> SPTimeContinPLagrangeFraction;
135 
136 
137 } // asl
138 #endif // ASLTIMECONTINUATIONS_H
asl::TimeContinuations::execute
virtual void execute()=0
Executes the numerical procedure.
acl::VectorOfElementsData
The class represents several ElementData.
Definition: aclVectorOfElementsDef.h:57
asl::SPTimeContinPLagrangeFraction
std::shared_ptr< TimeContinPLagrangeFraction > SPTimeContinPLagrangeFraction
Definition: aslTimeContinuations.h:134
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
asl::TimeContinuations
Numerical method that generates temporal extrapolation of the data, Abstract class.
Definition: aslTimeContinuations.h:50
asl::TimeContinPLagrangeFraction
Numerical method that generates temporal extrapolation of the data with Lagrangian polynoms of fracti...
Definition: aslTimeContinuations.h:115
asl::TimeContinuations::inData
acl::VectorOfElementsData inData
Definition: aslTimeContinuations.h:54
asl::TimeContinuations::reset
void reset()
makes reset of the contiuation (storage) cicle
asl::TimeContinPLagrangeFraction::execute
void execute()
Executes the numerical procedure.
asl::TimeContinuations::TimeContinuations
TimeContinuations(Data inD, double factor)
asl::DataWithGhostNodesACLData
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:45
aslNumMethod.h
asl::TimeContinPLagrange::TimeContinPLagrange
TimeContinPLagrange(acl::VectorOfElementsData &inD, double f, unsigned int order)
asl::TimeContinPLagrange
Numerical method that generates temporal extrapolation of the data with Lagrangian polynoms.
Definition: aslTimeContinuations.h:81
asl::TimeContinPLagrangeFraction::init
virtual void init()
Builds the necesery internal data and kernels.
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:92
asl::TimeContinPLagrangeFraction::Data
SPDataWithGhostNodesACLData Data
Definition: aslTimeContinuations.h:117
asl::SPTimeContinPLagrange
std::shared_ptr< TimeContinPLagrange > SPTimeContinPLagrange
Definition: aslTimeContinuations.h:95
asl::TimeContinPLagrange::init
virtual void init()
Builds the necesery internal data and kernels.
asl::TimeContinuations::factor
double factor
Definition: aslTimeContinuations.h:55
asl::TimeContinPLagrange::execute
virtual void execute()
Executes the numerical procedure.
asl::TimeContinuations::init
virtual void init()=0
Builds the necesery internal data and kernels.
asl::TimeContinuations::addData
void addData(acl::VectorOfElementsData &inD)
asl::NumMethod
Definition: aslNumMethod.h:35
asl::TimeContinuations::TimeContinuations
TimeContinuations(acl::VectorOfElementsData &inD, double factor)
asl::TimeContinPLagrangeFraction::TimeContinPLagrangeFraction
TimeContinPLagrangeFraction(Data inD, double f, unsigned int order)
asl::TimeContinPLagrange::TimeContinPLagrange
TimeContinPLagrange(Data inD, double f, unsigned int order)
asl::TimeContinuations::Data
SPDataWithGhostNodesACLData Data
Definition: aslTimeContinuations.h:52
asl::TimeContinuations::addData
void addData(Data inD)
asl::TimeContinuations::nStorages
unsigned int nStorages
Definition: aslTimeContinuations.h:56
asl::TimeContinPLagrangeFraction::Field
SPAbstractDataWithGhostNodes Field
Definition: aslTimeContinuations.h:118
asl
Advanced Simulation Library.
Definition: aslDataInc.h:31
acl
Advanced Computational Language.
Definition: acl.h:41
asl::TimeContinPLagrangeFraction::TimeContinPLagrangeFraction
TimeContinPLagrangeFraction(acl::VectorOfElementsData &inD, double f, unsigned int order)
asl::SPAbstractDataWithGhostNodes
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition: aslGenerators.h:50