Skip to content

Commit

Permalink
Element3::evaluate() should be "const"
Browse files Browse the repository at this point in the history
  • Loading branch information
ckhroulev committed Oct 14, 2020
1 parent 063f170 commit 35985be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/fem/Element.hh
Expand Up @@ -91,7 +91,7 @@ public:
//! The output array `result` should have enough elements to hold values at all
//! quadrature points.
template <typename T>
void evaluate(const T *x, T *result) {
void evaluate(const T *x, T *result) const {
for (unsigned int q = 0; q < m_Nq; q++) {
result[q] = 0.0;
for (unsigned int k = 0; k < m_n_chi; k++) {
Expand Down Expand Up @@ -275,7 +275,7 @@ public:
* quadrature points.*/
//! Output arrays should have enough elements to hold values at all quadrature points.`
template <typename T>
void evaluate(const T *x, T *vals, T *dx, T *dy, T *dz) {
void evaluate(const T *x, T *vals, T *dx, T *dy, T *dz) const {
for (unsigned int q = 0; q < m_Nq; q++) {
vals[q] = 0.0;
dx[q] = 0.0;
Expand Down Expand Up @@ -401,7 +401,7 @@ public:
void reset(int face, const std::vector<double> &z);

template <typename T>
void evaluate(const T *x, T *result) {
void evaluate(const T *x, T *result) const {
for (unsigned int q = 0; q < m_Nq; q++) {
result[q] = 0.0;
for (unsigned int k = 0; k < m_n_chi; k++) {
Expand Down

0 comments on commit 35985be

Please sign in to comment.