Dear all,
First of all I would like to thank all the deal.II developers and the
community who helped created it and keep it alive.
The more I get into it the more I am impress by its high quality and
completeness.
The issue that I am currently facing is that I am trying to implement
multithreading using the WorkStream functionalities.
I use for that the Step 9 tutorial.
I have very similar Copy and Scratch data structures and use the suggested
path " assemble_local(ScratchData, CopyData) ->
copy_local_to_global(CopyData) -> assemble_system() "
The major difference between my program and the Step 9 one is that I use a
hp::DoFHandler instead of a DoFHandler.
When compiling I get some errors that I was unable to understand well and
fix so far.
They come from the WorkStream::run method.
Please find attached its implementation and the errors that I get.
It seems that the problem comes from the iterator, the compiler has trouble
determining which type to use.
I am using the latest released version of the library (v8.4.1)
I hope that I provide enough information. I case anyone needs more details,
please feel free to ask.
Thank you very much by advance for all the help or suggestions that I may
receive.
Best,
Claire
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.
// System assembling for one Newton-Raphson iteration
// T_iter is the temperature(=solution) at the current iteration
template <int dim>
void HeatEquation<dim>::assemble_system(const Vector<double> &T_iter)
{
Assembly::ScratchData<dim> scratch_data(fe_collection,
quadrature_collection,
face_quadrature_collection,
T_iter);
Assembly::CopyData copy_data;
WorkStream::run(dof_handler.begin_active(),
dof_handler.end(),
*this,
&HeatEquation::assemble_cell_terms, // equivalent of Step-9 "local_assemble_system"
&HeatEquation::copy_local_to_global,
scratch_data,
copy_data);
dirichlet_constraints.condense(system_matrix);
dirichlet_constraints.condense(system_rhs);
}
15:59:51 **** Incremental Build of configuration Default for project slm_v18
****
make all
Scanning dependencies of target slm_v18
[ 50%] Building CXX object CMakeFiles/slm_v18.dir/slm_v18.cc.o
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc: In
instantiation of ‘void ThermalProblem::HeatEquation<dim>::assemble_system(const
dealii::Vector<double>&) [with int dim = 3]’:
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc:1398:19:
required from ‘void ThermalProblem::HeatEquation<dim>::run() [with int dim =
3]’
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc:1505:32:
required from here
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc:1031:17:
error: no matching function for call to ‘run(dealii::hp::DoFHandler<3,
3>::active_cell_iterator, dealii::hp::DoFHandler<3, 3>::cell_iterator,
ThermalProblem::HeatEquation<3>&, void
(ThermalProblem::HeatEquation<3>::*)(const cell_iterator&,
Assembly::ScratchData<3>&, Assembly::CopyData&), void
(ThermalProblem::HeatEquation<3>::*)(const Assembly::CopyData&),
Assembly::ScratchData<3>&, Assembly::CopyData&)’
WorkStream::run(dof_handler.begin_active(),
^
In file included from
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc:30:0:
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/include/deal.II/base/work_stream.h:1119:3:
note: candidate: template<class Worker, class Copier, class Iterator, class
ScratchData, class CopyData> void dealii::WorkStream::run(const
std::vector<std::vector<CopyData> >&, Worker, Copier, const ScratchData&, const
CopyData&, unsigned int, unsigned int)
run (const std::vector<std::vector<Iterator> > &colored_iterators,
^
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/include/deal.II/base/work_stream.h:1119:3:
note: template argument deduction/substitution failed:
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc:1031:17:
note: ‘dealii::hp::DoFHandler<3, 3>::active_cell_iterator {aka
dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::hp::DoFHandler<3,
3>, false> >}’ is not derived from ‘const std::vector<std::vector<CopyData> >’
WorkStream::run(dof_handler.begin_active(),
^
In file included from
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc:30:0:
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/include/deal.II/base/work_stream.h:1007:3:
note: candidate: template<class Worker, class Copier, class Iterator, class
ScratchData, class CopyData> void dealii::WorkStream::run(const Iterator&,
const typename dealii::identity<Arg1>::type&, Worker, Copier, const
ScratchData&, const CopyData&, unsigned int, unsigned int)
run (const Iterator &begin,
^
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/include/deal.II/base/work_stream.h:1007:3:
note: template argument deduction/substitution failed:
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc:1031:17:
note: cannot convert ‘copy_data’ (type ‘Assembly::CopyData’) to type
‘unsigned int’
WorkStream::run(dof_handler.begin_active(),
^
In file included from
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc:30:0:
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/include/deal.II/base/work_stream.h:1230:3:
note: candidate: template<class MainClass, class Iterator, class ScratchData,
class CopyData> void dealii::WorkStream::run(const Iterator&, const typename
dealii::identity<C>::type&, MainClass&, void (MainClass::*)(const Iterator&,
ScratchData&, CopyData&), void (MainClass::*)(const CopyData&), const
ScratchData&, const CopyData&, unsigned int, unsigned int)
run (const Iterator &begin,
^
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/include/deal.II/base/work_stream.h:1230:3:
note: template argument deduction/substitution failed:
/home/claire/Logiciels/deal.II/deal.II-v8.4.1/Doctorat/slm_v18/slm_v18.cc:1031:17:
note: deduced conflicting types for parameter ‘const Iterator’
(‘dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::hp::DoFHandler<3,
3>, false> >’ and ‘dealii::hp::DoFHandler<3, 3>::cell_iterator {aka
dealii::TriaIterator<dealii::DoFCellAccessor<dealii::hp::DoFHandler<3, 3>,
false> >}’)
WorkStream::run(dof_handler.begin_active(),
^
CMakeFiles/slm_v18.dir/build.make:62 : la recette pour la cible «
CMakeFiles/slm_v18.dir/slm_v18.cc.o » a échouée
make[2]: *** [CMakeFiles/slm_v18.dir/slm_v18.cc.o] Erreur 1
CMakeFiles/Makefile2:227 : la recette pour la cible «
CMakeFiles/slm_v18.dir/all » a échouée
make[1]: *** [CMakeFiles/slm_v18.dir/all] Erreur 2
make: *** [all] Erreur 2
Makefile:83 : la recette pour la cible « all » a échouée
15:59:56 Build Finished (took 5s.177ms)