KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Public Member Functions | Public Attributes | List of all members
KratosUnittest.TestCase Class Reference
Inheritance diagram for KratosUnittest.TestCase:
Collaboration diagram for KratosUnittest.TestCase:

Public Member Functions

def run (self, result=None)
 
def skipTestIfApplicationsNotAvailable (self, *application_names)
 Skips the test if required applications are not available. More...
 
def assertEqualTolerance (self, first, second, tolerance, msg=None)
 Fails if first and second have a difference greater than tolerance. More...
 
def assertIsClose (self, first, second, rel_tol=None, abs_tol=None, msg=None)
 Fails if the two objects are unequal as determined by their absolute and relative difference. More...
 
def assertVectorAlmostEqual (self, vector1, vector2, places=7, msg=None, delta=None)
 
def assertMatrixAlmostEqual (self, matrix1, matrix2, places=7, msg=None, delta=None)
 

Public Attributes

 mismatch_idx
 
 aux_message
 
 idx_1
 
 idx_2
 

Member Function Documentation

◆ assertEqualTolerance()

def KratosUnittest.TestCase.assertEqualTolerance (   self,
  first,
  second,
  tolerance,
  msg = None 
)

Fails if first and second have a difference greater than tolerance.

◆ assertIsClose()

def KratosUnittest.TestCase.assertIsClose (   self,
  first,
  second,
  rel_tol = None,
  abs_tol = None,
  msg = None 
)

Fails if the two objects are unequal as determined by their absolute and relative difference.

If the two objects compare equal then they will automatically compare relative almost equal.

◆ assertMatrixAlmostEqual()

def KratosUnittest.TestCase.assertMatrixAlmostEqual (   self,
  matrix1,
  matrix2,
  places = 7,
  msg = None,
  delta = None 
)

◆ assertVectorAlmostEqual()

def KratosUnittest.TestCase.assertVectorAlmostEqual (   self,
  vector1,
  vector2,
  places = 7,
  msg = None,
  delta = None 
)

◆ run()

def KratosUnittest.TestCase.run (   self,
  result = None 
)

◆ skipTestIfApplicationsNotAvailable()

def KratosUnittest.TestCase.skipTestIfApplicationsNotAvailable (   self,
application_names 
)

Skips the test if required applications are not available.

Member Data Documentation

◆ aux_message

KratosUnittest.TestCase.aux_message

◆ idx_1

KratosUnittest.TestCase.idx_1

◆ idx_2

KratosUnittest.TestCase.idx_2

◆ mismatch_idx

KratosUnittest.TestCase.mismatch_idx

The documentation for this class was generated from the following file: