[deal.II] Instantiation of Vector< Sacado::Fad::DFad >

2019-09-06 Thread Doug
Hello again,

I am trying to instantiate a Vector with an AD type such as Vector< 
Sacado::Fad::DFad > by changing

for (SCALAR : REAL_AND_COMPLEX_SCALARS) to for (SCALAR : ALL_SCALAR_TYPES)

in the instantiation file

dealii/source/lac/la_parallel_vector.inst.in

However, it seems 3 issues come up.

1. I can fix this one, so skip ahead if you want.

A bunch of static/dynamic casting of ADvar(unsigned int) 
through real_type(partitioner->local_size()), but Trilinos doesn't have the 
*unsigned* int. Simply need to cast the unsigned int value to a long before 
casting. For example real_type((long)partitioner->local_size()).

2. I can also fix.

dealii/include/deal.II/base/exceptions.h

Requires the definition of 
   dealii::numbers::is_finite(number)

where I can provide a definition in dealii/include/deal.II/base/numbers.h 
for the AD types.

*3. I don't know how to fix*

std::complex(number) needs to be defined. 

Now, this translates 
to std::complex::complex(Sacado::Rad::ADvar 
>&), which of course doesn't exist.

I understand why it's casting into a complex to ensure that we can use the 
exception for all scalar arguments. But this is limiting the behaviour such 
that I can't use AD types.

Any suggestions about how to go with this?


This is somewhat linked in the grand scheme of things with

https://groups.google.com/forum/#!searchin/dealii/automatic$20differentiation|sort:date/dealii/9YohjQr1aro/QdtzHHoWAwAJ

where the goal will be to automatically differentiate the entire Jacobian 
and the sensitivities of the residual with respect to the grid points.

Best regards,

Doug

-- 
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/48459ebb-b016-4757-be9a-6a4766ad1621%40googlegroups.com.


Re: [deal.II] deal.II Newsletter #92

2019-09-06 Thread Wolfgang Bangerth


I continue to be impressed by the incredible number of patches we 
receive and merge...


On 9/6/19 1:05 PM, Rene Gassmoeller wrote:
> Hello everyone!
> 
> This is deal.II newsletter #92.
> It automatically reports recently merged features and discussions about 
> the deal.II finite element library.
> 
> Below you find a list of recently proposed or merged features:
> 
> #8708 : HDF5 Namespace 
> documentation errors fixed (proposed by jpthiele 
> ; merged)
> #8707 : VectorizedArrary: 
> add a test for std::pow (proposed by tamiko )
> #8706 : FEInterfaceValues: 
> boundary behavior (proposed by tjhei )
> #8705 : 
> Utilities::fixed_power - use exponentiation by squaring (proposed by 
> tamiko ; merged)
> #8704 : Fix undefined 
> references for set_zero_all (proposed by masterleinad 
> ; merged)
> #8703 : Fix compiling with 
> CUDA support (proposed by masterleinad )
> #8702 : list within the 
> documentation of FunctionTime fixed (proposed by rezarastak 
> ; merged)
> #8701 : VectorizedArray: 
> Implement a compare_and_apply_mask function (proposed by tamiko 
> )
> #8700 : VectorizedArray: 
> Some minor doxygen markup improvements (proposed by tamiko 
> ; merged)
> #8699 : 
> GeometryInfo::unit_normal_vector (proposed by rezarastak 
> ; merged)
> #8698 : SIMD: Add std::pow 
> int-exponent variant for vectorized array (proposed by tamiko 
> )
> #8695 : Make 
> hp::FEvaluesBase non-internal. (proposed by drwells 
> ; merged)
> #8694 : Indent a block 
> properly. (proposed by bangerth ; merged)
> #8693 : Reorganize 
> __syncthreads for hanging nodes (proposed by masterleinad 
> ; merged)
> #8692 : Remove outdated 
> documentation on largest allowed number of dofs. (proposed by 
> simonsticko ; merged)
> #8690 : remove unused 
> variable in grid_out.cc (proposed by rezarastak 
> ; merged)
> #8688 : BlockVectorBase::equ 
> with 4 arguments removed (proposed by rezarastak 
> ; merged)
> #8687 : Refactored 
> parallel::CellWeights. (proposed by marcfehling 
> )
> #8686 : step-63: add 
> references (proposed by tjhei ; merged)
> #8681 : Rename variable 
> (proposed by peterrum ; merged)
> #8680 : Fix a bug with cuda 
> and hanging nodes (proposed by Rombur ; merged)
> #8679 : Update 
> PolynomialsBDM degree and pass the degree to the base class constructor 
> (proposed by GrahamBenHarper ; merged)
> #8678 : Change polynomial 
> classes to derive from ScalarPolynomialsBase (proposed by 
> GrahamBenHarper ; merged)
> #8677 : Add another .mailmap 
> entry (proposed by masterleinad ; merged)
> #8676 : Permit 
> reinitialization with iterators instead of (sub)face numbers. (proposed 
> by drwells )
> #8675 : step-63: add DOI and 
> fix authors (proposed by tjhei ; merged)
> #8674 : changelog added for 
> PR #8671 (proposed by rezarastak ; merged)
> #8673 : Constexpr Point 
> [WIP] (proposed by rezarastak )
> #8672 : Introduced 
> 

