1
! Copyright (C) 2006 Imperial College London and others.
3
! Please see the AUTHORS file in the main source directory for a full list
4
! of copyright holders.
7
! Applied Modelling and Computation Group
8
! Department of Earth Science and Engineering
9
! Imperial College London
11
! amcgsoftware@imperial.ac.uk
13
! This library is free software; you can redistribute it and/or
14
! modify it under the terms of the GNU Lesser General Public
15
! License as published by the Free Software Foundation,
16
! version 2.1 of the License.
18
! This library is distributed in the hope that it will be useful,
19
! but WITHOUT ANY WARRANTY; without even the implied warranty of
20
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
! Lesser General Public License for more details.
23
! You should have received a copy of the GNU Lesser General Public
24
! License along with this library; if not, write to the Free Software
25
! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
30
module mass_matrix_diagnostics
32
!!< Module containing mass matrix related diagnostic algorithms.
37
use global_parameters, only : OPTION_PATH_LEN
39
use state_fields_module
46
public :: calculate_finite_element_lumped_mass_matrix, &
47
calculate_control_volume_mass_matrix
51
subroutine calculate_finite_element_lumped_mass_matrix(state, s_field)
53
!!< Calculate the finite element lumped mass matrix
55
type(state_type), intent(inout) :: state
56
type(scalar_field), intent(inout) :: s_field
59
type(scalar_field), pointer :: mass => null()
61
ewrite(1,*) 'Entering calculate_finite_element_lumped_mass_matrix'
63
mass => get_lumped_mass(state, s_field%mesh)
65
call set(s_field, mass)
67
ewrite(1,*) 'Exiting calculate_finite_element_lumped_mass_matrix'
69
end subroutine calculate_finite_element_lumped_mass_matrix
71
subroutine calculate_control_volume_mass_matrix(state, s_field)
73
!!< Calculate the control volume mass matrix
75
type(state_type), intent(inout) :: state
76
type(scalar_field), intent(inout) :: s_field
79
type(scalar_field), pointer :: mass => null()
81
ewrite(1,*) 'Entering calculate_control_volume_mass_matrix'
83
mass => get_cv_mass(state, s_field%mesh)
85
call set(s_field, mass)
87
ewrite(1,*) 'Exiting calculate_control_volume_mass_matrix'
89
end subroutine calculate_control_volume_mass_matrix
91
end module mass_matrix_diagnostics