One of Feel++ assets is it finite element embedded language. The language follows the C++ grammar, and provides keywords as well as operations between objects which are, mathematically, tensors of rank 0, 1 or 2.
In all following tables we use the notations :
with
,
,
current mesh element.
The genesis of the language can be found in [14] and an update on Feel++ is available in [13].
Current Point :
Feel++ Keyword | Math Object | Description | Dimension |
---|---|---|---|
P()
| ![]() | ![]() | ![]() |
Px()
| ![]() | ![]() ![]() | ![]() |
Py()
| ![]() | ![]() ![]() (value is 0 in 1D) | ![]() |
Pz()
| ![]() | ![]() ![]() (value is 0 in 1D and 2D) | ![]() |
Element Barycenter Point :
Feel++ Keyword | Math Object | Description | Dimension |
---|---|---|---|
C()
| ![]() | ![]() | ![]() |
Cx()
| ![]() | ![]() ![]() | ![]() |
Cy()
| ![]() | ![]() ![]() (value is 0 in 1D) | ![]() |
Cz()
| ![]() | ![]() ![]() (value is 0 in 1D and 2D) | ![]() |
Normal at Current Point :
Feel++ Keyword | Math Object | Description | Dimension |
---|---|---|---|
N()
| ![]() | ![]() | ![]() |
Nx()
| ![]() | ![]() ![]() | ![]() |
Ny()
| ![]() | ![]() ![]() (value is 0 in 1D) | ![]() |
Nz()
| ![]() | ![]() ![]() (value is 0 in 1D and 2D) | ![]() |
Usual syntax to create vectors :
Feel++ Keyword | Math Object | Description | Dimension |
---|---|---|---|
vec<n>(v_1,v_2,...,v_n)
| ![]() | Column Vector with ![]() entries being expressions | ![]() |
You can also use expressions and the unit base vectors :
Feel++ Keyword | Math Object | Description |
---|---|---|
oneX() | ![]() | Unit vector ![]() |
oneY() | ![]() | Unit vector ![]() |
oneZ() | ![]() | Unit vector ![]() |
Feel++ Keyword | Math Object | Description | Dimension |
---|---|---|---|
mat<m,n>(m_11,m_12,...,m_mn)
| ![]() | ![]() entries beeing expressions | ![]() |
ones<m,n>()
| ![]() | ![]() Filled with 1 | ![]() |
zero<m,n>()
| ![]() | ![]() Filled with 0 | ![]() |
constant<m,n>(c)
| ![]() | ![]() Filled with a constant c | ![]() |
eye<n>()
| ![]() | Unit diagonal Matrix of size ![]() | ![]() |
Id<n>()
| ![]() | Unit diagonal Matrix of size ![]() | ![]() |
Let be a square matrix of size
.
Feel++ Keyword | Math Object | Description | Dimension |
---|---|---|---|
inv(A)
| ![]() | Inverse of matrix ![]() | ![]() |
det(A)
| ![]() | Determinant of matrix ![]() | ![]() |
sym(A)
| ![]() | Symmetric part of matrix ![]() ![]() | ![]() |
antisym(A)
| ![]() | Antisymmetric part of ![]() ![]() | ![]() |
Let A and B be two matrix (or two vectors) of same dimension .
Feel++ Keyword | Math Object | Description | Dimension |
---|---|---|---|
trace(A)
| ![]() | Trace of matrix ![]() Generalized on non-squared Matrix Generalized on Vectors | ![]() |
trans(B)
| ![]() | Transpose of matrix ![]() Can be used on non-squared Matrix Can be used on Vectors | ![]() |
inner(A,B)
| ![]() | Scalar product of two vectors Generalized scalar product of two matrix | ![]() |
cross(A,B)
| ![]() | Cross product of two vectors | ![]() |
Following tables present tools to declare and manipulate expressions.
Feel++ Keyword | Description |
---|---|
Px()
Py()
Pz()
cst( c )
| Variable ![]() Variable ![]() Variable ![]() Constant function equal to ![]() |
You can of course use all current operators ( + - / * ) and the usual following functions :
Feel++ Keyword | Math Object | Description |
---|---|---|
abs(expr)
| ![]() | element wise absolute value of ![]() |
cos(expr)
| ![]() | element wise cos value of ![]() |
sin(expr)
| ![]() | element wise sin value of ![]() |
tan(expr)
| ![]() | element wise tan value of ![]() |
acos(expr)
| ![]() | element wise acos value of ![]() |
asin(expr)
| ![]() | element wise asin value of ![]() |
atan(expr)
| ![]() | element wise atan value of ![]() |
cosh(expr)
| ![]() | element wise cosh value of ![]() |
sinh(expr)
| ![]() | element wise sinh value of ![]() |
tanh(expr)
| ![]() | element wise tanh value of ![]() |
exp(expr)
| ![]() | element wise exp value of ![]() |
log(expr)
| ![]() | element wise log value of ![]() |
sqrt(expr)
| ![]() | element wise sqrt value of ![]() |
sign(expr)
| ![]() | element wise sign value of ![]() |
chi(expr)
| ![]() | element wise boolean test of ![]() |
You can use the usual operations and logical operators.
Feel++ Keyword | Math Object | Description |
---|---|---|
+
| ![]() | tensor sum |
-
| ![]() | tensor substraction |
*
| ![]() | tensor product |
/
| ![]() | tensor tensor division ( ![]() |
<
| ![]() | element wise less |
<=
| ![]() | element wise less or equal |
>
| ![]() | element wise greater |
>=
| ![]() | element wise greater or equal |
==
| ![]() | element wise equal |
!=
| ![]() | element wise not equal |
-
| ![]() | element wise unary minus |
&&
| ![]() ![]() | element wise logical and |
||
| ![]() ![]() | element wise logical or |
!
| ![]() | element wise logical not |
Feel++ finit element language use test and trial functions. Keywords are different according to the kind of the manipulated function.
Usual operators are for test functions.
t-operators for trial functions.
v-operators to get an evaluation.
Feel++ Keyword | Math Object | Description | Rank | Dimension |
---|---|---|---|---|
id(f)
| ![]() | test function | ![]() | ![]() |
idt(f)
| ![]() | trial function | ![]() | ![]() |
idv(f)
| ![]() | evaluation function | ![]() | ![]() |
grad(f)
| ![]() | gradient of test function | ![]() | ![]() ![]() |
gradt(f)
| ![]() | grdient of trial function | ![]() | ![]() ![]() |
gradv(f)
| ![]() | evaluation function gradient | ![]() | ![]() ![]() |
div(f)
| ![]() | divergence of test function | ![]() | ![]() |
divt(f)
| ![]() | divergence of trial function | ![]() | ![]() |
divv(f)
| ![]() | evaluation function divergence | ![]() | ![]() |
curl(f)
| ![]() | curl of test function | 1 | ![]() ![]() |
curlt(f)
| ![]() | curl of trial function | 1 | ![]() ![]() |
curlv(f)
| ![]() | evaluation function curl | 1 | ![]() ![]() |
hess(f)
| ![]() | hessian of test function | 2 | ![]() ![]() |
Feel++ Keyword | Math Object | Description | Rank | Dimension |
---|---|---|---|---|
jump(f)
| ![]() | jump of test function | 0 | ![]() ![]() |
jump(f)
| ![]() | jump of test function | 0 | ![]() ![]() |
jumpt(f)
| ![]() | jump of trial function | 0 | ![]() ![]() |
jumpt(f)
| ![]() | jump of trial function | 0 | ![]() ![]() |
jumpv(f)
| ![]() | jump of function evaluation | 0 | ![]() ![]() |
jumpv(f)
| ![]() | jump of function evaluation | 0 | ![]() ![]() |
average(f)
| ![]() | average of test function | ![]() | ![]() ![]() |
averaget(f)
| ![]() | average of trial function | ![]() | ![]() ![]() |
averagev(f)
| ![]() | average of function evaluation | ![]() | ![]() ![]() |
leftface(f)
| ![]() | left test function | ![]() | ![]() ![]() |
leftfacet(f)
| ![]() | left trial function | ![]() | ![]() ![]() |
leftfacev(f)
| ![]() | left function evaluation | ![]() | ![]() ![]() |
rightface(f)
| ![]() | right test function | ![]() | ![]() ![]() |
rightfacet(f)
| ![]() | right trial function | ![]() | ![]() ![]() |
rightfacev(f)
| ![]() | right function evaluation | ![]() | ![]() ![]() |
maxface(f)
| ![]() | maximum of right and left test function | ![]() | ![]() |
maxfacet(f)
| ![]() | maximum of right and left trial function | ![]() | ![]() |
maxfacev(f)
| ![]() | maximum of right and left function evaluation | ![]() | ![]() |
minface(f)
| ![]() | minimum of right and left test function | ![]() | ![]() |
minfacet(f)
| ![]() | minimum of right and left trial function | ![]() | ![]() |
minfacev(f)
| ![]() | minimum of right and left function evaluation | ![]() | ![]() |
You can access to the jacobian matrix, , of the geometric transformation, using the keyword :
There are some tools to manipulate this jacobian.
Feel++ Keyword | Math Object | Description |
---|---|---|
detJ()
| ![]() | Determinant of jacobian matrix |
invJT()
| ![]() | Transposed inverse of jacobian matrix |