Hello everyone.
I am trying to solve elasticity and laplace (damage) equations in the same program. The rhs of laplace equation depends on the elasticity solution vector. Both equations have already been solved in step3 and 8. I am following the same approach. I am creating my objects (like triangulation_elasticity, fe_elasticity,dof_handler_elasticity) for elasticity as in step8 and solving the elasticity equation. Everything works fine till this point.
Then I tried to solve the laplace equation using the elasticity solution. I followed step 3 approach and created the corresponding objects(triangulation_damage, fe_damage,dof_handler_damage).
However, I am getting the following error:
An error occurred in line <4310> of file </home/wasim/dealii-candi/tmp/unpack/deal.II-v9.4.0/source/fe/fe_values.cc> in function
void dealii::FEValues<dim, spacedim>::reinit(const dealii::TriaIterator<dealii::DoFCellAccessor<dim, spacedim, lda> >&) [with bool level_dof_access = false; int dim = 2; int spacedim = 2]
The violated condition was:
static_cast<const FiniteElementData<dim> &>(*this->fe) == static_cast<const FiniteElementData<dim> &>(cell->get_fe())
Additional information:
The FiniteElement you provided to FEValues and the FiniteElement that
belongs to the DoFHandler that provided the cell iterator do not
match.
Stacktrace:
-----------
#0 /home/wasim/dealii-candi/deal.II-v9.4.0/lib/libdeal_II.g.so.9.4.0: void dealii::FEValues<2, 2>::reinit<false>(dealii::TriaIterator<dealii::DoFCellAccessor<2, 2, false> > const&)
#1 ./step-200: float step200::PhaseField::H_plus<dealii::TriaActiveIterator<dealii::DoFCellAccessor<2, 2, false> > >(dealii::Vector<double>, dealii::TriaActiveIterator<dealii::DoFCellAccessor<2, 2, false> >, unsigned int)
#2 ./step-200: step200::PhaseField::assemble_system_damage()
#3 ./step-200: step200::PhaseField::damage_mesh()
#4 ./step-200: main
---------------------
It says that in assemble_damage, the finite element provided to fevalues and that of dof_handler are different.
I don't know what this exactly means as I am only creating a single object, FE_Q<2> fe_damage for solving my damage equation.
Thanks and regards
Wasim