I would suggest using a cell integral and just marking a single cell
containing your point.

Martin

On 23 February 2015 at 11:09, Wilhelm Braun <[email protected]> wrote:

> I just checked this, and I got
>
> AssertionError
>
>
> which means that the domain is indeed empty.
>
> Is there a way to fix this by redefining the domain or by simply
> refining the mesh at the point of interest before the start of the
> computation?
>
> --Wilhelm
>
> On 21/02/15 18:46, Jan Blechta wrote:
> > On Fri, 20 Feb 2015 17:22:36 +0000
> > Wilhelm Braun <[email protected]> wrote:
> >
> >> I tried to implement the goal function using the point integral as
> >> outlined in the point integral demo in DOLFIN.
> >>
> >> However, the point integral evaluated to zero, and hence, the adaptive
> >> algorithm stopped after one iteration, but did not throw an error.
> >>
> >> Please find the code for the definition of the goal function M below.
> >>
> >> --Wilhelm
> >>
> >>
> ----------------------------------------------------------------------------------------------------
> >> code for goal function M
> >>
> ----------------------------------------------------------------------------------------------------
> >>
> >>
> >>    def center_func(x):
> >>             return (vbar-0.05 <= x[0] and x[0] <= vbar + 0.05 and
> >> near(x[1], 0.0)) or -0.05 <= x[1] and x[1] <= 0.05 and near(x[0],
> >> vbar)
> >>
> >>     # Define domain for point integral
> >>     center_domain = VertexFunction("size_t", mesh, 0)
> >>     center = AutoSubDomain(center_func)
> >>     center.mark(center_domain, 1)
> >>     dPP = dP[center_domain]
> > Have you tested that center_domain is non-trivial? For example
> >
> > assert center_domain.array().max() > 0
> >
> > Jan
> >
> >>     M = u* dPP(1)
> >>
> >>
> >>
> ----------------------------------------------------------------------------------------------------
> >>
> ----------------------------------------------------------------------------------------------------
> >>
> >>
> >>
> >> On 20/02/15 11:23, Anders Logg wrote:
> >>> I suggest looking at the point integral demo in DOLFIN:
> >>>
> >>> demo/undocumented/point-integral/python/demo_point-integral.py
> >>>
> >>> Then use the point integral to define you goal functional. Warning:
> >>> I haven't tested this myself and don't know if it will break the
> >>> adaptive algorithm somehow. It would be interesting to get feedback
> >>> on whether it works (without any promise that I will fix it if it
> >>> does not... ;-)
> >>>
> >>> --
> >>> Anders
> >>>
> >>>
> >>> Fri Feb 20 2015 at 11:47:10 AM skrev Wilhelm Braun
> >>> <[email protected] <mailto:[email protected]>>:
> >>>
> >>>     Dear all,
> >>>
> >>>     I have posted a question in the FEniCS QA forum, and it was
> >>>     recommended that I bring up the issue on this mailing list.
> >>>
> >>>     Please have a look here for my question.
> >>>
> >>>
> http://fenicsproject.org/qa/6555/automated-oriented-adaptivity-point-computational-domain
> >>>
> >>>     Thank you very much!
> >>>
> >>>     Wilhelm Braun
> >>>
> >>>
> >>>
> >>>     This message and any attachment are intended solely for the
> >>> addressee and may contain confidential information. If you have
> >>> received this message in error, please send it back to me, and
> >>> immediately delete it.
> >>>
> >>>     Please do not use, copy or disclose the information contained
> >>> in this message or in any attachment.  Any views or opinions
> >>> expressed by the author of this email do not necessarily reflect
> >>> the views of the University of Nottingham.
> >>>
> >>>     This message has been checked for viruses but the contents of an
> >>>     attachment may still contain software viruses which could
> >>> damage your computer system, you are advised to perform your own
> >>> checks. Email communications with the University of Nottingham may
> >>> be monitored as permitted by UK legislation.
> >>>
> >>
> >>
> >>
> >>
> >> This message and any attachment are intended solely for the addressee
> >> and may contain confidential information. If you have received this
> >> message in error, please send it back to me, and immediately delete
> >> it.
> >>
> >> Please do not use, copy or disclose the information contained in this
> >> message or in any attachment.  Any views or opinions expressed by the
> >> author of this email do not necessarily reflect the views of the
> >> University of Nottingham.
> >>
> >> This message has been checked for viruses but the contents of an
> >> attachment may still contain software viruses which could damage your
> >> computer system, you are advised to perform your own checks. Email
> >> communications with the University of Nottingham may be monitored as
> >> permitted by UK legislation.
> >>
>
>
>
>
>
> This message and any attachment are intended solely for the addressee
> and may contain confidential information. If you have received this
> message in error, please send it back to me, and immediately delete it.
>
> Please do not use, copy or disclose the information contained in this
> message or in any attachment.  Any views or opinions expressed by the
> author of this email do not necessarily reflect the views of the
> University of Nottingham.
>
> This message has been checked for viruses but the contents of an
> attachment may still contain software viruses which could damage your
> computer system, you are advised to perform your own checks. Email
> communications with the University of Nottingham may be monitored as
> permitted by UK legislation.
>
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics
>
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to