### Merge branch 'upgrade-c++17' of git.scc.kit.edu:yq8188/mpp

parents 09b45559 dc3458e5
 ... ... @@ -735,10 +735,20 @@ RowBndValues::RowBndValues(Vector &u, const tcell &tc) : BF(u.GetSTMesh(), tc), /*******************/ /* extra functions */ /*******************/ // Upgrade to c++17: // This operator is only used in the function RandomVector, where it throws a compiler error... template Vector &operator<<(Vector &u, const F &f) { for (row r = u.rows(); r != u.rows_end(); ++r) u(r, 0) = eval(f(r())); // Upgrade to c++17: Changed line to ensure this works. // Note that this operator is not flexible, as it only creates Scalar Random Vectors. u(r, 0) = eval(f()); // LEGACY ======================================================================== // The evaluation of an arbitrary function at an object of type row seems unstable // Upgrade to c++17: This throws an error from RandomVector, because "rand" is a // function with zero input arguments. //u(r, 0) = eval(f(r())); // =============================================================================== return u; } ... ... @@ -757,6 +767,8 @@ void RandomVector(Vector &u, Operator &B, Operator &IA) { double s = sqrt(std::real(b * v)); b /= s; u = IA * b; // See comments above on the operator << Exit("RandomVector should be refactored.") } void RandomVectors(Vectors &u, Operator &B, Operator &IA) { ... ... @@ -772,6 +784,8 @@ void RandomVectors(Vectors &u, Operator &B, Operator &IA) { b[i] /= s; } u = IA * b; // See comments above on the operator << Exit("RandomVectors should be refactored.") } /****************/ ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!