Skip to content

Discussion: New mapper to simplify adding values to matrix from user application #167

@abhyshr

Description

@abhyshr

The current implementation of the generalized matrix mapper (and any matrix mapper ) makes inserting values in the matrix very difficult especially when there are large blocks on bus and branch. The user needs to calculate the number of values, calculate the row, col indices, and then the actual values etc., which, IMHO, is difficult. The matrix class in GridPACK has a nice way to insert the values in the matrix where one sets the row entry, column entry, and the value. Multiple values can also be set. Note that this format follows the PETSc matrix format and is very convenient in my opinion. So, I propose we pass the matrix directly to the application through matrixGetValues call. The user can call the method on the matrix to set values. This is very convenient in my opinion.

My plan is to create a new mapper by copying GenMatrixMap to do this. This will also need adding a new method to BaseComponent but that should be relatively straightforward. This will not break any existing code. The new mapper will be only used for the EMT application.

Any objections/better suggestions?

@bjpalmer @wperkins @chenyousu @yliu250

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions