parameters: (self)
docstring: Initialize the wave theory and the periodic function.
docstring_summary: Initialize the wave theory and the periodic function.
docstring_tokens: Initialize the wave theory and the periodic function .
function: def ExecuteInitialize(self):
          """Initialize the wave theory and the periodic function."""
  
          # Check the direction
          if self.direction_by_normal:
              direction = self._CalculateUnitNormal()
              if self.settings["normal_positive_outwards"].GetBool():
                  direction *= -1
              self.settings["direction"].SetVector(direction)
  
          # Setup the wave theory
          wave_settings = self.settings["wave_specifications"]
          wave_theory = WaveTheoryFactory(self.model_part, wave_settings)
  
          # Creation of the parameters for the c++ process
          velocity_parameters = KM.Parameters("""{}""")
          velocity_parameters.AddEmptyValue("amplitude").SetDouble(wave_theory.horizontal_velocity)
          velocity_parameters.AddEmptyValue("wavelength").SetDouble(wave_theory.wavelength)
          velocity_parameters.AddEmptyValue("period").SetDouble(wave_theory.period)
          velocity_parameters.AddValue("phase", self.settings["wave_specifications"]["t_shift"])
          velocity_parameters.AddValue("shift", self.settings["wave_specifications"]["x_shift"])
          velocity_parameters.AddValue("smooth_time", self.settings["smooth_time"])
          velocity_parameters.AddValue("direction", self.settings["direction"])
  
          self.velocity_process = SW.ApplySinusoidalFunctionToVector(self.model_part, KM.VELOCITY, velocity_parameters)
function_tokens: def ExecuteInitialize ( self ) : # Check the direction if self . direction_by_normal : direction = self . _CalculateUnitNormal ( ) if self . settings [ "normal_positive_outwards" ] . GetBool ( ) : direction *= - 1 self . settings [ "direction" ] . SetVector ( direction ) # Setup the wave theory wave_settings = self . settings [ "wave_specifications" ] wave_theory = WaveTheoryFactory ( self . model_part , wave_settings ) # Creation of the parameters for the c++ process velocity_parameters = KM . Parameters ( """{}""" ) velocity_parameters . AddEmptyValue ( "amplitude" ) . SetDouble ( wave_theory . horizontal_velocity ) velocity_parameters . AddEmptyValue ( "wavelength" ) . SetDouble ( wave_theory . wavelength ) velocity_parameters . AddEmptyValue ( "period" ) . SetDouble ( wave_theory . period ) velocity_parameters . AddValue ( "phase" , self . settings [ "wave_specifications" ] [ "t_shift" ] ) velocity_parameters . AddValue ( "shift" , self . settings [ "wave_specifications" ] [ "x_shift" ] ) velocity_parameters . AddValue ( "smooth_time" , self . settings [ "smooth_time" ] ) velocity_parameters . AddValue ( "direction" , self . settings [ "direction" ] ) self . velocity_process = SW . ApplySinusoidalFunctionToVector ( self . model_part , KM . VELOCITY , velocity_parameters )