Dear all,
I am trying to create a set of Points<dim>, i.e std::set<Point<dim>>.
I get a quite extensive error message when trying to insert a point in the
set but for my understanding of the message, the only problem is the
missing operator< for two points.
(Well I could make use of a std::vector instead but a std::set fits much
better for my issue since (i) I need to insert points at arbitrary
positions quite often and second (ii) wanna make sure that a given Point is
only once in the container.)
But irrespective of what container I use, I would like to supplement the
Point Class by adding the 'operator<' like in the following:
template<int dim, typename Number=double>
bool Point<dim>::operator< (const Point<dim,Number>& p)
{
//...some Asserts
return this.norm()<p.norm();
}
Of course I can not write this piece of code since there is no declaration
for a member function 'operator<' in the Point Class.
For that reasons my next idea was to modify the file <deal.II/base/point.h
<https://www.dealii.org/current/doxygen/deal.II/base_2point_8h_source.html>>
by simply adding the missing operator< declaration and the corresponding
definition. So I did this but without effect, probably because all the
files of the dealii-library are already compiled and executing my program
via 'make run' did not see my changes in the Point Class at all. (I also
added a dummy command, std::cout<<"...Test..."<<std::endl, which did not
appear on my screen either.)
I am only familiar with basic cmake- and make-commands.
My question is if it is possible to recompile one specific file of the
library again?
So if this were possible I would appreciate getting some guidance for
implementing this.
I would also be interested in writing a patch for that issue.
Best
Simon
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/5089f526-f9cd-4a8f-8cb6-4d13bebedc4fn%40googlegroups.com.