FreeFEM Documentation on GitHub

stars - forks

# Global variables

## area

Area of the current triangle.

1 fespace Vh0(Th, P0);
2 Vh0 A = area;


## ARGV

Array that contains all the command line arguments.

1 for (int i = 0; i < ARGV.n; i++)
2     cout << ARGV[i] << endl;


See Command line arguments example for a complete example.

## BoundaryEdge

Return 1 if the current edge is on a boundary, 0 otherwise.

1 real B = int2d(Th)(BoundaryEdge);


## CG

Usable in problem and solve definition

1 problem Laplacian (U, V, solver=CG) = ...


Or in matrix construction

1 matrix A = vLaplacian(Uh, Uh, solver=CG);


Or in set function

1 set(A, solver=CG);


Cholesky solver.

Crout solver.

## edgeOrientation

Sign of $$i-j$$ if the current edge is $$[q_i, q_j]$$.

1 real S = int1d(Th, 1)(edgeOrientation);


## false

False boolean value.

1 bool b = false;


## GMRES

GMRES solver (Generalized minimal residual method).

## hTriangle

Size of the current triangle.

1 fespace Vh(Th, P0);
2 Vh h = hTriangle;


## include

Include an external library.

1 include "iovtk"


## InternalEdge

Return 0 if the current edge is on a boundary, 1 otherwise.

1 real I = int2d(Th)(InternalEdge);


## label

Label number of a boundary if the current point is on a boundary, 0 otherwise.

1 int L = Th(xB, yB).label;


## lenEdge

Length of the current edge.

For an edge $$[q_i, g_j]$$, return $$|q_i-q_j|$$.

1 real L = int1d(Th, 1)(lenEdge);


1 load "Element_P3"


LU solver.

## N

Outward unit normal at the current point if it is on a curve defined by a border. N.x, N.y, N.z are respectively the $$x$$, $$y$$ and $$z$$ components of the normal.

1 func Nx = N.x;
2 func Ny = N.y;
3 func Nz = N.z;


## nTonEdge

Number of adjacent triangles of the current edge.

1 real nTE = int2d(Th)(nTonEdge);


## nuEdge

Index of the current edge in the triangle.

1 real nE = int2d(Th)(nuEdge);


## nuTriangle

Index of the current triangle.

1 fespace Vh(Th, P0);
2 Vh n = nuTriangle;


## P

Current point.

1 real cx = P.x;
2 real cy = P.y;
3 real cz = P.z;


## pi

Pi = 3.14159.

1 real Pi = pi;


This is a real value.

## region

Region number of the current point. If the point is outside, then region == notaregion where notaregion is a FreeFEM integer constant.

1 int R = Th(xR, yR).region;


## sparsesolver

Sparse matrix solver.

## true

True boolean value.

1 bool b = true;


## verbosity

Verbosity level.

1 int Verbosity = verbosity;
2 verbosity = 0;


0 = nothing, 1 = little information, 10 = a lot of information, …

This is an integer value.

## version

FreeFEM version.

1 cout << version << endl;


## volume

Volume of the current tetrahedra.

1 fespace Vh0(Th, P0);
2 Vh0 V = volume;


## x

The $$x$$ coordinate at the current point.

1 real CurrentX = x;


This is a real value.

## y

The $$y$$ coordinate at the current point.

1 real CurrentY = y;


This is a real value.

## z

The $$z$$ coordinate at the current point.

1 real CurrentZ = z;


This is a real value.