ASL 0.1.7
Advanced Simulation Library
Loading...
Searching...
No Matches
aslLevelSet.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 ASLLEVELSET_H
25#define ASLLEVELSET_H
26
27#include "aslNumMethod.h"
29
30
31namespace acl{
32 class Kernel;
33 class VectorOfElementsData;
34}
35
36namespace asl
37{
38 class VectorTemplate;
39 class VTObjects;
40 template <typename V> class DataWithGhostNodes;
41 typedef DataWithGhostNodes<acl::VectorOfElementsData>
43 typedef std::shared_ptr<DataWithGhostNodesACLData>
45 typedef DataWithGhostNodes<acl::VectorOfElements>
47 typedef std::shared_ptr<DataWithGhostNodesACL>
49 class TemplateVE;
50
52
57 class LevelSet: public NumMethod
58 {
59 public:
63
67
69
73
75
80 unsigned int iDir);
81
83
89
91
95 vector<acl::Element> gcBoundaryArea(unsigned int iEl,
96 acl::VectorOfElements & center,
98
100
103 vector<acl::Element> gcBoundaryArea(acl::VectorOfElements & center,
104 acl::VectorOfElements & area);
106
111
112 protected:
113 std::unique_ptr<acl::Kernel> kernel;
114
117
120
121 unique_ptr<TemplateVE> distanceTVE;
122 vector<acl::VectorOfElements> lVelocities;
123
125 virtual void initVelocityComputation()=0;
126 virtual void initDistancesComputation()=0;
127
128 public:
135
136 inline const VectorTemplate* getVectorTemplate() const;
137
138 virtual void init();
139 virtual void execute();
140 };
141
142 typedef std::shared_ptr<LevelSet> SPLevelSet;
143
144// --------------------------- Implementation --------------------
145
147 {
148 return vectorTemplate;
149 }
150
151} //asl
152
153#endif //ASLLEVELSET_H
The class represents several Element.
Numerical method which computes evolution of an interface.
Definition aslLevelSet.h:58
virtual void execute()
Executes the numerical procedure.
acl::VectorOfElements getBoundaryCenter(unsigned int iEl)
generates expression for center of a boundary element
acl::VectorOfElements isBoundaryEl(unsigned int iEl)
generates expression resulting true if there is a boundary within the element
vector< acl::Element > gcBoundaryArea(acl::VectorOfElements &center, acl::VectorOfElements &area)
generates expression for area of a boundary element
unique_ptr< TemplateVE > distanceTVE
Data distanceFieldInternalData
SPDataWithGhostNodesACLData Data
Definition aslLevelSet.h:60
virtual void init()
Builds the necesery internal data and kernels.
const VectorTemplate * getVectorTemplate() const
LevelSet(Data df)
vector< acl::VectorOfElements > lVelocities
const VectorTemplate * vectorTemplate
SPDataWithGhostNodesACL DataGen
Definition aslLevelSet.h:61
acl::VectorOfElements getValueOnBoundary(acl::VectorOfElements field, unsigned int iDir)
generates expression resulting the value of the field
void initKernelPropagation()
std::unique_ptr< acl::Kernel > kernel
virtual void initVelocityComputation()=0
acl::VectorOfElements getBoundaryPoint(unsigned int iDir)
computes coordinates of the surface point on the iDir vector
const VTObjects * vto
acl::VectorOfElements isBoundaryDir(unsigned int iDir)
generates expression resulting true if there is a boundary in this direction
virtual void initDistancesComputation()=0
vector< acl::Element > gcBoundaryArea(unsigned int iEl, acl::VectorOfElements &center, acl::VectorOfElements &area)
generates expression for area of a boundary element
Defines andditionl features related to a VectorTemplate.
Defines set of vectros with several properties.
Advanced Computational Language.
Definition acl.h:41
Advanced Simulation Library.
Definition aslDataInc.h:31
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
std::shared_ptr< LevelSet > SPLevelSet
DataWithGhostNodes< acl::VectorOfElements > DataWithGhostNodesACL
std::shared_ptr< DataWithGhostNodesACL > SPDataWithGhostNodesACL
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData