> 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
This might work, but the scheme is actually supposed to work differently: In your user code, just #include <lac/la_parallel_vector.templates.h> and everything will be instantiated in your user code. > 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()). This seems like we are abusing the real_type for something it wasn't intended to do. Can you open a github issue with the error message you get with the unmodified code? > 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. I suspect that that would be useful in its own right. Can you open an issue or pull request for this as well? > *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. Where exactly is this conversion necessary? 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/efa1f1fd-0609-0dcc-9e1a-476e813d17ee%40colostate.edu.