aiida_vibroscopy.utils.elfield_cards_functions

aiida_vibroscopy.utils.elfield_cards_functions#

Functions helping in the generation of the multiple direction electric field cards.

Module Contents#

Functions#

get_vector_from_number(→ tuple[float, float, float])

Get the electric field vector from the number for finite differences.

get_tuple_from_vector(→ tuple[int, int])

Return a tuple referring to the Voigt number and the sing of the direction.

aiida_vibroscopy.utils.elfield_cards_functions.get_vector_from_number(number: int, value: float) tuple[float, float, float][source]#

Get the electric field vector from the number for finite differences.

The Voigt notation is used:

  • 0, 1, 2 for first order derivatives: l –> {l}j ; e.g. 0 does 00, 01, 02

  • 0, 1, 2, 3, 4, 5 for second order derivatives: l <–> ij –> {ij}k ;

    precisely (k = 0, 1, 2): - 0 –> {00}k - 1 –> {11}k - 2 –> {22}k - 3 –> {12}k - 4 –> {02}k - 5 –> {01}k

Parameters:
  • number – the number according to Voigt notation to get the associated electric field vector

  • value – value of the electric field

Returns:

(3,) shape list

aiida_vibroscopy.utils.elfield_cards_functions.get_tuple_from_vector(vector: tuple[float, float, float]) tuple[int, int][source]#

Return a tuple referring to the Voigt number and the sing of the direction.

Returns:

tuple(Voigt number, sign), the number is between 0 and 5, the sign 1 or -1.