This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Runs nice with linear elements CG1 but fails with quadratic elements CG2

+1 vote

Dear Fenics community,

I would like to share the following problem with you. In a nutshell: Everything works fine with CG(1) Elements, but as soon as I try higher degree elements, the computation takes a lot of time, even with very small problems, for example

Here are the details. I have a strain gradient elasticity implemented (4th order PDE) via two coupled 2nd order PDE. A cube is fixed on the bottom face, on the top face an indentation test is performed. Here is the derivation from the PDE to the weak form:

Very compact derivation of weak form that needs to be implemented

The last integral equation has been implemented in the following py file:

minimum_example_strain_gradient_elasticity_3d
It runs nicely and gives reasonable results for linear CG elements. However, changing

FunctionSpace(mesh, "CG", 1) 

to

FunctionSpace(mesh, "CG", 2) 

with only 48 Elements practically kills the computer. I get results for pretty small problems after waiting a long time. Sometimes i have to increase the recursion limit,

sys.setrecursionlimit(10000)

sometimes I need to use the MUMPS solver

solve(a == L, w, bc, solver_parameters={'linear_solver':'mumps'})

Can somebody suggest something?

asked Jul 16, 2015 by DocSnyder FEniCS Novice (190 points)

1 Answer

+1 vote
 
Best answer

Try still experimental UFLACS compiler

from dolfin import *
parameters['form_compiler']['representation'] = 'uflacs'

# The rest of the program

It is known to scale much better than FFC quadrature backend with the increasing complexity of forms.

answered Jul 21, 2015 by Jan Blechta FEniCS Expert (51,420 points)
selected Jul 23, 2015 by DocSnyder

When I do this I get

ImportError: No module named uflacs.backends.ffc.representation

when

FunctionSpace(mesh, "CG", 1)

is called.

For installation support request ask at http://fenicsproject.org/mailman/listinfo/fenics-support list.

...