aslLevelSet.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 ASLLEVELSET_H
#define ASLLEVELSET_H
#include "aslNumMethod.h"
#include "acl/aclMath/aclVectorOfElementsDef.h"
namespace acl{
class Kernel;
class VectorOfElementsData;
}
namespace asl
{
class VectorTemplate;
class VTObjects;
template <typename V> class DataWithGhostNodes;
typedef DataWithGhostNodes<acl::VectorOfElementsData>
DataWithGhostNodesACLData;
typedef std::shared_ptr<DataWithGhostNodesACLData>
SPDataWithGhostNodesACLData;
typedef DataWithGhostNodes<acl::VectorOfElements>
DataWithGhostNodesACL;
typedef std::shared_ptr<DataWithGhostNodesACL>
SPDataWithGhostNodesACL;
class TemplateVE;
class LevelSet: public NumMethod
{
public:
typedef SPDataWithGhostNodesACLData Data;
typedef SPDataWithGhostNodesACL DataGen;
acl::VectorOfElements isBoundaryEl(unsigned int iEl);
acl::VectorOfElements isBoundaryDir(unsigned int iDir);
acl::VectorOfElements getValueOnBoundary(acl::VectorOfElements field,
unsigned int iDir);
acl::VectorOfElements getBoundaryCenter(unsigned int iEl);
vector<acl::Element> gcBoundaryArea(unsigned int iEl,
acl::VectorOfElements & center,
acl::VectorOfElements & area);
vector<acl::Element> gcBoundaryArea(acl::VectorOfElements & center,
acl::VectorOfElements & area);
acl::VectorOfElements getBoundaryPoint(unsigned int iDir);
protected:
std::unique_ptr<acl::Kernel> kernel;
Data distanceField;
Data distanceFieldInternalData;
const VectorTemplate* vectorTemplate;
const VTObjects* vto;
unique_ptr<TemplateVE> distanceTVE;
vector<acl::VectorOfElements> lVelocities;
void initKernelPropagation();
virtual void initVelocityComputation()=0;
virtual void initDistancesComputation()=0;
public:
LevelSet();
LevelSet(Data df);
~LevelSet();
inline const VectorTemplate* getVectorTemplate() const;
virtual void init();
virtual void execute();
};
typedef std::shared_ptr<LevelSet> SPLevelSet;
// --------------------------- Implementation --------------------
inline const VectorTemplate* LevelSet::getVectorTemplate() const
{
return vectorTemplate;
}
} //asl
#endif //ASLLEVELSET_H
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:92
asl::LevelSet::execute
virtual void execute()
Executes the numerical procedure.
asl::LevelSet::getBoundaryCenter
acl::VectorOfElements getBoundaryCenter(unsigned int iEl)
generates expression for center of a boundary element
asl::LevelSet::isBoundaryEl
acl::VectorOfElements isBoundaryEl(unsigned int iEl)
generates expression resulting true if there is a boundary within the element
asl::LevelSet::~LevelSet
~LevelSet()
asl::LevelSet::distanceFieldInternalData
Data distanceFieldInternalData
Definition: aslLevelSet.h:116
asl::LevelSet::Data
SPDataWithGhostNodesACLData Data
Definition: aslLevelSet.h:60
asl::LevelSet::distanceField
Data distanceField
Definition: aslLevelSet.h:115
asl::LevelSet::kernel
std::unique_ptr< acl::Kernel > kernel
Definition: aslLevelSet.h:113
asl::LevelSet::init
virtual void init()
Builds the necesery internal data and kernels.
asl::LevelSet::gcBoundaryArea
vector< acl::Element > gcBoundaryArea(unsigned int iEl, acl::VectorOfElements &center, acl::VectorOfElements &area)
generates expression for area of a boundary element
asl::LevelSet::gcBoundaryArea
vector< acl::Element > gcBoundaryArea(acl::VectorOfElements &center, acl::VectorOfElements &area)
generates expression for area of a boundary element
asl::LevelSet::getVectorTemplate
const VectorTemplate * getVectorTemplate() const
Definition: aslLevelSet.h:146
asl::LevelSet::vto
const VTObjects * vto
Definition: aslLevelSet.h:119
asl::LevelSet::LevelSet
LevelSet(Data df)
asl::LevelSet::DataGen
SPDataWithGhostNodesACL DataGen
Definition: aslLevelSet.h:61
asl::LevelSet::getValueOnBoundary
acl::VectorOfElements getValueOnBoundary(acl::VectorOfElements field, unsigned int iDir)
generates expression resulting the value of the field
asl::LevelSet::initKernelPropagation
void initKernelPropagation()
asl::LevelSet::getVectorTemplate
const VectorTemplate * getVectorTemplate() const
asl::LevelSet::vectorTemplate
const VectorTemplate * vectorTemplate
Definition: aslLevelSet.h:118
asl::LevelSet::initVelocityComputation
virtual void initVelocityComputation()=0
asl::LevelSet::LevelSet
LevelSet()
asl::LevelSet::distanceTVE
unique_ptr< TemplateVE > distanceTVE
Definition: aslLevelSet.h:121
asl::LevelSet::lVelocities
vector< acl::VectorOfElements > lVelocities
Definition: aslLevelSet.h:122
asl::LevelSet::getBoundaryPoint
acl::VectorOfElements getBoundaryPoint(unsigned int iDir)
computes coordinates of the surface point on the iDir vector
asl::LevelSet::isBoundaryDir
acl::VectorOfElements isBoundaryDir(unsigned int iDir)
generates expression resulting true if there is a boundary in this direction
asl::LevelSet::initDistancesComputation
virtual void initDistancesComputation()=0
asl::VTObjects
Defines andditionl features related to a VectorTemplate.
Definition: aslTemplatesExtras.h:44
asl::VectorTemplate
Defines set of vectros with several properties.
Definition: aslTemplates.h:88
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::SPLevelSet
std::shared_ptr< LevelSet > SPLevelSet
Definition: aslLevelSet.h:142
asl::DataWithGhostNodesACL
DataWithGhostNodes< acl::VectorOfElements > DataWithGhostNodesACL
Definition: aslGenerators.h:48
asl::SPDataWithGhostNodesACL
std::shared_ptr< DataWithGhostNodesACL > SPDataWithGhostNodesACL
Definition: aslGenerators.h:49
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
aslNumMethod.h