This test is failing in my linux machine with following message
Error: Check failed becuase detJ = inf is not near to MathUtils<double>::GeneralizedDet(jacobian) = 0.0198539 within the tolerance 1e-06
in kratos/tests/geometries/test_non_rectangular_jacobian.cpp:108:virtual void Testing::TestQuadrilateralJacobianTest::TestFunction()
@loumalouomega do you think that it is affected by your change in generailize det?
The last change I did the computation of the determinant for a matrix of any size when calculing the inverse. I thought I solved this issue already
Did you updated?
Is this the code of your test?:
~~~
KRATOS_TEST_CASE_IN_SUITE(QuadrilateralJacobianTest, KratosNonRectangularJacobianFastSuite)
{
Node<3>::Pointer PointA = Node<3>::Pointer(new Node<3>(1, 0.1, 0.2, 0.3));
Node<3>::Pointer PointB = Node<3>::Pointer(new Node<3>(2, 0.4, 0.25, 0.35));
Node<3>::Pointer PointC = Node<3>::Pointer(new Node<3>(3, 0.4, 0.55, 0.3));
Node<3>::Pointer PointD = Node<3>::Pointer(new Node<3>(4, 0.15, 0.45, 0.45));
auto geom = Quadrilateral3D4<Node<3>>(PointA,PointB,PointC,PointD);
IntegrationMethod ThisMethod = geom.GetDefaultIntegrationMethod();
Matrix jacobian ( 3, 2 );
geom.Jacobian( jacobian, 0, ThisMethod);
const double detJ = geom.DeterminantOfJacobian(0, ThisMethod);
KRATOS_CHECK_NEAR(detJ, MathUtils<double>::GeneralizedDet(jacobian), TOLERANCE);
}
~~~

Mine works, I test it 50 times
IMO 50 times is not enough...
@loumalouomega seems that your version f0e92fd0b is differnt than current master and mine a79ba8d
I have tested it twice!! 😆
My version is the same than the master
The test passes on my machine (on current master, which is a79ba8d80) :/
(I have tested it more than two times, but less than 50)
Ok, the operation of the determinant is quite simple:
~~~
this->Jacobian( jacobian, pnt, ThisMethod);
const double detJ = std::pow(jacobian(0,1),2)*(std::pow(jacobian(1,0),2)+std::pow(jacobian(2,0),2))+std::pow(jacobian(1,1)*jacobian(2,0)-jacobian(1,0)*jacobian(2,1),2)-2*jacobian(0,0)*jacobian(0,1)*(jacobian(1,0)*jacobian(1,1)+jacobian(2,0)*jacobian(2,1))+std::pow(jacobian(0,0),2)*(std::pow(jacobian(1,1),2)+std::pow(jacobian(2,1),2));
rResult[pnt] = std::sqrt(detJ);
~~~
Can you print your jacobian?
is there any random there? in my error it returns inf for detJ
Nope,I removed the randomness
That's why I ask you to print the jacobian, it is the easiest way
The Jacobian:
[3,2]((0.144717,0.0197169),(0.0302831,0.130283),(0.00386751,0.0538675))
The only thing that I can think could be the origin is that I use std::pow a lot and maybe your compiler is not doing his job
Have you tested if the Detj is negative or not?

It seems to be a memory error. When I'm enabling the outputs Tester.Vervosity.TESTS_OUTPUTS the test pases but when I set the verbosity to Tester.Vervosity.TESTS_LISTS it fails....
Ok
would you please test it using the list verbosity?
OK
I'm testing it (more than two times) and it crashes randomly.
@pooyan-dadvand, is it still crashing?
Of course! Have you changed something? In which branch?
No, just asking, I don't have any problem, just that
El 14 jul. 2017 5:46 p. m., "Pooyan Dadvand" notifications@github.com
escribió:
Of course! Have you changed something? In which branch?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/KratosMultiphysics/Kratos/issues/566#issuecomment-315393987,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATEMgA1mIaFZcy9RGA832QoUyV6kAikNks5sN41tgaJpZM4OJTg3
.
Have you run it with valgrind?
No, I will try
El 14 jul. 2017 6:13 p. m., "Pooyan Dadvand" notifications@github.com
escribió:
Have you run it with valgrind?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/KratosMultiphysics/Kratos/issues/566#issuecomment-315400372,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATEMgNtOabXcPda38DWMHXE4LyV8Bynoks5sN5NygaJpZM4OJTg3
.
@loumalouomega would you please check this with valgrind?
OK
~c
==11568== Conditional jump or move depends on uninitialised value(s)
==11568== at 0x58D3101: __ieee754_pow_sse2 (e_pow.c:76)
==11568== by 0x58B57A3: pow (w_pow_compat.c:27)
==11568== by 0x958E03D: Kratos::Quadrilateral3D4
==11568== by 0xB0A2968: Kratos::Testing::TestQuadrilateralJacobianTest::TestFunction() (test_non_rectangular_jacobian.cpp:106)
~
I will try to solve it
@loumalouomega Can you try just replacing the pow calls with regular products? We have seen some weird things with pow (probably due to compiler optimization?) in the past.
I am doing that, but it takes to compile....
Most helpful comment
I am doing that, but it takes to compile....