`basis`

plot a finite element basis

# Synopsis

    basis name [element] [options]

# Description

View a finite element polynomial basis on a given reference element (see `reference_element`). Alternatively, it could show the interpolation nodes.

# Examples

      basis P5 t
      basis P5[warburton] t
      basis P5[warburton,monomial] t
      basis P3d[sides] t

      basis P3 t -node
      basis P5 t -node-side 0
      basis P5 t -node-side 1
      basis P3 T -node
      basis B7 t
      basis S7 t
      basis RT0 t
      basis RT3 t -node
      basis P3d[sides] T -node-side 1
      basis P3d        T -node-side 1

# Basis and element specifications

The basis name argument is specified as for the `space` and `basis` constructor class argument (see `space` and `basis`). The element argument is one of `e`, `t`, `q`, `T`, `P`, `H` (see `reference_element`). The `gnuplot` render is used for visualization.

# The raw basis

`-raw`
`-fem`

> A raw basis is used for computing the Vandermonde matrix and building the Lagrange basis. The raw basis is either `monomial`, `Dubiner` or `Bernstein` while `Dubiner` is the default. This raw basis is hiden by default: it is represented by using the `-raw` option while `-fem` switch back to the default finite element basis representation. When the basis family is either `M`, for `monomial` or `D` for `Dubiner`, there is no ambiguity, and the `-raw` option could be omitted. Conversely, when the basis family is `B`, for `Bernstein`, then, there is an ambiguity and this option should be used.

Here is an example of raw basis visualization:

    basis M4 t
    basis D5 e
    basis B5 e -raw

Here, the `-raw` option is used to disambiguate
between the Bernstein basis as finite element basis and the Bernstein basis as a raw basis.

# Redering options

The `basis` command supports several modes of visualization:

`-ndof`

> Print the basis size, i.e. the number of degrees of freedom (ndof).

`-poly`

> Represents the polynomial functions in elevation, for 1D and 2D elements (3D elements visualization not yet supported). All basis polynomials are showed in an animation.

`-node`

> Represents the node location, with distinct colors for each dimension associated to.

`-node-side`

> Represents the node location, restricted on a specific side.

# Others options

`-[no]verbose`

> Print messages related to graphic files created and command system calls (this is the default).

`-[no]clean`

> Clear temporary graphic files (this is the default).

`-[no]execute`

> Execute graphic command (this is the default). The `-noexecute` variant is useful in conjunction with the `-verbose` and `-noclean` options in order to modify some render options by hand.

# Limitations

Polynomial visualization in 3D are not yet supported: future development will use paraview with volume mode and animation for scanning all basis polynomials.

# Implementation

This documentation has been generated from file fem/lib/basis.cc