Re: [deal.II] Re: Some changes in arpack.h (Functionality to compute only eigenvalues)

2021-01-11 Thread Bruno Turcksin
Animesh,

Sorry for the slow reply.

Le lun. 11 janv. 2021 à 12:40, Animesh Rastogi IIT Gandhinagar
 a écrit :
>> Response - I am not using Trilinos vectors. I am using normal BlockVectors 
>> and BlockSparseMatrix from dealii Linear Algebra class. Is it possible for 
>> me to convert my BlockVectors and BlockSparseMatrix to the one from 
>> Trilinos::BlockSparseMatrix and  Trilinos::BlockVectors?

I am afraid you have to do it by hand. My experience with ARPACK was
the same as yours and, because I was already using Trilinos, I decided
to switch to Anasazi and LOBPCG in particular. This is not the only
possibility, you can also use the PETSc/SLEPc stack (this might be
easier for you because deal.II has already wrappers for PETSc and
SLEPc). deal.II does not have a wrapper for SLEPc's LOBPCG but I would
expect something like Jacobi-Davidson or Krylov-Schur to work. Similar
to Trilinos you will need to switch to PETSc vector and matrix.

>> Response - I could not understand when you suggest to drop these files in my 
>> code. Do I need to download these files in my project folder and then 
>> include these files as header files?
These files are really wrappers that should be in deal.II but I
haven't had time to clean them up. So yes, you should take these files
as headers in your project.

>> Response - Could you please let me know which "ASSERT" do you suggest to 
>> remove? Also, what exactly is meant by "don't want to pull more". I did not 
>> understand this part as well. Apologies for too many questions!

That project has its own "ASSERT". If you just copy/paste the file,
you will get an error because ASSERT is not defined. So you should
remove them.

Best,

Bruno

-- 
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/CAGVt9eNBuV_%2BDBou_48kTiBP4VZT67r02ZfvjhvoL1HA7UHd1Q%40mail.gmail.com.


Re: [deal.II] Re: Some changes in arpack.h (Functionality to compute only eigenvalues)

2021-01-11 Thread Animesh Rastogi IIT Gandhinagar
Hi Bruno,

Probably my above message got lost somewhere in the conversations of this 
group. Thought to remind you regarding my query in this thread. Let me know 
if you need more information regarding my queries.

Thanks a lot!

Animesh

On Tuesday, December 29, 2020 at 6:44:35 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Bruno,
>
>
> It's not in deal.II. Anasazi is part of Trilinos. If you are using 
>
>> Trilinos vector, it's pretty straightforward. You just copy the code 
>> from 
>> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/anasazi.templates.hpp
>>  
>> The solver is used here: 
>>
>> https://github.com/ORNL-CEES/mfmg/blob/4026049f0d5e3904562e394954f76cd86aac2ef3/include/mfmg/dealii/amge_host.templates.hpp#L209-L275
>
>
> Response - I am not using Trilinos vectors. I am using normal BlockVectors 
> and BlockSparseMatrix from dealii Linear Algebra class. Is it possible for 
> me to convert my BlockVectors and BlockSparseMatrix to the one from 
> Trilinos::BlockSparseMatrix and  Trilinos::BlockVectors? 
>
>>
>> If you want to use a different kind of vectors, drop these files in 
>> your code 
>> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/multivector.hpp,
>>  
>>
>>
>> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/anasazi_traits.hpp,
>>  
>>
>> and 
>> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/belos_traits.hpp.
>>  
>>
>>
>
> Response - I could not understand when you suggest to drop these files in 
> my code. Do I need to download these files in my project folder and then 
> include these files as header files?  
>
> You will need to remove the ASSERT, if you don't want to pull more 
>> files.
>
>  
> Response - Could you please let me know which "ASSERT" do you suggest to 
> remove? Also, what exactly is meant by "don't want to pull more". I did not 
> understand this part as well. Apologies for too many questions!
>
> Thanks a lot!
>
> Animesh
>

-- 
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/a3be0029-16c6-436d-bc66-44648a716c8bn%40googlegroups.com.


Re: [deal.II] Re: Mean value of component of TrilinosWrappers::MPI::BlockVector

2021-01-11 Thread Wolfgang Bangerth

On 1/11/21 5:18 AM, Konrad Simon wrote:


which is thrown in AffineConstraints::add_line 
 
(see the second assert in line 1826) after being called by 
make_hanging_node_constraints. It seems that deal.ii is trying to setup 
constraints on dofs that are not owned by the MPI process.


That looks like an unrelated error. Can you create a small testcase for this 
issue here?


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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/a17d2d73-69ed-74e1-e7fa-af023692d5ec%40colostate.edu.


Re: [deal.II] Mean value of component of TrilinosWrappers::MPI::BlockVector

2021-01-11 Thread Wolfgang Bangerth

On 1/10/21 12:43 PM, Konrad Simon wrote:

).

Using one MPI rank is fine but if I use more I get the error

"An error occurred in line <666> of file 
 in function
    dealii::TrilinosScalar 
dealii::TrilinosWrappers::MPI::Vector::operator()(dealii::TrilinosWrappers::MPI::Vector::size_type) 
const

The violated condition was:
    false
Additional information:
    You tried to access element 3023 of a distributed vector, but this element 
is not stored on the current processor. Note: There are 4456 elements stored 
on the current processor from within the range 5544 through  but Trilinos 
vectors need not store contiguous ranges on each processor, and not every 
element in this range may in fact be stored locally."


Now, I know what that means. Is there anything I can do? A workaround?


I suspect you are passing a fully distributed vector to that function, but it 
needs to read ghost elements of the vector. Have you tried copying the vector 
into a locally_relevant vector, and passing that to the function in question?


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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/07639eff-1fd9-8173-3597-c468af2e7523%40colostate.edu.


[deal.II] Re: Mean value of component of TrilinosWrappers::MPI::BlockVector

2021-01-11 Thread Konrad Simon
I am pretty sure that this is related to the following problem:

When I try to run AMR with this FESystem (Nedelec-RaviartThomas-DGQ) with 
more than one MPI rank I get this error

"An error occurred in line <1626> of file 
 
in function 
   void 
dealii::AffineConstraints::add_line(dealii::AffineConstraints::size_type)
 
[with number = double; dealii::AffineConstraints::size_type
= unsigned int] 
The violated condition was:  
   line_n != numbers::invalid_size_type 
Additional information:  
   This exception -- which is used in many places in the library -- usually 
indicates that some condition which the author of the code thought must be 
satisfied at a
certain point in an algorithm, is not fulfilled. An example would be that 
the first part of an algorithm sorts elements of an array in ascending 
order, and a second 
part of the algorithm later encounters an element that is not larger than 
the previous one. 

There is usually not very much you can do if you encounter such an 
exception since it indicates an error in deal.II, not in your own program. 
Try to come up with the 
smallest possible program that still demonstrates the error and contact the 
deal.II mailing lists with it to obtain help.
"

which is thrown in AffineConstraints::add_line 

 
(see the second assert in line 1826) after being called by 
make_hanging_node_constraints. It seems that deal.ii is trying to setup 
constraints on dofs that are not owned by the MPI process.

I read a little bit in the discussions referring to Nedelec and refinement 
- seems a difficult issue. Did anyone run into this, too?

Best,
Konrad

-- 
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/a3b92b45-1767-42ee-87ce-3e668a331a93n%40googlegroups.com.