fastvpinns.FE.basis_function_2d

The file basis_function_2d.py contains a wrapper class for all the finite element basis functions used in the FE2D code. The 2D basis functions have methods to return the value of the basis function and its derivatives at the reference point (xi, eta).

Author: Thivin Anandh D

Changelog: 30/Aug/2023 - First version

Known issues: None

Dependencies: None specified

class fastvpinns.FE.basis_function_2d.BasisFunction2D(num_shape_functions)[source]

Bases: object

This class defines the basis functions for a 2D element.

Num_shape_functions (int):

The number of shape functions.

Value(xi, eta):

Evaluates the basis function at the given xi and eta coordinates.

abstract gradx(xi, eta)[source]

Computes the partial derivative of the basis function with respect to xi.

Parameters:
  • xi (float) – The xi coordinate.

  • eta (float) – The eta coordinate.

Returns:

The partial derivative of the basis function with respect to xi.

Return type:

float

abstract gradxx(xi, eta)[source]

Computes the second partial derivative of the basis function with respect to xi.

Parameters:
  • xi (float) – The xi coordinate.

  • eta (float) – The eta coordinate.

Returns:

The second partial derivative of the basis function with respect to xi.

Return type:

float

abstract gradxy(xi, eta)[source]

Computes the mixed partial derivative of the basis function with respect to xi and eta.

Parameters:
  • xi (float) – The xi coordinate.

  • eta (float) – The eta coordinate.

Returns:

The mixed partial derivative of the basis function with respect to xi and eta.

Return type:

float

abstract grady(xi, eta)[source]

Computes the partial derivative of the basis function with respect to eta.

Parameters:
  • xi (float) – The xi coordinate.

  • eta (float) – The eta coordinate.

Returns:

The partial derivative of the basis function with respect to eta.

Return type:

float

abstract gradyy(xi, eta)[source]

Computes the second partial derivative of the basis function with respect to eta.

Parameters:
  • xi (float) – The xi coordinate.

  • eta (float) – The eta coordinate.

Returns:

The second partial derivative of the basis function with respect to eta.

Return type:

float

abstract value(xi, eta)[source]

Evaluates the basis function at the given xi and eta coordinates.

Parameters:
  • xi (float) – The xi coordinate.

  • eta (float) – The eta coordinate.

Returns:

The value of the basis function at the given coordinates.

Return type:

float