Hello again,

I am trying to instantiate a Vector with an AD type such as Vector< 
Sacado::Fad::DFad<double> > 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<double>(number) needs to be defined. 

Now, this translates 
to std::complex<double>::complex(Sacado::Rad::ADvar<Sacado::Fad::DFad<double> 
>&), 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.

Reply via email to