← Back to team overview

dolfin team mailing list archive

Re: [Question #155649]: Changing a stokes problem to navier-stokes with a non-linear term

 

Question #155649 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/155649

    Status: Open => Answered

B. Emek Abali proposed the following answer:
once again Kyle, use an abstract interface for the Newton solver,

class iterate(NonlinearProblem):
    def __init__(self, a, L, bc, exter_B):
        NonlinearProblem.__init__(self)
        self.L = L
        self.a = a
	self.bc = bc
	self.exter = exter_B
    def F(self, b, x):
        assemble(self.L, tensor=b, exterior_facet_domains=self.exter)
	for condition in self.bc: condition.apply(b, x)
    def J(self, A, x):
        assemble(self.a, tensor=A, exterior_facet_domains=self.exter)
	for condition in self.bc: condition.apply(A)


 instead of VariationalProblem, how to do is in the website I wrote above, under viscous flow.

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.