[CP2K:3959] Quick DBCSR matrix question
Urban Borštnik
urban.b... at gmail.com
Thu Aug 23 13:33:38 UTC 2012
On Thu, 2012-08-02 at 13:44 -0700, Adam wrote:
> The problem I run into while doing that is that "copy_dbcsr_to_fm"
> uses a cp_dbcsr_obj not a dbcsr_obj which I used to create my
> matrix, is there a way around this?
Since cp_dbcsr_obj is more or less a wrapper around dbcsr_obj, you can
take the routine (in src/cp_dbcsr_operations.F) and modify it...
>
> -Adam
>
> On Wednesday, August 1, 2012 2:46:29 AM UTC-6, jgh wrote:
> Hi
>
> have a look into " copy_dbcsr_to_fm ", fm = full matrix.
>
> Most of the complexity is from the distributed memory of both
> types.
> Using the fm type (see cp_fm_type.F) is rather easy.
>
> Juerg
>
> --------------------------------------------------------------
> Juerg Hutter Phone : ++41 44 635 4491
> Physical Chemistry Institute FAX : ++41 44 635 6838
> University of Zurich E-mail: hut... at pci.uzh.ch
> Winterthurerstrasse 190
> CH-8057 Zurich, Switzerland
> ---------------------------------------------------------------
>
> -----cp... at googlegroups.com wrote: -----
> To: cp... at googlegroups.com
> From: Adam
> Sent by: cp... at googlegroups.com
> Date: 07/31/2012 08:10PM
> Subject: [CP2K:3953] Quick DBCSR matrix question
>
> Is there an easy way to retrieve matrix data by row and
> column? So I could do something like this to store values in
> an array:
>
> Real(8) :: BO(1000,1000)
> ...
> DO j=1, dbcsr_nblkcols_total(matrix_a)
> DO i=1, dbcsr_nblkrows_total(matrix_a)
> dbcsr_function(matrix_a, i, j, data)
> BO(i,j)=data
> ENDDO
> ENDDO
>
> --
> You received this message because you are subscribed to the
> Google Groups "cp2k" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/cp2k/-/xM51PeOeEDAJ.
> To post to this group, send email to cp... at googlegroups.com.
> To unsubscribe from this group, send email to cp2k
> +unsub... at googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cp2k?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "cp2k" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/cp2k/-/DQEF4JQgqUEJ.
> To post to this group, send email to cp... at googlegroups.com.
> To unsubscribe from this group, send email to cp2k
> +unsub... at googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cp2k?hl=en.
More information about the CP2K-user
mailing list