diff --git a/GridKit/LinearAlgebra/Solver/LinearSolver.hpp b/GridKit/LinearAlgebra/Solver/LinearSolver.hpp index 9b4c41c18b..4edb16740f 100644 --- a/GridKit/LinearAlgebra/Solver/LinearSolver.hpp +++ b/GridKit/LinearAlgebra/Solver/LinearSolver.hpp @@ -46,7 +46,7 @@ namespace GridKit * @pre \ref setupSolver must be called first and every time the data of the matrix changes. * @return int An error code, or 0 if none. * - * @todo The data of the `rhs` parameter doesn't change, but we can't mark as cosntant because ReSolve currently requires + * @todo The data of the `rhs` parameter doesn't change, but we can't mark as constant because ReSolve currently requires * a non-`const` pointer for vectors, even if it will only read from that vector. In the future this might change, so this * can be updated to be `const`. */ diff --git a/GridKit/LinearAlgebra/SparseMatrix/CooMatrix.hpp b/GridKit/LinearAlgebra/SparseMatrix/CooMatrix.hpp index 77cc7a5415..904d063b90 100644 --- a/GridKit/LinearAlgebra/SparseMatrix/CooMatrix.hpp +++ b/GridKit/LinearAlgebra/SparseMatrix/CooMatrix.hpp @@ -81,7 +81,7 @@ namespace GridKit bool owns_gpu_sparsity_pattern_{false}; ///< for row/col data bool owns_gpu_values_{false}; ///< for nonzero values - IdxT* map_to_sorted_ = {nullptr}; ///< map from orginal to sorted + IdxT* map_to_sorted_ = {nullptr}; ///< map from original to sorted IdxT* map_to_dedup_ = {nullptr}; ///< map from sorted to deduplicated MemoryManager mem_; ///< Device memory manager object diff --git a/GridKit/LinearAlgebra/SparseMatrix/CsrMatrix.cpp b/GridKit/LinearAlgebra/SparseMatrix/CsrMatrix.cpp index 08adb28e6a..d97aae3aab 100644 --- a/GridKit/LinearAlgebra/SparseMatrix/CsrMatrix.cpp +++ b/GridKit/LinearAlgebra/SparseMatrix/CsrMatrix.cpp @@ -396,7 +396,7 @@ namespace GridKit } /** - * @brief updata matrix values using the _new_values_ provided either as HOST or as DEVICE array. + * @brief update matrix values using the _new_values_ provided either as HOST or as DEVICE array. * * This function will copy the data (not just assign a pointer) and allocate if needed. * It also sets ownership and update flags. @@ -479,7 +479,7 @@ namespace GridKit } /** - * @brief updata matrix values using the _new_values_ provided either as + * @brief update matrix values using the _new_values_ provided either as * HOST or as DEVICE array. * * This function only assigns a pointer, but does not copy. It sets update diff --git a/GridKit/MemoryUtilities/cpu/CpuMemory.hpp b/GridKit/MemoryUtilities/cpu/CpuMemory.hpp index c57addfb21..b47c5e767d 100644 --- a/GridKit/MemoryUtilities/cpu/CpuMemory.hpp +++ b/GridKit/MemoryUtilities/cpu/CpuMemory.hpp @@ -26,7 +26,7 @@ namespace GridKit /** * @brief Dummy function to stand in when GPU support is not enabled. * - * @return Allways return success! + * @return Always return success! */ static int getLastDeviceError() { diff --git a/GridKit/Model/Evaluator.hpp b/GridKit/Model/Evaluator.hpp index 889aa8a84a..11d88c1e29 100644 --- a/GridKit/Model/Evaluator.hpp +++ b/GridKit/Model/Evaluator.hpp @@ -144,7 +144,7 @@ namespace GridKit } /** - * @brief Is the Jacobian defined. Used in IDA to determine wether DQ is used or not + * @brief Is the Jacobian defined. Used in IDA to determine whether DQ is used or not * * @return true * @return false diff --git a/GridKit/Model/PhasorDynamics/Branch/Branch.hpp b/GridKit/Model/PhasorDynamics/Branch/Branch.hpp index b3f3fff8ec..82a5144a21 100644 --- a/GridKit/Model/PhasorDynamics/Branch/Branch.hpp +++ b/GridKit/Model/PhasorDynamics/Branch/Branch.hpp @@ -21,7 +21,7 @@ namespace GridKit * @brief Implementation of a line or off-nominal transformer branch between two buses. * * The model is implemented in Cartesian coordinates. Positive current - * direction is into the busses. + * direction is into the buses. * */ template diff --git a/GridKit/Model/PhasorDynamics/Branch/BranchEnzyme.cpp b/GridKit/Model/PhasorDynamics/Branch/BranchEnzyme.cpp index c742968b66..1409b46643 100644 --- a/GridKit/Model/PhasorDynamics/Branch/BranchEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/Branch/BranchEnzyme.cpp @@ -24,7 +24,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto bus1_size = static_cast(bus1_->size()); auto bus2_size = static_cast(bus2_->size()); auto buffer_size = (bus1_size + bus2_size) * (bus1_size + bus2_size); diff --git a/GridKit/Model/PhasorDynamics/Bus/Bus.hpp b/GridKit/Model/PhasorDynamics/Bus/Bus.hpp index 2c1aa76179..cc2d9f495d 100644 --- a/GridKit/Model/PhasorDynamics/Bus/Bus.hpp +++ b/GridKit/Model/PhasorDynamics/Bus/Bus.hpp @@ -128,7 +128,7 @@ namespace GridKit * @brief Initialize DependencyTracking variable numbers. * * @note Assigns even indices to y and odd indices to yp. - * Should be called in intialize(), after variables have been set (and updated as needed). + * Should be called in initialize(), after variables have been set (and updated as needed). */ int initializeDependencyTrackingVariableNumbers() requires std::is_same_v diff --git a/GridKit/Model/PhasorDynamics/BusFault/BusFault.hpp b/GridKit/Model/PhasorDynamics/BusFault/BusFault.hpp index 405f78e6ca..3966237644 100644 --- a/GridKit/Model/PhasorDynamics/BusFault/BusFault.hpp +++ b/GridKit/Model/PhasorDynamics/BusFault/BusFault.hpp @@ -118,7 +118,7 @@ namespace GridKit bool status_{false}; IdxT bus_id_{0}; - /* Derivied parameters */ + /* Derived parameters */ RealT B_; RealT G_; diff --git a/GridKit/Model/PhasorDynamics/BusFault/BusFaultEnzyme.cpp b/GridKit/Model/PhasorDynamics/BusFault/BusFaultEnzyme.cpp index ba88ca209c..144d7aa7d7 100644 --- a/GridKit/Model/PhasorDynamics/BusFault/BusFaultEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/BusFault/BusFaultEnzyme.cpp @@ -24,7 +24,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto bus_size = static_cast(bus_->size()); auto buffer_size = size * size + 2 * size * bus_size; diff --git a/GridKit/Model/PhasorDynamics/Component.hpp b/GridKit/Model/PhasorDynamics/Component.hpp index a4bf74c7b9..4bc4051ad6 100644 --- a/GridKit/Model/PhasorDynamics/Component.hpp +++ b/GridKit/Model/PhasorDynamics/Component.hpp @@ -415,7 +415,7 @@ namespace GridKit const size_t jac_col = static_cast(col / 2); // For counting purposes, there is no need to distinguish odd and even indices. - // Attempt to insert the colum into the row and increment nnz for new entries. + // Attempt to insert the column into the row and increment nnz for new entries. if (row_map.insert({jac_col, RealT{}}).second) { ++nnz; @@ -508,7 +508,7 @@ namespace GridKit * @brief Initialize DependencyTracking variable numbers. * * @note Assigns even indices to y and odd indices to yp. - * Should be called in intialize(), after variables have been set (and updated as needed). + * Should be called in initialize(), after variables have been set (and updated as needed). */ int initializeDependencyTrackingVariableNumbers() requires std::is_same_v diff --git a/GridKit/Model/PhasorDynamics/Exciter/IEEET1/Ieeet1Enzyme.cpp b/GridKit/Model/PhasorDynamics/Exciter/IEEET1/Ieeet1Enzyme.cpp index 1ece23a468..9272211299 100644 --- a/GridKit/Model/PhasorDynamics/Exciter/IEEET1/Ieeet1Enzyme.cpp +++ b/GridKit/Model/PhasorDynamics/Exciter/IEEET1/Ieeet1Enzyme.cpp @@ -26,7 +26,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto bus_size = static_cast(bus_->size()); auto signal_size = static_cast(ws_.getSize()); diff --git a/GridKit/Model/PhasorDynamics/Exciter/SEXS-PTI/SexsPtiEnzyme.cpp b/GridKit/Model/PhasorDynamics/Exciter/SEXS-PTI/SexsPtiEnzyme.cpp index 2687ef8046..1335ab6f2b 100644 --- a/GridKit/Model/PhasorDynamics/Exciter/SEXS-PTI/SexsPtiEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/Exciter/SEXS-PTI/SexsPtiEnzyme.cpp @@ -21,7 +21,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto bus_size = static_cast(bus_->size()); auto signal_size = static_cast(ws_.getSize()); diff --git a/GridKit/Model/PhasorDynamics/Governor/Tgov1/Tgov1Enzyme.cpp b/GridKit/Model/PhasorDynamics/Governor/Tgov1/Tgov1Enzyme.cpp index dd78ad007f..b8f79fddee 100644 --- a/GridKit/Model/PhasorDynamics/Governor/Tgov1/Tgov1Enzyme.cpp +++ b/GridKit/Model/PhasorDynamics/Governor/Tgov1/Tgov1Enzyme.cpp @@ -26,7 +26,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto signal_size = static_cast(ws_.getSize()); auto buffer_size = 2 * size * size + size * signal_size; diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZ.hpp b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZ.hpp index c27866a38a..008abceeb7 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZ.hpp +++ b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZ.hpp @@ -111,7 +111,7 @@ namespace GridKit RealT R_{0.1}; RealT X_{0.01}; - /* Derivied parameters */ + /* Derived parameters */ RealT b_; RealT g_; diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZEnzyme.cpp b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZEnzyme.cpp index 965390e222..0348f9b24a 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZEnzyme.cpp @@ -24,7 +24,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto bus_size = static_cast(bus_->size()); auto buffer_size = size * size + 2 * size * bus_size; diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPEnzyme.cpp b/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPEnzyme.cpp index 6465b08a5a..a3190886f2 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPEnzyme.cpp @@ -19,7 +19,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto bus_size = static_cast(bus_->size()); auto buffer_size = size * size + 2 * size * bus_size; diff --git a/GridKit/Model/PhasorDynamics/SignalNode/SignalNodeSet.hpp b/GridKit/Model/PhasorDynamics/SignalNode/SignalNodeSet.hpp index 00c704ceaa..9da14200aa 100644 --- a/GridKit/Model/PhasorDynamics/SignalNode/SignalNodeSet.hpp +++ b/GridKit/Model/PhasorDynamics/SignalNode/SignalNodeSet.hpp @@ -19,7 +19,7 @@ namespace GridKit namespace PhasorDynamics { /** - * @brief Manage a collection of signal nodes specifed for a system model + * @brief Manage a collection of signal nodes specified for a system model * * This class manages the memory and access of signal nodes for a * SystemModel. A SignalNode can be accessed either by id or name. diff --git a/GridKit/Model/PhasorDynamics/Stabilizer/IEEEST/IeeestEnzyme.cpp b/GridKit/Model/PhasorDynamics/Stabilizer/IEEEST/IeeestEnzyme.cpp index eabaed17d8..4a421a8475 100644 --- a/GridKit/Model/PhasorDynamics/Stabilizer/IEEEST/IeeestEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/Stabilizer/IEEEST/IeeestEnzyme.cpp @@ -28,7 +28,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto signal_size = static_cast(ws_.getSize()); auto buffer_size = 2 * size * size + size * signal_size; diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/Genrou.hpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/Genrou.hpp index e02704ca5b..8241aac801 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/Genrou.hpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/Genrou.hpp @@ -200,7 +200,7 @@ namespace GridKit RealT S12_{0.0}; RealT mva_base_{100.0}; - /* Derivied parameters */ + /* Derived parameters */ RealT SA_; RealT SB_; RealT Xd1_; diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouEnzyme.cpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouEnzyme.cpp index 5d473db8f7..b33c98a55d 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouEnzyme.cpp @@ -24,7 +24,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto bus_size = static_cast(bus_->size()); auto signal_size = static_cast(ws_.getSize()); diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalEnzyme.cpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalEnzyme.cpp index 354c8428c6..fc5d581e27 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalEnzyme.cpp @@ -24,7 +24,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto bus_size = static_cast(bus_->size()); auto signal_size = static_cast(ws_.getSize()); diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalEnzyme.cpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalEnzyme.cpp index 72475bd909..4e522fda48 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalEnzyme.cpp @@ -24,7 +24,7 @@ namespace GridKit { // Reserve space for the dense blocks. // The size of the buffer is the sum of maximum capacities of the blocks. - // Enyme will compute the appropriate nnz from sparsification. + // Enzyme will compute the appropriate nnz from sparsification. auto size = static_cast(size_); auto bus_size = static_cast(bus_->size()); auto signal_size = static_cast(ws_.getSize()); diff --git a/GridKit/Model/PhasorDynamics/SystemModelEnzyme.cpp b/GridKit/Model/PhasorDynamics/SystemModelEnzyme.cpp index caae1c377e..5f847533e6 100644 --- a/GridKit/Model/PhasorDynamics/SystemModelEnzyme.cpp +++ b/GridKit/Model/PhasorDynamics/SystemModelEnzyme.cpp @@ -165,7 +165,7 @@ namespace GridKit const IdxT* map_to_sorted = jac.getMapToSorted(); const IdxT* map_to_dedup = jac.getMapToDeduplicated(); - // Build a mappping from original COO index to CSR index + // Build a mapping from original COO index to CSR index map_to_csr_ = new IdxT[static_cast(nnz_dup)]; for (IdxT i = 0; i < nnz_dup; ++i) { diff --git a/GridKit/Model/PhasorDynamics/SystemModelImpl.hpp b/GridKit/Model/PhasorDynamics/SystemModelImpl.hpp index 598f1d23db..1cba9db950 100644 --- a/GridKit/Model/PhasorDynamics/SystemModelImpl.hpp +++ b/GridKit/Model/PhasorDynamics/SystemModelImpl.hpp @@ -540,7 +540,7 @@ namespace GridKit * @todo Implement writing to system vectors in a thread-safe way. * * @note Currently assuming each component stores variables contiguously in memory and - * that these are simply concateneted in the global system. + * that these are simply concatenated in the global system. */ template int SystemModel::initialize() @@ -688,7 +688,7 @@ namespace GridKit * residuals are computed. Buses own residuals for currents * Ir and Ii, but the contributions to these residuals come * from components. Buses assign their residual values, while components - * add to those values by in-place adition. This is why (for now) bus + * add to those values by in-place addition. This is why (for now) bus * residuals need to be computed first. */ template @@ -826,7 +826,7 @@ namespace GridKit SystemModel::ComponentT* SystemModel::getComponent(IdxT gridkit_component_id) { - // gridkit_component_id_ is set by System model and guarantied to be unique + // gridkit_component_id_ is set by System model and guaranteed to be unique return components_[gridkit_component_id]; } diff --git a/GridKit/Model/PowerElectronics/Capacitor/Capacitor.cpp b/GridKit/Model/PowerElectronics/Capacitor/Capacitor.cpp index 1fe6e1907c..d6465a8b02 100644 --- a/GridKit/Model/PowerElectronics/Capacitor/Capacitor.cpp +++ b/GridKit/Model/PowerElectronics/Capacitor/Capacitor.cpp @@ -73,7 +73,7 @@ namespace GridKit } /** - * @brief Evaluate the resisdual of the Capcitor + * @brief Evaluate the residual of the Capacitor * */ template diff --git a/GridKit/Model/PowerElectronics/Component.hpp b/GridKit/Model/PowerElectronics/Component.hpp index aa7c5c7153..9dead1e8ac 100644 --- a/GridKit/Model/PowerElectronics/Component.hpp +++ b/GridKit/Model/PowerElectronics/Component.hpp @@ -200,7 +200,7 @@ namespace GridKit } /** - * @note Cannot be marked final, since it is overriden to recurse in the system model. + * @note Cannot be marked final, since it is overridden to recurse in the system model. */ void updateTime(RealT t, RealT a) override { @@ -716,7 +716,7 @@ namespace GridKit /** * An array of (input) pointers to state values for external variables. * \note The size of this array is equal to \ref size_, allowing you to index it with the index - * of the variable in question (i.e. consisten with \ref extern_indices_). Therefore, accessing + * of the variable in question (i.e. consistent with \ref extern_indices_). Therefore, accessing * and dereferencing the pointer in an internal variable index is undefined behavior. * \see setExternalConnectionNodes() */ @@ -724,7 +724,7 @@ namespace GridKit /** * An array of (input) pointers to derivative values for external variables. * \note The size of this array is equal to \ref size_, allowing you to index it with the index - * of the variable in question (i.e. consisten with \ref extern_indices_). Therefore, accessing + * of the variable in question (i.e. consistent with \ref extern_indices_). Therefore, accessing * and dereferencing the pointer in an internal variable index is undefined behavior. * \see setExternalConnectionNodes() */ @@ -732,7 +732,7 @@ namespace GridKit /** * An array of (output) pointers to residuals for external variables. * \note The size of this array is equal to \ref size_, allowing you to index it with the index - * of the variable in question (i.e. consisten with \ref extern_indices_). Therefore, accessing + * of the variable in question (i.e. consistent with \ref extern_indices_). Therefore, accessing * and dereferencing the pointer in an internal variable index is undefined behavior. * \see setExternalConnectionNodes() */ diff --git a/GridKit/Model/PowerElectronics/DistributedGenerator/DistributedGenerator.cpp b/GridKit/Model/PowerElectronics/DistributedGenerator/DistributedGenerator.cpp index 44f7914da3..44b471f6de 100644 --- a/GridKit/Model/PowerElectronics/DistributedGenerator/DistributedGenerator.cpp +++ b/GridKit/Model/PowerElectronics/DistributedGenerator/DistributedGenerator.cpp @@ -98,7 +98,7 @@ namespace GridKit } /** - * @brief Contributes to the resisdual of the Distributed Generator + * @brief Contributes to the residual of the Distributed Generator * */ template @@ -111,7 +111,7 @@ namespace GridKit ScalarT vbd_in = std::cos(delta) * *y_ext_[1] + std::sin(delta) * *y_ext_[2]; ScalarT vbq_in = -std::sin(delta) * *y_ext_[1] + std::cos(delta) * *y_ext_[2]; - // ### Internal Componenets ## + // ### Internal Components ## // P and Q equations f_int_[0] = -yp_int_[0] + wc_ * (y_int_[8] * y_int_[10] + y_int_[9] * y_int_[11] - y_int_[0]); f_int_[1] = -yp_int_[1] + wc_ * (-y_int_[8] * y_int_[11] + y_int_[9] * y_int_[10] - y_int_[1]); diff --git a/GridKit/Model/PowerElectronics/InductionMotor/InductionMotor.cpp b/GridKit/Model/PowerElectronics/InductionMotor/InductionMotor.cpp index 41c5c7b400..e5e87cf219 100644 --- a/GridKit/Model/PowerElectronics/InductionMotor/InductionMotor.cpp +++ b/GridKit/Model/PowerElectronics/InductionMotor/InductionMotor.cpp @@ -84,7 +84,7 @@ namespace GridKit } /** - * @brief Contributes to the resisdual + * @brief Contributes to the residual * */ template diff --git a/GridKit/Model/PowerElectronics/Inductor/Inductor.cpp b/GridKit/Model/PowerElectronics/Inductor/Inductor.cpp index 2d367b608a..b699e7b29a 100644 --- a/GridKit/Model/PowerElectronics/Inductor/Inductor.cpp +++ b/GridKit/Model/PowerElectronics/Inductor/Inductor.cpp @@ -72,7 +72,7 @@ namespace GridKit } /** - * @brief Compute the resisdual of the component + * @brief Compute the residual of the component * */ template diff --git a/GridKit/Model/PowerElectronics/LinearTransformer/LinearTransformer.cpp b/GridKit/Model/PowerElectronics/LinearTransformer/LinearTransformer.cpp index 9e33b79c2d..d61d25a3a0 100644 --- a/GridKit/Model/PowerElectronics/LinearTransformer/LinearTransformer.cpp +++ b/GridKit/Model/PowerElectronics/LinearTransformer/LinearTransformer.cpp @@ -86,7 +86,7 @@ namespace GridKit } /** - * @brief Computes the component resisdual + * @brief Computes the component residual */ template int LinearTransformer::evaluateInternalResidual() diff --git a/GridKit/Model/PowerElectronics/MicrogridBusDQ/MicrogridBusDQ.cpp b/GridKit/Model/PowerElectronics/MicrogridBusDQ/MicrogridBusDQ.cpp index fec34aa9c8..f76c5ec5d0 100644 --- a/GridKit/Model/PowerElectronics/MicrogridBusDQ/MicrogridBusDQ.cpp +++ b/GridKit/Model/PowerElectronics/MicrogridBusDQ/MicrogridBusDQ.cpp @@ -84,7 +84,7 @@ namespace GridKit * This model has "Virtual resistors". The voltage of the bus divided by its virtual resistance. * The components are external to allow for outside components to add inductances to the terms. * - * refernce to equations in class header + * reference to equations in class header * */ template diff --git a/GridKit/Model/PowerElectronics/Resistor/Resistor.cpp b/GridKit/Model/PowerElectronics/Resistor/Resistor.cpp index 0284bafaf4..7afb8a190a 100644 --- a/GridKit/Model/PowerElectronics/Resistor/Resistor.cpp +++ b/GridKit/Model/PowerElectronics/Resistor/Resistor.cpp @@ -69,7 +69,7 @@ namespace GridKit } /** - * @brief Computes the resistors resisdual + * @brief Computes the resistors residual * */ template @@ -83,7 +83,7 @@ namespace GridKit { // input *f_ext_[0] += (*y_ext_[0] - *y_ext_[1]) / R_; - // ouput + // output *f_ext_[1] += (*y_ext_[1] - *y_ext_[0]) / R_; return 0; } diff --git a/GridKit/Model/PowerElectronics/SynchronousMachine/SynchronousMachine.cpp b/GridKit/Model/PowerElectronics/SynchronousMachine/SynchronousMachine.cpp index f1e1f6d8d7..e834320bed 100644 --- a/GridKit/Model/PowerElectronics/SynchronousMachine/SynchronousMachine.cpp +++ b/GridKit/Model/PowerElectronics/SynchronousMachine/SynchronousMachine.cpp @@ -102,7 +102,7 @@ namespace GridKit } /** - * @brief Compute the resisdual of the component. + * @brief Compute the residual of the component. * * @todo not finished */ diff --git a/GridKit/Model/PowerElectronics/SystemModel.hpp b/GridKit/Model/PowerElectronics/SystemModel.hpp index c3a997b9c0..022a118957 100644 --- a/GridKit/Model/PowerElectronics/SystemModel.hpp +++ b/GridKit/Model/PowerElectronics/SystemModel.hpp @@ -84,7 +84,7 @@ namespace GridKit } /** - * @brief Will check if each component has jacobian avalible. If one doesn't have it, return false. + * @brief Will check if each component has jacobian available. If one doesn't have it, return false. * * * @return true if all components have jacobian @@ -266,7 +266,7 @@ namespace GridKit const IdxT* map_to_sorted = jac.getMapToSorted(); const IdxT* map_to_dedup = jac.getMapToDeduplicated(); - // Build a mappping from original COO index to CSR index + // Build a mapping from original COO index to CSR index map_to_csr_ = new IdxT[nnz_dup]; for (IdxT i = 0; i < nnz_dup; ++i) { @@ -278,7 +278,7 @@ namespace GridKit } /** - * @brief Set intial y and y' of each component + * @brief Set initial y and y' of each component * * @return int 0 if successful, positive if there's a recoverable error, negative if unrecoverable */ @@ -377,7 +377,7 @@ namespace GridKit // Update system residual vector - // Evaluate component internal residuals - this is embarassingly parallel + // Evaluate component internal residuals - this is embarrassingly parallel for (component_type* component : components_) { if (int err_code = component->evaluateInternalResidual()) diff --git a/GridKit/Model/PowerElectronics/TransmissionLine/TransmissionLine.cpp b/GridKit/Model/PowerElectronics/TransmissionLine/TransmissionLine.cpp index cd120c2de6..9d250e2c02 100644 --- a/GridKit/Model/PowerElectronics/TransmissionLine/TransmissionLine.cpp +++ b/GridKit/Model/PowerElectronics/TransmissionLine/TransmissionLine.cpp @@ -105,7 +105,7 @@ namespace GridKit template int TransmissionLine::evaluateInternalResidual() { - // Voltage drop accross terminals + // Voltage drop across terminals ScalarT V1re = *y_ext_[0] - *y_ext_[4]; ScalarT V1im = *y_ext_[1] - *y_ext_[5]; ScalarT V2re = *y_ext_[2] - *y_ext_[6]; @@ -132,7 +132,7 @@ namespace GridKit *f_ext_[2] += y_int_[2]; *f_ext_[3] += y_int_[3]; - // ouput + // output *f_ext_[4] += -y_int_[0]; *f_ext_[5] += -y_int_[1]; diff --git a/GridKit/Model/PowerElectronics/VoltageSource/VoltageSource.cpp b/GridKit/Model/PowerElectronics/VoltageSource/VoltageSource.cpp index e29d13de4a..f941f09f3c 100644 --- a/GridKit/Model/PowerElectronics/VoltageSource/VoltageSource.cpp +++ b/GridKit/Model/PowerElectronics/VoltageSource/VoltageSource.cpp @@ -73,7 +73,7 @@ namespace GridKit } /** - * @brief Evaluate resisdual of component + * @brief Evaluate residual of component */ template int VoltageSource::evaluateInternalResidual() @@ -87,7 +87,7 @@ namespace GridKit { // input *f_ext_[0] += -y_int_[0]; - // ouput + // output *f_ext_[1] += y_int_[0]; return 0; } diff --git a/GridKit/Model/PowerFlow/Branch/README.md b/GridKit/Model/PowerFlow/Branch/README.md index bc3e2d24f1..d8a5e8f2b5 100644 --- a/GridKit/Model/PowerFlow/Branch/README.md +++ b/GridKit/Model/PowerFlow/Branch/README.md @@ -96,7 +96,7 @@ P_{r} = \left(g + \frac{G}{2}\right) |V_{r}|^2 + [-g \cos(\theta_s - \theta_r) Q_{r} = -\left(b + \frac{B}{2}\right) |V_{r}|^2 + [ g \sin(\theta_s - \theta_r) + b \cos(\theta_s - \theta_r)] |V_{s}| |V_{r}| ``` -These quantities are treated as _loads_ and are substracted from $P$ and $Q$ residuals computed on the respective buses. +These quantities are treated as _loads_ and are subtracted from $P$ and $Q$ residuals computed on the respective buses. ## Branch Model @@ -108,7 +108,7 @@ The branch model can be created by adding the ideal transformer in series with t Figure 2: Branch equivalent circuit -The branch admitance matrix is then: +The branch admittance matrix is then: ```math \mathbf{Y}_{BR}= diff --git a/GridKit/Model/PowerFlow/Generator4/Generator4.cpp b/GridKit/Model/PowerFlow/Generator4/Generator4.cpp index b76bf57759..bc935e1e5c 100644 --- a/GridKit/Model/PowerFlow/Generator4/Generator4.cpp +++ b/GridKit/Model/PowerFlow/Generator4/Generator4.cpp @@ -92,7 +92,7 @@ namespace GridKit // Compute initial guess for the generator current phase const ScalarT phi = theta() - delta - atan(Q0_ / P0_); - // Compute initial gueses for generator currents and potentials in d-q frame + // Compute initial guesses for generator currents and potentials in d-q frame const ScalarT Id = std::sqrt(P0_ * P0_ + Q0_ * Q0_) / V() * std::sin(phi); const ScalarT Iq = std::sqrt(P0_ * P0_ + Q0_ * Q0_) / V() * std::cos(phi); const ScalarT Ed = V() * std::sin(theta() - delta) + Rs_ * Id + Xqp_ * Iq; diff --git a/GridKit/Model/PowerFlow/Generator4/Generator4.hpp b/GridKit/Model/PowerFlow/Generator4/Generator4.hpp index f5d0e862d2..8d80b1abb3 100644 --- a/GridKit/Model/PowerFlow/Generator4/Generator4.hpp +++ b/GridKit/Model/PowerFlow/Generator4/Generator4.hpp @@ -62,7 +62,7 @@ namespace GridKit alpha_ = a; } - // Inline accesor functions + // Inline accessor functions ScalarT& V() { return bus_->V(); diff --git a/GridKit/Model/PowerFlow/Generator4Governor/Generator4Governor.hpp b/GridKit/Model/PowerFlow/Generator4Governor/Generator4Governor.hpp index 3fd7e37b73..278d260f1b 100644 --- a/GridKit/Model/PowerFlow/Generator4Governor/Generator4Governor.hpp +++ b/GridKit/Model/PowerFlow/Generator4Governor/Generator4Governor.hpp @@ -82,7 +82,7 @@ namespace GridKit public: // - // Public inline accesor functions + // Public inline accessor functions // ScalarT& V() diff --git a/GridKit/Model/PowerFlow/Generator4Param/Generator4Param.cpp b/GridKit/Model/PowerFlow/Generator4Param/Generator4Param.cpp index 9b9f6b629d..d2f8d520e7 100644 --- a/GridKit/Model/PowerFlow/Generator4Param/Generator4Param.cpp +++ b/GridKit/Model/PowerFlow/Generator4Param/Generator4Param.cpp @@ -89,7 +89,7 @@ namespace GridKit // Compute initial guess for the generator current phase const ScalarT phi = theta() - delta - atan(Q0_ / P0_); - // Compute initial gueses for generator currents and potentials in d-q frame + // Compute initial guesses for generator currents and potentials in d-q frame const ScalarT Id = std::sqrt(P0_ * P0_ + Q0_ * Q0_) / V() * std::sin(phi); const ScalarT Iq = std::sqrt(P0_ * P0_ + Q0_ * Q0_) / V() * std::cos(phi); const ScalarT Ed = V() * std::sin(theta() - delta) + Rs_ * Id + Xqp_ * Iq; diff --git a/GridKit/Model/PowerFlow/Generator4Param/Generator4Param.hpp b/GridKit/Model/PowerFlow/Generator4Param/Generator4Param.hpp index d01c5b043a..ce441b438e 100644 --- a/GridKit/Model/PowerFlow/Generator4Param/Generator4Param.hpp +++ b/GridKit/Model/PowerFlow/Generator4Param/Generator4Param.hpp @@ -62,7 +62,7 @@ namespace GridKit alpha_ = a; } - // Inline accesor functions + // Inline accessor functions ScalarT& V() { return bus_->V(); diff --git a/GridKit/Model/PowerFlow/MatpowerParser.hpp b/GridKit/Model/PowerFlow/MatpowerParser.hpp index b55018f2fc..26c0b79a8e 100644 --- a/GridKit/Model/PowerFlow/MatpowerParser.hpp +++ b/GridKit/Model/PowerFlow/MatpowerParser.hpp @@ -63,7 +63,7 @@ namespace GridKit s = std::regex_replace(s, std::regex("%.+"), nothing); } - // Retrive MATPOWER component from assignment line. + // Retrieve MATPOWER component from assignment line. // // For example, the string " mpc.bus = [ ... ] % Some comment" will // return the value "bus". diff --git a/GridKit/Model/PowerFlow/PowerFlowData.hpp b/GridKit/Model/PowerFlow/PowerFlowData.hpp index 3fdd831c9e..5d30c996b4 100644 --- a/GridKit/Model/PowerFlow/PowerFlowData.hpp +++ b/GridKit/Model/PowerFlow/PowerFlowData.hpp @@ -140,8 +140,8 @@ namespace GridKit RealT ratio; ///< Transformer off nominal turns ratio RealT angle; ///< Transformer phase shift angle [deg], positive ⇒ delay IdxT status; ///< Initial service status: 1=in-service, 0=out-of-service - RealT angmin; ///< Minimum anngle difference af - at [deg] - RealT angmax; ///< Maximum anngle difference af - at [deg] + RealT angmin; ///< Minimum angle difference af - at [deg] + RealT angmax; ///< Maximum angle difference af - at [deg] inline std::string str() const { diff --git a/GridKit/Model/PowerFlow/README.md b/GridKit/Model/PowerFlow/README.md index 5c1f0a3d12..22f43ea063 100644 --- a/GridKit/Model/PowerFlow/README.md +++ b/GridKit/Model/PowerFlow/README.md @@ -10,7 +10,7 @@ I_{i}=\sum_{j=1}^{n} Y_{ij}V_{j} ~~~ i=1,2,...,n ``` where $n$ is the number of buses in the network. $I_{i}$ and $V_{j}$ are injected current at bus $i$ and voltage at bus $j$. $Y_{ij}$ are the elements of the admittance matrix **Y**. Diagonal elements $Y_{ii}$ are equal to the sum of all admittances of all devices incident to the bus $i$. Off-diagonal elements $Y_{ij}$ are equal to the **negative** of the sum of the admittances that are joining buses $i$ and $j$. In case that there is shift transformer at the bus, $Y_{ij}$ should be calculated as explained in the branch section. -In the power system, complex voltages are unknows, while voltage magnitude setpoints, active power injections at the generator buses, and complex power (S) consumed by the load are the input parameters. +In the power system, complex voltages are unknowns, while voltage magnitude setpoints, active power injections at the generator buses, and complex power (S) consumed by the load are the input parameters. The relation between injected current and power at the node is given as: ```math S_{i}=P_{i}+jQ_{i}=V_{i}I^*_{i} diff --git a/GridKit/Model/PowerFlow/SystemModel.hpp b/GridKit/Model/PowerFlow/SystemModel.hpp index 586dde1c4d..555828ddec 100644 --- a/GridKit/Model/PowerFlow/SystemModel.hpp +++ b/GridKit/Model/PowerFlow/SystemModel.hpp @@ -120,7 +120,7 @@ namespace GridKit } /** - * @brief Assume that jacobian is not avalible + * @brief Assume that jacobian is not available * * @return true * @return false @@ -143,7 +143,7 @@ namespace GridKit * Also, generators may write to control devices (e.g. governors, * exciters, etc.) during the initialization. * - * @todo Implement writting to system vectors in a thread-safe way. + * @todo Implement writing to system vectors in a thread-safe way. */ int initialize() { @@ -347,7 +347,7 @@ namespace GridKit * residuals are computed. Buses own residuals for active and * power P and Q, but the contributions to these residuals come * from components. Buses assign their residual values, while components - * add to those values by in-place adition. This is why bus residuals + * add to those values by in-place addition. This is why bus residuals * need to be computed first. * * @todo Here, components write to local values, which are then copied diff --git a/GridKit/Model/PowerFlow/SystemModelPowerFlow.hpp b/GridKit/Model/PowerFlow/SystemModelPowerFlow.hpp index 91a316d06d..9b03c719cf 100644 --- a/GridKit/Model/PowerFlow/SystemModelPowerFlow.hpp +++ b/GridKit/Model/PowerFlow/SystemModelPowerFlow.hpp @@ -108,7 +108,7 @@ namespace GridKit } // There is no Generator Cost Object - // TODO: Implment for GenCost + // TODO: Implement for GenCost } /** @@ -172,7 +172,7 @@ namespace GridKit * Also, generators may write to control devices (e.g. governors, * exciters, etc.) during the initialization. * - * @todo Implement writting to system vectors in a thread-safe way. + * @todo Implement writing to system vectors in a thread-safe way. */ int initialize() { @@ -263,7 +263,7 @@ namespace GridKit * residuals are computed. Buses own residuals for active and * power P and Q, but the contributions to these residuals come * from components. Buses assign their residual values, while components - * add to those values by in-place adition. This is why bus residuals + * add to those values by in-place addition. This is why bus residuals * need to be computed first. * * @todo Here, components write to local values, which are then copied diff --git a/GridKit/Solver/Dynamic/Ida.cpp b/GridKit/Solver/Dynamic/Ida.cpp index 638d341a0c..9078bf3205 100644 --- a/GridKit/Solver/Dynamic/Ida.cpp +++ b/GridKit/Solver/Dynamic/Ida.cpp @@ -67,7 +67,7 @@ namespace AnalysisManager yp_ = N_VClone(yy_); checkAllocation((void*) yp_, "N_VClone"); - // get intial conditions + // get initial conditions this->getDefaultInitialCondition(); // Create vectors to store restart initial condition @@ -346,7 +346,7 @@ namespace AnalysisManager if (step_callback.has_value() || model_->monitoring()) { - // The callback may try to observe upated values in the model, so we + // The callback may try to observe updated values in the model, so we // should update them here (At this point, the model's values are one // internal integrator step out of date) updateModelState(tret); @@ -409,7 +409,7 @@ namespace AnalysisManager // Set tolerances and error control for quadratures setQuadratureTolerance(solver_, quadrature_rel_tol_, quadrature_abs_tol_override_); - // Include quadrature in eror checking + // Include quadrature in error checking retval = IDASetQuadErrCon(solver_, SUNTRUE); checkOutput(retval, "IDASetQuadErrCon"); diff --git a/GridKit/Solver/Dynamic/Native/InfNorm.cpp b/GridKit/Solver/Dynamic/Native/InfNorm.cpp index f1edc419e9..1d75c59dc4 100644 --- a/GridKit/Solver/Dynamic/Native/InfNorm.cpp +++ b/GridKit/Solver/Dynamic/Native/InfNorm.cpp @@ -20,7 +20,7 @@ namespace AnalysisManager * @param y \f(y_1\f) in the above formula. * @param yprev \f(y_0\f) in the above formula. * @param handler The handler to be used for performing linear algebra operations. - * @param memspace The memory space to be used for performing linear lagebra operations. + * @param memspace The memory space to be used for performing linear algebra operations. * @see `Rosenbrock::errorEstimate()` */ template diff --git a/GridKit/Solver/Dynamic/Rosenbrock.cpp b/GridKit/Solver/Dynamic/Rosenbrock.cpp index 54d1a2c916..15e845b720 100644 --- a/GridKit/Solver/Dynamic/Rosenbrock.cpp +++ b/GridKit/Solver/Dynamic/Rosenbrock.cpp @@ -865,7 +865,7 @@ namespace AnalysisManager * Uses a number of interpolation nodes equal to the order. Since \f(y_0\f) and \f(y_1\f) are interpolation * nodes, this method will only access \ref dense_coeff_ if the method's order is greater than 2. * - * The inteporlation is calculated as + * The interpolation is calculated as * * \f[y(\theta) = (1 - \theta) y_0 + \theta \left(y_1 + (1 - \theta) \sum_{i = 1}^{p-2} \theta^{i-1} \hat{y}_i\right),\f] * diff --git a/GridKit/Solver/Dynamic/Rosenbrock.hpp b/GridKit/Solver/Dynamic/Rosenbrock.hpp index a535b67404..70ece49fcc 100644 --- a/GridKit/Solver/Dynamic/Rosenbrock.hpp +++ b/GridKit/Solver/Dynamic/Rosenbrock.hpp @@ -372,7 +372,7 @@ namespace AnalysisManager */ const ErrorNorm* err_norm_; /** - * @brief The memory space where linear algebra operations hsould be done in. + * @brief The memory space where linear algebra operations should be done in. * */ GridKit::memory::MemorySpace memspace_; @@ -480,7 +480,7 @@ namespace AnalysisManager */ std::unique_ptr mass_; /** - * @brief Estimated error produced by a step in a method with an empbedded error estimator. + * @brief Estimated error produced by a step in a method with an embedded error estimator. * * @see `Tableau::e` * diff --git a/GridKit/Utilities/CliArgs/CliArgsImpl.hpp b/GridKit/Utilities/CliArgs/CliArgsImpl.hpp index 000238b20b..44e890a3d2 100644 --- a/GridKit/Utilities/CliArgs/CliArgsImpl.hpp +++ b/GridKit/Utilities/CliArgs/CliArgsImpl.hpp @@ -34,7 +34,7 @@ namespace GridKit struct CliArgsImpl { ///@{ - /// @brief Implmentation of CliArgs + /// @brief Implementation of CliArgs CliArgsImpl(std::initializer_list