Thread Previous • Date Previous • Date Next • Thread Next |
Kristian Oelgaard wrote:
On 12 February 2010 13:14, Patrick Riesen <priesen@xxxxxxxxxxxxxxx> wrote:Kristian Oelgaard wrote:On 12 February 2010 12:51, Patrick Riesen <priesen@xxxxxxxxxxxxxxx> wrote:Anders Logg wrote:On Fri, Feb 12, 2010 at 12:02:53PM +0100, Patrick Riesen wrote:Anders Logg wrote:On Fri, Feb 12, 2010 at 11:36:33AM +0100, Patrick Riesen wrote:Anders Logg wrote:On Fri, Feb 12, 2010 at 10:42:14AM +0100, Patrick Riesen wrote:Anders Logg wrote:On Fri, Feb 12, 2010 at 10:25:52AM +0100, Patrick Riesen wrote:hi all of you,in dolfin0.9.6 i'm having a hard time with the following problem:i'm solving for a variable viscosity, depending on the power x ofthe strain-rate tensor's 2nd invariant. the invariant i compute in a separate form, and then i compute the power by iterating through all the dofs, extracting/reinserting the values in the vector of the function inside the code. this was all fine for dolfin < 0.9.6 but now i think i have aproblem with choosing the right function space for the viscositycoefficient in my nonlinear problem, since for those i used before(Quadrature, DG) i have serious problem which i do not understand(they all worked before dolfin0.9.6) my problem is a mixed problem with space definitions: #-------------------------------------- velocity = VectorElement("CG" , geom, 2) pressure = FiniteElement("CG" , geom, 1) ME = MixedElement(velocity, pressure) # viscosity element visc = FiniteElement("DG", geom, 2) # placeholder variable viscosity eta = Coefficient(qe) #--------------------------------------- using this has worked well before, but i don't follow why it shouldn't work in dolfin0.9.6/ffc0.9. Or else somebody can propose me another approach. regards, patrickIs the problem the quadrature element for eta? What is the problemexactly?yes i think so, in dolfin0.8 i had a quadrature-element for eta,which was perfect, then basis-functions on quadrature elements werenot supported anymore, and i changed it to a DG element the same order like velocity. that worked as well in dolfin0.9.2-0.9.5 but now this gives me a few negative values occuring in eta, when i solve for the invariant.Quadrature elements should still be supported. Try to isolate the problem to a small and simple test case and submit it as a bug report for FFC through Launchpad.ok, i'll try first something else: how can i tell ffc to usespecific quadrature options, i.e. i want to make the terms involvingeta and velocity to be computed on the same points and degree.If there is a quadrature element in the form (for eta), then FFCshould automatically choose the number of quadrature points to be thesame as for eta.Compile with the option -d (for debugging) and see what FFC says aboutquadrature degree.ok, it says Found quadrature element(s) with the following degree(s): [3] Selecting quadrature degree based on quadrature element: 3 quadrature_degree: auto --> 3 which is fine, i choose 1 order higher for the quadrature element than the velocity element. i now got the code now running again with the quadrature element, but the convergence of the newton solver is linear or less. i'm sure that my nonlinear function F and the jacobian J and how i compute the variable viscosity are correct, do you have a guess what of dolfin/ffc could affect this?I have no idea.ops, i found something: if i use the optimization flag -O in ffc, i get what i want: quadratic convergence.That must be the first time ever using -O has actually fixed a problem. You use quadrature representation I assume?yes, i tried both, explicit use of -r quadrature and the 'auto' version (doing nothing)I don't get why you say that using quadrature elements for the basisfunctions is not supported. Quadrature elements can be used exactly like anyother element with the only differenceonce in dolfin0.9.1 or 0.9.3 i could not define the Test/Trialfunctions fora quadrature element, that was in the form i used for the invariant. when starting with 0.8 i could do that. that differentiation is notdefined. Does the problem disappear if you use quadrature elements instead of DG?so now i reverted the problem again to use quadrature elements for that viscosity (eta) function. it works as i expect with quadratic convergencefor my nonlinear problem when using the optimization flag in ffc but elsethe convergence is poor and seems even a bit ugly..OK, so now Test/TrialFunctions work for quadrature elements (again)?
yes, now it's like in dolfin0.8 again
It sounds like a bug for quadrature code generation if you get different results depending on whether or not you use -O. Do you have to compile both forms with -O to get i working or is it just the invariant form which is causing the problem?
i tried it, but now the problem seems gone, the convergence results are about the same whether or not using the -O flag.
but i must say that i just before i made a new pull for all the packages of FEniCS.
A new broom sweeps clean ...i guess my previous install was somehow broken (but broken very nastily, it seemed to work all, but just giving me errors when computing..aiaiai)
Kristianbut what the real problem was or is i don't understand.Kristianif i dont use it, the convergence is poor, i.e. ~linear-- Anders_______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@xxxxxxxxxxxxxxxxxxx Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp_______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@xxxxxxxxxxxxxxxxxxx Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp
Thread Previous • Date Previous • Date Next • Thread Next |