David,
if you call
triangulation.set_manifold(id, new_manifold)
the old manifold is automatically discarded, unless there is more than one manifold id using it.
Maybe you are setting the manifold inside a function, and you are exiting the function (and destroying the manifold) before the triangulation is destroied?
In this case, try adding the static keyword in front of your manifold. This will ensure that your manifold will keep existing even if you exit the function.
Btw: this has nothing to do with the way manifolds are set or reset… try reading step-1 and see why you need the static keyword…
Best,
Luca.
> On 03 Jun 2016, at 3:34, David <
wang...@gmail.com> wrote:
>
> Dear all,
>
> Could anyone please give some suggestions. I can't change manifold description and always met an error saying that
> "ChartManifold is stilled in use by an object", "count == 0".
>
> How can I deal with this? I really need your help! If this can't be done in dealii, could anyone please tell me!
>
> Thank you so much!
>
> Best regards,
> David.
>
> On Thursday, June 2, 2016 at 10:41:29 PM UTC+8, David wrote:
> Can I use
>
> triangulation.set_manifold(id_I_want_to_clear)
>
> to clear the previous description, and then reset another description to this id.
> But the documentation says this would reset FlatManifold object to this id.
>
>
> On Thursday, June 2, 2016 at 9:49:10 PM UTC+8, David wrote:
> Hi, everyone:
>
> I need to be able to set different manifold description to the same triangulation at different computation stage.
> In the first stage, I have set a manifold description, let's call it MD1, to the triangulation.
> In the second stage, I need to clear MD1 and reset another manifold description MD2 to the same triangulation.
>
> How can I achieve this?
>
> Thanks in advance for any help!
>
> Best,
> David.
>
> --
> 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+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.