Hi Lucas,

I am currently studying of this, if you have some problems or very exciting 
process,  we could discuss if you would like to share. :)

Best,
Mark

在 2017年10月13日星期五 UTC+2下午4:50:02,Lucas Campos写道:
>
> Dear Wolfgang,
>
> Thank you for your explanation. Currently, I am using a code that was not 
> written by me, and uses the MatrixTools::apply_boundary_values() 
> approach. I try to change it to use the ConstraintMatrix one. For that, 
> step-40 seems to be the best starting point, like Mark did. 
>
> Thanks again,
> Lucas
>
>
>
> On 13 October 2017 at 16:43, Wolfgang Bangerth <bang...@colostate.edu 
> <javascript:>> wrote:
>
>> On 10/13/2017 08:39 AM, Lucas Campos wrote:
>>
>>>
>>>     In general, using MatrixTools::apply_boundary_values() is not the 
>>> way to go
>>>     with MPI programs. Rather, use a ConstraintMatrix and incorporate the
>>>     boundary
>>>     values into the same object as you do with hanging node constraints.
>>>
>>>
>>> This is the way to go due to correctness, or in the sense of scalability?
>>>
>>
>> MatrixTools::apply_boundary_values() needs access to the elements of the 
>> matrix because it wants to modify elements after they have already been 
>> written into the matrix. That is already difficult if the matrix is owned 
>> by PETSc or Trilinos -- we can get access to these elements, but it is not 
>> efficient to do so.
>>
>> But the bigger issue is that the function wants to access elements not 
>> only for the rows of constrained DoFs, but also for the columns. That means 
>> that you may have to access elements that are actually stored on other 
>> processors -- something that can not be done efficiently. Consequently, 
>> MatrixTools::apply_boundary_values() does not attempt to eliminate columns 
>> of the matrix, and you will end up with a non-symmetric matrix even if your 
>> problem is symmetric.
>>
>> It is better to use the approach via ConstraintMatrix that deals with 
>> entries before they even get into the matrix (and therefore in particular 
>> before matrix entries are sent to other processors).
>>
>> Best
>>  W.
>>
>> -- 
>> ------------------------------------------------------------------------
>> Wolfgang Bangerth          email:                 bang...@colostate.edu 
>> <javascript:>
>>
>>                            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 a topic in 
>> the Google Groups "deal.II User Group" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/dealii/5hC7jODg-7k/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> dealii+un...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to