Re: [deal.II] Condition number and Eigen Values of a Matrix

2020-12-04 Thread Reza Rastak
Thank you so much Jean-Paul. I was able to use 
SolverCG::connect_condition_number_slot() successfully in my code.

Best,
Reza

On Thursday, December 3, 2020 at 10:57:23 AM UTC-8 Jean-Paul Pelteret wrote:

> If it's of any help, our CG and GMRES solvers (and maybe some of the 
> others?) can return the estimated condition number during / after a call 
> to solve().
>
> https://dealii.org/developer/doxygen/deal.II/classSolverCG.html#a52f1fd3d41765ec06d2d0add1a74a37c
>  
> <
> https://dealii.org/developer/doxygen/deal.II/classSolverCG.html#a52f1fd3d41765ec06d2d0add1a74a37c
> >
>
> https://dealii.org/developer/doxygen/deal.II/classSolverGMRES.html#a3025d81c3d7db3e1a1b0114bef794202
>  
> <
> https://dealii.org/developer/doxygen/deal.II/classSolverGMRES.html#a3025d81c3d7db3e1a1b0114bef794202
> >
>
> Jean-Paul
>
> On 03.12.20 05:46, Wolfgang Bangerth wrote:
> > On 12/2/20 9:30 PM, Reza Rastak wrote:
> >>
> >> I am trying to calculate the condition number of a Trilinos Block 
> >> Sparse matrix. Is there an example of that in the documentation that 
> >> you can point me to?
> >
> > No, and that's actually a quite difficult task because you have to 
> > estimate eigenvalues. The easiest way is probably to use the power 
> > iteration and inverse power iteration to estimate largest and smallest 
> > eigenvalues -- see the EigenPower and EigenInverse classes.
> >
> > Best
> >  W.
> >
>
>

-- 
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/9f45c49f-19e4-4a06-85d6-a187e1a9033en%40googlegroups.com.


Re: [deal.II] Strange floating point error

2020-12-04 Thread Wolfgang Bangerth

On 12/4/20 11:44 AM, Corbin Foucart wrote:


Does anyone have any idea

 1. Why this exception occurs only at certain refinement levels?


Floating point exceptions happen when you try to do arithmetic on numbers 
called "signaling NaNs" that are used as "invalid values" and because the 
processor aborts the program when they are used, they're a good way to make 
sure that uninitialized values are never used.


Some compilers/operating systems support them, and others don't, so they are 
not available on every system. That might explain the difference between the 
two systems you are using.


Where the actual exception actually happens in the code is not overly relevant 
-- the question is why you give that function uninitialized memory. So in your 
case, run the program in a debugger like you're already doing. Look at the 
backtrace and go to the last function you were in inside your own program -- 
then inspect the values of all of the arguments you pass to the function being 
called in that place and try to understand why one of these will have these 
NaNs in them.


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/68b2b035-6c8c-8b2c-a43f-93b0537a4c90%40colostate.edu.


Re: [deal.II] Re: Error in Compilation

2020-12-04 Thread Wolfgang Bangerth

On 12/4/20 3:16 AM, pushkar...@gmail.com wrote:
Well that was not a problem it was my silly mistake that I for some reason 
commented out the main() function in hurry and raninto such an error but now I 
encountered other errors while compilation as :


Pushkar,
what is your specific question? Start with reading through the error messages 
(and also the warnings!) top to bottom and address them one-by-one. The 
compiler actually provides you with fairly good descriptions of what is wrong.


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/55d8263f-43d3-256b-f680-bd5db842fef2%40colostate.edu.


Re: [deal.II] Clearing a particle properties without getting properties for each particle

