sogno-platform/dpsim

Unify right side vector stamping of composite components

dinkelbachjan opened this issue · 0 comments

The stamping of the right side vector is currently implemented in different ways by some composite components.
One way is the collection of right side vector stamps references of the subcomponents, as for example done by DP_Ph1_PiLine here

mRightVectorStamps.push_back(&**mSubSeriesInductor->mRightVector);

and then corresponding derefencing
for (auto stamp : mRightVectorStamps)
rightVector += *stamp;

As a second way, for example DP_Ph1_RxLine calls instead the subcomponents' routines mnaApplyRightSideVectorStamp
mSubResistor->mnaApplyRightSideVectorStamp(rightVector);
mSubInductor->mnaApplyRightSideVectorStamp(rightVector);

The second way appears straightforward (especially if iterating in a for-loop over all subcomponents), but seems to involve calling mnaApplyRightSideVectorStamp of the subcomponents twice (once by the supercomponent, once by the subcomponents mnaPreStep routine.

Observed in #141
To be checked whether already addressed by #144