From 384e4ecd3b0c273db00db808b4b09d10f289375f Mon Sep 17 00:00:00 2001
From: asantamaria <asantamaria@iri.upc.edu>
Date: Tue, 3 Apr 2018 08:26:29 +0200
Subject: [PATCH] FIX _residuals to non const in constraint derived from
 autodiff

---
 wolf_scripts/generic_func/functions.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wolf_scripts/generic_func/functions.sh b/wolf_scripts/generic_func/functions.sh
index e904c63a5..e043f05cb 100755
--- a/wolf_scripts/generic_func/functions.sh
+++ b/wolf_scripts/generic_func/functions.sh
@@ -298,8 +298,8 @@ addAutodiffSpecifics()
   PARAM_NUMS[-1]=${PARAM_NUMS[-1]%?}
 
   sed -i "s/public $BASECLASSNAME/public $BASECLASSNAME<$CLASSNAME, $RESIDUAL_DIM, ${PARAM_NUMS[*]}>/g" "$NAME_H_PATH"
-  sed -i "/virtual \~$CLASSNAME/a\ \n\        \/\*\* \brief : compute the residual from the state blocks being iterated by the solver.\n \        \*\*\/\n\        template<typename T>\n\        bool operator ()(${PARAMS[*]}, const T* const _residuals) const;\n" "$NAME_H_PATH"
-  sed -i "/\} \/\/ namespace wolf/a\ \n\/\/ Include here all headers for this class\n\/\/\#include <YOUR_HEADERS.h>\n\nnamespace wolf\n\{\n\ntemplate<typename T> bool $CLASSNAME::operator ()(${PARAMS[*]}, const T* const _residuals) const\n\{\n    std::cout << \"\\033[1;33m [WARN]:\\033[0m ${CLASSNAME}::operator () is empty.\" << std::endl;\n    \/\/ TODO: Implement\n    return true;\n\}\n\n\} \/\/ namespace wolf" "$NAME_H_PATH"
+  sed -i "/virtual \~$CLASSNAME/a\ \n\        \/\*\* \brief : compute the residual from the state blocks being iterated by the solver.\n \        \*\*\/\n\        template<typename T>\n\        bool operator ()(${PARAMS[*]}, T* _residuals) const;\n" "$NAME_H_PATH"
+  sed -i "/\} \/\/ namespace wolf/a\ \n\/\/ Include here all headers for this class\n\/\/\#include <YOUR_HEADERS.h>\n\nnamespace wolf\n\{\n\ntemplate<typename T> bool $CLASSNAME::operator ()(${PARAMS[*]}, T* _residuals) const\n\{\n    std::cout << \"\\033[1;33m [WARN]:\\033[0m ${CLASSNAME}::operator () is empty.\" << std::endl;\n    \/\/ TODO: Implement\n    return true;\n\}\n\n\} \/\/ namespace wolf" "$NAME_H_PATH"
 }
 
 fillWithBaseVirtualMethods()
-- 
GitLab