Re: [deal.II] Massively parallel & inverse matrix solver

2021-09-01 Thread Jean-Paul Pelteret
Dear Hermes,

The equivalent classes to SparseDirectUMFPACK for parallel linear algebra would 
be:
- TrilinosWrappers::SolverDirect 

 : You can choose the implementation through the AdditionalData 

 struct that is passed into the class constructor.
- PETScWrappers::SparseDirectMUMPS 


Best,
Jean-Paul

> On 1. Sep 2021, at 20:10, Daniel Arndt  wrote:
> 
> Hermes,
> 
> The SparseDirectUMFPACK solver doesn't work with MPI parallel matrices. You 
> will need to find another solver based on the matrix class you are using. 
> Standard choices would be GMRES or CG but I am assuming that your linear 
> system might also be non-symmetric or indefinite.
> 
> Best,
> Daniel
> 
> 
> 
> Am Mi., 1. Sept. 2021 um 11:53 Uhr schrieb Hermes Sampedro 
> mailto:hermesampe...@gmail.com>>:
> Dear all,
> 
> I am trying to solve a similar problem as step-29 but including the massive 
> parallel solution as presented in step-40.
> I would like to ask how the solve() function would be in this case.
> 
> In step-29:
> //LU decomposition and inverse matrix
> SparseDirectUMFPACK A_direct;
> A_direct.initialize(system_matrix);
> 
> //Solve with inverse matrix
> A_direct.vmult(solution, system_rhs);
> When applying massive parallel computations, my initial guess was:
> 
> 
> LA::MPI::Vector
> completely_distributed_solution(locally_owned_dofs,mpi_communicator);
> 
> //LU decomposition and inverse matrix
> SparseDirectUMFPACK A_direct;
> A_direct.initialize(system_matrix);
> 
> //Solve with inverse matrix
> A_direct.vmult(completely_distributed_solution, system_rhs);
>  locally_relevant_solution = completely_distributed_solution;
> 
> 
>  However, I get a no matching member function for call to 'vmult' error. 
> 
> How can I use this LU decomposition and inverse matrix solver using MPI?
> 
> 
> 
> Thank you,
> 
> Regards,
> 
> H
> 
> 
> 
> -- 
> 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/ded2e156-7bd7-4474-aa5f-fb57e8540926n%40googlegroups.com
>  
> .
> 
> -- 
> 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/CAOYDWbKG87reQPBrhZu0RwoZHrMXMtVWS9Ui6EoFCWtmemG1vQ%40mail.gmail.com
>  
> .

-- 
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/6B045CAD-E179-4E5F-96B6-2CC00891CA2F%40gmail.com.


Re: [deal.II] Massively parallel & inverse matrix solver

2021-09-01 Thread Hermes Sampedro
Thank you for the answer. I am solving for real and imaginary parts.
What solver would you suggest using? Is it any example in any of the steps?

Thank you
Hermes.

El mié, 1 sept 2021 a las 20:11, Daniel Arndt ()
escribió:

> Hermes,
>
> The SparseDirectUMFPACK solver doesn't work with MPI parallel matrices.
> You will need to find another solver based on the matrix class you are
> using. Standard choices would be GMRES or CG but I am assuming that your
> linear system might also be non-symmetric or indefinite.
>
> Best,
> Daniel
>
>
>
> Am Mi., 1. Sept. 2021 um 11:53 Uhr schrieb Hermes Sampedro <
> hermesampe...@gmail.com>:
>
>> Dear all,
>>
>> I am trying to solve a similar problem as step-29 but including the
>> massive parallel solution as presented in step-40.
>> I would like to ask how the solve() function would be in this case.
>>
>> In step-29:
>> //LU decomposition and inverse matrix
>> SparseDirectUMFPACK A_direct;
>> A_direct.initialize(system_matrix);
>>
>> //Solve with inverse matrix
>> A_direct.vmult(solution, system_rhs);
>>
>> When applying massive parallel computations, my initial guess was:
>>
>> LA::MPI::Vector
>> completely_distributed_solution(locally_owned_dofs,mpi_communicator);
>> //LU decomposition and inverse matrix
>> SparseDirectUMFPACK A_direct;
>> A_direct.initialize(system_matrix);
>>
>> //Solve with inverse matrix
>> A_direct.vmult(completely_distributed_solution, system_rhs);
>>  locally_relevant_solution = completely_distributed_solution;
>>
>>
>>  However, I get a *no matching member function for call to 'vmult'*
>> error.
>>
>> How can I use this LU decomposition and inverse matrix solver using MPI?
>>
>>
>> Thank you,
>>
>> Regards,
>>
>> H
>>
>> --
>> 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/ded2e156-7bd7-4474-aa5f-fb57e8540926n%40googlegroups.com
>> 
>> .
>>
> --
> 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/ul4Aa_5t3n0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/CAOYDWbKG87reQPBrhZu0RwoZHrMXMtVWS9Ui6EoFCWtmemG1vQ%40mail.gmail.com
> 
> .
>

-- 
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/CAB%3DnHhYgcGWSv7aNs-9XzUL1C%3DBVeSFSecCEK1ZXocG-3qP%2B2A%40mail.gmail.com.


Re: [deal.II] Massively parallel & inverse matrix solver

2021-09-01 Thread Daniel Arndt
Hermes,

The SparseDirectUMFPACK solver doesn't work with MPI parallel matrices. You
will need to find another solver based on the matrix class you are using.
Standard choices would be GMRES or CG but I am assuming that your linear
system might also be non-symmetric or indefinite.

Best,
Daniel



Am Mi., 1. Sept. 2021 um 11:53 Uhr schrieb Hermes Sampedro <
hermesampe...@gmail.com>:

> Dear all,
>
> I am trying to solve a similar problem as step-29 but including the
> massive parallel solution as presented in step-40.
> I would like to ask how the solve() function would be in this case.
>
> In step-29:
> //LU decomposition and inverse matrix
> SparseDirectUMFPACK A_direct;
> A_direct.initialize(system_matrix);
>
> //Solve with inverse matrix
> A_direct.vmult(solution, system_rhs);
>
> When applying massive parallel computations, my initial guess was:
>
> LA::MPI::Vector
> completely_distributed_solution(locally_owned_dofs,mpi_communicator);
> //LU decomposition and inverse matrix
> SparseDirectUMFPACK A_direct;
> A_direct.initialize(system_matrix);
>
> //Solve with inverse matrix
> A_direct.vmult(completely_distributed_solution, system_rhs);
>  locally_relevant_solution = completely_distributed_solution;
>
>
>  However, I get a *no matching member function for call to 'vmult'*
> error.
>
> How can I use this LU decomposition and inverse matrix solver using MPI?
>
>
> Thank you,
>
> Regards,
>
> H
>
> --
> 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/ded2e156-7bd7-4474-aa5f-fb57e8540926n%40googlegroups.com
> 
> .
>

-- 
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/CAOYDWbKG87reQPBrhZu0RwoZHrMXMtVWS9Ui6EoFCWtmemG1vQ%40mail.gmail.com.


[deal.II] Massively parallel & inverse matrix solver

2021-09-01 Thread Hermes Sampedro
Dear all,

I am trying to solve a similar problem as step-29 but including the massive 
parallel solution as presented in step-40.
I would like to ask how the solve() function would be in this case.

In step-29:
//LU decomposition and inverse matrix
SparseDirectUMFPACK A_direct;
A_direct.initialize(system_matrix);

//Solve with inverse matrix
A_direct.vmult(solution, system_rhs);

When applying massive parallel computations, my initial guess was:

LA::MPI::Vector
completely_distributed_solution(locally_owned_dofs,mpi_communicator);
//LU decomposition and inverse matrix
SparseDirectUMFPACK A_direct;
A_direct.initialize(system_matrix);

//Solve with inverse matrix
A_direct.vmult(completely_distributed_solution, system_rhs);
 locally_relevant_solution = completely_distributed_solution;


 However, I get a *no matching member function for call to 'vmult'* error. 

How can I use this LU decomposition and inverse matrix solver using MPI?


Thank you,

Regards,

H

-- 
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/ded2e156-7bd7-4474-aa5f-fb57e8540926n%40googlegroups.com.


Re: [deal.II] Coarsening grid from Abaqus imported mesh

2021-09-01 Thread Thang W Pham
Now I understand more about the mechanism of refinement tool with import 
mesh/grid. Thank you for such clear and detailed explanation and the 
suggestion as well.