[deal.II] deal.II Newsletter #92

2019-09-06 Thread Rene Gassmoeller
Hello everyone!

This is deal.II newsletter #92.
It automatically reports recently merged features and discussions about the 
deal.II finite element library.


## Below you find a list of recently proposed or merged features:

#8708: HDF5 Namespace documentation errors fixed (proposed by jpthiele; merged) 
https://github.com/dealii/dealii/pull/8708

#8707: VectorizedArrary: add a test for std::pow (proposed by tamiko) 
https://github.com/dealii/dealii/pull/8707

#8706: FEInterfaceValues: boundary behavior (proposed by tjhei) 
https://github.com/dealii/dealii/pull/8706

#8705: Utilities::fixed_power - use exponentiation by squaring (proposed by 
tamiko; merged) https://github.com/dealii/dealii/pull/8705

#8704: Fix undefined references for set_zero_all (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/8704

#8703: Fix compiling with CUDA support (proposed by masterleinad) 
https://github.com/dealii/dealii/pull/8703

#8702: list within the documentation of FunctionTime fixed (proposed by 
rezarastak; merged) https://github.com/dealii/dealii/pull/8702

#8701: VectorizedArray: Implement a compare_and_apply_mask function (proposed 
by tamiko) https://github.com/dealii/dealii/pull/8701

#8700: VectorizedArray: Some minor doxygen markup improvements (proposed by 
tamiko; merged) https://github.com/dealii/dealii/pull/8700

#8699: GeometryInfo::unit_normal_vector  (proposed by rezarastak; merged) 
https://github.com/dealii/dealii/pull/8699

#8698: SIMD: Add std::pow int-exponent variant for vectorized array (proposed 
by tamiko) https://github.com/dealii/dealii/pull/8698

#8695: Make hp::FEvaluesBase non-internal. (proposed by drwells; merged) 
https://github.com/dealii/dealii/pull/8695

#8694: Indent a block properly. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/8694

#8693: Reorganize __syncthreads for hanging nodes (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/8693

#8692: Remove outdated documentation on largest allowed number of dofs. 
(proposed by simonsticko; merged) https://github.com/dealii/dealii/pull/8692

#8690: remove unused variable in grid_out.cc (proposed by rezarastak; merged) 
https://github.com/dealii/dealii/pull/8690

#8688: BlockVectorBase::equ with 4 arguments removed (proposed by rezarastak; 
merged) https://github.com/dealii/dealii/pull/8688

#8687: Refactored parallel::CellWeights. (proposed by marcfehling) 
https://github.com/dealii/dealii/pull/8687

#8686: step-63: add references (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/8686

#8681: Rename variable (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/8681

#8680: Fix a bug with cuda and hanging nodes (proposed by Rombur; merged) 
https://github.com/dealii/dealii/pull/8680

