fenics team mailing list archive
-
fenics team
-
Mailing list archive
-
Message #01867
Re: Noslip in x-direction of the hyperelastic cbc.twist case
On Fri, Feb 15, 2013 at 11:52 AM, Anders Logg <logg@xxxxxxxxx> wrote:
> On Fri, Feb 15, 2013 at 11:10:59AM +0100, Roland Siegbert wrote:
> My suggestion would be to edit the CBC.Twist code to make it do what
> you want. If you find a good solution and a nice interface, it might
> be merged back in.
OK, for anybody interested in the result: I added a create_solver()
routine and modified solve() of the CBCProblem class derived CBC.Twist
class Hyperelasticity, in a way that doesn't break the other demos and
gave me the possibility to do this using release.py written by Harish
Narayanan:
<code>
# Setup and solve problem
problem = Release()
problem.create_solver()
bc = DirichletBC(problem.solver.vector.sub(0), Constant(0.0), "x[0] == 1.0")
problem.solver.bcu.append(bc)
problem.parameters["solver_parameters"]["save_solution"] = True
print problem
problem.solve()
interactive()
</code>
As can be seen, I also added vector to the instance attributes of the
CBCSolver derived class in cbc.Twist (CG1...).
I'll write a patch for review, after I understand how launchpad works
in that way. ;-)
Roland
References