FreeFEM Documentation on GitHub

stars - forks

Global variables

area

Area of the current triangle.

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

ARGV

Array that contains all the command line arguments.

1for (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.

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

CG

Conjugate gradient solver.

Usable in problem and solve definition

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

Or in matrix construction

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

Or in set function

1set(A, solver=CG);

Cholesky

Cholesky solver.

Crout

Crout solver.

edgeOrientation

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

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

false

False boolean value.

1bool b = false;

GMRES

GMRES solver (Generalized minimal residual method).

hTriangle

Size of the current triangle.

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

include

Include an external library.

1include "iovtk"

InternalEdge

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

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

label

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

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

lenEdge

Length of the current edge.

For an edge \([q_i, g_j]\), return \(|q_i-q_j|\).

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

load

Load a script.

1load "Element_P3"

LU

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.

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

nTonEdge

Number of adjacent triangles of the current edge.

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

nuEdge

Index of the current edge in the triangle.

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

nuTriangle

Index of the current triangle.

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

P

Current point.

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

pi

Pi = 3.14159.

1real 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.

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

sparsesolver

Sparse matrix solver.

true

True boolean value.

1bool b = true;

verbosity

Verbosity level.

1int Verbosity = verbosity;
2verbosity = 0;

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

This is an integer value.

version

FreeFEM version.

1cout << version << endl;

volume

Volume of the current tetrahedra.

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

x

The \(x\) coordinate at the current point.

1real CurrentX = x;

This is a real value.

y

The \(y\) coordinate at the current point.

1real CurrentY = y;

This is a real value.

z

The \(z\) coordinate at the current point.

1real CurrentZ = z;

This is a real value.

Table of content