TMatVec_otf Subroutine

private subroutine TMatVec_otf(eel, x, y, dodiag)

Uses

  • proc~~tmatvec_otf~~UsesGraph proc~tmatvec_otf TMatVec_otf module~mod_electrostatics mod_electrostatics proc~tmatvec_otf->module~mod_electrostatics module~mod_memory mod_memory module~mod_electrostatics->module~mod_memory module~mod_profiling mod_profiling module~mod_electrostatics->module~mod_profiling module~mod_constants mod_constants module~mod_electrostatics->module~mod_constants module~mod_io mod_io module~mod_electrostatics->module~mod_io module~mod_topology mod_topology module~mod_electrostatics->module~mod_topology module~mod_adjacency_mat mod_adjacency_mat module~mod_electrostatics->module~mod_adjacency_mat module~mod_memory->module~mod_constants module~mod_memory->module~mod_io iso_c_binding iso_c_binding module~mod_memory->iso_c_binding module~mod_profiling->module~mod_memory module~mod_profiling->module~mod_constants module~mod_profiling->module~mod_io module~mod_constants->iso_c_binding module~mod_io->module~mod_constants module~mod_topology->module~mod_memory module~mod_topology->module~mod_adjacency_mat module~mod_adjacency_mat->module~mod_memory

Perform matrix vector multiplication y = TMat*x, where TMat is polarization matrix (precomputed and stored in memory) and x and y are column vectors

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(in) :: eel

The electostatic data structure

real(kind=rp), intent(in), dimension(3*eel%pol_atoms) :: x

Input vector

real(kind=rp), intent(out), dimension(3*eel%pol_atoms) :: y

Output vector

logical, intent(in) :: dodiag

Logical flag (.true. = diagonal is computed, .false. = diagonal is skipped)


Calls

proc~~tmatvec_otf~~CallsGraph proc~tmatvec_otf TMatVec_otf proc~field_extd2d field_extD2D proc~tmatvec_otf->proc~field_extd2d proc~tmatvec_diag TMatVec_diag proc~tmatvec_otf->proc~tmatvec_diag proc~damped_coulomb_kernel damped_coulomb_kernel proc~field_extd2d->proc~damped_coulomb_kernel proc~mu_elec_prop mu_elec_prop proc~field_extd2d->proc~mu_elec_prop proc~coulomb_kernel coulomb_kernel proc~damped_coulomb_kernel->proc~coulomb_kernel proc~fatal_error fatal_error proc~damped_coulomb_kernel->proc~fatal_error proc~coulomb_kernel->proc~fatal_error proc~ommp_message ommp_message proc~fatal_error->proc~ommp_message proc~close_output close_output proc~fatal_error->proc~close_output proc~close_output->proc~ommp_message

Contents

Source Code


Source Code

    subroutine TMatVec_otf(eel, x, y, dodiag)
        !! Perform matrix vector multiplication y = TMat*x,
        !! where TMat is polarization matrix (precomputed and stored in memory)
        !! and x and y are column vectors
        use mod_electrostatics, only: field_extD2D
        implicit none
        
        type(ommp_electrostatics_type), intent(in) :: eel
        !! The electostatic data structure 
        real(rp), dimension(3*eel%pol_atoms), intent(in) :: x
        !! Input vector
        real(rp), dimension(3*eel%pol_atoms), intent(out) :: y
        !! Output vector
        logical, intent(in) :: dodiag
        !! Logical flag (.true. = diagonal is computed, .false. = diagonal is
        !! skipped)
        
        y = 0.0_rp
        call field_extD2D(eel, x, y)
        y = -1.0_rp * y ! Why? TODO
        if(dodiag) call TMatVec_diag(eel, x, y)
    
    end subroutine TMatVec_otf