The class has this member function, but it can not copy refined grids, thus making it unusable for me. Furthermore I tested the transform-function, and got the following error: ~/heat_equation_with_pulse_propagation/heat_equation/source/main.cpp:1648:26 : error: no matching function for call to ‘transform(std::_Bind_helper<false , dealii::Point<2, double> (Step15::MinimalSurfaceProblem<2>::*)(dealii:: Point<2, double>), const Step15::MinimalSurfaceProblem<2>*, const std:: _Placeholder<1>&>::type, const dealii::parallel::distributed::Triangulation< 2, 2>&)’ GridTools::transform (std::bind(&Step15::MinimalSurfaceProblem<dim>:: rescale_body_length, this, std::placeholders::_1), triangulation); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ~/heat_equation_with_pulse_propagation/heat_equation/ source/main.cpp:37:0: /opt/dealii/include/deal.II/grid/grid_tools.h:2612:8: note: candidate: template<int dim, class Transformation, int spacedim> void dealii::GridTools ::transform(const Transformation&, dealii::Triangulation<dim, spacedim2>&) void transform (const Predicate &predicate, ^~~~~~~~~ /opt/dealii/include/deal.II/grid/grid_tools.h:2612:8: note: template argument deduction/substitution failed: ~/heat_equation_with_pulse_propagation/heat_equation/source/main.cpp:1648:26 : note: types ‘dealii::Triangulation<dim, spacedim2>’ and ‘const dealii:: parallel::distributed::Triangulation<2, 2>’ have incompatible cv-qualifiers GridTools::transform (std::bind(&Step15::MinimalSurfaceProblem<dim>:: rescale_body_length, this, std::placeholders::_1), triangulation);
According to the documentation I also should use "transform" not after refining the mesh: A safe approach is to use this function prior to any refinement in parallel, if that is possible, but not after you refine the mesh. Are there alternative approaches? Thanks! Am Freitag, 4. Mai 2018 17:55:48 UTC+2 schrieb Wolfgang Bangerth: > > On 05/04/2018 02:34 AM, 'Maxi Miller' via deal.II User Group wrote: > > I would like to use a temporary triangulation, in order to keep the > > triangulation I am working on untouched. Is there a way to copy the > > triangulation (defined as parallel::distributed::Triangulation) to a > > temporary triangulation? According to > > > http://www.dealii.org/developer/doxygen/deal.II/classparallel_1_1distributed_1_1Triangulation.html > > > there is no way to do that directly, is that correct? > > Or is it more efficient to scale the original triangulation, write the > > data, and re-scale it? > > Rescaling is a cheap operation -- I'd just do that and the scale back > when you're done. On the other hand, copying is expensive and difficult, > so I'd avoid that if possible. > > (It is possible that p::d::Triangulation has a member function > copy_from(), but I don't recall for sure.) > > Best > W. > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: bang...@colostate.edu > <javascript:> > 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. For more options, visit https://groups.google.com/d/optout.