Topic: DSS solver and NonLinearDynamic

Dear all,
I recently used DSS solver to speed up the solution for large systems, and I noticed that it NonLinearDynamic won't work with DSS matrix type just because the operation

DSSMatrix :: times(const FloatArray &x, FloatArray &answer) const

is not defined.
This method is called for massMatrix (nLinearDynamic.C line 450):

massMatrix->times(help, rhs);

I'm guessing 2 things:

1. why DIIDynamic works fine? I noticed that the mass matrix is threated in another way (don't know if compatible or not with NonLinearDynamic):

this->timesMtrx(help, rhs, MassMatrix, domain, tStep); difficult to implement the DDS time(const FloatArray &x, FloatArray &answer) method? if so, can another times method be used instead?

thanks for the clarifications,

Re: DSS solver and NonLinearDynamic

Dear all, we tried to implement the missing "time(const FloatArray &x, FloatArray &answer)" method, but running the attached sample (like any other models run with DSS) we still find strange convergence problems (the analysis is NonLinearDynamic but all the elements behaves linearly).

You can find the commit here.

Thanks in advance for your help

Post's attachments 238.58 kb, 2 downloads since 2017-09-28 

You don't have the permssions to download the attachments of this post.

Re: DSS solver and NonLinearDynamic

I haven't had time to look at the code in depth, but I guess it comes down to what this

_dss->ElementAt(i - 1, j - 1)

part does. Does it work like the code expects it to?

Either way, this is definitely not how a sparse dot product should be implemented; it is far to inefficient.
Normally, you would use the knowledge and internals of the current sparse structure to skip all the zero elements.


Re: DSS solver and NonLinearDynamic

I run into problem, when trying to help. I was first trying to identify, whether there are convergence problems with default solver. However, the solution fails, I obtained warnings on unread tokens in mitc4shell element:

Warning: (/home/bp/oofem.git/src/oofemlib/oofemtxtinputrecord.C:555)
In finish:
Unread token(s) detected in the following record
"mitc4shell 1010001 nodes 4 1010001 10100...":

and more serious one about not reaching the convergence in material routine:

Warning: (/home/bp/oofem.git/src/sm/Materials/structuralmaterial.C:231)
In IsotropicLinearElasticMaterial::giveRealStressVector_ShellStressControl, number: 1:
Iteration did not converge

So if we have to figure out the problem with dss, you have to provide working example using default solver, or we have to first hunt for problems in material driver or element formulation. (I am using the up to date version from git repository).


Re: DSS solver and NonLinearDynamic

Thanks Borek, you're right (we have modified mitc shells). I can provide a model with beams, please see attachments.
One model is with DSS, the other one (ending with B) with default solver. We get very different results by comparing the .out files.

At this stage, we want to know if our implementation of the missing "time(const FloatArray &x, FloatArray &answer)" in DSS could be considered correct, or if we broke something with it.

Post's attachments 81.97 kb, 3 downloads since 2017-10-04 

You don't have the permssions to download the attachments of this post.

Re: DSS solver and NonLinearDynamic

NOTE: I don't know who is mantaining the DSS code, but I think only Borek can tell if "time(const FloatArray &x, FloatArray &answer)" behaves correctly.


Re: DSS solver and NonLinearDynamic

I have taken a look on the problem.
First, below the corrected code for your implementation:

void DSSMatrix :: times(const FloatArray &x, FloatArray &answer) const
int i, j, dim;

    dim = this->_sm->neq;


    for (i = 1; i <= dim; i++) {
        for (j = 1; j <= dim; j++) 
   += _dss->ElementAt(i - 1, j - 1) *;  

As pointed out by Mikael, this is not really efficient way. However, the dss sparse matrix is assembled directly into its block structure, which is efficient for factorization, but unfortunately not efficient for implementing the multiplication, as the blocks have to be identified (see implementation of ElementAt method) when traversing rows. There is workaround for this in DSS, where the matrix can be assembled in compressed column format first and then converted to block format before factorization, but this essentially requires to keep two versions of the matrix in the memory.

My proposal here is to modify nlineeardynamic problem in a way, that mass matrix will be always assembled using default storage, as the only required operation is the multiplication by a vector. We should allow to change storage only for effectiveStiffnessMatrix which is going to act as LHS of linear system. This will lead to more efficient solution.

If you agree, I can make the modification.

8 (edited by johnnyontheweb 13-10-2017 20:24:53)

Re: DSS solver and NonLinearDynamic

Yes, I think that what you're proposing will be the best solution. I look forward for such modification, many thanks!


Re: DSS solver and NonLinearDynamic

I have committed the change, I finally used compressed column format to store mass matrix, which gives optimal performance in terms of memory and performance.

Re: DSS solver and NonLinearDynamic

It seems the optimal solution, thank you