H.2 Ortho_Diffusion Class Code Listing

The main documentation of the Ortho_Diffusion Class contains additional explanation of this code listing.

!
! Author: Michael L. Hall
!         P.O. Box 1663, MS-D413, LANL
!         Los Alamos, NM 87545
!         ph: 505-665-4312
!         email: Hall@LANL.gov
! 
! Created on: 03/03/05
! CVS Info:   $Id: ortho_diffusion.F90,v 1.32 2009/09/17 07:26:45 hall Exp $

module Caesar_Ortho_Diffusion_Class

  ! Global use associations.

  use Caesar_Linear_Algebra_Module
  use Caesar_Multi_Mesh_Class
  use Caesar_Numbers_Module, only: zero, half, one, two
  use Caesar_Flags_Module, only: Internal_or_Periodic_BC, Dirichlet_BC, &
                                 Homogeneous_BC, Neumann_BC, Reflective_BC, &
                                 Source_BC, Vacuum_BC, AMR_Large_Cell_BC, &
                                 AMR_Small_Cell_BC

  ! Start up with everything untyped and private.

  implicit none
  private

  ! Public flags.

  public :: Dirichlet_BC, Homogeneous_BC, Neumann_BC, Reflective_BC, &
            Source_BC, Vacuum_BC

  ! Public procedures.

  public :: Initialize, Finalize, Valid_State, Initialized
  public :: Add_to_Matrix_Equation, Evaluate, Evaluate_Gradient_Cells, Locus, &
            Name, Output

  interface Initialize
    module procedure Initialize_Ortho_Diffusion
  end interface

  interface Finalize
    module procedure Finalize_Ortho_Diffusion
  end interface

  interface Valid_State
    module procedure Valid_State_Ortho_Diffusion
  end interface

  interface Initialized
    module procedure Initialized_Ortho_Diffusion
  end interface

  interface Add_to_Matrix_Equation
    module procedure Add_to_Matrix_Equation_Ortho_D
  end interface

  interface Evaluate
    module procedure Evaluate_Ortho_Diffusion
  end interface

  interface Evaluate_Gradient_Cells
    module procedure Evaluate_Grad_Cells_Ortho_Diff
  end interface

  interface Locus
    module procedure Get_Locus_Ortho_Diffusion
  end interface

  interface Name
    module procedure Get_Name_Ortho_Diffusion
  end interface

  interface Output
    module procedure Output_Ortho_Diffusion
  end interface

  ! Public type definitions.

  public :: Ortho_Diffusion_type

  type Ortho_Diffusion_type

    ! Initialization flag.

    type(integer) :: Initialized

    ! The name for this variable.

    type(character,name_length) :: Name

    ! The diffusion coefficient, defined on the cells for now.

    type(real,1) :: Coefficient

    ! The boundary condition flag for each face of each cell.

    type(real,2) :: Boundary_Condition

    ! The boundary condition constant for each face of each cell.

    type(real,2) :: Phi_BC

    ! The extrapolation factor used in the boundary condition calculation.

    type(real) :: Extrapolation

    ! The independent variable at the linearization value (past time 
    ! step or iterate).

    type(real,1) :: Phi

    ! Mesh that this ortho_diffusion object is defined on.

    type(Multi_Mesh_type), pointer :: Mesh

    ! Evaluation locus. (to be used in a future version -- for now, 
    !                    assumed to be "Cells".)

    type(character,name_length) :: Locus

    ! Locus Base_Structure.

    type(Base_Structure_type), pointer :: Structure

    ! Equation number and total number of equations for this monomial.

    type(integer) :: Equation, NEquations

  end type Ortho_Diffusion_type

contains

The Ortho_Diffusion Class contains the following routines which are listed in separate sections:

* Initialize_Ortho_Diffusion
* Finalize_Ortho_Diffusion
* Valid_State_Ortho_Diffusion
* Initialized_Ortho_Diffusion
* Add_to_Matrix_Equation_Ortho_Diffusion
* Evaluate_Ortho_Diffusion
* Evaluate_Gradient_Cells_Ortho_Diffusion
* Get_Harmonic_Diffusion_Coef_Ortho_Diffusion
* Get Value Ortho_Diffusion
* Output_Ortho_Diffusion

end module Caesar_Ortho_Diffusion_Class



Subsections
Michael L. Hall