aslTimeContinuations.h
Go to the documentation of this file.
/*
* Advanced Simulation Library <http://asl.org.il>
*
* Copyright 2015 Avtech Scientific <http://avtechscientific.com>
*
*
* This file is part of Advanced Simulation Library (ASL).
*
* ASL is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, version 3 of the License.
*
* ASL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with ASL. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ASLTIMECONTINUATIONS_H
#define ASLTIMECONTINUATIONS_H
#include "aslNumMethod.h"
#include <acl/aclMath/aclVectorOfElementsDef.h>
namespace acl
{
class Kernel;
}
namespace asl
{
class VectorTemplate;
template <typename V> class DataWithGhostNodes;
typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
class AbstractDataWithGhostNodes;
typedef std::shared_ptr<AbstractDataWithGhostNodes> SPAbstractDataWithGhostNodes;
class TimeContinuations: public NumMethod
{
public:
typedef SPDataWithGhostNodesACLData Data;
protected:
acl::VectorOfElementsData inData;
double factor;
unsigned int nStorages;
TimeContinuations(Data inD, double factor);
TimeContinuations(acl::VectorOfElementsData & inD, double factor);
public:
void addData(Data inD);
void addData(acl::VectorOfElementsData & inD);
virtual void execute()=0;
virtual void init()=0;
void reset();
};
class TimeContinPLagrange: public TimeContinuations
{
private:
acl::VectorOfElements storedData;
std::vector<std::shared_ptr<acl::Kernel>> kernels;
unsigned int order;
std::vector<double> coefs;
public:
TimeContinPLagrange(Data inD, double f, unsigned int order);
TimeContinPLagrange(acl::VectorOfElementsData & inD, double f, unsigned int order);
virtual void execute();
virtual void init();
};
typedef std::shared_ptr<TimeContinPLagrange> SPTimeContinPLagrange;
class TimeContinPLagrangeFraction: public TimeContinuations
{
public:
typedef SPDataWithGhostNodesACLData Data;
typedef SPAbstractDataWithGhostNodes Field;
private:
acl::VectorOfElements storedData;
std::vector<std::shared_ptr<acl::Kernel>> kernels;
unsigned int order;
double offset;
std::vector<double> coefs;
public:
TimeContinPLagrangeFraction(Data inD, double f, unsigned int order);
TimeContinPLagrangeFraction(acl::VectorOfElementsData & inD,
double f, unsigned int order);
void execute();
virtual void init();
};
typedef std::shared_ptr<TimeContinPLagrangeFraction> SPTimeContinPLagrangeFraction;
} // asl
#endif // ASLTIMECONTINUATIONS_H
acl::VectorOfElementsData
The class represents several ElementData.
Definition: aclVectorOfElementsDef.h:57
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:92
asl::TimeContinPLagrangeFraction
Numerical method that generates temporal extrapolation of the data with Lagrangian polynoms of fracti...
Definition: aslTimeContinuations.h:115
asl::TimeContinPLagrangeFraction::execute
void execute()
Executes the numerical procedure.
asl::TimeContinPLagrangeFraction::TimeContinPLagrangeFraction
TimeContinPLagrangeFraction(Data inD, double f, unsigned int order)
asl::TimeContinPLagrangeFraction::TimeContinPLagrangeFraction
TimeContinPLagrangeFraction(acl::VectorOfElementsData &inD, double f, unsigned int order)
asl::TimeContinPLagrangeFraction::Field
SPAbstractDataWithGhostNodes Field
Definition: aslTimeContinuations.h:118
asl::TimeContinPLagrangeFraction::Data
SPDataWithGhostNodesACLData Data
Definition: aslTimeContinuations.h:117
asl::TimeContinPLagrangeFraction::init
virtual void init()
Builds the necesery internal data and kernels.
asl::TimeContinPLagrange
Numerical method that generates temporal extrapolation of the data with Lagrangian polynoms.
Definition: aslTimeContinuations.h:81
asl::TimeContinPLagrange::TimeContinPLagrange
TimeContinPLagrange(Data inD, double f, unsigned int order)
asl::TimeContinPLagrange::TimeContinPLagrange
TimeContinPLagrange(acl::VectorOfElementsData &inD, double f, unsigned int order)
asl::TimeContinPLagrange::init
virtual void init()
Builds the necesery internal data and kernels.
asl::TimeContinPLagrange::execute
virtual void execute()
Executes the numerical procedure.
asl::TimeContinuations
Numerical method that generates temporal extrapolation of the data, Abstract class.
Definition: aslTimeContinuations.h:50
asl::TimeContinuations::Data
SPDataWithGhostNodesACLData Data
Definition: aslTimeContinuations.h:52
asl::TimeContinuations::factor
double factor
Definition: aslTimeContinuations.h:55
asl::TimeContinuations::init
virtual void init()=0
Builds the necesery internal data and kernels.
asl::TimeContinuations::addData
void addData(Data inD)
asl::TimeContinuations::TimeContinuations
TimeContinuations(acl::VectorOfElementsData &inD, double factor)
asl::TimeContinuations::reset
void reset()
makes reset of the contiuation (storage) cicle
asl::TimeContinuations::execute
virtual void execute()=0
Executes the numerical procedure.
asl::TimeContinuations::inData
acl::VectorOfElementsData inData
Definition: aslTimeContinuations.h:54
asl::TimeContinuations::TimeContinuations
TimeContinuations(Data inD, double factor)
asl::TimeContinuations::addData
void addData(acl::VectorOfElementsData &inD)
asl::TimeContinuations::nStorages
unsigned int nStorages
Definition: aslTimeContinuations.h:56
acl
Advanced Computational Language.
Definition: acl.h:41
asl
Advanced Simulation Library.
Definition: aslDataInc.h:31
asl::DataWithGhostNodesACLData
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:45
asl::SPAbstractDataWithGhostNodes
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition: aslGenerators.h:50
asl::SPTimeContinPLagrange
std::shared_ptr< TimeContinPLagrange > SPTimeContinPLagrange
Definition: aslTimeContinuations.h:95
asl::SPTimeContinPLagrangeFraction
std::shared_ptr< TimeContinPLagrangeFraction > SPTimeContinPLagrangeFraction
Definition: aslTimeContinuations.h:134
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
aslNumMethod.h