14#include <dpsim/HipSparseBiCGStabAdapter.h>
15#include <dpsim/HipSparseQrAdapter.h>
21#include <unordered_set>
29 safeName.reserve(name.size());
30 for (
unsigned char character : name) {
31 if (std::isalnum(character) || character ==
'-' || character ==
'_')
32 safeName.push_back(
static_cast<char>(character));
34 safeName.push_back(
'_');
36 return safeName.empty() ?
"solver" : safeName;
42template <
typename VarType>
45 :
MnaSolver<VarType>(name, domain, logLevel) {
48#elif defined(WITH_SPARSE)
55template <
typename VarType>
60template <
typename VarType>
66template <
typename VarType>
68 std::size_t index, std::vector<std::shared_ptr<CPS::MNAInterface>> &comp) {
69 auto bit = std::bitset<SWITCH_NUM>(index);
71 for (
auto component : comp) {
72 component->mnaApplySystemMatrixStamp(sys);
75 mSwitches[i]->mnaApplySwitchSystemMatrixStamp(bit[i], sys, 0);
80 auto start = std::chrono::steady_clock::now();
82 auto end = std::chrono::steady_clock::now();
83 std::chrono::duration<Real> diff = end - start;
87template <
typename VarType>
91 const auto bit = std::bitset<SWITCH_NUM>(swIdx);
93 for (
auto component : components)
94 component->mnaApplySystemMatrixStampHarm(systemMatrix, freqIdx);
95 systemMatrix.makeCompressed();
96 for (
UInt i = 0; i < switches.size(); ++i)
97 switches[i]->mnaApplySwitchSystemMatrixStamp(bit[i], systemMatrix, freqIdx);
101 const auto start = std::chrono::steady_clock::now();
102 directSolver->factorize(systemMatrix);
103 const auto end = std::chrono::steady_clock::now();
104 mFactorizeTimes.push_back(std::chrono::duration<Real>(end - start).count());
107template <
typename VarType>
120 if (
auto dense = std::dynamic_pointer_cast<DenseLUAdapter>(
124 SPDLOG_LOGGER_INFO(
mSLog,
125 "Number of variable Elements: {}"
126 "\nNumber of MNA components: {}",
133 SPDLOG_LOGGER_INFO(
mSLog,
"Base matrix with only static elements: {}",
141 SPDLOG_LOGGER_INFO(
mSLog,
"Stamping variable elements");
166 SPDLOG_LOGGER_INFO(
mSLog,
"Initial system matrix with variable elements {}",
176 auto start = std::chrono::steady_clock::now();
178 auto end = std::chrono::steady_clock::now();
179 std::chrono::duration<Real> diff = end - start;
187template <
typename VarType>
189 Real time,
Int timeStepCount) {
190 auto profileStart = std::chrono::steady_clock::now();
193 if (!mHipDeviceAssemblyReady)
196 auto profileEnd = std::chrono::steady_clock::now();
201 updateHipSG4PreStep(time);
206 profileStart = std::chrono::steady_clock::now();
208 if (!mHipDeviceAssemblyReady)
211 profileEnd = std::chrono::steady_clock::now();
216 profileStart = std::chrono::steady_clock::now();
218 if (mHipDeviceAssemblyReady)
225 profileEnd = std::chrono::steady_clock::now();
232 if (mHipSparseDeviceSolver)
233 for (
auto &adapter : mHipSG4Adapters)
234 adapter->scatterDeviceMatrix();
235 if (mHipDeviceAssemblyReady && mHipSparseDeviceSolver)
236 mHipSparseDeviceSolver->refactorizeDevice();
240 auto start = std::chrono::steady_clock::now();
241 bool synchronizeNodeOutputs =
true;
243 synchronizeNodeOutputs =
244 !mHipDeviceAssemblyReady ||
mSLog->should_log(spdlog::level::info);
245 if (mHipSparseDeviceSolver) {
246 if (mHipDeviceAssemblyReady)
247 mHipSparseDeviceSolver->clearDeviceRightHandSide();
250 for (
auto &adapter : mHipSG4Adapters)
251 adapter->accumulateDeviceRhs();
252 mHipSparseDeviceSolver->solveDevice(synchronizeNodeOutputs);
253 if (synchronizeNodeOutputs)
261 auto end = std::chrono::steady_clock::now();
262 std::chrono::duration<Real> diff = end - start;
268 if (mHipSparseDeviceSolver) {
269 for (
auto &adapter : mHipSG4Adapters)
271 mHipSparseDeviceSolver->deviceSolution(),
272 synchronizeNodeOutputs);
282 constexpr Int maxNewtonIterations = 40;
283 bool converged =
false;
284 for (
Int iteration = 0; iteration < maxNewtonIterations; ++iteration) {
285 bool allConverged =
true;
295 component->mnaPrepareNonlinearIteration();
306 "Nonlinear MNA Newton iteration failed to converge at time " +
307 std::to_string(time));
311 profileStart = std::chrono::steady_clock::now();
312 if (synchronizeNodeOutputs)
315 profileEnd = std::chrono::steady_clock::now();
323template <
typename VarType>
326 const auto profileStart = std::chrono::steady_clock::now();
336 const auto profileEnd = std::chrono::steady_clock::now();
343 auto start = std::chrono::steady_clock::now();
346 auto end = std::chrono::steady_clock::now();
347 std::chrono::duration<Real> diff = end - start;
354template <
typename VarType>
380 for (std::size_t i = 0; i < (1ULL <<
mSwitches.size()); i++) {
381 auto bit = std::bitset<SWITCH_NUM>(i);
396 for (
Int freq = 0; freq <
mSystem.mFrequencies.size(); ++freq) {
397 auto bit = std::bitset<SWITCH_NUM>(i);
410 for (std::size_t i = 0; i < (1ULL <<
mSwitches.size()); i++) {
411 auto bit = std::bitset<SWITCH_NUM>(i);
420template <
typename VarType>
424 initializeHipSG4Adapters();
426 return std::make_shared<MnaSolverDirect<VarType>::SolveTask>(*this);
429template <
typename VarType>
433 initializeHipSG4Adapters();
435 return std::make_shared<MnaSolverDirect<VarType>::SolveTaskRecomp>(*this);
439template <
typename VarType>
441 if (mHipSG4AdaptersInitialized)
448 mHipSG4AdaptersInitialized =
true;
449 std::vector<std::shared_ptr<CPS::EMT::Ph3::SynchronGenerator4OrderVBR>>
451 std::unordered_set<const CPS::MNAInterface *> seen;
452 auto initializeComponent = [
this, &supportedGenerators,
453 &seen](
const auto &component) {
454 if (!component || !seen.insert(component.get()).second)
456 if (
auto generator = std::dynamic_pointer_cast<
458 if (generator->supportsHipBatch())
459 supportedGenerators.push_back(std::move(generator));
461 for (
const auto &component : mMNAComponents)
462 initializeComponent(component);
463 for (
const auto &component : mMNAIntfVariableComps)
464 initializeComponent(component);
465 if (!supportedGenerators.empty())
466 mHipSG4Adapters.emplace_back(
467 std::make_unique<HipSG4BatchAdapter>(std::move(supportedGenerators)));
470 !mHipSG4Adapters.empty()) {
471 bool allRightStampsManaged = !mRightVectorStampOperations.empty();
472 for (
const auto &operation : mRightVectorStampOperations) {
473 if (!operation.compact) {
474 allRightStampsManaged =
false;
478 dynamic_cast<CPS::EMT::Ph3::SynchronGenerator4OrderVBR *
>(
480 const bool isSg4 = generator && generator->supportsHipBatch();
482 allRightStampsManaged =
false;
486 if (!allRightStampsManaged)
487 throw std::runtime_error(
488 "HIP sparse solvers require fully supported device-side RHS "
489 "assembly; select the IEEE118 allssn aggregate configuration.");
490 mHipSparseDeviceSolver =
dynamic_cast<HipSparseDeviceSolver *
>(
491 mDirectLinearSolverVariableSystemMatrix.get());
492 if (!mHipSparseDeviceSolver)
493 throw std::runtime_error(
494 "HIP sparse implementation did not create its device solver");
495 for (
auto &adapter : mHipSG4Adapters) {
496 adapter->configureDeviceAssembly(
497 mVariableSystemMatrix, mBaseSystemMatrix,
498 mHipSparseDeviceSolver->deviceValues(),
499 mHipSparseDeviceSolver->deviceRightHandSide());
501 mHipDeviceAssemblyReady =
true;
505template <
typename VarType>
507 for (
auto &adapter : mHipSG4Adapters)
508 adapter->preStep(time);
511template <
typename VarType>
513 for (
auto &adapter : mHipSG4Adapters)
514 adapter->postStep(leftVector);
518template <
typename VarType>
520 std::unordered_map<const Matrix *, CPS::MNAInterface *> compactStamps;
521 auto collect = [&compactStamps](
const auto &components) {
522 for (
const auto &component : components) {
523 if (!component->mnaHasCompactRightSideVectorStamp())
525 auto stamp = component->getRightVector();
526 if (stamp->get().size() != 0)
527 compactStamps.emplace(&stamp->get(), component.get());
538 const Matrix *stampMatrix = &stamp->get();
539 const auto compact = compactStamps.find(stampMatrix);
540 if (compact != compactStamps.end())
547template <
typename VarType>
549 using Clock = std::chrono::steady_clock;
551 const auto start = profile ? Clock::now() : Clock::time_point{};
552 std::chrono::nanoseconds compactTime{};
554 if (operation.compact) {
555 const auto compactStart = profile ? Clock::now() : Clock::time_point{};
556 operation.compact->mnaAddCompactRightSideVectorStamp(rightVector);
558 compactTime += std::chrono::duration_cast<std::chrono::nanoseconds>(
559 Clock::now() - compactStart);
562 rightVector += *operation.dense;
567 const auto end = Clock::now();
569 start + compactTime);
571 start + compactTime, end);
575template <
typename VarType>
576std::shared_ptr<CPS::Task>
578 return std::make_shared<MnaSolverDirect<VarType>::SolveTaskHarm>(*
this,
582template <
typename VarType>
583std::shared_ptr<CPS::Task>
585 return std::make_shared<
589template <
typename VarType>
591 return std::make_shared<MnaSolverDirect<VarType>::LogTask>(*this);
594template <
typename VarType>
599 auto profileStart = profile ? std::chrono::steady_clock::now()
600 : std::chrono::steady_clock::time_point{};
604 std::chrono::steady_clock::now());
607 updateHipSG4PreStep(time);
614 profileStart = profile ? std::chrono::steady_clock::now()
615 : std::chrono::steady_clock::time_point{};
619 std::chrono::steady_clock::now());
623 std::chrono::steady_clock::time_point start;
625 start = std::chrono::steady_clock::now();
631 auto end = std::chrono::steady_clock::now();
632 std::chrono::duration<Real> diff = end - start;
640 profileStart = profile ? std::chrono::steady_clock::now()
641 : std::chrono::steady_clock::time_point{};
646 std::chrono::steady_clock::now());
653 UInt numCompsRequireIter;
656 numCompsRequireIter = 0;
657 profileStart = profile ? std::chrono::steady_clock::now()
658 : std::chrono::steady_clock::time_point{};
660 if (syncGen->requiresIteration())
661 numCompsRequireIter++;
665 std::chrono::steady_clock::now());
668 if (numCompsRequireIter > 0) {
677 profileStart = profile ? std::chrono::steady_clock::now()
678 : std::chrono::steady_clock::time_point{};
680 syncGen->correctorStep();
684 std::chrono::steady_clock::now());
690 auto start = std::chrono::steady_clock::now();
693 auto end = std::chrono::steady_clock::now();
694 std::chrono::duration<Real> diff = end - start;
702 profileStart = profile ? std::chrono::steady_clock::now()
703 : std::chrono::steady_clock::time_point{};
709 std::chrono::steady_clock::now());
711 }
while (numCompsRequireIter > 0);
721 profileStart = profile ? std::chrono::steady_clock::now()
722 : std::chrono::steady_clock::time_point{};
727 std::chrono::steady_clock::now());
732template <
typename VarType>
744 std::bitset<SWITCH_NUM> switchStatus;
746 switchStatus.set(i,
mSwitches[i]->mnaIsClosed());
754 for (
UInt i = 0; i < mSwitchedMatrices[std::bitset<SWITCH_NUM>(0)].size();
756 SPDLOG_LOGGER_INFO(
mSLog,
"System matrix for frequency: {:d} \n{:s}", i,
762 SPDLOG_LOGGER_INFO(
mSLog,
"Right side vector for frequency: {:d} \n{:s}",
767 SPDLOG_LOGGER_INFO(
mSLog,
"Summarizing matrices: ");
768 SPDLOG_LOGGER_INFO(
mSLog,
"Base matrix with only static elements: {}",
770 SPDLOG_LOGGER_INFO(
mSLog,
"Initial system matrix with variable elements {}",
772 SPDLOG_LOGGER_INFO(
mSLog,
"Right side vector: {}",
776 SPDLOG_LOGGER_INFO(
mSLog,
"System matrix: \n{}",
779 SPDLOG_LOGGER_INFO(
mSLog,
"Initial switch status: {:s}",
783 SPDLOG_LOGGER_INFO(
mSLog,
"Switching System matrix {:s} \n{:s}",
784 sys.first.to_string(),
793 const auto safeName = safeLogFileComponent(this->
mName);
798 const auto &measurement = entry.second;
799 const double averageNs =
800 measurement.count == 0
802 :
static_cast<double>(measurement.total.count()) /
804 SPDLOG_LOGGER_INFO(
mSLog,
805 "DEEP_TIMING_PHASE,{},{:.9f},{:.3f},{:.3f},{:.3f},{}",
806 entry.first, measurement.total.count() * 1e-9,
807 averageNs * 1e-3, measurement.minimum.count() * 1e-3,
808 measurement.maximum.count() * 1e-3, measurement.count);
811 "_SolverPhaseTimes.csv");
812 phaseFile <<
"phase,total_s,avg_us,min_us,max_us,calls\n";
814 const auto &measurement = entry.second;
815 const double count =
static_cast<double>(measurement.count);
816 phaseFile << entry.first <<
"," << measurement.total.count() * 1e-9 <<
","
817 << (count ? measurement.total.count() / count * 1e-3 : 0.) <<
","
818 << measurement.minimum.count() * 1e-3 <<
","
819 << measurement.maximum.count() * 1e-3 <<
"," << measurement.count
822 phaseFile <<
"rhs_dense_stamp_component_calls,0,0,0,0,"
824 phaseFile <<
"rhs_compact_stamp_component_calls,0,0,0,0,"
827 if (operation.compact)
828 operation.compact->mnaWriteProfile(phaseFile);
829 if (
auto dense = std::dynamic_pointer_cast<DenseLUAdapter>(
831 dense->writeDetailedProfile(phaseFile);
832 if (
auto dense = std::dynamic_pointer_cast<DenseLUAdapter>(
835 "_SolverDiagnostics.csv");
836 dense->writeDetailedDiagnostics(diagnostics);
839 "_SolverMatrixStats.csv");
841 const char *matrixSource =
"variable_system_matrix";
845 !activeMatrix->second.empty()) {
846 profiledMatrix = &activeMatrix->second.front();
847 matrixSource =
"active_switched_matrix";
851 <<
"source,rows,cols,nonzeros,structural_density,variable_entries\n";
852 const double matrixSize =
static_cast<double>(profiledMatrix->rows());
853 const double matrixEntries = matrixSize * matrixSize;
854 matrixFile << matrixSource <<
"," << profiledMatrix->rows() <<
","
855 << profiledMatrix->cols() <<
"," << profiledMatrix->nonZeros()
857 << (matrixEntries ? profiledMatrix->nonZeros() / matrixEntries
865 phaseFile <<
"initial_factorization," << total <<
","
867 << *bounds.first * 1e6 <<
"," << *bounds.second * 1e6 <<
","
872template <
typename VarType>
874 const String &phase, std::chrono::steady_clock::time_point start,
875 std::chrono::steady_clock::time_point end) {
877 std::chrono::duration_cast<std::chrono::nanoseconds>(end - start);
879 if (measurement.count == 0) {
880 measurement.minimum = elapsed;
881 measurement.maximum = elapsed;
883 measurement.minimum = std::min(measurement.minimum, elapsed);
884 measurement.maximum = std::max(measurement.maximum, elapsed);
886 measurement.total += elapsed;
898 SPDLOG_LOGGER_INFO(
mSLog,
"Cumulative solve times: {:.12f}", solveSum);
899 SPDLOG_LOGGER_INFO(
mSLog,
"Average solve time: {:.12f}",
900 solveSum /
static_cast<double>(
mSolveTimes.size()));
901 SPDLOG_LOGGER_INFO(
mSLog,
"Maximum solve time: {:.12f}", solveMax);
905template <
typename VarType>
908 SPDLOG_LOGGER_INFO(
mSLog,
"LU factorization time: {:.12f}", meas);
912template <
typename VarType>
914 Real recompSum = 0.0;
915 Real recompMax = 0.0;
918 if (meas > recompMax)
923 SPDLOG_LOGGER_INFO(
mSLog,
"Cumulative refactorization times: {:.12f}",
925 SPDLOG_LOGGER_INFO(
mSLog,
"Average refactorization time: {:.12f}",
927 SPDLOG_LOGGER_INFO(
mSLog,
"Maximum refactorization time: {:.12f}",
929 SPDLOG_LOGGER_INFO(
mSLog,
"Number of refactorizations: {:d}",
934template <
typename VarType>
935std::shared_ptr<DirectLinearSolver>
940 return std::make_shared<DenseLUAdapter>(
mSLog);
943 return std::make_shared<SparseLUAdapter>(
mSLog);
947 return std::make_shared<KLUAdapter>(
mSLog);
951 return std::make_shared<GpuDenseAdapter>(
mSLog);
952#ifdef WITH_CUDA_SPARSE
954 return std::make_shared<GpuSparseAdapter>(
mSLog);
958 return std::make_shared<GpuMagmaAdapter>(
mSLog);
963 return std::make_shared<MetalDenseAdapter>(
mSLog);
965 return std::make_shared<MetalSparseBiCGSTABAdapter>(
mSLog);
969 return std::make_shared<HipSparseQrAdapter>(
mSLog);
971 return std::make_shared<HipDenseAdapter>(
mSLog);
973 return std::make_shared<HipSparseBiCGStabAdapter>(
mSLog);
976 return std::make_shared<HipSparseLURefactorAdapter>(
mSLog);
979 "HIP sparse LU refactorization requires the KLU seed solver");
987template <
typename VarType>
993template <
typename VarType>
Voltage-Behind-Reactance (VBR) implementation of 4th order synchronous generator model.
spdlog::level::level_enum Level
std::shared_ptr< spdlog::logger > Log
static String matrixToString(const Matrix &mat)
static void clearSparseMatrixValueCache(SparseMatrixRow &mat)
static void prepareSparseMatrixValueCache(SparseMatrixRow &mat)
Solver class using Modified Nodal Analysis (MNA).
std::size_t mDenseRightVectorStampCalls
std::shared_ptr< CPS::Task > createSolveTask() override
Create a solve task for this solver implementation.
void stampVariableSystemMatrix() override
Stamps components into the variable system matrix.
void logSolveTime()
Logging of the right-hand-side solution time.
std::vector< RightVectorStamp > mRightVectorStampOperations
void logFactorizationTime()
Logging of the LU factorization time.
void extractStateSpace(Real time)
Runs state-space extraction using the active linear solver.
void solve(Real time, Int timeStepCount) override
Solves system for single frequency.
void logRecomputationTime()
Logging of the LU refactorization time.
virtual void recomputeSystemMatrix(Real time)
Recomputes systems matrix.
SparseMatrix mVariableSystemMatrix
System matrix including stamp of static and variable elements.
SparseMatrix mBaseSystemMatrix
System matrix including all static elements.
std::unordered_map< std::bitset< SWITCH_NUM >, std::vector< SparseMatrix > > mSwitchedMatrices
Map of system matrices where the key is the bitset describing the switch states.
std::shared_ptr< DirectLinearSolver > createDirectSolverImplementation(CPS::Logger::Log mSLog)
Returns a pointer to an object of type DirectLinearSolver.
void addRightVectorStamps(Matrix &rightVector)
void setDirectLinearSolverConfiguration(DirectLinearSolverConfiguration &configuration) override
Sets the linear solver configuration.
DirectLinearSolverImpl mImplementationInUse
LU factorization indicator.
std::shared_ptr< DirectLinearSolver > mDirectLinearSolverVariableSystemMatrix
LU factorization of variable system matrix.
void recordProfileMeasurement(const String &phase, std::chrono::steady_clock::time_point start, std::chrono::steady_clock::time_point end)
void setDirectLinearSolverImplementation(DirectLinearSolverImpl implementation)
Sets the linear solver to "implementation" and creates an object.
Bool mSystemMatrixChanged
Tracks active MNA system-matrix changes from the last solve step.
std::shared_ptr< CPS::Task > createSolveTaskHarm(UInt freqIdx) override
Create a solve task for this solver implementation.
std::size_t mCompactRightVectorStampCalls
std::shared_ptr< CPS::Task > createSolveTaskRecomp() override
Create a solve task for recomputation solver.
void logSystemMatrices() override
Logging of system matrices and source vector.
Bool mVariableComponentChanged
Tracks variable-component changes from the last solve step.
void createEmptySystemMatrix() override
Create system matrix.
std::shared_ptr< CPS::Task > createLogTask() override
Create a solve task for this solver implementation.
void logLUTimes() override
log LU decomposition times
void switchedMatrixEmpty(std::size_t index) override
Sets all entries in the matrix with the given switch index to zero.
void solveWithSystemMatrixRecomputation(Real time, Int timeStepCount) override
Solves the system with variable system matrix.
std::shared_ptr< CPS::Task > createStateSpaceExtractionTask() override
Create state-space extraction task for this solver implementation.
void switchedMatrixStamp(std::size_t index, std::vector< std::shared_ptr< CPS::MNAInterface > > &comp) override
Applies a component stamp to the matrix with the given switch index.
std::unordered_map< std::bitset< SWITCH_NUM >, std::vector< std::shared_ptr< DirectLinearSolver > > > mDirectLinearSolvers
Map of direct linear solvers related to the system matrices.
void prepareCompactRightVectorStamps()
MnaSolverDirect(String name, CPS::Domain domain=CPS::Domain::DP, CPS::Logger::Level logLevel=CPS::Logger::Level::info)
DirectLinearSolverConfiguration mConfigurationInUse
LU factorization configuration.
void solveWithHarmonics(Real time, Int timeStepCount, Int freqIdx) override
Solves system for multiple frequencies.
std::map< String, ProfileMeasurement > mProfileMeasurements
virtual ~MnaSolverDirect()
Destructor.
std::bitset< SWITCH_NUM > mCurrentSwitchStatus
Current status of all switches encoded as bitset.
std::vector< Matrix > mRightSideVectorHarm
Source vector of known quantities.
Matrix mRightSideVector
Source vector of known quantities.
CPS::SystemTopology mSystem
System topology.
Matrix * mLeftSideVectorValue
Cached payload for the per-step solver hot path.
std::vector< Real > mRecomputationTimes
LU refactorization measurements.
std::vector< Real > mFactorizeTimes
LU factorization measurements.
std::vector< CPS::Attribute< Matrix >::Ptr > mLeftSideVectorHarm
Solution vector of unknown quantities (parallel frequencies)
Bool hasVariableComponentChanged()
Checks whether the status of variable MNA elements have changed.
CPS::MNAInterface::List mMNAIntfVariableComps
List of variable components if they must be accessed as MNAInterface objects.
UInt mNumNetNodes
Number of network nodes, single line equivalent.
MNAStateSpaceExtractor::Ptr mStateSpaceExtractor
Extractor for the MNA-coupled state-space model.
UInt mNumTotalMatrixNodeIndices
Total number of network and virtual nodes, considering individual phases and additional frequencies.
CPS::MNASyncGenInterface::List mSyncGen
List of synchronous generators that need iterate to solve the differential equations.
void updateSwitchStatus()
Collects the status of switches to select correct system matrix.
std::vector< Real > mSolveTimes
Right-hand side solution measurements.
std::vector< std::pair< UInt, UInt > > mListVariableSystemMatrixEntries
List of index pairs of varying matrix entries.
CPS::MNAVariableCompInterface::List mVariableComps
Int mNumRecomputations
Number of system matrix recomputations.
CPS::MNAInterface::List mMNAComponents
List of MNA components with static stamp into system matrix.
UInt mNumMatrixNodeIndices
Number of network and virtual nodes, considering individual phases.
CPS::MNANonlinearCompInterface::List mNonlinearComps
MnaSolver(String name, CPS::Domain domain=CPS::Domain::DP, CPS::Logger::Level logLevel=CPS::Logger::Level::info)
Constructor should not be called by users but by Simulation.
std::vector< CPS::Attribute< Matrix >::Ptr > mRightVectorStamps
List of all right side vector contributions.
CPS::Attribute< Matrix >::Ptr mLeftSideVector
Solution vector of unknown quantities.
CPS::MNASwitchInterface::List mSwitches
CPS::SimNode< VarType >::List mNodes
List of simulation nodes.
String mName
Name for logging.
Bool mSystemMatrixRecomputationEnabled
Effective system-matrix recomputation setting used by the solver.
CPS::Logger::Log mSLog
Logger.
Bool mIsInInitialization
Determines if solver is in initialization phase, which requires different behavior.
Bool mLogSolveTimes
Collect step time for logging.
Bool mFrequencyParallel
Activates parallelized computation of frequencies.
Bool mZeroSkipping
Skip exact zero contributions during matrix assembly (enabled by default).
CPS::SparseMatrixRow SparseMatrix