Re: [deal.II] Problem with PETScWrappers::SolverCG

2016-10-16 Thread Jean-Paul Pelteret
Dear Hamed,

You are duplicating your posts in two threads. This is not productive, so 
I'm going to ask you to please focus this topic within your other thread 
. You have been 
given some useful advice there that you should follow up on.

Regards,
J-P

On Sunday, October 16, 2016 at 11:39:44 PM UTC+2, Hamed Babaei wrote:
>
> Another point I need to mention is that I had the same problem when as my 
> first try of parallelization, I paralleled a much simpler code, the 
> step-25, based on the step-40 . 
> I received the same Segmentation Violation error from Petsc. At that time, 
> I replaced PreconditionerAMG with PreconditionerJacobi and the problem 
> resolved. 
>
> However, Now even using PreconditionerJacobi can not remedy the issue even 
> if it works for very few initial value and boundary conditions.
>
> On Sunday, October 16, 2016 at 4:05:21 PM UTC-5, Hamed Babaei wrote:
>>
>> Timo,
>>
>> Step-40 works on my machine perfectly. The code and its dependent 
>> parameter file are attached.
>> I appreciate it if you could run the code on your machine and see what's 
>> the problem with it.
>>
>> Thanks 
>>
>> On Sunday, October 16, 2016 at 7:55:35 AM UTC-5, Timo Heister wrote:
>>>
>>> > I have parallelized a code for a Thermoelastic problem based on 
>>> step-40 . 
>>>
>>> Does step-40 work on your system? 
>>>
>>> > It seems from debugger backtracethat that error comes from the 
>>> > PETScWrappers::SolverCG. 
>>>
>>> Can you share the backtrace with us? 
>>>
>>>
>>> -- 
>>> Timo Heister 
>>> http://www.math.clemson.edu/~heister/ 
>>>
>>

-- 
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.


Re: [deal.II] Re: How to use Trilinos instead of Petsc in step-40

2016-10-16 Thread Wolfgang Bangerth

On 10/16/2016 03:46 PM, Hamed Babaei wrote:

Another point I need to mention is that I had the same problem when as my
first try of parallelization, I paralleled a much simpler code, the step-25,
based on the step-40 .
I received the same Segmentation Violation error from Petsc. At that time, I
replaced PreconditionerAMG with PreconditionerJacobi and the problem resolved.


This does not help right now, but as a general rule, it is far simpler to 
debug things when you have a small, simple program that when you have a large, 
complicated one. In your case, you had a problem you didn't understand, and 
you chose to address it in a way that papered over it, rather than properly 
fixed it based on an understanding of what is going on. It is a truism that 
this sort of issue will come back at some time.


In other words, if you have a problem, debug it until you understand what the 
problem is, and then fix it the right way. Don't paper over it.


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


[deal.II] Easy way to calculate second-deviatoric tensor

2016-10-16 Thread JAEKWANG KIM



Hi, all. 

I am really receiving a lot of help from this group whenever I visit here. 

I have a question today. 


I am developing FEM code for analyzing non-newtonian fluids using deal.ii 
library, which is amazing tool. 

In many cases, I have to calculate 'The second invariant of rate-of-strain 
tensor'. 

I wonder there is a easy way to get this value. 

As in step-20 or other fluid problems, we get rate of strain tensor from 
the rank-2 tensor of symmetrize gradient. 


For example


std::vector > symgrad_phi_u (dofs_per_cell);

.

symgrad_phi_u[k] = fe_values[velocities].symmetric_gradient (k, q)


>From this symmetric gradient tensor, do we have one easy way to calculate 
the following "the second invariant of rate-of-strain tensor"? 





Regards, 

Jaekwang Kim 
 

-- 
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.


[deal.II] Re: How to use Trilinos instead of Petsc in step-40

2016-10-16 Thread Hamed Babaei
Another point I need to mention is that I had the same problem when as my 
first try of parallelization, I paralleled a much simpler code, the 
step-25, based on the step-40 . 
I received the same Segmentation Violation error from Petsc. At that time, 
I replaced PreconditionerAMG with PreconditionerJacobi and the problem 
resolved. 

However, Now even using PreconditionerJacobi can not remedy the issue even 
if it works for very few initial value and boundary conditions.

On Sunday, October 16, 2016 at 10:39:49 AM UTC-5, Daniel Arndt wrote:
>
> In case there is an error with Trilinos, what is it?
>
> Am Sonntag, 16. Oktober 2016 17:27:26 UTC+2 schrieb Daniel Arndt:
>>
>> Hamed,
>>
>>
> It still works with Petsc and Trilinos is not implemented at all. I 
> appreciate it if you could let me know what changes should be made in 
> step-40 to make it work with Trilinos.
>
 What exactly, do you mean by that? So you have both PETSc and Trilinos 
>> installed and step-40 works. Are you saying that PETSc objects are used 
>> even if you use 
>> "using namespace ::LinearAlgebraTrilinos;" ? How did you find out?
>>
>> Best,
>> Daniel
>>
>

-- 
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.


Re: [deal.II] How to addapt MappingQEulerian class for Parallel codes using the PETSc wrapper classes

2016-10-16 Thread Timo Heister
> "To enable the use of the MappingQ1Eulerian class also in the context of
> parallel codes using the PETSc wrapper classes, the type of the vector can
> be specified as template parameter EulerVectorType Not specifying this
> template argument in applications using the PETSc vector classes leads to
> the construction of a copy of the vector which is not accessible
> afterwards!"
> I can't understatnd what it means and what changes I should make.

The class MappingQ1Eulerian has a template argument for the vector
type. You need to set this to be a parallel vector (like
PETScWrappers::MPI::Vector).

-- 
Timo Heister
http://www.math.clemson.edu/~heister/

-- 
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.