Hello guys. I really appreciate with someone could help me.
I’m trying to solve the following contour problem:
\varsigma \int_{\Gamma_s} \nabla : \sigma^s (u) ds = \int_{\Gamma_s} w P.n dx
using the following structure: (giving just the essential)
class Interface(SubDomain):
def inside(self, x, on_boundary):
dy = x[1]
dz = x[2]
dr = (dydy + dzdz)**0.5
zeta = DOLFIN_EPS + 1.0E-3
return dr >( ri - zeta) and between(x[0], (0.2,4.0))parts = MeshFunction(“size_t”, mesh, mesh.topology().dim()-1, 0)
Interface().mark(parts,4)
ds = Measure(‘ds’, domain=mesh,subdomain_data=parts)timeseries_p = TimeSeries(‘pressure_series’)
timeseries_p.retrieve(pr.vector(), t)pavg = (assemble(pr*ds(4))/(assemble(Constant(1.0)*ds(4)))) #mean pressure in the interface
w1 = TestFunction(W.sub(0))
u1 = TrialFunction(W.sub(0))
us = Function(W.sub(0).collapse())Fhp = inner(pavg*n, w1)ds(4) - qsiinner(sigma_s(u1),epsilon_s(w1))*ds(4)
ahp, Lhp = system(Fhp)
Ahp, bhp = assemble(ahp), assemble(Lhp)
solve(Ahp, us.vector(), bhp, ‘gmres’, ‘ilu’)
and I’m stuck with the following error:
Error: Unable to successfully call PETSc function ‘KSPSolve’.
*** Reason: PETSc error code is: 73 (Object is in wrong state).
*** Where: This error was encountered inside /tmp/dolfin/dolfin/la/PETScKrylovSolver.cpp.
Someone could help me?