#8679: Update PolynomialsBDM degree and pass the degree to the base class 
constructor (proposed by GrahamBenHarper; merged) 
https://github.com/dealii/dealii/pull/8679

#8678: Change polynomial classes to derive from ScalarPolynomialsBase (proposed 
by GrahamBenHarper; merged) https://github.com/dealii/dealii/pull/8678

#8677: Add another .mailmap entry (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/8677

#8676: Permit reinitialization with iterators instead of (sub)face numbers. 
(proposed by drwells) https://github.com/dealii/dealii/pull/8676

#8675: step-63: add DOI and fix authors (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/8675

#8674: changelog added for PR #8671 (proposed by rezarastak; merged) 
https://github.com/dealii/dealii/pull/8674

#8673: Constexpr Point [WIP] (proposed by rezarastak) 
https://github.com/dealii/dealii/pull/8673

#8672: Introduced DoFCellAccessor:get_future_fe(). (proposed by marcfehling; 
merged) https://github.com/dealii/dealii/pull/8672

#8671: parameter handling for a couple of classes improved (proposed by 
rezarastak; merged) https://github.com/dealii/dealii/pull/8671

#8670: remove obsolete note in comment of p::d::tria (proposed by tjhei; 
merged) https://github.com/dealii/dealii/pull/8670

#8669: Fix typo in the documentation of Triangulation (proposed by peterrum; 
merged) https://github.com/dealii/dealii/pull/8669

#8668: Split MappingCartesian::compute_fill into several functions. (proposed 
by simonsticko) https://github.com/dealii/dealii/pull/8668

#8667: Doc updates in a variety of places. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/8667

#8666: Several typos in documentation of time_dependent.h fixed (proposed by 
rezarastak; merged) https://github.com/dealii/dealii/pull/8666

#8665: Speed parallel::distributed::Triangulation::add_periodicity up (proposed 
by masterleinad; merged) https://github.com/dealii/dealii/pull/8665

#8664: some doxygen fixes (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/8664

#8663: Rearrange code for better readability. (proposed by bangerth; merged) 

Re: [deal.II] MUMPS with PETScWrappers::MPI::BlockSparseMatrix

2019-09-06 Thread David Wells
Hi Konrad,

I don't think that it is possible to use MUMPS with a block matrix for
exactly this reason. I think that if you want to use MUMPS you will need to
copy the block matrix into a non-block matrix.

Thanks,
David

On Fri, Sep 6, 2019 at 12:25 PM Konrad  wrote:

> Dear deal.ii community,
>
> is it possible to use MUMPS with a PETScWrappers::MPI::BlockSparseMatrix?
> Don't find anything but I see that PETScWrappers::MPI::BlockSparseMatrix
> does not inherit from PETScWrappers::MatrixBase.
>
> 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/290c3820-4c09-4515-a2f9-847691627427%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/CABrTbYSsPwK7WUcUZroMygKuoqszL03X2L53fGXjWVwJs0BWig%40mail.gmail.com.


Re: [deal.II] Poisson equation, implementation of boundary values, mixed finite element, semiconductor devices

2019-09-06 Thread Konrad Wiśniewski
Wolfgang,

thank you very much once again! 
Yes, on the picture is Ex, and potential was exactly as you described. 
Today I was able to correct my calculations. I changed the right hand side 
boundary condition to be only E=0 (what is, I think, physically correct 
thing to do), and after I get the proper shape of a solution I was able to 
deduce where my mistake was. 

It looks like even the writing about a problem on forum is beneficial - it 
somehow structuring the problem. 

Thank you very much for your time! Your advises and answers really helped 
me!

