Dear all,
I am trying to solve a poroelastic problem by using a FE_System consisting of FE_Q for displacements, FE_RaviartThomas for velocities and FE_DGQ for pressure and I want to use an academic example to check that the code is correct. This example needs to implement a non-null right-hand-side vector. And here it is my problem, when compiling my code, I obtain an error when defining the local right-hand-side vector.
Here you can see the make error I have obtained:
/home/teresa/dealii/Poroelast_simple/Poroelasticity.cc: In instantiation of ‘void Poroelastic::PoroelasticProblem<dim>::assemble_system() [with int dim = 2]’:
/home/teresa/dealii/Poroelast_simple/Poroelasticity.cc:593:21: required from ‘void Poroelastic::PoroelasticProblem<dim>::run() [with int dim = 2]’
/home/teresa/dealii/Poroelast_simple/Poroelasticity.cc:612:31: required from here
/home/teresa/dealii/Poroelast_simple/Poroelasticity.cc:545:37: error: no match for ‘operator*’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<dealii::Vector<double> > >::value_type {aka dealii::Vector<double>}’ and ‘const dealii::Tensor<1, 2>’)
(disp_rhs_values[q] * phi_i_u - pres_rhs_values[q] * phi_i_p) * fe_values.JxW(q);
^
/home/teresa/dealii/Poroelast_simple/Poroelasticity.cc:545:37: note: candidates are:
In file included from /home/teresa/.local/bin/deal.II/include/deal.II/lac/block_vector_base.h:29:0,
from /home/teresa/.local/bin/deal.II/include/deal.II/lac/block_vector.h:25,
from /home/teresa/dealii/Poroelast_simple/Poroelasticity.cc:30:
/home/teresa/.local/bin/deal.II/include/deal.II/lac/vector.h:478:10: note: template<class Number2> Number dealii::Vector<Number>::operator*(const dealii::Vector<OtherNumber>&) const [with Number2 = Number2; Number = double]
Number operator*(const Vector<Number2> &V) const;
^
/home/teresa/.local/bin/deal.II/include/deal.II/lac/vector.h:478:10: note: template argument deduction/substitution failed:
/home/teresa/dealii/Poroelast_simple/Poroelasticity.cc:545:37: note: ‘const dealii::Tensor<1, 2>’ is not derived from ‘const dealii::Vector<OtherNumber>’
(disp_rhs_values[q] * phi_i_u - pres_rhs_values[q] * phi_i_p) * fe_values.JxW(q);
^
In file included from /home/teresa/.local/bin/deal.II/include/deal.II/base/template_constraints.h:22:0,
from /home/teresa/.local/bin/deal.II/include/deal.II/base/tensor.h:24,
from /home/teresa/.local/bin/deal.II/include/deal.II/base/point.h:23,
from /home/teresa/.local/bin/deal.II/include/deal.II/base/quadrature.h:22,
from /home/teresa/.local/bin/deal.II/include/deal.II/base/quadrature_lib.h:22,
from /home/teresa/dealii/Poroelast_simple/Poroelasticity.cc:25:
/home/teresa/.local/bin/deal.II/include/deal.II/base/complex_overloads.h:41:1: note: template<class T, class U> typename dealii::ProductType<std::complex<_Tp>, std::complex<_Up> >::type dealii::operator*(const std::complex<_Tp>&, const std::complex<_Up>&)
operator*(const std::complex<T> &left, const std::complex<U> &right)
^
Maybe the make error is a key to find the error, but I am unable to understand the problem.
I send attached a simplified version of the code that I am using.
Does anyone know what is the problem?
Thank you in advance.
Best regards,
Teresa.