c_sol_var.f90 Source File


This file depends on

sourcefile~~c_sol_var.f90~~EfferentGraph sourcefile~c_sol_var.f90 c_sol_var.f90 sourcefile~globals.f90 globals.f90 sourcefile~c_sol_var.f90->sourcefile~globals.f90

Files dependent on this one

sourcefile~~c_sol_var.f90~~AfferentGraph sourcefile~c_sol_var.f90 c_sol_var.f90 sourcefile~sol_var_mhd3d.f90 sol_var_mhd3d.f90 sourcefile~sol_var_mhd3d.f90->sourcefile~c_sol_var.f90 sourcefile~mhd3d.f90 mhd3d.f90 sourcefile~mhd3d.f90->sourcefile~sol_var_mhd3d.f90 sourcefile~mhd3d_evalfunc.f90 mhd3d_evalfunc.f90 sourcefile~mhd3d.f90->sourcefile~mhd3d_evalfunc.f90 sourcefile~mhd3d_vars.f90 mhd3d_vars.f90 sourcefile~mhd3d.f90->sourcefile~mhd3d_vars.f90 sourcefile~restart.f90 restart.f90 sourcefile~mhd3d.f90->sourcefile~restart.f90 sourcefile~analyze.f90 analyze.f90 sourcefile~mhd3d.f90->sourcefile~analyze.f90 sourcefile~mhd3d_evalfunc.f90->sourcefile~sol_var_mhd3d.f90 sourcefile~mhd3d_evalfunc.f90->sourcefile~mhd3d_vars.f90 sourcefile~mhd3d_vars.f90->sourcefile~sol_var_mhd3d.f90 sourcefile~restart.f90->sourcefile~sol_var_mhd3d.f90 sourcefile~restart.f90->sourcefile~mhd3d_evalfunc.f90 sourcefile~restart.f90->sourcefile~mhd3d_vars.f90 sourcefile~analyze.f90->sourcefile~mhd3d_vars.f90 sourcefile~functional.f90 functional.f90 sourcefile~functional.f90->sourcefile~mhd3d.f90 sourcefile~gvec_post.f90 gvec_post.f90 sourcefile~gvec_post.f90->sourcefile~mhd3d_evalfunc.f90 sourcefile~gvec_post.f90->sourcefile~mhd3d_vars.f90 sourcefile~gvec_post.f90->sourcefile~restart.f90 sourcefile~gvec_post.f90->sourcefile~analyze.f90 sourcefile~gvec_post.f90->sourcefile~functional.f90 sourcefile~rungvec.f90 rungvec.f90 sourcefile~rungvec.f90->sourcefile~mhd3d_vars.f90 sourcefile~rungvec.f90->sourcefile~restart.f90 sourcefile~rungvec.f90->sourcefile~analyze.f90 sourcefile~rungvec.f90->sourcefile~functional.f90 sourcefile~state.f90 state.f90 sourcefile~state.f90->sourcefile~mhd3d_vars.f90 sourcefile~state.f90->sourcefile~restart.f90 sourcefile~state.f90->sourcefile~analyze.f90 sourcefile~state.f90->sourcefile~functional.f90 sourcefile~gvec.f90 gvec.f90 sourcefile~gvec.f90->sourcefile~rungvec.f90 sourcefile~run.f90 run.f90 sourcefile~run.f90->sourcefile~rungvec.f90

Source Code

!===================================================================================================================================
! Copyright (c) 2025 GVEC Contributors, Max Planck Institute for Plasma Physics
! License: MIT
!===================================================================================================================================
#include "defines.h"

!===================================================================================================================================
!>
!!# Module ** C_Sol_Var **
!!
!! contains only abstract type c_sol_var
!!
!===================================================================================================================================
MODULE MODgvec_c_sol_var
! MODULES
USE MODgvec_Globals,ONLY:wp
IMPLICIT NONE
PUBLIC

!-----------------------------------------------------------------------------------------------------------------------------------
TYPE,ABSTRACT :: c_sol_var
  INTEGER :: nVars
  CONTAINS
  PROCEDURE(i_sub_sol_var_init  ),DEFERRED :: init
  PROCEDURE(i_sub_sol_var       ),DEFERRED :: free
  PROCEDURE(i_sub_sol_var_set_to_solvar),DEFERRED :: set_to_solvar
  PROCEDURE(i_sub_sol_var_set_to_scalar),DEFERRED :: set_to_scalar
  PROCEDURE(i_sub_sol_var_copy  ),DEFERRED :: copy
  PROCEDURE(i_fun_sol_var_norm_2),DEFERRED :: norm_2
  PROCEDURE(i_sub_sol_var_AXBY  ),DEFERRED :: AXBY
END TYPE c_sol_var

ABSTRACT INTERFACE
  SUBROUTINE i_sub_sol_var_init( sf ,varsize)
    IMPORT c_sol_var
    INTEGER         , INTENT(IN   ) :: varsize(:)
    CLASS(c_sol_var), INTENT(INOUT) :: sf
  END SUBROUTINE i_sub_sol_var_init

  SUBROUTINE i_sub_sol_var( sf )
    IMPORT c_sol_var
    CLASS(c_sol_var), INTENT(INOUT) :: sf
  END SUBROUTINE i_sub_sol_var

  FUNCTION i_fun_sol_var_norm_2( sf ) RESULT(norm_2)
    IMPORT wp,c_sol_var
    CLASS(c_sol_var), INTENT(IN   ) :: sf
    REAL(wp)                       :: norm_2(sf%nvars)
  END FUNCTION i_fun_sol_var_norm_2

  SUBROUTINE i_sub_sol_var_copy( sf, tocopy )
    IMPORT c_sol_var
    CLASS(c_sol_var), INTENT(IN   ) :: tocopy
    CLASS(c_sol_var), INTENT(INOUT) :: sf
  END SUBROUTINE i_sub_sol_var_copy

  SUBROUTINE i_sub_sol_var_set_to_solvar( sf, toset ,scal_in)
    IMPORT wp,c_sol_var
    CLASS(c_sol_var), INTENT(IN   ) :: toset
    CLASS(c_sol_var), INTENT(INOUT) :: sf
    REAL(wp),INTENT(IN),OPTIONAL    :: scal_in
  END SUBROUTINE i_sub_sol_var_set_to_solvar

  SUBROUTINE i_sub_sol_var_set_to_scalar( sf, scalar )
    IMPORT wp,c_sol_var
    REAL(wp)        , INTENT(IN   ) :: scalar
    CLASS(c_sol_var), INTENT(INOUT) :: sf
  END SUBROUTINE i_sub_sol_var_set_to_scalar

  SUBROUTINE i_sub_sol_var_AXBY( sf, aa, X, bb, Y )
    IMPORT wp,c_sol_var
    REAL(wp)        , INTENT(IN   ) :: aa
    CLASS(c_sol_var), INTENT(IN   ) :: X
    REAL(wp)        , INTENT(IN   ) :: bb
    CLASS(c_sol_var), INTENT(IN   ) :: Y
    CLASS(c_sol_var), INTENT(INOUT) :: sf
  END SUBROUTINE i_sub_sol_var_AXBY
END INTERFACE
!-----------------------------------------------------------------------------------------------------------------------------------

END MODULE MODgvec_c_sol_var