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

2016-10-16 Thread Jean-Paul Pelteret
For later reference, this conversation has now been moved to this thread 
.

On Friday, October 14, 2016 at 6:01:22 PM UTC+2, Hamed Babaei wrote:
>
> 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] 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] Problem with PETScWrappers::SolverCG

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 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] Problem with PETScWrappers::SolverCG

2016-10-16 Thread Hamed Babaei
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.
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 

namespace LA
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
  using namespace dealii::LinearAlgebraPETSc;
#  define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
  using namespace dealii::LinearAlgebraTrilinos;
#else
#  error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 

#include 
#include 

#include 
#include 
//
namespace PhaseField
{
  using namespace dealii;
// INPUT OF PARAMETERS
  namespace Parameters
  {
struct FESystem
{
  unsigned int poly_degree;
  unsigned int quad_order;
  static void
  declare_parameters(ParameterHandler &prm);

  void
  parse_parameters(ParameterHandler &prm);
};

void FESystem::declare_parameters(ParameterHandler &prm)
{
  prm.enter_subsection("Finite element system");
  {
prm.declare_entry("Polynomial degree", "1",
  Patterns::Integer(0),
  "Displacement system polynomial order");
prm.declare_entry("Quadrature order", "2",
  Patterns::Integer(0),
  "Gauss quadrature order");
  }
  prm.leave_subsection();
}

void FESystem::parse_parameters(ParameterHandler &prm)
{
  prm.enter_subsection("Finite element system");
  {
poly_degree = prm.get_integer("Polynomial degree");
quad_order = prm.get_integer("Quadrature order");
  }
  prm.leave_subsection();
}

struct Geometry
{
  unsigned int refinement;
  double   scale;
  static void
  declare_parameters(ParameterHandler &prm);
  void
  parse_parameters(ParameterHandler &prm);
};
void Geometry::declare_parameters(ParameterHandler &prm)
{
  prm.enter_subsection("Geometry");
  {
prm.declare_entry("Global refinement", "4",
Patterns::Integer(0),
  "Global refinement level");
prm.declare_entry("Grid scale", "1e-9",
  Patterns::Double(0.0),
  "Global grid scaling factor");
  }
  prm.leave_subsection();
}
void Geometry::parse_parameters(ParameterHandler &prm)
{
  prm.enter_subsection("Geometry");
  {
	refinement = prm.get_integer("Global refinement");
scale = prm.get_double("Grid scale");
  }
  prm.leave_subsection();
}

 /
struct Materials
{
  double lambda0; // austenite phase
  double mu0; // austenite phase
  double lambda1;  // martensite phase
  double mu1;  // martensite phase
  double L;// interface mobility
  double beta; // gradient energy coefficient
  double A0;   // parameter for barrier height
  double theta;// temperature
  double thetac;   // critical temperature
  double thetae;   // equilibrium temperature
  double thetan;   // Crank-Nicolson parameter

  static void
  declare_parameters(ParameterHandler &prm);
  void
  parse_parameters(ParameterHandler &prm);
  

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

2016-10-16 Thread Hamed Babaei
Even if I implement Trilinos It terminates with the following Petsc error: 

"PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, 
probably memory access out of range"

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.


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

2016-10-16 Thread Hamed Babaei
Daniel,

Let me explain the problem more. I heve parallelized a code based on 
step-40. The non-parallel code works for all the initial values and 
boundary conditions But the parallel one fails at the first call to 
solverCG with this error:  "[0]PETSC ERROR: Caught signal number 11 SEGV: 
Segmentation Violation, probably memory access out of range" and the same 
story when I run the code on cluster.

For a couple of specific boundary conditions and initial values the problem 
resolves when I just replace the PreconditioerAMG with PreconditionerJacobi 
!! 
I feel the problem is with Petsc solver, that's why I want to examine if 
the code works with Trilinos. But I failed to implement trilinos as I 
mentioned previously.

I am submitting my code along with a Parameter.prm file which includes all 
the parameters of the code. 

I appreciate if you could run the code on your machine and see if you can 
find out what's wrong with it.

Thanks

For example the following is the number of SolverCG iteration for the 20 
Newoton-Raphson iterations after which   

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

#include 

namespace LA
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
  using namespace dealii::LinearAlgebraPETSc;
#  define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
  using namespace dealii::LinearAlgebraTrilinos;
#else
#  error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 

#include 
#include 

#include 
#include 
//
namespace PhaseField
{
  using namespace dealii;
// INPUT OF PARAMETERS
  namespace Parameters
  {
struct FESystem
{
  unsigned int poly_degree;
  unsigned int quad_order;
  static void
  declare_parameters(ParameterHandler &prm);

  void
  parse_parameters(ParameterHandler &prm);
};

void FESystem::declare_parameters(ParameterHandler &prm)
{
  prm.enter_subsection("Finite element system");
  {
prm.declare_entry("Polynomial degree", "1",
  Patterns::Integer(0),
  "Displacement system polynomial order");
prm.declare_entry("Quadrature order", "2",
  Patterns::Integer(0),
  "Gauss quadrature order");
  }
  prm.leave_subsection();
}

void FESystem::parse_parameters(ParameterHandler &prm)
{
  prm.enter_subsection("Finite element system");
  {
poly_degree = prm.get_integer("Polynomial degree");
quad_order = prm.get_integer("Quadrature order");
  }
  prm.leave_subsection();
}

struct Geometry
{
  unsigned int refinement;
  double   scale;
  static void
  declare_parameters(ParameterHandler &prm);
  void
  parse_parameters(ParameterHandler &prm);
};
void Geometry::declare_parameters(ParameterHandler &prm)
{
  prm.enter_subsection("Geometry");
  {
prm.declare_entry("Global refinement", "4",
Patterns::Integer(0),
  "Global refinement level");
prm.declare_entry("Grid scale", "1e-9",
  Patterns::Double(0.0),
  "Global grid scaling factor");
  

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

2016-10-16 Thread Hamed Babaei
Timo,

Thank you for your prompt reply which resolved my problem.

On Sunday, October 16, 2016 at 7:58:40 AM UTC-5, Timo Heister wrote:
>
> > "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.


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

2016-10-16 Thread Daniel Arndt
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.


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

2016-10-16 Thread 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.


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

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

2016-10-16 Thread Timo Heister
> 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.

I don't understand what you mean by "there is just an #if". This is
the block we are talking about:

// 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 don't know how to make that more clear: just uncomment the #define.

We could think about moving the block below into a deal.II header
though, so people won't try to mess with it.

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