Hi,
we cannot find a problem why non-positive progress bar is to be created
and raising runtime error without a complete code to try.
But note that you are probably misusing SubMesh. Having solved some
problem on mesh and trying to integrate its solution around some cells
or facets is normally done without SubMesh. Like
u = Function(V) # V space on mesh
solve(..., u, ...)
facets = FacetFunction('size_t', mesh)
LeftBoundary().mark(facets, 2)
RightBoundary().mark(facets, 1)
# current syntax
F = u*ds(subdomain_id=1, subdomain_data=facets)
F += u*ds(subdomain_id=2, subdomain_data=facets)
# deprecated synatx
F = u*ds[facets](1)
F += u*ds[facets](2)
assemble(F)
i.e. everything is done on the orginal mesh and integration is
performed over on subset of original mesh using cell/facet markers. No
new mesh is ibtroduced using SubMesh, which just complicates the things.
Jan
On Wed, 10 Dec 2014 02:19:13 +0100
simone <[email protected]> wrote:
>
> Good evening,
> i'm sorry if I rewrite to you but i cannot find a solution in the
> forum neither in the documentation. I have a rectangular domain and a
> smaller rectangular subdomain. After the resolution of a differential
> problem over the domain, i need to evaluate the integral of the
> obtained solution over the left and right sides of the subdomain
> boundary. Called p the solution, this is part of my code:
>
> Gamma=FacetFunction("size_t",SubMesh(my_mesh,my_subdomain))
>
> class LeftBoundary(SubDomain):
> def inside(self, x, on_boundary):
> return on_boundary and near(x[0],x1) #x1=x-coordinate of the
> left side of the subdomain
>
> class RightBoundary(SubDomain):
> def inside(self, x, on_boundary):
> return on_boundary and near(x[0],x2) #x2=x-coordinate of the
> right side of the subdomain
>
> Gamma.set_all(0)
> LeftBoundary().mark(Gamma,2)
> RightBoundary().mark(Gamma,1)
>
> d_gamma=Measure("ds",domain=SubMesh(my_mesh,my_subdomain))[Gamma]
>
> d_p=p*d_gamma(1)-p*d_gamma(0)
>
> direction=assemble(d_p,exterior_facet_domains=Gamma)
>
>
>
>
> If I try to run this code i get this error:
> File "/usr/lib/python2.7/dist-packages/dolfin/cpp/mesh.py", line
> 4461, in mark
> self._mark(*args)
> RuntimeError:
>
> ***
> -------------------------------------------------------------------------
> *** DOLFIN encountered an error. If you are not able to resolve this
> issue *** using the information listed below, you can ask for help at
> ***
> *** [email protected]
> ***
> *** Remember to include the error message listed below and, if
> possible, *** include a *minimal* running example to reproduce the
> error. ***
> ***
> -------------------------------------------------------------------------
> *** Error: Unable to create progress bar.
> *** Reason: Number of steps for progress bar must be positive.
> *** Where: This error was encountered inside Progress.cpp.
> *** Process: unknown
> ***
> *** DOLFIN version: 1.4.0
> *** Git changeset: unknown
>
> I cannot understand the meaning of the error message, so i don't know
> how to modify the code.
> I would like also to know what happens if the mesh vertexes don't
> match the subdomain boundary, with the subdomain sides intersecting
> mesh cells. I hope I've explained myself, I'm sorry for my english
> Thank you for your support
> Best regards
> Simone Carriero
> _______________________________________________
> fenics-support mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics-support
_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support