Open TheGreatCid opened 3 weeks ago
I think it would be best to have profiling reveal this as a hot spot before doing any development for this. In general different variables can have different finite element families and orders making the mass matrix calculation for one invalid for another
Motivation
Right now
MassMatrix
needs to be invoked once per variable to fully populate the mass matrix. For example for 3D solid mechanics, there needs to be aMassMatrix
kernel fordisp_x
,disp_y
, anddisp_z
.This works, but is unnecessary. The mass matrix could be calculated on one variable, and then the mass matrix values could be used to populate the DOFs corresponding to any other variables.
Design
Need to find a way to call the mass matrix calculation on a single variable, store the mass matrix, and then populate the DOFs of any other variables with the calculated values, rather than recalculating the mass matrix for each variable.
Impact
This should lead to speedups for any method using the
MassMatrix
with multiple variables.