Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@

#include "containers/model.h"
#include "custom_conditions/axisymmetric_U_Pw_normal_face_load_condition.hpp"
#include "geometries/line_2d_2.h"
#include "geometries/line_2d_3.h"
#include "geometries/line_2d_4.h"
#include "geometries/line_2d_5.h"
#include "tests/cpp_tests/geo_mechanics_fast_suite.h"
#include "tests/cpp_tests/geo_mechanics_fast_suite_without_kernel.h"

using namespace Kratos;

namespace Kratos::Testing
{

KRATOS_TEST_CASE_IN_SUITE(AxisymmetricUPwNormalFaceLoadCondition_GetIntegrationMethodForAllRegisteredElements,
KratosGeoMechanicsFastSuiteWithoutKernel)
TEST_F(KratosGeoMechanicsFastSuiteWithoutKernel,
AxisymmetricUPwNormalFaceLoadCondition_GetIntegrationMethodForAllRegisteredElements)
{
const auto p_properties = std::make_shared<Properties>();
PointerVector<Node> nodes;
Expand All @@ -33,29 +35,29 @@ KRATOS_TEST_CASE_IN_SUITE(AxisymmetricUPwNormalFaceLoadCondition_GetIntegrationM
auto p_axisymmetric_U_Pw_normal_face_load_condition_2D2N =
make_intrusive<AxisymmetricUPwNormalFaceLoadCondition<2, 2>>(
1, std::make_shared<Line2D2<Node>>(nodes), p_properties);
KRATOS_EXPECT_EQ(p_axisymmetric_U_Pw_normal_face_load_condition_2D2N->GetIntegrationMethod(),
GeometryData::IntegrationMethod::GI_GAUSS_2);
EXPECT_EQ(p_axisymmetric_U_Pw_normal_face_load_condition_2D2N->GetIntegrationMethod(),
GeometryData::IntegrationMethod::GI_GAUSS_2);

nodes.push_back(make_intrusive<Node>(3, 1.0, 1.0, 0.0));
auto p_axisymmetric_U_Pw_normal_face_load_condition_2D3N =
make_intrusive<AxisymmetricUPwNormalFaceLoadCondition<2, 3>>(
1, std::make_shared<Line2D3<Node>>(nodes), p_properties);
KRATOS_EXPECT_EQ(p_axisymmetric_U_Pw_normal_face_load_condition_2D3N->GetIntegrationMethod(),
GeometryData::IntegrationMethod::GI_GAUSS_2);
EXPECT_EQ(p_axisymmetric_U_Pw_normal_face_load_condition_2D3N->GetIntegrationMethod(),
GeometryData::IntegrationMethod::GI_GAUSS_2);

nodes.push_back(make_intrusive<Node>(4, 0.5, 0.0, 0.0));
auto p_axisymmetric_U_Pw_normal_face_load_condition_2D4N =
make_intrusive<AxisymmetricUPwNormalFaceLoadCondition<2, 4>>(
1, std::make_shared<Line2D4<Node>>(nodes), p_properties);
KRATOS_EXPECT_EQ(p_axisymmetric_U_Pw_normal_face_load_condition_2D4N->GetIntegrationMethod(),
GeometryData::IntegrationMethod::GI_GAUSS_3);
EXPECT_EQ(p_axisymmetric_U_Pw_normal_face_load_condition_2D4N->GetIntegrationMethod(),
GeometryData::IntegrationMethod::GI_GAUSS_3);

nodes.push_back(make_intrusive<Node>(5, 1.0, 0.5, 0.0));
auto p_axisymmetric_U_Pw_normal_face_load_condition_2D5N =
make_intrusive<AxisymmetricUPwNormalFaceLoadCondition<2, 5>>(
1, std::make_shared<Line2D5<Node>>(nodes), p_properties);
KRATOS_EXPECT_EQ(p_axisymmetric_U_Pw_normal_face_load_condition_2D5N->GetIntegrationMethod(),
GeometryData::IntegrationMethod::GI_GAUSS_5);
EXPECT_EQ(p_axisymmetric_U_Pw_normal_face_load_condition_2D5N->GetIntegrationMethod(),
GeometryData::IntegrationMethod::GI_GAUSS_5);
}

} // namespace Kratos::Testing
Original file line number Diff line number Diff line change
Expand Up @@ -26,42 +26,7 @@ KratosGeoMechanicsFastSuite::KratosGeoMechanicsFastSuite() : KratosCoreFastSuite
this->ImportApplicationIntoKernel(mpLinearSolversApp);
}

