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

2016-10-14 Thread Hamed Babaei
Hi friends,

I want to use Trilinos instead of Petsc in my parallel code which is based 
on step-40. I guess some changes should be made in the following lines of 
the include files part:

namespace LA
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && 
defined(FORCE_USE_OF_TRILINOS))
using namespace ::LinearAlgebraPETSc 
;
# define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
using namespace ::LinearAlgebraTrilinos 

;
#else
# error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}

My problem is even if I replace the above lines with the following:

namespace LA
{
using namespace ::LinearAlgebraTrilinos 

;
}

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.

Thanks,
Hamed

-- 
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] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-10-14 Thread Wolfgang Bangerth

On 10/14/2016 12:45 PM, Timo Heister wrote:

Documentation in the include part says : " uncomment the following #define
> if you have PETSc and Trilinos installed and you prefer using Trilinos in
> this example: #define FORCE_USE_OF_TRILINOS"
> I can't understand what it means by the change in the following part:

You only need to change that one line. The logic below is a bit
complicated because it will use PETSc (if available), otherwise
Trilinos (if available). The order is reversed if you uncomment the
line above.


Timo -- I think what confused the reporter was that the comment says 
"uncomment the following #define", but there is just an #if and a complicated 
one to boot. Maybe ought to update the comment -- I think I recall the #if 
having become significantly more complicated recently.


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.


Re: [deal.II] DWARF version?

2016-10-14 Thread Timo Heister
> The cmake aborts somewhere and I was trying to figure out where. I’m 
> attaching the log and the output.

What is the output to the terminal before it aborts?

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


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

2016-10-14 Thread Jean-Paul Pelteret
Hi Hamad,

Can you please tell us which version of deal.II you are using, and provide 
us with the installation logs?

Regards,
J-P

On Friday, October 14, 2016 at 11:51:09 PM UTC+2, Hamed Babaei wrote:
>
> Hi friends,
>
> I want to use Trilinos instead of Petsc in my parallel code which is based 
> on step-40. I guess some changes should be made in the following lines of 
> the include files part:
>
> namespace LA
> {
> #if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && 
> defined(FORCE_USE_OF_TRILINOS))
> using namespace ::LinearAlgebraPETSc 
> 
> ;
> # define USE_PETSC_LA
> #elif defined(DEAL_II_WITH_TRILINOS)
> using namespace ::LinearAlgebraTrilinos 
> 
> ;
> #else
> # error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
> #endif
> }
>
> My problem is even if I replace the above lines with the following:
>
> namespace LA
> {
> using namespace ::LinearAlgebraTrilinos 
> 
> ;
> }
>
> 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.
>
> Thanks,
> Hamed
>

-- 
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: Solution Components of a Vector valued problem

2016-10-14 Thread Lisa Collins
Hallo,
Thanks for both replies.
In general, from a solution vector, how can I extract u_x, u_y, and T nodal 
values corresponding to a specific node?
Best regards.
Lisa

On Thursday, October 13, 2016 at 1:05:08 PM UTC+2, Lisa Collins wrote:
>
> Hello,
>
> Dealing with vector valued problems in deal ii is a bit confusing for me.
> I have a question regarding the solution vector (S).
> If we have a problem with 20 nodes and 3 dofs per node (u_x , u_y , and T 
> temperature) can we always say that:
>
> S[0] = u_x of node A
> S[1] = u_y of node A
> S[2] = T of node A
>
> S[3] = u_x of node B
> S[4] = u_y of node B
> S[5] = T of node B
>
> and so on.
>
> Thanks.
> Lisa
>

-- 
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] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-10-14 Thread Hamed Babaei
Hi Daniel,

I hope you are doing well. I've been struggling to run step-40 using 
Trilinos instead of Petsc. 
I appreciate it if you could let me know which parts of the code should be 
changed and how.

Documentation in the include part says : " uncomment the following #define 
if you have PETSc and Trilinos installed and you prefer using Trilinos in 
this example: #define FORCE_USE_OF_TRILINOS"
I can't understand what it means by the change in the following part:

namespace LA
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && 
defined(FORCE_USE_OF_TRILINOS))
using namespace ::LinearAlgebraPETSc 
;
# define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
using namespace ::LinearAlgebraTrilinos 

;
#else
# error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}

Thanks

On Monday, July 4, 2016 at 5:00:51 PM UTC-5, Daniel Arndt wrote:
>
> Ehsan,
>
> All I can say: After switching the order of arguments in 
> SparseMatrix::add, your code runs for me with a recent developer version 
> and Trilinos at least.
>
> Best,
> Daniel
>
> Am Montag, 4. Juli 2016 18:59:05 UTC+2 schrieb Ehsan Esfahani:
>>
>> Dear Professor Bangerth,
>>
>> Thanks for your response. Yes, I did. As I mentioned, I got a backtrace 
>> in the debugger (eclipse) and I find out that the problem is in the line I 
>> have mentioned but I couldn't find out what's the problem in that line of 
>> the code which causes segmentation violation.
>>
>> Best,
>> Ehsan
>>
>>
>> On Sunday, July 3, 2016 at 4:32:16 PM UTC-5, bangerth wrote:
>>>
>>> On 07/03/2016 03:50 PM, Ehsan Esfahani wrote: 
>>> > Dear All, 
>>> > 
>>> > Greetings. I changed step-25 (minor changes) in order to solve my 
>>> problem. Now 
>>> > I want to change this code for parallel computation based on the 
>>> method 
>>> > mentioned in step-40. I got several errors and solved them one by one 
>>> but the 
>>> > following error: 
>>> > 
>>> > /Number of active cells: 1024 
>>> > //   Total number of cells: 1365 
>>> > //{[0,4224]}// 
>>> > //Time step #1; advancing to t = 0.1. 
>>>  > [...] 
>>> > //[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation 
>>> Violation, 
>>> > probably memory access out of range 
>>>  > [...] 
>>> > 
>>> > / 
>>> > / 
>>> > Eclipse gives me a backtrace in the following line of the code: 
>>> > /solver.solve (system_matrix, 
>>> completely_distributed_solution_update, 
>>> > system_rhs,/ 
>>> > /  preconditioner);/ 
>>> > I have no idea why I got this error. The code is running properly for 
>>> /fe(1) 
>>> > /and /n_global_refinements (4)/ but when I change them to /fe(2)/ and 
>>> > n_global_refinments (4) I got that error related to /Segmentation 
>>> Violation. 
>>> > /Do you know what's going on? Also, I have attached the code here . 
>>> Thanks in 
>>> > advance for your help. 
>>>
>>> Ehsan, 
>>>
>>> segmentation violations (SEGV) are typically easy to debug because you 
>>> can get 
>>> a backtrave in the debugger of the exact place where it happens, and you 
>>> can 
>>> then look at the local variables to see why this may have happened. Have 
>>> you 
>>> tried to run the program in a debugger and see what is going on? 
>>>
>>> Best 
>>>   W. 
>>>
>>> -- 
>>>  
>>> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>>>  www: 
>>> http://www.math.tamu.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.


Re: [deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-10-14 Thread Timo Heister
> Documentation in the include part says : " uncomment the following #define
> if you have PETSc and Trilinos installed and you prefer using Trilinos in
> this example: #define FORCE_USE_OF_TRILINOS"
> I can't understand what it means by the change in the following part:

You only need to change that one line. The logic below is a bit
complicated because it will use PETSc (if available), otherwise
Trilinos (if available). The order is reversed if you uncomment the
line above.


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