Commit 1aaeea68 authored by Oliver Sander's avatar Oliver Sander
Browse files

Use a larger set of test points

parent f1e4a2e2
......@@ -24,13 +24,16 @@ int main(int argc, char** argv) try
{3.14,3.14,-4}};
// Create real test points (i.e., block vectors) from the given values for a single block
// TODO: Construct more combinations
std::vector<Functional::VectorType> testPoints(localTestPoints.size());
std::vector<Functional::VectorType> testPoints(localTestPoints.size()*localTestPoints.size());
for (size_t i=0; i<testPoints.size(); i++)
{
testPoints[i].resize(coefficients.size());
std::fill(testPoints[i].begin(), testPoints[i].end(), localTestPoints[i]);
}
for (size_t i=0; i<localTestPoints.size(); i++)
for (size_t j=0; j<localTestPoints.size(); j++)
{
testPoints[j*localTestPoints.size()+i][0] = localTestPoints[i];
testPoints[j*localTestPoints.size()+i][1] = localTestPoints[j];
}
// Test whether the functional is convex
testConvexity(functional, testPoints);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment