Re: [deal.II] HOW TO OUTPUT SYSTEM MATRIX IN A FILE

2020-08-01 Thread 孙翔
Thank you very much. 

On Wednesday, 29 July 2020 12:31:30 UTC-7, Daniel Arndt wrote:
>
> Of course, there is also PETScWrappers::MatrixBase::print(
> https://www.dealii.org/current/doxygen/deal.II/classPETScWrappers_1_1MatrixBase.html#a7515e640202d1ad50bd9baa13c404cb1)
>  
> that should work.
>
> Best,
> Daniel
>
> Am Mi., 29. Juli 2020 um 12:59 Uhr schrieb Wolfgang Bangerth <
> bang...@colostate.edu >:
>
>> On 7/28/20 12:11 PM, 孙翔 wrote:
>> > Hi, I followed step-17 and build a system matrix of which type 
>> > is PETScWrappers::MPI::SparseMatrix. I want to output it after 
>> assembling. How 
>> > should I do it? Thank you very much.
>>
>> If performance doesn't matter, just loop over all indices i and j and 
>> output 
>> the value of the matrix. If you're running in parallel, you need to 
>> restrict 
>> the loop over i to the locally owned range.
>>
>> Best
>>   W.
>>
>>
>> -- 
>> 
>> Wolfgang Bangerth  email: bang...@colostate.edu 
>> 
>> www: http://www.math.colostate.edu/~bangerth/
>>
>> -- 
>> The deal.II project is located at http://www.dealii.org/
>> For mailing list/forum options, see 
>> https://groups.google.com/d/forum/dealii?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "deal.II User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to dea...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/879a7ef3-7c13-8142-d970-773e3a57e470%40colostate.edu
>> .
>>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/0fc80415-a6fd-4ca5-b132-10bbfb347901o%40googlegroups.com.


Re: [deal.II] HOW TO OUTPUT SYSTEM MATRIX IN A FILE

2020-08-01 Thread 孙翔
Thank you very much. 

On Wednesday, 29 July 2020 09:59:43 UTC-7, Wolfgang Bangerth wrote:
>
> On 7/28/20 12:11 PM, 孙翔 wrote: 
> > Hi, I followed step-17 and build a system matrix of which type 
> > is PETScWrappers::MPI::SparseMatrix. I want to output it after 
> assembling. How 
> > should I do it? Thank you very much. 
>
> If performance doesn't matter, just loop over all indices i and j and 
> output 
> the value of the matrix. If you're running in parallel, you need to 
> restrict 
> the loop over i to the locally owned range. 
>
> Best 
>   W. 
>
>
> -- 
>  
> Wolfgang Bangerth  email: bang...@colostate.edu 
>  
> www: http://www.math.colostate.edu/~bangerth/ 
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/a41dd189-9dc2-4ada-a33e-c8b2fc31ea4co%40googlegroups.com.


Re: [deal.II] HOW TO OUTPUT SYSTEM MATRIX IN A FILE

2020-07-29 Thread Wolfgang Bangerth

On 7/29/20 1:31 PM, Daniel Arndt wrote:
Of course, there is also 
PETScWrappers::MatrixBase::print(https://www.dealii.org/current/doxygen/deal.II/classPETScWrappers_1_1MatrixBase.html#a7515e640202d1ad50bd9baa13c404cb1 
) 
that should work.


Ah, yes, that's much better!
W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/409e71cd-e027-1537-91de-af8726280cfd%40colostate.edu.


Re: [deal.II] HOW TO OUTPUT SYSTEM MATRIX IN A FILE

2020-07-29 Thread Daniel Arndt
Of course, there is also PETScWrappers::MatrixBase::print(
https://www.dealii.org/current/doxygen/deal.II/classPETScWrappers_1_1MatrixBase.html#a7515e640202d1ad50bd9baa13c404cb1)
that should work.

Best,
Daniel

Am Mi., 29. Juli 2020 um 12:59 Uhr schrieb Wolfgang Bangerth <
bange...@colostate.edu>:

> On 7/28/20 12:11 PM, 孙翔 wrote:
> > Hi, I followed step-17 and build a system matrix of which type
> > is PETScWrappers::MPI::SparseMatrix. I want to output it after
> assembling. How
> > should I do it? Thank you very much.
>
> If performance doesn't matter, just loop over all indices i and j and
> output
> the value of the matrix. If you're running in parallel, you need to
> restrict
> the loop over i to the locally owned range.
>
> Best
>   W.
>
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/879a7ef3-7c13-8142-d970-773e3a57e470%40colostate.edu
> .
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWb%2B7%3Dfk_oNi-fte9cpWKRO8MeapeWCogD%2B8RVEW17eqg7w%40mail.gmail.com.


Re: [deal.II] HOW TO OUTPUT SYSTEM MATRIX IN A FILE

2020-07-29 Thread Wolfgang Bangerth

On 7/28/20 12:11 PM, 孙翔 wrote:
Hi, I followed step-17 and build a system matrix of which type 
is PETScWrappers::MPI::SparseMatrix. I want to output it after assembling. How 
should I do it? Thank you very much.


If performance doesn't matter, just loop over all indices i and j and output 
the value of the matrix. If you're running in parallel, you need to restrict 
the loop over i to the locally owned range.


Best
 W.


--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/879a7ef3-7c13-8142-d970-773e3a57e470%40colostate.edu.


[deal.II] HOW TO OUTPUT SYSTEM MATRIX IN A FILE

2020-07-28 Thread 孙翔
Hi, I followed step-17 and build a system matrix of which type 
is PETScWrappers::MPI::SparseMatrix. I want to output it after assembling. 
How should I do it? Thank you very much. 

Best,

Xiang

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/92a3194f-d396-4cf2-b20a-0ae2f278d63do%40googlegroups.com.