TEST_F(beamFEATest, TransformsLocalToGlobalCoords) {
    // test that identity matrix is recovered if local axes == global axes
    Eigen::Vector3d nx(1.0, 0.0, 0.0);
    Eigen::Vector3d nz(0.0, 0.0, 1.0);

    assembleK3D.calcAelem(nx, nz);

    LocalMatrix Aelem = assembleK3D.getAelem();

    LocalMatrix expected;
    expected.setIdentity();

    for (size_t i = 0; i < Aelem.rows(); ++i) {
        EXPECT_DOUBLE_EQ(expected(i), Aelem(i));
    }
}
LocalMatrix chemReductionGIA::orthcomp( LocalMatrix & inMat )
{
	// initialize it so that they have the same dimension
    LocalMatrix outMat;

	Eigen::FullPivLU<LocalMatrix> lu_decomp(inMat.transpose());

	outMat = lu_decomp.kernel();

	// notice that if the kernel returns a matrix with dimension zero,
	// then the returned matrix will be a column-vector filled with zeros
	// therefore we do a safety check here, and set the number of columns to zero
	if ( outMat.cols() == 1 && outMat.col(0).norm() == 0.0 )
		outMat = LocalMatrix::Zero(inMat.rows(), 0);

	return outMat;
}