...
 
Commits (2)
......@@ -35,14 +35,14 @@ namespace Dune {
assert( b.size() == llsMatrix_.rows() );
Vector systemMultiply;
std::cout << constraintMatrix_.size() << "is empty" << isEmpty(constraintMatrix_) << std::endl;
// std::cout << constraintMatrix_.size() << "is empty" << isEmpty(constraintMatrix_) << std::endl;
if ( isEmpty(constraintMatrix_) ){
systemMultiply.resize(llsMatrix_.cols());
systemMatrixInv_.mv(b,systemMultiply);
}
else {
std::cout << "constraint rows" << constraintMatrix_.rows() << std::endl;
// std::cout << "constraint rows" << constraintMatrix_.rows() << std::endl;
assert(d.size() == constraintMatrix_.rows());
Vector systemVector = vectorSetUp(b, d);
......@@ -101,7 +101,7 @@ namespace Dune {
{
// return matrix with no size
Matrix A;
std::cout << "size of empty matrix " << A.size() << std::endl;
// std::cout << "size of empty matrix " << A.size() << std::endl;
return A;
}
......@@ -118,14 +118,14 @@ namespace Dune {
// LeftPseudoInverse< Field > pseudoInverse( llsMatrix_.cols() );
// no constraints in this case and so form pseudo inverse
std::cout << "Matrix C has no size" << std::endl;
// std::cout << "Matrix C has no size" << std::endl;
Matrix llsMatrixPseudoInv( llsMatrix_.cols(), llsMatrix_.rows() );
pseudoInverse( llsMatrix_, llsMatrixPseudoInv);
std::cout << "pseudo Inv of A " << std::endl;
printMatrix(llsMatrixPseudoInv);
// std::cout << "pseudo Inv of A " << std::endl;
// printMatrix(llsMatrixPseudoInv);
return llsMatrixPseudoInv;
}
......@@ -146,8 +146,8 @@ namespace Dune {
systemMatrix.resize((llsMatrix_.cols() + constraintMatrix_.rows()),
(llsMatrix_.cols() + constraintMatrix_.rows()), 0);
std::cout << "System matrix: " << std::endl;
printMatrix(systemMatrix);
// std::cout << "System matrix: " << std::endl;
// printMatrix(systemMatrix);
// fill up system matrix
for (Size i = 0; i < systemMatrix.rows(); ++i) {
......@@ -168,15 +168,15 @@ namespace Dune {
}
}
std::cout << "System matrix: " << std::endl;
printMatrix(systemMatrix);
// std::cout << "System matrix: " << std::endl;
// printMatrix(systemMatrix);
assert(llsMatrix_.cols() + 1 < systemMatrix.size());
systemMatrix.invert();
std::cout << "System matrix invert: " << std::endl;
printMatrix(systemMatrix);
// std::cout << "System matrix invert: " << std::endl;
// printMatrix(systemMatrix);
return systemMatrix;
}
......@@ -202,8 +202,8 @@ namespace Dune {
}
}
std::cout << "System Vector: " << std::endl;
printVector(systemVector);
// std::cout << "System Vector: " << std::endl;
// printVector(systemVector);
return systemVector;
}
......
......@@ -451,9 +451,6 @@ namespace Dune
// type def for standard vector (to pick up re size for Hessian projection)
// need to resize Hessian projection
// printMatrix(D);
// printMatrix(constraintValueProj);
// re implementation of the value projection
auto leastSquaresMinimizer = LeastSquares( D, constraintValueProj );
DynamicVector< DomainFieldType > b( numDofs, 0 ), d( numInnerShapeFunctions, 0 );
......@@ -487,7 +484,7 @@ namespace Dune
std::size_t alpha=0;
/////////////////////////////////////////
/////////////////////////////////////////
// !!! Original value projection implementation
//// !!! Original value projection implementation
// for (; alpha<numInnerShapeFunctions; ++alpha)
// C[alpha][alpha+numDofs-numInnerShapeFunctions] = H0;
// for (; alpha<numShapeFunctions; ++alpha)
......@@ -564,8 +561,8 @@ namespace Dune
/////////////////////////////////////////
/////////////////////////////////////////
// !!! Original value projection implementation
// now compute projection by multiplying with inverse mass matrix
//// !!! Original value projection implementation
// // now compute projection by multiplying with inverse mass matrix
// for (std::size_t alpha=0; alpha<numShapeFunctions; ++alpha)
// {
// for (std::size_t i=0; i<numDofs; ++i)
......