Skip to content

Commit

Permalink
addressing comments from @aboada
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrzensk committed Oct 25, 2024
1 parent 463b275 commit 0295c8f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/mole_C++/divergence.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @date 2024/10/15
*
*/

#ifndef DIVERGENCE_H
#define DIVERGENCE_H

Expand Down
2 changes: 1 addition & 1 deletion src/mole_C++/laplacian.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file laplacian.h
*
* @brief Mimetic Laplacian Constructors
* @brief Mimetic Laplacian Class and Constructors
*
* @date 2024/10/15
*
Expand Down
2 changes: 1 addition & 1 deletion src/mole_C++/operators.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file operators.h
*
* @brief Sparse operation inline definitions for mimetic members
* @brief Sparse operation inline definitions for mimetic class constructions
* @date 2024/10/15
*
*/
Expand Down
2 changes: 0 additions & 2 deletions src/mole_C++/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
*
*/


#include "utils.h"
#include <cassert>

#ifdef EIGEN
#include <eigen3/Eigen/SparseLU>


vec Utils::spsolve_eigen(const sp_mat &A, const vec &b) {
Eigen::SparseMatrix<Real> eigen_A(A.n_rows, A.n_cols);
std::vector<Eigen::Triplet<Real>> triplets;
Expand Down
15 changes: 13 additions & 2 deletions src/mole_C++/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Utils {
static sp_mat spkron(const sp_mat &A, const sp_mat &B);

/**
* @brief An in place oepration for joining two matrices by rows
* @brief An in place operation for joining two matrices by rows
*
* @param A a sparse matrix
* @param B a sparse matrix
Expand All @@ -48,7 +48,7 @@ class Utils {
* @param A a sparse matrix
* @param B a sparse matrix
*
* @note This is available in Armadillo >8.0
* @note This is available in Armadillo >=8.5
*/
static sp_mat spjoin_cols(const sp_mat &A, const sp_mat &B);

Expand All @@ -65,6 +65,13 @@ class Utils {
/**
* @brief An analog to the MATLAB 2D meshgrid operation
*
* returns 2-D grid coordinates based on the coordinates contained
* in vectors x and y. X is a matrix where each row is a copy of x,
* and Y is a matrix where each column is a copy of y. The grid
* represented by the coordinates X and Y has length(y) rows and
* length(x) columns. Key here is the rows is the y-coordinate, and
* the columns are the x-coordinate.
*
* @param x a vector of x-indices
* @param y a vector of y-indices
* @param X a sparse matrix, will be filled by the function
Expand All @@ -76,6 +83,10 @@ class Utils {
/**
* @brief An analog to the MATLAB 3D meshgrid operation
*
* meshgrid(x,y,z,X,Y,Z) returns 3-D grid coordinates defined by the
* vectors x, y, and z. The grid represented by X, Y, and Z has size
* length(y)-by-length(x)-by-length(z).
*
* @param x a vector of x-indices
* @param y a vector of y-indices
* @param z a vector of z-indices
Expand Down

0 comments on commit 0295c8f

Please sign in to comment.