aslBasicBC.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 ASLBASICBC_H
#define ASLBASICBC_H
#include "aslBCond.h"
#include <data/aslDataWithGhostNodes.h>
#include <acl/aclMath/aclVectorOfElementsDef.h>
namespace acl{
class Kernel;
typedef std::shared_ptr<Kernel> SPKernel;
}
namespace asl
{
template <typename T> class UValue;
class PositionFunction;
typedef std::shared_ptr<PositionFunction> SPPositionFunction;
class BCConstantValue:public BCond
{
public:
typedef SPAbstractDataWithGhostNodes Data;
acl::SPKernel kernel;
protected:
Data data;
acl::VectorOfElements value;
public:
BCConstantValue(Data d, const acl::VectorOfElements & v);
virtual void execute();
virtual void init();
void setValue(const acl::VectorOfElements & v);
};
class BCConstantValueMap:public BCondWithMap
{
public:
typedef SPAbstractDataWithGhostNodes Data;
acl::SPKernel kernel;
protected:
Data data;
acl::VectorOfElements value;
public:
BCConstantValueMap(Data d,
const acl::VectorOfElements & v,
Data map);
~BCConstantValueMap();
virtual void execute();
virtual void init();
void setValue(const acl::VectorOfElements & v);
};
class BCConstantValueMiddlePointMap:public BCondWithMap
{
public:
typedef SPAbstractDataWithGhostNodes Data;
acl::SPKernel kernel;
protected:
Data data;
acl::VectorOfElements value;
public:
BCConstantValueMiddlePointMap(Data d,
const acl::VectorOfElements & v,
Data map,
const VectorTemplate *const t);
~BCConstantValueMiddlePointMap();
virtual void execute();
virtual void init();
void setValue(const acl::VectorOfElements & v);
};
class BCValuePFMap:public BCondWithMap
{
public:
typedef SPAbstractDataWithGhostNodes Data;
acl::SPKernel kernel;
protected:
Data data;
SPPositionFunction value;
public:
BCValuePFMap(Data d,
SPPositionFunction val,
Data map);
~BCValuePFMap();
virtual void execute();
virtual void init();
void setValue(SPPositionFunction v);
};
SPBCond generateBCConstantValue(SPAbstractDataWithGhostNodes d,
double v,
const std::vector<SlicesNames> & sl);
SPBCond generateBCConstantValue(SPAbstractDataWithGhostNodes d,
UValue<double> & v,
const std::vector<SlicesNames> & sl);
SPBCond generateBCConstantValue(SPAbstractDataWithGhostNodes d,
UValue<AVec<float>> & v,
const std::vector<SlicesNames> & sl);
SPBCond generateBCConstantValue(SPAbstractDataWithGhostNodes d,
AVec<> v,
const std::vector<SlicesNames> & sl);
SPNumMethod generateBCConstantValue(SPAbstractDataWithGhostNodes d,
double v,
SPAbstractDataWithGhostNodes map);
SPNumMethod generateBCConstantValue(SPAbstractDataWithGhostNodes d,
AVec<> v,
SPAbstractDataWithGhostNodes map);
SPNumMethod generateBCConstantValue(SPAbstractDataWithGhostNodes d,
SPPositionFunction v,
SPAbstractDataWithGhostNodes map);
SPNumMethod generateBCConstantValueMiddlePoint(SPAbstractDataWithGhostNodes d,
double v,
SPAbstractDataWithGhostNodes map,
const VectorTemplate *const t);
SPNumMethod generateBCConstantValueMiddlePoint(SPAbstractDataWithGhostNodes d,
AVec<> v,
SPAbstractDataWithGhostNodes map,
const VectorTemplate *const t);
class BCConstantGradient:public BCond
{
public:
typedef SPAbstractDataWithGhostNodes Data;
acl::SPKernel kernel;
protected:
Data data;
acl::VectorOfElements value;
public:
BCConstantGradient(Data d,
const acl::VectorOfElements & v,
const VectorTemplate *const t);
virtual void execute();
virtual void init();
void setValue(const acl::VectorOfElements & value);
};
class BCConstantGradientMap:public BCondWithMap
{
public:
typedef SPAbstractDataWithGhostNodes Data;
acl::SPKernel kernel;
protected:
Data data;
acl::VectorOfElements value;
public:
BCConstantGradientMap(Data d,
const acl::VectorOfElements & v,
Data map,
const VectorTemplate *const t);
BCConstantGradientMap(Data d,
const acl::VectorOfElements & v,
Data map,
Data computationalDomain,
const VectorTemplate *const t);
~BCConstantGradientMap();
virtual void execute();
virtual void init();
void setValue(const acl::VectorOfElements & v);
};
SPBCond generateBCConstantGradient(SPAbstractDataWithGhostNodes d,
double v,
const VectorTemplate *const t,
const std::vector<SlicesNames> & sl);
SPNumMethod generateBCConstantGradient(SPAbstractDataWithGhostNodes d,
double v,
SPAbstractDataWithGhostNodes map,
const VectorTemplate *const t);
SPNumMethod generateBCConstantGradient(SPAbstractDataWithGhostNodes d,
double v,
SPAbstractDataWithGhostNodes map,
SPAbstractDataWithGhostNodes computatinalDomain,
const VectorTemplate *const t);
SPNumMethod generateBCConstantGradient(SPAbstractDataWithGhostNodes d,
AVec<> v,
SPAbstractDataWithGhostNodes map,
const VectorTemplate *const t);
SPNumMethod generateBCConstantGradient2(SPAbstractDataWithGhostNodes d,
double v,
SPAbstractDataWithGhostNodes map,
const VectorTemplate *const t);
SPNumMethod generateBCConstantGradient2(SPAbstractDataWithGhostNodes d,
double v,
SPAbstractDataWithGhostNodes map,
SPAbstractDataWithGhostNodes computatinalDomain,
const VectorTemplate *const t);
SPNumMethod generateBCConstantGradient2(SPAbstractDataWithGhostNodes d,
AVec<> v,
SPAbstractDataWithGhostNodes map,
const VectorTemplate *const t);
class BCConstantSource:public BCond
{
public:
typedef SPDataWithGhostNodesACLData Data;
acl::SPKernel kernel;
protected:
Data data;
cl_double value;
public:
BCConstantSource(Data d, cl_double v);
virtual void execute();
virtual void init();
void setValue(cl_double value);
};
class BCDirectCopier:public BCondConnector
{
public:
typedef SPDataWithGhostNodesACLData Data;
acl::SPKernel kernel;
protected:
Data & source;
Data & destination;
public:
BCDirectCopier(Data dSource,Data dDestination);
virtual void execute();
virtual void init();
};
class BCSConstantValue:public BCondSlice
{
public:
typedef SPDataWithGhostNodesACLData Data;
protected:
acl::SPKernel kernel;
Data data;
cl_double value;
public:
BCSConstantValue(Data d, cl_double v);
virtual void execute();
virtual void init();
};
} //asl
#endif //ASLBASICBC_H
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:92
asl::AVec
Definition: aslVectorsDynamicLength.h:40
asl::BCConstantGradient
Bondary condition that makes fixed gradient <>
Definition: aslBasicBC.h:192
asl::BCConstantGradient::data
Data data
Definition: aslBasicBC.h:197
asl::BCConstantGradient::value
acl::VectorOfElements value
Definition: aslBasicBC.h:198
asl::BCConstantGradient::init
virtual void init()
Builds the necesery internal data and kernels.
asl::BCConstantGradient::setValue
void setValue(const acl::VectorOfElements &value)
asl::BCConstantGradient::BCConstantGradient
BCConstantGradient(Data d, const acl::VectorOfElements &v, const VectorTemplate *const t)
asl::BCConstantGradient::Data
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:194
asl::BCConstantGradient::execute
virtual void execute()
Executes the numerical procedure.
asl::BCConstantGradient::kernel
acl::SPKernel kernel
Definition: aslBasicBC.h:195
asl::BCConstantGradientMap
Bondary condition that makes fixed gradient <>
Definition: aslBasicBC.h:210
asl::BCConstantGradientMap::kernel
acl::SPKernel kernel
Definition: aslBasicBC.h:213
asl::BCConstantGradientMap::BCConstantGradientMap
BCConstantGradientMap(Data d, const acl::VectorOfElements &v, Data map, const VectorTemplate *const t)
asl::BCConstantGradientMap::BCConstantGradientMap
BCConstantGradientMap(Data d, const acl::VectorOfElements &v, Data map, Data computationalDomain, const VectorTemplate *const t)
asl::BCConstantGradientMap::init
virtual void init()
Builds the necesery internal data and kernels.
asl::BCConstantGradientMap::Data
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:212
asl::BCConstantGradientMap::execute
virtual void execute()
Executes the numerical procedure.
asl::BCConstantGradientMap::~BCConstantGradientMap
~BCConstantGradientMap()
asl::BCConstantGradientMap::value
acl::VectorOfElements value
Definition: aslBasicBC.h:216
asl::BCConstantGradientMap::setValue
void setValue(const acl::VectorOfElements &v)
asl::BCConstantGradientMap::data
Data data
Definition: aslBasicBC.h:215
asl::BCConstantSource
Bondary condition that adds fixed value to one in each point.
Definition: aslBasicBC.h:280
asl::BCConstantSource::execute
virtual void execute()
Executes the numerical procedure.
asl::BCConstantSource::data
Data data
Definition: aslBasicBC.h:285
asl::BCConstantSource::setValue
void setValue(cl_double value)
asl::BCConstantSource::value
cl_double value
Definition: aslBasicBC.h:286
asl::BCConstantSource::BCConstantSource
BCConstantSource(Data d, cl_double v)
asl::BCConstantSource::kernel
acl::SPKernel kernel
Definition: aslBasicBC.h:283
asl::BCConstantSource::Data
SPDataWithGhostNodesACLData Data
Definition: aslBasicBC.h:282
asl::BCConstantSource::init
virtual void init()
Builds the necesery internal data and kernels.
asl::BCConstantValue::init
virtual void init()
Builds the necesery internal data and kernels.
asl::BCConstantValue::Data
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:53
asl::BCConstantValue::BCConstantValue
BCConstantValue(Data d, const acl::VectorOfElements &v)
asl::BCConstantValue::data
Data data
Definition: aslBasicBC.h:56
asl::BCConstantValue::value
acl::VectorOfElements value
Definition: aslBasicBC.h:57
asl::BCConstantValue::kernel
acl::SPKernel kernel
Definition: aslBasicBC.h:54
asl::BCConstantValue::execute
virtual void execute()
Executes the numerical procedure.
asl::BCConstantValue::setValue
void setValue(const acl::VectorOfElements &v)
asl::BCConstantValueMap
Bondary condition that puts fixed value in each point.
Definition: aslBasicBC.h:70
asl::BCConstantValueMap::BCConstantValueMap
BCConstantValueMap(Data d, const acl::VectorOfElements &v, Data map)
asl::BCConstantValueMap::setValue
void setValue(const acl::VectorOfElements &v)
asl::BCConstantValueMap::execute
virtual void execute()
Executes the numerical procedure.
asl::BCConstantValueMap::Data
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:72
asl::BCConstantValueMap::kernel
acl::SPKernel kernel
Definition: aslBasicBC.h:73
asl::BCConstantValueMap::data
Data data
Definition: aslBasicBC.h:75
asl::BCConstantValueMap::init
virtual void init()
Builds the necesery internal data and kernels.
asl::BCConstantValueMap::~BCConstantValueMap
~BCConstantValueMap()
asl::BCConstantValueMap::value
acl::VectorOfElements value
Definition: aslBasicBC.h:76
asl::BCConstantValueMiddlePointMap
Bondary condition that puts fixed value in each boundary point.
Definition: aslBasicBC.h:92
asl::BCConstantValueMiddlePointMap::~BCConstantValueMiddlePointMap
~BCConstantValueMiddlePointMap()
asl::BCConstantValueMiddlePointMap::value
acl::VectorOfElements value
Definition: aslBasicBC.h:98
asl::BCConstantValueMiddlePointMap::BCConstantValueMiddlePointMap
BCConstantValueMiddlePointMap(Data d, const acl::VectorOfElements &v, Data map, const VectorTemplate *const t)
asl::BCConstantValueMiddlePointMap::init
virtual void init()
Builds the necesery internal data and kernels.
asl::BCConstantValueMiddlePointMap::setValue
void setValue(const acl::VectorOfElements &v)
asl::BCConstantValueMiddlePointMap::execute
virtual void execute()
Executes the numerical procedure.
asl::BCConstantValueMiddlePointMap::data
Data data
Definition: aslBasicBC.h:97
asl::BCConstantValueMiddlePointMap::kernel
acl::SPKernel kernel
Definition: aslBasicBC.h:95
asl::BCConstantValueMiddlePointMap::Data
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:94
asl::BCDirectCopier
Bondary condition that copies directly the values from one data to another.
Definition: aslBasicBC.h:300
asl::BCDirectCopier::destination
Data & destination
Definition: aslBasicBC.h:306
asl::BCDirectCopier::kernel
acl::SPKernel kernel
Definition: aslBasicBC.h:303
asl::BCDirectCopier::source
Data & source
Definition: aslBasicBC.h:305
asl::BCDirectCopier::Data
SPDataWithGhostNodesACLData Data
Definition: aslBasicBC.h:302
asl::BCDirectCopier::init
virtual void init()
Builds the necesery internal data and kernels.
asl::BCDirectCopier::execute
virtual void execute()
Executes the numerical procedure.
asl::BCDirectCopier::BCDirectCopier
BCDirectCopier(Data dSource, Data dDestination)
asl::BCSConstantValue
Bondary condition that puts fixed value in each point uses Slices.
Definition: aslBasicBC.h:318
asl::BCSConstantValue::Data
SPDataWithGhostNodesACLData Data
Definition: aslBasicBC.h:320
asl::BCSConstantValue::value
cl_double value
Definition: aslBasicBC.h:324
asl::BCSConstantValue::kernel
acl::SPKernel kernel
Definition: aslBasicBC.h:322
asl::BCSConstantValue::execute
virtual void execute()
Executes the numerical procedure.
asl::BCSConstantValue::data
Data data
Definition: aslBasicBC.h:323
asl::BCSConstantValue::BCSConstantValue
BCSConstantValue(Data d, cl_double v)
asl::BCSConstantValue::init
virtual void init()
Builds the necesery internal data and kernels.
asl::BCValuePFMap
Bondary condition that puts fixed value in each point.
Definition: aslBasicBC.h:115
asl::BCValuePFMap::setValue
void setValue(SPPositionFunction v)
asl::BCValuePFMap::Data
SPAbstractDataWithGhostNodes Data
Definition: aslBasicBC.h:117
asl::BCValuePFMap::execute
virtual void execute()
Executes the numerical procedure.
asl::BCValuePFMap::init
virtual void init()
Builds the necesery internal data and kernels.
asl::BCValuePFMap::kernel
acl::SPKernel kernel
Definition: aslBasicBC.h:118
asl::BCValuePFMap::~BCValuePFMap
~BCValuePFMap()
asl::BCValuePFMap::value
SPPositionFunction value
Definition: aslBasicBC.h:121
asl::BCValuePFMap::data
Data data
Definition: aslBasicBC.h:120
asl::BCValuePFMap::BCValuePFMap
BCValuePFMap(Data d, SPPositionFunction val, Data map)
asl::BCondConnector
Virtual class describes general interface for boundary conditions which connect two datas.
Definition: aslBCond.h:190
asl::BCond
Virtual class describes general interface for boundary conditions.
Definition: aslBCond.h:59
asl::BCondSlice
Virtual class describes general interface for boundary conditions.
Definition: aslBCond.h:228
asl::BCondWithMap
Virtual class describes general interface for boundary conditions.
Definition: aslBCond.h:101
asl::BCondWithMap::map
SPAbstractDataWithGhostNodes map
boundary description for the particular BC
Definition: aslBCond.h:111
asl::BCondWithMap::computationalDomain
SPAbstractDataWithGhostNodes computationalDomain
Computational domain which contains all boundaries and the particular boundary as well.
Definition: aslBCond.h:114
asl::UValue< double >
asl::VectorTemplate
Defines set of vectros with several properties.
Definition: aslTemplates.h:88
asl::generateBCConstantValueMiddlePoint
SPNumMethod generateBCConstantValueMiddlePoint(SPAbstractDataWithGhostNodes d, double v, SPAbstractDataWithGhostNodes map, const VectorTemplate *const t)
Bondary condition that puts fixed value in each point <>
asl::generateBCConstantGradient2
SPNumMethod generateBCConstantGradient2(SPAbstractDataWithGhostNodes d, double v, SPAbstractDataWithGhostNodes map, const VectorTemplate *const t)
Bondary condition that makes fixed gradient, second order accuracy <>
asl::generateBCConstantGradient
SPBCond generateBCConstantGradient(SPAbstractDataWithGhostNodes d, double v, const VectorTemplate *const t, const std::vector< SlicesNames > &sl)
Bondary condition that makes fixed gradient <>
asl::generateBCConstantValue
SPBCond generateBCConstantValue(SPAbstractDataWithGhostNodes d, double v, const std::vector< SlicesNames > &sl)
Bondary condition that puts fixed value in each point.
asl::SPPositionFunction
std::shared_ptr< PositionFunction > SPPositionFunction
Definition: aslPositionFunction.h:58
acl
Advanced Computational Language.
Definition: acl.h:41
acl::map
std::shared_ptr< T > map(ElementData m)
Definition: aclMemBlock.h:68
acl::SPKernel
std::shared_ptr< Kernel > SPKernel
Definition: aclKernelMerger.h:34
asl
Advanced Simulation Library.
Definition: aslDataInc.h:31
asl::SPAbstractDataWithGhostNodes
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition: aslGenerators.h:50
asl::SPNumMethod
std::shared_ptr< NumMethod > SPNumMethod
Definition: aslNumMethod.h:44
asl::SPBCond
std::shared_ptr< BCond > SPBCond
Definition: aslBCond.h:88
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
aslBCond.h