You should be able to create a mesh now. If it is not the case, get back to the section Meshes .
To use tools of this sections you have to precise the domain range using the following keywords :
Feel++ Keyword | >Descriptionn |
---|---|
elements(mesh)
| All the elements of a mesh |
markedelements(mesh, id)
| The precise element defined by the id. It can be any element (line, surface, domain, and so on). |
faces(mesh)
| All the faces of the mesh. |
markedfaces(mesh)
| All the faces of the mesh which are marked. |
boundaryfaces(mesh)
| All elements that own a topological dimension one below the mesh. For example, if you mesh is a 2D one, boundaryfaces(mesh) will return all the lines (because of dimension $2-1=1$).These elements which have one dimension less, are corresponding to the boundary faces. |
internalelements(mesh)
| All the elements of the mesh which are stricly within the domain that is to say they do not share a face with the boundary. |
boundaryelements(mesh)
| All the elements of the mesh which share a face with the boundary of the mesh. |
edges(mesh)
| All the edges of the mesh. |
boundaryedges(mesh)
| All boundary edges of the mesh. |
Thank to its finite element embedded language, Feel++ has its owned integrate()
function.
Interface :
please notice that the order of the parameter is not important, these are boost
parameters, so you can enter them in the order you want.
To make it clear, there are two required parameters and 2 optional and they of course can be entered in any order provided you give the parameter name. If you don't provide the parameter name (that is to say !_range=! or the others) they must be entered in the order they are described below.
Required parameters :
_range
= domain of integration _expr
= integrand expressionOptional parameters :
_quad
= quadrature to use instead of the default one, wich means _Q<integer>()
where the integer is the polynomal order to integrate exactely _geomap
= type of geometric mapping to use, that is to say : Feel Parameter | Description |
---|---|
GEOMAP_HO
| High order approximation (same of the mesh) |
GEOMAP_OPT
| Optimal approximation : high order on boundary elements order 1 in the interior |
GEOMAP_01
| Order 1 approximation (same of the mesh) |
Examples :
From doc/manual/tutorial/dar.cpp
:
From doc/manual/tutorial/myintegrals.cpp
:
From doc/manual/advection/advection.cpp
:
From doc/manual/laplacian/laplacian.cpp
:
This part explains how to integrate on a mesh with Feel++ (source "doc/manual/tutorial/myintegrals.cpp"
).
Let's consider the domain and associated meshes.
Here, we want to integrate the following function
on the whole domain and on part of the boundary
.
There is the appropriate code :
It is also possible to make projections with the library.
Interface :
Required parameters :
_space
: the space in which lives the projected expression, it should be a nodal function space _expr
: the expression to projectOptional parameters :
_range
: the domain for the projection Default = all elements from space->mesh()
_geomap
: type of geometric mapping. Default = GEOMAP_OPT
Examples :
From doc/manual/laplacian/laplacian.cpp
:
From doc/manual/heatns/convection_run.cpp
:
Let a bounded function on domain
. You can evaluate the mean value :
Interface :
Required parameters :
_range
= domain of integration _expr
= mesurable functionOptional parameters :
_quad
= quadrature to use. Default = !_Q<integer>()! _geomap
= type of geometric mapping. Default = GEOMAP_OPT
Examples :
From doc/manual/stokes/stokes.cpp
:
From doc/manual/laplacian/periodic.cpp
:
Let you can evaluate the L2 norm :
Interface :
or squared norm :
Required parameters :
_range
= domain of integration _expr
= mesurable functionOptional parameters :
_quad
= quadrature to use. Default = _Q<integer>()
_geomap
= type of geometric mapping. Default = GEOMAP_OPT
Examples :
From doc/manual/laplacian/laplacian.cpp
:
From doc/manual/stokes/stokes.cpp
:
In the same idea, you can evaluate the H1 norm or semi norm, for any function :
Interface :
or semi norm :
Required parameters :
_range
= domain of integration _expr
= mesurable function _grad_expr
= gradient of function (Row vector !)Optional parameters :
_quad
= quadrature to use. Default = _Q<integer>()
_geomap
= type of geometric mapping. Default = GEOMAP_OPT
Examples :
With expression :
With test or trial function !u! :
Let a bounded function on domain
. You can evaluate the infinity norm :
Interface :
:
Required parameters :
_range
= domain of integration _expr
= mesurable function _pset
= set of points (e.g. quadrature points)Optional parameters :
_geomap
= type of geometric mapping. Default = GEOMAP_OPT
Examples :