GCMLab / GCMLab-FEM

General purpose finite element program
0 stars 0 forks source link

Tangent matrix pointer #76

Closed b3gee closed 1 year ago

b3gee commented 1 year ago

What?

Replace the direct reference to the getK function with function pointers to a new file that calculates the tangent matrix and internal forces vector. Function pointers were also created to the getStrain function.

Why?

To create a framework using the non-linear Newton-Raphson solver that enables a modular swapping of different tangent matrix calculations for different non-linear material types.

How?

The user specifies the name of the function they plan to use to calculate the tangent matrix and internal forces. The main file uses the feval function to evaluate this function.

Testing?

MainConfigFile, RunTests

Anything else?

I tried to future-proof the inputs to the general tangent matrix calculation function by including additional inputs that are not currently in use. These include d-vectors from previous timesteps, the linear M and K matrices, and timestep sizes from the current and previous timesteps.

b3gee commented 1 year ago

Agreed on all points.