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

Reply via email to