Now I will start to test continuity equation so it is not excluded that I 
will ask for help in the near future on this forum (although I hope it 
won't be necessary :). 

best regards,
Konrad

W dniu czwartek, 5 września 2019 18:40:20 UTC+2 użytkownik Wolfgang 
Bangerth napisał:
>
>
> Konrad, 
>
> > I tried to give some additional constrains for electirc field E (I must 
> admit 
> > that it wasn't good idea) to avoid another unphysical results. General 
> > physical poin of view is that I should have this kind of a situation: 
> > 
> > str.png 
> > 
> > 
> > The Ex in the middle should go from 0 to -1e7 or -1e6 in the middle of 
> device 
> > and then go back to zero 
> > but my results (for Ex) look rather like this: 
> > 
> > results.png 
> > 
> > 
> > Where all Ex values, over all domain is almost -9e7 and it drops a 
> little in 
> > the middle (as it should, but not from such a big value). 
>
> What is it that you show in your figure? The x-component of the electrical 
> field? Can you also show the potential? Recall that the x-component of the 
> electrical field is something like the x-derivative of the potential Phi, 
> so 
> it seems to me like you should have a linearly decreasing potential with a 
> large gradient. Does the potential satisfy the boundary conditions you 
> impose? 
>
>
> > I couldn't find any mistake in my implementation so I've dicided to 
> change 
> > boundary condition to enforce electric filed E to be 0. 
> This is some more general advice: If you get to a situation that you don't 
> understand (electric field looks wrong) and you "fix" it by adding 
> conditions 
> you have no idea whether they are correct/physical/mathematically allowed 
> (adding boundary conditions for E), then in all likelihood you've just 
> added a 
> second bug to the first one. You really should get in the habit of 
> investigating and *understanding* what is going wrong when when something 
> looks odd, rather than *papering over* the issue. In the long run, this 
> will 
> save you time; it will also make you a better programmer and computational 
> scientists if you build a mental toolbox for how to debug problems. 
>
> 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/07ef8e09-1c2c-435d-9ba9-d8d3e95af02b%40googlegroups.com.


[deal.II] MUMPS with PETScWrappers::MPI::BlockSparseMatrix

2019-09-06 Thread Konrad
Dear deal.ii community,

is it possible to use MUMPS with a PETScWrappers::MPI::BlockSparseMatrix? 
Don't find anything but I see that PETScWrappers::MPI::BlockSparseMatrix 
does not inherit from PETScWrappers::MatrixBase.

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/290c3820-4c09-4515-a2f9-847691627427%40googlegroups.com.


Re: [deal.II] step 64 run problem

2019-09-06 Thread Daniel Arndt
Jinhyun,

I cannot reproduce that problem using nvcc-9.0 and deal.II 9.1.1. What
version are you using? Does the code work if you remove that assertion in
the library?

Best,
Daniel

Am Fr., 6. Sept. 2019 um 01:52 Uhr schrieb Jinhyun Choo <
jinhyun.c...@gmail.com>:

> Hello,
>
> I've just complied deal.ii with CUDA and tried to run Step 64.
> Unfortunately, however, I got an error as soon as I ran it. I wonder what
> would be reason(s) for this error: is it due to CUDA? Thank you in advance.
>
> Best,
> Jinhyun
>
>
> --
> 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/3b2bfe7c-05d4-4c4b-bdbd-a5f1dd9a5a7c%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/CAOYDWbLsfONq_k%3DazK2dS24eEaBX6HgbumN%3DddsRpSJ9SpF7-A%40mail.gmail.com.


[deal.II] step-21 and 43

2019-09-06 Thread Lorenzo Campoli
Dear developers, maintainers and users, 

I read step-21 and 43 tutorials which are closer to my task. 

I'd like to ask some guidelines on how to implement a water/oil with 
polymer concentration in that model. We still have two phases, but in the 
water phase there will be two components, aqueous and polymeric. 

Is there any development in this direction? 

Kind regards, 

Lorenzo 

-- 
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/9d0ce338-1562-4a91-82ad-7e0b48a0c18a%40googlegroups.com.


[deal.II] Function parser for tensor function

2019-09-06 Thread Konrad
Dear deal.ii community,

I was wondering if there is a simple way to parse input (e.g., from a 
parameter file) and use it similarly to the FunctionParser class (which 
works for vector valued functions) just for a TensorFunction.

Anyone did that or something similar?

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/4108d4ed-e579-4ca5-967f-3221067e7a3a%40googlegroups.com.