! $Id: stream.f90,v 1.1 2018/10/13 19:11:49 brandenb Exp $ ! ! This module provide a way for users to specify custom initial ! conditions. ! !** AUTOMATIC CPARAM.INC GENERATION **************************** ! Declare (for generation of cparam.inc) the number of f array ! variables and auxiliary variables added by this module ! ! CPARAM logical, parameter :: linitial_condition = .true. ! !*************************************************************** module InitialCondition ! use Cparam use Cdata use General, only: keep_compiler_quiet use Messages ! implicit none ! include 'initial_condition.h' ! real :: amp0=0., x1, x2 ! namelist /initial_condition_pars/ amp0, x1, x2 ! contains !*********************************************************************** subroutine register_initial_condition() ! ! Registers variables associated with this module; likely none. ! ! 25-jun-13/ccyang: coded. ! if (lroot) call svn_id("$Id: stream.f90,v 1.1 2018/10/13 19:11:49 brandenb Exp $") ! endsubroutine register_initial_condition !*********************************************************************** subroutine initialize_initial_condition(f) ! ! Initializes any module variables which are parameter dependent. ! ! 25-jun-13/ccyang: coded. ! real, dimension(mx,my,mz,mfarray) :: f ! call keep_compiler_quiet(f) ! endsubroutine initialize_initial_condition !*********************************************************************** subroutine initial_condition_uu(f) ! ! Initializes the velocity field. ! ! 25-jun-13/ccyang: coded. ! real, dimension(mx,my,mz,mfarray), intent(inout) :: f ! integer :: ix ! do ix=1,mx print*,'AXEL ',x(ix) if (x(ix)>x1 .and. x(ix)