jf1uids.initial_condition_generation.construct_primitive_state#
Module Contents#
Functions#
Stack the primitive variables into the state array.  | 
API#
- jf1uids.initial_condition_generation.construct_primitive_state.construct_primitive_state(config: jf1uids.option_classes.simulation_config.SimulationConfig, registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables, density: jf1uids.option_classes.simulation_config.FIELD_TYPE, velocity_x: Union[jf1uids.option_classes.simulation_config.FIELD_TYPE, types.NoneType] = None, velocity_y: Union[jf1uids.option_classes.simulation_config.FIELD_TYPE, types.NoneType] = None, velocity_z: Union[jf1uids.option_classes.simulation_config.FIELD_TYPE, types.NoneType] = None, magnetic_field_x: Union[jf1uids.option_classes.simulation_config.FIELD_TYPE, types.NoneType] = None, magnetic_field_y: Union[jf1uids.option_classes.simulation_config.FIELD_TYPE, types.NoneType] = None, magnetic_field_z: Union[jf1uids.option_classes.simulation_config.FIELD_TYPE, types.NoneType] = None, gas_pressure: Union[jf1uids.option_classes.simulation_config.FIELD_TYPE, types.NoneType] = None, cosmic_ray_pressure: Union[jf1uids.option_classes.simulation_config.FIELD_TYPE, types.NoneType] = None, sharding=None) jf1uids.option_classes.simulation_config.STATE_TYPE[source]#
 Stack the primitive variables into the state array.
IN 1D SET ONLY THE XCOMPONENTS, in 2D SET X AND Y COMPONENTS, in 3D SET X, Y AND Z COMPONENTS
- Args:
 config: The simulation configuration. registered_variables: The indices of the variables in the state array. density: The density of the fluid. velocity_x: The x-component of the velocity of the fluid. velocity_y: The y-component of the velocity of the fluid. velocity_z: The z-component of the velocity of the fluid. magnetic_field_x: The x-component of the magnetic field in B / sqrt(mu_0). magnetic_field_y: The y-component of the magnetic field in B / sqrt(mu_0). magnetic_field_z: The z-component of the magnetic field in B / sqrt(mu_0). gas_pressure: The thermal pressure of the fluid. cosmic_ray_pressure: The cosmic ray pressure of the fluid.
- Returns:
 The state array.