| 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 ASLDISTANCEFUNCTIONALG_H |
| 25 |
#define ASLDISTANCEFUNCTIONALG_H |
| 26 |
|
| 27 |
#include <acl/aclMath/aclVectorOfElementsDef.h> |
| 28 |
#include <aslUtilities.h> |
| 29 |
|
| 30 |
namespace asl { |
| 31 |
|
| 32 |
// template <typename T> class AVec; |
| 33 |
// class Block; |
| 34 |
|
| 35 |
// class AbstractDataWithGhostNodes; |
| 36 |
// typedef std::shared_ptr<AbstractDataWithGhostNodes> SPAbstractDataWithGhostNodes; |
| 37 |
|
| 38 |
/// returns expression corresponding to check if the node in i^th direction is ghost one |
| 39 |
acl::VectorOfElements isGhostNode(TemplateVE & distanceTVE, unsigned int i); |
| 40 |
|
| 41 |
/// returns expression corresponding to check if the node in i^th direction is computation one |
| 42 |
acl::VectorOfElements isComputationNode(TemplateVE & distanceTVE, unsigned int i); |
| 43 |
/// returns expression corresponding to number of ghost nodes in a cell \p i |
| 44 |
acl::VectorOfElements nGhostNodesInCell(TemplateVE & distanceTVE, unsigned int i); |
| 45 |
/// returns expression corresponding to check if there is a boundary between nodes i^th and j^th within cell \p iE |
| 46 |
acl::VectorOfElements isBoundaryBetween(TemplateVE & distanceTVE, |
| 47 |
unsigned int iE, |
| 48 |
unsigned int i, |
| 49 |
unsigned int j); |
| 50 |
|
| 51 |
/// returns expression corresponding to the relative boundary position in direction \p i |
| 52 |
/** |
| 53 |
\f[ x= v_0/(v_0-v_i) \f] |
| 54 |
*/ |
| 55 |
acl::VectorOfElements exBoundaryX(TemplateVE & distanceTVE, unsigned int i); |
| 56 |
|
| 57 |
|
| 58 |
/// generates expresion for center of a boundary element |
| 59 |
/** |
| 60 |
\param iEl the element number |
| 61 |
computes avarage point of corners of the boundary poligon within the element |
| 62 |
*/ |
| 63 |
acl::VectorOfElements exBoundaryCenter(TemplateVE & distanceTVE, unsigned int iEl); |
| 64 |
|
| 65 |
/// generates expresion for area of a boundary element |
| 66 |
/** |
| 67 |
\param iEl the element number |
| 68 |
computes area of the corresponding boundary within bulk element \p iEl |
| 69 |
*/ |
| 70 |
vector<acl::Element> gcBoundaryArea(TemplateVE & distanceTVE, |
| 71 |
unsigned int iEl, |
| 72 |
acl::VectorOfElements & center, |
| 73 |
acl::VectorOfElements & area); |
| 74 |
|
| 75 |
/// generates expresion for area of a boundary element |
| 76 |
/** |
| 77 |
\param iEl the element number |
| 78 |
computes area of the corresponding boundary within cell iEl and divide on number of |
| 79 |
ghost points within the cell |
| 80 |
*/ |
| 81 |
vector<acl::Element> gcBoundaryAreaPerGhostPoint(TemplateVE & distanceTVE, |
| 82 |
unsigned int iEl, |
| 83 |
acl::VectorOfElements & center, |
| 84 |
acl::VectorOfElements & area); |
| 85 |
|
| 86 |
/// generates expresion for area of a boundary element |
| 87 |
/** |
| 88 |
computes area of the corresponding boundary within all cells |
| 89 |
*/ |
| 90 |
vector<acl::Element> gcBoundaryArea(TemplateVE & distanceTVE, |
| 91 |
acl::VectorOfElements & area); |
| 92 |
|
| 93 |
/// generates expresion for area of a boundary element |
| 94 |
/** |
| 95 |
computes area of the corresponding boundary per ghost point within all cells |
| 96 |
*/ |
| 97 |
vector<acl::Element> gcBoundaryAreaPerGhostPoint(TemplateVE & distanceTVE, |
| 98 |
acl::VectorOfElements & area); |
| 99 |
|
| 100 |
} // asl |
| 101 |
|
| 102 |
#endif // ASLDISTANCEFUNCTION |