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 .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2

build:
os: ubuntu-24.04
os: ubuntu-26.04
tools:
python: "3.12"
apt_packages:
Expand Down
14 changes: 7 additions & 7 deletions GridKit/Model/PowerElectronics/CircuitComponent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ namespace GridKit
*
* Most components do not need state and residual storages. The most notable exception
* is currently the system, so a separate flag is provided for the system.
* Systems still can't directly access `y_`, `yp_`, and `f_`, so they need
* their corresponding `y_int_`, `yp_int_`, and `f_int_` set, since there isn't
* Systems still can't directly access \ref y_, \ref yp_, and \ref f_, so they need
* their corresponding \ref y_int_, \ref yp_int_, and \ref f_int_ set, since there isn't
* another system above them to set it.
*
* @todo This is a weird exception specifically for systems - and in a hierarchical setting
Expand Down Expand Up @@ -478,7 +478,7 @@ namespace GridKit
/**
* @brief A set of variable indices which correspond to the external variables. Variables indices not in this set are internal.
*
* @invariant Must have a size of n_extern_. Each element must be in the range [0, `size_` - 1]. Not currently verified anywhere.
* @invariant Must have a size of \ref n_extern_. Each element must be in the range [0, \ref size_ - 1]. Not currently verified anywhere.
*/
std::set<IdxT> extern_indices_;
/**
Expand All @@ -490,7 +490,7 @@ namespace GridKit
std::unique_ptr<IdxT[]> connection_nodes_;

protected:
/// The number of variables in this component. Should be equal to `n_extern_` plus `n_intern_`. \see size()
/// The number of variables in this component. Should be equal to \ref n_extern_ plus \ref n_intern_. \see size()
IdxT size_{0};
/// The number of nonzero elements in this component's Jacobian. \see nnz()
IdxT nnz_{0};
Expand All @@ -514,23 +514,23 @@ namespace GridKit

/**
* An array of (input) pointers to state values for external variables.
* \note The size of this array is equal to `size_`, allowing you to index it with the index
* \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
* 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 `size_`, allowing you to index it with the index
* \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
* 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 `size_`, allowing you to index it with the index
* \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
* and dereferencing the pointer in an internal variable index is undefined behavior.
* \see setExternalConnectionNodes()
Expand Down
39 changes: 19 additions & 20 deletions GridKit/Model/PowerElectronics/SystemModelPowerElectronics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,27 @@ namespace GridKit
template <class ScalarT, typename IdxT>
class PowerElectronicsModel : public CircuitComponent<ScalarT, IdxT>
{
using Base = CircuitComponent<ScalarT, IdxT>;
using RealT = Base::RealT;
using CsrMatrixT = Base::CsrMatrixT;
using RealT = typename CircuitComponent<ScalarT, IdxT>::RealT;
using CsrMatrixT = typename CircuitComponent<ScalarT, IdxT>::CsrMatrixT;
using component_type = CircuitComponent<ScalarT, IdxT>;
using node_type = PowerElectronics::NodeBase<ScalarT, IdxT>;

using Base::abs_tol_;
using Base::allocated_;
using Base::allocateVectors;
using Base::alpha_;
using Base::f_ext_;
using Base::f_int_;
using Base::n_extern_;
using Base::n_intern_;
using Base::nnz_;
using Base::size_;
using Base::tag_;
using Base::time_;
using Base::y_ext_;
using Base::y_int_;
using Base::yp_ext_;
using Base::yp_int_;
using CircuitComponent<ScalarT, IdxT>::abs_tol_;
using CircuitComponent<ScalarT, IdxT>::allocated_;
using CircuitComponent<ScalarT, IdxT>::allocateVectors;
using CircuitComponent<ScalarT, IdxT>::alpha_;
using CircuitComponent<ScalarT, IdxT>::f_ext_;
using CircuitComponent<ScalarT, IdxT>::f_int_;
using CircuitComponent<ScalarT, IdxT>::n_extern_;
using CircuitComponent<ScalarT, IdxT>::n_intern_;
using CircuitComponent<ScalarT, IdxT>::nnz_;
using CircuitComponent<ScalarT, IdxT>::size_;
using CircuitComponent<ScalarT, IdxT>::tag_;
using CircuitComponent<ScalarT, IdxT>::time_;
using CircuitComponent<ScalarT, IdxT>::y_ext_;
using CircuitComponent<ScalarT, IdxT>::y_int_;
using CircuitComponent<ScalarT, IdxT>::yp_ext_;
using CircuitComponent<ScalarT, IdxT>::yp_int_;

public:
/**
Expand Down Expand Up @@ -290,7 +289,7 @@ namespace GridKit
component->initialize();
}

return Base::initialize();
return CircuitComponent<ScalarT, IdxT>::initialize();
}

int tagDifferentiable() final
Expand Down
2 changes: 2 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ if(${DOXYGEN_FOUND})
set(DOXYGEN_GENERATE_TREEVIEW YES)
set(DOXYGEN_TEMPLATE_RELATIONS YES)
set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_EXTRACT_PRIVATE YES)
set(DOXYGEN_SOURCE_BROWSER YES)
set(DOXYGEN_INTERACTIVE_SVG YES)
set(DOXYGEN_DISTRIBUTE_GROUP_DOC YES)
set(DOXYGEN_USE_MATHJAX YES)
set(DOXYGEN_CITE_BIB_FILES ${CMAKE_SOURCE_DIR}/docs/citations.bib)
set(DOXYGEN_QUIET YES)

doxygen_add_docs(GridKitDocs ${CMAKE_SOURCE_DIR}/GridKit ${CMAKE_SOURCE_DIR}/README.md)
endif()
1 change: 1 addition & 0 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ XML_OUTPUT = xml
XML_PROGRAMLISTING = NO

EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
WARN_AS_ERROR = FAIL_ON_WARNINGS
QUIET = YES
Loading