Ccx - bad performance with a large number of element sets

Dear all,

I asked this question at the old mail group and I got a few replies. The most of them recommended, I should use instead of spooles the pardiso solver, but sadly this is not solving my problem.

First of all, here again is my problem description:
I want to calculate bone healing. For this it is necessary to assign to each tetrahedron an own material, thus each element has to be a element set.

To specify my problem I carried out a simple test:
-I created a mesh representing a bone
-Just for this test, every elements has the material steel
-At the top of the bone a force is defined, at the bottom the bone is fixed
-The mesh and the load case are for both cases the same

Case 1:
-I created for each element an element set, and assign the material steel to each element set
-The number of materials are the same as the number of elements

Case 2:
-I created 6 element sets which contain the same elements as in case 1, but these sets “bundle up” these elements
-There is just one material definition

The resulting equation system is in both cases the same, just the amount of element sets and materials are different, as you can see in the output files here (the input files can be found there too)

The calculation time of spooles is in both cases the same, but overall case one takes 2183 seconds and case two 774 seconds. Calculix needs at case one about 25 minutes longer to read the input file. For me it looks like calculix is not made for a lot of different element sets and materials, what means my work is over here, and I have to move to another solver, because I have to refine the mesh what means I have much more element sets. (atm I use a coarse mesh for testing)

Has someone an idea how to fix this or why calculix has that much problems with a large amount of element sets/material definitions?

Best regard,

Not sure if you saw my reply on the old forum, but what do you think of using a single temperature dependent material? It would replace a large number of element sets with a large number of temperatures, which is no problem because that’s a common thing to do.

I don’t know why, but I haven’t seen your reply. This is a great idea!

I’m not very familiar with temperature depended material at calculix, thus I may need a few days for implementing this. But I will give this a try and let you know, if this works for me. Thanks for your help!

Hi Patrick,

you are right, CalculiX has right now no good performance if lots of sets and/or lots of materials are present in the input deck. This is because there are some loops over the sets and materials (do i=1,nset, do i=1,nmat). I will check whether I can use ordered lists for this without having to change the code too much. I guess this would be for the next version.

Best Greetings,


1 Like

I had a look at the source code, and I guess you know that, but the two functions allocation.f and calinput.f are slow for large element sets (due to the loops).

The following times are for 280k element sets, time in sec

The approach with temperature values instead of element sets would work, it is a lot faster, but there are some issues which I dont understand, thus I have to live with the bad performance atm.

I have an idea how to improve the performance with user defined materials, but I haven’t implemented it yet. I will give feedback if I have done that.