LCOV - code coverage report
Current view: top level - src - test.cc (source / functions) Coverage Total Hit
Test: coverage_merged.info Lines: 100.0 % 65 65
Test Date: 2025-07-03 21:40:51 Functions: 100.0 % 1 1

            Line data    Source code
       1              : #include <stdlib.h>
       2              : 
       3              : #include "Util/Util.H"
       4              : 
       5              : #include "Test/Numeric/Stencil.H"
       6              : #include "Test/Set/Matrix4.H"
       7              : 
       8              : #include "Operator/Elastic.H"
       9              : 
      10              : #include "Numeric/Interpolator/Test.H"
      11              : #include "Numeric/Interpolator/Linear.H"
      12              : 
      13              : #include "Model/Solid/Linear/Isotropic.H"
      14              : #include "Model/Solid/Linear/Cubic.H"
      15              : #include "Model/Solid/Linear/Laplacian.H"
      16              : #include "Model/Solid/Linear/Transverse.H"
      17              : #include "Model/Solid/Affine/Isotropic.H"
      18              : #include "Model/Solid/Affine/Cubic.H"
      19              : #include "Model/Solid/Finite/NeoHookean.H"
      20              : #include "Model/Solid/Finite/NeoHookeanPredeformed.H"
      21              : #include "Model/Solid/Finite/PseudoLinear/Cubic.H"
      22              : #include "Model/Solid/Finite/PseudoAffine/Cubic.H"
      23              : #include "Model/Solid/Linear/Hexagonal.H"
      24              : #include "Model/Solid/Affine/Hexagonal.H"
      25              : 
      26              : #include "Solver/Local/Riemann/Roe.H"
      27              : 
      28            2 : int main (int argc, char* argv[])
      29              : {
      30            2 :     Util::Initialize(argc, argv);
      31              : 
      32            2 :     int failed = 0;
      33              : 
      34            2 :     Util::globalprefix = "  │  ";
      35              : 
      36              : 
      37              :     #define MODELTEST(TYPE) \
      38              :         Util::Test::Message(#TYPE); \
      39              :         { \
      40              :             int subfailed = 0; \
      41              :             subfailed += Util::Test::SubMessage("ArithmeticTest",  TYPE::ArithmeticTest<TYPE>(true)); \
      42              :             subfailed += Util::Test::SubMessage("DerivativeTest1", TYPE::DerivativeTest1<TYPE>(true)); \
      43              :             subfailed += Util::Test::SubMessage("DerivativeTest2", TYPE::DerivativeTest2<TYPE>(true)); \
      44              :             if (TYPE::kinvar == Model::Solid::KinematicVariable::F) \
      45              :             { \
      46              :                 subfailed += Util::Test::SubMessage("MaterialFrameIndifference", TYPE::MaterialFrameIndifference<TYPE>(true)); \
      47              :             } \
      48              :             failed += Util::Test::SubFinalMessage(subfailed); \
      49              :         }
      50           16 :     MODELTEST(Model::Solid::Linear::Isotropic);
      51           16 :     MODELTEST(Model::Solid::Linear::Cubic);
      52           16 :     MODELTEST(Model::Solid::Linear::Laplacian);
      53           16 :     MODELTEST(Model::Solid::Linear::Transverse);
      54           16 :     MODELTEST(Model::Solid::Affine::Isotropic);
      55           16 :     MODELTEST(Model::Solid::Affine::Cubic);
      56           16 :     MODELTEST(Model::Solid::Linear::Hexagonal);
      57           16 :     MODELTEST(Model::Solid::Affine::Hexagonal);
      58           20 :     MODELTEST(Model::Solid::Finite::NeoHookean);
      59           20 :     MODELTEST(Model::Solid::Finite::PseudoLinear::Cubic);
      60           20 :     MODELTEST(Model::Solid::Finite::NeoHookeanPredeformed);
      61           20 :     MODELTEST(Model::Solid::Finite::PseudoAffine::Cubic);
      62              :     
      63              : 
      64            2 :     Util::Test::Message("Set::Matrix4");
      65              :     {
      66            2 :         int subfailed = 0;
      67              :         Test::Set::Matrix4<2,Set::Sym::Full> test_2d_full;
      68            4 :         subfailed += Util::Test::SubMessage("2D - Full", test_2d_full.SymmetryTest(0));
      69              :         Test::Set::Matrix4<3,Set::Sym::Full> test_3d_full;
      70            4 :         subfailed += Util::Test::SubMessage("3D - Full", test_3d_full.SymmetryTest(0));
      71              :         Test::Set::Matrix4<3,Set::Sym::MajorMinor> test_3d_majorminor;
      72            4 :         subfailed += Util::Test::SubMessage("3D - MajorMinor", test_3d_majorminor.SymmetryTest(0));
      73            2 :         failed += Util::Test::SubFinalMessage(subfailed);
      74              :     }
      75              : 
      76            2 :     Util::Test::Message("Numeric::Interpolator<Linear>");
      77              :     {
      78            2 :         int subfailed = 0;
      79              :         Numeric::Interpolator::Test<Numeric::Interpolator::Linear<Set::Scalar> > test;
      80            4 :         subfailed += Util::Test::SubMessage("Match",test.Match(0));
      81            2 :         failed += Util::Test::SubFinalMessage(subfailed);
      82              :     }
      83              : 
      84            2 :     Util::Test::Message("Numeric::Stencil test");
      85              :     {
      86            2 :         int subfailed = 0;
      87            2 :         Test::Numeric::Stencil test;
      88            2 :         test.Define(32);
      89              :         // first order
      90            8 :         subfailed += Util::Test::SubMessage("1-0-0",test.Derivative<1,0,0>(0));
      91            8 :         subfailed += Util::Test::SubMessage("0-1-0",test.Derivative<0,1,0>(0));
      92              :         // second order
      93            8 :         subfailed += Util::Test::SubMessage("2-0-0",test.Derivative<2,0,0>(0));
      94            8 :         subfailed += Util::Test::SubMessage("0-2-0",test.Derivative<0,2,0>(0));
      95            8 :         subfailed += Util::Test::SubMessage("0-0-1",test.Derivative<0,2,0>(0));
      96            8 :         subfailed += Util::Test::SubMessage("1-1-0",test.Derivative<1,1,0>(0));
      97              :         // fourth order
      98            8 :         subfailed += Util::Test::SubMessage("3-1-0",test.Derivative<3,1,0>(0));
      99            8 :         subfailed += Util::Test::SubMessage("1-3-0",test.Derivative<1,3,0>(0));
     100            8 :         subfailed += Util::Test::SubMessage("2-2-0",test.Derivative<2,2,0>(0));
     101            8 :         subfailed += Util::Test::SubMessage("4-0-0",test.Derivative<4,0,0>(0));
     102            7 :         subfailed += Util::Test::SubMessage("0-4-0",test.Derivative<0,4,0>(0));
     103              : #if AMREX_SPACEDIM>2
     104              :         // first order
     105            4 :         subfailed += Util::Test::SubMessage("0-0-1",test.Derivative<0,0,1>(0));
     106              :         // second order
     107            4 :         subfailed += Util::Test::SubMessage("0-0-2",test.Derivative<0,0,2>(0));
     108            4 :         subfailed += Util::Test::SubMessage("1-0-1",test.Derivative<1,0,1>(0));
     109            4 :         subfailed += Util::Test::SubMessage("0-1-1",test.Derivative<0,1,1>(0));
     110              :         // fourth order
     111            4 :         subfailed += Util::Test::SubMessage("0-0-4",test.Derivative<0,0,4>(0));
     112            4 :         subfailed += Util::Test::SubMessage("0-1-3",test.Derivative<0,1,3>(0));
     113            4 :         subfailed += Util::Test::SubMessage("0-3-1",test.Derivative<0,3,1>(0));
     114            4 :         subfailed += Util::Test::SubMessage("3-0-1",test.Derivative<3,0,1>(0));
     115            4 :         subfailed += Util::Test::SubMessage("1-0-3",test.Derivative<1,0,3>(0));
     116            4 :         subfailed += Util::Test::SubMessage("0-2-2",test.Derivative<0,2,2>(0));
     117            4 :         subfailed += Util::Test::SubMessage("2-0-2",test.Derivative<2,0,2>(0));
     118            4 :         subfailed += Util::Test::SubMessage("2-1-1",test.Derivative<2,1,1>(0));
     119            4 :         subfailed += Util::Test::SubMessage("1-2-1",test.Derivative<1,2,1>(0));
     120            3 :         subfailed += Util::Test::SubMessage("1-1-2",test.Derivative<1,1,2>(0));
     121              : #endif
     122            2 :         failed += Util::Test::SubFinalMessage(subfailed);
     123            2 :     }
     124              : 
     125            2 :     Util::Test::Message("Solver::Nonlocal::Riemann::Roe test");
     126              :     {
     127            2 :         int subfailed = 0;
     128            4 :         subfailed += Util::Test::SubMessage("Test",Solver::Local::Riemann::Roe::Test());
     129            2 :         failed += Util::Test::SubFinalMessage(subfailed);
     130              :     }
     131              : 
     132            2 :     Util::globalprefix = "";
     133            6 :     Util::Message(INFO,failed," tests failed");
     134              : 
     135            2 :     Util::Finalize();
     136            2 :     return failed;
     137              : }
        

Generated by: LCOV version 2.0-1