Regards,
Thang. 

Vào lúc 14:00:30 UTC+9 ngày Thứ Tư, 1 tháng 9, 2021, Jean-Paul Pelteret đã 
viết:

> Dear Truong,
>
> To supplement Bruno’s remarks, and answer this question in particular:
>
>  I guess a procedure like associating the surface boundaries (from meshing 
> software) to the manifolds would also only works for meshing refinement, 
> not for mesh coarsening. 
>
>
> It would work for mesh coarsening as well, but only up to the coarsest 
> mesh that is read into deal.II. So if you do some initial refinement within 
> deal.II itself, then both refinement and subsequent coarsening respect the 
> attached manifold geometries.
>
> The point to be understood is that deal.II does not, and cannot, have any 
> more fundamental knowledge of the discretisation other than what you pass 
> it in the original mesh. It does not know the steps that you took to get 
> that mesh — the underlying CAD geometry, whether the mesh is cartesian or 
> structured, has an even or odd number of divisions on each edge, etc. All 
> of this information, which would be critical to determine how the mesh 
> *might* be coarsened using the child-parent cell approach to adaptivity 
> that deal.II adopts. So one always needs to consider a read in mesh to be 
> “flattened”, i.e. at its coarsest state, and the benefits of mesh 
> adaptivity may then be maximised when the read in grid is as coarse as 
> possible and one is able to produce a satisfactorily refined mesh using the 
> built in refinement tools (and possibly connecting the mesh to a CAD model 
> or manifold geometries to provide information of boundary and interface 
> curvature).
>
> Best,
> Jean-Paul
>
> On 1. Sep 2021, at 03:32, Thang W Pham  wrote:
>
> Thanks for your instant and helpful answer. So, the grid from other mesh 
> generator cannot be made coarser at all. As I referred from step-5 
> tutorial, I guess a procedure like associating the surface boundaries (from 
> meshing software) to the manifolds would also only works for meshing 
> refinement, not for mesh coarsening. 
> Vào lúc 00:09:00 UTC+9 ngày Thứ Tư, 1 tháng 9, 2021, blais...@gmail.com đã 
> viết:
>
>> Dear Truong,
>> My understanding is that the triangulation in deal.II works like a 
>> quad/oct-forest.That is, the mesh that is generated or read serves as the 
>> forest and each cell is a tree. Consequently, it is not possible to coarsen 
>> a mesh more than it's initial configuration.
>>
>> For a lot of meshes generated by deal.II, this is not a problem since 
>> they contain a very low number of cells (for example, a cubic grid has 1 
>> cell in it's coarsest level, hence it is a forest with once tree). However, 
>> if you read your mesh from an external source, you cannot make it coarser 
>> than it is when you have read it.
>>
>> My suggestions would be to make a coarse abacus mesh, then you refine it 
>> within deal.II. This way you would have a coarsest level with as few cell a 
>> possible, then you could refine it adaptively. As far as I know, it is not 
>> possible to coarsen a mesh below it's level 0, because this would imply 
>> "merging cell".
>>
>> I hope that was sufficiently clear.
>> Best of luck!
>> Bruno
>>
>> On Tuesday, August 31, 2021 at 9:26:32 a.m. UTC-4 
>> truongthangp...@gmail.com wrote:
>>
>>> Hello everyone,
>>> I am new to deal.II and I am playing around with the grid of L-shape 
>>> which is imported from Abaqus input file using GridIn::read_abaqus(). The 
>>> grid has been successfully read as well as the boundary indicators ( from 
>>> the surface with the name of "SS1" and "SS2"). However, when I try to do 
>>> coarsening the grid by setting cell->set_coarsen_flag(), nothing happened. 
>>> I also tested with adaptive refinement as in step-6, only a figure of the 
>>> new cell has been generated, none has been coarsened even I set the 
>>> coarsening ratio to high value. 
>>> I wonder what is wrong here or is there something that I misunderstand 
>>> with the code. Thanks in advance. 
>>>
>>> [image: Capture.PNG]
>>> [image: Capture.PNG]
>>>
>>
> -- 
> 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+un...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/c674a25b-0daa-4cdf-bd78-c64a90a5a86fn%40googlegroups.com
>  
> 
> .
>
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see