HI Animesh,
You forgot to show the most critical part of the error report in
your post: The actual source line that's causing the problem!
Thankfully it was included in the error log that you uploaded.
In file included from
/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc:73:0:
/usr/local/include/deal.II/physics/elasticity/kinematics.h: In
instantiation of ‘dealii::Tensor<2, dim, Number>
dealii::Physics::Elasticity::Kinematics::F_iso(const
dealii::Tensor<2, dim, Number>&) [with int dim = 2;
Number =
Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> >]’:
/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc:1861:90:
required from ‘void Cook_Membrane::Assembler<dim,
Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> >
>::assemble_system_tangent_residual_one_cell(const typename
dealii::DoFHandler<dim>::active_cell_iterator&, typename
Cook_Membrane::Assembler_Base<dim,
Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> > >::ScratchData_ASM&, typename
Cook_Membrane::Assembler_Base<dim,
Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> > >::PerTaskData_ASM&) [with int dim = 2;
typename dealii::DoFHandler<dim>::active_cell_iterator =
dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> >; typename
Cook_Membrane::Assembler_Base<dim,
Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> > >::ScratchData_ASM =
Cook_Membrane::Assembler_Base<2,
Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> > >::ScratchData_ASM; typename
Cook_Membrane::Assembler_Base<dim,
Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> > >::PerTaskData_ASM =
Cook_Membrane::Assembler_Base<2,
Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> > >::PerTaskData_ASM]’
/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc:2325:1:
required from here
/usr/local/include/deal.II/physics/elasticity/kinematics.h:294:47:
error: no match for ‘operator*’ (operand types are
‘Sacado::Fad::Exp::PowerOp<Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> >, double, false, true,
Sacado::Fad::Exp::ExprSpecDefault,
Sacado::Fad::Exp::PowerImpl::Scalar>’ and ‘const
dealii::Tensor<2, 2,
Sacado::Fad::Exp::GeneralFad<Sacado::Fad::Exp::DynamicStorage<double,
double> > >’)
return std::pow(determinant(F), -1.0 / dim) * F;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
What's going on here is that Sacado's implementation of the pow()
function returns a specialised number type that deal.II doesn't
recognise (this Sacado number type uses expression templates, which
means that every operation returns a specialised type, and not the
original AD number type). I guess that we could try to detect this
and implement support in the operator* for Tensors and
SymmetricTensors (and probably in other places in the library), but
this would only be possible if Sacado has some type traits to help
us filter out which of these special numbers are indeed Sacado
types. I'm pretty sure that they do have such traits, but its been
some time since we implemented this so I cannot remember for
certain.
For now,the simple solution would be to cast the LHS value to a
Sacado type. like this:
return SacadoNumberType(std::pow(determinant(F),
-1.0 / dim)) * F;
where SacadoNumberType is some type definition for the Sacado type
that you're using. We certainly have support for premultiplication
of a Tensor<rank, dim, SacadoNumberType> by another
SacadoNumberType.
I hope that this fixes the issue for you.
Best,
Jean-Paul