Duplicate code in process definitions in ProcessLib
As we all knew, there are pieces of duplicate code in some process class definitions in the ProcessLib such as Mechanics Hydromechanics (including those in LIE), ThermoMechanics. The major duplicated parts are about the parsing and using the solid material properties and elasto-plastic parameters, the initialization and calculation of secondary variables. It increases the effort in maintaining the assembler code. My suggestion is to have a unique base for the assemblers that related to mechanical process.
Also for coupling computation,
- only physical (major) processes can have a local assembler class, which also conducts the computation of its associated coupled term.
- the local assembly of the monolithic scheme analyzed processes such as HydroMechanics (including those in LIE), ThermoMechanics (the name of which sounds not refers to process directly) can only call the assembler of physical (major) process classes. By this way,
- the current structure of global matrix and vector for existing process class definitions are kept,
- the code duplicate in coupled process assembler definitions can be avoided.