Skip to content

Commit

Permalink
used ublas assigment
Browse files Browse the repository at this point in the history
  • Loading branch information
Gennady Markelov committed May 15, 2024
1 parent d04250f commit dd7040b
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// Main authors: Gennady Markelov
//

#include "boost/numeric/ublas/assignment.hpp"
#include "custom_retention/retention_law.h"
#include "includes/checks.h"
#include "testing/testing.h"
Expand All @@ -22,18 +23,10 @@ namespace Kratos::Testing
KRATOS_TEST_CASE_IN_SUITE(CalculateFluidPressureGivesCorrectResults, KratosGeoMechanicsFastSuite)
{
Vector N(5);
N(0) = 1.0;
N(1) = 2.0;
N(2) = 3.0;
N(3) = 4.0;
N(4) = 5.0;
N <<= 1.0, 2.0, 3.0, 4.0, 5.0;

Vector pressure_vector(5);
pressure_vector(0) = 0.5;
pressure_vector(1) = 0.7;
pressure_vector(2) = 0.8;
pressure_vector(3) = 0.9;
pressure_vector(4) = 0.4;
pressure_vector <<= 0.5, 0.7, 0.8, 0.9, 0.4;

auto fluid_pressure = RetentionLaw::Parameters::CalculateFluidPressure(N, pressure_vector);
double expected_value = 9.9;
Expand Down

0 comments on commit dd7040b

Please sign in to comment.