2020-12-04 Thread blais...@gmail.com
Hello Shahab,
I would wait before trying to do some changes. Rene has started looking 
more deeply into the particle structure (see 
: https://github.com/dealii/dealii/pull/11314) and this will, most likely, 
fix your problem.


On Friday, December 4, 2020 at 8:18:11 a.m. UTC-5 shahab.g...@gmail.com 
wrote:

> Not here, but it other functions it would be very useful to be able to map 
> back to the owning particle.
> In fact, I have to treat local and ghost particles differently. In terms 
> of updating properties, I only need to update the properties of local 
> particles. When the maximum displacement of a particles reaches half of the 
> cell length in the triangulation, I call 
> sort_particles_into_subdomains_and_cells() to update the list of local and 
> ghost particles. I can explain the algorithm in more details if you want.
> Thanks again.
> Shahab
>
> On Thursday, December 3, 2020 at 10:54:42 PM UTC-5 Wolfgang Bangerth wrote:
>
>> On 12/3/20 4:13 PM, shahab.g...@gmail.com wrote:
>> > I want to iterate through all the particles in each iteration of my 
>> solver and 
>> > update some of the properties. The problem is iterating through 
>> particles 
>> > using particle_handler() is rather computationally expensive. I am 
>> looking for 
>> > a way to update the properties without iterating through the 
>> particle_handler.
>>
>> I see.
>>
>> So you'd need to iterate through the the blocks of properties stored in 
>> the 
>> PropertyPool? We could write such an interface, but let me ask a couple 
>> of 
>> questions first:
>> * Do you need to map back from block of memory to the owning particle?
>> * Will you somehow need to treat ghost particles differently than the 
>> locally 
>> owned ones? How will you make sure that locally owned particles on one 
>> processor stay in sync with the corresponding ghost particles on the 
>> other 
>> processor(s)?
>>
>> Best
>> W.
>>
>> -- 
>> 
>> Wolfgang Bangerth email: bang...@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/5e92a68f-bd8c-4877-bfad-047b8a4fc86cn%40googlegroups.com.


[deal.II] Re: Error in Compilation

2020-12-04 Thread Bruno Turcksin
Pushkar,

Have you done any modifications to step-26?

Best,

Bruno

On Friday, December 4, 2020 at 5:16:15 AM UTC-5 pushkar...@gmail.com wrote:

> Well that was not a problem it was my silly mistake that I for some reason 
> commented out the main() function in hurry and raninto such an error but 
> now I encountered other errors while compilation as :
>
> [ 50%] Building CXX object CMakeFiles/step-26.dir/step-26.cc.o
> In file included from 
> /home/pushkar/examples/step-26/point_comparison_operator.h:8,
>  from /home/pushkar/examples/step-26/step-26.cc:52:
> /usr/local/include/deal.II/base/tensor_base.h:3:2: warning: #warning This 
> file is deprecated. Use  instead. [-Wcpp]
> 3 | #warning This file is deprecated. Use  
> instead.
>   |  ^~~
> /home/pushkar/examples/step-26/step-26.cc: In instantiation of 
> ‘Step26::HeatEquation::HeatEquation() [with int dim = 2]’:
> /home/pushkar/examples/step-26/step-26.cc:1023:23:   required from here
> /home/pushkar/examples/step-26/step-26.cc:108:23: warning: 
> ‘Step26::HeatEquation<2>::quadrature_collection’ will be initialized after 
> [-Wreorder]
>   108 | Quadrature   quadrature_collection;
>   |   ^
> /home/pushkar/examples/step-26/step-26.cc:107:26: warning:   
> ‘dealii::hp::DoFHandler<2, 2> Step26::HeatEquation<2>::dof_handler’ 
> [-Wreorder]
>   107 | hp::DoFHandler  dof_handler;
>   |  ^~~
> /home/pushkar/examples/step-26/step-26.cc:201:3: warning:   when 
> initialized here [-Wreorder]
>   201 |   HeatEquation::HeatEquation ()
>   |   ^
> /home/pushkar/examples/step-26/step-26.cc:132:20: warning: 
> ‘Step26::HeatEquation<2>::heat_conductivity’ will be initialized after 
> [-Wreorder]
>   132 | const double   heat_conductivity;
>   |^
> /home/pushkar/examples/step-26/step-26.cc:109:26: warning:   
> ‘dealii::Quadrature<1> Step26::HeatEquation<2>::face_quadrature_collection’ 
> [-Wreorder]
>   109 | Quadratureface_quadrature_collection;
>   |  ^~
> /home/pushkar/examples/step-26/step-26.cc:201:3: warning:   when 
> initialized here [-Wreorder]
>   201 |   HeatEquation::HeatEquation ()
>   |   ^
> /home/pushkar/examples/step-26/step-26.cc:201:3: error: uninitialized 
> const member in ‘const double’ [-fpermissive]
> /home/pushkar/examples/step-26/step-26.cc:135:21: note: ‘const double 
> Step26::HeatEquation<2>::part_height’ should be initialized
>   135 | const doublepart_height;
>   | ^~~
> /home/pushkar/examples/step-26/step-26.cc: In instantiation of ‘void 
> Step26::HeatEquation::run() [with int dim = 2]’:
> /home/pushkar/examples/step-26/step-26.cc:1024:32:   required from here
> /home/pushkar/examples/step-26/step-26.cc:796:24: error: no matching 
> function for call to ‘project(dealii::hp::DoFHandler<2, 2>&, 
> dealii::ConstraintMatrix&, dealii::Quadrature<2>&, 
> Step26::InitialCondition<2>&, dealii::Vector&, bool, 
> dealii::Quadrature<1>&)’
>   796 |VectorTools::project(dof_handler,
>   |^
>   797 |constraints,
>   |
>   798 |  quadrature_collection,
>   |  ~~
>   799 |  initial_condition,
>   |  ~~
>   800 |  old_solution,
>   |  ~  
>   801 |  false,
>   |  ~~ 
>   802 |  face_quadrature_collection);
>   |  ~~~
> In file included from /home/pushkar/examples/step-26/step-26.cc:44:
> /usr/local/include/deal.II/numerics/vector_tools.h:813:8: note: candidate: 
> ‘template void 
> dealii::VectorTools::project(const dealii::Mapping&, const 
> dealii::DoFHandler&, const dealii::ConstraintMatrix&, const 
> dealii::Quadrature&, const dealii::Function VectorType::value_type>&, VectorType&, bool, const dealii::Quadrature<(dim 
> - 1)>&, bool)’
>   813 |   void project (const Mapping,
>   |^~~
> /usr/local/include/deal.II/numerics/vector_tools.h:813:8: note:   template 
> argument deduction/substitution failed:
> /home/pushkar/examples/step-26/step-26.cc:796:24: note:   
> ‘dealii::hp::DoFHandler<2, 2>’ is not derived from ‘const 
> dealii::Mapping’
>   796 |VectorTools::project(dof_handler,
>   |^
>   797 |constraints,
>   |
>   798 |  quadrature_collection,
>   |  ~~
>   799 |  initial_condition,
>   |  ~~
>   800 |  old_solution,
>   |  ~  
>   801 |  false,
>   |  ~~ 
>   802 |  face_quadrature_collection);
>   |  

Re: [deal.II] Clearing a particle properties without getting properties for each particle

2020-12-04 Thread shahab.g...@gmail.com
Not here, but it other functions it would be very useful to be able to map 
back to the owning particle.
In fact, I have to treat local and ghost particles differently. In terms of 
updating properties, I only need to update the properties of local 
particles. When the maximum displacement of a particles reaches half of the 
cell length in the triangulation, I call 
sort_particles_into_subdomains_and_cells() to update the list of local and 
ghost particles. I can explain the algorithm in more details if you want.
Thanks again.
Shahab

On Thursday, December 3, 2020 at 10:54:42 PM UTC-5 Wolfgang Bangerth wrote:

> On 12/3/20 4:13 PM, shahab.g...@gmail.com wrote:
> > I want to iterate through all the particles in each iteration of my 
> solver and 
> > update some of the properties. The problem is iterating through 
> particles 
> > using particle_handler() is rather computationally expensive. I am 
> looking for 
> > a way to update the properties without iterating through the 
> particle_handler.
>
> I see.
>
> So you'd need to iterate through the the blocks of properties stored in 
> the 
> PropertyPool? We could write such an interface, but let me ask a couple of 
> questions first:
> * Do you need to map back from block of memory to the owning particle?
> * Will you somehow need to treat ghost particles differently than the 
> locally 
> owned ones? How will you make sure that locally owned particles on one 
> processor stay in sync with the corresponding ghost particles on the other 
> processor(s)?
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@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/2796d59e-3e02-4888-91d5-2b9dc148ec5en%40googlegroups.com.


[deal.II] Re: Error in Compilation

2020-12-04 Thread pushkar...@gmail.com
Well that was not a problem it was my silly mistake that I for some reason 
commented out the main() function in hurry and raninto such an error but 
now I encountered other errors while compilation as :

[ 50%] Building CXX object CMakeFiles/step-26.dir/step-26.cc.o
In file included from 
/home/pushkar/examples/step-26/point_comparison_operator.h:8,
 from /home/pushkar/examples/step-26/step-26.cc:52:
/usr/local/include/deal.II/base/tensor_base.h:3:2: warning: #warning This 
file is deprecated. Use  instead. [-Wcpp]
3 | #warning This file is deprecated. Use  
instead.
  |  ^~~
/home/pushkar/examples/step-26/step-26.cc: In instantiation of 
‘Step26::HeatEquation::HeatEquation() [with int dim = 2]’:
/home/pushkar/examples/step-26/step-26.cc:1023:23:   required from here
/home/pushkar/examples/step-26/step-26.cc:108:23: warning: 
‘Step26::HeatEquation<2>::quadrature_collection’ will be initialized after 
[-Wreorder]
  108 | Quadrature   quadrature_collection;
  |   ^
/home/pushkar/examples/step-26/step-26.cc:107:26: warning:   
‘dealii::hp::DoFHandler<2, 2> Step26::HeatEquation<2>::dof_handler’ 
[-Wreorder]
  107 | hp::DoFHandler  dof_handler;
  |  ^~~
/home/pushkar/examples/step-26/step-26.cc:201:3: warning:   when 
initialized here [-Wreorder]
  201 |   HeatEquation::HeatEquation ()
  |   ^
/home/pushkar/examples/step-26/step-26.cc:132:20: warning: 
‘Step26::HeatEquation<2>::heat_conductivity’ will be initialized after 
[-Wreorder]
  132 | const double   heat_conductivity;
  |^
/home/pushkar/examples/step-26/step-26.cc:109:26: warning:   
‘dealii::Quadrature<1> Step26::HeatEquation<2>::face_quadrature_collection’ 
[-Wreorder]
  109 | Quadratureface_quadrature_collection;
  |  ^~
/home/pushkar/examples/step-26/step-26.cc:201:3: warning:   when 
initialized here [-Wreorder]
  201 |   HeatEquation::HeatEquation ()
  |   ^
/home/pushkar/examples/step-26/step-26.cc:201:3: error: uninitialized const 
member in ‘const double’ [-fpermissive]
/home/pushkar/examples/step-26/step-26.cc:135:21: note: ‘const double 
Step26::HeatEquation<2>::part_height’ should be initialized
  135 | const doublepart_height;
  | ^~~
/home/pushkar/examples/step-26/step-26.cc: In instantiation of ‘void 
Step26::HeatEquation::run() [with int dim = 2]’:
/home/pushkar/examples/step-26/step-26.cc:1024:32:   required from here
/home/pushkar/examples/step-26/step-26.cc:796:24: error: no matching 
function for call to ‘project(dealii::hp::DoFHandler<2, 2>&, 
dealii::ConstraintMatrix&, dealii::Quadrature<2>&, 
Step26::InitialCondition<2>&, dealii::Vector&, bool, 
dealii::Quadrature<1>&)’
  796 |VectorTools::project(dof_handler,
  |^
  797 |constraints,
  |
  798 |  quadrature_collection,
  |  ~~
  799 |  initial_condition,
  |  ~~
  800 |  old_solution,
  |  ~  
  801 |  false,
  |  ~~ 
  802 |  face_quadrature_collection);
  |  ~~~
In file included from /home/pushkar/examples/step-26/step-26.cc:44:
/usr/local/include/deal.II/numerics/vector_tools.h:813:8: note: candidate: 
‘template void 
dealii::VectorTools::project(const dealii::Mapping&, const 
dealii::DoFHandler&, const dealii::ConstraintMatrix&, const 
dealii::Quadrature&, const dealii::Function&, VectorType&, bool, const dealii::Quadrature<(dim 
- 1)>&, bool)’
  813 |   void project (const Mapping,
  |^~~
/usr/local/include/deal.II/numerics/vector_tools.h:813:8: note:   template 
argument deduction/substitution failed:
/home/pushkar/examples/step-26/step-26.cc:796:24: note:   
‘dealii::hp::DoFHandler<2, 2>’ is not derived from ‘const 
dealii::Mapping’
  796 |VectorTools::project(dof_handler,
  |^
  797 |constraints,
  |
  798 |  quadrature_collection,
  |  ~~
  799 |  initial_condition,
  |  ~~
  800 |  old_solution,
  |  ~  
  801 |  false,
  |  ~~ 
  802 |  face_quadrature_collection);
  |  ~~~
In file included from /home/pushkar/examples/step-26/step-26.cc:44:
/usr/local/include/deal.II/numerics/vector_tools.h:830:8: note: candidate: 
‘template void 
dealii::VectorTools::project(const dealii::DoFHandler&, 
const dealii::ConstraintMatrix&, const dealii::Quadrature&, const 
dealii::Function&, VectorType&, 
bool, const 

[deal.II] Error in Compilation

2020-12-04 Thread pushkar...@gmail.com
Dear deal.II community,

I ran into error while compilation which I am not able to decipher in which 
case I look forward to your help . The output I encountered on executing 
"make all" : 

15:24:23  Build of project step-26-Debug@step-26 
/usr/bin/make all 
/snap/cmake/715/bin/cmake -S/home/pushkar/examples/step-26 
-B/home/pushkar/examples/step-26 --check-build-system 
CMakeFiles/Makefile.cmake 0
/snap/cmake/715/bin/cmake -E cmake_progress_start 
/home/pushkar/examples/step-26/CMakeFiles 
/home/pushkar/examples/step-26//CMakeFiles/progress.marks
/usr/bin/make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/pushkar/examples/step-26'
/usr/bin/make  -f CMakeFiles/step-26.dir/build.make 
CMakeFiles/step-26.dir/depend
make[2]: Entering directory '/home/pushkar/examples/step-26'
cd /home/pushkar/examples/step-26 && /snap/cmake/715/bin/cmake -E 
cmake_depends "Unix Makefiles" /home/pushkar/examples/step-26 
/home/pushkar/examples/step-26 /home/pushkar/examples/step-26 
/home/pushkar/examples/step-26 
/home/pushkar/examples/step-26/CMakeFiles/step-26.dir/DependInfo.cmake 
--color=
make[2]: Leaving directory '/home/pushkar/examples/step-26'
/usr/bin/make  -f CMakeFiles/step-26.dir/build.make 
CMakeFiles/step-26.dir/build
make[2]: Entering directory '/home/pushkar/examples/step-26'
[ 50%] Linking CXX executable step-26
/snap/cmake/715/bin/cmake -E cmake_link_script 
CMakeFiles/step-26.dir/link.txt --verbose=1
/usr/bin/c++ -rdynamic  -rdynamic -fuse-ld=gold -pthread -ggdb 
CMakeFiles/step-26.dir/step-26.cc.o -o step-26  -Wl,-rpath,/usr/local/lib 
/usr/local/lib/libdeal_II.g.so.9.0.0 -lpthread -lm -ldl -lopenblas 
-lgfortran -lquadmath -lm -lc -lgcc_s -lgcc -ldl -lz -lrt 
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o:function 
_start: error: undefined reference to 'main'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/step-26.dir/build.make:106: step-26] Error 1
make[1]: *** [CMakeFiles/Makefile2:183: CMakeFiles/step-26.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
make[2]: Leaving directory '/home/pushkar/examples/step-26'
make[1]: Leaving directory '/home/pushkar/examples/step-26'
"/usr/bin/make all" terminated with exit code 2. Build might be incomplete.

15:24:23 Build Failed. 3 errors, 0 warnings. (took 615ms)

Any help in this regard will be beneficial

Regards
Pushkar

-- 
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/72bfcdd4-ba69-4cb4-a1d9-6627c26874dbn%40googlegroups.com.