Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GridKit/LinearAlgebra/Solver/LinearSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
*/
Expand Down
2 changes: 1 addition & 1 deletion GridKit/LinearAlgebra/SparseMatrix/CooMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions GridKit/LinearAlgebra/SparseMatrix/CsrMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion GridKit/MemoryUtilities/cpu/CpuMemory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/Evaluator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/Branch/Branch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename scalar_type, typename index_type>
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/Branch/BranchEnzyme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>(bus1_->size());
auto bus2_size = static_cast<size_t>(bus2_->size());
auto buffer_size = (bus1_size + bus2_size) * (bus1_size + bus2_size);
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/Bus/Bus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ScalarT, DependencyTracking::Variable>
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/BusFault/BusFault.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ namespace GridKit
bool status_{false};
IdxT bus_id_{0};

/* Derivied parameters */
/* Derived parameters */
RealT B_;
RealT G_;

Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/BusFault/BusFaultEnzyme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto bus_size = static_cast<size_t>(bus_->size());
auto buffer_size = size * size + 2 * size * bus_size;
Expand Down
4 changes: 2 additions & 2 deletions GridKit/Model/PhasorDynamics/Component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ namespace GridKit
const size_t jac_col = static_cast<size_t>(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;
Expand Down Expand Up @@ -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<ScalarT, DependencyTracking::Variable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto bus_size = static_cast<size_t>(bus_->size());
auto signal_size = static_cast<size_t>(ws_.getSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto bus_size = static_cast<size_t>(bus_->size());
auto signal_size = static_cast<size_t>(ws_.getSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto signal_size = static_cast<size_t>(ws_.getSize());
auto buffer_size = 2 * size * size + size * signal_size;
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZ.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace GridKit
RealT R_{0.1};
RealT X_{0.01};

/* Derivied parameters */
/* Derived parameters */
RealT b_;
RealT g_;

Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZEnzyme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto bus_size = static_cast<size_t>(bus_->size());
auto buffer_size = size * size + 2 * size * bus_size;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto bus_size = static_cast<size_t>(bus_->size());
auto buffer_size = size * size + 2 * size * bus_size;
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/SignalNode/SignalNodeSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto signal_size = static_cast<size_t>(ws_.getSize());
auto buffer_size = 2 * size * size + size * signal_size;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto bus_size = static_cast<size_t>(bus_->size());
auto signal_size = static_cast<size_t>(ws_.getSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto bus_size = static_cast<size_t>(bus_->size());
auto signal_size = static_cast<size_t>(ws_.getSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_t>(size_);
auto bus_size = static_cast<size_t>(bus_->size());
auto signal_size = static_cast<size_t>(ws_.getSize());
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/SystemModelEnzyme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>(nnz_dup)];
for (IdxT i = 0; i < nnz_dup; ++i)
{
Expand Down
6 changes: 3 additions & 3 deletions GridKit/Model/PhasorDynamics/SystemModelImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename scalar_type, typename index_type>
int SystemModel<scalar_type, index_type>::initialize()
Expand Down Expand Up @@ -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 <typename scalar_type, typename index_type>
Expand Down Expand Up @@ -826,7 +826,7 @@ namespace GridKit
SystemModel<scalar_type, index_type>::ComponentT*
SystemModel<scalar_type, index_type>::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];
}

Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PowerElectronics/Capacitor/Capacitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace GridKit
}

/**
* @brief Evaluate the resisdual of the Capcitor
* @brief Evaluate the residual of the Capacitor
*
*/
template <class ScalarT, typename IdxT>
Expand Down
8 changes: 4 additions & 4 deletions GridKit/Model/PowerElectronics/Component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -716,23 +716,23 @@ 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()
*/
std::unique_ptr<const ScalarT*[]> y_ext_;
/**
* 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()
*/
std::unique_ptr<const ScalarT*[]> yp_ext_;
/**
* 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()
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <class ScalarT, typename IdxT>
Expand All @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace GridKit
}

/**
* @brief Contributes to the resisdual
* @brief Contributes to the residual
*
*/
template <class ScalarT, typename IdxT>
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PowerElectronics/Inductor/Inductor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace GridKit
}

/**
* @brief Compute the resisdual of the component
* @brief Compute the residual of the component
*
*/
template <class ScalarT, typename IdxT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace GridKit
}

/**
* @brief Computes the component resisdual
* @brief Computes the component residual
*/
template <class ScalarT, typename IdxT>
int LinearTransformer<ScalarT, IdxT>::evaluateInternalResidual()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <class ScalarT, typename IdxT>
Expand Down
4 changes: 2 additions & 2 deletions GridKit/Model/PowerElectronics/Resistor/Resistor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace GridKit
}

/**
* @brief Computes the resistors resisdual
* @brief Computes the resistors residual
*
*/
template <class ScalarT, typename IdxT>
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ namespace GridKit
}

/**
* @brief Compute the resisdual of the component.
* @brief Compute the residual of the component.
*
* @todo not finished
*/
Expand Down
Loading
Loading