pyrrha.impl package

Submodules

pyrrha.impl.finite_element_2d_impl module

Public module.

class pyrrha.impl.finite_element_2d_impl.FiniteElement2DImpl

Bases: pyrrha.method.FiniteElement2D

Class to instance FiniteElement2D.

class to implement a specific Numerical Method.

heat_dirichlet(K, F, dirichlet)

Apply the Dirichlet condition.

The Dirichlet conditions are applied to modify the K matrix and F vector of de system based in data Dirichlet matrix.

Parameters
  • K (float matrix) – K matrix of the system.

  • F (float array) – F vector of the system.

  • dirichlet (float matrix) – data dirichlet matrix.

Returns

Return type

modified k maxtrix and f vector

heat_initialize(n_nodes)

Initialize the matrix and vector of the system.

Parameters

n_nodes (int) – number of mesh noodes.

Returns

  • matrix k and matrix c with n_nodes rows and n_nodes columns and vector

  • f with n_nodes rows.

heat_neumann(F, neumann, x_node)

Apply the Neumann condition.

The Neumann conditions are applied to modify the F vector of de system based in data Neumman matrix.

Parameters
  • F (float array) – F vector of the system.

  • neumann (float matrix) – data Neumann matrix.

  • x_node (float matrix) – mesh nodes coordinates.

Returns

Return type

modified f vector

heat_robin(K, F, robin, x_node)

Apply the Robin condition.

The Robin conditions are applied to modify the K matrix and F vector of de system based in data Robin matrix.

Parameters
  • K (float matrix) – K matrix of the system.

  • F (float array) – F vector of the system.

  • robin (float matrix) – data Robin matrix.

  • x_node (float matrix) – mesh nodes coordinates.

Returns

Return type

modified k maxtrix and f vector

Module contents

Correct implementations to compare.