diff options
author | Michael Kerber <mkerber@fgeompc15.tugraz.local> | 2020-08-24 14:16:18 +0200 |
---|---|---|
committer | Michael Kerber <mkerber@fgeompc15.tugraz.local> | 2020-08-24 14:16:18 +0200 |
commit | 0fbd1f5197e69aee959d3eab134c2792f56fface (patch) | |
tree | ed2357570675140ad618635a1fb7478860e04ce9 /include/phat/boundary_matrix.h | |
parent | 843e6870e58decba7d22411e4ba0f6dfc2df78a7 (diff) |
New method "set_dimension" to control the number of rows in the matrix, if needed
Diffstat (limited to 'include/phat/boundary_matrix.h')
-rw-r--r-- | include/phat/boundary_matrix.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/phat/boundary_matrix.h b/include/phat/boundary_matrix.h index 295cfa5..d1d6257 100644 --- a/include/phat/boundary_matrix.h +++ b/include/phat/boundary_matrix.h @@ -37,8 +37,14 @@ namespace phat { // get overall number of columns in boundary_matrix
index get_num_cols() const { return rep._get_num_cols(); }
+ // sets the number of rows (1st parameter) and columns (2nd parameter)
+ // of the matrix. Most internal types ignore the number of rows
+ // but some do no
+ void set_dimensions( index nr_of_rows, index nr_of_columns ) {rep._set_dimensions( nr_of_rows, nr_of_columns );}
+
// set overall number of columns in boundary_matrix
- void set_num_cols( index nr_of_columns ) { rep._set_num_cols( nr_of_columns ); }
+ // sets the number of rows to nr_of_columns as well!
+ void set_num_cols( index nr_of_columns ) { rep._set_dimensions( nr_of_columns, nr_of_columns ); }
// get dimension of given index
dimension get_dim( index idx ) const { return rep._get_dim( idx ); }
|