### Focus Manuals: Programing Guide: Building matrices and vectors: Available construction of Vectors

#### FORMULs of SUBROUTINE VECTOR

##### MASMAS

*FORMUL = 'MASMAS '*

(subroutines with names which start with VC00)

Integrals of the bases, or product of a mass matrix by a vector with the value of 1 everywhere.

##### MASVEC

*FORMUL = 'MASVEC '*

(subroutines with names which start with VC01)

Product of a mass matrix by a vector F.

##### SUPG

*FORMUL = 'SUPG '*

(subroutines with names which start with VC03)

- is a vector with the components

and**G**

. (this would have to be modified in dimension 3).**H** - is a vector with the components

,**U**

and**V**

.**W**

##### VGRADP and VGRADP2

*FORMUL = 'VGRADP '* or *'VGRADP2 '* (used in 3D only)

(subroutines with names which start with VC04)

- is a vector with the components

and**U**

.**V**

is the same formula, with corrections when the generalised sigma transformation is used.
**VGRADP**

##### FLUBOR

*FORMUL = 'FLUBOR '*

(subroutines with names which start with VC05)

- is a vector with the components

,**U**

and**V**

.**W** - is the normal outer vector.

##### FLUBOR2

*FORMUL = 'FLUBOR2 '*

In 3D only,

is like **FLUBOR2**

, but in the case of a generalised sigma
transformation.
**FLUBOR**

##### VGRADF

*FORMUL = 'VGRADF '*

(subroutines with names which start with VC08)

- is a vector with the components

,**U**

and**V**

.**W**

##### QGRADF

*FORMUL = 'QGRADF '*

(subroutines with names which start with VC09)

- is a vector with the components

,**U**

and**V**

.**W**

##### FLUBDF

*FORMUL = 'FLUBDF '*

(subroutines with names which start with VC10)

- is a vector with the components

,**U**

and**V**

.**W** - is the normal outer vector.

##### GGRADF

*FORMUL = 'GGRADF X'*

(subroutines with names which start with VC11)

Beware the minus sign !!!!

If

is equal to**FORMUL(16:16)**

or** 'Y' **

instead of** 'Z' **

, the derivatives will be obtained according to y or z.
** 'X' **

##### GRADF

*FORMUL = 'GRADF X'*

(subroutines with names which start with VC13)

If

is equal to**FORMUL(16:16)**

or** 'Y' **

instead of** 'Z' **

, the derivatives will be obtained according to y or z.
** 'X' **

In 3 dimensions, variants are available:

and**GRADF(X,Y) X**

will consider only the gradient of a function**GRADF(X,Y) Y**

which does not depend on `'Z`

'.

will take care of hydrostatic inconsistencies.**GRADF2**

##### PRODF

*FORMUL = 'PRODF'*

(subroutines with names which start with VC14)

This vector is used in the calculation of the turbulent production with the model k-epsilon.

##### DIVQ

*FORMUL = 'DIVQ '*

(subroutines with names which start with VC15)

- is a vector with the components

,**U**

and**V**

.**W**

##### SUPGDIVU

*FORMUL = 'SUPGDIVU '*

(subroutines with names which start with VC16)

- is a vector with the components

,**U**

and**V**

.**W** - is a vector with the components

,**F**

and**G**

.**H**

##### FLUDIF

*FORMUL = 'FLUDIF '*

(subroutines with names which start with VC17)

This is not currently used nor implemented.

##### VGRADF2

*FORMUL = 'VGRADF2 '*

(subroutines with names which start with VC18)

This is specifically for 3D computations with prisms, and unlike

, the test function is here a 2-dimensional test function (no dependency on z). This is used by Telemac-3D in subroutine **VGRADF**

.
**WSTARW**

##### HUGRADP

*FORMUL = 'HUGRADP '*

(subroutines with names which start with VC19)

This is used in 2D, mostly for computing fluxes.

in **H**

stands for the depth denoted h, which can be misleading as it does not refer to the function H which is an argument of subroutine **HUGRADP**

. A variant **VC19AA**

exists, in this case the velocity is not only of components **HUGRADP2**

, but . This is a way of treating the gradient of the free surface elevation as a piecewise constant function, which it is in reality when the depth is linear.
**(U,V)**

#### SUBROUTINE BY NAMES

The existing subroutines building vectors in version 6.+ are the following, their function can be deduced from the explanations above:

vc00aa.f vc00bb.f vc00cc.f vc00pp.f vc00pp2.f vc00ft.f vc00ff.f vc00tt.f vc01aa.f vc01bb.f vc01ff.f vc01ft.f vc01oo.f vc01pp.f vc01tt.f vc01tt0.f vc03aa.f vc03bb.f vc04aa.f vc04pp.f vc05oo.f vc05aa.f vc04tt.f vc05ff.f vc05ft.f vc08aa.f vc08bb.f vc08cc.f vc08pp.f vc08tt.f vc09aa.f vc10oo.f vc11aa.f vc11aa2.f vc11bb.f vc11pp.f vc11tt.f vc11tt0.f vc13aa.f vc13bb.f vc13cc.f vc13pp.f vc13pp2.f vc13tt.f vc14aa.f vc15aa.f vc16aa.f vc18pp.f vc19aa.f