KratosGeoMechanicsFastSuiteWithoutKernel::KratosGeoMechanicsFastSuiteWithoutKernel()
: KratosCoreFastSuiteWithoutKernel()
{
// clang-format off
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(DISPLACEMENT)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(VELOCITY)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(ACCELERATION)

KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(ROTATION)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(ANGULAR_VELOCITY)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(ANGULAR_ACCELERATION)

KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(TOTAL_DISPLACEMENT)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(INCREMENTAL_DISPLACEMENT)

KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(TOTAL_ROTATION)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(INCREMENTAL_ROTATION)

KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(FLUID_FLUX_VECTOR)
KRATOS_REGISTER_VARIABLE(HYDRAULIC_HEAD)
KRATOS_REGISTER_VARIABLE(WATER_PRESSURE)

KRATOS_REGISTER_VARIABLE(CAUCHY_STRESS_VECTOR)
KRATOS_REGISTER_VARIABLE(CAUCHY_STRESS_TENSOR)
KRATOS_REGISTER_VARIABLE(TIME_STEPS)

KRATOS_REGISTER_VARIABLE(GEO_COULOMB_HARDENING_TYPE)
KRATOS_REGISTER_VARIABLE(GEO_FRICTION_ANGLE)
KRATOS_REGISTER_VARIABLE(GEO_COHESION)
KRATOS_REGISTER_VARIABLE(GEO_DILATANCY_ANGLE)
KRATOS_REGISTER_VARIABLE(GEO_TENSILE_STRENGTH)
// clang-format on
}

KratosGeoMechanicsIntegrationSuite::KratosGeoMechanicsIntegrationSuite()
: KratosCoreFastSuite()
KratosGeoMechanicsIntegrationSuite::KratosGeoMechanicsIntegrationSuite() : KratosCoreFastSuite()
{
mpGeoApp = std::make_shared<KratosGeoMechanicsApplication>();
this->ImportApplicationIntoKernel(mpGeoApp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#pragma once

#include "geo_mechanics_fast_suite_without_kernel.h"
#include "testing/testing.h"

namespace Kratos
Expand All @@ -34,12 +35,6 @@ class KratosGeoMechanicsFastSuite : public KratosCoreFastSuite
std::shared_ptr<KratosLinearSolversApplication> mpLinearSolversApp;
};

class KratosGeoMechanicsFastSuiteWithoutKernel : public KratosCoreFastSuiteWithoutKernel
{
public:
KratosGeoMechanicsFastSuiteWithoutKernel();
};

class KratosGeoMechanicsIntegrationSuite : public KratosCoreFastSuite
{
public:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// KRATOS___
// // ) )
// // ___ ___
// // ____ //___) ) // ) )
// // / / // // / /
// ((____/ / ((____ ((___/ / MECHANICS
//
// License: geo_mechanics_application/license.txt
//
// Main authors: Anne van de Graaf
// Richard Faasse
//

#include "geo_mechanics_fast_suite_without_kernel.h"
#include "geo_mechanics_application_variables.h"
#include "includes/variables.h"

namespace Kratos::Testing
{

KratosGeoMechanicsFastSuiteWithoutKernel::KratosGeoMechanicsFastSuiteWithoutKernel()
{
// clang-format off
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(DISPLACEMENT)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(VELOCITY)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(ACCELERATION)

KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(ROTATION)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(ANGULAR_VELOCITY)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(ANGULAR_ACCELERATION)

KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(TOTAL_DISPLACEMENT)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(INCREMENTAL_DISPLACEMENT)

KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(TOTAL_ROTATION)
KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(INCREMENTAL_ROTATION)

KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(FLUID_FLUX_VECTOR)
KRATOS_REGISTER_VARIABLE(HYDRAULIC_HEAD)
KRATOS_REGISTER_VARIABLE(WATER_PRESSURE)

KRATOS_REGISTER_VARIABLE(CAUCHY_STRESS_VECTOR)
KRATOS_REGISTER_VARIABLE(CAUCHY_STRESS_TENSOR)
KRATOS_REGISTER_VARIABLE(TIME_STEPS)

KRATOS_REGISTER_VARIABLE(GEO_COULOMB_HARDENING_TYPE)
KRATOS_REGISTER_VARIABLE(GEO_FRICTION_ANGLE)
KRATOS_REGISTER_VARIABLE(GEO_COHESION)
KRATOS_REGISTER_VARIABLE(GEO_DILATANCY_ANGLE)
KRATOS_REGISTER_VARIABLE(GEO_TENSILE_STRENGTH)
// clang-format on
}

} // namespace Kratos::Testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// KRATOS___
// // ) )
// // ___ ___
// // ____ //___) ) // ) )
// // / / // // / /
// ((____/ / ((____ ((___/ / MECHANICS
//
// License: geo_mechanics_application/license.txt
//
// Main authors: Anne van de Graaf
// Richard Faasse
//

#pragma once

#include <gtest/gtest.h>

namespace Kratos::Testing
{

class KratosGeoMechanicsFastSuiteWithoutKernel : public ::testing::Test
{
public:
KratosGeoMechanicsFastSuiteWithoutKernel();
};

} // namespace Kratos::Testing
Loading