← Back to team overview

dolfin team mailing list archive

Re: which function space

 



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 of
the 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 a
problem with choosing the right function space for the viscosity
coefficient 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,
patrick

Is the problem the quadrature element for eta? What is the problem
exactly?

yes i think so, in dolfin0.8 i had a quadrature-element for eta,
which was perfect, then basis-functions on quadrature elements were
not 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 use
specific quadrature options, i.e. i want to make the terms involving
eta and velocity to be computed on the same points and degree.

If there is a quadrature element in the form (for eta), then FFC
should automatically choose the number of quadrature points to be the
same as for eta.

Compile with the option -d (for debugging) and see what FFC says about
quadrature 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?
I don't get why you say that using quadrature elements for the basis functions is not supported. Quadrature elements can be used exactly like any other element with the only difference that differentiation is not defined.
Does the problem disappear if you use quadrature elements instead of DG?

Kristian

if 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


Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References