Skip to content
Snippets Groups Projects
Commit 4964934a authored by Emilie Marchandise's avatar Emilie Marchandise
Browse files

No commit message

No commit message
parent a6d1f76e
No related branches found
No related tags found
No related merge requests found
...@@ -174,7 +174,25 @@ function *functionSumNew(const function *f0, const function *f1) { ...@@ -174,7 +174,25 @@ function *functionSumNew(const function *f0, const function *f1) {
} }
class functionScale : public function {
public:
fullMatrix<double> _f0;
double _s;
void call(dataCacheMap *m, fullMatrix<double> &val) {
for(int i=0;i<val.size1();i++)
for(int j=0;j<val.size2();j++){
val(i,j)= _f0(i,j)*_s;
}
}
functionScale(const function *f0, const double s):function(f0->getNbCol()){
setArgument (_f0, f0);
_s = s;
}
};
function *functionScaleNew(const function *f0, const double s) {
return new functionScale (f0, s);
}
// get XYZ coordinates // get XYZ coordinates
class functionCoordinates : public function { class functionCoordinates : public function {
......
...@@ -248,6 +248,7 @@ class functionReplaceCache { ...@@ -248,6 +248,7 @@ class functionReplaceCache {
functionConstant *functionConstantNew(const std::vector<double>&); functionConstant *functionConstantNew(const std::vector<double>&);
functionConstant *functionConstantNew(double); functionConstant *functionConstantNew(double);
function *functionSumNew (const function *f0, const function *f1); function *functionSumNew (const function *f0, const function *f1);
function *functionScaleNew (const function *f0, const double s);
class functionSolution : public function { class functionSolution : public function {
static functionSolution *_instance; static functionSolution *_instance;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment