diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a3aa992b06f..d7b50c7adf62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required (VERSION 2.8.6) -cmake_policy(SET CMP0054 OLD) + +if(POLICY CMP0054) + cmake_policy(SET CMP0054 OLD) +endif(POLICY CMP0054) project (KratosMultiphysics) @@ -8,6 +11,19 @@ set (KratosMultiphysics_MAJOR_VERSION 5) set (KratosMultiphysics_MINOR_VERSION 1) set (KratosMultiphysics_PATCH_VERSION 0) +# Define custom compiler build types +SET( CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug;FullDebug" ) +SET( BASIC_DEBUG_FLAGS "${CMAKE_CXX_FLAGS_DEBUG}") +#SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" ) +#SET( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" ) +SET( CMAKE_CXX_FLAGS_DEBUG "${BASIC_DEBUG_FLAGS} -DNDEBUG -DKRATOS_DEBUG" ) +SET( CMAKE_CXX_FLAGS_FULLDEBUG "${BASIC_DEBUG_FLAGS} -DKRATOS_DEBUG" ) + +# Define internal CMake flags needed +SET( CMAKE_C_FLAGS_FULLDEBUG "${CMAKE_C_FLAGS_DEBUG}" ) +SET( CMAKE_SHARED_LINKER_FLAGS_FULLDEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" ) +SET( CMAKE_EXE_LINKER_FLAGS_FULLDEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" ) + # Get subversion data. This is done automagically by the cmakes include (GenerateExportHeader) @@ -24,6 +40,13 @@ else(GIT_FOUND) set (KratosMultiphysics_SHA1_NUMBER 0) endif(GIT_FOUND) +set (KratosMultiphysics_BUILD_TYPE ${CMAKE_BUILD_TYPE}) +if( ${CMAKE_BUILD_TYPE} MATCHES "Release" ) + set (KratosMultiphysics_BUILD_SUFFIX "") +else( ${CMAKE_BUILD_TYPE} MATCHES "Release" ) + set (KratosMultiphysics_BUILD_SUFFIX "-${CMAKE_BUILD_TYPE}" ) +endif( ${CMAKE_BUILD_TYPE} MATCHES "Release" ) + configure_file( "${PROJECT_SOURCE_DIR}/kratos_version.h.in" "${PROJECT_SOURCE_DIR}/kratos/includes/kratos_version.h" @@ -58,8 +81,8 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") endif(${CMAKE_CXX_COMPILER_ID} MATCHES Intel) else(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_C_COMPILER} MATCHES "icc.*$") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -funroll-loops ") #-lpthread -wd654 -wd10010 ") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -funroll-loops ") #-lpthread -wd654 -wd10010 ") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -funroll-loops ") #-lpthread -wd654 -wd10010 ") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -funroll-loops ") #-lpthread -wd654 -wd10010 ") set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined") message("additional default options were set for intel compiler") message("CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}") @@ -285,17 +308,6 @@ include_directories( ${CMAKE_BINARY_DIR}/external_libraries/zlib ) # defines needed add_definitions( -DKRATOS_PYTHON ) -if(${DO_NOT_DEFINE_NDEBUG} MATCHES ON ) - message("*************** ATTENTION AVOIDING DEFINING NDEBUG --- EXTREMELY SLOW!! ***************************") -else(${DO_NOT_DEFINE_NDEBUG} MATCHES ON ) - add_definitions( -DNDEBUG ) -endif(${DO_NOT_DEFINE_NDEBUG} MATCHES ON ) - -if(${KRATOS_DEBUG} MATCHES ON ) - message("*************** DEFINING KRATOS_DEBUG --- VERY SLOW!! ***************************") - add_definitions( -DKRATOS_DEBUG ) -endif(${KRATOS_DEBUG} MATCHES ON ) - if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") add_definitions( -fPIC ) endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") diff --git a/applications/ContactStructuralMechanicsApplication/CMakeLists.txt b/applications/ContactStructuralMechanicsApplication/CMakeLists.txt index 171f2869a23a..ef05a63eac39 100644 --- a/applications/ContactStructuralMechanicsApplication/CMakeLists.txt +++ b/applications/ContactStructuralMechanicsApplication/CMakeLists.txt @@ -6,7 +6,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/kratos ) include_directories( ${CMAKE_SOURCE_DIR}/applications/StructuralMechanicsApplication ) include_directories( ${CMAKE_SOURCE_DIR}/applications/ContactStructuralMechanicsApplication ) include_directories( ${CMAKE_SOURCE_DIR}/applications/MeshingApplication ) -include_directories( ${CMAKE_SOURCE_DIR}/applications/FSIapplication ) ## generate variables with the sources set( KRATOS_CONTACT_STRUCTURAL_MECHANICS_APPLICATION_SOURCES @@ -27,7 +26,7 @@ set( KRATOS_CONTACT_STRUCTURAL_MECHANICS_APPLICATION_SOURCES ## CONDITIONS # Mortar condition - ${CMAKE_CURRENT_SOURCE_DIR}/custom_conditions/mesh_tying_mortar_condition.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/custom_conditions/mesh_tying_mortar_condition.cpp # Mesh tying ${CMAKE_CURRENT_SOURCE_DIR}/custom_conditions/ALM_mortar_contact_condition.cpp # Base class ${CMAKE_CURRENT_SOURCE_DIR}/custom_conditions/ALM_frictionless_mortar_contact_condition.cpp # Frictionless ${CMAKE_CURRENT_SOURCE_DIR}/custom_conditions/ALM_frictionless_mortar_contact_axisym_condition.cpp # Frictionless axisym @@ -42,6 +41,7 @@ endif(${KRATOS_BUILD_TESTING} MATCHES ON) ############################################################### ## define library Kratos which defines the basic python interface add_library(KratosContactStructuralMechanicsApplication SHARED ${KRATOS_CONTACT_STRUCTURAL_MECHANICS_APPLICATION_SOURCES} ${KRATOS_CONTACT_STRUCTURAL_MECHANICS_TESTING_SOURCES}) + target_link_libraries(KratosContactStructuralMechanicsApplication KratosCore KratosStructuralMechanicsApplication) set_target_properties(KratosContactStructuralMechanicsApplication PROPERTIES COMPILE_DEFINITIONS "CONTACT_STRUCTURAL_MECHANICS_APPLICATION=EXPORT,API") set_target_properties(KratosContactStructuralMechanicsApplication PROPERTIES PREFIX "") diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_axisym_condition.h b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_axisym_condition.h index 57fee9d02979..2ca1f8ee43e4 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_axisym_condition.h +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_axisym_condition.h @@ -29,7 +29,7 @@ namespace Kratos ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; @@ -91,7 +91,7 @@ class AugmentedLagrangianMethodFrictionalMortarContactAxisymCondition: public Au typedef typename std::vector> ConditionArrayListType; - typedef Line2D2> DecompositionType; + typedef Line2D2 DecompositionType; typedef DerivativeDataFrictional<2, TNumNodes> DerivativeDataType; diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_condition.cpp b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_condition.cpp index 978885b35124..1aed2900a0f0 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_condition.cpp +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_condition.cpp @@ -66,30 +66,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(12,12); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 8> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 8> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 8>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 8>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -1499,30 +1499,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(27,27); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 18> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 18> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 18>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 18>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -7848,30 +7848,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(36,36); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 24> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 24> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 24>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 24>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -20151,30 +20151,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(12,12); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 8> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 8> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 8>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 8>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); const array_1d, (2 * 2)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -21772,30 +21772,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(27,27); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 18> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 18> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 18>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 18>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); const array_1d, (3 * 3)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -28903,30 +28903,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(36,36); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 24> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 24> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 24>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 24>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); const array_1d, (4 * 3)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -43024,27 +43024,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<2 array_1d rhs(0.0,12); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -43254,27 +43254,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<3 array_1d rhs(0.0,27); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -43708,27 +43708,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<3 array_1d rhs(0.0,36); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -44364,27 +44364,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<2 array_1d rhs(0.0,12); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -44602,27 +44602,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<3 array_1d rhs(0.0,27); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -45074,27 +45074,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<3 array_1d rhs(0.0,36); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; -// The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + // The ALM parameters + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_condition.h b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_condition.h index 750ae4504d13..7964865c3b7d 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_condition.h +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictional_mortar_contact_condition.h @@ -29,7 +29,7 @@ namespace Kratos ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; @@ -87,9 +87,9 @@ class AugmentedLagrangianMethodFrictionalMortarContactCondition: public Augmente typedef typename std::vector> ConditionArrayListType; - typedef Line2D2> LineType; + typedef Line2D2 LineType; - typedef Triangle3D3> TriangleType; + typedef Triangle3D3 TriangleType; typedef typename std::conditional::type DecompositionType; diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_axisym_condition.h b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_axisym_condition.h index 53a47d35291f..77a475106eb9 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_axisym_condition.h +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_axisym_condition.h @@ -29,7 +29,7 @@ namespace Kratos ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; @@ -91,7 +91,7 @@ class AugmentedLagrangianMethodFrictionlessMortarContactAxisymCondition: public typedef typename std::vector> ConditionArrayListType; - typedef Line2D2> DecompositionType; + typedef Line2D2 DecompositionType; typedef DerivativeData<2, TNumNodes> DerivativeDataType; diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_condition.cpp b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_condition.cpp index cc9c44d4cf09..a6bffdc26428 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_condition.cpp +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_condition.cpp @@ -66,26 +66,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<2, 2>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<2, 2>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 8> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 8> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 8>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 8>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; if (rActiveInactive == 0 ) { @@ -886,26 +886,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 3>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 3>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 18> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 18> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 18>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 18>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; if (rActiveInactive == 0 ) { @@ -7147,26 +7147,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 4>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 4>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 24> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 24> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 24>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 24>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; if (rActiveInactive == 0 ) { @@ -30437,26 +30437,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<2, 2>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<2, 2>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 8> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 8> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 8>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 8>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; const array_1d, (2 * 2)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -31295,26 +31295,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 3>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 3>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 18> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 18> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 18>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 18>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; const array_1d, (3 * 3)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -38116,26 +38116,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 4>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 4>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 24> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 24> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 24>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 24>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; const array_1d, (4 * 3)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -63424,23 +63424,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<2, 2>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<2, 2>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -63557,23 +63557,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 3>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 3>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -64001,23 +64001,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 4>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 4>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -65240,23 +65240,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<2, 2>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<2, 2>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -65381,23 +65381,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 3>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 3>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -65861,23 +65861,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 4>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 4>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_condition.h b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_condition.h index 482afb9dd8ee..757efa48ab0b 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_condition.h +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_frictionless_mortar_contact_condition.h @@ -29,7 +29,7 @@ namespace Kratos ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; @@ -87,9 +87,9 @@ class AugmentedLagrangianMethodFrictionlessMortarContactCondition: public Augmen typedef typename std::vector> ConditionArrayListType; - typedef Line2D2> LineType; + typedef Line2D2 LineType; - typedef Triangle3D3> TriangleType; + typedef Triangle3D3 TriangleType; typedef typename std::conditional::type DecompositionType; diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_mortar_contact_condition.cpp b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_mortar_contact_condition.cpp index 0c120c046db4..51f8ea428bbb 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_mortar_contact_condition.cpp +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_mortar_contact_condition.cpp @@ -451,6 +451,148 @@ void AugmentedLagrangianMethodMortarContactCondition /***********************************************************************************/ /***********************************************************************************/ +template< unsigned int TDim, unsigned int TNumNodes, bool TFrictional> +void AugmentedLagrangianMethodMortarContactCondition::AddExplicitContribution(ProcessInfo& rCurrentProcessInfo) +{ + KRATOS_TRY; + + // Create and initialize condition variables + GeneralVariables rVariables; + + // Create the current contact data + DerivativeDataType rDerivativeData; + rDerivativeData.Initialize(this->GetGeometry(), rCurrentProcessInfo); + + // Create the mortar operators + MortarConditionMatrices rThisMortarConditionMatrices; + + // We call the exact integration utility + ExactMortarIntegrationUtility integration_utility = ExactMortarIntegrationUtility (mIntegrationOrder); + + // Iterate over the master segments + for (unsigned int pair_index = 0; pair_index < mPairSize; ++pair_index) + { + if (mThisMasterElementsActive[pair_index] == true) + { + // The normal of the master condition + const array_1d& master_normal = mThisMasterElements[pair_index]->GetValue(NORMAL); + + // Reading integration points + ConditionArrayListType conditions_points_slave; + const bool is_inside = integration_utility.GetExactIntegration(this->GetGeometry(), this->GetValue(NORMAL), mThisMasterElements[pair_index]->GetGeometry(), master_normal, conditions_points_slave); + + if (is_inside == true) + { + IntegrationMethod this_integration_method = GetIntegrationMethod(); + + // Initialize general variables for the current master element + rVariables.Initialize(); + + // Update slave element info + rDerivativeData.UpdateMasterPair(mThisMasterElements[pair_index]); + + // Initialize the mortar operators + rThisMortarConditionMatrices.Initialize(); + + const bool dual_LM = this->CalculateAeAndDeltaAe(rDerivativeData, rVariables, rCurrentProcessInfo, pair_index, conditions_points_slave, this_integration_method, master_normal); + + for (unsigned int i_geom = 0; i_geom < conditions_points_slave.size(); i_geom++) + { + std::vector points_array (TDim); // The points are stored as local coordinates, we calculate the global coordinates of this points + array_1d belong_array; + for (unsigned int i_node = 0; i_node < TDim; i_node++) + { + PointType global_point; + GetGeometry().GlobalCoordinates(global_point, conditions_points_slave[i_geom][i_node]); + points_array[i_node] = boost::make_shared(global_point); + belong_array[i_node] = conditions_points_slave[i_geom][i_node].GetBelong(); + } + + DecompositionType decomp_geom( points_array ); + + const bool bad_shape = (TDim == 2) ? MortarUtilities::LengthCheck(decomp_geom, this->GetGeometry().Length() * 1.0e-6) : MortarUtilities::HeronCheck(decomp_geom); + + if (bad_shape == false) + { + const GeometryType::IntegrationPointsArrayType& integration_points_slave = decomp_geom.IntegrationPoints( this_integration_method ); + + // Integrating the mortar operators + for ( unsigned int point_number = 0; point_number < integration_points_slave.size(); point_number++ ) + { + const PointType local_point_decomp = integration_points_slave[point_number].Coordinates(); + PointType local_point_parent; + PointType gp_global; + decomp_geom.GlobalCoordinates(gp_global, local_point_decomp); + GetGeometry().PointLocalCoordinates(local_point_parent, gp_global); + + // Calculate the kinematic variables + this->CalculateKinematics( rVariables, rDerivativeData, master_normal, pair_index, local_point_decomp, local_point_parent, decomp_geom, dual_LM);//, delta_position_slave); + + const double integration_weight = GetIntegrationWeight(rVariables, integration_points_slave, point_number); + + rThisMortarConditionMatrices.CalculateMortarOperators(rVariables, integration_weight); + } + } + } + + // Setting the weighted gap + // Mortar condition matrices - DOperator and MOperator + const bounded_matrix& DOperator = rThisMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rThisMortarConditionMatrices.MOperator; + + // Current coordinates + const bounded_matrix& x1 = MortarUtilities::GetCoordinates(this->GetGeometry()); + const bounded_matrix& x2 = MortarUtilities::GetCoordinates(mThisMasterElements[pair_index]->GetGeometry()); + + const bounded_matrix D_x1_M_x2 = prod(DOperator, x1) - prod(MOperator, x2); + + for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) + { + const array_1d& normal = GetGeometry()[i_node].GetValue(NORMAL); + const array_1d aux_array = row(D_x1_M_x2, i_node); + + double& weighted_gap = GetGeometry()[i_node].FastGetSolutionStepValue(WEIGHTED_GAP); + + #pragma omp atomic + weighted_gap += inner_prod(aux_array, - subrange(normal, 0, TDim)); + } + + if (TFrictional == true) // TODO: Check this!!! + { + // Old coordinates + const bounded_matrix x1_old = MortarUtilities::GetCoordinates(this->GetGeometry(), false, 1); + const bounded_matrix x2_old = MortarUtilities::GetCoordinates(mThisMasterElements[pair_index]->GetGeometry(), false, 1); + + const bounded_matrix D_x1_old_M_x2_old = prod(DOperator, x1_old) - prod(MOperator, x2_old); + + for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) + { + // We compute the tangent + const array_1d& normal = GetGeometry()[i_node].GetValue(NORMAL); + const array_1d& lm = GetGeometry()[i_node].FastGetSolutionStepValue(VECTOR_LAGRANGE_MULTIPLIER); + const double lm_normal = inner_prod(normal, lm); + array_1d tangent_lm = lm - lm_normal * normal; + tangent_lm /= norm_2(tangent_lm); + array_1d tangent = subrange(tangent_lm, 0, TDim); + + const array_1d aux_array = row(D_x1_old_M_x2_old, i_node); + + double& weighted_slip = GetGeometry()[i_node].FastGetSolutionStepValue(WEIGHTED_SLIP); + + #pragma omp atomic + weighted_slip += inner_prod(aux_array, tangent); + } + } + } + } + } + + KRATOS_CATCH( "" ); +} + +/***********************************************************************************/ +/***********************************************************************************/ + template< unsigned int TDim, unsigned int TNumNodes, bool TFrictional> const unsigned int AugmentedLagrangianMethodMortarContactCondition::CalculateConditionSize( ) @@ -540,12 +682,13 @@ void AugmentedLagrangianMethodMortarContactConditionGetGeometry().Length() * 1.0e-6) : ContactUtilities::HeronCheck(decomp_geom); + const bool bad_shape = (TDim == 2) ? MortarUtilities::LengthCheck(decomp_geom, this->GetGeometry().Length() * 1.0e-6) : MortarUtilities::HeronCheck(decomp_geom); if (bad_shape == false) { - Matrix delta_position_slave; - delta_position_slave = CalculateDeltaPosition(delta_position_slave, conditions_points_slave[i_geom]); +// // Delta position +// Matrix delta_position_slave; +// delta_position_slave = CalculateDeltaPosition(delta_position_slave, conditions_points_slave[i_geom]); const GeometryType::IntegrationPointsArrayType& integration_points_slave = decomp_geom.IntegrationPoints( this_integration_method ); @@ -559,7 +702,7 @@ void AugmentedLagrangianMethodMortarContactConditionCalculateKinematics( rVariables, rDerivativeData, master_normal, pair_index, local_point_decomp, local_point_parent, decomp_geom, dual_LM, delta_position_slave); + this->CalculateKinematics( rVariables, rDerivativeData, master_normal, pair_index, local_point_decomp, local_point_parent, decomp_geom, dual_LM);//, delta_position_slave); const double integration_weight = GetIntegrationWeight(rVariables, integration_points_slave, point_number); @@ -679,13 +822,13 @@ bool AugmentedLagrangianMethodMortarContactCondition DecompositionType decomp_geom( points_array ); - const bool bad_shape = (TDim == 2) ? ContactUtilities::LengthCheck(decomp_geom, this->GetGeometry().Length() * 1.0e-6) : ContactUtilities::HeronCheck(decomp_geom); + const bool bad_shape = (TDim == 2) ? MortarUtilities::LengthCheck(decomp_geom, this->GetGeometry().Length() * 1.0e-6) : MortarUtilities::HeronCheck(decomp_geom); if (bad_shape == false) { - /* Delta position */ - Matrix delta_position_slave; - delta_position_slave = CalculateDeltaPosition(delta_position_slave, ConditionsPointsSlave[i_geom]); +// /* Delta position */ +// Matrix delta_position_slave; +// delta_position_slave = CalculateDeltaPosition(delta_position_slave, ConditionsPointsSlave[i_geom]); const GeometryType::IntegrationPointsArrayType& integration_points_slave = decomp_geom.IntegrationPoints( ThisIntegrationMethod ); @@ -699,7 +842,7 @@ bool AugmentedLagrangianMethodMortarContactCondition GetGeometry().PointLocalCoordinates(local_point_parent, gp_global); // Calculate the kinematic variables - this->CalculateKinematics( rVariables, rDerivativeData, MasterNormal, PairIndex, local_point_decomp, local_point_parent, decomp_geom, false, delta_position_slave); + this->CalculateKinematics( rVariables, rDerivativeData, MasterNormal, PairIndex, local_point_decomp, local_point_parent, decomp_geom, false);//, delta_position_slave); // Update the derivative of the integration vertex (just in 3D) if (TDim == 3) this->CalculateDeltaCellVertex(rVariables, rDerivativeData, belong_array, consider_normal_variation, mThisMasterElements[PairIndex]->GetGeometry()); @@ -750,9 +893,9 @@ void AugmentedLagrangianMethodMortarContactCondition GetGeometry().ShapeFunctionsLocalGradients( rVariables.DNDeSlave, LocalPointParent ); /* CALCULATE JACOBIAN AND JACOBIAN DETERMINANT */ - rVariables.jSlave = GeometryDecomp.Jacobian( rVariables.jSlave, LocalPointDecomp.Coordinates(), DeltaPosition); - rVariables.DetjSlave = MathUtils::GeneralizedDet(rVariables.jSlave); -// rVariables.DetjSlave = GeometryDecomp.DeterminantOfJacobian( LocalPointDecomp ); // TODO: Add this to the geometry.h + rVariables.jSlave = GeometryDecomp.Jacobian( rVariables.jSlave, LocalPointDecomp.Coordinates());//, DeltaPosition); +// rVariables.DetjSlave = MathUtils::GeneralizedDet(rVariables.jSlave); + rVariables.DetjSlave = GeometryDecomp.DeterminantOfJacobian( LocalPointDecomp ); /// MASTER CONDITION /// this->MasterShapeFunctionValue( rVariables, MasterNormal, LocalPointParent, PairIndex); @@ -773,11 +916,11 @@ void AugmentedLagrangianMethodMortarContactCondition GeometryType& master_geometry = mThisMasterElements[PairIndex]->GetGeometry(); PointType projected_gp_global; - const array_1d gp_normal = ContactUtilities::GaussPointNormal(rVariables.NSlave, GetGeometry()); + const array_1d gp_normal = MortarUtilities::GaussPointUnitNormal(rVariables.NSlave, GetGeometry()); GeometryType::CoordinatesArrayType slave_gp_global; this->GetGeometry( ).GlobalCoordinates( slave_gp_global, LocalPoint ); - ContactUtilities::FastProjectDirection( master_geometry, slave_gp_global, projected_gp_global, MasterNormal, -gp_normal ); // The opposite direction + MortarUtilities::FastProjectDirection( master_geometry, slave_gp_global, projected_gp_global, MasterNormal, -gp_normal ); // The opposite direction GeometryType::CoordinatesArrayType projected_gp_local; diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_mortar_contact_condition.h b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_mortar_contact_condition.h index 8d07a581b16a..37d65acc7a16 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_mortar_contact_condition.h +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/ALM_mortar_contact_condition.h @@ -46,7 +46,7 @@ namespace Kratos ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; @@ -246,6 +246,18 @@ class AugmentedLagrangianMethodMortarContactCondition: public Condition GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties ) const override; + + /** + * this is called during the assembling process in order + * to calculate the condition contribution in explicit calculation. + * NodalData is modified Inside the function, so the + * The "AddEXplicit" FUNCTIONS THE ONLY FUNCTIONS IN WHICH A CONDITION + * IS ALLOWED TO WRITE ON ITS NODES. + * the caller is expected to ensure thread safety hence + * SET/UNSETLOCK MUST BE PERFORMED IN THE STRATEGY BEFORE CALLING THIS FUNCTION + * @param rCurrentProcessInfo: the current process info instance + */ + void AddExplicitContribution(ProcessInfo& rCurrentProcessInfo) override; /******************************************************************/ /********** AUXILLIARY METHODS FOR GENERAL CALCULATIONS ***********/ diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/mesh_tying_mortar_condition.cpp b/applications/ContactStructuralMechanicsApplication/custom_conditions/mesh_tying_mortar_condition.cpp index d2a13865163c..09fd8c617ebc 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/mesh_tying_mortar_condition.cpp +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/mesh_tying_mortar_condition.cpp @@ -121,7 +121,7 @@ void MeshTyingMortarCondition::Initialize( ) DecompositionType decomp_geom( points_array ); - const bool bad_shape = (TDim == 2) ? ContactUtilities::LengthCheck(decomp_geom, this->GetGeometry().Length() * 1.0e-6) : ContactUtilities::HeronCheck(decomp_geom); + const bool bad_shape = (TDim == 2) ? MortarUtilities::LengthCheck(decomp_geom, this->GetGeometry().Length() * 1.0e-6) : MortarUtilities::HeronCheck(decomp_geom); if (bad_shape == false) { @@ -796,11 +796,11 @@ void MeshTyingMortarCondition::MasterShapeFunctionVa GeometryType& master_geometry = mThisMasterConditions[PairIndex]->GetGeometry(); PointType projected_gp_global; - const array_1d gp_normal = ContactUtilities::GaussPointNormal(rVariables.NSlave, GetGeometry()); + const array_1d gp_normal = MortarUtilities::GaussPointUnitNormal(rVariables.NSlave, GetGeometry()); GeometryType::CoordinatesArrayType slave_gp_global; this->GetGeometry( ).GlobalCoordinates( slave_gp_global, LocalPoint ); - ContactUtilities::FastProjectDirection( master_geometry, slave_gp_global, projected_gp_global, MasterNormal, -gp_normal ); // The opposite direction + MortarUtilities::FastProjectDirection( master_geometry, slave_gp_global, projected_gp_global, MasterNormal, -gp_normal ); // The opposite direction GeometryType::CoordinatesArrayType projected_gp_local; @@ -825,8 +825,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<2,3 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -889,8 +889,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<2 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -1061,8 +1061,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<2,4 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -1125,8 +1125,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<2 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -1297,8 +1297,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<3,4 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -1411,8 +1411,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<3 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -2173,8 +2173,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<3 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -2357,8 +2357,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<3 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -3703,8 +3703,8 @@ array_1d MeshTyingMortarCondition<2,3,ScalarValue>::CalculateLocalRHS const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0); @@ -3739,8 +3739,8 @@ array_1d MeshTyingMortarCondition<2,3,Vector2DValue>::CalculateLocal const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0); @@ -3781,8 +3781,8 @@ array_1d MeshTyingMortarCondition<2,4,ScalarValue>::CalculateLocalRHS const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0); @@ -3817,8 +3817,8 @@ array_1d MeshTyingMortarCondition<2,4,Vector2DValue>::CalculateLocal const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0); @@ -3859,8 +3859,8 @@ array_1d MeshTyingMortarCondition<3,4,ScalarValue>::CalculateLocalRHS const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0) + MOperator(2,0)*lm(2,0); @@ -3898,8 +3898,8 @@ array_1d MeshTyingMortarCondition<3,4,Vector3DValue>::CalculateLocal const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0) + MOperator(2,0)*lm(2,0); @@ -3955,8 +3955,8 @@ array_1d MeshTyingMortarCondition<3,8,ScalarValue>::CalculateLocalRH const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0) + MOperator(2,0)*lm(2,0) + MOperator(3,0)*lm(3,0); @@ -3997,8 +3997,8 @@ array_1d MeshTyingMortarCondition<3,8,Vector3DValue>::CalculateLocal const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0) + MOperator(2,0)*lm(2,0) + MOperator(3,0)*lm(3,0); diff --git a/applications/ContactStructuralMechanicsApplication/custom_conditions/mesh_tying_mortar_condition.h b/applications/ContactStructuralMechanicsApplication/custom_conditions/mesh_tying_mortar_condition.h index 8cc084b81c65..d174bdd034b2 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_conditions/mesh_tying_mortar_condition.h +++ b/applications/ContactStructuralMechanicsApplication/custom_conditions/mesh_tying_mortar_condition.h @@ -44,7 +44,7 @@ namespace Kratos ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryType; @@ -102,9 +102,9 @@ class MeshTyingMortarCondition: public Condition typedef typename std::vector> ConditionArrayListType; - typedef Line2D2> LineType; + typedef Line2D2 LineType; - typedef Triangle3D3> TriangleType; + typedef Triangle3D3 TriangleType; typedef typename std::conditional::type DecompositionType; diff --git a/applications/ContactStructuralMechanicsApplication/custom_includes/point_item.h b/applications/ContactStructuralMechanicsApplication/custom_includes/point_item.h index b68353171bf1..c25834db11c0 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_includes/point_item.h +++ b/applications/ContactStructuralMechanicsApplication/custom_includes/point_item.h @@ -43,7 +43,7 @@ namespace Kratos /** @brief Custom Point container to be used by the mapper */ -class PointItem: public Point<3> +class PointItem: public Point { public: @@ -58,30 +58,30 @@ class PointItem: public Point<3> /// Default constructors PointItem(): - Point<3>() + Point() {} PointItem(const array_1d Coords): - Point<3>(Coords) + Point(Coords) {} PointItem(Condition::Pointer Cond): mpOriginCond(Cond) { - UpdatePoint(); + UpdatePoint(0.0); } PointItem( const array_1d Coords, Condition::Pointer Cond ): - Point<3>(Coords), + Point(Coords), mpOriginCond(Cond) {} ///Copy constructor (not really required) PointItem(const PointItem& rhs): - Point<3>(rhs), + Point(rhs), mpOriginCond(rhs.mpOriginCond) { } @@ -101,9 +101,9 @@ class PointItem: public Point<3> * Returns the point * @return The point */ - Point<3> GetPoint() + Point GetPoint() { - Point<3> Point(this->Coordinates()); + Point Point(this->Coordinates()); return Point; } @@ -112,7 +112,7 @@ class PointItem: public Point<3> * Set the point * @param The point */ - void SetPoint(const Point<3> Point) + void SetPoint(const Point Point) { this->Coordinates() = Point.Coordinates(); } @@ -142,9 +142,19 @@ class PointItem: public Point<3> * @return Coordinates: The coordinates of the item */ - void UpdatePoint() - { - this->Coordinates() = mpOriginCond->GetGeometry().Center().Coordinates(); + void UpdatePoint(const double& DeltaTime) + { + Point center; + if (mpOriginCond->GetGeometry()[0].SolutionStepsDataHas(VELOCITY_X) == true) + { + center = ContactUtilities::GetHalfJumpCenter(mpOriginCond->GetGeometry(), DeltaTime); // NOTE: Center in half delta time + } + else + { + center = mpOriginCond->GetGeometry().Center(); // NOTE: Real center + } + + this->Coordinates() = center.Coordinates(); } protected: diff --git a/applications/ContactStructuralMechanicsApplication/custom_processes/aalm_adapt_penalty_value_process.h b/applications/ContactStructuralMechanicsApplication/custom_processes/aalm_adapt_penalty_value_process.h index 6d3c4f613a44..b47d29bacf5b 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_processes/aalm_adapt_penalty_value_process.h +++ b/applications/ContactStructuralMechanicsApplication/custom_processes/aalm_adapt_penalty_value_process.h @@ -123,7 +123,7 @@ class AALMAdaptPenaltyValueProcess // Weighted values const double& current_gap = it_node->FastGetSolutionStepValue(WEIGHTED_GAP); - const double& previous_gap = it_node->FastGetSolutionStepValue(WEIGHTED_GAP,1); + const double& previous_gap = it_node->FastGetSolutionStepValue(WEIGHTED_GAP, 1); // Nodal H const double& nodal_h = it_node->FastGetSolutionStepValue(NODAL_H); diff --git a/applications/ContactStructuralMechanicsApplication/custom_processes/alm_variables_calculation_process.h b/applications/ContactStructuralMechanicsApplication/custom_processes/alm_variables_calculation_process.h index 86d088fcdae6..69d3d5590de5 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_processes/alm_variables_calculation_process.h +++ b/applications/ContactStructuralMechanicsApplication/custom_processes/alm_variables_calculation_process.h @@ -58,7 +58,7 @@ class ALMVariablesCalculationProcess // General type definitions typedef Node<3> NodeType; - typedef Point<3> PointType; + typedef Point PointType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; typedef ModelPart::NodesContainerType NodesArrayType; diff --git a/applications/ContactStructuralMechanicsApplication/custom_python/add_custom_strategies_to_python.cpp b/applications/ContactStructuralMechanicsApplication/custom_python/add_custom_strategies_to_python.cpp index f11e18fdf859..43f57b572476 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_python/add_custom_strategies_to_python.cpp +++ b/applications/ContactStructuralMechanicsApplication/custom_python/add_custom_strategies_to_python.cpp @@ -84,6 +84,8 @@ void AddCustomStrategiesToPython() typedef DisplacementLagrangeMultiplierMixedContactCriteria< SparseSpaceType, LocalSpaceType > DisplacementLagrangeMultiplierMixedContactCriteriaType; typedef DisplacementLagrangeMultiplierResidualContactCriteria< SparseSpaceType, LocalSpaceType > DisplacementLagrangeMultiplierResidualContactCriteriaType; + // Linear solvers + // Custom builder and solvers types //******************************************************************** @@ -128,6 +130,7 @@ void AddCustomStrategiesToPython() init()) .def(init()) .def(init()) + .def(init()) ; // Weighted residual values update diff --git a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/alm_frictional_mortar_criteria.h b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/alm_frictional_mortar_criteria.h index 87b2f014b92d..26ecc7af6b22 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/alm_frictional_mortar_criteria.h +++ b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/alm_frictional_mortar_criteria.h @@ -20,9 +20,7 @@ #include "custom_utilities/contact_utilities.h" #include "utilities/table_stream_utility.h" #include "custom_strategies/custom_convergencecriterias/base_mortar_criteria.h" -#if !defined(_WIN32) - #include "utilities/color_utilities.h" -#endif +#include "utilities/color_utilities.h" namespace Kratos { @@ -112,6 +110,29 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg ///@name Operators ///@{ + /** + * Criterias that need to be called before getting the solution + * @param rModelPart Reference to the ModelPart containing the contact problem. + * @param rDofSet Reference to the container of the problem's degrees of freedom (stored by the BuilderAndSolver) + * @param A System matrix (unused) + * @param Dx Vector of results (variations on nodal variables) + * @param b RHS vector (residual) + * @return true if convergence is achieved, false otherwise + */ + + bool PreCriteria( + ModelPart& rModelPart, + DofsArrayType& rDofSet, + const TSystemMatrixType& A, + const TSystemVectorType& Dx, + const TSystemVectorType& b + ) override + { + BaseType::PreCriteria(rModelPart, rDofSet, A, Dx, b); + + return true; + } + /** * Compute relative and absolute error. * @param rModelPart Reference to the ModelPart containing the contact problem. @@ -130,7 +151,8 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg const TSystemVectorType& b ) override { - BaseType::CalculateContactReactions(rModelPart, rDofSet, b); + // We call the base class + BaseType::PostCriteria(rModelPart, rDofSet, A, Dx, b); // Defining the convergence unsigned int is_converged_active = 0; @@ -212,8 +234,6 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg } else { - (it_node)->FastGetSolutionStepValue(VECTOR_LAGRANGE_MULTIPLIER) = zero_vector; // NOTE: To clear the value (can affect future iterations) - if ((it_node)->Is(ACTIVE) == true ) { (it_node)->Set(ACTIVE, false); @@ -233,11 +253,7 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg { if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FGRN(" Achieved")); - #else - table << "Achieved"; - #endif } else { @@ -248,11 +264,7 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg { if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FRED(" Not achieved")); - #else - table << "Not achieved"; - #endif } else { @@ -263,11 +275,7 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg { if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FGRN(" Achieved")); - #else - table << "Achieved"; - #endif } else { @@ -278,11 +286,7 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg { if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FRED(" Not achieved")); - #else - table << "Not achieved"; - #endif } else { @@ -296,11 +300,7 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tActive set") << " convergence is " << BOLDFONT(FGRN("achieved")) << std::endl; - #else - std::cout << "\tActive set convergence is achieved" << std::endl; - #endif } else { @@ -311,11 +311,7 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tActive set") << " convergence is " << BOLDFONT(FRED("not achieved")) << std::endl; - #else - std::cout << "\tActive set convergence is not achieved" << std::endl; - #endif } else { @@ -327,11 +323,7 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tSlip/stick set") << " convergence is " << BOLDFONT(FGRN("achieved")) << std::endl; - #else - std::cout << "\tSlip/stick set convergence is achieved" << std::endl; - #endif } else { @@ -342,11 +334,7 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tSlip/stick set") << " convergence is " << BOLDFONT(FRED("not achieved")) << std::endl; - #else - std::cout << "\tSlip/stick set convergence is not achieved" << std::endl; - #endif } else { @@ -487,7 +475,27 @@ class ALMFrictionalMortarConvergenceCriteria : public virtual BaseMortarConverg ///@} ///@name Protected Operations ///@{ + + /** + * This method resets the weighted gap in the nodes of the problem + * @param rModelPart Reference to the ModelPart containing the contact problem. + */ + + void ResetWeightedGap(ModelPart& rModelPart) override + { + NodesArrayType& nodes_array = rModelPart.GetSubModelPart("Contact").Nodes(); + const int num_nodes = static_cast(nodes_array.size()); + #pragma omp parallel for + for(int i = 0; i < num_nodes; i++) + { + auto it_node = nodes_array.begin() + i; + + it_node->FastGetSolutionStepValue(WEIGHTED_GAP) = 0.0; + it_node->FastGetSolutionStepValue(WEIGHTED_SLIP) = 0.0; + } + } + ///@} ///@name Protected Access ///@{ diff --git a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/alm_frictionless_mortar_criteria.h b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/alm_frictionless_mortar_criteria.h index 4c467ac5d187..bd79a8d11d83 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/alm_frictionless_mortar_criteria.h +++ b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/alm_frictionless_mortar_criteria.h @@ -20,9 +20,7 @@ #include "custom_utilities/contact_utilities.h" #include "utilities/table_stream_utility.h" #include "custom_strategies/custom_convergencecriterias/base_mortar_criteria.h" -#if !defined(_WIN32) - #include "utilities/color_utilities.h" -#endif +#include "utilities/color_utilities.h" namespace Kratos { @@ -111,7 +109,7 @@ class ALMFrictionlessMortarConvergenceCriteria : public virtual BaseMortarConve ///@} ///@name Operators ///@{ - + /** * Compute relative and absolute error. * @param rModelPart Reference to the ModelPart containing the contact problem. @@ -130,7 +128,8 @@ class ALMFrictionlessMortarConvergenceCriteria : public virtual BaseMortarConve const TSystemVectorType& b ) override { - BaseType::CalculateContactReactions(rModelPart, rDofSet, b); + // We call the base class + BaseType::PostCriteria(rModelPart, rDofSet, A, Dx, b); // Defining the convergence unsigned int is_converged = 0; @@ -172,8 +171,6 @@ class ALMFrictionlessMortarConvergenceCriteria : public virtual BaseMortarConve } else { - (it_node)->FastGetSolutionStepValue(NORMAL_CONTACT_STRESS) = 0.0; // NOTE: To clear the value (can affect future iterations) - if ((it_node)->Is(ACTIVE) == true ) { (it_node)->Set(ACTIVE, false); @@ -193,13 +190,7 @@ class ALMFrictionlessMortarConvergenceCriteria : public virtual BaseMortarConve { if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FGRN(" Achieved")); - #else - table << "Achieved"; - //const std::basic_ostream>& ThisStream = std::cout << colorwin::color(colorwin::green) << "Achieved"; - //Table << &ThisStream; - #endif } else { @@ -210,13 +201,7 @@ class ALMFrictionlessMortarConvergenceCriteria : public virtual BaseMortarConve { if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FRED(" Not achieved")); - #else - table << "Not achieved"; - //std::basic_ostream>& ThisStream = std::cout << colorwin::color(colorwin::red) << " Not achieved"; - //Table << (&ThisStream); - #endif } else { @@ -230,22 +215,14 @@ class ALMFrictionlessMortarConvergenceCriteria : public virtual BaseMortarConve { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tActive set") << " convergence is " << BOLDFONT(FGRN("achieved")) << std::endl; - #else - std::cout << "\tActive set convergence is achieved" << std::endl; - #endif } } else { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tActive set") << " convergence is " << BOLDFONT(FRED("not achieved")) << std::endl; - #else - std::cout << "\tActive set convergence is not achieved" << std::endl; - #endif } else { diff --git a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/base_mortar_criteria.h b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/base_mortar_criteria.h index 42034826040e..018fd9e1934d 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/base_mortar_criteria.h +++ b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/base_mortar_criteria.h @@ -124,8 +124,6 @@ class BaseMortarConvergenceCriteria : public virtual ConvergenceCriteria< TSpar // We recalculate the penalty parameter if (rModelPart.GetProcessInfo()[ADAPT_PENALTY] == true) { - CalculateContactReactions(rModelPart, rDofSet, b); - AALMAdaptPenaltyValueProcess aalm_adaptation_of_penalty = AALMAdaptPenaltyValueProcess( rModelPart ); aalm_adaptation_of_penalty.Execute(); } @@ -151,7 +149,21 @@ class BaseMortarConvergenceCriteria : public virtual ConvergenceCriteria< TSpar const TSystemVectorType& b ) override { - KRATOS_ERROR << "WARNING:: YOUR ARE CALLING THE BASE MORTAR CRITERIA" << std::endl; + // Set to zero the weighted gap + ResetWeightedGap(rModelPart); + + ConditionsArrayType& conditions_array = rModelPart.GetSubModelPart("Contact").Conditions(); + const int num_conditions = static_cast(conditions_array.size()); + + #pragma omp parallel for + for(int i = 0; i < num_conditions; i++) + { + auto it_cond = conditions_array.begin() + i; + + it_cond->AddExplicitContribution(rModelPart.GetProcessInfo()); + } + + return true; } /** @@ -274,39 +286,21 @@ class BaseMortarConvergenceCriteria : public virtual ConvergenceCriteria< TSpar ///@{ /** - * This method calculates the reactions concerning the contact (residual of the contact) + * This method resets the weighted gap in the nodes of the problem * @param rModelPart Reference to the ModelPart containing the contact problem. - * @param b: The residual vector */ - void CalculateContactReactions( - ModelPart& rModelPart, - DofsArrayType& rDofSet, - const TSystemVectorType& b - ) + virtual void ResetWeightedGap(ModelPart& rModelPart) { - const double ScaleFactor = (rModelPart.GetProcessInfo()[SCALE_FACTOR] > 0.0) ? rModelPart.GetProcessInfo()[SCALE_FACTOR] : 1.0; - - const int numDof = rDofSet.end() - rDofSet.begin(); + NodesArrayType& nodes_array = rModelPart.GetSubModelPart("Contact").Nodes(); + const int num_nodes = static_cast(nodes_array.size()); -// #pragma omp parallel for - for (int i = 0; i < numDof; i++) + #pragma omp parallel for + for(int i = 0; i < num_nodes; i++) { - typename DofsArrayType::iterator itDoF = rDofSet.begin() + i; - - if ((itDoF)->IsFixed() == false) // TODO: Ask Riccardo how the elimination builder and solver orders the DoFs - { - const std::size_t j = (itDoF)->EquationId(); - - if (((itDoF)->GetReaction().Name()).find("WEIGHTED") != std::string::npos) // Corresponding with contact - { - (itDoF)->GetSolutionStepReactionValue() = -b[j] / ScaleFactor; - } - else if ((itDoF)->GetReaction().Name() != "NONE") // The others - { - (itDoF)->GetSolutionStepReactionValue() = -b[j]; - } - } + auto it_node = nodes_array.begin() + i; + + it_node->FastGetSolutionStepValue(WEIGHTED_GAP) = 0.0; } } diff --git a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_contact_criteria.h b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_contact_criteria.h index b4c4915dbf5f..2d2d4685c135 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_contact_criteria.h +++ b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_contact_criteria.h @@ -22,9 +22,7 @@ #include "includes/define.h" #include "utilities/table_stream_utility.h" #include "solving_strategies/convergencecriterias/convergence_criteria.h" -#if !defined(_WIN32) - #include "utilities/color_utilities.h" -#endif +#include "utilities/color_utilities.h" namespace Kratos { @@ -242,15 +240,9 @@ class DisplacementLagrangeMultiplierContactCriteria : public ConvergenceCriteria std::cout.precision(4); if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("DoF ONVERGENCE CHECK") << "\tSTEP: " << rModelPart.GetProcessInfo()[TIME_STEPS] << "\tNL ITERATION: " << rModelPart.GetProcessInfo()[NL_ITERATION_NUMBER] << std::endl; std::cout << BOLDFONT("\tDISPLACEMENT: RATIO = ") << disp_ratio << BOLDFONT(" EXP.RATIO = ") << mDispRatioTolerance << BOLDFONT(" ABS = ") << disp_abs << BOLDFONT(" EXP.ABS = ") << mDispAbsTolerance << std::endl; std::cout << BOLDFONT(" LAGRANGE MUL:\tRATIO = ") << lm_ratio << BOLDFONT(" EXP.RATIO = ") << mLMRatioTolerance << BOLDFONT(" ABS = ") << lm_abs << BOLDFONT(" EXP.ABS = ") << mLMAbsTolerance << std::endl; - #else - std::cout << "DoF ONVERGENCE CHECK" << "\tSTEP: " << rModelPart.GetProcessInfo()[TIME_STEPS] << "\tNL ITERATION: " << rModelPart.GetProcessInfo()[NL_ITERATION_NUMBER] << std::endl; - std::cout << "\tDISPLACEMENT: RATIO = " << disp_ratio << " EXP.RATIO = " << mDispRatioTolerance << " ABS = " << disp_abs << " EXP.ABS = " << mDispAbsTolerance << std::endl; - std::cout << " LAGRANGE MUL:\tRATIO = " << lm_ratio << " EXP.RATIO = " << mLMRatioTolerance << " ABS = " << lm_abs << " EXP.ABS = " << mLMAbsTolerance << std::endl; - #endif } else { @@ -271,11 +263,7 @@ class DisplacementLagrangeMultiplierContactCriteria : public ConvergenceCriteria auto& table = mpTable->GetTable(); if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FGRN(" Achieved")); - #else - table << "Achieved"; - #endif } else { @@ -286,11 +274,7 @@ class DisplacementLagrangeMultiplierContactCriteria : public ConvergenceCriteria { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tDoF") << " convergence is " << BOLDFONT(FGRN("achieved")) << std::endl; - #else - std::cout << "\tDoF convergence is achieved" << std::endl; - #endif } else { @@ -309,11 +293,7 @@ class DisplacementLagrangeMultiplierContactCriteria : public ConvergenceCriteria auto& table = mpTable->GetTable(); if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FRED(" Not achieved")); - #else - table << "Not achieved"; - #endif } else { @@ -324,11 +304,7 @@ class DisplacementLagrangeMultiplierContactCriteria : public ConvergenceCriteria { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tDoF") << " convergence is " << BOLDFONT(FRED(" not achieved")) << std::endl; - #else - std::cout << "\tDoF convergence is not achieved" << std::endl; - #endif } else { diff --git a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_mixed_contact_criteria.h b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_mixed_contact_criteria.h index b4368dcf43b8..665f73f22886 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_mixed_contact_criteria.h +++ b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_mixed_contact_criteria.h @@ -22,9 +22,7 @@ #include "includes/define.h" #include "utilities/table_stream_utility.h" #include "solving_strategies/convergencecriterias/convergence_criteria.h" -#if !defined(_WIN32) - #include "utilities/color_utilities.h" -#endif +#include "utilities/color_utilities.h" namespace Kratos { @@ -265,15 +263,9 @@ class DisplacementLagrangeMultiplierMixedContactCriteria : public ConvergenceCri std::cout.precision(4); if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("MIXED CONVERGENCE CHECK") << "\tSTEP: " << rModelPart.GetProcessInfo()[TIME_STEPS] << "\tNL ITERATION: " << rModelPart.GetProcessInfo()[NL_ITERATION_NUMBER] << std::endl << std::scientific; std::cout << BOLDFONT("\tDISPLACEMENT: RATIO = ") << residual_disp_ratio << BOLDFONT(" EXP.RATIO = ") << mDispRatioTolerance << BOLDFONT(" ABS = ") << residual_disp_abs << BOLDFONT(" EXP.ABS = ") << mDispAbsTolerance << std::endl; std::cout << BOLDFONT("\tLAGRANGE MUL: RATIO = ") << lm_ratio << BOLDFONT(" EXP.RATIO = ") << mLMRatioTolerance << BOLDFONT(" ABS = ") << lm_abs << BOLDFONT(" EXP.ABS = ") << mLMAbsTolerance << std::endl; - #else - std::cout << "MIXED CONVERGENCE CHECK" << "\tSTEP: " << rModelPart.GetProcessInfo()[TIME_STEPS] << "\tNL ITERATION: " << rModelPart.GetProcessInfo()[NL_ITERATION_NUMBER] << std::endl << std::scientific; - std::cout << "\tDISPLACEMENT: RATIO = " << residual_disp_ratio << " EXP.RATIO = " << mDispRatioTolerance << " ABS = " << residual_disp_abs << " EXP.ABS = " << mDispAbsTolerance << std::endl; - std::cout << "\tLAGRANGE MUL: RATIO = " << lm_ratio << " EXP.RATIO = " << mLMRatioTolerance << " ABS = " << lm_abs << " EXP.ABS = " << mLMAbsTolerance << std::endl; - #endif } else { @@ -297,11 +289,7 @@ class DisplacementLagrangeMultiplierMixedContactCriteria : public ConvergenceCri auto& table = mpTable->GetTable(); if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FGRN(" Achieved")); - #else - table << "Achieved"; - #endif } else { @@ -312,11 +300,7 @@ class DisplacementLagrangeMultiplierMixedContactCriteria : public ConvergenceCri { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tConvergence") << " is " << BOLDFONT(FGRN("achieved")) << std::endl; - #else - std::cout << "\tConvergence is achieved" << std::endl; - #endif } else { @@ -335,11 +319,7 @@ class DisplacementLagrangeMultiplierMixedContactCriteria : public ConvergenceCri auto& table = mpTable->GetTable(); if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FRED(" Not achieved")); - #else - table << "Not achieved"; - #endif } else { @@ -350,11 +330,7 @@ class DisplacementLagrangeMultiplierMixedContactCriteria : public ConvergenceCri { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tConvergence") << " is " << BOLDFONT(FRED(" not achieved")) << std::endl; - #else - std::cout << "\tConvergence is not achieved" << std::endl; - #endif } else { diff --git a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_residual_contact_criteria.h b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_residual_contact_criteria.h index 90bb94ab567c..29b619a6e938 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_residual_contact_criteria.h +++ b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/displacement_lagrangemultiplier_residual_contact_criteria.h @@ -22,9 +22,7 @@ #include "includes/define.h" #include "utilities/table_stream_utility.h" #include "solving_strategies/convergencecriterias/convergence_criteria.h" -#if !defined(_WIN32) - #include "utilities/color_utilities.h" -#endif +#include "utilities/color_utilities.h" namespace Kratos { @@ -271,15 +269,9 @@ class DisplacementLagrangeMultiplierResidualContactCriteria : public Convergence std::cout.precision(4); if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("RESIDUAL CONVERGENCE CHECK") << "\tSTEP: " << rModelPart.GetProcessInfo()[TIME_STEPS] << "\tNL ITERATION: " << rModelPart.GetProcessInfo()[NL_ITERATION_NUMBER] << std::endl << std::scientific; std::cout << BOLDFONT("\tDISPLACEMENT: RATIO = ") << residual_disp_ratio << BOLDFONT(" EXP.RATIO = ") << mDispRatioTolerance << BOLDFONT(" ABS = ") << residual_disp_abs << BOLDFONT(" EXP.ABS = ") << mDispAbsTolerance << std::endl; std::cout << BOLDFONT("\tLAGRANGE MUL: RATIO = ") << residual_lm_ratio << BOLDFONT(" EXP.RATIO = ") << mLMRatioTolerance << BOLDFONT(" ABS = ") << residual_lm_abs << BOLDFONT(" EXP.ABS = ") << mLMAbsTolerance << std::endl; - #else - std::cout << "RESIDUAL CONVERGENCE CHECK" << "\tSTEP: " << rModelPart.GetProcessInfo()[TIME_STEPS] << "\tNL ITERATION: " << rModelPart.GetProcessInfo()[NL_ITERATION_NUMBER] << std::endl << std::scientific; - std::cout << "\tDISPLACEMENT: RATIO = " << residual_disp_ratio << " EXP.RATIO = " << mDispRatioTolerance << " ABS = " << residual_disp_abs << " EXP.ABS = " << mDispAbsTolerance << std::endl; - std::cout << "\tLAGRANGE MUL: RATIO = " << residual_lm_ratio << " EXP.RATIO = " << mLMRatioTolerance << " ABS = " << residual_lm_abs << " EXP.ABS = " << mLMAbsTolerance << std::endl; - #endif } else { @@ -303,11 +295,7 @@ class DisplacementLagrangeMultiplierResidualContactCriteria : public Convergence auto& Table = mpTable->GetTable(); if (mPrintingOutput == false) { - #if !defined(_WIN32) Table << BOLDFONT(FGRN(" Achieved")); - #else - Table << "Achieved"; - #endif } else { @@ -318,11 +306,7 @@ class DisplacementLagrangeMultiplierResidualContactCriteria : public Convergence { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tResidual") << " convergence is " << BOLDFONT(FGRN("achieved")) << std::endl; - #else - std::cout << "\tResidual convergence is achieved" << std::endl; - #endif } else { @@ -341,11 +325,7 @@ class DisplacementLagrangeMultiplierResidualContactCriteria : public Convergence auto& table = mpTable->GetTable(); if (mPrintingOutput == false) { - #if !defined(_WIN32) table << BOLDFONT(FRED(" Not achieved")); - #else - table << "Not achieved"; - #endif } else { @@ -356,11 +336,7 @@ class DisplacementLagrangeMultiplierResidualContactCriteria : public Convergence { if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << BOLDFONT("\tResidual") << " convergence is " << BOLDFONT(FRED(" not achieved")) << std::endl; - #else - std::cout << "\tResidual convergence is not achieved" << std::endl; - #endif } else { diff --git a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/mesh_tying_mortar_criteria.h b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/mesh_tying_mortar_criteria.h index 99741f74b150..55e4f75b1f31 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/mesh_tying_mortar_criteria.h +++ b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/mesh_tying_mortar_criteria.h @@ -19,9 +19,7 @@ /* Project includes */ #include "custom_strategies/custom_convergencecriterias/base_mortar_criteria.h" #include "utilities/table_stream_utility.h" -#if !defined(_WIN32) - #include "utilities/color_utilities.h" -#endif +#include "utilities/color_utilities.h" namespace Kratos { @@ -119,9 +117,7 @@ class MeshTyingMortarConvergenceCriteria : public virtual BaseMortarConvergence const TSystemVectorType& Dx, const TSystemVectorType& b ) override - { - BaseType::CalculateContactReactions(rModelPart, rDofSet, b); - + { if (mpTable != nullptr) { // TODO: Add somethig if necessary diff --git a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/mortar_and_criteria.h b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/mortar_and_criteria.h index e97519fc1c1a..e0044486901f 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/mortar_and_criteria.h +++ b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_convergencecriterias/mortar_and_criteria.h @@ -13,6 +13,7 @@ #define KRATOS_MORTAR_AND_CRITERIA_H /* System includes */ +#include // std::sort /* External includes */ @@ -21,9 +22,9 @@ #include "includes/model_part.h" #include "utilities/table_stream_utility.h" #include "solving_strategies/convergencecriterias/and_criteria.h" -#if !defined(_WIN32) - #include "utilities/color_utilities.h" -#endif +#include "utilities/color_utilities.h" +#include "utilities/svd_utils.h" +#include "linear_solvers/linear_solver.h" namespace Kratos { @@ -86,6 +87,14 @@ class MortarAndConvergenceCriteria : public And_Criteria< TSparseSpace, TDenseSp typedef TSparseSpace SparseSpaceType; + typedef typename TSparseSpace::MatrixType SparseMatrixType; + + typedef typename TSparseSpace::VectorType SparseVectorType; + + typedef typename TDenseSpace::MatrixType DenseMatrixType; + + typedef typename TDenseSpace::VectorType DenseVectorType; + typedef typename BaseType::TDataType TDataType; typedef typename BaseType::DofsArrayType DofsArrayType; @@ -93,7 +102,7 @@ class MortarAndConvergenceCriteria : public And_Criteria< TSparseSpace, TDenseSp typedef typename BaseType::TSystemMatrixType TSystemMatrixType; typedef typename BaseType::TSystemVectorType TSystemVectorType; - + typedef boost::shared_ptr TablePrinterPointerType; ///@} @@ -107,11 +116,13 @@ class MortarAndConvergenceCriteria : public And_Criteria< TSparseSpace, TDenseSp typename ConvergenceCriteria < TSparseSpace, TDenseSpace >::Pointer pFirstCriterion, typename ConvergenceCriteria < TSparseSpace, TDenseSpace >::Pointer pSecondCriterion, TablePrinterPointerType pTable = nullptr, - const bool PrintingOutput = false + const bool PrintingOutput = false, + const bool ComputeConditionNumber = false ) :And_Criteria< TSparseSpace, TDenseSpace >(pFirstCriterion, pSecondCriterion), mpTable(pTable), mPrintingOutput(PrintingOutput), + mComputeConditionNumber(ComputeConditionNumber), mTableIsInitialized(false) { } @@ -124,6 +135,7 @@ class MortarAndConvergenceCriteria : public And_Criteria< TSparseSpace, TDenseSp ,mpTable(rOther.mpTable) ,mPrintingOutput(rOther.mPrintingOutput) ,mTableIsInitialized(rOther.mTableIsInitialized) + ,mComputeConditionNumber(rOther.mComputeConditionNumber) { BaseType::mpFirstCriterion = rOther.mpFirstCriterion; BaseType::mpSecondCriterion = rOther.mpSecondCriterion; @@ -166,6 +178,29 @@ class MortarAndConvergenceCriteria : public And_Criteria< TSparseSpace, TDenseSp bool criterion_result = BaseType::PostCriteria(rModelPart,rDofSet,A,Dx,b); + if (mComputeConditionNumber == true) + { + const double condition_number = SVDUtils::SVDConditionNumber(A); // TODO: Use the new power iteration solver when avalaible + + if (mpTable != nullptr) + { + std::cout.precision(4); + auto& Table = mpTable->GetTable(); + Table << condition_number; + } + else + { + if (mPrintingOutput == false) + { + std::cout << "\n" << BOLDFONT("CONDITION NUMBER:") << "\t " << std::scientific << condition_number << std::endl; + } + else + { + std::cout << "\n" << "CONDITION NUMBER:" << "\t" << std::scientific << condition_number << std::endl; + } + } + } + if (criterion_result == true && rModelPart.GetCommunicator().MyPID() == 0 && this->GetEchoLevel() > 0) { if (mpTable != nullptr) @@ -191,7 +226,13 @@ class MortarAndConvergenceCriteria : public And_Criteria< TSparseSpace, TDenseSp mTableIsInitialized = true; } - BaseType::Initialize(rModelPart); + BaseType::Initialize(rModelPart); + + if (mpTable != nullptr && mComputeConditionNumber == true) + { + auto& table = mpTable->GetTable(); + table.AddColumn("COND.NUM.", 10); + } } /** @@ -216,11 +257,7 @@ class MortarAndConvergenceCriteria : public And_Criteria< TSparseSpace, TDenseSp std::cout.precision(4); if (mPrintingOutput == false) { - #if !defined(_WIN32) std::cout << "\n\n" << BOLDFONT("CONVERGENCE CHECK") << "\tSTEP: " << rModelPart.GetProcessInfo()[TIME_STEPS] << "\tTIME: " << std::scientific << rModelPart.GetProcessInfo()[TIME] << "\tDELTA TIME: " << std::scientific << rModelPart.GetProcessInfo()[DELTA_TIME] << std::endl; - #else - std::cout << "\n\n" << "CONVERGENCE CHECK" << "\tSTEP: " << rModelPart.GetProcessInfo()[TIME_STEPS] << "\tTIME: " << std::scientific << rModelPart.GetProcessInfo()[TIME] << "\tDELTA TIME: " << std::scientific << rModelPart.GetProcessInfo()[DELTA_TIME] << std::endl; - #endif } else { @@ -313,9 +350,10 @@ class MortarAndConvergenceCriteria : public And_Criteria< TSparseSpace, TDenseSp ///@name Member Variables ///@{ - TablePrinterPointerType mpTable; // Pointer to the fancy table - bool mPrintingOutput; // If the colors and bold are printed - bool mTableIsInitialized; // If the table is already initialized + TablePrinterPointerType mpTable; // Pointer to the fancy table + bool mPrintingOutput; // If the colors and bold are printed + bool mComputeConditionNumber; // If the condition number is computed + bool mTableIsInitialized; // If the table is already initialized ///@} ///@name Private Operators diff --git a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_strategies/residualbased_newton_raphson_contact_strategy.h b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_strategies/residualbased_newton_raphson_contact_strategy.h index 5a6f220bc4d7..1f28817e100d 100755 --- a/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_strategies/residualbased_newton_raphson_contact_strategy.h +++ b/applications/ContactStructuralMechanicsApplication/custom_strategies/custom_strategies/residualbased_newton_raphson_contact_strategy.h @@ -28,9 +28,7 @@ // Utilities #include "utilities/variable_utils.h" -#if !defined(_WIN32) - #include "utilities/color_utilities.h" -#endif +#include "utilities/color_utilities.h" #include "custom_utilities/process_factory_utility.h" // TODO: Extend the descriptions @@ -692,15 +690,9 @@ class ResidualBasedNewtonRaphsonContactStrategy : const double Time = StrategyBaseType::GetModelPart().GetProcessInfo()[TIME]; std::cout.precision(4); std::cout << "|----------------------------------------------------|" << std::endl; - #if !defined(_WIN32) - std::cout << "| " << BOLDFONT("Max. iter. exceeded: SPLITTING TIME STEP") << " |" << std::endl; - std::cout << "| " << BOLDFONT("COMING BACK TO TIME: ") << std::scientific << Time << " |" << std::endl; - std::cout << "| " << BOLDFONT(" NEW TIME STEP: ") << std::scientific << AuxDeltaTime << " |" << std::endl; - #else - std::cout << "| Max. iter. exceeded: SPLITTING TIME STEP |" << std::endl; - std::cout << "| COMING BACK TO TIME: " << std::scientific << Time << " |" << std::endl; - std::cout << "| NEW TIME STEP: " << std::scientific << AuxDeltaTime << " |" << std::endl; - #endif + std::cout << "| " << BOLDFONT("Max. iter. exceeded: SPLITTING TIME STEP") << " |" << std::endl; + std::cout << "| " << BOLDFONT("COMING BACK TO TIME: ") << std::scientific << Time << " |" << std::endl; + std::cout << "| " << BOLDFONT(" NEW TIME STEP: ") << std::scientific << AuxDeltaTime << " |" << std::endl; std::cout << "|----------------------------------------------------|" << std::endl; } } @@ -714,11 +706,7 @@ class ResidualBasedNewtonRaphsonContactStrategy : if (mConvergenceCriteriaEchoLevel > 0 && StrategyBaseType::GetModelPart().GetCommunicator().MyPID() == 0 ) { std::cout << "|----------------------------------------------------|" << std::endl; - #if !defined(_WIN32) - std::cout << "| " << BOLDFONT(FRED("ATTENTION: Max iterations exceeded")) << " |" << std::endl; - #else - std::cout << "| ATTENTION: Max iterations exceeded |" << std::endl; - #endif + std::cout << "| " << BOLDFONT(FRED("ATTENTION: Max iterations exceeded")) << " |" << std::endl; std::cout << "|----------------------------------------------------|" << std::endl; } } @@ -732,13 +720,8 @@ class ResidualBasedNewtonRaphsonContactStrategy : if (mConvergenceCriteriaEchoLevel > 0 && StrategyBaseType::GetModelPart().GetCommunicator().MyPID() == 0 ) { std::cout << "|----------------------------------------------------|" << std::endl; - #if !defined(_WIN32) - std::cout << "| " << BOLDFONT(FRED("ATTENTION: Max iterations exceeded")) << " |" << std::endl; - std::cout << "| " << BOLDFONT(FRED(" Max number of splits exceeded ")) << " |" << std::endl; - #else - std::cout << "| ATTENTION: Max iterations exceeded |" << std::endl; - std::cout << "| Max number of splits exceeded |" << std::endl; - #endif + std::cout << "| " << BOLDFONT(FRED("ATTENTION: Max iterations exceeded")) << " |" << std::endl; + std::cout << "| " << BOLDFONT(FRED(" Max number of splits exceeded ")) << " |" << std::endl; std::cout << "|----------------------------------------------------|" << std::endl; } } diff --git a/applications/ContactStructuralMechanicsApplication/custom_utilities/contact_utilities.h b/applications/ContactStructuralMechanicsApplication/custom_utilities/contact_utilities.h index b7a56e7bdbf0..7038f50e06e5 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_utilities/contact_utilities.h +++ b/applications/ContactStructuralMechanicsApplication/custom_utilities/contact_utilities.h @@ -17,6 +17,7 @@ #include "includes/model_part.h" #include "geometries/point.h" #include "utilities/openmp_utils.h" +#include "utilities/mortar_utilities.h" namespace Kratos { @@ -43,7 +44,7 @@ class ContactUtilities // General type definitions typedef Node<3> NodeType; - typedef Point<3> PointType; + typedef Point PointType; typedef PointType::CoordinatesArrayType CoordinatesArrayType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; @@ -74,150 +75,6 @@ class ContactUtilities ///@} ///@name Operations ///@{ - - /** - * Project a point over a line/plane following an arbitrary direction - * @param Geom: The geometry where to be projected - * @param PointDestiny: The point to be projected - * @param Normal: The normal of the geometry - * @param Vector: The direction to project - * @return PointProjected: The point pojected over the plane - * @return Distance: The distnace between surfaces - */ - - static inline double FastProjectDirection( - const GeometryType& Geom, - const PointType& PointDestiny, - PointType& PointProjected, - const array_1d& Normal, - const array_1d& Vector - ) - { - // We define the tolerance - const double tolerance = std::numeric_limits::epsilon(); - - // We define the distance - double distance = 0.0; - - const array_1d vector_points = Geom[0].Coordinates() - PointDestiny.Coordinates(); - - if( norm_2( Vector ) < tolerance && norm_2( Normal ) > tolerance ) - { - distance = inner_prod(vector_points, Normal)/norm_2(Normal); - - PointProjected.Coordinates() = PointDestiny.Coordinates() + Vector * distance; - std::cout << " :: Warning: Zero projection vector. Projection using the condition vector instead." << std::endl; - } - else if (std::abs(inner_prod(Vector, Normal) ) > tolerance) - { - distance = inner_prod(vector_points, Normal)/inner_prod(Vector, Normal); - - PointProjected.Coordinates() = PointDestiny.Coordinates() + Vector * distance; - } - else - { - PointProjected.Coordinates() = PointDestiny.Coordinates(); - std::cout << " The line and the plane are coplanar, something wrong happened " << std::endl; - } - - return distance; - } - - /** - * Projects iteratively to get the coordinate - * @param GeomOrigin: The origin geometry - * @param PointDestiny: The destination point - * @return ResultingPoint: The distance between the point and the plane - * @return Inside: True is inside, false not - */ - - static inline bool ProjectIterativeLine2D( - GeometryType& GeomOrigin, - const GeometryType::CoordinatesArrayType& PointDestiny, - GeometryType::CoordinatesArrayType& ResultingPoint, - const array_1d& Normal, - const double Tolerance = 1.0e-8, - double DeltaXi = 0.5 - ) - { -// ResultingPoint.clear(); - - double old_delta_xi = 0.0; - - array_1d current_global_coords; - - array_1d, 2> normals; - normals[0] = GeomOrigin[0].GetValue(NORMAL); - normals[1] = GeomOrigin[1].GetValue(NORMAL); - - bounded_matrix X; - bounded_matrix DN; - for(unsigned int i=0; i<2;i++) - { - X(0,i) = GeomOrigin[i].X(); - X(1,i) = GeomOrigin[i].Y(); - } - - Matrix J = ZeroMatrix( 1, 1 ); - - //Newton iteration: - - const unsigned int max_iter = 20; - - for ( unsigned int k = 0; k < max_iter; k++ ) - { - array_1d N_origin; - N_origin[0] = 0.5 * ( 1.0 - ResultingPoint[0]); - N_origin[1] = 0.5 * ( 1.0 + ResultingPoint[0]); - - array_1d normal_xi = ZeroVector(3); - for( unsigned int i_node = 0; i_node < 2; ++i_node ) - { - normal_xi += N_origin[i_node] * normals[i_node]; - } - - normal_xi = normal_xi/norm_2(normal_xi); - - current_global_coords = ZeroVector( 3 ); - for( unsigned int i_node = 0; i_node < 2; ++i_node ) - { - current_global_coords += N_origin[i_node] * GeomOrigin[i_node].Coordinates(); - } - - const array_1d VectorPoints = GeomOrigin.Center() - PointDestiny; - const double distance = inner_prod(VectorPoints, Normal)/inner_prod(-normal_xi, Normal); - const array_1d current_destiny_global_coords = PointDestiny - normal_xi * distance; - - // Derivatives of shape functions - Matrix ShapeFunctionsGradients; - ShapeFunctionsGradients = GeomOrigin.ShapeFunctionsLocalGradients(ShapeFunctionsGradients, ResultingPoint ); - noalias(DN) = prod(X,ShapeFunctionsGradients); - - noalias(J) = prod(trans(DN),DN); // TODO: Add the non linearity concerning the normal - Vector RHS = prod(trans(DN),subrange(current_destiny_global_coords - current_global_coords,0,2)); - - old_delta_xi = DeltaXi; - DeltaXi = RHS[0]/J(0, 0); - - ResultingPoint[0] += DeltaXi; - - if (ResultingPoint[0] <= -1.0) - { - ResultingPoint[0] = -1.0; - } - else if (ResultingPoint[0] >= 1.0) - { - ResultingPoint[0] = 1.0; - } - - if ( std::abs(DeltaXi - old_delta_xi) < Tolerance ) - { - return true; - } - } - - return false; - } /** * Project a point over a plane @@ -243,96 +100,6 @@ class ContactUtilities PointProjected.Coordinates() = PointDestiny.Coordinates() - Normal * Distance; } - - /** - * Project a point over a plane (avoiding some steps) - * @param PointOrigin: A point in the plane - * @param PointDestiny: The point to be projected - * @param Normal: The normal of the plane - * @return PointProjected: The point pojected over the plane - */ - - static inline PointType FastProject( - const PointType& PointOrigin, - const PointType& PointDestiny, - const array_1d& Normal - ) - { - array_1d vector_points = PointDestiny.Coordinates() - PointOrigin.Coordinates(); - - const double distance = inner_prod(vector_points, Normal); - - PointType point_projected; - point_projected.Coordinates() = PointDestiny.Coordinates() - Normal * distance; - - return point_projected; - } - - /** - * This functions checks if the length of the line is to short, with the potential of provoque ill condition in the dual LM formulation - * @param GeometryLine: The line to be checked - * @param Tolerance: The threshold length - * @return True if the line is too short, false otherwise - */ - - static inline bool LengthCheck( - const GeometryPointType& GeometryLine, - const double Tolerance = 1.0e-6 - ) - { - const double lx = GeometryLine[0].X() - GeometryLine[1].X(); - const double ly = GeometryLine[0].Y() - GeometryLine[1].Y(); - - const double length = std::sqrt(lx * lx + ly * ly); - - return (length < Tolerance) ? true : false; - } - - /** - * This functions checks if the semiperimeter is smaller than any of the sides of the triangle - * @param GeometryTriangle: The triangle to be checked - * @return True if the triangle is in bad shape, false otherwise - */ - - static inline bool HeronCheck(const GeometryPointType GeometryTriangle) - { - return HeronCheck(GeometryTriangle[0], GeometryTriangle[1], GeometryTriangle[2]); - } - - /** - * This functions checks if the semiperimeter is smaller than any of the sides of the triangle - * @param PointOrig1: The triangle first point - * @param PointOrig2: The triangle second point - * @param PointOrig3: The triangle third point - * @return True if the triangle is in bad shape, false otherwise - */ - - static inline bool HeronCheck( - const PointType& PointOrig1, - const PointType& PointOrig2, - const PointType& PointOrig3 - ) - { - const double a = MathUtils::Norm3(PointOrig1.Coordinates()-PointOrig2.Coordinates()); - const double b = MathUtils::Norm3(PointOrig2.Coordinates()-PointOrig3.Coordinates()); - const double c = MathUtils::Norm3(PointOrig3.Coordinates()-PointOrig1.Coordinates()); - - const double s = 0.5 * (a + b + c); - const double A2 = s * (s - a) * (s - b) * (s - c); - - const bool Check = A2 <= 0.0 ? true : false; // We consider as bad shaped the ones with no area or negative A2 (semiperimeter smaller than any side) - -// // Debug -// std::cout << Check << " A2: " << A2 << std::endl; -// if (Check == true) -// { -// std::cout << "Warning:: The triangle is in bad shape" << std::endl; -// std::cout << "Graphics3D[{EdgeForm[Thick],Triangle[{{" << PointOrig1.X() << "," << PointOrig1.Y() << "," << PointOrig1.Z() << "},{" << PointOrig2.X() << "," << PointOrig2.Y() << "," << PointOrig2.Z() << "},{" << PointOrig3.X() << "," << PointOrig3.Y() << "," << PointOrig3.Z() << "}}]}]" << std::endl; -// } - - return Check; - } - /** * This function scales the points according to a factor (to increase the bounding box) * @param PointToScale: The point to scale @@ -365,96 +132,6 @@ class ContactUtilities + (PointOrigin[1] - PointDestiny[1]) * (PointOrigin[1] - PointDestiny[1]) + (PointOrigin[2] - PointDestiny[2]) * (PointOrigin[2] - PointDestiny[2])); } - - /** - * This function calculates the normal in a specific GP with a given shape function - * @param N: The shape function considered - * @param Geom: The geometry of condition of interest - */ - - static inline array_1d GaussPointNormal( - const Vector& N, - const GeometryType& Geom - ) - { - array_1d normal = ZeroVector(3); - for( unsigned int i_node = 0; i_node < Geom.PointsNumber(); ++i_node ) - { - normal += N[i_node] * Geom[i_node].GetValue(NORMAL); - } - - if (norm_2(normal) > std::numeric_limits::epsilon()) - { - normal = normal/norm_2(normal); // It is suppossed to be already unitary (just in case) - } - - return normal; - } - - /** - * This function rotates to align the projected points to a parallel plane to XY - * @param PointToRotate: The points from the origin geometry - * @param PointReferenceRotation: The center point used as reference to rotate - * @param SlaveNormal: The normal vector of the slave condition - * @param SlaveTangentXi: The first tangent vector of the slave condition - * @param SlaveTangentEta: The second tangent vector of the slave condition - * @param Inversed: If we rotate to the XY or we recover from XY - * @return PointRotated: The point rotated - */ - - static inline void RotatePoint( - PointType& PointToRotate, - const PointType PointReferenceRotation, - const array_1d SlaveTangentXi, - const array_1d SlaveTangentEta, - const bool Inversed - ) - { - // We move to the (0,0,0) - PointType aux_point_to_rotate; - aux_point_to_rotate.Coordinates() = PointToRotate.Coordinates() - PointReferenceRotation.Coordinates(); - - boost::numeric::ublas::bounded_matrix rotation_matrix = ZeroMatrix(3, 3); - - if (Inversed == false) - { - for (unsigned int i = 0; i < 3; i++) - { - rotation_matrix(0, i) = SlaveTangentXi[i]; - rotation_matrix(1, i) = SlaveTangentEta[i]; - } - } - else - { - for (unsigned int i = 0; i < 3; i++) - { - rotation_matrix(i, 0) = SlaveTangentXi[i]; - rotation_matrix(i, 1) = SlaveTangentEta[i]; - } - } - - PointToRotate.Coordinates() = prod(rotation_matrix, aux_point_to_rotate) + PointReferenceRotation.Coordinates(); - } - - /** - * This function gives you the indexes needed to order a vector - * @param vect: The vector to order - * @return idx: The vector of indexes - */ - - template - static inline std::vector SortIndexes(const std::vector &vect) - { - // Initialize original index locations - std::vector idx(vect.size()); - iota(idx.begin(), idx.end(), 0); - - // Sort indexes based on comparing values in vect - std::sort(idx.begin(), idx.end(), - [&vect](std::size_t i1, std::size_t i2) {return vect[i1] < vect[i2];}); - - return idx; - } /** * It computes the mean of the normal in the condition in all the nodes @@ -558,10 +235,10 @@ class ContactUtilities // Sum all the nodes normals ConditionsArrayType& conditions_array = rModelPart.Conditions(); - const int numConditions = static_cast(conditions_array.size()); + const int num_conditions = static_cast(conditions_array.size()); #pragma omp parallel for - for(int i = 0; i < numConditions; i++) + for(int i = 0; i < num_conditions; i++) { auto it_cond = conditions_array.begin() + i; @@ -576,10 +253,11 @@ class ContactUtilities for (unsigned int i = 0; i < number_nodes; i++) { - #pragma omp atomic - it_cond->GetGeometry()[i].GetValue(NODAL_AREA) += rArea; - #pragma omp critical - noalias( it_cond->GetGeometry()[i].GetValue(NORMAL) ) += rArea * rNormal; + auto& this_node = it_cond->GetGeometry()[i]; + this_node.SetLock(); + this_node.GetValue(NODAL_AREA) += rArea; + noalias( this_node.GetValue(NORMAL) ) += rArea * rNormal; + this_node.UnSetLock(); } } } @@ -830,229 +508,66 @@ class ContactUtilities } /** - * It calculates the matrix of coordinates of a geometry - * @param nodes: The geometry to calculate - * @param current: If we calculate the current coordinates or the initial ones - * @return coordinates: The matrix containing the coordinates of the geometry + * It calculates the center updated in u_n+1/2 + * @param ThisGeometry: The geometry to calculate + * @return point: The center in u_n+1/2 (Newmark) */ - template< unsigned int TDim, unsigned int TNumNodes> - static inline bounded_matrix GetCoordinates( - const GeometryType& nodes, - const bool current = true, - const unsigned int step = 0 + static inline PointType GetHalfJumpCenter( + GeometryType& ThisGeometry, + const double& DeltaTime ) { - /* DEFINITIONS */ - bounded_matrix coordinates; - - for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) - { - array_1d coord; - - if (current == true) - { - coord = nodes[i_node].Coordinates(); - } - else - { - coord = nodes[i_node].GetInitialPosition(); - - if (step > 0) - { - coord += nodes[i_node].FastGetSolutionStepValue(DISPLACEMENT, step); - } - } - - for (unsigned int i_dof = 0; i_dof < TDim; i_dof++) - { - coordinates(i_node, i_dof) = coord[i_dof]; - } - } + PointType center = ThisGeometry.Center(); - return coordinates; - } - - /** - * It calculates the vector of an historical variable of a geometry - * @param nodes: The geometry to calculate - * @param rVarName: The name of the variable to calculate - * @param step: The step where calculate - * @return var_vector: The vector containing the variables of the geometry - */ - - template< unsigned int TNumNodes > - static inline array_1d GetVariableVector( - const GeometryType& nodes, - const Variable& rVarName, - const unsigned int step = 0 - ) - { - /* DEFINITIONS */ - array_1d var_vector; + // Initialize variables + Vector N; + GeometryType::CoordinatesArrayType local_point; - for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) - { - var_vector[i_node] = nodes[i_node].FastGetSolutionStepValue(rVarName, step); - } + // Get shape functions + ThisGeometry.PointLocalCoordinates( local_point, center.Coordinates() ); + ThisGeometry.ShapeFunctionsValues( N, local_point ); - return var_vector; - } - - /** - * It calculates the vector of an historical variable of a geometry - * @param nodes: The geometry to calculate - * @param rVarName: The name of the variable to calculate - * @param step: The step where calculate - * @return var_vector: The vector containing the variables of the geometry - */ + const Matrix new_delta_disp = 0.25 * DeltaTime * (GetVariableMatrix(ThisGeometry, VELOCITY, 0) + GetVariableMatrix(ThisGeometry, VELOCITY, 1)) + 0.125 * DeltaTime * DeltaTime * GetVariableMatrix(ThisGeometry, ACCELERATION, 1); - template< unsigned int TNumNodes > - static inline bounded_matrix GetVariableVectorMatrix( - const GeometryType& nodes, - const Variable& rVarName, - const unsigned int step = 0 - ) - { - /* DEFINITIONS */ - bounded_matrix var_vector; + const Vector new_delta_disp_center = prod(trans(new_delta_disp), N); - for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) - { - var_vector(i_node, 0) = nodes[i_node].FastGetSolutionStepValue(rVarName, step); - } + center.Coordinates() += new_delta_disp_center; - return var_vector; - } - - /** - * It calculates the vector of a non-historical variable of a geometry - * @param nodes: The geometry to calculate - * @param rVarName: The name of the variable to calculate - * @return var_vector: The vector containing the variables of the geometry - */ - - template< unsigned int TNumNodes > - static inline array_1d GetVariableVector( - const GeometryType& nodes, - const Variable& rVarName - ) - { - /* DEFINITIONS */ - array_1d var_vector; - - for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) - { - var_vector[i_node] = nodes[i_node].GetValue(rVarName); - } - - return var_vector; - } - - /** - * It calculates the vector of a non-historical variable of a geometry - * @param nodes: The geometry to calculate - * @param rVarName: The name of the variable to calculate - * @return var_vector: The vector containing the variables of the geometry - */ - - template< unsigned int TNumNodes > - static inline bounded_matrix GetVariableVectorMatrix( - const GeometryType& nodes, - const Variable& rVarName - ) - { - /* DEFINITIONS */ - bounded_matrix var_vector; - - for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) - { - var_vector(i_node, 0) = nodes[i_node].GetValue(rVarName); - } - - return var_vector; + return center; } - /** - * It calculates the matrix of a variable of a geometry - * @param Nodes: The geometry to calculate - * @param rVarName: The name of the variable to calculate - * @param step: The step where calculate - * @return var_matrix: The matrix containing the variables of the geometry - */ - - template< unsigned int TDim, unsigned int TNumNodes> - static inline Matrix GetVariableMatrix( - const GeometryType& Nodes, - const Variable >& rVarName, - const unsigned int step - ) - { - /* DEFINITIONS */ - Matrix var_matrix(TNumNodes, TDim); - - for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) - { - const array_1d value = Nodes[i_node].FastGetSolutionStepValue(rVarName, step); - for (unsigned int i_dof = 0; i_dof < TDim; i_dof++) - { - var_matrix(i_node, i_dof) = value[i_dof]; - } - } - - return var_matrix; - } - - /** - * It calculates the matrix of a non-historical variable of a geometry - * @param Nodes: The geometry to calculate - * @param rVarName: The name of the variable to calculate - * @return var_matrix: The matrix containing the variables of the geometry - */ - - template< unsigned int TDim, unsigned int TNumNodes> - static inline Matrix GetVariableMatrix( - const GeometryType& Nodes, - const Variable >& rVarName - ) - { - /* DEFINITIONS */ - Matrix var_matrix(TNumNodes, TDim); - - for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) - { - const array_1d& value = Nodes[i_node].GetValue(rVarName); - for (unsigned int i_dof = 0; i_dof < TDim; i_dof++) - { - var_matrix(i_node, i_dof) = value[i_dof]; - } - } - - return var_matrix; - } - - /** - * It calculates the matrix containing the absolute value of another matrix - * @param InputMatrix: The original matrix - * @return AbsMatrix: The matrix containing the absolute value of another matrix - */ - - template< unsigned int TDim, unsigned int TNumNodes> - static inline bounded_matrix GetAbsMatrix(const bounded_matrix InputMatrix) - { - /* DEFINITIONS */ - bounded_matrix AbsMatrix; - - for (unsigned int i_node = 0; i_node < TNumNodes; i_node++) - { - for (unsigned int i_dof = 0; i_dof < TDim; i_dof++) - { - AbsMatrix(i_node, i_dof) = std::abs(InputMatrix(i_node, i_dof)); - } - } - - return AbsMatrix; - } + + /** + * It calculates the matrix of a variable of a geometry + * @param Nodes: The geometry to calculate + * @param rVarName: The name of the variable to calculate + * @param step: The step where calculate + * @return var_matrix: The matrix containing the variables of the geometry + */ + + static inline Matrix GetVariableMatrix( + const GeometryType& Nodes, + const Variable >& rVarName, + const unsigned int& Step + ) + { + /* DEFINITIONS */ + const std::size_t num_nodes = Nodes.size(); + const std::size_t dim = Nodes.WorkingSpaceDimension(); + Matrix var_matrix(num_nodes, dim); + + for (unsigned int i_node = 0; i_node < num_nodes; i_node++) + { + const array_1d value = Nodes[i_node].FastGetSolutionStepValue(rVarName, Step); + for (unsigned int i_dof = 0; i_dof < dim; i_dof++) + { + var_matrix(i_node, i_dof) = value[i_dof]; + } + } + + return var_matrix; + } private: };// class ContactUtilities diff --git a/applications/ContactStructuralMechanicsApplication/custom_utilities/interface_preprocess.h b/applications/ContactStructuralMechanicsApplication/custom_utilities/interface_preprocess.h index 10258461df26..620a849a5fd9 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_utilities/interface_preprocess.h +++ b/applications/ContactStructuralMechanicsApplication/custom_utilities/interface_preprocess.h @@ -45,7 +45,7 @@ namespace Kratos ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; diff --git a/applications/ContactStructuralMechanicsApplication/custom_utilities/search_utilities.h b/applications/ContactStructuralMechanicsApplication/custom_utilities/search_utilities.h index d81e25ce9e09..25fe18410a45 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_utilities/search_utilities.h +++ b/applications/ContactStructuralMechanicsApplication/custom_utilities/search_utilities.h @@ -52,7 +52,7 @@ class SearchUtilities ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; @@ -199,7 +199,7 @@ class SearchUtilities typename std::conditional::type decomp_geom( points_array ); - const bool bad_shape = (TDim == 2) ? ContactUtilities::LengthCheck(decomp_geom, SlaveGeometry.Length() * 1.0e-6) : ContactUtilities::HeronCheck(decomp_geom); + const bool bad_shape = (TDim == 2) ? MortarUtilities::LengthCheck(decomp_geom, SlaveGeometry.Length() * 1.0e-6) : MortarUtilities::HeronCheck(decomp_geom); if (bad_shape == false) { @@ -224,11 +224,11 @@ class SearchUtilities /// MASTER CONDITION /// PointType projected_gp_global; - const array_1d gp_normal = ContactUtilities::GaussPointNormal(rVariables.NSlave, SlaveGeometry); + const array_1d gp_normal = MortarUtilities::GaussPointUnitNormal(rVariables.NSlave, SlaveGeometry); GeometryType::CoordinatesArrayType slave_gp_global; SlaveGeometry.GlobalCoordinates( slave_gp_global, local_point ); - ContactUtilities::FastProjectDirection( MasterGeometry, slave_gp_global, projected_gp_global, MasterNormal, -gp_normal ); // The opposite direction + MortarUtilities::FastProjectDirection( MasterGeometry, slave_gp_global, projected_gp_global, MasterNormal, -gp_normal ); // The opposite direction GeometryType::CoordinatesArrayType projected_gp_local; @@ -245,8 +245,8 @@ class SearchUtilities /* Setting the gap */ // Current coordinates - const bounded_matrix x1 = ContactUtilities::GetCoordinates(SlaveGeometry); - const bounded_matrix x2 = ContactUtilities::GetCoordinates(MasterGeometry); + const bounded_matrix x1 = MortarUtilities::GetCoordinates(SlaveGeometry); + const bounded_matrix x2 = MortarUtilities::GetCoordinates(MasterGeometry); const bounded_matrix Dx1Mx2 = prod(rThisMortarConditionMatrices.DOperator, x1) - prod(rThisMortarConditionMatrices.MOperator, x2); @@ -424,16 +424,16 @@ class SearchUtilities { if (Geom1[i_node].Is(ACTIVE) == false) { - Point<3> projected_point; + Point projected_point; double aux_distance = 0.0; const array_1d normal = Geom1[i_node].GetValue(NORMAL); if (norm_2(normal) < tolerance) { - aux_distance = ContactUtilities::FastProjectDirection(Geom2, Geom1[i_node], projected_point, ContactNormal2, ContactNormal1); + aux_distance = MortarUtilities::FastProjectDirection(Geom2, Geom1[i_node], projected_point, ContactNormal2, ContactNormal1); } else { - aux_distance = ContactUtilities::FastProjectDirection(Geom2, Geom1[i_node], projected_point, ContactNormal2, normal); + aux_distance = MortarUtilities::FastProjectDirection(Geom2, Geom1[i_node], projected_point, ContactNormal2, normal); } array_1d result; @@ -446,7 +446,7 @@ class SearchUtilities if (DualCheck == true) { - aux_distance = ContactUtilities::FastProjectDirection(Geom2, Geom1[i_node], projected_point, ContactNormal2, -ContactNormal2); + aux_distance = MortarUtilities::FastProjectDirection(Geom2, Geom1[i_node], projected_point, ContactNormal2, -ContactNormal2); if (aux_distance <= ActiveCheckLength && (StrictCheck == true ? Geom2.IsInside(projected_point, result, tolerance) : true)) // NOTE: This can be problematic (It depends the way IsInside() and the local_pointCoordinates() are implemented) { at_least_one_node_potential_contact = true; diff --git a/applications/ContactStructuralMechanicsApplication/custom_utilities/tree_contact_search.h b/applications/ContactStructuralMechanicsApplication/custom_utilities/tree_contact_search.h index 88a0d22ba298..b6372eafd574 100644 --- a/applications/ContactStructuralMechanicsApplication/custom_utilities/tree_contact_search.h +++ b/applications/ContactStructuralMechanicsApplication/custom_utilities/tree_contact_search.h @@ -15,6 +15,7 @@ // System includes // External includes +#include // Project includes #include "includes/model_part.h" @@ -177,7 +178,6 @@ class TreeContactSearch ConditionsArrayType& conditions_array = mrMainModelPart.Conditions(); const int num_conditions = static_cast(conditions_array.size()); -// #pragma omp parallel for for(int i = 0; i < num_conditions; i++) { auto it_cond = conditions_array.begin() + i; @@ -321,19 +321,41 @@ class TreeContactSearch void CreatePointListMortar() { + // Clearing the vector + mPointListDestination.clear(); + // Iterate in the conditions ConditionsArrayType& conditions_array = mrMainModelPart.Conditions(); const int num_conditions = static_cast(conditions_array.size()); - #pragma omp for nowait schedule(static) - for(int i = 0; i < num_conditions; i++) + // Creating a buffer for parallel vector fill + const unsigned int num_threads = omp_get_max_threads(); + std::vector points_buffer(num_threads); + + #pragma omp parallel { - auto it_cond = conditions_array.begin() + i; + const unsigned int thread_id = omp_get_thread_num(); + + #pragma omp for + for(int i = 0; i < num_conditions; i++) + { + auto it_cond = conditions_array.begin() + i; + + if (it_cond->Is(MASTER) == true) + { + PointTypePointer p_point = PointTypePointer(new PointItem((*it_cond.base()))); +// (mPointListDestination).push_back(p_point); + (points_buffer[thread_id]).push_back(p_point); + } + } - if (it_cond->Is(MASTER) == true) + // Combine buffers together + #pragma omp single { - PointTypePointer p_point = PointTypePointer(new PointItem((*it_cond.base()))); - (mPointListDestination).push_back(p_point); + for( auto& point_buffer : points_buffer) + { + std::move(point_buffer.begin(),point_buffer.end(),back_inserter(mPointListDestination)); + } } } } @@ -344,12 +366,14 @@ class TreeContactSearch void UpdatePointListMortar() { + const double& delta_time = mrMainModelPart.GetProcessInfo()[DELTA_TIME]; + const int num_points = static_cast(mPointListDestination.size()); #pragma omp parallel for for(int i = 0; i < num_points; i++) { - mPointListDestination[i]->UpdatePoint(); + mPointListDestination[i]->UpdatePoint(delta_time); } } @@ -368,6 +392,8 @@ class TreeContactSearch // Calculate the mean of the normal in all the nodes ContactUtilities::ComputeNodesMeanNormalModelPart(mrMainModelPart); + const double& delta_time = mrMainModelPart.GetProcessInfo()[DELTA_TIME]; + // #pragma omp parallel // { // Initialize values @@ -391,8 +417,16 @@ class TreeContactSearch if (it_cond->Is(SLAVE) == true) { if (mSearchTreeType == KdtreeInRadius) - { - const Point<3> center = it_cond->GetGeometry().Center(); + { + Point center; + if (mrMainModelPart.NodesBegin()->SolutionStepsDataHas(VELOCITY_X) == true) + { + center = ContactUtilities::GetHalfJumpCenter(it_cond->GetGeometry(), delta_time); // NOTE: Center in half delta time + } + else + { + center = it_cond->GetGeometry().Center(); // NOTE: Real center + } const double search_radius = mSearchFactor * Radius(it_cond->GetGeometry()); number_points_found = tree_points.SearchInRadius(center, search_radius, points_found.begin(), mAllocationSize); @@ -414,8 +448,8 @@ class TreeContactSearch it_cond->GetGeometry().ShapeFunctionsValues( N_min, local_point_min ); it_cond->GetGeometry().ShapeFunctionsValues( N_max, local_point_max ); - const array_1d normal_min = ContactUtilities::GaussPointNormal(N_min, it_cond->GetGeometry()); - const array_1d normal_max = ContactUtilities::GaussPointNormal(N_max, it_cond->GetGeometry()); + const array_1d normal_min = MortarUtilities::GaussPointUnitNormal(N_min, it_cond->GetGeometry()); + const array_1d normal_max = MortarUtilities::GaussPointUnitNormal(N_max, it_cond->GetGeometry()); ContactUtilities::ScaleNode>(min_point, normal_min, length_search); ContactUtilities::ScaleNode>(max_point, normal_max, length_search); @@ -751,10 +785,19 @@ class TreeContactSearch const Condition::Pointer& pCond2 ) { - if (((pCond1 != pCond2) && (pCond1->GetValue(ELEMENT_POINTER) != pCond2->GetValue(ELEMENT_POINTER))) == false) // Avoiding "auto self-contact" and "auto element contact" + if (pCond1 == pCond2) // Avoiding "auto self-contact" { return Fail; } + + + if (((pCond1->GetValue(ELEMENT_POINTER) != nullptr) && (pCond2->GetValue(ELEMENT_POINTER) != nullptr)) == true) + { + if ((pCond1->GetValue(ELEMENT_POINTER) != pCond2->GetValue(ELEMENT_POINTER)) == false) // Avoiding "auto element contact" + { + return Fail; + } + } // Avoid conditions oriented in the same direction const double tolerance = 1.0e-16; @@ -790,7 +833,7 @@ class TreeContactSearch static inline double Radius(GeometryType& ThisGeometry) { double radius = 0.0; - const Point<3>& center = ThisGeometry.Center(); + const Point& center = ThisGeometry.Center(); for(unsigned int i_node = 0; i_node < ThisGeometry.PointsNumber(); i_node++) { diff --git a/applications/ContactStructuralMechanicsApplication/python_scripts/alm_contact_process.py b/applications/ContactStructuralMechanicsApplication/python_scripts/alm_contact_process.py index 68b3bc27c966..444a46779da8 100644 --- a/applications/ContactStructuralMechanicsApplication/python_scripts/alm_contact_process.py +++ b/applications/ContactStructuralMechanicsApplication/python_scripts/alm_contact_process.py @@ -37,7 +37,7 @@ def __init__(self,model_part,params): "normal_variation" : false, "pair_variation" : true, "manual_ALM" : false, - "stiffness_factor" : 10.0, + "stiffness_factor" : 1.0, "penalty_scale_factor" : 1.0, "use_scale_factor" : true, "penalty" : 0.0, @@ -47,7 +47,7 @@ def __init__(self,model_part,params): "use_exact_integration" : true, "hard_clear_after_step" : false, "database_step_update" : 1, - "integration_order" : 2, + "integration_order" : 3, "predict_with_linear_solver" : false, "max_gap_factor" : 0.0, "linear_solver_settings" : { @@ -121,10 +121,7 @@ def ExecuteInitialize(self): self.main_model_part.ProcessInfo[ContactStructuralMechanicsApplication.CONSIDER_PAIR_VARIATION] = self.params["pair_variation"].GetBool() # We set the max gap factor for the gap adaptation max_gap_factor = self.params["max_gap_factor"].GetDouble() - if (max_gap_factor > 0.0): - self.main_model_part.ProcessInfo[ContactStructuralMechanicsApplication.ADAPT_PENALTY] = True - else: - self.main_model_part.ProcessInfo[ContactStructuralMechanicsApplication.ADAPT_PENALTY] = False + self.main_model_part.ProcessInfo[ContactStructuralMechanicsApplication.ADAPT_PENALTY] = (max_gap_factor > 0.0) self.main_model_part.ProcessInfo[ContactStructuralMechanicsApplication.MAX_GAP_FACTOR] = max_gap_factor # We set the value that scales in the tangent direction the penalty and scale parameter diff --git a/applications/ContactStructuralMechanicsApplication/python_scripts/contact_convergence_criteria_factory.py b/applications/ContactStructuralMechanicsApplication/python_scripts/contact_convergence_criteria_factory.py index 0339fa395704..6b28ef38b66e 100644 --- a/applications/ContactStructuralMechanicsApplication/python_scripts/contact_convergence_criteria_factory.py +++ b/applications/ContactStructuralMechanicsApplication/python_scripts/contact_convergence_criteria_factory.py @@ -5,6 +5,7 @@ import KratosMultiphysics import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication import KratosMultiphysics.ContactStructuralMechanicsApplication as ContactStructuralMechanicsApplication +import KratosMultiphysics.ExternalSolversApplication as ExternalSolversApplication # Check that KratosMultiphysics was imported in the main script KratosMultiphysics.CheckForPreviousImport() @@ -24,6 +25,7 @@ def __init__(self, convergence_criterion_parameters): CR_RT = convergence_criterion_parameters["contact_residual_relative_tolerance"].GetDouble() CR_AT = convergence_criterion_parameters["contact_residual_absolute_tolerance"].GetDouble() contact_tolerance = convergence_criterion_parameters["contact_tolerance"].GetDouble() + condn_convergence_criterion = convergence_criterion_parameters["condn_convergence_criterion"].GetBool() fancy_convergence_criterion = convergence_criterion_parameters["fancy_convergence_criterion"].GetBool() print_convergence_criterion = convergence_criterion_parameters["print_convergence_criterion"].GetBool() ensure_contact = convergence_criterion_parameters["ensure_contact"].GetBool() @@ -100,7 +102,7 @@ def __init__(self, convergence_criterion_parameters): Mortar.SetEchoLevel(echo_level) if (fancy_convergence_criterion == True): - self.mechanical_convergence_criterion = ContactStructuralMechanicsApplication.MortarAndConvergenceCriteria(self.mechanical_convergence_criterion, Mortar, table, print_convergence_criterion) + self.mechanical_convergence_criterion = ContactStructuralMechanicsApplication.MortarAndConvergenceCriteria(self.mechanical_convergence_criterion, Mortar, table, print_convergence_criterion, condn_convergence_criterion) else: self.mechanical_convergence_criterion = ContactStructuralMechanicsApplication.MortarAndConvergenceCriteria(self.mechanical_convergence_criterion, Mortar) self.mechanical_convergence_criterion.SetEchoLevel(echo_level) diff --git a/applications/ContactStructuralMechanicsApplication/python_scripts/contact_structural_mechanics_implicit_dynamic_solver.py b/applications/ContactStructuralMechanicsApplication/python_scripts/contact_structural_mechanics_implicit_dynamic_solver.py index a70f39f69472..20f93757a731 100644 --- a/applications/ContactStructuralMechanicsApplication/python_scripts/contact_structural_mechanics_implicit_dynamic_solver.py +++ b/applications/ContactStructuralMechanicsApplication/python_scripts/contact_structural_mechanics_implicit_dynamic_solver.py @@ -33,18 +33,19 @@ def __init__(self, main_model_part, custom_settings): { "contact_settings" : { - "mortar_type" : "", - "contact_tolerance" : 0.0e0, - "fancy_convergence_criterion": true, - "print_convergence_criterion": false, - "ensure_contact" : false, - "adaptative_strategy" : false, - "split_factor" : 10.0, - "max_number_splits" : 3, + "mortar_type" : "", + "contact_tolerance" : 0.0e0, + "condn_convergence_criterion" : false, + "fancy_convergence_criterion" : true, + "print_convergence_criterion" : false, + "ensure_contact" : false, + "adaptative_strategy" : false, + "split_factor" : 10.0, + "max_number_splits" : 3, "contact_displacement_relative_tolerance": 1.0e-4, "contact_displacement_absolute_tolerance": 1.0e-9, - "contact_residual_relative_tolerance": 1.0e-4, - "contact_residual_absolute_tolerance": 1.0e-9 + "contact_residual_relative_tolerance" : 1.0e-4, + "contact_residual_absolute_tolerance" : 1.0e-9 } } """) @@ -58,7 +59,8 @@ def __init__(self, main_model_part, custom_settings): super().__init__(self.main_model_part, self.settings) # Setting reactions true by default - self.settings["compute_reactions"].SetBool(True) + self.settings["clear_storage"].SetBool(True) + self.settings["reform_dofs_at_each_step"].SetBool(True) # Setting echo level self.echo_level = self.settings["echo_level"].GetInt() @@ -92,18 +94,18 @@ def AddDofs(self): super().AddDofs() if (self.contact_settings["mortar_type"].GetString() == "ALMContactFrictionless"): - KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.NORMAL_CONTACT_STRESS, ContactStructuralMechanicsApplication.WEIGHTED_GAP,self.main_model_part) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.NORMAL_CONTACT_STRESS, ContactStructuralMechanicsApplication.WEIGHTED_GAP, self.main_model_part) elif (self.contact_settings["mortar_type"].GetString() == "ScalarMeshTying"): - KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.SCALAR_LAGRANGE_MULTIPLIER,ContactStructuralMechanicsApplication.WEIGHTED_SCALAR_RESIDUAL,self.main_model_part) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.SCALAR_LAGRANGE_MULTIPLIER,ContactStructuralMechanicsApplication.WEIGHTED_SCALAR_RESIDUAL, self.main_model_part) elif (self.contact_settings["mortar_type"].GetString() == "ComponentsMeshTying"): - KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.VECTOR_LAGRANGE_MULTIPLIER_X, ContactStructuralMechanicsApplication.WEIGHTED_VECTOR_RESIDUAL_X,self.main_model_part) - KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.VECTOR_LAGRANGE_MULTIPLIER_Y, ContactStructuralMechanicsApplication.WEIGHTED_VECTOR_RESIDUAL_Y,self.main_model_part) - KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.VECTOR_LAGRANGE_MULTIPLIER_Z, ContactStructuralMechanicsApplication.WEIGHTED_VECTOR_RESIDUAL_Z,self.main_model_part) - + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.VECTOR_LAGRANGE_MULTIPLIER_X, ContactStructuralMechanicsApplication.WEIGHTED_VECTOR_RESIDUAL_X, self.main_model_part) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.VECTOR_LAGRANGE_MULTIPLIER_Y, ContactStructuralMechanicsApplication.WEIGHTED_VECTOR_RESIDUAL_Y, self.main_model_part) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.VECTOR_LAGRANGE_MULTIPLIER_Z, ContactStructuralMechanicsApplication.WEIGHTED_VECTOR_RESIDUAL_Z, self.main_model_part) + print("::[Contact Mechanical Solver]:: DOF's ADDED") def Initialize(self): - super().Initialize() + super().Initialize() # The mechanical solver is created here. def AddProcessesList(self, processes_list): self.processes_list = ContactStructuralMechanicsApplication.ProcessFactoryUtility(processes_list) @@ -124,6 +126,7 @@ def _create_convergence_criterion(self): conv_params.AddValue("contact_residual_absolute_tolerance",self.contact_settings["contact_residual_absolute_tolerance"]) conv_params.AddValue("mortar_type",self.contact_settings["mortar_type"]) conv_params.AddValue("contact_tolerance",self.contact_settings["contact_tolerance"]) + conv_params.AddValue("condn_convergence_criterion",self.contact_settings["condn_convergence_criterion"]) conv_params.AddValue("fancy_convergence_criterion",self.contact_settings["fancy_convergence_criterion"]) conv_params.AddValue("print_convergence_criterion",self.contact_settings["print_convergence_criterion"]) conv_params.AddValue("ensure_contact",self.contact_settings["ensure_contact"]) diff --git a/applications/ContactStructuralMechanicsApplication/python_scripts/contact_structural_mechanics_static_solver.py b/applications/ContactStructuralMechanicsApplication/python_scripts/contact_structural_mechanics_static_solver.py index fed93ab5891e..37876d0c2122 100644 --- a/applications/ContactStructuralMechanicsApplication/python_scripts/contact_structural_mechanics_static_solver.py +++ b/applications/ContactStructuralMechanicsApplication/python_scripts/contact_structural_mechanics_static_solver.py @@ -34,18 +34,19 @@ def __init__(self, main_model_part, custom_settings): { "contact_settings" : { - "mortar_type": "", - "contact_tolerance": 0.0e0, - "fancy_convergence_criterion": true, - "print_convergence_criterion": false, - "ensure_contact": false, - "adaptative_strategy": false, - "split_factor": 10.0, - "max_number_splits": 3, + "mortar_type" : "", + "contact_tolerance" : 0.0e0, + "condn_convergence_criterion" : false, + "fancy_convergence_criterion" : true, + "print_convergence_criterion" : false, + "ensure_contact" : false, + "adaptative_strategy" : false, + "split_factor" : 10.0, + "max_number_splits" : 3, "contact_displacement_relative_tolerance": 1.0e-4, "contact_displacement_absolute_tolerance": 1.0e-9, - "contact_residual_relative_tolerance": 1.0e-4, - "contact_residual_absolute_tolerance": 1.0e-9 + "contact_residual_relative_tolerance" : 1.0e-4, + "contact_residual_absolute_tolerance" : 1.0e-9 } } """) @@ -59,8 +60,9 @@ def __init__(self, main_model_part, custom_settings): super().__init__(self.main_model_part, self.settings) # Setting reactions true by default - self.settings["compute_reactions"].SetBool(True) - + self.settings["clear_storage"].SetBool(True) + self.settings["reform_dofs_at_each_step"].SetBool(True) + # Setting echo level self.echo_level = self.settings["echo_level"].GetInt() @@ -125,6 +127,7 @@ def _create_convergence_criterion(self): conv_params.AddValue("contact_residual_absolute_tolerance",self.contact_settings["contact_residual_absolute_tolerance"]) conv_params.AddValue("mortar_type",self.contact_settings["mortar_type"]) conv_params.AddValue("contact_tolerance",self.contact_settings["contact_tolerance"]) + conv_params.AddValue("condn_convergence_criterion",self.contact_settings["condn_convergence_criterion"]) conv_params.AddValue("fancy_convergence_criterion",self.contact_settings["fancy_convergence_criterion"]) conv_params.AddValue("print_convergence_criterion",self.contact_settings["print_convergence_criterion"]) conv_params.AddValue("ensure_contact",self.contact_settings["ensure_contact"]) diff --git a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictional_mortar_condition/ALM_frictional_mortar_contact_condition.cpp b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictional_mortar_condition/ALM_frictional_mortar_contact_condition.cpp index dd42ad659681..f63273dfa48e 100644 --- a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictional_mortar_condition/ALM_frictional_mortar_contact_condition.cpp +++ b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictional_mortar_condition/ALM_frictional_mortar_contact_condition.cpp @@ -67,30 +67,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(12,12); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 8> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 8> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 8>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 8>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -1500,30 +1500,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(27,27); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 18> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 18> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 18>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 18>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -7849,30 +7849,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(36,36); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 24> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 24> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 24>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 24>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -20152,30 +20152,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(12,12); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 8> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 8> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 8>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 8>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); const array_1d, (2 * 2)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -21773,30 +21773,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(27,27); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 18> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 18> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 18>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 18>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); const array_1d, (3 * 3)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -28904,30 +28904,30 @@ bounded_matrix AugmentedLagrangianMethodFrictionalMortarContactC bounded_matrix lhs = ZeroMatrix(36,36); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 24> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 24> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 24>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 24>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); const array_1d, (4 * 3)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -43025,27 +43025,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<2 array_1d rhs(0.0,12); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -43255,27 +43255,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<3 array_1d rhs(0.0,27); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -43709,27 +43709,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<3 array_1d rhs(0.0,36); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -44365,27 +44365,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<2 array_1d rhs(0.0,12); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<2,2>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -44603,27 +44603,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<3 array_1d rhs(0.0,27); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,3>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 @@ -45075,27 +45075,27 @@ array_1d AugmentedLagrangianMethodFrictionalMortarContactCondition<3 array_1d rhs(0.0,36); // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u1old = rDerivativeData.u1old; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix u2old = rDerivativeData.u2old; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u1old = rDerivativeData.u1old; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& u2old = rDerivativeData.u2old; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const bounded_matrix LM = ContactUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); + const bounded_matrix& LM = MortarUtilities::GetVariableMatrix<3,4>(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; - const double TangentFactor = rDerivativeData.TangentFactor; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& TangentFactor = rDerivativeData.TangentFactor; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // We get the friction coefficient - const array_1d mu = GetFrictionCoefficient(); + const array_1d& mu = GetFrictionCoefficient(); // NODE 0 diff --git a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictional_mortar_condition/generate_frictional_mortar_condition.py b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictional_mortar_condition/generate_frictional_mortar_condition.py index f9b2aa628625..4d104cc78700 100755 --- a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictional_mortar_condition/generate_frictional_mortar_condition.py +++ b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictional_mortar_condition/generate_frictional_mortar_condition.py @@ -36,12 +36,12 @@ def real_norm(input): return output lhs_string = "" -lhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\nbounded_matrix AugmentedLagrangianMethodFrictionalMortarContactCondition::CalculateLocalLHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DerivativeDataType& rDerivativeData,\n const unsigned int& rActiveInactive\n )\n{\n bounded_matrix lhs = ZeroMatrix(MatrixSize,MatrixSize);\n\n // Initialize values\n const bounded_matrix u1 = rDerivativeData.u1;\n const bounded_matrix u1old = rDerivativeData.u1old;\n const bounded_matrix u2 = rDerivativeData.u2;\n const bounded_matrix u2old = rDerivativeData.u2old;\n const bounded_matrix X1 = rDerivativeData.X1;\n const bounded_matrix X2 = rDerivativeData.X2;\n \n const bounded_matrix LM = ContactUtilities::GetVariableMatrix(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); \n \n const bounded_matrix NormalSlave = rDerivativeData.NormalSlave;\n// The ALM parameters\n const double ScaleFactor = rDerivativeData.ScaleFactor;\n const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter;\n const double TangentFactor = rDerivativeData.TangentFactor;\n \n // Mortar operators\n const bounded_matrix MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix DOperator = rMortarConditionMatrices.DOperator;\n // Mortar operators derivatives\n const array_1d, SIZEDERIVATIVES2> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator;\n const array_1d, SIZEDERIVATIVES2> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator;\n\n // We get the friction coefficient\n const array_1d mu = GetFrictionCoefficient();\n\n" +lhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\nbounded_matrix AugmentedLagrangianMethodFrictionalMortarContactCondition::CalculateLocalLHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DerivativeDataType& rDerivativeData,\n const unsigned int& rActiveInactive\n )\n{\n bounded_matrix lhs = ZeroMatrix(MatrixSize,MatrixSize);\n\n // Initialize values\n const bounded_matrix& u1 = rDerivativeData.u1;\n const bounded_matrix& u1old = rDerivativeData.u1old;\n const bounded_matrix& u2 = rDerivativeData.u2;\n const bounded_matrix& u2old = rDerivativeData.u2old;\n const bounded_matrix& X1 = rDerivativeData.X1;\n const bounded_matrix& X2 = rDerivativeData.X2;\n \n const bounded_matrix& LM = MortarUtilities::GetVariableMatrix(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); \n \n const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave;\n// The ALM parameters\n const double& ScaleFactor = rDerivativeData.ScaleFactor;\n const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter;\n const double& TangentFactor = rDerivativeData.TangentFactor;\n \n // Mortar operators\n const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator;\n // Mortar operators derivatives\n const array_1d, SIZEDERIVATIVES2>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator;\n const array_1d, SIZEDERIVATIVES2>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator;\n\n // We get the friction coefficient\n const array_1d& mu = GetFrictionCoefficient();\n\n" lhs_template_end_string = "\n\n return lhs;\n}\n" rhs_string = "" -rhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\narray_1d AugmentedLagrangianMethodFrictionalMortarContactCondition::CalculateLocalRHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DerivativeDataType& rDerivativeData,\n const unsigned int& rActiveInactive\n )\n{\n array_1d rhs(0.0,MatrixSize);\n\n // Initialize values\n const bounded_matrix u1 = rDerivativeData.u1;\n const bounded_matrix u1old = rDerivativeData.u1old;\n const bounded_matrix u2 = rDerivativeData.u2;\n const bounded_matrix u2old = rDerivativeData.u2old;\n const bounded_matrix X1 = rDerivativeData.X1;\n const bounded_matrix X2 = rDerivativeData.X2;\n \n const bounded_matrix LM = ContactUtilities::GetVariableMatrix(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); \n \n const bounded_matrix NormalSlave = rDerivativeData.NormalSlave;\n// The ALM parameters\n const double ScaleFactor = rDerivativeData.ScaleFactor;\n const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter;\n const double TangentFactor = rDerivativeData.TangentFactor;\n \n // Mortar operators\n const bounded_matrix MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix DOperator = rMortarConditionMatrices.DOperator;\n // We get the friction coefficient\n\n const array_1d mu = GetFrictionCoefficient();\n\n" +rhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\narray_1d AugmentedLagrangianMethodFrictionalMortarContactCondition::CalculateLocalRHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DerivativeDataType& rDerivativeData,\n const unsigned int& rActiveInactive\n )\n{\n array_1d rhs(0.0,MatrixSize);\n\n // Initialize values\n const bounded_matrix& u1 = rDerivativeData.u1;\n const bounded_matrix& u1old = rDerivativeData.u1old;\n const bounded_matrix& u2 = rDerivativeData.u2;\n const bounded_matrix& u2old = rDerivativeData.u2old;\n const bounded_matrix& X1 = rDerivativeData.X1;\n const bounded_matrix& X2 = rDerivativeData.X2;\n \n const bounded_matrix& LM = MortarUtilities::GetVariableMatrix(this->GetGeometry(), VECTOR_LAGRANGE_MULTIPLIER, 0); \n \n const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave;\n// The ALM parameters\n const double& ScaleFactor = rDerivativeData.ScaleFactor;\n const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter;\n const double& TangentFactor = rDerivativeData.TangentFactor;\n \n // Mortar operators\n const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator;\n // We get the friction coefficient\n\n const array_1d& mu = GetFrictionCoefficient();\n\n" rhs_template_end_string = "\n\n return rhs;\n}\n" diff --git a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/ALM_frictionless_mortar_contact_condition.cpp b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/ALM_frictionless_mortar_contact_condition.cpp index a5330daf3c5c..9fdf5a7c3003 100644 --- a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/ALM_frictionless_mortar_contact_condition.cpp +++ b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/ALM_frictionless_mortar_contact_condition.cpp @@ -67,26 +67,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<2, 2>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<2, 2>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 8> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 8> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 8>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 8>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; if (rActiveInactive == 0 ) { @@ -887,26 +887,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 3>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 3>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 18> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 18> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 18>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 18>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; if (rActiveInactive == 0 ) { @@ -7148,26 +7148,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 4>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 4>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 24> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 24> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 24>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 24>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; if (rActiveInactive == 0 ) { @@ -30438,26 +30438,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<2, 2>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<2, 2>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 8> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 8> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 8>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 8>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; const array_1d, (2 * 2)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -31296,26 +31296,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 3>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 3>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 18> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 18> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 18>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 18>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; const array_1d, (3 * 3)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -38117,26 +38117,26 @@ bounded_matrix AugmentedLagrangianMethodFrictionlessMortarContac bounded_matrix lhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 4>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 4>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; // Mortar operators derivatives - const array_1d, 24> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; - const array_1d, 24> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; + const array_1d, 24>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator; + const array_1d, 24>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator; const array_1d, (4 * 3)> DeltaNormalSlave = rDerivativeData.DeltaNormalSlave; @@ -63425,23 +63425,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<2, 2>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<2, 2>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -63558,23 +63558,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 3>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 3>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -64002,23 +64002,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 4>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 4>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -65241,23 +65241,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<2>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<2, 2>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<2, 2>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -65382,23 +65382,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<3>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 3>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 3>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { @@ -65862,23 +65862,23 @@ array_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition array_1d rhs; // Initialize values - const bounded_matrix u1 = rDerivativeData.u1; - const bounded_matrix u2 = rDerivativeData.u2; - const bounded_matrix X1 = rDerivativeData.X1; - const bounded_matrix X2 = rDerivativeData.X2; + const bounded_matrix& u1 = rDerivativeData.u1; + const bounded_matrix& u2 = rDerivativeData.u2; + const bounded_matrix& X1 = rDerivativeData.X1; + const bounded_matrix& X2 = rDerivativeData.X2; - const array_1d LMNormal = ContactUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); + const array_1d& LMNormal = MortarUtilities::GetVariableVector<4>(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0); - const bounded_matrix NormalSlave = rDerivativeData.NormalSlave; - const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix<3, 4>(NormalSlave); + const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave; + const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix<3, 4>(NormalSlave); // The ALM parameters - const double ScaleFactor = rDerivativeData.ScaleFactor; - const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter; + const double& ScaleFactor = rDerivativeData.ScaleFactor; + const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; if (rActiveInactive == 0 ) { diff --git a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/alm_frictionless_mortar_contact_condition.tex b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/alm_frictionless_mortar_contact_condition.tex index 4c667d2f6fa1..05405aeb5b27 100755 --- a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/alm_frictionless_mortar_contact_condition.tex +++ b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/alm_frictionless_mortar_contact_condition.tex @@ -130,7 +130,7 @@ \subsection{Strong formulation} \end{center} \end{figure} -In the course of deriving a weak formulation, the balance of linear momentum at the unilateral contact problem for the interface $\Gamma_c^{(i)}$ is typically exploited and a \textit{Lagrange multiplier} vector field $\boldsymbol{\lambda}_n$ is introduced, thus setting the basis for a mixed variational approach. Unilateral contact constraints are typically +In the course of deriving a weak formulation, the balance of linear momentum at the unilateral contact problem for the interface $\Gamma_c^{(i)}$ is typically exploited and a \textit{Lagrange multiplier} vector field $\lambda_n$ is introduced, thus setting the basis for a mixed variational approach. Unilateral contact constraints are typically formulated (and later also numerically evaluated) in the current configuration. \subsection{Weak formulation} @@ -147,7 +147,7 @@ \subsubsection{Standard Lagrange multiplier} \end{cases} \end{equation} -Additionally the \textit{Lagrange multiplier} vector $\boldsymbol{\lambda}_n = -\mathbf{t}_c^{(1)}$, which enforce the unilateral contact constraint\eqref{eq:eq6}, represents the negative slave side contact traction $\mathbf{t}_c^{(1)}$, is chosen from a corresponding solution space denoted as $\mathbfcal{M}$.%chosen the convex cone $\mathbfcal{M}(\boldsymbol{\lambda}) \subset \mathbfcal{M}$ given by \eqref{eq:eq7_5}. \textonehalf TODO: This is for the frinctional case +Additionally the \textit{Lagrange multiplier} vector $\boldsymbol{\lambda}_n = \lambda_n \cdot \mathbf{n} = -\mathbf{t}_c^{(1)}$, which enforce the unilateral contact constraint\eqref{eq:eq6}, represents the negative slave side contact traction $\mathbf{t}_c^{(1)}$, is chosen from a corresponding solution space denoted as $\mathbfcal{M}$.%chosen the convex cone $\mathbfcal{M}(\boldsymbol{\lambda}) \subset \mathbfcal{M}$ given by \eqref{eq:eq7_5}. \textonehalf TODO: This is for the frictional case % \begin{equation}\label{eq:eq7_5} % \mathbfcal{M}(\boldsymbol{\lambda}) \left\{ \right\} @@ -155,23 +155,23 @@ \subsubsection{Standard Lagrange multiplier} In terms of its classification in functional analysis, this space represents the dual space of the trace space $\mathbfcal{W}^{(1)}$ of $\mathbfcal{V}^{(1)}$. In the given context, this means that $\mathcal{M} = H^{−1/2} (\Gamma_c)$ and $\mathcal{W}^{(1)} = H^{1/2} (\Gamma_c)$, where $\mathcal{M}$ and $\mathcal{W}^{(1)}$ denote single scalar components of the corresponding vector-valued spaces $\mathbfcal{M}$ and $\mathbfcal{W}$. -Based on these considerations, a saddle point type weak formulation is derived next. This can be done by extending the standard weak formulation of non-linear solid mechanics as defined to two subdomains and combining it with the \textit{Lagrange multiplier} coupling terms introduced in generic form. Find $\mathbf{u}^{(i)} \in \mathbfcal{U}^{(i)}$ and $\boldsymbol{\lambda}_n \in \mathbfcal{M}$ such that we obtain \eqref{eq:eqfunct0}, than once derived \eqref{eq:eqfunct}. +Based on these considerations, a saddle point type weak formulation is derived next. This can be done by extending the standard weak formulation of non-linear solid mechanics as defined to two subdomains and combining it with the \textit{Lagrange multiplier} coupling terms introduced in generic form. Find $\mathbf{u}^{(i)} \in \mathbfcal{U}^{(i)}$ and $\lambda_n \in \mathbfcal{M}$ such that we obtain \eqref{eq:eqfunct0}, than once derived \eqref{eq:eqfunct}. \begin{subequations} \begin{equation}\label{eq:eqfunct0} - \delta \mathcal{W}^{co}(\mathbf{u},\boldsymbol{\lambda}_n) = \int_{\Gamma_c^{(1)}} \boldsymbol{\lambda}_n \cdot \mathbf{g}_n \text{d}A_0 + \delta \mathcal{W}^{co}(\mathbf{u},\lambda_n) = \int_{\Gamma_c^{(1)}} \lambda_n \cdot g_n \text{d}A \end{equation} -Where $\mathbf{g}_n$ is the continuous normal gap, that can be defined as \eqref{eq:eqgap}. +Where $g_n$ is the continuous normal gap, that can be defined as \eqref{eq:eqgap}. \begin{equation}\label{eq:eqgap} - \mathbf{g}_n = \int_{\Gamma_c^{(1)}} \mathbf{n}^{(1)}\cdot\left( \mathbf{u}^{(1)} - \mathbf{u}^{(2)}\right) \text{d}A_0 + g_n = \mathbf{n}^{(1)}\cdot\left( \mathbf{u}^{(1)} - \mathbf{u}^{(2)}\right) \end{equation} \end{subequations} \begin{subequations}\label{eq:eqfunct} \begin{align} -\delta\mathcal{W}(\mathbf{u},\boldsymbol{\lambda}_n) = \delta\mathcal{W}_\mathbfcal{V} + \delta\mathcal{W}_\mathbfcal{M} & \\ +\delta\mathcal{W}(\mathbf{u},\lambda_n) = \delta\mathcal{W}_\mathbfcal{V} + \delta\mathcal{W}_\mathbfcal{M} & \\ \delta\mathcal{W}_\mathbfcal{V} = -\delta \mathcal{W}_{kin}(\mathbf{u}^{(i)},\delta \mathbf{u}^{(i)}) - \delta \mathcal{W}_{int,ext}(\mathbf{u}^{(i)},\delta \mathbf{u}^{(i)}) & - \delta\mathcal{W}_{co}(\boldsymbol{\lambda}^{(i)},\delta \mathbf{u}^{(i)}) = 0 \text{ } \forall \delta \mathbf{u}^{(i)} \in \mathbfcal{V} \label{eq:subeq8} \\ \delta\mathcal{W}_\mathbfcal{M} = & - \delta\mathcal{W}_{\lambda}(\mathbf{u}^{(i)},\delta \boldsymbol{\lambda}^{(i)}) \geq 0 \text{ } \forall \delta \boldsymbol{\lambda}^{(i)} \in \mathbfcal{M} \label{eq:subeq9} \end{align} @@ -181,10 +181,10 @@ \subsubsection{Standard Lagrange multiplier} \begin{subequations}\label{eq:constributions} \begin{align} - & -\delta \mathcal{W}_{kin} = \sum_{i = 1}^2 \left[\int_{\Omega_0^{(i)}} \rho_0^{(i)} \ddot{\mathbf{u}}^{(i)} \cdot \delta \mathbf{u}^{(i)} \text{d}V_0\right] \label{eq:subeq10} \\ - & -\delta \mathcal{W}_{int,ext} = \sum_{i = 1}^2 \left[\int_{\Omega_0^{(i)}} \left(\mathbf{S}^{(i)} : \delta \mathbf{E}^{(i)} - \hat{\mathbf{b}}\cdot \delta\mathbf{u}^{(i)} \right) \text{d}V_0 - \int_{\Gamma_\sigma^{(i)}} \hat{\mathbf{t}}_0^{(i)}\cdot\delta\mathbf{u}^{(i)} \text{d}A_0 \right] \label{eq:subeq11} \\ - & -\delta \mathcal{W}_{co} = \sum_{i = 1}^2 \left[\int_{\Gamma_c^{(i)}} \boldsymbol{\lambda}_n \cdot \delta\mathbf{g}_n \text{d}A_0\right] \label{eq:subeq12} \\ - & -\delta \mathcal{W}_{\lambda} = \sum_{i = 1}^2 \left[\int_{\Gamma_c^{(i)}} \delta \boldsymbol{\lambda}_n \cdot \mathbf{g}_n \text{d}A_0\right] \label{eq:subeq13} + & -\delta \mathcal{W}_{kin} = \sum_{i = 1}^2 \left[\int_{\Omega_0^{(i)}} \rho_0^{(i)} \ddot{\mathbf{u}}^{(i)} \cdot \delta \mathbf{u}^{(i)} \text{d}V\right] \label{eq:subeq10} \\ + & -\delta \mathcal{W}_{int,ext} = \sum_{i = 1}^2 \left[\int_{\Omega_0^{(i)}} \left(\mathbf{S}^{(i)} : \delta \mathbf{E}^{(i)} - \hat{\mathbf{b}}\cdot \delta\mathbf{u}^{(i)} \right) \text{d}V - \int_{\Gamma_\sigma^{(i)}} \hat{\mathbf{t}}_0^{(i)}\cdot\delta\mathbf{u}^{(i)} \text{d}A \right] \label{eq:subeq11} \\ + & -\delta \mathcal{W}_{co} = \sum_{i = 1}^2 \left[\int_{\Gamma_c^{(i)}} \lambda_n \cdot \delta g_n \text{d}A\right] \label{eq:subeq12} \\ + & -\delta \mathcal{W}_{\lambda} = \sum_{i = 1}^2 \left[\int_{\Gamma_c^{(i)}} \delta \lambda_n \cdot g_n \text{d}A\right] \label{eq:subeq13} \end{align} \end{subequations} @@ -199,10 +199,10 @@ \subsubsection{Augmented Lagrange multiplier} One of the main disadvantages of the standard \textit{Lagrange multiplier} is the saddle point problem that appears in the formulation. For solving that, an \textbf{Augmented Lagrangian} method to solve contact problems with friction was proposed by \textit{Alart and Curnier}\cite{alart} based on a reformulation of the contact and friction laws into a system of equations without inequalities. -Focusing in the functional relative to the contact ($\mathcal{W}^{co}(\mathbf{u},\boldsymbol{\lambda}_n) = \mathcal{W}^{co}_\mathbfcal{V} + \mathcal{W}_\mathbfcal{M}$), we can rewrite \eqref{eq:eqfunct0} as \eqref{eq:eqalmfunct0}. +Focusing in the functional relative to the contact ($\mathcal{W}^{co}(\mathbf{u},\lambda_n) = \mathcal{W}^{co}_\mathbfcal{V} + \mathcal{W}_\mathbfcal{M}$), we can rewrite \eqref{eq:eqfunct0} as \eqref{eq:eqalmfunct0}. \begin{equation}\label{eq:eqalmfunct0} - \mathcal{W}^{co}(\mathbf{u},\boldsymbol{\lambda}_n) = \sum_{i = 1}^2 \left[\int_{\Gamma_c^{(i)}} k \boldsymbol{\lambda}_n \cdot \mathbf{g}_n + \frac{\varepsilon}{2} \mathbf{g}_n^2 - \frac{1}{2\varepsilon} \langle k \boldsymbol{\lambda}_n + \varepsilon \mathbf{g}_n \rangle^2\text{d}A_0\right] + \mathcal{W}^{co}(\mathbf{u},\lambda_n) = \int_{\Gamma_c^{(1)}} k \lambda_n \cdot g_n + \frac{\varepsilon}{2} g_n^2 - \frac{1}{2\varepsilon} \langle k \lambda_n + \varepsilon g_n \rangle^2\text{d}A \end{equation} Where $\varepsilon$ is a positive penalty parameter, $k$ is a positive scale factor, and $\langle \rangle$ is the \textit{Macauley} bracket operator, that is \eqref{eq:eqmac}. @@ -269,13 +269,13 @@ \subsubsection{Augmented Lagrange multiplier} The functional \eqref{eq:eqalmfunct0} can be separated in two different parts, as can be seen in \eqref{eq:eqalmfunct1}. \begin{equation}\label{eq:eqalmfunct1} - \mathcal{W}^{co}(\mathbf{u},\boldsymbol{\lambda}_n) = \sum_{i = 1}^2 \int_{\Gamma_c^{(i)}} \begin{cases} k \boldsymbol{\lambda}_n \cdot \mathbf{g}_n + \frac{\varepsilon}{2} \mathbf{g}_n^2 \text{d}A_0 & \text{ if } k\boldsymbol{\lambda}_n +\varepsilon \mathbf{g}_n \leq 0 \text{ (Contact zone)} \\ - \frac{k}{2\varepsilon} \boldsymbol{\lambda}_n^2 & \text{ if } k\boldsymbol{\lambda}_n +\varepsilon \mathbf{g}_n > 0 \text{ (Gap zone)} \end{cases}\text{d}A_0 + \mathcal{W}^{co}(\mathbf{u},\lambda_n) = \int_{\Gamma_c^{(1)}} \begin{cases} k \lambda_n \cdot g_n + \frac{\varepsilon}{2} g_n^2 \text{d}A & \text{ if } k\lambda_n +\varepsilon g_n \leq 0 \text{ (Contact zone)} \\ - \frac{k}{2\varepsilon} \lambda_n^2 & \text{ if } k\lambda_n +\varepsilon g_n > 0 \text{ (Gap zone)} \end{cases}\text{d}A \end{equation} -Finally we can derive \eqref{eq:eqalmfunct1} to obtain the variational form from \eqref{eq:eqalmfunct2}, where to simplify we define the augmented normal pressure $\hat{\boldsymbol{\lambda}}_{n} = k\boldsymbol{\lambda}_n +\varepsilon \mathbf{g}_n $. +Finally we can derive \eqref{eq:eqalmfunct1} to obtain the variational form from \eqref{eq:eqalmfunct2}, where to simplify we define the augmented normal pressure $\hat{\boldsymbol{\lambda}}_{n} = k\lambda_n +\varepsilon g_n $. \begin{equation}\label{eq:eqalmfunct2} - \delta \mathcal{W}^{co}(\mathbf{u},\boldsymbol{\lambda}_n) = \sum_{i = 1}^2 \int_{\Gamma_c^{(i)}}\begin{cases} \hat{\boldsymbol{\lambda}}_{n} \cdot \delta\mathbf{g}_n + k \mathbf{g}_n \delta\boldsymbol{\lambda}_n & \text{ if } \hat{\boldsymbol{\lambda}}_{n} \leq 0 \text{ (Contact zone)} \\ - \frac{k^2}{\varepsilon} \boldsymbol{\lambda}_n \delta\boldsymbol{\lambda}_n & \text{ if } \hat{\boldsymbol{\lambda}}_{n} > 0 \text{ (Gap zone)} \end{cases} \text{d}A_0 + \delta \mathcal{W}^{co}(\mathbf{u},\lambda_n) = \int_{\Gamma_c^{(1)}}\begin{cases} \hat{\boldsymbol{\lambda}}_{n} \cdot \delta g_n + k g_n \delta\lambda_n & \text{ if } \hat{\boldsymbol{\lambda}}_{n} \leq 0 \text{ (Contact zone)} \\ - \frac{k^2}{\varepsilon} \lambda_n \delta\lambda_n & \text{ if } \hat{\boldsymbol{\lambda}}_{n} > 0 \text{ (Gap zone)} \end{cases} \text{d}A \end{equation} The functional from \eqref{eq:eqalmfunct2} makes that the system obtained varies in function if the nodes are present in the contact or the gap zone, so the system is not a priori known and in the following to present the numerical discretisation will focus in the solution obtained in the gap zone. Once this is derived the solution in the gap zone can be obtained in a in a straight-forward way. @@ -295,7 +295,7 @@ \subsubsection{Dual Lagrange multipliers} Details on how to define dual Lagrange multiplier shape functions $\Phi_j$ using the so-called biorthogonality relationship with the standard displacement shape functions $N_k$ have first been presented in \textit{Wohlmuth}\cite{wohlmuth}. A common notation of the biorthogonality condition is \eqref{eq:eq15}. \begin{equation}\label{eq:eq15} - \int_{\Gamma_{c,h}^{(1)}}\Phi_j N_k^{(1)} \text{d}A_0 = \delta_{jk} \int_{\Gamma_{c,h}^{(1)}} N_k^{(1)} \text{d}A_0 \text{ , } j,k=1,...,m^{(1)} + \int_{\Gamma_{c,h}^{(1)}}\Phi_j N_k^{(1)} \text{d}A = \delta_{jk} \int_{\Gamma_{c,h}^{(1)}} N_k^{(1)} \text{d}A \text{ , } j,k=1,...,m^{(1)} \end{equation} Herein, $\delta_{jk}$ is the \textit{Kronecker} delta, and the most common choice $m^{(1)} = n^{(1)}$ is assumed. For @@ -347,31 +347,31 @@ \subsubsection{Mortar operators} Considering the discrete \textit{Lagrange multiplier}\eqref{eq:eq14} in \eqref{eq:subeq8} we obtain \eqref{eq:eq20}, where $\chi_h$ is the interface mapping. \begin{equation}\label{eq:eq20} - -\delta \mathcal{W}_{co,h} = \sum_{j=1}^{m^{(1)}}\sum_{k=1}^{n^{(1)}} \boldsymbol{\lambda}_{nj}^T \left(\int_{\Gamma_{c,h}^{(1)}} \Phi_j N_k^{(1)} \text{d}A_0 \right) \delta \mathbf{d}_{nk}^{(1)} -\sum_{j=1}^{m^{(1)}}\sum_{l=1}^{n^{(2)}} \boldsymbol{\lambda}_{nj}^T \left(\int_{\Gamma_{c,h}^{(1)}} \Phi_j \left(N_l^{(2)} \circ \chi_h\right) \text{d}A_0 \right) \delta \mathbf{d}_{nl}^{(2)} + -\delta \mathcal{W}_{co,h} = \sum_{j=1}^{m^{(1)}}\sum_{k=1}^{n^{(1)}} \boldsymbol{\lambda}_{nj}^T \left(\int_{\Gamma_{c,h}^{(1)}} \Phi_j N_k^{(1)} \text{d}A \right) \delta \mathbf{d}_{nk}^{(1)} -\sum_{j=1}^{m^{(1)}}\sum_{l=1}^{n^{(2)}} \boldsymbol{\lambda}_{nj}^T \left(\int_{\Gamma_{c,h}^{(1)}} \Phi_j \left(N_l^{(2)} \circ \chi_h\right) \text{d}A \right) \delta \mathbf{d}_{nl}^{(2)} \end{equation} Numerical integration of the mortar coupling terms is exclusively performed on the slave side $\Gamma_{c,h}$ of the interface. In \eqref{eq:eq20}, nodal blocks of the two mortar integral matrices commonly denoted as $\mathbf{D}$ and $\mathbf{M}$ can be identified. This leads to the following definitions \eqref{eq:eq21}. \begin{subequations}\label{eq:eq21} \begin{align} - & \mathbf{D}[j,k] = D_{jk} \mathbf{I}_{ndim} = \int_{\Gamma_{c,h}^{(1)}} \Phi_j N_k^{(1)}\text{d}A_0\mathbf{I}_{ndim}\text{ , } j=1,...m^{(1)}\text{ , } k= 1, ...n^{(1)} = \sum_{g = 1}^{n_{gp}} w_g \phi_{gj} N_{gk}^{(1)} J_g^{(1)} \\ - & \mathbf{M}[j,l] = M_{jl} \mathbf{I}_{ndim} = \int_{\Gamma_{c,h}^{(1)}} \Phi_j \left(N_l^{(2)} \circ \chi_h \right)\text{d}A_0\mathbf{I}_{ndim}\text{ , } j=1,...m^{(1)}\text{ , } k= 1, ...n^{(2)} = \sum_{g = 1}^{n_{gp}} w_g \phi_{gj} N_{gk}^{(2)} J_g^{(1)} + & \mathbf{D}[j,k] = D_{jk} \mathbf{I}_{ndim} = \int_{\Gamma_{c,h}^{(1)}} \Phi_j N_k^{(1)}\text{d}A\mathbf{I}_{ndim}\text{ , } j=1,...m^{(1)}\text{ , } k= 1, ...n^{(1)} = \sum_{g = 1}^{n_{gp}} w_g \phi_{gj} N_{gk}^{(1)} J_g^{(1)} \\ + & \mathbf{M}[j,l] = M_{jl} \mathbf{I}_{ndim} = \int_{\Gamma_{c,h}^{(1)}} \Phi_j \left(N_l^{(2)} \circ \chi_h \right)\text{d}A\mathbf{I}_{ndim}\text{ , } j=1,...m^{(1)}\text{ , } k= 1, ...n^{(2)} = \sum_{g = 1}^{n_{gp}} w_g \phi_{gj} N_{gk}^{(2)} J_g^{(1)} \end{align} \end{subequations} Wit these matrices we can express the functional \eqref{eq:eq20} in the following way \eqref{eq:eq22}. \begin{equation}\label{eq:eq22} - -\delta \mathcal{W}_{co,h} = \delta \mathbf{x}_{n\mathcal{S}}^T\mathbf{D}^T\boldsymbol{\lambda}_n - \delta \mathbf{x}_{n\mathcal{M}}^T\mathbf{M}^T\boldsymbol{\lambda}_n = \delta \mathbf{x}_n \underbrace{\left[\begin{array}{c} \mathbf{0} \\ -\mathbf{M}^T \\ \mathbf{D}^T\end{array} \right]}_{\mathbf{B}^T_{co}} \boldsymbol{\lambda}_n = \delta \mathbf{x}_n^T \mathbf{f}_{co}(\boldsymbol{\lambda}_n) + -\delta \mathcal{W}_{co,h} = \delta \mathbf{x}_{n\mathcal{S}}^T\mathbf{D}^T\lambda_n - \delta \mathbf{x}_{n\mathcal{M}}^T\mathbf{M}^T\lambda_n = \delta \mathbf{x}_n \underbrace{\left[\begin{array}{c} \mathbf{0} \\ -\mathbf{M}^T \\ \mathbf{D}^T\end{array} \right]}_{\mathbf{B}^T_{co}} \lambda_n = \delta \mathbf{x}_n^T \mathbf{f}_{co}(\lambda_n) \end{equation} -Herein, the discrete mortar unilateral contact operator $\mathbf{B}_{co}$ and the resulting discrete vector of unilateral contact forces $\mathbf{f}_{co} (\boldsymbol{\lambda}_n) = \mathbf{B}_{co}\boldsymbol{\lambda}_n$ acting on the slave and the master side of the interface are introduced. +Herein, the discrete mortar unilateral contact operator $\mathbf{B}_{co}$ and the resulting discrete vector of unilateral contact forces $\mathbf{f}_{co} (\lambda_n) = \mathbf{B}_{co}\lambda_n$ acting on the slave and the master side of the interface are introduced. To finalize the discretisation of the considered unilateral contact problem, a closer look needs to be taken at the weak constraint contribution $\delta \mathcal{W}_{\lambda,h} $ in \eqref{eq:subeq9}. Due to the saddle point characteristics and resulting symmetry of the mixed variational formulation in \eqref{eq:subeq8} and \eqref{eq:subeq9}, all discrete components of $\delta \mathcal{W}_{\lambda,h}$ have already been introduced and the final formulation is given as \eqref{eq:eq23}, with $\mathbf{g}_{n}(\mathbf{x}) = \mathbf{B}_{mt} \mathbf{x} \cdot \mathbf{n}$ representing the discrete unilateral contact constraint at the coupling interface. \begin{equation}\label{eq:eq23} - -\delta \mathcal{W}_{\lambda,h} = \delta \boldsymbol{\lambda}_n^T\mathbf{D}\mathbf{x}_{n\mathcal{S}} - \delta \boldsymbol{\lambda}_n^T\mathbf{M}\mathbf{x}_{n\mathcal{M}}= \delta \boldsymbol{\lambda}_n^T \mathbf{B}_{mt} \mathbf{x} \cdot \mathbf{n} = \delta \boldsymbol{\lambda}_n^T \mathbf{g}_{n}(\mathbf{x}) + -\delta \mathcal{W}_{\lambda,h} = \delta \lambda_n^T\mathbf{D}\mathbf{x}_{n\mathcal{S}} - \delta \lambda_n^T\mathbf{M}\mathbf{x}_{n\mathcal{M}}= \delta \lambda_n^T \mathbf{B}_{mt} \mathbf{x} \cdot \mathbf{n} = \delta \lambda_n^T \mathbf{g}_{n}(\mathbf{x}) \end{equation} This discrete form of $\mathbf{g}_{n}$ can be renamed as nodal weighted gap for each node ($\tilde{g}_n$). @@ -383,13 +383,13 @@ \subsubsection{Mortar operators} \begin{subequations}\label{eq:eq24} \begin{equation} \begin{aligned} - \Delta\mathbf{D}[j,k] & = \Delta D_{jk} \mathbf{I}_{ndim} = \Delta \int_{\Gamma_{c,h}^{(1)}} \Phi_j N_k^{(1)}\text{d}A_0\mathbf{I}_{ndim}\text{ , } j=1,...m^{(1)}\text{ , } k= 1, ...n^{(1)} \\ + \Delta\mathbf{D}[j,k] & = \Delta D_{jk} \mathbf{I}_{ndim} = \Delta \int_{\Gamma_{c,h}^{(1)}} \Phi_j N_k^{(1)}\text{d}A\mathbf{I}_{ndim}\text{ , } j=1,...m^{(1)}\text{ , } k= 1, ...n^{(1)} \\ & = \sum_{g = 1}^{n_{gp}} w_g \Delta\phi_{gj} N_{gk}^{(1)} J_g^{(1)} + \sum_{g = 1}^{n_{gp}} w_g \phi_{gj} \Delta N_{gk}^{(1)} J_g^{(1)} + \sum_{g = 1}^{n_{gp}} w_g \phi_{gj} N_{gk}^{(1)} \Delta J_g^{(1)} \end{aligned} \end{equation} \begin{equation} \begin{aligned} - \Delta\mathbf{M}[j,l] & = \Delta M_{jl} \mathbf{I}_{ndim} = \Delta \int_{\Gamma_{c,h}^{(1)}} \Phi_j \left(N_l^{(2)} \circ \chi_h \right)\text{d}A_0\mathbf{I}_{ndim}\text{ , } j=1,...m^{(1)}\text{ , } k= 1, ...n^{(2)} \\ + \Delta\mathbf{M}[j,l] & = \Delta M_{jl} \mathbf{I}_{ndim} = \Delta \int_{\Gamma_{c,h}^{(1)}} \Phi_j \left(N_l^{(2)} \circ \chi_h \right)\text{d}A\mathbf{I}_{ndim}\text{ , } j=1,...m^{(1)}\text{ , } k= 1, ...n^{(2)} \\ & = \sum_{g = 1}^{n_{gp}} w_g \Delta\phi_{gj} N_{gk}^{(2)} J_g^{(1)} + \sum_{g = 1}^{n_{gp}} w_g \phi_{gj} \Delta N_{gk}^{(2)} J_g^{(1)} + \sum_{g = 1}^{n_{gp}} w_g \phi_{gj} N_{gk}^{(2)} \Delta J_g^{(1)} \end{aligned} \end{equation} @@ -402,7 +402,7 @@ \subsubsection{Matrix form of the problem} Finally, once computed the mortar operators, the resulting system for unilateral contact corresponds (for fully activated system) with \eqref{eq:eq24}. \begin{equation}\label{eq:eq24} - \left[ \begin{array}{cccc} \mathbf{K}_{\mathcal{N}\mathcal{N}} & \mathbf{K}_{\mathcal{N}\mathcal{M}} & \mathbf{K}_{\mathcal{N}\mathcal{S}} & \mathbf{0} \\ \mathbf{K}_{\mathcal{N}\mathcal{N}} & \mathbf{K}_{\mathcal{M}\mathcal{M}} & \mathbf{0} & -(\mathbf{M}\cdot \mathbf{n})^{T} \\ \mathbf{K}_{\mathcal{S}\mathcal{N}} & \mathbf{0} & \mathbf{K}_{\mathcal{S}\mathcal{S}} & (\mathbf{D}\cdot \mathbf{n})^T \\ \mathbf{0} & -(\mathbf{M}\cdot \mathbf{n}) & (\mathbf{D}\cdot \mathbf{n}) & \mathbf{0} \end{array} \right] \left[ \begin{array}{c} \Delta\mathbf{d}_{\mathcal{N}} \\ \Delta\mathbf{d}_{\mathcal{M}} \\ \Delta\mathbf{d}_{\mathcal{S}} \\ \Delta\boldsymbol{\lambda}_n \end{array} \right] = - \left[ \begin{array}{c} \mathbf{r}_{\mathcal{N}} \\ \mathbf{r}_{\mathcal{M}} \\ \mathbf{r}_{\mathcal{S}} \\ \mathbf{g}_n \end{array} \right] + \left[ \begin{array}{cccc} \mathbf{K}_{\mathcal{N}\mathcal{N}} & \mathbf{K}_{\mathcal{N}\mathcal{M}} & \mathbf{K}_{\mathcal{N}\mathcal{S}} & \mathbf{0} \\ \mathbf{K}_{\mathcal{N}\mathcal{N}} & \mathbf{K}_{\mathcal{M}\mathcal{M}} & \mathbf{0} & -(\mathbf{M}\cdot \mathbf{n})^{T} \\ \mathbf{K}_{\mathcal{S}\mathcal{N}} & \mathbf{0} & \mathbf{K}_{\mathcal{S}\mathcal{S}} & (\mathbf{D}\cdot \mathbf{n})^T \\ \mathbf{0} & -(\mathbf{M}\cdot \mathbf{n}) & (\mathbf{D}\cdot \mathbf{n}) & \mathbf{0} \end{array} \right] \left[ \begin{array}{c} \Delta\mathbf{d}_{\mathcal{N}} \\ \Delta\mathbf{d}_{\mathcal{M}} \\ \Delta\mathbf{d}_{\mathcal{S}} \\ \Delta\lambda_n \end{array} \right] = - \left[ \begin{array}{c} \mathbf{r}_{\mathcal{N}} \\ \mathbf{r}_{\mathcal{M}} \\ \mathbf{r}_{\mathcal{S}} \\ g_n \end{array} \right] \end{equation} \subsection{Active set strategy (Semismoth Newton Raphson)} @@ -425,7 +425,7 @@ \subsection{Active set strategy (Semismoth Newton Raphson)} ylabel={$\lambda_n$}, yticklabel pos=left, ylabel style={font=\Large}, - zlabel={$C_j(\mathbf{d}, \boldsymbol{\lambda}_n)$}, + zlabel={$C_j(\mathbf{d}, \lambda_n)$}, zticklabel pos=left, zlabel style={font=\huge}, after end axis/.code={ @@ -439,7 +439,7 @@ \subsection{Active set strategy (Semismoth Newton Raphson)} \addplot3[surf,shader=faceted]{myfunction(1.0,1.0)}; \addplot3[samples=30, domain=-5:0, samples y=0, thick,red,smooth]({x},{0.0},{0.0}); \addplot3[samples=30, domain= 0:5,samples y=0, thick,red,smooth]({0.0},{x},{0.0}); -\node at (axis cs: 0.0,0.0,0.0 ) [pin=90:\normalsize{$C_j(\mathbf{d}, \boldsymbol{\lambda}_n) = 0$}] {}; +\node at (axis cs: 0.0,0.0,0.0 ) [pin=90:\normalsize{$C_j(\mathbf{d}, \lambda_n) = 0$}] {}; \end{axis} \end{tikzpicture} \caption{Exemplary nodal \textbf{NCP} function $\hat{\boldsymbol{\lambda}}_n$ the normal part of the nodal weighted diff --git a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/generate_frictionless_mortar_condition.py b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/generate_frictionless_mortar_condition.py index 9a64ad5efe3b..8c720ecbd5a2 100755 --- a/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/generate_frictionless_mortar_condition.py +++ b/applications/ContactStructuralMechanicsApplication/symbolic_generation/ALM_frictionless_mortar_condition/generate_frictionless_mortar_condition.py @@ -24,12 +24,12 @@ def convert_active_inactive_int(list_active): nnodes_combinations = [2,3,4] lhs_string = "" -lhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\nbounded_matrix AugmentedLagrangianMethodFrictionlessMortarContactCondition::CalculateLocalLHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DerivativeDataType& rDerivativeData,\n const unsigned int& rActiveInactive\n )\n{\n bounded_matrix lhs;\n \n // Initialize values\n const bounded_matrix u1 = rDerivativeData.u1;\n const bounded_matrix u2 = rDerivativeData.u2;\n const bounded_matrix X1 = rDerivativeData.X1;\n const bounded_matrix X2 = rDerivativeData.X2;\n \n const array_1d LMNormal = ContactUtilities::GetVariableVector(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0);\n \n const bounded_matrix NormalSlave = rDerivativeData.NormalSlave;\n const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix(NormalSlave);\n\n // The ALM parameters\n const double ScaleFactor = rDerivativeData.ScaleFactor;\n const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter;\n \n // Mortar operators\n const bounded_matrix MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix DOperator = rMortarConditionMatrices.DOperator;\n // Mortar operators derivatives\n const array_1d, SIZEDERIVATIVES2> DeltaMOperator = rMortarConditionMatrices.DeltaMOperator;\n const array_1d, SIZEDERIVATIVES2> DeltaDOperator = rMortarConditionMatrices.DeltaDOperator;\n\n" +lhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\nbounded_matrix AugmentedLagrangianMethodFrictionlessMortarContactCondition::CalculateLocalLHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DerivativeDataType& rDerivativeData,\n const unsigned int& rActiveInactive\n )\n{\n bounded_matrix lhs;\n \n // Initialize values\n const bounded_matrix& u1 = rDerivativeData.u1;\n const bounded_matrix& u2 = rDerivativeData.u2;\n const bounded_matrix& X1 = rDerivativeData.X1;\n const bounded_matrix& X2 = rDerivativeData.X2;\n \n const array_1d& LMNormal = MortarUtilities::GetVariableVector(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0);\n \n const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave;\n const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix(NormalSlave);\n\n // The ALM parameters\n const double& ScaleFactor = rDerivativeData.ScaleFactor;\n const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter;\n \n // Mortar operators\n const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator;\n // Mortar operators derivatives\n const array_1d, SIZEDERIVATIVES2>& DeltaMOperator = rMortarConditionMatrices.DeltaMOperator;\n const array_1d, SIZEDERIVATIVES2>& DeltaDOperator = rMortarConditionMatrices.DeltaDOperator;\n\n" lhs_template_end_string = "\n\n return lhs;\n}\n" rhs_string = "" -rhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\narray_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition::CalculateLocalRHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DerivativeDataType& rDerivativeData,\n const unsigned int& rActiveInactive\n )\n{\n array_1d rhs;\n\n // Initialize values\n const bounded_matrix u1 = rDerivativeData.u1;\n const bounded_matrix u2 = rDerivativeData.u2;\n const bounded_matrix X1 = rDerivativeData.X1;\n const bounded_matrix X2 = rDerivativeData.X2;\n \n const array_1d LMNormal = ContactUtilities::GetVariableVector(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0);\n \n const bounded_matrix NormalSlave = rDerivativeData.NormalSlave;\n const bounded_matrix AbsNormalSlave = ContactUtilities::GetAbsMatrix(NormalSlave);\n\n // The ALM parameters\n const double ScaleFactor = rDerivativeData.ScaleFactor;\n const array_1d PenaltyParameter = rDerivativeData.PenaltyParameter;\n \n // Mortar operators\n const bounded_matrix MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix DOperator = rMortarConditionMatrices.DOperator;\n\n" +rhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\narray_1d AugmentedLagrangianMethodFrictionlessMortarContactCondition::CalculateLocalRHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n const DerivativeDataType& rDerivativeData,\n const unsigned int& rActiveInactive\n )\n{\n array_1d rhs;\n\n // Initialize values\n const bounded_matrix& u1 = rDerivativeData.u1;\n const bounded_matrix& u2 = rDerivativeData.u2;\n const bounded_matrix& X1 = rDerivativeData.X1;\n const bounded_matrix& X2 = rDerivativeData.X2;\n \n const array_1d& LMNormal = MortarUtilities::GetVariableVector(this->GetGeometry(), NORMAL_CONTACT_STRESS, 0);\n \n const bounded_matrix& NormalSlave = rDerivativeData.NormalSlave;\n const bounded_matrix& AbsNormalSlave = MortarUtilities::GetAbsMatrix(NormalSlave);\n\n // The ALM parameters\n const double& ScaleFactor = rDerivativeData.ScaleFactor;\n const array_1d& PenaltyParameter = rDerivativeData.PenaltyParameter;\n \n // Mortar operators\n const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator;\n\n" rhs_template_end_string = "\n\n return rhs;\n}\n" diff --git a/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/generate_mesh_tying_mortar_condition.py b/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/generate_mesh_tying_mortar_condition.py index 3025a7513e7d..d6e7ecd6ee47 100755 --- a/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/generate_mesh_tying_mortar_condition.py +++ b/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/generate_mesh_tying_mortar_condition.py @@ -12,13 +12,13 @@ tensor_combinations = [1,2,1,2,1,3,1,3] lhs_string = "" -lhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate< >\ntemplate< >\nboost::numeric::ublas::bounded_matrix MeshTyingMortarCondition::CalculateLocalLHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n DofData& rDofData,\n const unsigned int& rMasterElementIndex,\n const ProcessInfo& rCurrentProcessInfo\n )\n{\n boost::numeric::ublas::bounded_matrix lhs;\n\n // We get the mortar operators\n const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator;\n const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator;\n\n" +lhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate< >\ntemplate< >\nboost::numeric::ublas::bounded_matrix MeshTyingMortarCondition::CalculateLocalLHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n DofData& rDofData,\n const unsigned int& rMasterElementIndex,\n const ProcessInfo& rCurrentProcessInfo\n )\n{\n boost::numeric::ublas::bounded_matrix lhs;\n\n // We get the mortar operators\n const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator;\n const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator;\n\n" lhs_template_end_string = "\n\n return lhs;\n}\n" rhs_string = "" -rhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\ntemplate<>\narray_1d MeshTyingMortarCondition::CalculateLocalRHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n DofData& rDofData,\n const unsigned int& rMasterElementIndex,\n const ProcessInfo& rCurrentProcessInfo\n )\n{\n array_1d rhs;\n\n // Initialize values\n const bounded_matrix u1 = rDofData.u1;\n const bounded_matrix u2 = rDofData.u2;\n\n const bounded_matrix lm = rDofData.LagrangeMultipliers; \n\n // Mortar operators\n const bounded_matrix MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix DOperator = rMortarConditionMatrices.DOperator;\n\n" +rhs_template_begin_string = "\n/***********************************************************************************/\n/***********************************************************************************/\n\ntemplate<>\ntemplate<>\narray_1d MeshTyingMortarCondition::CalculateLocalRHS(\n const MortarConditionMatrices& rMortarConditionMatrices,\n DofData& rDofData,\n const unsigned int& rMasterElementIndex,\n const ProcessInfo& rCurrentProcessInfo\n )\n{\n array_1d rhs;\n\n // Initialize values\n const bounded_matrix u1 = rDofData.u1;\n const bounded_matrix u2 = rDofData.u2;\n\n const bounded_matrix lm = rDofData.LagrangeMultipliers; \n\n // Mortar operators\n const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator;\n const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator;\n\n" rhs_template_end_string = "\n\n return rhs;\n}\n" diff --git a/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/mesh_tying_mortar_condition.cpp b/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/mesh_tying_mortar_condition.cpp index 78cbda138fac..57db9b5fcd08 100644 --- a/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/mesh_tying_mortar_condition.cpp +++ b/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/mesh_tying_mortar_condition.cpp @@ -121,7 +121,7 @@ void MeshTyingMortarCondition::Initialize( ) DecompositionType DecompGeom( PointsArray ); - const bool BadShape = (TDim == 2) ? false : ContactUtilities::HeronCheck(DecompGeom); + const bool BadShape = (TDim == 2) ? false : MortarUtilities::HeronCheck(DecompGeom); if (BadShape == false) { @@ -821,11 +821,11 @@ void MeshTyingMortarCondition::MasterShapeFunctionVa GeometryType& MasterSegment = rVariables.GetMasterElement( ); PointType ProjectedGPGlobal; - const array_1d GPNormal = ContactUtilities::GaussPointNormal(rVariables.N_Slave, GetGeometry()); + const array_1d GPNormal = MortarUtilities::GaussPointUnitNormal(rVariables.N_Slave, GetGeometry()); GeometryType::CoordinatesArrayType SlaveGPGlobal; this->GetGeometry( ).GlobalCoordinates( SlaveGPGlobal, LocalPoint ); - ContactUtilities::FastProjectDirection( MasterSegment, SlaveGPGlobal, ProjectedGPGlobal, MasterNormal, -GPNormal ); // The opposite direction + MortarUtilities::FastProjectDirection( MasterSegment, SlaveGPGlobal, ProjectedGPGlobal, MasterNormal, -GPNormal ); // The opposite direction GeometryType::CoordinatesArrayType ProjectedGPLocal; @@ -927,8 +927,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<2,3 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -991,8 +991,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<2 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -1163,8 +1163,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<2,4 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -1227,8 +1227,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<2 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -1399,8 +1399,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<3,4 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -1513,8 +1513,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<3 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -2275,8 +2275,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<3 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -2459,8 +2459,8 @@ boost::numeric::ublas::bounded_matrix MeshTyingMortarCondition<3 boost::numeric::ublas::bounded_matrix lhs; // We get the mortar operators - const boost::numeric::ublas::bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const boost::numeric::ublas::bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const boost::numeric::ublas::bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const boost::numeric::ublas::bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; const double clhs0 = -MOperator(0,0); const double clhs1 = -MOperator(1,0); @@ -3805,8 +3805,8 @@ array_1d MeshTyingMortarCondition<2,3,ScalarValue>::CalculateLocalRHS const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0); @@ -3841,8 +3841,8 @@ array_1d MeshTyingMortarCondition<2,3,Vector2DValue>::CalculateLocal const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0); @@ -3883,8 +3883,8 @@ array_1d MeshTyingMortarCondition<2,4,ScalarValue>::CalculateLocalRHS const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0); @@ -3919,8 +3919,8 @@ array_1d MeshTyingMortarCondition<2,4,Vector2DValue>::CalculateLocal const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0); @@ -3961,8 +3961,8 @@ array_1d MeshTyingMortarCondition<3,4,ScalarValue>::CalculateLocalRHS const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0) + MOperator(2,0)*lm(2,0); @@ -4000,8 +4000,8 @@ array_1d MeshTyingMortarCondition<3,4,Vector3DValue>::CalculateLocal const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0) + MOperator(2,0)*lm(2,0); @@ -4057,8 +4057,8 @@ array_1d MeshTyingMortarCondition<3,8,ScalarValue>::CalculateLocalRH const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0) + MOperator(2,0)*lm(2,0) + MOperator(3,0)*lm(3,0); @@ -4099,8 +4099,8 @@ array_1d MeshTyingMortarCondition<3,8,Vector3DValue>::CalculateLocal const bounded_matrix lm = rDofData.LagrangeMultipliers; // Mortar operators - const bounded_matrix MOperator = rMortarConditionMatrices.MOperator; - const bounded_matrix DOperator = rMortarConditionMatrices.DOperator; + const bounded_matrix& MOperator = rMortarConditionMatrices.MOperator; + const bounded_matrix& DOperator = rMortarConditionMatrices.DOperator; rhs[0]=MOperator(0,0)*lm(0,0) + MOperator(1,0)*lm(1,0) + MOperator(2,0)*lm(2,0) + MOperator(3,0)*lm(3,0); diff --git a/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/mesh_tying_mortar_condition_template.cpp b/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/mesh_tying_mortar_condition_template.cpp index 44614c9ea126..88ad7812b7d9 100644 --- a/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/mesh_tying_mortar_condition_template.cpp +++ b/applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/mesh_tying_mortar_condition_template.cpp @@ -121,7 +121,7 @@ void MeshTyingMortarCondition::Initialize( ) DecompositionType DecompGeom( PointsArray ); - const bool BadShape = (TDim == 2) ? false : ContactUtilities::HeronCheck(DecompGeom); + const bool BadShape = (TDim == 2) ? false : MortarUtilities::HeronCheck(DecompGeom); if (BadShape == false) { @@ -821,11 +821,11 @@ void MeshTyingMortarCondition::MasterShapeFunctionVa GeometryType& MasterSegment = rVariables.GetMasterElement( ); PointType ProjectedGPGlobal; - const array_1d GPNormal = ContactUtilities::GaussPointNormal(rVariables.N_Slave, GetGeometry()); + const array_1d GPNormal = MortarUtilities::GaussPointUnitNormal(rVariables.N_Slave, GetGeometry()); GeometryType::CoordinatesArrayType SlaveGPGlobal; this->GetGeometry( ).GlobalCoordinates( SlaveGPGlobal, LocalPoint ); - ContactUtilities::FastProjectDirection( MasterSegment, SlaveGPGlobal, ProjectedGPGlobal, MasterNormal, -GPNormal ); // The opposite direction + MortarUtilities::FastProjectDirection( MasterSegment, SlaveGPGlobal, ProjectedGPGlobal, MasterNormal, -GPNormal ); // The opposite direction GeometryType::CoordinatesArrayType ProjectedGPLocal; diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_slope_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_slope_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_slope_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_slope_test_parameters.json index 3eac79abda86..0c4f6b2b2d1b 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_slope_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_slope_test_parameters.json @@ -86,7 +86,7 @@ "interval" : [0.0,"End"] } }], - "contact_processes" : [{ + "contact_process_list" : [{ "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", "help" : "This process computes the contact between different surfaces", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_slope_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_slope_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_test_parameters.json index d907a5b97b2f..d57818b617c7 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_test_parameters.json @@ -84,7 +84,7 @@ "interval" : [0.0,"End"] } }], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/contact_patch_complex_geom_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test_parameters.json old mode 100644 new mode 100755 index a502bd4fcef6..d02628313c75 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test_parameters.json @@ -81,7 +81,7 @@ "modulus" : "5.0e-1*t/1.1" } }], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_complete_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_parameters.json old mode 100644 new mode 100755 index c262b3a8f940..9ec36908532b --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_parameters.json @@ -29,7 +29,7 @@ "line_search" : false, "clear_storage" : true, "reform_dofs_at_each_step" : true, - "convergence_criterion" : "Contact_Residual_criterion", + "convergence_criterion" : "Contact_Mixed_criterion", "displacement_relative_tolerance" : 0.0001, "displacement_absolute_tolerance" : 1e-9, "residual_relative_tolerance" : 0.0001, @@ -54,6 +54,18 @@ "constrained" : [true,true,true], "value" : [0.0,0.0,0.0] } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "LineLoad2D_bc_pressure", + "variable_name" : "DISPLACEMENT", + "constrained" : [true,false,true], + "value" : [0.0,0.0,0.0] + } }], "loads_process_list" : [{ "python_module" : "assign_scalar_variable_to_conditions_process", @@ -68,7 +80,7 @@ "value" : 0.2 } }], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", @@ -83,13 +95,13 @@ "max_number_results" : 1000, "type_search" : "InRadius", "integration_order" : 2, - "active_check_factor" : 1.0e-02, + "active_check_factor" : 1.0e-0, "normal_variation" : false, "dual_search_check" : false, "stiffness_factor" : 10.0, "penalty_scale_factor" : 1.0, "manual_ALM" : true, - "penalty" : 1.0e-6, + "penalty" : 1.0e0, "scale_factor" : 1.0e0, "debug_mode" : false } @@ -126,7 +138,7 @@ "check_variables" : ["DISPLACEMENT_X","DISPLACEMENT_Y","NORMAL_CONTACT_STRESS"], "input_file_name" : "ALM_frictionless_contact_test_2D/hertz_simple_test_results.json", "model_part_name" : "Contact_Part", - "time_frequency" : 1.01 + "time_frequency" : 1.0 } } ], @@ -140,7 +152,7 @@ "output_variables" : ["DISPLACEMENT_X","DISPLACEMENT_Y","NORMAL_CONTACT_STRESS"], "output_file_name" : "ALM_frictionless_contact_test_2D/hertz_simple_test_results.json", "model_part_name" : "Contact_Part", - "time_frequency" : 1.01 + "time_frequency" : 1.0 } } ], diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_results.json old mode 100644 new mode 100755 index a2130349cbaf..3b7167c65dcc --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_results.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_simple_test_results.json @@ -1 +1 @@ -{"NODE_148": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1668": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1476": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2601": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2782": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_307": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_448": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_341": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_781": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_325": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_231": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1512": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2850": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_167": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2274": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1631": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1022": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2012": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1099": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2708": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_709": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2342": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_530": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_985": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_287": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2184": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2382": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_122": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_472": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_674": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_363": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2510": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_794": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1552": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2818": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_861": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1362": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2689": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1020": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_402": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1363": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_144": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_206": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_821": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1058": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_274": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2756": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1819": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1290": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3044": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2879": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1254": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1700": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3097": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "TIME": [], "NODE_1208": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1592": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_383": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2806": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_257": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1134": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2096": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_406": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2983": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2993": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1937": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_744": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_129": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_944": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3094": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2457": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_553": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2931": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_901": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_641": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_195": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_118": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1593": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_260": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_133": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3068": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3066": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2975": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_164": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_181": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1323": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_465": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2137": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_219": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_172": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1447": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2055": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2732": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2894": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2226": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_905": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1743": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2916": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2303": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2371": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1897": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3027": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3078": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2540": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_297": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1974": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3089": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1938": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2955": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2617": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1398": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3056": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3010": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_523": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_3030": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_154": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2050": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_126": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1857": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_497": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_141": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_127": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1175": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_220": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2571": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2166": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_612": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2653": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2444": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1477": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2758": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1820": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_696": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2829": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2937": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1135": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1702": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_187": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2627": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_427": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_579": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2410": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2873": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2480": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_345": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2538": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_610": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_188": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2684": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_2268": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_247": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1785": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}, "NODE_1253": {"DISPLACEMENT_X": [], "DISPLACEMENT_Y": [], "NORMAL_CONTACT_STRESS": []}} \ No newline at end of file +{"NODE_2410": {"DISPLACEMENT_Y": [-0.01807808010695803], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0033207231194190895]}, "NODE_1592": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2684": {"DISPLACEMENT_Y": [-0.021332048580599595], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0029730723212536983]}, "NODE_2012": {"DISPLACEMENT_Y": [-0.011894543867469657], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.003704938721837033]}, "NODE_307": {"DISPLACEMENT_Y": [-0.02218995344880535], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002858038327319295]}, "NODE_2540": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1020": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1254": {"DISPLACEMENT_Y": [-0.002500000011916457], "NORMAL_CONTACT_STRESS": [-4.57936578834105], "DISPLACEMENT_X": [-0.0024226701894361873]}, "NODE_3066": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_3097": {"DISPLACEMENT_Y": [-0.026200145145414154], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002117737114442812]}, "NODE_2818": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_612": {"DISPLACEMENT_Y": [-0.017626240208677316], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0033595765660261153]}, "NODE_1447": {"DISPLACEMENT_Y": [-7.000000027897908e-05], "NORMAL_CONTACT_STRESS": [-5.322426205924347], "DISPLACEMENT_X": [-0.0004249766236822737]}, "NODE_2137": {"DISPLACEMENT_Y": [-0.014238937092899483], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0035919734586237514]}, "NODE_1290": {"DISPLACEMENT_Y": [-0.0017399999948342374], "NORMAL_CONTACT_STRESS": [-4.8042085952392215], "DISPLACEMENT_X": [-0.002052731328384332]}, "NODE_1476": {"DISPLACEMENT_Y": [-1.407140506389607e-16], "NORMAL_CONTACT_STRESS": [-3.5622975387152827], "DISPLACEMENT_X": [2.1205039515429793e-14]}, "NODE_553": {"DISPLACEMENT_Y": [-0.018507107961899576], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003281888956394852]}, "NODE_1363": {"DISPLACEMENT_Y": [-0.000630000002580215], "NORMAL_CONTACT_STRESS": [-5.141498362792594], "DISPLACEMENT_X": [-0.0012601369446264196]}, "NODE_1593": {"DISPLACEMENT_Y": [-0.0006300000025803268], "NORMAL_CONTACT_STRESS": [-5.141498362792282], "DISPLACEMENT_X": [0.0012601369446688067]}, "NODE_1208": {"DISPLACEMENT_Y": [-0.00341000003512026], "NORMAL_CONTACT_STRESS": [-4.232630532529251], "DISPLACEMENT_X": [-0.002767786293975483]}, "NODE_122": {"DISPLACEMENT_Y": [-0.026200145145403628], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0021177371144013037]}, "NODE_144": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1857": {"DISPLACEMENT_Y": [-0.006950000122637463], "NORMAL_CONTACT_STRESS": [-2.674928296370621], "DISPLACEMENT_X": [0.0035826419472234834]}, "NODE_2571": {"DISPLACEMENT_Y": [-0.020035468455953928], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0031271261992407273]}, "NODE_2653": {"DISPLACEMENT_Y": [-0.02102586470996004], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.003011480814028497]}, "TIME": [1.01], "NODE_126": {"DISPLACEMENT_Y": [-0.026035043714845836], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002158895374157493]}, "NODE_1175": {"DISPLACEMENT_Y": [-0.004449999973494389], "NORMAL_CONTACT_STRESS": [-3.850224517630991], "DISPLACEMENT_X": [-0.0030819929584040037]}, "NODE_427": {"DISPLACEMENT_Y": [-0.020378460434058634], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0030885023606252327]}, "NODE_901": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2480": {"DISPLACEMENT_Y": [-0.018915582484276515], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.003243191565498222]}, "NODE_641": {"DISPLACEMENT_Y": [-0.017149044300938394], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003398433649075013]}, "NODE_2274": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_118": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2829": {"DISPLACEMENT_Y": [-0.022969357982447893], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002743301482289794]}, "NODE_1743": {"DISPLACEMENT_Y": [-0.0034100000351202342], "NORMAL_CONTACT_STRESS": [-4.2326305325298685], "DISPLACEMENT_X": [0.0027677862940179835]}, "NODE_465": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2955": {"DISPLACEMENT_Y": [-0.0243404344180644], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0025134334241477463]}, "NODE_181": {"DISPLACEMENT_Y": [-0.02454839107235722], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0024749156166106573]}, "NODE_133": {"DISPLACEMENT_Y": [-0.025691730445996052], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0022396999353360013]}, "NODE_1937": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1700": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2510": {"DISPLACEMENT_Y": [-0.01930532718807365], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.003204423255793107]}, "NODE_1552": {"DISPLACEMENT_Y": [-0.00027999999984658125], "NORMAL_CONTACT_STRESS": [-5.257243743761585], "DISPLACEMENT_X": [0.0008463513330842311]}, "NODE_472": {"DISPLACEMENT_Y": [-0.01967820857265333], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0031657054076442612]}, "NODE_2732": {"DISPLACEMENT_Y": [-0.021913465151036156], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002896356334020236]}, "NODE_781": {"DISPLACEMENT_Y": [-0.014909790038247325], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0035532695102267154]}, "NODE_363": {"DISPLACEMENT_Y": [-0.021332048580593576], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0029730723212112744]}, "NODE_579": {"DISPLACEMENT_Y": [-0.01807808010695397], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0033207231193764153]}, "NODE_1022": {"DISPLACEMENT_Y": [-0.009918677436745987], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003770252387257283]}, "NODE_1362": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1477": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_610": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_406": {"DISPLACEMENT_Y": [-0.02070829657332687], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003050013045866678]}, "NODE_260": {"DISPLACEMENT_Y": [-0.022969357982440618], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002743301482247576]}, "NODE_231": {"DISPLACEMENT_Y": [-0.023451770200818765], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002666817499694277]}, "NODE_206": {"DISPLACEMENT_Y": [-0.02390794216659529], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0025902424149566085]}, "NODE_1897": {"DISPLACEMENT_Y": [-0.008409999969621492], "NORMAL_CONTACT_STRESS": [-1.5857425951041333], "DISPLACEMENT_X": [0.0037299184115245133]}, "NODE_287": {"DISPLACEMENT_Y": [-0.022457820376530456], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0028198122188888824]}, "NODE_1323": {"DISPLACEMENT_Y": [-0.001110000007254334], "NORMAL_CONTACT_STRESS": [-5.025357112780339], "DISPLACEMENT_X": [-0.0016637079593654258]}, "NODE_2444": {"DISPLACEMENT_Y": [-0.018507107961903857], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.003281888956437502]}, "NODE_1820": {"DISPLACEMENT_Y": [-0.005630000034380713], "NORMAL_CONTACT_STRESS": [-3.3519805735153754], "DISPLACEMENT_X": [0.003357937418029151]}, "NODE_2782": {"DISPLACEMENT_Y": [-0.022457820376537315], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002819812218931171]}, "NODE_1512": {"DISPLACEMENT_Y": [-7.000000027894788e-05], "NORMAL_CONTACT_STRESS": [-3.548528413557466], "DISPLACEMENT_X": [0.00042497662372469573]}, "NODE_154": {"DISPLACEMENT_Y": [-0.025141635024553435], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002358344670658805]}, "NODE_2937": {"DISPLACEMENT_Y": [-0.024127032670123196], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0025518863333312473]}, "NODE_1134": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_172": {"DISPLACEMENT_Y": [-0.024751115048764608], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002436195976655839]}, "NODE_3030": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_220": {"DISPLACEMENT_Y": [-0.023682953323096483], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002628526665338132]}, "NODE_2879": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1974": {"DISPLACEMENT_Y": [-0.010984384413943577], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0037400031150192064]}, "NODE_794": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1668": {"DISPLACEMENT_Y": [-0.0017399999948342593], "NORMAL_CONTACT_STRESS": [-4.804208595239396], "DISPLACEMENT_X": [0.0020527313284268225]}, "NODE_2758": {"DISPLACEMENT_Y": [-0.022189953448811996], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0028580383273616185]}, "NODE_2342": {"DISPLACEMENT_Y": [-0.017149044300941996], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0033984336491177337]}, "NODE_2538": {"DISPLACEMENT_Y": [-0.019678208572658267], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0031657054076868335]}, "NODE_164": {"DISPLACEMENT_Y": [-0.02494884874466308], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0023974041153424163]}, "NODE_141": {"DISPLACEMENT_Y": [-0.025513070893423542], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002279535849740382]}, "NODE_2689": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2268": {"DISPLACEMENT_Y": [-0.01610471940735636], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0034758992140423786]}, "NODE_2931": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_148": {"DISPLACEMENT_Y": [-0.02532970077880238], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0023190862081151602]}, "NODE_861": {"DISPLACEMENT_Y": [-0.013505745886844932], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003630691083968901]}, "NODE_2382": {"DISPLACEMENT_Y": [-0.017626240208681147], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0033595765660688133]}, "NODE_2975": {"DISPLACEMENT_Y": [-0.024548391072365925], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002474915616652594]}, "NODE_1938": {"DISPLACEMENT_Y": [-0.00991867743674681], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.003770252387300186]}, "NODE_2850": {"DISPLACEMENT_Y": [-0.02321400345227781], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0027050704599890676]}, "NODE_3027": {"DISPLACEMENT_Y": [-0.025141635024562754], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0023583446707006127]}, "NODE_1702": {"DISPLACEMENT_Y": [-0.00250000001191664], "NORMAL_CONTACT_STRESS": [-4.579365788340599], "DISPLACEMENT_X": [0.002422670189478679]}, "NODE_1631": {"DISPLACEMENT_Y": [-0.0011100000072540891], "NORMAL_CONTACT_STRESS": [-5.025357112781761], "DISPLACEMENT_X": [0.0016637079594078584]}, "NODE_2226": {"DISPLACEMENT_Y": [-0.015528863841709836], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.003514606598339931]}, "NODE_2184": {"DISPLACEMENT_Y": [-0.014909790038249958], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.003553269510269517]}, "NODE_1135": {"DISPLACEMENT_Y": [-0.005630000034380888], "NORMAL_CONTACT_STRESS": [-3.351980573513862], "DISPLACEMENT_X": [-0.0033579374179865244]}, "NODE_383": {"DISPLACEMENT_Y": [-0.02102586470995424], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003011480813986042]}, "NODE_195": {"DISPLACEMENT_Y": [-0.024127032670114897], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0025518863332892236]}, "NODE_325": {"DISPLACEMENT_Y": [-0.021913465151029713], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0028963563339778776]}, "NODE_2457": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1253": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_257": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_674": {"DISPLACEMENT_Y": [-0.016643169401843252], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003437128292989887]}, "NODE_2993": {"DISPLACEMENT_Y": [-0.024751115048773517], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002436195976697735]}, "NODE_696": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_219": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2371": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_744": {"DISPLACEMENT_Y": [-0.015528863841706951], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003514606598297149]}, "NODE_402": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2983": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2601": {"DISPLACEMENT_Y": [-0.020378460434064008], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0030885023606677478]}, "NODE_274": {"DISPLACEMENT_Y": [-0.022717440093961084], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0027815226655621326]}, "NODE_127": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2617": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2873": {"DISPLACEMENT_Y": [-0.02345177020082645], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0026668174997364156]}, "NODE_2708": {"DISPLACEMENT_Y": [-0.021627708000262452], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002934698962430452]}, "NODE_2894": {"DISPLACEMENT_Y": [-0.023682953323104373], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002628526665380232]}, "NODE_3068": {"DISPLACEMENT_Y": [-0.025691730446005978], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002239699935377664]}, "NODE_129": {"DISPLACEMENT_Y": [-0.025865718156911875], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0021994889672613135]}, "NODE_3089": {"DISPLACEMENT_Y": [-0.026035043714856158], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0021588953741990538]}, "NODE_2166": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_3094": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2055": {"DISPLACEMENT_Y": [-0.012693234162321798], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.003669805002313481]}, "NODE_944": {"DISPLACEMENT_Y": [-0.011894543867468133], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003704938721794156]}, "NODE_188": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2096": {"DISPLACEMENT_Y": [-0.013505745886847026], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0036306910840117382]}, "NODE_709": {"DISPLACEMENT_Y": [-0.01610471940735323], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0034758992139996146]}, "NODE_530": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1398": {"DISPLACEMENT_Y": [-0.0002799999998463842], "NORMAL_CONTACT_STRESS": [-5.257243743762246], "DISPLACEMENT_X": [-0.0008463513330418195]}, "NODE_905": {"DISPLACEMENT_Y": [-0.012693234162319995], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0036698050022706255]}, "NODE_3056": {"DISPLACEMENT_Y": [-0.02551307089343326], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002279535849782091]}, "NODE_985": {"DISPLACEMENT_Y": [-0.010984384413942377], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003740003114976315]}, "NODE_187": {"DISPLACEMENT_Y": [-0.024340434418055897], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002513433424105769]}, "NODE_523": {"DISPLACEMENT_Y": [-0.01891558248427201], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0032431915654555976]}, "NODE_3044": {"DISPLACEMENT_Y": [-0.0253297007788119], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.002319086208156916]}, "NODE_1099": {"DISPLACEMENT_Y": [-0.006950000122637361], "NORMAL_CONTACT_STRESS": [-2.674928296370001], "DISPLACEMENT_X": [-0.0035826419471807623]}, "NODE_2806": {"DISPLACEMENT_Y": [-0.02271744009396815], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0027815226656043865]}, "NODE_341": {"DISPLACEMENT_Y": [-0.02162770800025622], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.002934698962388059]}, "NODE_448": {"DISPLACEMENT_Y": [-0.020035468455948773], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003127126199198184]}, "NODE_297": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_3010": {"DISPLACEMENT_Y": [-0.024948848744672198], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0023974041153842687]}, "NODE_2916": {"DISPLACEMENT_Y": [-0.023907942166603385], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.00259024241499867]}, "NODE_3078": {"DISPLACEMENT_Y": [-0.025865718156922], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0021994889673029264]}, "NODE_167": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1819": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_1058": {"DISPLACEMENT_Y": [-0.008409999969621459], "NORMAL_CONTACT_STRESS": [-1.5857425951018054], "DISPLACEMENT_X": [-0.00372991841148169]}, "NODE_247": {"DISPLACEMENT_Y": [-0.023214003452270326], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0027050704599468883]}, "NODE_345": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_497": {"DISPLACEMENT_Y": [-0.01930532718806893], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.003204423255750509]}, "NODE_1785": {"DISPLACEMENT_Y": [-0.0044499999734943325], "NORMAL_CONTACT_STRESS": [-3.850224517631715], "DISPLACEMENT_X": [0.003081992958446552]}, "NODE_2756": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2627": {"DISPLACEMENT_Y": [-0.020708296573332455], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0030500130459091626]}, "NODE_2050": {"DISPLACEMENT_Y": [0.0], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0]}, "NODE_2303": {"DISPLACEMENT_Y": [-0.016643169401846618], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [0.0034371282930326275]}, "NODE_821": {"DISPLACEMENT_Y": [-0.014238937092897117], "NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_X": [-0.0035919734585809306]}} \ No newline at end of file diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test_parameters.json old mode 100644 new mode 100755 index 1da390b6b000..75a0d290e29e --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test_parameters.json @@ -84,7 +84,7 @@ "direction" : [0.0,-1.0,0.0] } }], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hertz_sphere_plate_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_patch_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_patch_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_patch_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_patch_test_parameters.json index 74f374e40f5a..0a8da1e762b9 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_patch_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_patch_test_parameters.json @@ -80,7 +80,7 @@ } ], "loads_process_list" : [], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_patch_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_patch_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_slope_patch_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_slope_patch_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_slope_patch_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_slope_patch_test_parameters.json index 36c77ccce07e..98722fbfa068 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_slope_patch_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_slope_patch_test_parameters.json @@ -103,7 +103,7 @@ "direction" : [0.0,-1.0,0.0] } }], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_slope_patch_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/hyper_simple_slope_patch_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_die_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_die_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_die_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_die_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_die_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_die_test_parameters.json old mode 100644 new mode 100755 index 90403429001a..bedc1be93505 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_die_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_die_test_parameters.json @@ -45,10 +45,10 @@ "rotation_dofs" : false }, "constraints_process_list" : [{ - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "DISPLACEMENT_bc_fix", @@ -57,10 +57,10 @@ "value" : [0.0,0.0,0.0] } },{ - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "DISPLACEMENT_bc_rolling_support", @@ -85,7 +85,7 @@ } }], "loads_process_list" : [], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_test_parameters.json index 7fe21ebce30f..b6a58bc6bc05 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/ironing_test_parameters.json @@ -44,10 +44,10 @@ "rotation_dofs" : false }, "constraints_process_list" : [{ - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "DISPLACEMENT_BC_fix", @@ -56,10 +56,10 @@ "value" : [0.0,0.0,0.0] } },{ - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "DISPLACEMENT_BC_rolling_x", @@ -98,7 +98,7 @@ "step_type" : "linear" } }], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test_parameters.json index 7f9a9c9a0600..f53d31462390 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test_parameters.json @@ -116,11 +116,11 @@ }], "loads_process_list" : [ { - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process sets a vector variable value over a condition", "check" : "DirectorVectorNonZero direction", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "CUSTOM", @@ -129,11 +129,11 @@ "value" : [0.0, "-1.0e3*t", 0.0] } },{ - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process sets a vector variable value over a condition", "check" : "DirectorVectorNonZero direction", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "CUSTOM", @@ -142,7 +142,7 @@ "value" : [0.0, -1.0e3, 0.0] } }], - "contact_processes" :[{ + "contact_process_list" :[{ "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", "help" : "This process computes the contact between different surfaces", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_matching_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test_parameters.json index 13ffb6ee9117..414db7e5ebfc 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test_parameters.json @@ -116,11 +116,11 @@ }], "loads_process_list" : [ { - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process sets a vector variable value over a condition", "check" : "DirectorVectorNonZero direction", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "CUSTOM", @@ -129,11 +129,11 @@ "value" : [0.0, "-1.0e3*t", 0.0] } },{ - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process sets a vector variable value over a condition", "check" : "DirectorVectorNonZero direction", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "CUSTOM", @@ -142,7 +142,7 @@ "value" : [0.0, -1.0e3, 0.0] } }], - "contact_processes" :[{ + "contact_process_list" :[{ "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", "help" : "This process computes the contact between different surfaces", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/mesh_moving_notmatching_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test_parameters.json old mode 100644 new mode 100755 index 88eabf7d07cd..786764f18ad3 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test_parameters.json @@ -72,11 +72,11 @@ } }], "loads_process_list" : [{ - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process sets a vector variable value over a condition", "check" : "DirectorVectorNonZero direction", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "LineLoad2D_bc_pressure", @@ -85,7 +85,7 @@ "value" : [0.0, "-1.3e0*t/0.5", 0.0] } }], - "contact_processes" :[{ + "contact_process_list" :[{ "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", "help" : "", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_hertz_sphere_plate_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_a_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_a_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_a_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_a_test_parameters.json index 0efa8f752da7..7ac9e33bd661 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_a_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_a_test_parameters.json @@ -80,7 +80,7 @@ } ], "loads_process_list" : [], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_a_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_a_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_b_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_b_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_b_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_b_test_parameters.json index e321d8fd90cf..f685d6f1f6a0 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_b_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_b_test_parameters.json @@ -80,7 +80,7 @@ } ], "loads_process_list" : [], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_b_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_notmatching_b_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_test_parameters.json index d09bcb46afae..5adb0b049442 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_test_parameters.json @@ -80,7 +80,7 @@ } ], "loads_process_list" : [], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_patch_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_slope_patch_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_slope_patch_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_slope_patch_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_slope_patch_test_parameters.json index 3a483f522bb9..c8422dda0bf2 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_slope_patch_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_slope_patch_test_parameters.json @@ -80,7 +80,7 @@ } ], "loads_process_list" : [], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_slope_patch_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/simple_slope_patch_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test_parameters.json old mode 100644 new mode 100755 index 2320bb18ee38..6e7916733925 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test_parameters.json @@ -13,10 +13,10 @@ "solver_type" : "Implicit", "echo_level" : 0, "solution_type" : "Dynamic", - "scheme_type" : "Bossak", - "damp_factor_m" : -0.1, - "rayleigh_alpha" : 8.0, - "rayleigh_beta" : 0.001, + "scheme_type" : "Bossak", + "damp_factor_m" : -0.1, + "rayleigh_alpha" : 8.0, + "rayleigh_beta" : 0.001, "analysis_type" : "Non-Linear", "model_import_settings" : { "input_type" : "mdpa", @@ -90,11 +90,11 @@ } }], "loads_process_list" : [{ - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process sets a vector variable value over a condition", "check" : "DirectorVectorNonZero direction", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "LineLoad2D_line_load", @@ -103,11 +103,11 @@ "value" : [0.0, "-1.0e-1*t", 0.0] } },{ - "python_module" : "assign_vector_to_condition_process", + "python_module" : "assign_vector_variable_to_conditions_process", "kratos_module" : "KratosMultiphysics", "help" : "This process sets a vector variable value over a condition", "check" : "DirectorVectorNonZero direction", - "process_name" : "AssignVectorToConditionProcess", + "process_name" : "AssignVectorVariableToConditionProcess", "Parameters" : { "mesh_id" : 0, "model_part_name" : "LineLoad2D_line_load", @@ -116,7 +116,7 @@ "value" : [0.0, -1.0e0, 0.0] } }], - "contact_processes" :[{ + "contact_process_list" :[{ "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", "help" : "", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_dynamic_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test_parameters.json index b9033bdd177c..1974f560fa6b 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test_parameters.json @@ -99,7 +99,7 @@ "direction" : [0.0,-1.0,0.0] } }], - "contact_processes" :[{ + "contact_process_list" :[{ "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", "help" : "", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_2D/taylor_patch_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_complex_geom_test.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_complex_geom_test.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_complex_geom_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_complex_geom_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_complex_geom_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_complex_geom_test_parameters.json index 9a92f9f0074f..71805d0ee6e1 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_complex_geom_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_complex_geom_test_parameters.json @@ -84,7 +84,7 @@ "interval" : [0.0,"End"] } }], - "contact_processes" : [{ + "contact_process_list" : [{ "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", "help" : "This process computes the contact between different surfaces", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_parameters.json old mode 100644 new mode 100755 index 0225b6267858..403550547728 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_parameters.json @@ -28,7 +28,7 @@ "block_builder" : false, "line_search" : false, "clear_storage" : true, - "reform_dofs_at_each_step" : true, + "reform_dofs_at_each_step" : true, "convergence_criterion" : "Contact_Residual_criterion", "displacement_relative_tolerance" : 0.0001, "displacement_absolute_tolerance" : 1e-9, @@ -123,18 +123,6 @@ "constrained" : [true,false,false], "value" : [0.0,0.0,0.0] } - },{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "mesh_id" : 0, - "model_part_name" : "SurfaceLoad3D_SurfaceLoad", - "variable_name" : "DISPLACEMENT", - "constrained" : [true,false,true], - "value" : [0.0,0.0,0.0] - } }], "loads_process_list" : [{ "python_module" : "assign_vector_by_direction_to_condition_process", @@ -150,7 +138,7 @@ } } ], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", @@ -159,15 +147,15 @@ "Parameters" : { "model_part_name" : "Structure", "contact_model_part" : "Contact_Part", - "assume_master_slave" : "Parts_Part_punch_Nodes", + "assume_master_slave" : "Parts_Part_punch", "contact_type" : "Frictionless", "search_factor" : 2.0, "max_number_results" : 1000, - "manual_ALM" : false, - "penalty" : 1.0e10, - "scale_factor" : 1.0e10, "type_search" : "InRadius", - "integration_order" : 2 + "integration_order" : 3, + "manual_ALM" : true, + "penalty" : 1.0e-6, + "scale_factor" : 1.0e0 } } ], diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_results.json old mode 100644 new mode 100755 index 2a0a9f850394..3ae490d42dc4 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_results.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_matching_test_results.json @@ -1 +1 @@ -{"NODE_167": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023114137916967455]}, "NODE_417": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023113499596515126]}, "NODE_254": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.002311388937959306]}, "NODE_321": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023114465381542425]}, "NODE_297": {"NORMAL_CONTACT_STRESS": [-5.771122475968713e-05], "DISPLACEMENT_Y": [-0.0023116014886240665]}, "NODE_278": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023113721400354953]}, "NODE_404": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023113389846761076]}, "NODE_337": {"NORMAL_CONTACT_STRESS": [-6.295265526570396e-05], "DISPLACEMENT_Y": [-0.0023113951404501497]}, "NODE_207": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.002311459451568338]}, "NODE_196": {"NORMAL_CONTACT_STRESS": [-5.771210157721945e-05], "DISPLACEMENT_Y": [-0.002311590190967247]}, "NODE_137": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.002311437859003225]}, "NODE_242": {"NORMAL_CONTACT_STRESS": [-5.7703066710392926e-05], "DISPLACEMENT_Y": [-0.002311735675610753]}, "NODE_353": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023114196910040217]}, "NODE_195": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.00231159018249722]}, "NODE_210": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.002311399522783989]}, "NODE_296": {"NORMAL_CONTACT_STRESS": [-5.770586235184772e-05], "DISPLACEMENT_Y": [-0.0023111770097722127]}, "NODE_285": {"NORMAL_CONTACT_STRESS": [-6.594720357527666e-05], "DISPLACEMENT_Y": [-0.002311372287221356]}, "NODE_333": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023111392524330534]}, "NODE_384": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023113231156058132]}, "NODE_371": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.002311182186418729]}, "NODE_243": {"NORMAL_CONTACT_STRESS": [-5.77083375901011e-05], "DISPLACEMENT_Y": [-0.0023114076742908776]}, "NODE_255": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.002311457991859078]}, "NODE_355": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.002311341634460936]}, "NODE_332": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.002311394998723946]}, "NODE_171": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023114546713985146]}, "NODE_292": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023111769653145486]}, "NODE_240": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023117355095366525]}, "NODE_338": {"NORMAL_CONTACT_STRESS": [-9.893604022224661e-05], "DISPLACEMENT_Y": [-0.002311139328218691]}, "NODE_372": {"NORMAL_CONTACT_STRESS": [-0.00011539296205312026], "DISPLACEMENT_Y": [-0.002311182378711277]}, "NODE_383": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023114037975070154]}, "NODE_290": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023116013150930384]}, "TIME": [1.1], "NODE_241": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023114076266934976]}, "NODE_405": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.0023113858930920166]}, "NODE_324": {"NORMAL_CONTACT_STRESS": [0.0], "DISPLACEMENT_Y": [-0.002311354775703309]}} \ No newline at end of file +{"NODE_297": {"DISPLACEMENT_Y": [-0.0020866410422354163], "NORMAL_CONTACT_STRESS": [-0.5213012402007104]}, "NODE_254": {"DISPLACEMENT_Y": [-0.0020864705014217453], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_240": {"DISPLACEMENT_Y": [-0.002086742185348417], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_355": {"DISPLACEMENT_Y": [-0.002086428029039115], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_137": {"DISPLACEMENT_Y": [-0.0020865114201559054], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_324": {"DISPLACEMENT_Y": [-0.002086445117249888], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_332": {"DISPLACEMENT_Y": [-0.0020864819359802866], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_171": {"DISPLACEMENT_Y": [-0.0020865239265513143], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_196": {"DISPLACEMENT_Y": [-0.002086638582670001], "NORMAL_CONTACT_STRESS": [-0.5213020425400263]}, "NODE_383": {"DISPLACEMENT_Y": [-0.0020864847893279277], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_417": {"DISPLACEMENT_Y": [-0.002086441187928953], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_285": {"DISPLACEMENT_Y": [-0.002086480871248357], "NORMAL_CONTACT_STRESS": [-0.521267224753875]}, "NODE_321": {"DISPLACEMENT_Y": [-0.0020865180427392656], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_210": {"DISPLACEMENT_Y": [-0.002086481915965459], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_241": {"DISPLACEMENT_Y": [-0.002086480710482017], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_333": {"DISPLACEMENT_Y": [-0.00208621752145129], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_337": {"DISPLACEMENT_Y": [-0.002086482036034587], "NORMAL_CONTACT_STRESS": [-0.5212668657629219]}, "NODE_292": {"DISPLACEMENT_Y": [-0.0020863211175082934], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_167": {"DISPLACEMENT_Y": [-0.002086491486273066], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_195": {"DISPLACEMENT_Y": [-0.0020866385714814945], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_255": {"DISPLACEMENT_Y": [-0.002086526887204358], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_384": {"DISPLACEMENT_Y": [-0.0020864212767434834], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_404": {"DISPLACEMENT_Y": [-0.0020864261738970744], "NORMAL_CONTACT_STRESS": [0.0]}, "TIME": [1.1], "NODE_296": {"DISPLACEMENT_Y": [-0.0020863211291263363], "NORMAL_CONTACT_STRESS": [-0.5212332209538342]}, "NODE_338": {"DISPLACEMENT_Y": [-0.0020862176310905995], "NORMAL_CONTACT_STRESS": [-0.5213019466201272]}, "NODE_372": {"DISPLACEMENT_Y": [-0.0020863209386944165], "NORMAL_CONTACT_STRESS": [-0.5212341240238514]}, "NODE_243": {"DISPLACEMENT_Y": [-0.0020864807435072913], "NORMAL_CONTACT_STRESS": [-0.521266914811344]}, "NODE_371": {"DISPLACEMENT_Y": [-0.0020863208164431392], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_405": {"DISPLACEMENT_Y": [-0.002086469475906505], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_207": {"DISPLACEMENT_Y": [-0.0020865290164792626], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_278": {"DISPLACEMENT_Y": [-0.0020864807619582234], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_290": {"DISPLACEMENT_Y": [-0.002086640921813748], "NORMAL_CONTACT_STRESS": [0.0]}, "NODE_242": {"DISPLACEMENT_Y": [-0.002086742293924337], "NORMAL_CONTACT_STRESS": [-0.5212339544135404]}, "NODE_353": {"DISPLACEMENT_Y": [-0.002086497579001259], "NORMAL_CONTACT_STRESS": [0.0]}} \ No newline at end of file diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test_parameters.json old mode 100644 new mode 100755 index 273df6ef3f09..b213eccd8deb --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test_parameters.json @@ -25,10 +25,10 @@ { "mortar_type" : "ALMContactFrictionless" }, - "block_builder" : true, + "block_builder" : false, "line_search" : false, "clear_storage" : true, - "reform_dofs_at_each_step" : true, + "reform_dofs_at_each_step" : true, "convergence_criterion" : "Contact_Residual_criterion", "displacement_relative_tolerance" : 0.0001, "displacement_absolute_tolerance" : 1e-9, @@ -36,7 +36,7 @@ "residual_absolute_tolerance" : 1e-9, "max_iteration" : 10, "linear_solver_settings" : { - "solver_type" : "SkylineLUFactorizationSolver" + "solver_type" : "SuperLUSolver" }, "problem_domain_sub_model_part_list" : ["Parts_Part_foundation","Parts_Part_punch"], "processes_sub_model_part_list" : ["Contact_Part","Parts_Part_foundation_Nodes", @@ -137,7 +137,7 @@ } } ], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", @@ -146,14 +146,14 @@ "Parameters" : { "model_part_name" : "Structure", "contact_model_part" : "Contact_Part", - "assume_master_slave" : "Parts_Part_punch_Nodes", + "assume_master_slave" : "Parts_Part_foundation", "contact_type" : "Frictionless", "search_factor" : 2.0, "max_number_results" : 1000, "type_search" : "InRadius", - "integration_order" : 2, - "manual_ALM" : true, - "penalty" : 1.0e0, + "integration_order" : 3, + "manual_ALM" : false, + "penalty" : 1.0e-6, "scale_factor" : 1.0e0 } } diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_nonmatching_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa.mdpa new file mode 100755 index 000000000000..2863068a590b --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa.mdpa @@ -0,0 +1,1388 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Nodes + 1 0.0000000000 1.0000000000 -0.2500000000 + 2 0.0000000000 1.0000000000 -0.1250000000 + 3 0.1250000000 1.0000000000 -0.2500000000 + 4 0.0000000000 0.8750000000 -0.2500000000 + 5 0.1250000000 0.8750000000 -0.2500000000 + 6 0.1250000000 1.0000000000 -0.1250000000 + 7 0.0000000000 0.8750000000 -0.1250000000 + 8 0.1250000000 0.8750000000 -0.1250000000 + 9 0.0000000000 1.0000000000 0.0000000000 + 10 0.2500000000 1.0000000000 -0.2500000000 + 11 0.0000000000 0.7500000000 -0.2500000000 + 12 0.2500000000 0.8750000000 -0.2500000000 + 13 0.1250000000 1.0000000000 0.0000000000 + 14 0.0000000000 0.8750000000 0.0000000000 + 15 0.2500000000 1.0000000000 -0.1250000000 + 16 0.0000000000 0.7500000000 -0.1250000000 + 17 0.1250000000 0.7500000000 -0.2500000000 + 18 0.1250000000 0.8750000000 0.0000000000 + 19 0.2500000000 0.8750000000 -0.1250000000 + 20 0.1250000000 0.7500000000 -0.1250000000 + 21 0.2500000000 1.0000000000 0.0000000000 + 22 0.0000000000 0.7500000000 0.0000000000 + 23 0.2500000000 0.7500000000 -0.2500000000 + 24 0.3750000000 1.0000000000 -0.2500000000 + 25 0.0000000000 0.6250000000 -0.2500000000 + 26 0.2500000000 0.8750000000 0.0000000000 + 27 0.2500000000 0.7500000000 -0.1250000000 + 28 0.1250000000 0.7500000000 0.0000000000 + 29 0.1250000000 0.6250000000 -0.2500000000 + 30 0.3750000000 1.0000000000 -0.1250000000 + 31 0.0000000000 0.6250000000 -0.1250000000 + 32 0.3750000000 0.8750000000 -0.2500000000 + 33 0.1250000000 0.6250000000 -0.1250000000 + 34 0.3750000000 0.8750000000 -0.1250000000 + 35 0.2500000000 0.7500000000 0.0000000000 + 36 0.2500000000 0.7500000000 0.0000000000 + 37 0.2500000000 0.6250000000 -0.2500000000 + 38 0.3750000000 1.0000000000 0.0000000000 + 39 0.0000000000 0.6250000000 0.0000000000 + 40 0.3750000000 0.7500000000 -0.2500000000 + 41 0.1250000000 0.6250000000 0.0000000000 + 42 0.2500000000 0.6250000000 -0.1250000000 + 43 0.3750000000 0.8750000000 0.0000000000 + 44 0.3750000000 0.7500000000 -0.1250000000 + 45 0.5000000000 1.0000000000 -0.2500000000 + 46 0.0000000000 0.5000000000 -0.2500000000 + 47 0.3750000000 0.7500000000 0.0000000000 + 48 0.2500000000 0.6250000000 0.0000000000 + 49 0.2500000000 0.7500000000 0.1250000000 + 50 0.2500000000 0.6250000000 0.0000000000 + 51 0.3750000000 0.7500000000 0.0000000000 + 52 0.5000000000 1.0000000000 -0.1250000000 + 53 0.0000000000 0.5000000000 -0.1250000000 + 54 0.1250000000 0.5000000000 -0.2500000000 + 55 0.5000000000 0.8750000000 -0.2500000000 + 56 0.3750000000 0.6250000000 -0.2500000000 + 57 0.1250000000 0.5000000000 -0.1250000000 + 58 0.5000000000 0.8750000000 -0.1250000000 + 59 0.3750000000 0.6250000000 -0.1250000000 + 60 0.5000000000 1.0000000000 0.0000000000 + 61 0.0000000000 0.5000000000 0.0000000000 + 62 0.2500000000 0.5000000000 -0.2500000000 + 63 0.5000000000 0.7500000000 -0.2500000000 + 64 0.1250000000 0.5000000000 0.0000000000 + 65 0.5000000000 0.8750000000 0.0000000000 + 66 0.2500000000 0.5000000000 -0.1250000000 + 67 0.5000000000 0.7500000000 -0.1250000000 + 68 0.3750000000 0.6250000000 0.0000000000 + 69 0.3750000000 0.7500000000 0.1250000000 + 70 0.2500000000 0.6250000000 0.1250000000 + 71 0.3750000000 0.6250000000 0.0000000000 + 72 0.5000000000 0.7500000000 0.0000000000 + 73 0.2500000000 0.5000000000 0.0000000000 + 74 0.2500000000 0.7500000000 0.2500000000 + 75 0.2500000000 0.5000000000 0.0000000000 + 76 0.5000000000 0.7500000000 0.0000000000 + 77 0.6250000000 1.0000000000 -0.2500000000 + 78 0.0000000000 0.3750000000 -0.2500000000 + 79 0.3750000000 0.5000000000 -0.2500000000 + 80 0.5000000000 0.6250000000 -0.2500000000 + 81 0.6250000000 1.0000000000 -0.1250000000 + 82 0.0000000000 0.3750000000 -0.1250000000 + 83 0.1250000000 0.3750000000 -0.2500000000 + 84 0.3750000000 0.5000000000 -0.1250000000 + 85 0.5000000000 0.6250000000 -0.1250000000 + 86 0.6250000000 0.8750000000 -0.2500000000 + 87 0.3750000000 0.6250000000 0.1250000000 + 88 0.1250000000 0.3750000000 -0.1250000000 + 89 0.6250000000 0.8750000000 -0.1250000000 + 90 0.6250000000 1.0000000000 0.0000000000 + 91 0.0000000000 0.3750000000 0.0000000000 + 92 0.3750000000 0.5000000000 0.0000000000 + 93 0.5000000000 0.6250000000 0.0000000000 + 94 0.5000000000 0.7500000000 0.1250000000 + 95 0.3750000000 0.7500000000 0.2500000000 + 96 0.2500000000 0.5000000000 0.1250000000 + 97 0.2500000000 0.6250000000 0.2500000000 + 98 0.2500000000 0.3750000000 -0.2500000000 + 99 0.3750000000 0.5000000000 0.0000000000 + 100 0.5000000000 0.6250000000 0.0000000000 + 101 0.6250000000 0.7500000000 -0.2500000000 + 102 0.1250000000 0.3750000000 0.0000000000 + 103 0.2500000000 0.3750000000 -0.1250000000 + 104 0.6250000000 0.8750000000 0.0000000000 + 105 0.6250000000 0.7500000000 -0.1250000000 + 106 0.5000000000 0.5000000000 -0.2500000000 + 107 0.6250000000 0.7500000000 0.0000000000 + 108 0.2500000000 0.3750000000 0.0000000000 + 109 0.2500000000 0.7500000000 0.3750000000 + 110 0.2500000000 0.3750000000 0.0000000000 + 111 0.5000000000 0.5000000000 -0.1250000000 + 112 0.6250000000 0.7500000000 0.0000000000 + 113 0.3750000000 0.3750000000 -0.2500000000 + 114 0.3750000000 0.5000000000 0.1250000000 + 115 0.5000000000 0.6250000000 0.1250000000 + 116 0.3750000000 0.6250000000 0.2500000000 + 117 0.6250000000 0.6250000000 -0.2500000000 + 118 0.3750000000 0.3750000000 -0.1250000000 + 119 0.6250000000 0.6250000000 -0.1250000000 + 120 0.5000000000 0.5000000000 0.0000000000 + 121 0.7500000000 1.0000000000 -0.2500000000 + 122 0.0000000000 0.2500000000 -0.2500000000 + 123 0.5000000000 0.5000000000 0.0000000000 + 124 0.5000000000 0.7500000000 0.2500000000 + 125 0.2500000000 0.5000000000 0.2500000000 + 126 0.7500000000 0.8750000000 -0.2500000000 + 127 0.7500000000 1.0000000000 -0.1250000000 + 128 0.0000000000 0.2500000000 -0.1250000000 + 129 0.1250000000 0.2500000000 -0.2500000000 + 130 0.3750000000 0.3750000000 0.0000000000 + 131 0.3750000000 0.3750000000 0.0000000000 + 132 0.6250000000 0.6250000000 0.0000000000 + 133 0.6250000000 0.7500000000 0.1250000000 + 134 0.3750000000 0.7500000000 0.3750000000 + 135 0.2500000000 0.3750000000 0.1250000000 + 136 0.2500000000 0.6250000000 0.3750000000 + 137 0.1250000000 0.2500000000 -0.1250000000 + 138 0.7500000000 0.8750000000 -0.1250000000 + 139 0.6250000000 0.6250000000 0.0000000000 + 140 0.7500000000 0.7500000000 -0.2500000000 + 141 0.7500000000 1.0000000000 0.0000000000 + 142 0.0000000000 0.2500000000 0.0000000000 + 143 0.2500000000 0.2500000000 -0.2500000000 + 144 0.7500000000 0.8750000000 0.0000000000 + 145 0.1250000000 0.2500000000 0.0000000000 + 146 0.5000000000 0.3750000000 -0.2500000000 + 147 0.5000000000 0.5000000000 0.1250000000 + 148 0.3750000000 0.5000000000 0.2500000000 + 149 0.2500000000 0.2500000000 -0.1250000000 + 150 0.7500000000 0.7500000000 -0.1250000000 + 151 0.5000000000 0.6250000000 0.2500000000 + 152 0.6250000000 0.5000000000 -0.2500000000 + 153 0.5000000000 0.3750000000 -0.1250000000 + 154 0.6250000000 0.5000000000 -0.1250000000 + 155 0.3750000000 0.3750000000 0.1250000000 + 156 0.6250000000 0.6250000000 0.1250000000 + 157 0.3750000000 0.6250000000 0.3750000000 + 158 0.7500000000 0.7500000000 0.0000000000 + 159 0.2500000000 0.2500000000 0.0000000000 + 160 0.7500000000 0.7500000000 0.0000000000 + 161 0.2500000000 0.7500000000 0.5000000000 + 162 0.2500000000 0.2500000000 0.0000000000 + 163 0.6250000000 0.5000000000 0.0000000000 + 164 0.7500000000 0.6250000000 -0.2500000000 + 165 0.5000000000 0.3750000000 0.0000000000 + 166 0.5000000000 0.3750000000 0.0000000000 + 167 0.6250000000 0.7500000000 0.2500000000 + 168 0.5000000000 0.7500000000 0.3750000000 + 169 0.2500000000 0.3750000000 0.2500000000 + 170 0.2500000000 0.5000000000 0.3750000000 + 171 0.3750000000 0.2500000000 -0.2500000000 + 172 0.6250000000 0.5000000000 0.0000000000 + 173 0.3750000000 0.2500000000 -0.1250000000 + 174 0.7500000000 0.6250000000 -0.1250000000 + 175 0.5000000000 0.5000000000 0.2500000000 + 176 0.7500000000 0.6250000000 0.0000000000 + 177 0.3750000000 0.2500000000 0.0000000000 + 178 0.7500000000 0.6250000000 0.0000000000 + 179 0.2500000000 0.2500000000 0.1250000000 + 180 0.7500000000 0.7500000000 0.1250000000 + 181 0.3750000000 0.7500000000 0.5000000000 + 182 0.2500000000 0.6250000000 0.5000000000 + 183 0.8750000000 1.0000000000 -0.2500000000 + 184 0.0000000000 0.1250000000 -0.2500000000 + 185 0.3750000000 0.2500000000 0.0000000000 + 186 0.8750000000 1.0000000000 -0.1250000000 + 187 0.0000000000 0.1250000000 -0.1250000000 + 188 0.1250000000 0.1250000000 -0.2500000000 + 189 0.5000000000 0.3750000000 0.1250000000 + 190 0.3750000000 0.3750000000 0.2500000000 + 191 0.6250000000 0.5000000000 0.1250000000 + 192 0.3750000000 0.5000000000 0.3750000000 + 193 0.6250000000 0.6250000000 0.2500000000 + 194 0.5000000000 0.6250000000 0.3750000000 + 195 0.6250000000 0.3750000000 -0.2500000000 + 196 0.8750000000 0.8750000000 -0.2500000000 + 197 0.1250000000 0.1250000000 -0.1250000000 + 198 0.8750000000 0.8750000000 -0.1250000000 + 199 0.6250000000 0.3750000000 -0.1250000000 + 200 0.7500000000 0.5000000000 -0.2500000000 + 201 0.5000000000 0.2500000000 -0.2500000000 + 202 0.8750000000 1.0000000000 0.0000000000 + 203 0.0000000000 0.1250000000 0.0000000000 + 204 0.2500000000 0.1250000000 -0.2500000000 + 205 0.5000000000 0.2500000000 -0.1250000000 + 206 0.7500000000 0.5000000000 -0.1250000000 + 207 0.8750000000 0.7500000000 -0.2500000000 + 208 0.1250000000 0.1250000000 0.0000000000 + 209 0.3750000000 0.2500000000 0.1250000000 + 210 0.7500000000 0.6250000000 0.1250000000 + 211 0.6250000000 0.7500000000 0.3750000000 + 212 0.2500000000 0.3750000000 0.3750000000 + 213 0.2500000000 0.1250000000 -0.1250000000 + 214 0.8750000000 0.7500000000 -0.1250000000 + 215 0.3750000000 0.6250000000 0.5000000000 + 216 0.6250000000 0.3750000000 0.0000000000 + 217 0.8750000000 0.8750000000 0.0000000000 + 218 0.6250000000 0.3750000000 0.0000000000 + 219 0.7500000000 0.5000000000 0.0000000000 + 220 0.5000000000 0.2500000000 0.0000000000 + 221 0.7500000000 0.5000000000 0.0000000000 + 222 0.2500000000 0.2500000000 0.2500000000 + 223 0.7500000000 0.7500000000 0.2500000000 + 224 0.5000000000 0.7500000000 0.5000000000 + 225 0.2500000000 0.5000000000 0.5000000000 + 226 0.5000000000 0.2500000000 0.0000000000 + 227 0.2500000000 0.1250000000 0.0000000000 + 228 0.5000000000 0.3750000000 0.2500000000 + 229 0.6250000000 0.5000000000 0.2500000000 + 230 0.5000000000 0.5000000000 0.3750000000 + 231 0.8750000000 0.7500000000 0.0000000000 + 232 0.3750000000 0.1250000000 -0.2500000000 + 233 0.8750000000 0.6250000000 -0.2500000000 + 234 0.6250000000 0.3750000000 0.1250000000 + 235 0.3750000000 0.3750000000 0.3750000000 + 236 0.6250000000 0.6250000000 0.3750000000 + 237 0.3750000000 0.1250000000 -0.1250000000 + 238 0.8750000000 0.6250000000 -0.1250000000 + 239 0.7500000000 0.3750000000 -0.2500000000 + 240 0.5000000000 0.2500000000 0.1250000000 + 241 0.3750000000 0.2500000000 0.2500000000 + 242 0.7500000000 0.5000000000 0.1250000000 + 243 0.7500000000 0.6250000000 0.2500000000 + 244 0.3750000000 0.5000000000 0.5000000000 + 245 0.5000000000 0.6250000000 0.5000000000 + 246 0.6250000000 0.2500000000 -0.2500000000 + 247 0.3750000000 0.1250000000 0.0000000000 + 248 0.8750000000 0.6250000000 0.0000000000 + 249 0.7500000000 0.3750000000 -0.1250000000 + 250 0.6250000000 0.2500000000 -0.1250000000 + 251 0.0000000000 0.0000000000 -0.2500000000 + 252 1.0000000000 1.0000000000 -0.2500000000 + 253 0.6250000000 0.2500000000 0.0000000000 + 254 0.7500000000 0.3750000000 0.0000000000 + 255 0.2500000000 0.2500000000 0.3750000000 + 256 0.7500000000 0.7500000000 0.3750000000 + 257 0.6250000000 0.7500000000 0.5000000000 + 258 0.2500000000 0.3750000000 0.5000000000 + 259 0.1250000000 0.0000000000 -0.2500000000 + 260 0.0000000000 0.0000000000 -0.1250000000 + 261 1.0000000000 1.0000000000 -0.1250000000 + 262 1.0000000000 0.8750000000 -0.2500000000 + 263 0.7500000000 0.3750000000 0.0000000000 + 264 0.5000000000 0.1250000000 -0.2500000000 + 265 0.6250000000 0.2500000000 0.0000000000 + 266 0.8750000000 0.5000000000 -0.2500000000 + 267 0.1250000000 0.0000000000 -0.1250000000 + 268 1.0000000000 0.8750000000 -0.1250000000 + 269 0.6250000000 0.3750000000 0.2500000000 + 270 0.5000000000 0.3750000000 0.3750000000 + 271 0.6250000000 0.5000000000 0.3750000000 + 272 0.5000000000 0.1250000000 -0.1250000000 + 273 0.8750000000 0.5000000000 -0.1250000000 + 274 0.0000000000 0.0000000000 0.0000000000 + 275 1.0000000000 1.0000000000 0.0000000000 + 276 0.2500000000 0.0000000000 -0.2500000000 + 277 1.0000000000 0.7500000000 -0.2500000000 + 278 0.5000000000 0.2500000000 0.2500000000 + 279 0.7500000000 0.5000000000 0.2500000000 + 280 0.5000000000 0.5000000000 0.5000000000 + 281 0.1250000000 0.0000000000 0.0000000000 + 282 1.0000000000 0.8750000000 0.0000000000 + 283 0.5000000000 0.1250000000 0.0000000000 + 284 0.2500000000 0.0000000000 -0.1250000000 + 285 1.0000000000 0.7500000000 -0.1250000000 + 286 0.8750000000 0.5000000000 0.0000000000 + 287 0.6250000000 0.2500000000 0.1250000000 + 288 0.3750000000 0.2500000000 0.3750000000 + 289 0.7500000000 0.3750000000 0.1250000000 + 290 0.7500000000 0.6250000000 0.3750000000 + 291 0.3750000000 0.3750000000 0.5000000000 + 292 0.6250000000 0.6250000000 0.5000000000 + 293 0.2500000000 0.0000000000 0.0000000000 + 294 1.0000000000 0.7500000000 0.0000000000 + 295 0.7500000000 0.2500000000 -0.2500000000 + 296 0.3750000000 0.0000000000 -0.2500000000 + 297 1.0000000000 0.6250000000 -0.2500000000 + 298 0.7500000000 0.2500000000 -0.1250000000 + 299 0.3750000000 0.0000000000 -0.1250000000 + 300 1.0000000000 0.6250000000 -0.1250000000 + 301 0.6250000000 0.1250000000 -0.2500000000 + 302 0.8750000000 0.3750000000 -0.2500000000 + 303 0.6250000000 0.3750000000 0.3750000000 + 304 0.8750000000 0.3750000000 -0.1250000000 + 305 0.6250000000 0.1250000000 -0.1250000000 + 306 0.7500000000 0.2500000000 0.0000000000 + 307 0.2500000000 0.2500000000 0.5000000000 + 308 0.7500000000 0.7500000000 0.5000000000 + 309 0.7500000000 0.2500000000 0.0000000000 + 310 0.3750000000 0.0000000000 0.0000000000 + 311 1.0000000000 0.6250000000 0.0000000000 + 312 0.6250000000 0.2500000000 0.2500000000 + 313 0.5000000000 0.2500000000 0.3750000000 + 314 0.7500000000 0.3750000000 0.2500000000 + 315 0.7500000000 0.5000000000 0.3750000000 + 316 0.5000000000 0.3750000000 0.5000000000 + 317 0.6250000000 0.5000000000 0.5000000000 + 318 0.6250000000 0.1250000000 0.0000000000 + 319 0.8750000000 0.3750000000 0.0000000000 + 320 0.5000000000 0.0000000000 -0.2500000000 + 321 1.0000000000 0.5000000000 -0.2500000000 + 322 0.7500000000 0.2500000000 0.1250000000 + 323 0.3750000000 0.2500000000 0.5000000000 + 324 0.7500000000 0.6250000000 0.5000000000 + 325 0.5000000000 0.0000000000 -0.1250000000 + 326 1.0000000000 0.5000000000 -0.1250000000 + 327 0.5000000000 0.0000000000 0.0000000000 + 328 1.0000000000 0.5000000000 0.0000000000 + 329 0.7500000000 0.1250000000 -0.2500000000 + 330 0.8750000000 0.2500000000 -0.2500000000 + 331 0.7500000000 0.1250000000 -0.1250000000 + 332 0.6250000000 0.2500000000 0.3750000000 + 333 0.7500000000 0.3750000000 0.3750000000 + 334 0.8750000000 0.2500000000 -0.1250000000 + 335 0.6250000000 0.3750000000 0.5000000000 + 336 0.7500000000 0.2500000000 0.2500000000 + 337 0.5000000000 0.2500000000 0.5000000000 + 338 0.7500000000 0.5000000000 0.5000000000 + 339 0.7500000000 0.1250000000 0.0000000000 + 340 0.6250000000 0.0000000000 -0.2500000000 + 341 1.0000000000 0.3750000000 -0.2500000000 + 342 0.8750000000 0.2500000000 0.0000000000 + 343 0.6250000000 0.0000000000 -0.1250000000 + 344 1.0000000000 0.3750000000 -0.1250000000 + 345 0.6250000000 0.0000000000 0.0000000000 + 346 1.0000000000 0.3750000000 0.0000000000 + 347 0.7500000000 0.2500000000 0.3750000000 + 348 0.6250000000 0.2500000000 0.5000000000 + 349 0.7500000000 0.3750000000 0.5000000000 + 350 0.8750000000 0.1250000000 -0.2500000000 + 351 0.8750000000 0.1250000000 -0.1250000000 + 352 0.7500000000 0.0000000000 -0.2500000000 + 353 1.0000000000 0.2500000000 -0.2500000000 + 354 0.7500000000 0.0000000000 -0.1250000000 + 355 1.0000000000 0.2500000000 -0.1250000000 + 356 0.8750000000 0.1250000000 0.0000000000 + 357 0.7500000000 0.0000000000 0.0000000000 + 358 1.0000000000 0.2500000000 0.0000000000 + 359 0.7500000000 0.2500000000 0.5000000000 + 360 0.8750000000 0.0000000000 -0.2500000000 + 361 1.0000000000 0.1250000000 -0.2500000000 + 362 0.8750000000 0.0000000000 -0.1250000000 + 363 1.0000000000 0.1250000000 -0.1250000000 + 364 0.8750000000 0.0000000000 0.0000000000 + 365 1.0000000000 0.1250000000 0.0000000000 + 366 1.0000000000 0.0000000000 -0.2500000000 + 367 1.0000000000 0.0000000000 -0.1250000000 + 368 1.0000000000 0.0000000000 0.0000000000 +End Nodes + + +Begin Elements UpdatedLagrangianElement3D8N// GUI group identifier: Parts Auto1 + 1 0 155 135 108 131 209 179 159 177 + 2 0 189 155 131 166 240 209 177 220 + 3 0 234 189 166 218 287 240 220 253 + 4 0 289 234 218 254 322 287 253 306 + 5 0 190 169 135 155 241 222 179 209 + 6 0 228 190 155 189 278 241 209 240 + 7 0 269 228 189 234 312 278 240 287 + 8 0 314 269 234 289 336 312 287 322 + 9 0 235 212 169 190 288 255 222 241 + 10 0 270 235 190 228 313 288 241 278 + 11 0 303 270 228 269 332 313 278 312 + 12 0 333 303 269 314 347 332 312 336 + 13 0 291 258 212 235 323 307 255 288 + 14 0 316 291 235 270 337 323 288 313 + 15 0 335 316 270 303 348 337 313 332 + 16 0 349 335 303 333 359 348 332 347 + 17 0 114 96 73 99 155 135 108 131 + 18 0 147 114 99 120 189 155 131 166 + 19 0 191 147 120 163 234 189 166 218 + 20 0 242 191 163 221 289 234 218 254 + 21 0 148 125 96 114 190 169 135 155 + 22 0 175 148 114 147 228 190 155 189 + 23 0 229 175 147 191 269 228 189 234 + 24 0 279 229 191 242 314 269 234 289 + 25 0 192 170 125 148 235 212 169 190 + 26 0 230 192 148 175 270 235 190 228 + 27 0 271 230 175 229 303 270 228 269 + 28 0 315 271 229 279 333 303 269 314 + 29 0 244 225 170 192 291 258 212 235 + 30 0 280 244 192 230 316 291 235 270 + 31 0 317 280 230 271 335 316 270 303 + 32 0 338 317 271 315 349 335 303 333 + 33 0 87 70 48 71 114 96 73 99 + 34 0 115 87 71 100 147 114 99 120 + 35 0 156 115 100 132 191 147 120 163 + 36 0 210 156 132 178 242 191 163 221 + 37 0 116 97 70 87 148 125 96 114 + 38 0 151 116 87 115 175 148 114 147 + 39 0 193 151 115 156 229 175 147 191 + 40 0 243 193 156 210 279 229 191 242 + 41 0 157 136 97 116 192 170 125 148 + 42 0 194 157 116 151 230 192 148 175 + 43 0 236 194 151 193 271 230 175 229 + 44 0 290 236 193 243 315 271 229 279 + 45 0 215 182 136 157 244 225 170 192 + 46 0 245 215 157 194 280 244 192 230 + 47 0 292 245 194 236 317 280 230 271 + 48 0 324 292 236 290 338 317 271 315 + 49 0 69 49 35 47 87 70 48 71 + 50 0 94 69 47 72 115 87 71 100 + 51 0 133 94 72 107 156 115 100 132 + 52 0 180 133 107 160 210 156 132 178 + 53 0 95 74 49 69 116 97 70 87 + 54 0 124 95 69 94 151 116 87 115 + 55 0 167 124 94 133 193 151 115 156 + 56 0 223 167 133 180 243 193 156 210 + 57 0 134 109 74 95 157 136 97 116 + 58 0 168 134 95 124 194 157 116 151 + 59 0 211 168 124 167 236 194 151 193 + 60 0 256 211 167 223 290 236 193 243 + 61 0 181 161 109 134 215 182 136 157 + 62 0 224 181 134 168 245 215 157 194 + 63 0 257 224 168 211 292 245 194 236 + 64 0 308 257 211 256 324 292 236 290 +End Elements + +Begin Elements UpdatedLagrangianElement3D8N// GUI group identifier: Parts Auto2 + 65 0 351 363 365 356 362 367 368 364 + 66 0 331 351 356 339 354 362 364 357 + 67 0 305 331 339 318 343 354 357 345 + 68 0 272 305 318 283 325 343 345 327 + 69 0 237 272 283 247 299 325 327 310 + 70 0 213 237 247 227 284 299 310 293 + 71 0 197 213 227 208 267 284 293 281 + 72 0 187 197 208 203 260 267 281 274 + 73 0 350 361 363 351 360 366 367 362 + 74 0 329 350 351 331 352 360 362 354 + 75 0 301 329 331 305 340 352 354 343 + 76 0 264 301 305 272 320 340 343 325 + 77 0 232 264 272 237 296 320 325 299 + 78 0 204 232 237 213 276 296 299 284 + 79 0 188 204 213 197 259 276 284 267 + 80 0 184 188 197 187 251 259 267 260 + 81 0 334 355 358 342 351 363 365 356 + 82 0 298 334 342 309 331 351 356 339 + 83 0 250 298 309 265 305 331 339 318 + 84 0 205 250 265 226 272 305 318 283 + 85 0 173 205 226 185 237 272 283 247 + 86 0 149 173 185 162 213 237 247 227 + 87 0 137 149 162 145 197 213 227 208 + 88 0 128 137 145 142 187 197 208 203 + 89 0 330 353 355 334 350 361 363 351 + 90 0 295 330 334 298 329 350 351 331 + 91 0 246 295 298 250 301 329 331 305 + 92 0 201 246 250 205 264 301 305 272 + 93 0 171 201 205 173 232 264 272 237 + 94 0 143 171 173 149 204 232 237 213 + 95 0 129 143 149 137 188 204 213 197 + 96 0 122 129 137 128 184 188 197 187 + 97 0 304 344 346 319 334 355 358 342 + 98 0 249 304 319 263 298 334 342 309 + 99 0 199 249 263 216 250 298 309 265 + 100 0 153 199 216 165 205 250 265 226 + 101 0 118 153 165 130 173 205 226 185 + 102 0 103 118 130 110 149 173 185 162 + 103 0 88 103 110 102 137 149 162 145 + 104 0 82 88 102 91 128 137 145 142 + 105 0 302 341 344 304 330 353 355 334 + 106 0 239 302 304 249 295 330 334 298 + 107 0 195 239 249 199 246 295 298 250 + 108 0 146 195 199 153 201 246 250 205 + 109 0 113 146 153 118 171 201 205 173 + 110 0 98 113 118 103 143 171 173 149 + 111 0 83 98 103 88 129 143 149 137 + 112 0 78 83 88 82 122 129 137 128 + 113 0 273 326 328 286 304 344 346 319 + 114 0 206 273 286 219 249 304 319 263 + 115 0 154 206 219 172 199 249 263 216 + 116 0 111 154 172 123 153 199 216 165 + 117 0 84 111 123 92 118 153 165 130 + 118 0 66 84 92 75 103 118 130 110 + 119 0 57 66 75 64 88 103 110 102 + 120 0 53 57 64 61 82 88 102 91 + 121 0 266 321 326 273 302 341 344 304 + 122 0 200 266 273 206 239 302 304 249 + 123 0 152 200 206 154 195 239 249 199 + 124 0 106 152 154 111 146 195 199 153 + 125 0 79 106 111 84 113 146 153 118 + 126 0 62 79 84 66 98 113 118 103 + 127 0 54 62 66 57 83 98 103 88 + 128 0 46 54 57 53 78 83 88 82 + 129 0 238 300 311 248 273 326 328 286 + 130 0 174 238 248 176 206 273 286 219 + 131 0 119 174 176 139 154 206 219 172 + 132 0 85 119 139 93 111 154 172 123 + 133 0 59 85 93 68 84 111 123 92 + 134 0 42 59 68 50 66 84 92 75 + 135 0 33 42 50 41 57 66 75 64 + 136 0 31 33 41 39 53 57 64 61 + 137 0 233 297 300 238 266 321 326 273 + 138 0 164 233 238 174 200 266 273 206 + 139 0 117 164 174 119 152 200 206 154 + 140 0 80 117 119 85 106 152 154 111 + 141 0 56 80 85 59 79 106 111 84 + 142 0 37 56 59 42 62 79 84 66 + 143 0 29 37 42 33 54 62 66 57 + 144 0 25 29 33 31 46 54 57 53 + 145 0 214 285 294 231 238 300 311 248 + 146 0 150 214 231 158 174 238 248 176 + 147 0 105 150 158 112 119 174 176 139 + 148 0 67 105 112 76 85 119 139 93 + 149 0 44 67 76 51 59 85 93 68 + 150 0 27 44 51 36 42 59 68 50 + 151 0 20 27 36 28 33 42 50 41 + 152 0 16 20 28 22 31 33 41 39 + 153 0 207 277 285 214 233 297 300 238 + 154 0 140 207 214 150 164 233 238 174 + 155 0 101 140 150 105 117 164 174 119 + 156 0 63 101 105 67 80 117 119 85 + 157 0 40 63 67 44 56 80 85 59 + 158 0 23 40 44 27 37 56 59 42 + 159 0 17 23 27 20 29 37 42 33 + 160 0 11 17 20 16 25 29 33 31 + 161 0 198 268 282 217 214 285 294 231 + 162 0 138 198 217 144 150 214 231 158 + 163 0 89 138 144 104 105 150 158 112 + 164 0 58 89 104 65 67 105 112 76 + 165 0 34 58 65 43 44 67 76 51 + 166 0 19 34 43 26 27 44 51 36 + 167 0 8 19 26 18 20 27 36 28 + 168 0 7 8 18 14 16 20 28 22 + 169 0 196 262 268 198 207 277 285 214 + 170 0 126 196 198 138 140 207 214 150 + 171 0 86 126 138 89 101 140 150 105 + 172 0 55 86 89 58 63 101 105 67 + 173 0 32 55 58 34 40 63 67 44 + 174 0 12 32 34 19 23 40 44 27 + 175 0 5 12 19 8 17 23 27 20 + 176 0 4 5 8 7 11 17 20 16 + 177 0 186 261 275 202 198 268 282 217 + 178 0 127 186 202 141 138 198 217 144 + 179 0 81 127 141 90 89 138 144 104 + 180 0 52 81 90 60 58 89 104 65 + 181 0 30 52 60 38 34 58 65 43 + 182 0 15 30 38 21 19 34 43 26 + 183 0 6 15 21 13 8 19 26 18 + 184 0 2 6 13 9 7 8 18 14 + 185 0 183 252 261 186 196 262 268 198 + 186 0 121 183 186 127 126 196 198 138 + 187 0 77 121 127 81 86 126 138 89 + 188 0 45 77 81 52 55 86 89 58 + 189 0 24 45 52 30 32 55 58 34 + 190 0 10 24 30 15 12 32 34 19 + 191 0 3 10 15 6 5 12 19 8 + 192 0 1 3 6 2 4 5 8 7 +End Elements + +Begin SubModelPart Parts_Parts_Auto1 // Group Parts Auto1 // Subtree Parts + Begin SubModelPartNodes + 35 + 47 + 48 + 49 + 69 + 70 + 71 + 72 + 73 + 74 + 87 + 94 + 95 + 96 + 97 + 99 + 100 + 107 + 108 + 109 + 114 + 115 + 116 + 120 + 124 + 125 + 131 + 132 + 133 + 134 + 135 + 136 + 147 + 148 + 151 + 155 + 156 + 157 + 159 + 160 + 161 + 163 + 166 + 167 + 168 + 169 + 170 + 175 + 177 + 178 + 179 + 180 + 181 + 182 + 189 + 190 + 191 + 192 + 193 + 194 + 209 + 210 + 211 + 212 + 215 + 218 + 220 + 221 + 222 + 223 + 224 + 225 + 228 + 229 + 230 + 234 + 235 + 236 + 240 + 241 + 242 + 243 + 244 + 245 + 253 + 254 + 255 + 256 + 257 + 258 + 269 + 270 + 271 + 278 + 279 + 280 + 287 + 288 + 289 + 290 + 291 + 292 + 303 + 306 + 307 + 308 + 312 + 313 + 314 + 315 + 316 + 317 + 322 + 323 + 324 + 332 + 333 + 335 + 336 + 337 + 338 + 347 + 348 + 349 + 359 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart Parts_Parts_Auto2 // Group Parts Auto2 // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 88 + 89 + 90 + 91 + 92 + 93 + 98 + 101 + 102 + 103 + 104 + 105 + 106 + 110 + 111 + 112 + 113 + 117 + 118 + 119 + 121 + 122 + 123 + 126 + 127 + 128 + 129 + 130 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 149 + 150 + 152 + 153 + 154 + 158 + 162 + 164 + 165 + 171 + 172 + 173 + 174 + 176 + 183 + 184 + 185 + 186 + 187 + 188 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 213 + 214 + 216 + 217 + 219 + 226 + 227 + 231 + 232 + 233 + 237 + 238 + 239 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 272 + 273 + 274 + 275 + 276 + 277 + 281 + 282 + 283 + 284 + 285 + 286 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 304 + 305 + 309 + 310 + 311 + 318 + 319 + 320 + 321 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 334 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + End SubModelPartNodes + Begin SubModelPartElements + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto1 // Group Displacement Auto1 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 3 + 4 + 5 + 10 + 11 + 12 + 17 + 23 + 24 + 25 + 29 + 32 + 37 + 40 + 45 + 46 + 54 + 55 + 56 + 62 + 63 + 77 + 78 + 79 + 80 + 83 + 86 + 98 + 101 + 106 + 113 + 117 + 121 + 122 + 126 + 129 + 140 + 143 + 146 + 152 + 164 + 171 + 183 + 184 + 188 + 195 + 196 + 200 + 201 + 204 + 207 + 232 + 233 + 239 + 246 + 251 + 252 + 259 + 262 + 264 + 266 + 276 + 277 + 295 + 296 + 297 + 301 + 302 + 320 + 321 + 329 + 330 + 340 + 341 + 350 + 352 + 353 + 360 + 361 + 366 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto2 // Group Displacement Auto2 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 161 + 181 + 182 + 215 + 224 + 225 + 244 + 245 + 257 + 258 + 280 + 291 + 292 + 307 + 308 + 316 + 317 + 323 + 324 + 335 + 337 + 338 + 348 + 349 + 359 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart Contact_Part // Group CONTACT + Begin SubModelPartNodes + 9 + 13 + 14 + 18 + 21 + 22 + 26 + 28 + 35 + 36 + 38 + 39 + 41 + 43 + 47 + 48 + 50 + 51 + 60 + 61 + 64 + 65 + 68 + 71 + 72 + 73 + 75 + 76 + 90 + 91 + 92 + 93 + 99 + 100 + 102 + 104 + 107 + 108 + 110 + 112 + 120 + 123 + 130 + 131 + 132 + 139 + 141 + 142 + 144 + 145 + 158 + 159 + 160 + 162 + 163 + 165 + 166 + 172 + 176 + 177 + 178 + 185 + 202 + 203 + 208 + 216 + 217 + 218 + 219 + 220 + 221 + 226 + 227 + 231 + 247 + 248 + 253 + 254 + 263 + 265 + 274 + 275 + 281 + 282 + 283 + 286 + 293 + 294 + 306 + 309 + 310 + 311 + 318 + 319 + 327 + 328 + 339 + 342 + 345 + 346 + 356 + 357 + 358 + 364 + 365 + 368 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa_parameters.json new file mode 100755 index 000000000000..a7a42ae118ca --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa_parameters.json @@ -0,0 +1,152 @@ +{ + "problem_data" : { + "problem_name" : "3D_contact_patch_test_large_disp_hexa", + "model_part_name" : "Structure", + "domain_size" : 3, + "parallel_type" : "OpenMP", + "time_step" : 0.05, + "start_time" : 0.0, + "end_time" : 0.85, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "Static", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Non-Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa", + "input_file_label" : 0 + }, + "material_import_settings" : { + "materials_filename" : "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_materials.json" + }, + "contact_settings": + { + "mortar_type" : "ALMContactFrictionless" + }, + "line_search" : false, + "convergence_criterion" : "Contact_Mixed_criterion", + "displacement_relative_tolerance" : 0.0001, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 30, + "problem_domain_sub_model_part_list" : ["Parts_Parts_Auto1","Parts_Parts_Auto2"], + "processes_sub_model_part_list" : ["Parts_Parts_Auto1","Parts_Parts_Auto2","DISPLACEMENT_Displacement_Auto1","DISPLACEMENT_Displacement_Auto2","Contact_Part"], + "linear_solver_settings" : { + "solver_type" : "SuperLUSolver", + "scaling" : false + } + }, + "constraints_process_list" : [{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_Displacement_Auto1", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,0.0,0.0], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_Displacement_Auto2", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,0.0,"-2.0e-1*t"], + "interval" : [0.0,"End"] + } + }], + "loads_process_list" : [], + "contact_process_list" :[ + { + "python_module" : "alm_contact_process", + "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", + "help" : "", + "process_name" : "ALMContactProcess", + "Parameters" : { + "model_part_name" : "Structure", + "contact_model_part" : "Contact_Part", + "assume_master_slave" : "Parts_Parts_Auto1", + "contact_type" : "Frictionless", + "search_factor" : 1.0, + "max_number_results" : 1000, + "manual_ALM" : true, + "penalty" : 1.0e-6, + "scale_factor" : 1.0e0, + "type_search" : "InRadius", + "integration_order" : 3 + } + } + ], + "_output_configuration" : { + "result_file_configuration" : { + "gidpost_flags" : { + "GiDPostMode" : "GiD_PostBinary", + "WriteDeformedMeshFlag" : "WriteDeformed", + "MultiFileFlag" : "SingleFile" + }, + "file_label" : "step", + "output_control_type" : "step", + "output_frequency" : 1.0, + "body_output" : true, + "node_output" : false, + "skin_output" : false, + "plane_output" : [], + "nodal_results" : ["DISPLACEMENT","REACTION","NORMAL_CONTACT_STRESS","WEIGHTED_GAP"], + "nodal_nonhistorical_results": ["NORMAL"], + "nodal_flags_results": ["ACTIVE","SLAVE"], + "gauss_point_results" : ["VON_MISES_STRESS","CAUCHY_STRESS_TENSOR"] + }, + "point_data_configuration" : [] + }, + "json_check_process" : [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Z","NORMAL_CONTACT_STRESS"], + "input_file_name" : "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa_results.json", + "model_part_name" : "Contact_Part", + "time_frequency" : 1.0 + } + } + ], + "_json_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Z","NORMAL_CONTACT_STRESS"], + "output_file_name" : "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa_results.json", + "model_part_name" : "Contact_Part", + "time_frequency" : 1.0 + } + } + ], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "material_import_settings" : { + "materials_filename" : "StructuralMaterials.json" + } +} diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa_results.json new file mode 100755 index 000000000000..f104835f928f --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa_results.json @@ -0,0 +1 @@ +{"NODE_208": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_139": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_163": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_48": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_38": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_51": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_61": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_107": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_47": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_275": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_339": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_310": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_141": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_100": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_254": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_365": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_145": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_93": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_22": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_9": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_50": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_130": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_162": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_41": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_36": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_263": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_221": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_64": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_176": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_132": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_92": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_43": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_71": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_342": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_28": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_306": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_368": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_294": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_165": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_281": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_60": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_73": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_364": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_72": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_274": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_328": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_345": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_172": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_99": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_75": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_293": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_357": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_123": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_216": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_166": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_120": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_265": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_311": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_142": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_76": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_286": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_21": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_185": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_159": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_104": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_160": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_91": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_219": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_218": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_144": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_112": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_202": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_248": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_108": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_220": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_247": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_158": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_217": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "TIME": [], "NODE_309": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_283": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_226": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_203": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_26": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_131": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_178": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_356": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_90": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_231": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_253": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_110": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_18": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_319": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_14": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_177": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_102": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_35": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_358": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_227": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_346": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_327": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_282": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_13": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_318": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_65": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_68": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}, "NODE_39": {"NORMAL_CONTACT_STRESS": [], "DISPLACEMENT_Z": []}} \ No newline at end of file diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_materials.json new file mode 100755 index 000000000000..c86c33f3e1c9 --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_materials.json @@ -0,0 +1,31 @@ +{ + "properties" : [{ + "model_part_name" : "Parts_Parts_Auto1", + "properties_id" : 1, + "Material" : { + "constitutive_law" : { + "name" : "KratosMultiphysics.StructuralMechanicsApplication.HyperElastic3DLaw" + }, + "Variables" : { + "DENSITY" : 1000.0, + "YOUNG_MODULUS" : 1.0e9, + "POISSON_RATIO" : 0.29 + }, + "Tables" : {} + } + },{ + "model_part_name" : "Parts_Parts_Auto2", + "properties_id" : 2, + "Material" : { + "constitutive_law" : { + "name" : "KratosMultiphysics.StructuralMechanicsApplication.HyperElastic3DLaw" + }, + "Variables" : { + "DENSITY" : 1000.0, + "YOUNG_MODULUS" : 1.0e6, + "POISSON_RATIO" : 0.29 + }, + "Tables" : {} + } + }] +} diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra.mdpa b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra.mdpa new file mode 100755 index 000000000000..ebbfd7b98210 --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra.mdpa @@ -0,0 +1,3308 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Nodes + 1 0.0000000000 1.0000000000 -0.2500000000 + 2 0.1250000000 1.0000000000 -0.2500000000 + 3 0.0000000000 0.8750000000 -0.2500000000 + 4 0.0000000000 1.0000000000 -0.1250000000 + 5 0.1250000000 0.8750000000 -0.2500000000 + 6 0.1250000000 1.0000000000 -0.1250000000 + 7 0.0000000000 0.8750000000 -0.1250000000 + 8 0.1250000000 0.8750000000 -0.1250000000 + 9 0.0000000000 1.0000000000 0.0000000000 + 10 0.2500000000 1.0000000000 -0.2500000000 + 11 0.0000000000 0.7500000000 -0.2500000000 + 12 0.2500000000 0.8750000000 -0.2500000000 + 13 0.1250000000 1.0000000000 0.0000000000 + 14 0.0000000000 0.8750000000 0.0000000000 + 15 0.2500000000 1.0000000000 -0.1250000000 + 16 0.0000000000 0.7500000000 -0.1250000000 + 17 0.1250000000 0.7500000000 -0.2500000000 + 18 0.1250000000 0.8750000000 0.0000000000 + 19 0.2500000000 0.8750000000 -0.1250000000 + 20 0.1250000000 0.7500000000 -0.1250000000 + 21 0.2500000000 1.0000000000 0.0000000000 + 22 0.0000000000 0.7500000000 0.0000000000 + 23 0.2500000000 0.7500000000 -0.2500000000 + 24 0.3750000000 1.0000000000 -0.2500000000 + 25 0.0000000000 0.6250000000 -0.2500000000 + 26 0.2500000000 0.8750000000 0.0000000000 + 27 0.2500000000 0.7500000000 -0.1250000000 + 28 0.1250000000 0.7500000000 0.0000000000 + 29 0.1250000000 0.6250000000 -0.2500000000 + 30 0.3750000000 1.0000000000 -0.1250000000 + 31 0.0000000000 0.6250000000 -0.1250000000 + 32 0.3750000000 0.8750000000 -0.2500000000 + 33 0.1250000000 0.6250000000 -0.1250000000 + 34 0.3750000000 0.8750000000 -0.1250000000 + 35 0.2500000000 0.7500000000 0.0000000000 + 36 0.2500000000 0.7500000000 0.0000000000 + 37 0.2500000000 0.6250000000 -0.2500000000 + 38 0.3750000000 1.0000000000 0.0000000000 + 39 0.0000000000 0.6250000000 0.0000000000 + 40 0.3750000000 0.7500000000 -0.2500000000 + 41 0.1250000000 0.6250000000 0.0000000000 + 42 0.2500000000 0.6250000000 -0.1250000000 + 43 0.3750000000 0.8750000000 0.0000000000 + 44 0.3750000000 0.7500000000 -0.1250000000 + 45 0.5000000000 1.0000000000 -0.2500000000 + 46 0.0000000000 0.5000000000 -0.2500000000 + 47 0.3750000000 0.7500000000 0.0000000000 + 48 0.2500000000 0.6250000000 0.0000000000 + 49 0.2500000000 0.7500000000 0.1250000000 + 50 0.2500000000 0.6250000000 0.0000000000 + 51 0.3750000000 0.7500000000 0.0000000000 + 52 0.5000000000 1.0000000000 -0.1250000000 + 53 0.0000000000 0.5000000000 -0.1250000000 + 54 0.1250000000 0.5000000000 -0.2500000000 + 55 0.5000000000 0.8750000000 -0.2500000000 + 56 0.3750000000 0.6250000000 -0.2500000000 + 57 0.1250000000 0.5000000000 -0.1250000000 + 58 0.5000000000 0.8750000000 -0.1250000000 + 59 0.3750000000 0.6250000000 -0.1250000000 + 60 0.5000000000 1.0000000000 0.0000000000 + 61 0.0000000000 0.5000000000 0.0000000000 + 62 0.2500000000 0.5000000000 -0.2500000000 + 63 0.5000000000 0.7500000000 -0.2500000000 + 64 0.1250000000 0.5000000000 0.0000000000 + 65 0.5000000000 0.8750000000 0.0000000000 + 66 0.2500000000 0.5000000000 -0.1250000000 + 67 0.5000000000 0.7500000000 -0.1250000000 + 68 0.3750000000 0.7500000000 0.1250000000 + 69 0.2500000000 0.6250000000 0.1250000000 + 70 0.3750000000 0.6250000000 0.0000000000 + 71 0.3750000000 0.6250000000 0.0000000000 + 72 0.5000000000 0.7500000000 0.0000000000 + 73 0.2500000000 0.5000000000 0.0000000000 + 74 0.2500000000 0.7500000000 0.2500000000 + 75 0.2500000000 0.5000000000 0.0000000000 + 76 0.5000000000 0.7500000000 0.0000000000 + 77 0.6250000000 1.0000000000 -0.2500000000 + 78 0.0000000000 0.3750000000 -0.2500000000 + 79 0.3750000000 0.5000000000 -0.2500000000 + 80 0.5000000000 0.6250000000 -0.2500000000 + 81 0.6250000000 1.0000000000 -0.1250000000 + 82 0.0000000000 0.3750000000 -0.1250000000 + 83 0.1250000000 0.3750000000 -0.2500000000 + 84 0.3750000000 0.5000000000 -0.1250000000 + 85 0.5000000000 0.6250000000 -0.1250000000 + 86 0.6250000000 0.8750000000 -0.2500000000 + 87 0.3750000000 0.6250000000 0.1250000000 + 88 0.1250000000 0.3750000000 -0.1250000000 + 89 0.6250000000 0.8750000000 -0.1250000000 + 90 0.6250000000 1.0000000000 0.0000000000 + 91 0.0000000000 0.3750000000 0.0000000000 + 92 0.5000000000 0.7500000000 0.1250000000 + 93 0.3750000000 0.7500000000 0.2500000000 + 94 0.2500000000 0.5000000000 0.1250000000 + 95 0.2500000000 0.6250000000 0.2500000000 + 96 0.3750000000 0.5000000000 0.0000000000 + 97 0.5000000000 0.6250000000 0.0000000000 + 98 0.2500000000 0.3750000000 -0.2500000000 + 99 0.3750000000 0.5000000000 0.0000000000 + 100 0.5000000000 0.6250000000 0.0000000000 + 101 0.6250000000 0.7500000000 -0.2500000000 + 102 0.1250000000 0.3750000000 0.0000000000 + 103 0.2500000000 0.3750000000 -0.1250000000 + 104 0.6250000000 0.8750000000 0.0000000000 + 105 0.6250000000 0.7500000000 -0.1250000000 + 106 0.5000000000 0.5000000000 -0.2500000000 + 107 0.6250000000 0.7500000000 0.0000000000 + 108 0.2500000000 0.3750000000 0.0000000000 + 109 0.2500000000 0.7500000000 0.3750000000 + 110 0.2500000000 0.3750000000 0.0000000000 + 111 0.5000000000 0.5000000000 -0.1250000000 + 112 0.6250000000 0.7500000000 0.0000000000 + 113 0.3750000000 0.5000000000 0.1250000000 + 114 0.5000000000 0.6250000000 0.1250000000 + 115 0.3750000000 0.6250000000 0.2500000000 + 116 0.3750000000 0.3750000000 -0.2500000000 + 117 0.6250000000 0.6250000000 -0.2500000000 + 118 0.3750000000 0.3750000000 -0.1250000000 + 119 0.6250000000 0.6250000000 -0.1250000000 + 120 0.5000000000 0.5000000000 0.0000000000 + 121 0.7500000000 1.0000000000 -0.2500000000 + 122 0.0000000000 0.2500000000 -0.2500000000 + 123 0.5000000000 0.7500000000 0.2500000000 + 124 0.2500000000 0.5000000000 0.2500000000 + 125 0.5000000000 0.5000000000 0.0000000000 + 126 0.7500000000 0.8750000000 -0.2500000000 + 127 0.7500000000 1.0000000000 -0.1250000000 + 128 0.0000000000 0.2500000000 -0.1250000000 + 129 0.1250000000 0.2500000000 -0.2500000000 + 130 0.3750000000 0.3750000000 0.0000000000 + 131 0.6250000000 0.6250000000 0.0000000000 + 132 0.6250000000 0.7500000000 0.1250000000 + 133 0.3750000000 0.7500000000 0.3750000000 + 134 0.2500000000 0.3750000000 0.1250000000 + 135 0.2500000000 0.6250000000 0.3750000000 + 136 0.3750000000 0.3750000000 0.0000000000 + 137 0.1250000000 0.2500000000 -0.1250000000 + 138 0.7500000000 0.8750000000 -0.1250000000 + 139 0.6250000000 0.6250000000 0.0000000000 + 140 0.7500000000 0.7500000000 -0.2500000000 + 141 0.7500000000 1.0000000000 0.0000000000 + 142 0.0000000000 0.2500000000 0.0000000000 + 143 0.2500000000 0.2500000000 -0.2500000000 + 144 0.7500000000 0.8750000000 0.0000000000 + 145 0.5000000000 0.5000000000 0.1250000000 + 146 0.3750000000 0.5000000000 0.2500000000 + 147 0.1250000000 0.2500000000 0.0000000000 + 148 0.5000000000 0.3750000000 -0.2500000000 + 149 0.2500000000 0.2500000000 -0.1250000000 + 150 0.7500000000 0.7500000000 -0.1250000000 + 151 0.5000000000 0.6250000000 0.2500000000 + 152 0.6250000000 0.5000000000 -0.2500000000 + 153 0.5000000000 0.3750000000 -0.1250000000 + 154 0.6250000000 0.5000000000 -0.1250000000 + 155 0.3750000000 0.3750000000 0.1250000000 + 156 0.6250000000 0.6250000000 0.1250000000 + 157 0.3750000000 0.6250000000 0.3750000000 + 158 0.7500000000 0.7500000000 0.0000000000 + 159 0.2500000000 0.2500000000 0.0000000000 + 160 0.7500000000 0.7500000000 0.0000000000 + 161 0.2500000000 0.7500000000 0.5000000000 + 162 0.2500000000 0.2500000000 0.0000000000 + 163 0.6250000000 0.5000000000 0.0000000000 + 164 0.7500000000 0.6250000000 -0.2500000000 + 165 0.5000000000 0.3750000000 0.0000000000 + 166 0.6250000000 0.7500000000 0.2500000000 + 167 0.5000000000 0.7500000000 0.3750000000 + 168 0.2500000000 0.3750000000 0.2500000000 + 169 0.2500000000 0.5000000000 0.3750000000 + 170 0.5000000000 0.3750000000 0.0000000000 + 171 0.3750000000 0.2500000000 -0.2500000000 + 172 0.6250000000 0.5000000000 0.0000000000 + 173 0.3750000000 0.2500000000 -0.1250000000 + 174 0.7500000000 0.6250000000 -0.1250000000 + 175 0.5000000000 0.5000000000 0.2500000000 + 176 0.7500000000 0.6250000000 0.0000000000 + 177 0.3750000000 0.2500000000 0.0000000000 + 178 0.7500000000 0.6250000000 0.0000000000 + 179 0.3750000000 0.7500000000 0.5000000000 + 180 0.2500000000 0.6250000000 0.5000000000 + 181 0.2500000000 0.2500000000 0.1250000000 + 182 0.7500000000 0.7500000000 0.1250000000 + 183 0.8750000000 1.0000000000 -0.2500000000 + 184 0.0000000000 0.1250000000 -0.2500000000 + 185 0.3750000000 0.2500000000 0.0000000000 + 186 0.5000000000 0.3750000000 0.1250000000 + 187 0.3750000000 0.3750000000 0.2500000000 + 188 0.6250000000 0.5000000000 0.1250000000 + 189 0.3750000000 0.5000000000 0.3750000000 + 190 0.6250000000 0.6250000000 0.2500000000 + 191 0.5000000000 0.6250000000 0.3750000000 + 192 0.8750000000 1.0000000000 -0.1250000000 + 193 0.0000000000 0.1250000000 -0.1250000000 + 194 0.1250000000 0.1250000000 -0.2500000000 + 195 0.6250000000 0.3750000000 -0.2500000000 + 196 0.8750000000 0.8750000000 -0.2500000000 + 197 0.1250000000 0.1250000000 -0.1250000000 + 198 0.8750000000 0.8750000000 -0.1250000000 + 199 0.6250000000 0.3750000000 -0.1250000000 + 200 0.7500000000 0.5000000000 -0.2500000000 + 201 0.5000000000 0.2500000000 -0.2500000000 + 202 0.8750000000 1.0000000000 0.0000000000 + 203 0.0000000000 0.1250000000 0.0000000000 + 204 0.2500000000 0.1250000000 -0.2500000000 + 205 0.5000000000 0.2500000000 -0.1250000000 + 206 0.7500000000 0.5000000000 -0.1250000000 + 207 0.8750000000 0.7500000000 -0.2500000000 + 208 0.3750000000 0.2500000000 0.1250000000 + 209 0.7500000000 0.6250000000 0.1250000000 + 210 0.6250000000 0.7500000000 0.3750000000 + 211 0.2500000000 0.3750000000 0.3750000000 + 212 0.1250000000 0.1250000000 0.0000000000 + 213 0.2500000000 0.1250000000 -0.1250000000 + 214 0.8750000000 0.7500000000 -0.1250000000 + 215 0.3750000000 0.6250000000 0.5000000000 + 216 0.6250000000 0.3750000000 0.0000000000 + 217 0.6250000000 0.3750000000 0.0000000000 + 218 0.8750000000 0.8750000000 0.0000000000 + 219 0.7500000000 0.5000000000 0.0000000000 + 220 0.5000000000 0.2500000000 0.0000000000 + 221 0.7500000000 0.5000000000 0.0000000000 + 222 0.5000000000 0.7500000000 0.5000000000 + 223 0.2500000000 0.5000000000 0.5000000000 + 224 0.2500000000 0.2500000000 0.2500000000 + 225 0.7500000000 0.7500000000 0.2500000000 + 226 0.5000000000 0.2500000000 0.0000000000 + 227 0.5000000000 0.3750000000 0.2500000000 + 228 0.6250000000 0.5000000000 0.2500000000 + 229 0.5000000000 0.5000000000 0.3750000000 + 230 0.2500000000 0.1250000000 0.0000000000 + 231 0.8750000000 0.7500000000 0.0000000000 + 232 0.3750000000 0.1250000000 -0.2500000000 + 233 0.8750000000 0.6250000000 -0.2500000000 + 234 0.6250000000 0.3750000000 0.1250000000 + 235 0.3750000000 0.3750000000 0.3750000000 + 236 0.6250000000 0.6250000000 0.3750000000 + 237 0.3750000000 0.1250000000 -0.1250000000 + 238 0.8750000000 0.6250000000 -0.1250000000 + 239 0.7500000000 0.3750000000 -0.2500000000 + 240 0.5000000000 0.2500000000 0.1250000000 + 241 0.3750000000 0.2500000000 0.2500000000 + 242 0.7500000000 0.5000000000 0.1250000000 + 243 0.7500000000 0.6250000000 0.2500000000 + 244 0.3750000000 0.5000000000 0.5000000000 + 245 0.5000000000 0.6250000000 0.5000000000 + 246 0.6250000000 0.2500000000 -0.2500000000 + 247 0.3750000000 0.1250000000 0.0000000000 + 248 0.8750000000 0.6250000000 0.0000000000 + 249 0.7500000000 0.3750000000 -0.1250000000 + 250 0.6250000000 0.2500000000 -0.1250000000 + 251 0.0000000000 0.0000000000 -0.2500000000 + 252 1.0000000000 1.0000000000 -0.2500000000 + 253 0.6250000000 0.2500000000 0.0000000000 + 254 0.7500000000 0.3750000000 0.0000000000 + 255 0.6250000000 0.7500000000 0.5000000000 + 256 0.2500000000 0.3750000000 0.5000000000 + 257 0.2500000000 0.2500000000 0.3750000000 + 258 0.7500000000 0.7500000000 0.3750000000 + 259 0.1250000000 0.0000000000 -0.2500000000 + 260 1.0000000000 0.8750000000 -0.2500000000 + 261 0.0000000000 0.0000000000 -0.1250000000 + 262 1.0000000000 1.0000000000 -0.1250000000 + 263 0.7500000000 0.3750000000 0.0000000000 + 264 0.5000000000 0.1250000000 -0.2500000000 + 265 0.6250000000 0.2500000000 0.0000000000 + 266 0.8750000000 0.5000000000 -0.2500000000 + 267 0.6250000000 0.3750000000 0.2500000000 + 268 0.5000000000 0.3750000000 0.3750000000 + 269 0.6250000000 0.5000000000 0.3750000000 + 270 0.1250000000 0.0000000000 -0.1250000000 + 271 1.0000000000 0.8750000000 -0.1250000000 + 272 0.5000000000 0.1250000000 -0.1250000000 + 273 0.8750000000 0.5000000000 -0.1250000000 + 274 0.0000000000 0.0000000000 0.0000000000 + 275 1.0000000000 1.0000000000 0.0000000000 + 276 0.2500000000 0.0000000000 -0.2500000000 + 277 1.0000000000 0.7500000000 -0.2500000000 + 278 0.5000000000 0.2500000000 0.2500000000 + 279 0.7500000000 0.5000000000 0.2500000000 + 280 0.5000000000 0.5000000000 0.5000000000 + 281 0.1250000000 0.0000000000 0.0000000000 + 282 1.0000000000 0.8750000000 0.0000000000 + 283 0.5000000000 0.1250000000 0.0000000000 + 284 0.2500000000 0.0000000000 -0.1250000000 + 285 1.0000000000 0.7500000000 -0.1250000000 + 286 0.8750000000 0.5000000000 0.0000000000 + 287 0.6250000000 0.2500000000 0.1250000000 + 288 0.3750000000 0.2500000000 0.3750000000 + 289 0.7500000000 0.3750000000 0.1250000000 + 290 0.7500000000 0.6250000000 0.3750000000 + 291 0.3750000000 0.3750000000 0.5000000000 + 292 0.6250000000 0.6250000000 0.5000000000 + 293 0.2500000000 0.0000000000 0.0000000000 + 294 1.0000000000 0.7500000000 0.0000000000 + 295 0.7500000000 0.2500000000 -0.2500000000 + 296 0.3750000000 0.0000000000 -0.2500000000 + 297 1.0000000000 0.6250000000 -0.2500000000 + 298 0.7500000000 0.2500000000 -0.1250000000 + 299 0.3750000000 0.0000000000 -0.1250000000 + 300 1.0000000000 0.6250000000 -0.1250000000 + 301 0.6250000000 0.1250000000 -0.2500000000 + 302 0.8750000000 0.3750000000 -0.2500000000 + 303 0.6250000000 0.3750000000 0.3750000000 + 304 0.8750000000 0.3750000000 -0.1250000000 + 305 0.6250000000 0.1250000000 -0.1250000000 + 306 0.7500000000 0.2500000000 0.0000000000 + 307 0.2500000000 0.2500000000 0.5000000000 + 308 0.7500000000 0.7500000000 0.5000000000 + 309 0.7500000000 0.2500000000 0.0000000000 + 310 0.3750000000 0.0000000000 0.0000000000 + 311 1.0000000000 0.6250000000 0.0000000000 + 312 0.6250000000 0.2500000000 0.2500000000 + 313 0.5000000000 0.2500000000 0.3750000000 + 314 0.7500000000 0.3750000000 0.2500000000 + 315 0.7500000000 0.5000000000 0.3750000000 + 316 0.5000000000 0.3750000000 0.5000000000 + 317 0.6250000000 0.5000000000 0.5000000000 + 318 0.6250000000 0.1250000000 0.0000000000 + 319 0.8750000000 0.3750000000 0.0000000000 + 320 0.5000000000 0.0000000000 -0.2500000000 + 321 1.0000000000 0.5000000000 -0.2500000000 + 322 0.3750000000 0.2500000000 0.5000000000 + 323 0.7500000000 0.6250000000 0.5000000000 + 324 0.7500000000 0.2500000000 0.1250000000 + 325 0.5000000000 0.0000000000 -0.1250000000 + 326 1.0000000000 0.5000000000 -0.1250000000 + 327 0.5000000000 0.0000000000 0.0000000000 + 328 1.0000000000 0.5000000000 0.0000000000 + 329 0.7500000000 0.1250000000 -0.2500000000 + 330 0.8750000000 0.2500000000 -0.2500000000 + 331 0.7500000000 0.1250000000 -0.1250000000 + 332 0.6250000000 0.2500000000 0.3750000000 + 333 0.7500000000 0.3750000000 0.3750000000 + 334 0.8750000000 0.2500000000 -0.1250000000 + 335 0.6250000000 0.3750000000 0.5000000000 + 336 0.5000000000 0.2500000000 0.5000000000 + 337 0.7500000000 0.5000000000 0.5000000000 + 338 0.7500000000 0.2500000000 0.2500000000 + 339 0.7500000000 0.1250000000 0.0000000000 + 340 0.6250000000 0.0000000000 -0.2500000000 + 341 1.0000000000 0.3750000000 -0.2500000000 + 342 0.8750000000 0.2500000000 0.0000000000 + 343 0.6250000000 0.0000000000 -0.1250000000 + 344 1.0000000000 0.3750000000 -0.1250000000 + 345 0.6250000000 0.0000000000 0.0000000000 + 346 1.0000000000 0.3750000000 0.0000000000 + 347 0.6250000000 0.2500000000 0.5000000000 + 348 0.7500000000 0.3750000000 0.5000000000 + 349 0.7500000000 0.2500000000 0.3750000000 + 350 0.8750000000 0.1250000000 -0.2500000000 + 351 0.8750000000 0.1250000000 -0.1250000000 + 352 0.7500000000 0.0000000000 -0.2500000000 + 353 1.0000000000 0.2500000000 -0.2500000000 + 354 0.7500000000 0.0000000000 -0.1250000000 + 355 1.0000000000 0.2500000000 -0.1250000000 + 356 0.8750000000 0.1250000000 0.0000000000 + 357 0.7500000000 0.0000000000 0.0000000000 + 358 1.0000000000 0.2500000000 0.0000000000 + 359 0.7500000000 0.2500000000 0.5000000000 + 360 0.8750000000 0.0000000000 -0.2500000000 + 361 1.0000000000 0.1250000000 -0.2500000000 + 362 0.8750000000 0.0000000000 -0.1250000000 + 363 1.0000000000 0.1250000000 -0.1250000000 + 364 0.8750000000 0.0000000000 0.0000000000 + 365 1.0000000000 0.1250000000 0.0000000000 + 366 1.0000000000 0.0000000000 -0.2500000000 + 367 1.0000000000 0.0000000000 -0.1250000000 + 368 1.0000000000 0.0000000000 0.0000000000 +End Nodes + + +Begin Elements UpdatedLagrangianElement3D4N// GUI group identifier: Parts Auto1 + 1 0 177 208 155 159 + 2 0 159 177 130 155 + 3 0 181 134 155 159 + 4 0 159 108 134 155 + 5 0 159 181 208 155 + 6 0 108 130 155 159 + 7 0 220 240 186 177 + 8 0 177 220 165 186 + 9 0 208 155 186 177 + 10 0 177 130 155 186 + 11 0 177 208 240 186 + 12 0 130 165 186 177 + 13 0 253 287 234 220 + 14 0 220 253 216 234 + 15 0 240 186 234 220 + 16 0 220 165 186 234 + 17 0 220 240 287 234 + 18 0 165 216 234 220 + 19 0 254 289 234 306 + 20 0 306 254 216 234 + 21 0 324 287 234 306 + 22 0 306 253 287 234 + 23 0 306 324 289 234 + 24 0 253 216 234 306 + 25 0 208 241 187 181 + 26 0 181 208 155 187 + 27 0 224 168 187 181 + 28 0 181 134 168 187 + 29 0 181 224 241 187 + 30 0 134 155 187 181 + 31 0 240 278 227 208 + 32 0 208 240 186 227 + 33 0 241 187 227 208 + 34 0 208 155 187 227 + 35 0 208 241 278 227 + 36 0 155 186 227 208 + 37 0 287 312 267 240 + 38 0 240 287 234 267 + 39 0 278 227 267 240 + 40 0 240 186 227 267 + 41 0 240 278 312 267 + 42 0 186 234 267 240 + 43 0 289 314 267 324 + 44 0 324 289 234 267 + 45 0 338 312 267 324 + 46 0 324 287 312 267 + 47 0 324 338 314 267 + 48 0 287 234 267 324 + 49 0 241 288 235 224 + 50 0 224 241 187 235 + 51 0 257 211 235 224 + 52 0 224 168 211 235 + 53 0 224 257 288 235 + 54 0 168 187 235 224 + 55 0 278 313 268 241 + 56 0 241 278 227 268 + 57 0 288 235 268 241 + 58 0 241 187 235 268 + 59 0 241 288 313 268 + 60 0 187 227 268 241 + 61 0 312 332 303 278 + 62 0 278 312 267 303 + 63 0 313 268 303 278 + 64 0 278 227 268 303 + 65 0 278 313 332 303 + 66 0 227 267 303 278 + 67 0 314 333 303 338 + 68 0 338 314 267 303 + 69 0 349 332 303 338 + 70 0 338 312 332 303 + 71 0 338 349 333 303 + 72 0 312 267 303 338 + 73 0 211 256 307 235 + 74 0 235 211 257 307 + 75 0 291 322 307 235 + 76 0 235 288 322 307 + 77 0 235 291 256 307 + 78 0 288 257 307 235 + 79 0 235 291 322 268 + 80 0 268 235 288 322 + 81 0 316 336 322 268 + 82 0 268 313 336 322 + 83 0 268 316 291 322 + 84 0 313 288 322 268 + 85 0 268 316 336 303 + 86 0 303 268 313 336 + 87 0 335 347 336 303 + 88 0 303 332 347 336 + 89 0 303 335 316 336 + 90 0 332 313 336 303 + 91 0 332 347 359 303 + 92 0 303 332 349 359 + 93 0 335 348 359 303 + 94 0 303 333 348 359 + 95 0 303 335 347 359 + 96 0 333 349 359 303 + 97 0 73 99 113 130 + 98 0 130 155 113 73 + 99 0 94 113 155 73 + 100 0 73 94 134 155 + 101 0 73 108 130 155 + 102 0 108 134 155 73 + 103 0 165 186 145 130 + 104 0 130 165 120 145 + 105 0 155 113 145 130 + 106 0 130 99 113 145 + 107 0 130 155 186 145 + 108 0 99 120 145 130 + 109 0 216 234 188 165 + 110 0 165 216 163 188 + 111 0 186 145 188 165 + 112 0 165 120 145 188 + 113 0 165 186 234 188 + 114 0 120 163 188 165 + 115 0 221 242 188 254 + 116 0 254 221 163 188 + 117 0 289 234 188 254 + 118 0 254 216 234 188 + 119 0 254 289 242 188 + 120 0 216 163 188 254 + 121 0 94 113 146 155 + 122 0 155 187 146 94 + 123 0 124 146 187 94 + 124 0 94 124 168 187 + 125 0 94 134 155 187 + 126 0 134 168 187 94 + 127 0 186 227 175 155 + 128 0 155 186 145 175 + 129 0 187 146 175 155 + 130 0 155 113 146 175 + 131 0 155 187 227 175 + 132 0 113 145 175 155 + 133 0 234 267 228 186 + 134 0 186 234 188 228 + 135 0 227 175 228 186 + 136 0 186 145 175 228 + 137 0 186 227 267 228 + 138 0 145 188 228 186 + 139 0 242 279 228 289 + 140 0 289 242 188 228 + 141 0 314 267 228 289 + 142 0 289 234 267 228 + 143 0 289 314 279 228 + 144 0 234 188 228 289 + 145 0 124 146 189 187 + 146 0 187 235 189 124 + 147 0 169 189 235 124 + 148 0 124 169 211 235 + 149 0 124 168 187 235 + 150 0 168 211 235 124 + 151 0 227 268 229 187 + 152 0 187 227 175 229 + 153 0 235 189 229 187 + 154 0 187 146 189 229 + 155 0 187 235 268 229 + 156 0 146 175 229 187 + 157 0 267 303 269 227 + 158 0 227 267 228 269 + 159 0 268 229 269 227 + 160 0 227 175 229 269 + 161 0 227 268 303 269 + 162 0 175 228 269 227 + 163 0 279 315 269 314 + 164 0 314 279 228 269 + 165 0 333 303 269 314 + 166 0 314 267 303 269 + 167 0 314 333 315 269 + 168 0 267 228 269 314 + 169 0 223 244 291 189 + 170 0 189 235 291 223 + 171 0 256 291 235 223 + 172 0 223 256 211 235 + 173 0 223 169 189 235 + 174 0 169 211 235 223 + 175 0 189 244 291 229 + 176 0 229 189 235 291 + 177 0 280 316 291 229 + 178 0 229 268 316 291 + 179 0 229 280 244 291 + 180 0 268 235 291 229 + 181 0 229 280 316 269 + 182 0 269 229 268 316 + 183 0 317 335 316 269 + 184 0 269 303 335 316 + 185 0 269 317 280 316 + 186 0 303 268 316 269 + 187 0 303 335 348 269 + 188 0 269 303 333 348 + 189 0 317 337 348 269 + 190 0 269 315 337 348 + 191 0 269 317 335 348 + 192 0 315 333 348 269 + 193 0 48 71 87 99 + 194 0 99 113 87 48 + 195 0 69 87 113 48 + 196 0 48 69 94 113 + 197 0 48 73 99 113 + 198 0 73 94 113 48 + 199 0 120 145 114 99 + 200 0 99 120 100 114 + 201 0 113 87 114 99 + 202 0 99 71 87 114 + 203 0 99 113 145 114 + 204 0 71 100 114 99 + 205 0 163 188 156 120 + 206 0 120 163 131 156 + 207 0 145 114 156 120 + 208 0 120 100 114 156 + 209 0 120 145 188 156 + 210 0 100 131 156 120 + 211 0 178 209 156 221 + 212 0 221 178 131 156 + 213 0 242 188 156 221 + 214 0 221 163 188 156 + 215 0 221 242 209 156 + 216 0 163 131 156 221 + 217 0 69 87 115 113 + 218 0 113 146 115 69 + 219 0 95 115 146 69 + 220 0 69 95 124 146 + 221 0 69 94 113 146 + 222 0 94 124 146 69 + 223 0 145 175 151 113 + 224 0 113 145 114 151 + 225 0 146 115 151 113 + 226 0 113 87 115 151 + 227 0 113 146 175 151 + 228 0 87 114 151 113 + 229 0 188 228 190 145 + 230 0 145 188 156 190 + 231 0 175 151 190 145 + 232 0 145 114 151 190 + 233 0 145 175 228 190 + 234 0 114 156 190 145 + 235 0 209 243 190 242 + 236 0 242 209 156 190 + 237 0 279 228 190 242 + 238 0 242 188 228 190 + 239 0 242 279 243 190 + 240 0 188 156 190 242 + 241 0 95 115 157 146 + 242 0 146 189 157 95 + 243 0 135 157 189 95 + 244 0 95 135 169 189 + 245 0 95 124 146 189 + 246 0 124 169 189 95 + 247 0 175 229 191 146 + 248 0 146 175 151 191 + 249 0 189 157 191 146 + 250 0 146 115 157 191 + 251 0 146 189 229 191 + 252 0 115 151 191 146 + 253 0 228 269 236 175 + 254 0 175 228 190 236 + 255 0 229 191 236 175 + 256 0 175 151 191 236 + 257 0 175 229 269 236 + 258 0 151 190 236 175 + 259 0 243 290 236 279 + 260 0 279 243 190 236 + 261 0 315 269 236 279 + 262 0 279 228 269 236 + 263 0 279 315 290 236 + 264 0 228 190 236 279 + 265 0 180 215 244 157 + 266 0 157 189 244 180 + 267 0 223 244 189 180 + 268 0 180 223 169 189 + 269 0 180 135 157 189 + 270 0 135 169 189 180 + 271 0 157 215 244 191 + 272 0 191 157 189 244 + 273 0 245 280 244 191 + 274 0 191 229 280 244 + 275 0 191 245 215 244 + 276 0 229 189 244 191 + 277 0 191 245 280 236 + 278 0 236 191 229 280 + 279 0 292 317 280 236 + 280 0 236 269 317 280 + 281 0 236 292 245 280 + 282 0 269 229 280 236 + 283 0 269 317 337 236 + 284 0 236 269 315 337 + 285 0 292 323 337 236 + 286 0 236 290 323 337 + 287 0 236 292 317 337 + 288 0 290 315 337 236 + 289 0 48 69 87 35 + 290 0 35 48 71 87 + 291 0 49 68 87 35 + 292 0 35 47 68 87 + 293 0 35 49 69 87 + 294 0 47 71 87 35 + 295 0 72 100 114 71 + 296 0 71 87 114 72 + 297 0 92 114 87 72 + 298 0 72 92 68 87 + 299 0 72 47 71 87 + 300 0 47 68 87 72 + 301 0 107 131 156 100 + 302 0 100 114 156 107 + 303 0 132 156 114 107 + 304 0 107 132 92 114 + 305 0 107 72 100 114 + 306 0 72 92 114 107 + 307 0 107 132 156 160 + 308 0 160 107 131 156 + 309 0 182 209 156 160 + 310 0 160 178 209 156 + 311 0 160 182 132 156 + 312 0 178 131 156 160 + 313 0 69 95 115 49 + 314 0 49 69 87 115 + 315 0 74 93 115 49 + 316 0 49 68 93 115 + 317 0 49 74 95 115 + 318 0 68 87 115 49 + 319 0 92 114 151 87 + 320 0 87 115 151 92 + 321 0 123 151 115 92 + 322 0 92 123 93 115 + 323 0 92 68 87 115 + 324 0 68 93 115 92 + 325 0 132 156 190 114 + 326 0 114 151 190 132 + 327 0 166 190 151 132 + 328 0 132 166 123 151 + 329 0 132 92 114 151 + 330 0 92 123 151 132 + 331 0 132 166 190 182 + 332 0 182 132 156 190 + 333 0 225 243 190 182 + 334 0 182 209 243 190 + 335 0 182 225 166 190 + 336 0 209 156 190 182 + 337 0 95 135 157 74 + 338 0 74 95 115 157 + 339 0 109 133 157 74 + 340 0 74 93 133 157 + 341 0 74 109 135 157 + 342 0 93 115 157 74 + 343 0 123 151 191 115 + 344 0 115 157 191 123 + 345 0 167 191 157 123 + 346 0 123 167 133 157 + 347 0 123 93 115 157 + 348 0 93 133 157 123 + 349 0 166 190 236 151 + 350 0 151 191 236 166 + 351 0 210 236 191 166 + 352 0 166 210 167 191 + 353 0 166 123 151 191 + 354 0 123 167 191 166 + 355 0 166 210 236 225 + 356 0 225 166 190 236 + 357 0 258 290 236 225 + 358 0 225 243 290 236 + 359 0 225 258 210 236 + 360 0 243 190 236 225 + 361 0 133 179 161 157 + 362 0 157 133 109 161 + 363 0 215 180 161 157 + 364 0 157 135 180 161 + 365 0 157 215 179 161 + 366 0 135 109 161 157 + 367 0 222 245 215 191 + 368 0 191 157 215 222 + 369 0 179 215 157 222 + 370 0 222 179 133 157 + 371 0 222 167 191 157 + 372 0 167 133 157 222 + 373 0 255 292 245 236 + 374 0 236 191 245 255 + 375 0 222 245 191 255 + 376 0 255 222 167 191 + 377 0 255 210 236 191 + 378 0 210 167 191 255 + 379 0 290 323 308 236 + 380 0 236 290 258 308 + 381 0 292 255 308 236 + 382 0 236 210 255 308 + 383 0 236 292 323 308 + 384 0 210 258 308 236 +End Elements + +Begin Elements UpdatedLagrangianElement3D4N// GUI group identifier: Parts Auto2 + 385 0 364 362 351 368 + 386 0 368 364 356 351 + 387 0 367 363 351 368 + 388 0 368 365 363 351 + 389 0 368 367 362 351 + 390 0 365 356 351 368 + 391 0 339 331 351 357 + 392 0 357 339 356 351 + 393 0 354 362 351 357 + 394 0 357 364 362 351 + 395 0 357 354 331 351 + 396 0 364 356 351 357 + 397 0 318 305 331 345 + 398 0 345 318 339 331 + 399 0 343 354 331 345 + 400 0 345 357 354 331 + 401 0 345 343 305 331 + 402 0 357 339 331 345 + 403 0 283 272 305 327 + 404 0 327 283 318 305 + 405 0 325 343 305 327 + 406 0 327 345 343 305 + 407 0 327 325 272 305 + 408 0 345 318 305 327 + 409 0 247 237 272 310 + 410 0 310 247 283 272 + 411 0 299 325 272 310 + 412 0 310 327 325 272 + 413 0 310 299 237 272 + 414 0 327 283 272 310 + 415 0 230 213 237 293 + 416 0 293 230 247 237 + 417 0 284 299 237 293 + 418 0 293 310 299 237 + 419 0 293 284 213 237 + 420 0 310 247 237 293 + 421 0 212 197 213 281 + 422 0 281 212 230 213 + 423 0 270 284 213 281 + 424 0 281 293 284 213 + 425 0 281 270 197 213 + 426 0 293 230 213 281 + 427 0 203 193 197 274 + 428 0 274 203 212 197 + 429 0 261 270 197 274 + 430 0 274 281 270 197 + 431 0 274 261 193 197 + 432 0 281 212 197 274 + 433 0 363 361 366 351 + 434 0 351 363 367 366 + 435 0 350 360 366 351 + 436 0 351 362 360 366 + 437 0 351 350 361 366 + 438 0 362 367 366 351 + 439 0 362 360 352 351 + 440 0 351 362 354 352 + 441 0 350 329 352 351 + 442 0 351 331 329 352 + 443 0 351 350 360 352 + 444 0 331 354 352 351 + 445 0 354 352 340 331 + 446 0 331 354 343 340 + 447 0 329 301 340 331 + 448 0 331 305 301 340 + 449 0 331 329 352 340 + 450 0 305 343 340 331 + 451 0 343 340 320 305 + 452 0 305 343 325 320 + 453 0 301 264 320 305 + 454 0 305 272 264 320 + 455 0 305 301 340 320 + 456 0 272 325 320 305 + 457 0 325 320 296 272 + 458 0 272 325 299 296 + 459 0 264 232 296 272 + 460 0 272 237 232 296 + 461 0 272 264 320 296 + 462 0 237 299 296 272 + 463 0 299 296 276 237 + 464 0 237 299 284 276 + 465 0 232 204 276 237 + 466 0 237 213 204 276 + 467 0 237 232 296 276 + 468 0 213 284 276 237 + 469 0 284 276 259 213 + 470 0 213 284 270 259 + 471 0 204 194 259 213 + 472 0 213 197 194 259 + 473 0 213 204 276 259 + 474 0 197 270 259 213 + 475 0 270 259 251 197 + 476 0 197 270 261 251 + 477 0 194 184 251 197 + 478 0 197 193 184 251 + 479 0 197 194 259 251 + 480 0 193 261 251 197 + 481 0 356 351 334 365 + 482 0 365 356 342 334 + 483 0 363 355 334 365 + 484 0 365 358 355 334 + 485 0 365 363 351 334 + 486 0 358 342 334 365 + 487 0 339 331 298 351 + 488 0 351 334 298 339 + 489 0 309 298 334 339 + 490 0 339 309 342 334 + 491 0 339 356 351 334 + 492 0 356 342 334 339 + 493 0 318 305 250 331 + 494 0 331 298 250 318 + 495 0 265 250 298 318 + 496 0 318 265 309 298 + 497 0 318 339 331 298 + 498 0 339 309 298 318 + 499 0 283 272 205 305 + 500 0 305 250 205 283 + 501 0 226 205 250 283 + 502 0 283 226 265 250 + 503 0 283 318 305 250 + 504 0 318 265 250 283 + 505 0 247 237 173 272 + 506 0 272 205 173 247 + 507 0 185 173 205 247 + 508 0 247 185 226 205 + 509 0 247 283 272 205 + 510 0 283 226 205 247 + 511 0 230 213 149 237 + 512 0 237 173 149 230 + 513 0 162 149 173 230 + 514 0 230 162 185 173 + 515 0 230 247 237 173 + 516 0 247 185 173 230 + 517 0 212 197 137 213 + 518 0 213 149 137 212 + 519 0 147 137 149 212 + 520 0 212 147 162 149 + 521 0 212 230 213 149 + 522 0 230 162 149 212 + 523 0 142 147 212 137 + 524 0 137 197 212 142 + 525 0 203 212 197 142 + 526 0 142 203 193 197 + 527 0 142 128 137 197 + 528 0 128 193 197 142 + 529 0 355 353 361 334 + 530 0 334 355 363 361 + 531 0 330 350 361 334 + 532 0 334 351 350 361 + 533 0 334 330 353 361 + 534 0 351 363 361 334 + 535 0 329 331 351 298 + 536 0 298 334 351 329 + 537 0 350 351 334 329 + 538 0 329 350 330 334 + 539 0 329 295 298 334 + 540 0 295 330 334 329 + 541 0 301 305 331 250 + 542 0 250 298 331 301 + 543 0 329 331 298 301 + 544 0 301 329 295 298 + 545 0 301 246 250 298 + 546 0 246 295 298 301 + 547 0 264 272 305 205 + 548 0 205 250 305 264 + 549 0 301 305 250 264 + 550 0 264 301 246 250 + 551 0 264 201 205 250 + 552 0 201 246 250 264 + 553 0 232 237 272 173 + 554 0 173 205 272 232 + 555 0 264 272 205 232 + 556 0 232 264 201 205 + 557 0 232 171 173 205 + 558 0 171 201 205 232 + 559 0 204 213 237 149 + 560 0 149 173 237 204 + 561 0 232 237 173 204 + 562 0 204 232 171 173 + 563 0 204 143 149 173 + 564 0 143 171 173 204 + 565 0 194 197 213 137 + 566 0 137 149 213 194 + 567 0 204 213 149 194 + 568 0 194 204 143 149 + 569 0 194 129 137 149 + 570 0 129 143 149 194 + 571 0 122 129 137 194 + 572 0 194 197 137 122 + 573 0 128 137 197 122 + 574 0 122 128 193 197 + 575 0 122 184 194 197 + 576 0 184 193 197 122 + 577 0 342 334 304 358 + 578 0 358 342 319 304 + 579 0 355 344 304 358 + 580 0 358 346 344 304 + 581 0 358 355 334 304 + 582 0 346 319 304 358 + 583 0 309 298 249 334 + 584 0 334 304 249 309 + 585 0 263 249 304 309 + 586 0 309 263 319 304 + 587 0 309 342 334 304 + 588 0 342 319 304 309 + 589 0 265 250 199 298 + 590 0 298 249 199 265 + 591 0 217 199 249 265 + 592 0 265 217 263 249 + 593 0 265 309 298 249 + 594 0 309 263 249 265 + 595 0 226 205 153 250 + 596 0 250 199 153 226 + 597 0 170 153 199 226 + 598 0 226 170 217 199 + 599 0 226 265 250 199 + 600 0 265 217 199 226 + 601 0 185 173 118 205 + 602 0 205 153 118 185 + 603 0 136 118 153 185 + 604 0 185 136 170 153 + 605 0 185 226 205 153 + 606 0 226 170 153 185 + 607 0 162 149 103 173 + 608 0 173 118 103 162 + 609 0 110 103 118 162 + 610 0 162 110 136 118 + 611 0 162 185 173 118 + 612 0 185 136 118 162 + 613 0 147 137 88 149 + 614 0 149 103 88 147 + 615 0 102 88 103 147 + 616 0 147 102 110 103 + 617 0 147 162 149 103 + 618 0 162 110 103 147 + 619 0 91 102 147 88 + 620 0 88 137 147 91 + 621 0 142 147 137 91 + 622 0 91 142 128 137 + 623 0 91 82 88 137 + 624 0 82 128 137 91 + 625 0 344 341 353 304 + 626 0 304 344 355 353 + 627 0 302 330 353 304 + 628 0 304 334 330 353 + 629 0 304 302 341 353 + 630 0 334 355 353 304 + 631 0 295 298 334 249 + 632 0 249 304 334 295 + 633 0 330 334 304 295 + 634 0 295 330 302 304 + 635 0 295 239 249 304 + 636 0 239 302 304 295 + 637 0 246 250 298 199 + 638 0 199 249 298 246 + 639 0 295 298 249 246 + 640 0 246 295 239 249 + 641 0 246 195 199 249 + 642 0 195 239 249 246 + 643 0 201 205 250 153 + 644 0 153 199 250 201 + 645 0 246 250 199 201 + 646 0 201 246 195 199 + 647 0 201 148 153 199 + 648 0 148 195 199 201 + 649 0 171 173 205 118 + 650 0 118 153 205 171 + 651 0 201 205 153 171 + 652 0 171 201 148 153 + 653 0 171 116 118 153 + 654 0 116 148 153 171 + 655 0 143 149 173 103 + 656 0 103 118 173 143 + 657 0 171 173 118 143 + 658 0 143 171 116 118 + 659 0 143 98 103 118 + 660 0 98 116 118 143 + 661 0 129 137 149 88 + 662 0 88 103 149 129 + 663 0 143 149 103 129 + 664 0 129 143 98 103 + 665 0 129 83 88 103 + 666 0 83 98 103 129 + 667 0 78 83 88 129 + 668 0 129 137 88 78 + 669 0 82 88 137 78 + 670 0 78 82 128 137 + 671 0 78 122 129 137 + 672 0 122 128 137 78 + 673 0 319 304 273 346 + 674 0 346 319 286 273 + 675 0 344 326 273 346 + 676 0 346 328 326 273 + 677 0 346 344 304 273 + 678 0 328 286 273 346 + 679 0 263 249 206 304 + 680 0 304 273 206 263 + 681 0 219 206 273 263 + 682 0 263 219 286 273 + 683 0 263 319 304 273 + 684 0 319 286 273 263 + 685 0 217 199 154 249 + 686 0 249 206 154 217 + 687 0 172 154 206 217 + 688 0 217 172 219 206 + 689 0 217 263 249 206 + 690 0 263 219 206 217 + 691 0 170 153 111 199 + 692 0 199 154 111 170 + 693 0 125 111 154 170 + 694 0 170 125 172 154 + 695 0 170 217 199 154 + 696 0 217 172 154 170 + 697 0 136 118 84 153 + 698 0 153 111 84 136 + 699 0 96 84 111 136 + 700 0 136 96 125 111 + 701 0 136 170 153 111 + 702 0 170 125 111 136 + 703 0 110 103 66 118 + 704 0 118 84 66 110 + 705 0 75 66 84 110 + 706 0 110 75 96 84 + 707 0 110 136 118 84 + 708 0 136 96 84 110 + 709 0 102 88 57 103 + 710 0 103 66 57 102 + 711 0 64 57 66 102 + 712 0 102 64 75 66 + 713 0 102 110 103 66 + 714 0 110 75 66 102 + 715 0 61 64 102 57 + 716 0 57 88 102 61 + 717 0 91 102 88 61 + 718 0 61 91 82 88 + 719 0 61 53 57 88 + 720 0 53 82 88 61 + 721 0 326 321 341 273 + 722 0 273 326 344 341 + 723 0 266 302 341 273 + 724 0 273 304 302 341 + 725 0 273 266 321 341 + 726 0 304 344 341 273 + 727 0 239 249 304 206 + 728 0 206 273 304 239 + 729 0 302 304 273 239 + 730 0 239 302 266 273 + 731 0 239 200 206 273 + 732 0 200 266 273 239 + 733 0 195 199 249 154 + 734 0 154 206 249 195 + 735 0 239 249 206 195 + 736 0 195 239 200 206 + 737 0 195 152 154 206 + 738 0 152 200 206 195 + 739 0 148 153 199 111 + 740 0 111 154 199 148 + 741 0 195 199 154 148 + 742 0 148 195 152 154 + 743 0 148 106 111 154 + 744 0 106 152 154 148 + 745 0 116 118 153 84 + 746 0 84 111 153 116 + 747 0 148 153 111 116 + 748 0 116 148 106 111 + 749 0 116 79 84 111 + 750 0 79 106 111 116 + 751 0 98 103 118 66 + 752 0 66 84 118 98 + 753 0 116 118 84 98 + 754 0 98 116 79 84 + 755 0 98 62 66 84 + 756 0 62 79 84 98 + 757 0 83 88 103 57 + 758 0 57 66 103 83 + 759 0 98 103 66 83 + 760 0 83 98 62 66 + 761 0 83 54 57 66 + 762 0 54 62 66 83 + 763 0 46 54 57 83 + 764 0 83 88 57 46 + 765 0 53 57 88 46 + 766 0 46 53 82 88 + 767 0 46 78 83 88 + 768 0 78 82 88 46 + 769 0 286 273 238 328 + 770 0 328 286 248 238 + 771 0 326 300 238 328 + 772 0 328 311 300 238 + 773 0 328 326 273 238 + 774 0 311 248 238 328 + 775 0 219 206 174 273 + 776 0 273 238 174 219 + 777 0 176 174 238 219 + 778 0 219 176 248 238 + 779 0 219 286 273 238 + 780 0 286 248 238 219 + 781 0 172 154 119 206 + 782 0 206 174 119 172 + 783 0 139 119 174 172 + 784 0 172 139 176 174 + 785 0 172 219 206 174 + 786 0 219 176 174 172 + 787 0 125 111 85 154 + 788 0 154 119 85 125 + 789 0 97 85 119 125 + 790 0 125 97 139 119 + 791 0 125 172 154 119 + 792 0 172 139 119 125 + 793 0 96 84 59 111 + 794 0 111 85 59 96 + 795 0 70 59 85 96 + 796 0 96 70 97 85 + 797 0 96 125 111 85 + 798 0 125 97 85 96 + 799 0 75 66 42 84 + 800 0 84 59 42 75 + 801 0 50 42 59 75 + 802 0 75 50 70 59 + 803 0 75 96 84 59 + 804 0 96 70 59 75 + 805 0 64 57 33 66 + 806 0 66 42 33 64 + 807 0 41 33 42 64 + 808 0 64 41 50 42 + 809 0 64 75 66 42 + 810 0 75 50 42 64 + 811 0 39 41 64 33 + 812 0 33 57 64 39 + 813 0 61 64 57 39 + 814 0 39 61 53 57 + 815 0 39 31 33 57 + 816 0 31 53 57 39 + 817 0 300 297 321 238 + 818 0 238 300 326 321 + 819 0 233 266 321 238 + 820 0 238 273 266 321 + 821 0 238 233 297 321 + 822 0 273 326 321 238 + 823 0 200 206 273 174 + 824 0 174 238 273 200 + 825 0 266 273 238 200 + 826 0 200 266 233 238 + 827 0 200 164 174 238 + 828 0 164 233 238 200 + 829 0 152 154 206 119 + 830 0 119 174 206 152 + 831 0 200 206 174 152 + 832 0 152 200 164 174 + 833 0 152 117 119 174 + 834 0 117 164 174 152 + 835 0 106 111 154 85 + 836 0 85 119 154 106 + 837 0 152 154 119 106 + 838 0 106 152 117 119 + 839 0 106 80 85 119 + 840 0 80 117 119 106 + 841 0 79 84 111 59 + 842 0 59 85 111 79 + 843 0 106 111 85 79 + 844 0 79 106 80 85 + 845 0 79 56 59 85 + 846 0 56 80 85 79 + 847 0 62 66 84 42 + 848 0 42 59 84 62 + 849 0 79 84 59 62 + 850 0 62 79 56 59 + 851 0 62 37 42 59 + 852 0 37 56 59 62 + 853 0 54 57 66 33 + 854 0 33 42 66 54 + 855 0 62 66 42 54 + 856 0 54 62 37 42 + 857 0 54 29 33 42 + 858 0 29 37 42 54 + 859 0 25 29 33 54 + 860 0 54 57 33 25 + 861 0 31 33 57 25 + 862 0 25 31 53 57 + 863 0 25 46 54 57 + 864 0 46 53 57 25 + 865 0 248 238 214 311 + 866 0 311 248 231 214 + 867 0 300 285 214 311 + 868 0 311 294 285 214 + 869 0 311 300 238 214 + 870 0 294 231 214 311 + 871 0 176 174 150 238 + 872 0 238 214 150 176 + 873 0 158 150 214 176 + 874 0 176 158 231 214 + 875 0 176 248 238 214 + 876 0 248 231 214 176 + 877 0 139 119 105 174 + 878 0 174 150 105 139 + 879 0 112 105 150 139 + 880 0 139 112 158 150 + 881 0 139 176 174 150 + 882 0 176 158 150 139 + 883 0 97 85 67 119 + 884 0 119 105 67 97 + 885 0 76 67 105 97 + 886 0 97 76 112 105 + 887 0 97 139 119 105 + 888 0 139 112 105 97 + 889 0 70 59 44 85 + 890 0 85 67 44 70 + 891 0 51 44 67 70 + 892 0 70 51 76 67 + 893 0 70 97 85 67 + 894 0 97 76 67 70 + 895 0 50 42 27 59 + 896 0 59 44 27 50 + 897 0 36 27 44 50 + 898 0 50 36 51 44 + 899 0 50 70 59 44 + 900 0 70 51 44 50 + 901 0 41 33 20 42 + 902 0 42 27 20 41 + 903 0 28 20 27 41 + 904 0 41 28 36 27 + 905 0 41 50 42 27 + 906 0 50 36 27 41 + 907 0 22 28 41 20 + 908 0 20 33 41 22 + 909 0 39 41 33 22 + 910 0 22 39 31 33 + 911 0 22 16 20 33 + 912 0 16 31 33 22 + 913 0 285 277 297 214 + 914 0 214 285 300 297 + 915 0 207 233 297 214 + 916 0 214 238 233 297 + 917 0 214 207 277 297 + 918 0 238 300 297 214 + 919 0 164 174 238 150 + 920 0 150 214 238 164 + 921 0 233 238 214 164 + 922 0 164 233 207 214 + 923 0 164 140 150 214 + 924 0 140 207 214 164 + 925 0 117 119 174 105 + 926 0 105 150 174 117 + 927 0 164 174 150 117 + 928 0 117 164 140 150 + 929 0 117 101 105 150 + 930 0 101 140 150 117 + 931 0 80 85 119 67 + 932 0 67 105 119 80 + 933 0 117 119 105 80 + 934 0 80 117 101 105 + 935 0 80 63 67 105 + 936 0 63 101 105 80 + 937 0 56 59 85 44 + 938 0 44 67 85 56 + 939 0 80 85 67 56 + 940 0 56 80 63 67 + 941 0 56 40 44 67 + 942 0 40 63 67 56 + 943 0 37 42 59 27 + 944 0 27 44 59 37 + 945 0 56 59 44 37 + 946 0 37 56 40 44 + 947 0 37 23 27 44 + 948 0 23 40 44 37 + 949 0 29 33 42 20 + 950 0 20 27 42 29 + 951 0 37 42 27 29 + 952 0 29 37 23 27 + 953 0 29 17 20 27 + 954 0 17 23 27 29 + 955 0 11 17 20 29 + 956 0 29 33 20 11 + 957 0 16 20 33 11 + 958 0 11 16 31 33 + 959 0 11 25 29 33 + 960 0 25 31 33 11 + 961 0 231 214 198 294 + 962 0 294 231 218 198 + 963 0 285 271 198 294 + 964 0 294 282 271 198 + 965 0 294 285 214 198 + 966 0 282 218 198 294 + 967 0 158 150 138 214 + 968 0 214 198 138 158 + 969 0 144 138 198 158 + 970 0 158 144 218 198 + 971 0 158 231 214 198 + 972 0 231 218 198 158 + 973 0 112 105 89 150 + 974 0 150 138 89 112 + 975 0 104 89 138 112 + 976 0 112 104 144 138 + 977 0 112 158 150 138 + 978 0 158 144 138 112 + 979 0 76 67 58 105 + 980 0 105 89 58 76 + 981 0 65 58 89 76 + 982 0 76 65 104 89 + 983 0 76 112 105 89 + 984 0 112 104 89 76 + 985 0 51 44 34 67 + 986 0 67 58 34 51 + 987 0 43 34 58 51 + 988 0 51 43 65 58 + 989 0 51 76 67 58 + 990 0 76 65 58 51 + 991 0 36 27 19 44 + 992 0 44 34 19 36 + 993 0 26 19 34 36 + 994 0 36 26 43 34 + 995 0 36 51 44 34 + 996 0 51 43 34 36 + 997 0 28 20 8 27 + 998 0 27 19 8 28 + 999 0 18 8 19 28 + 1000 0 28 18 26 19 + 1001 0 28 36 27 19 + 1002 0 36 26 19 28 + 1003 0 14 18 28 8 + 1004 0 8 20 28 14 + 1005 0 22 28 20 14 + 1006 0 14 22 16 20 + 1007 0 14 7 8 20 + 1008 0 7 16 20 14 + 1009 0 271 260 277 198 + 1010 0 198 271 285 277 + 1011 0 196 207 277 198 + 1012 0 198 214 207 277 + 1013 0 198 196 260 277 + 1014 0 214 285 277 198 + 1015 0 140 150 214 138 + 1016 0 138 198 214 140 + 1017 0 207 214 198 140 + 1018 0 140 207 196 198 + 1019 0 140 126 138 198 + 1020 0 126 196 198 140 + 1021 0 101 105 150 89 + 1022 0 89 138 150 101 + 1023 0 140 150 138 101 + 1024 0 101 140 126 138 + 1025 0 101 86 89 138 + 1026 0 86 126 138 101 + 1027 0 63 67 105 58 + 1028 0 58 89 105 63 + 1029 0 101 105 89 63 + 1030 0 63 101 86 89 + 1031 0 63 55 58 89 + 1032 0 55 86 89 63 + 1033 0 40 44 67 34 + 1034 0 34 58 67 40 + 1035 0 63 67 58 40 + 1036 0 40 63 55 58 + 1037 0 40 32 34 58 + 1038 0 32 55 58 40 + 1039 0 23 27 44 19 + 1040 0 19 34 44 23 + 1041 0 40 44 34 23 + 1042 0 23 40 32 34 + 1043 0 23 12 19 34 + 1044 0 12 32 34 23 + 1045 0 17 20 27 8 + 1046 0 8 19 27 17 + 1047 0 23 27 19 17 + 1048 0 17 23 12 19 + 1049 0 17 5 8 19 + 1050 0 5 12 19 17 + 1051 0 3 5 8 17 + 1052 0 17 20 8 3 + 1053 0 7 8 20 3 + 1054 0 3 7 16 20 + 1055 0 3 11 17 20 + 1056 0 11 16 20 3 + 1057 0 282 271 198 275 + 1058 0 275 282 218 198 + 1059 0 262 192 198 275 + 1060 0 275 202 192 198 + 1061 0 275 262 271 198 + 1062 0 202 218 198 275 + 1063 0 202 218 144 198 + 1064 0 198 138 144 202 + 1065 0 141 144 138 202 + 1066 0 202 141 127 138 + 1067 0 202 192 198 138 + 1068 0 192 127 138 202 + 1069 0 141 144 104 138 + 1070 0 138 89 104 141 + 1071 0 90 104 89 141 + 1072 0 141 90 81 89 + 1073 0 141 127 138 89 + 1074 0 127 81 89 141 + 1075 0 90 104 65 89 + 1076 0 89 58 65 90 + 1077 0 60 65 58 90 + 1078 0 90 60 52 58 + 1079 0 90 81 89 58 + 1080 0 81 52 58 90 + 1081 0 60 65 43 58 + 1082 0 58 34 43 60 + 1083 0 38 43 34 60 + 1084 0 60 38 30 34 + 1085 0 60 52 58 34 + 1086 0 52 30 34 60 + 1087 0 38 43 26 34 + 1088 0 34 19 26 38 + 1089 0 21 26 19 38 + 1090 0 38 21 15 19 + 1091 0 38 30 34 19 + 1092 0 30 15 19 38 + 1093 0 21 26 18 19 + 1094 0 19 8 18 21 + 1095 0 13 18 8 21 + 1096 0 21 13 6 8 + 1097 0 21 15 19 8 + 1098 0 15 6 8 21 + 1099 0 13 6 8 9 + 1100 0 9 13 18 8 + 1101 0 4 7 8 9 + 1102 0 9 14 7 8 + 1103 0 9 4 6 8 + 1104 0 14 18 8 9 + 1105 0 192 183 252 198 + 1106 0 198 192 262 252 + 1107 0 196 260 252 198 + 1108 0 198 271 260 252 + 1109 0 198 196 183 252 + 1110 0 271 262 252 198 + 1111 0 183 196 198 126 + 1112 0 126 138 198 183 + 1113 0 192 198 138 183 + 1114 0 183 192 127 138 + 1115 0 183 121 126 138 + 1116 0 121 127 138 183 + 1117 0 121 126 138 86 + 1118 0 86 89 138 121 + 1119 0 127 138 89 121 + 1120 0 121 127 81 89 + 1121 0 121 77 86 89 + 1122 0 77 81 89 121 + 1123 0 77 86 89 55 + 1124 0 55 58 89 77 + 1125 0 81 89 58 77 + 1126 0 77 81 52 58 + 1127 0 77 45 55 58 + 1128 0 45 52 58 77 + 1129 0 45 55 58 32 + 1130 0 32 34 58 45 + 1131 0 52 58 34 45 + 1132 0 45 52 30 34 + 1133 0 45 24 32 34 + 1134 0 24 30 34 45 + 1135 0 24 32 34 12 + 1136 0 12 19 34 24 + 1137 0 30 34 19 24 + 1138 0 24 30 15 19 + 1139 0 24 10 12 19 + 1140 0 10 15 19 24 + 1141 0 10 12 19 5 + 1142 0 5 8 19 10 + 1143 0 15 19 8 10 + 1144 0 10 15 6 8 + 1145 0 10 2 5 8 + 1146 0 2 6 8 10 + 1147 0 7 3 1 8 + 1148 0 8 7 4 1 + 1149 0 5 2 1 8 + 1150 0 8 6 2 1 + 1151 0 8 5 3 1 + 1152 0 6 4 1 8 +End Elements + +Begin SubModelPart Parts_Parts_Auto1 // Group Parts Auto1 // Subtree Parts + Begin SubModelPartNodes + 35 + 47 + 48 + 49 + 68 + 69 + 71 + 72 + 73 + 74 + 87 + 92 + 93 + 94 + 95 + 99 + 100 + 107 + 108 + 109 + 113 + 114 + 115 + 120 + 123 + 124 + 130 + 131 + 132 + 133 + 134 + 135 + 145 + 146 + 151 + 155 + 156 + 157 + 159 + 160 + 161 + 163 + 165 + 166 + 167 + 168 + 169 + 175 + 177 + 178 + 179 + 180 + 181 + 182 + 186 + 187 + 188 + 189 + 190 + 191 + 208 + 209 + 210 + 211 + 215 + 216 + 220 + 221 + 222 + 223 + 224 + 225 + 227 + 228 + 229 + 234 + 235 + 236 + 240 + 241 + 242 + 243 + 244 + 245 + 253 + 254 + 255 + 256 + 257 + 258 + 267 + 268 + 269 + 278 + 279 + 280 + 287 + 288 + 289 + 290 + 291 + 292 + 303 + 306 + 307 + 308 + 312 + 313 + 314 + 315 + 316 + 317 + 322 + 323 + 324 + 332 + 333 + 335 + 336 + 337 + 338 + 347 + 348 + 349 + 359 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + 257 + 258 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 269 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 278 + 279 + 280 + 281 + 282 + 283 + 284 + 285 + 286 + 287 + 288 + 289 + 290 + 291 + 292 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 303 + 304 + 305 + 306 + 307 + 308 + 309 + 310 + 311 + 312 + 313 + 314 + 315 + 316 + 317 + 318 + 319 + 320 + 321 + 322 + 323 + 324 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 332 + 333 + 334 + 335 + 336 + 337 + 338 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 347 + 348 + 349 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 359 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + 369 + 370 + 371 + 372 + 373 + 374 + 375 + 376 + 377 + 378 + 379 + 380 + 381 + 382 + 383 + 384 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart Parts_Parts_Auto2 // Group Parts Auto2 // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 70 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 88 + 89 + 90 + 91 + 96 + 97 + 98 + 101 + 102 + 103 + 104 + 105 + 106 + 110 + 111 + 112 + 116 + 117 + 118 + 119 + 121 + 122 + 125 + 126 + 127 + 128 + 129 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 147 + 148 + 149 + 150 + 152 + 153 + 154 + 158 + 162 + 164 + 170 + 171 + 172 + 173 + 174 + 176 + 183 + 184 + 185 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 212 + 213 + 214 + 217 + 218 + 219 + 226 + 230 + 231 + 232 + 233 + 237 + 238 + 239 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 281 + 282 + 283 + 284 + 285 + 286 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 304 + 305 + 309 + 310 + 311 + 318 + 319 + 320 + 321 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 334 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + End SubModelPartNodes + Begin SubModelPartElements + 385 + 386 + 387 + 388 + 389 + 390 + 391 + 392 + 393 + 394 + 395 + 396 + 397 + 398 + 399 + 400 + 401 + 402 + 403 + 404 + 405 + 406 + 407 + 408 + 409 + 410 + 411 + 412 + 413 + 414 + 415 + 416 + 417 + 418 + 419 + 420 + 421 + 422 + 423 + 424 + 425 + 426 + 427 + 428 + 429 + 430 + 431 + 432 + 433 + 434 + 435 + 436 + 437 + 438 + 439 + 440 + 441 + 442 + 443 + 444 + 445 + 446 + 447 + 448 + 449 + 450 + 451 + 452 + 453 + 454 + 455 + 456 + 457 + 458 + 459 + 460 + 461 + 462 + 463 + 464 + 465 + 466 + 467 + 468 + 469 + 470 + 471 + 472 + 473 + 474 + 475 + 476 + 477 + 478 + 479 + 480 + 481 + 482 + 483 + 484 + 485 + 486 + 487 + 488 + 489 + 490 + 491 + 492 + 493 + 494 + 495 + 496 + 497 + 498 + 499 + 500 + 501 + 502 + 503 + 504 + 505 + 506 + 507 + 508 + 509 + 510 + 511 + 512 + 513 + 514 + 515 + 516 + 517 + 518 + 519 + 520 + 521 + 522 + 523 + 524 + 525 + 526 + 527 + 528 + 529 + 530 + 531 + 532 + 533 + 534 + 535 + 536 + 537 + 538 + 539 + 540 + 541 + 542 + 543 + 544 + 545 + 546 + 547 + 548 + 549 + 550 + 551 + 552 + 553 + 554 + 555 + 556 + 557 + 558 + 559 + 560 + 561 + 562 + 563 + 564 + 565 + 566 + 567 + 568 + 569 + 570 + 571 + 572 + 573 + 574 + 575 + 576 + 577 + 578 + 579 + 580 + 581 + 582 + 583 + 584 + 585 + 586 + 587 + 588 + 589 + 590 + 591 + 592 + 593 + 594 + 595 + 596 + 597 + 598 + 599 + 600 + 601 + 602 + 603 + 604 + 605 + 606 + 607 + 608 + 609 + 610 + 611 + 612 + 613 + 614 + 615 + 616 + 617 + 618 + 619 + 620 + 621 + 622 + 623 + 624 + 625 + 626 + 627 + 628 + 629 + 630 + 631 + 632 + 633 + 634 + 635 + 636 + 637 + 638 + 639 + 640 + 641 + 642 + 643 + 644 + 645 + 646 + 647 + 648 + 649 + 650 + 651 + 652 + 653 + 654 + 655 + 656 + 657 + 658 + 659 + 660 + 661 + 662 + 663 + 664 + 665 + 666 + 667 + 668 + 669 + 670 + 671 + 672 + 673 + 674 + 675 + 676 + 677 + 678 + 679 + 680 + 681 + 682 + 683 + 684 + 685 + 686 + 687 + 688 + 689 + 690 + 691 + 692 + 693 + 694 + 695 + 696 + 697 + 698 + 699 + 700 + 701 + 702 + 703 + 704 + 705 + 706 + 707 + 708 + 709 + 710 + 711 + 712 + 713 + 714 + 715 + 716 + 717 + 718 + 719 + 720 + 721 + 722 + 723 + 724 + 725 + 726 + 727 + 728 + 729 + 730 + 731 + 732 + 733 + 734 + 735 + 736 + 737 + 738 + 739 + 740 + 741 + 742 + 743 + 744 + 745 + 746 + 747 + 748 + 749 + 750 + 751 + 752 + 753 + 754 + 755 + 756 + 757 + 758 + 759 + 760 + 761 + 762 + 763 + 764 + 765 + 766 + 767 + 768 + 769 + 770 + 771 + 772 + 773 + 774 + 775 + 776 + 777 + 778 + 779 + 780 + 781 + 782 + 783 + 784 + 785 + 786 + 787 + 788 + 789 + 790 + 791 + 792 + 793 + 794 + 795 + 796 + 797 + 798 + 799 + 800 + 801 + 802 + 803 + 804 + 805 + 806 + 807 + 808 + 809 + 810 + 811 + 812 + 813 + 814 + 815 + 816 + 817 + 818 + 819 + 820 + 821 + 822 + 823 + 824 + 825 + 826 + 827 + 828 + 829 + 830 + 831 + 832 + 833 + 834 + 835 + 836 + 837 + 838 + 839 + 840 + 841 + 842 + 843 + 844 + 845 + 846 + 847 + 848 + 849 + 850 + 851 + 852 + 853 + 854 + 855 + 856 + 857 + 858 + 859 + 860 + 861 + 862 + 863 + 864 + 865 + 866 + 867 + 868 + 869 + 870 + 871 + 872 + 873 + 874 + 875 + 876 + 877 + 878 + 879 + 880 + 881 + 882 + 883 + 884 + 885 + 886 + 887 + 888 + 889 + 890 + 891 + 892 + 893 + 894 + 895 + 896 + 897 + 898 + 899 + 900 + 901 + 902 + 903 + 904 + 905 + 906 + 907 + 908 + 909 + 910 + 911 + 912 + 913 + 914 + 915 + 916 + 917 + 918 + 919 + 920 + 921 + 922 + 923 + 924 + 925 + 926 + 927 + 928 + 929 + 930 + 931 + 932 + 933 + 934 + 935 + 936 + 937 + 938 + 939 + 940 + 941 + 942 + 943 + 944 + 945 + 946 + 947 + 948 + 949 + 950 + 951 + 952 + 953 + 954 + 955 + 956 + 957 + 958 + 959 + 960 + 961 + 962 + 963 + 964 + 965 + 966 + 967 + 968 + 969 + 970 + 971 + 972 + 973 + 974 + 975 + 976 + 977 + 978 + 979 + 980 + 981 + 982 + 983 + 984 + 985 + 986 + 987 + 988 + 989 + 990 + 991 + 992 + 993 + 994 + 995 + 996 + 997 + 998 + 999 + 1000 + 1001 + 1002 + 1003 + 1004 + 1005 + 1006 + 1007 + 1008 + 1009 + 1010 + 1011 + 1012 + 1013 + 1014 + 1015 + 1016 + 1017 + 1018 + 1019 + 1020 + 1021 + 1022 + 1023 + 1024 + 1025 + 1026 + 1027 + 1028 + 1029 + 1030 + 1031 + 1032 + 1033 + 1034 + 1035 + 1036 + 1037 + 1038 + 1039 + 1040 + 1041 + 1042 + 1043 + 1044 + 1045 + 1046 + 1047 + 1048 + 1049 + 1050 + 1051 + 1052 + 1053 + 1054 + 1055 + 1056 + 1057 + 1058 + 1059 + 1060 + 1061 + 1062 + 1063 + 1064 + 1065 + 1066 + 1067 + 1068 + 1069 + 1070 + 1071 + 1072 + 1073 + 1074 + 1075 + 1076 + 1077 + 1078 + 1079 + 1080 + 1081 + 1082 + 1083 + 1084 + 1085 + 1086 + 1087 + 1088 + 1089 + 1090 + 1091 + 1092 + 1093 + 1094 + 1095 + 1096 + 1097 + 1098 + 1099 + 1100 + 1101 + 1102 + 1103 + 1104 + 1105 + 1106 + 1107 + 1108 + 1109 + 1110 + 1111 + 1112 + 1113 + 1114 + 1115 + 1116 + 1117 + 1118 + 1119 + 1120 + 1121 + 1122 + 1123 + 1124 + 1125 + 1126 + 1127 + 1128 + 1129 + 1130 + 1131 + 1132 + 1133 + 1134 + 1135 + 1136 + 1137 + 1138 + 1139 + 1140 + 1141 + 1142 + 1143 + 1144 + 1145 + 1146 + 1147 + 1148 + 1149 + 1150 + 1151 + 1152 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto1 // Group Displacement Auto1 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 3 + 5 + 10 + 11 + 12 + 17 + 23 + 24 + 25 + 29 + 32 + 37 + 40 + 45 + 46 + 54 + 55 + 56 + 62 + 63 + 77 + 78 + 79 + 80 + 83 + 86 + 98 + 101 + 106 + 116 + 117 + 121 + 122 + 126 + 129 + 140 + 143 + 148 + 152 + 164 + 171 + 183 + 184 + 194 + 195 + 196 + 200 + 201 + 204 + 207 + 232 + 233 + 239 + 246 + 251 + 252 + 259 + 260 + 264 + 266 + 276 + 277 + 295 + 296 + 297 + 301 + 302 + 320 + 321 + 329 + 330 + 340 + 341 + 350 + 352 + 353 + 360 + 361 + 366 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto2 // Group Displacement Auto2 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 161 + 179 + 180 + 215 + 222 + 223 + 244 + 245 + 255 + 256 + 280 + 291 + 292 + 307 + 308 + 316 + 317 + 322 + 323 + 335 + 336 + 337 + 347 + 348 + 359 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart Contact_Part // Group CONTACT + Begin SubModelPartNodes + 9 + 13 + 14 + 18 + 21 + 22 + 26 + 28 + 35 + 36 + 38 + 39 + 41 + 43 + 47 + 48 + 50 + 51 + 60 + 61 + 64 + 65 + 70 + 71 + 72 + 73 + 75 + 76 + 90 + 91 + 96 + 97 + 99 + 100 + 102 + 104 + 107 + 108 + 110 + 112 + 120 + 125 + 130 + 131 + 136 + 139 + 141 + 142 + 144 + 147 + 158 + 159 + 160 + 162 + 163 + 165 + 170 + 172 + 176 + 177 + 178 + 185 + 202 + 203 + 212 + 216 + 217 + 218 + 219 + 220 + 221 + 226 + 230 + 231 + 247 + 248 + 253 + 254 + 263 + 265 + 274 + 275 + 281 + 282 + 283 + 286 + 293 + 294 + 306 + 309 + 310 + 311 + 318 + 319 + 327 + 328 + 339 + 342 + 345 + 346 + 356 + 357 + 358 + 364 + 365 + 368 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra_parameters.json new file mode 100755 index 000000000000..2ed42e78f6fb --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra_parameters.json @@ -0,0 +1,152 @@ +{ + "problem_data" : { + "problem_name" : "3D_contact_patch_test_large_disp_tetra", + "model_part_name" : "Structure", + "domain_size" : 3, + "parallel_type" : "OpenMP", + "time_step" : 0.05, + "start_time" : 0.0, + "end_time" : 0.85, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "Static", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Non-Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra", + "input_file_label" : 0 + }, + "material_import_settings" : { + "materials_filename" : "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_materials.json" + }, + "contact_settings": + { + "mortar_type" : "ALMContactFrictionless" + }, + "line_search" : false, + "convergence_criterion" : "Contact_Mixed_criterion", + "displacement_relative_tolerance" : 0.0001, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 30, + "problem_domain_sub_model_part_list" : ["Parts_Parts_Auto1","Parts_Parts_Auto2"], + "processes_sub_model_part_list" : ["Parts_Parts_Auto1","Parts_Parts_Auto2","DISPLACEMENT_Displacement_Auto1","DISPLACEMENT_Displacement_Auto2","Contact_Part"], + "linear_solver_settings" : { + "solver_type" : "SuperLUSolver", + "scaling" : false + } + }, + "constraints_process_list" : [{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_Displacement_Auto1", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,0.0,0.0], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_Displacement_Auto2", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,0.0,"-2.0e-1*t"], + "interval" : [0.0,"End"] + } + }], + "loads_process_list" : [], + "contact_process_list" :[ + { + "python_module" : "alm_contact_process", + "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", + "help" : "", + "process_name" : "ALMContactProcess", + "Parameters" : { + "model_part_name" : "Structure", + "contact_model_part" : "Contact_Part", + "assume_master_slave" : "Parts_Parts_Auto1", + "contact_type" : "Frictionless", + "search_factor" : 1.0, + "max_number_results" : 1000, + "manual_ALM" : true, + "penalty" : 1.0e-6, + "scale_factor" : 1.0e0, + "type_search" : "InRadius", + "integration_order" : 3 + } + } + ], + "_output_configuration" : { + "result_file_configuration" : { + "gidpost_flags" : { + "GiDPostMode" : "GiD_PostBinary", + "WriteDeformedMeshFlag" : "WriteDeformed", + "MultiFileFlag" : "SingleFile" + }, + "file_label" : "step", + "output_control_type" : "step", + "output_frequency" : 1.0, + "body_output" : true, + "node_output" : false, + "skin_output" : false, + "plane_output" : [], + "nodal_results" : ["DISPLACEMENT","REACTION","NORMAL_CONTACT_STRESS","WEIGHTED_GAP"], + "nodal_nonhistorical_results": ["NORMAL"], + "nodal_flags_results": ["ACTIVE","SLAVE"], + "gauss_point_results" : ["VON_MISES_STRESS","CAUCHY_STRESS_TENSOR"] + }, + "point_data_configuration" : [] + }, + "json_check_process" : [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Z","NORMAL_CONTACT_STRESS"], + "input_file_name" : "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra_results.json", + "model_part_name" : "Contact_Part", + "time_frequency" : 1.0 + } + } + ], + "_json_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Z","NORMAL_CONTACT_STRESS"], + "output_file_name" : "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra_results.json", + "model_part_name" : "Contact_Part", + "time_frequency" : 1.0 + } + } + ], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "material_import_settings" : { + "materials_filename" : "StructuralMaterials.json" + } +} diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra_results.json new file mode 100755 index 000000000000..8cff335a9065 --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra_results.json @@ -0,0 +1 @@ +{"NODE_364": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_274": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_28": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_136": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_216": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_176": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_65": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_61": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_147": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_107": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_226": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_64": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_281": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_18": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_345": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_217": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_293": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_43": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_130": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_158": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_294": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_357": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_275": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_253": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_231": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_342": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_73": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_185": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_39": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_311": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_265": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_47": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_368": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_48": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_120": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_282": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_51": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_263": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_286": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "TIME": [], "NODE_96": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_356": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_254": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_365": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_163": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_13": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_327": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_141": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_100": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_339": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_177": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_22": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_248": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_212": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_75": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_26": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_72": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_131": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_218": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_203": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_139": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_110": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_346": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_142": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_310": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_108": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_21": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_306": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_99": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_38": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_170": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_160": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_9": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_102": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_283": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_159": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_36": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_319": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_230": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_144": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_328": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_318": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_35": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_247": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_91": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_71": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_202": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_41": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_220": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_358": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_60": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_178": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_104": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_165": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_112": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_125": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_309": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_219": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_97": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_76": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_14": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_90": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_50": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_221": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_162": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_70": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}, "NODE_172": {"DISPLACEMENT_Z": [], "NORMAL_CONTACT_STRESS": []}} \ No newline at end of file diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_adaptative_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_adaptative_test_parameters.json index dfc0f16d5bbc..00bd16d04d8a 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_adaptative_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_adaptative_test_parameters.json @@ -81,7 +81,7 @@ } }], "loads_process_list" : [], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_adaptative_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_adaptative_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_slope_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_slope_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_slope_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_slope_test_parameters.json index 33084d37ab3b..d4c1992291be 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_slope_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_slope_test_parameters.json @@ -11,7 +11,7 @@ }, "solver_settings" : { "solver_type" : "Static", - "echo_level" : 1, + "echo_level" : 0, "solution_type" : "Static", "analysis_type" : "Linear", "model_import_settings" : { diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_slope_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_slope_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_test_parameters.json index de13086e704d..7975f25a62de 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_test_parameters.json @@ -68,7 +68,7 @@ } }], "loads_process_list" : [], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "alm_contact_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/ALM_frictionless_contact_test_3D/3D_contact_simplest_patch_matching_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/Kratos_Execute_Contact_Structural_Test.py b/applications/ContactStructuralMechanicsApplication/tests/Kratos_Execute_Contact_Structural_Test.py index b453a45d4195..b7422e0c00e0 100644 --- a/applications/ContactStructuralMechanicsApplication/tests/Kratos_Execute_Contact_Structural_Test.py +++ b/applications/ContactStructuralMechanicsApplication/tests/Kratos_Execute_Contact_Structural_Test.py @@ -58,8 +58,8 @@ def __init__(self, ProjectParameters): self.list_of_processes += process_factory.KratosProcessFactory(self.Model).ConstructListOfProcesses(self.ProjectParameters["json_check_process"]) if (ProjectParameters.Has("json_output_process") == True): self.list_of_processes += process_factory.KratosProcessFactory(self.Model).ConstructListOfProcesses(self.ProjectParameters["json_output_process"]) - if (ProjectParameters.Has("contact_processes") == True): # NOTE: Always add the contact processes the last one (to avoid problems imposing displacements) - self.list_of_processes += process_factory.KratosProcessFactory(self.Model).ConstructListOfProcesses(self.ProjectParameters["contact_processes"]) + if (ProjectParameters.Has("contact_process_list") == True): # NOTE: Always add the contact processes the last one (to avoid problems imposing displacements) + self.list_of_processes += process_factory.KratosProcessFactory(self.Model).ConstructListOfProcesses(self.ProjectParameters["contact_process_list"]) for process in self.list_of_processes: process.ExecuteInitialize() diff --git a/applications/ContactStructuralMechanicsApplication/tests/ValidationTests.py b/applications/ContactStructuralMechanicsApplication/tests/ValidationTests.py index b3b117320891..4a6311f04aa7 100644 --- a/applications/ContactStructuralMechanicsApplication/tests/ValidationTests.py +++ b/applications/ContactStructuralMechanicsApplication/tests/ValidationTests.py @@ -48,3 +48,12 @@ class ALMIroningTestContact(StructuralMechanichsTestFactory): class ALMIroningDieTestContact(StructuralMechanichsTestFactory): file_name = "ALM_frictionless_contact_test_2D/ironing_die_test" + +class LargeDisplacementPatchTestHexa(StructuralMechanichsTestFactory): + file_name = "mesh_tying_test/3D_contact_patch_test_large_disp_hexa" + +class ALMLargeDisplacementPatchTestTetra(StructuralMechanichsTestFactory): + file_name = "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_tetra" + +class ALMLargeDisplacementPatchTestHexa(StructuralMechanichsTestFactory): + file_name = "ALM_frictionless_contact_test_3D/3D_contact_patch_test_large_disp_hexa" diff --git a/applications/ContactStructuralMechanicsApplication/tests/integration_tests/quadrilaterals_moving_nodes.mdpa b/applications/ContactStructuralMechanicsApplication/tests/integration_tests/quadrilaterals_moving_nodes.mdpa new file mode 100755 index 000000000000..b1a481d7b929 --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/integration_tests/quadrilaterals_moving_nodes.mdpa @@ -0,0 +1,586 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Nodes + 1 0.0000000000 1.0000000000 0.0000000000 + 2 0.1250000000 1.0000000000 0.0000000000 + 3 0.0000000000 0.8750000000 0.0000000000 + 4 0.1250000000 0.8750000000 0.0000000000 + 5 0.2500000000 1.0000000000 0.0000000000 + 6 0.0000000000 0.7500000000 0.0000000000 + 7 0.2500000000 0.8750000000 0.0000000000 + 8 0.1250000000 0.7500000000 0.0000000000 + 9 0.2500000000 0.7500000000 0.0000000000 + 10 0.2500000000 0.7500000000 0.0010000000 + 11 0.3750000000 1.0000000000 0.0000000000 + 12 0.0000000000 0.6250000000 0.0000000000 + 13 0.1250000000 0.6250000000 0.0000000000 + 14 0.3750000000 0.8750000000 0.0000000000 + 15 0.2500000000 0.6250000000 0.0000000000 + 16 0.3750000000 0.7500000000 0.0000000000 + 17 0.3750000000 0.7500000000 0.0010000000 + 18 0.2500000000 0.6250000000 0.0010000000 + 19 0.5000000000 1.0000000000 0.0000000000 + 20 0.0000000000 0.5000000000 0.0000000000 + 21 0.1250000000 0.5000000000 0.0000000000 + 22 0.5000000000 0.8750000000 0.0000000000 + 23 0.3750000000 0.6250000000 0.0000000000 + 24 0.3750000000 0.6250000000 0.0010000000 + 25 0.2500000000 0.5000000000 0.0000000000 + 26 0.5000000000 0.7500000000 0.0000000000 + 27 0.5000000000 0.7500000000 0.0010000000 + 28 0.2500000000 0.5000000000 0.0010000000 + 29 0.6250000000 1.0000000000 0.0000000000 + 30 0.0000000000 0.3750000000 0.0000000000 + 31 0.3750000000 0.5000000000 0.0000000000 + 32 0.5000000000 0.6250000000 0.0000000000 + 33 0.3750000000 0.5000000000 0.0010000000 + 34 0.5000000000 0.6250000000 0.0010000000 + 35 0.1250000000 0.3750000000 0.0000000000 + 36 0.6250000000 0.8750000000 0.0000000000 + 37 0.2500000000 0.3750000000 0.0000000000 + 38 0.6250000000 0.7500000000 0.0000000000 + 39 0.6250000000 0.7500000000 0.0010000000 + 40 0.2500000000 0.3750000000 0.0010000000 + 41 0.5000000000 0.5000000000 0.0000000000 + 42 0.5000000000 0.5000000000 0.0010000000 + 43 0.3750000000 0.3750000000 0.0000000000 + 44 0.6250000000 0.6250000000 0.0000000000 + 45 0.3750000000 0.3750000000 0.0010000000 + 46 0.6250000000 0.6250000000 0.0010000000 + 47 0.7500000000 1.0000000000 0.0000000000 + 48 0.0000000000 0.2500000000 0.0000000000 + 49 0.7500000000 0.8750000000 0.0000000000 + 50 0.1250000000 0.2500000000 0.0000000000 + 51 0.7500000000 0.7500000000 0.0000000000 + 52 0.2500000000 0.2500000000 0.0000000000 + 53 0.2500000000 0.2500000000 0.0010000000 + 54 0.7500000000 0.7500000000 0.0010000000 + 55 0.5000000000 0.3750000000 0.0000000000 + 56 0.6250000000 0.5000000000 0.0000000000 + 57 0.6250000000 0.5000000000 0.0010000000 + 58 0.5000000000 0.3750000000 0.0010000000 + 59 0.7500000000 0.6250000000 0.0000000000 + 60 0.3750000000 0.2500000000 0.0000000000 + 61 0.3750000000 0.2500000000 0.0010000000 + 62 0.7500000000 0.6250000000 0.0010000000 + 63 0.8750000000 1.0000000000 0.0000000000 + 64 0.0000000000 0.1250000000 0.0000000000 + 65 0.1250000000 0.1250000000 0.0000000000 + 66 0.6250000000 0.3750000000 0.0000000000 + 67 0.8750000000 0.8750000000 0.0000000000 + 68 0.6250000000 0.3750000000 0.0010000000 + 69 0.7500000000 0.5000000000 0.0000000000 + 70 0.5000000000 0.2500000000 0.0000000000 + 71 0.5000000000 0.2500000000 0.0010000000 + 72 0.7500000000 0.5000000000 0.0010000000 + 73 0.2500000000 0.1250000000 0.0000000000 + 74 0.8750000000 0.7500000000 0.0000000000 + 75 0.3750000000 0.1250000000 0.0000000000 + 76 0.8750000000 0.6250000000 0.0000000000 + 77 0.7500000000 0.3750000000 0.0000000000 + 78 0.6250000000 0.2500000000 0.0000000000 + 79 0.6250000000 0.2500000000 0.0010000000 + 80 0.7500000000 0.3750000000 0.0010000000 + 81 0.0000000000 0.0000000000 0.0000000000 + 82 1.0000000000 1.0000000000 0.0000000000 + 83 0.1250000000 0.0000000000 0.0000000000 + 84 1.0000000000 0.8750000000 0.0000000000 + 85 0.5000000000 0.1250000000 0.0000000000 + 86 0.8750000000 0.5000000000 0.0000000000 + 87 0.2500000000 0.0000000000 0.0000000000 + 88 1.0000000000 0.7500000000 0.0000000000 + 89 0.7500000000 0.2500000000 0.0000000000 + 90 0.7500000000 0.2500000000 0.0010000000 + 91 0.3750000000 0.0000000000 0.0000000000 + 92 1.0000000000 0.6250000000 0.0000000000 + 93 0.6250000000 0.1250000000 0.0000000000 + 94 0.8750000000 0.3750000000 0.0000000000 + 95 0.5000000000 0.0000000000 0.0000000000 + 96 1.0000000000 0.5000000000 0.0000000000 + 97 0.7500000000 0.1250000000 0.0000000000 + 98 0.8750000000 0.2500000000 0.0000000000 + 99 0.6250000000 0.0000000000 0.0000000000 + 100 1.0000000000 0.3750000000 0.0000000000 + 101 0.8750000000 0.1250000000 0.0000000000 + 102 0.7500000000 0.0000000000 0.0000000000 + 103 1.0000000000 0.2500000000 0.0000000000 + 104 0.8750000000 0.0000000000 0.0000000000 + 105 1.0000000000 0.1250000000 0.0000000000 + 106 1.0000000000 0.0000000000 0.0000000000 +End Nodes + + +Begin Elements MembraneElement3D4N// GUI group identifier: Parts Auto1 + 1 0 83 65 64 81 + 2 0 87 73 65 83 + 3 0 91 75 73 87 + 4 0 95 85 75 91 + 5 0 99 93 85 95 + 6 0 102 97 93 99 + 7 0 104 101 97 102 + 8 0 106 105 101 104 + 9 0 65 50 48 64 + 10 0 73 52 50 65 + 11 0 75 60 52 73 + 12 0 85 70 60 75 + 13 0 93 78 70 85 + 14 0 97 89 78 93 + 15 0 101 98 89 97 + 16 0 105 103 98 101 + 17 0 50 35 30 48 + 18 0 52 37 35 50 + 19 0 60 43 37 52 + 20 0 70 55 43 60 + 21 0 78 66 55 70 + 22 0 89 77 66 78 + 23 0 98 94 77 89 + 24 0 103 100 94 98 + 25 0 35 21 20 30 + 26 0 37 25 21 35 + 27 0 43 31 25 37 + 28 0 55 41 31 43 + 29 0 66 56 41 55 + 30 0 77 69 56 66 + 31 0 94 86 69 77 + 32 0 100 96 86 94 + 33 0 21 13 12 20 + 34 0 25 15 13 21 + 35 0 31 23 15 25 + 36 0 41 32 23 31 + 37 0 56 44 32 41 + 38 0 69 59 44 56 + 39 0 86 76 59 69 + 40 0 96 92 76 86 + 41 0 13 8 6 12 + 42 0 15 9 8 13 + 43 0 23 16 9 15 + 44 0 32 26 16 23 + 45 0 44 38 26 32 + 46 0 59 51 38 44 + 47 0 76 74 51 59 + 48 0 92 88 74 76 + 49 0 8 4 3 6 + 50 0 9 7 4 8 + 51 0 16 14 7 9 + 52 0 26 22 14 16 + 53 0 38 36 22 26 + 54 0 51 49 36 38 + 55 0 74 67 49 51 + 56 0 88 84 67 74 + 57 0 4 2 1 3 + 58 0 7 5 2 4 + 59 0 14 11 5 7 + 60 0 22 19 11 14 + 61 0 36 29 19 22 + 62 0 49 47 29 36 + 63 0 67 63 47 49 + 64 0 84 82 63 67 +End Elements + +Begin Elements MembraneElement3D4N// GUI group identifier: Parts Auto2 + 65 0 53 40 45 61 + 66 0 61 45 58 71 + 67 0 71 58 68 79 + 68 0 79 68 80 90 + 69 0 40 28 33 45 + 70 0 45 33 42 58 + 71 0 58 42 57 68 + 72 0 68 57 72 80 + 73 0 28 18 24 33 + 74 0 33 24 34 42 + 75 0 42 34 46 57 + 76 0 57 46 62 72 + 77 0 18 10 17 24 + 78 0 24 17 27 34 + 79 0 34 27 39 46 + 80 0 46 39 54 62 +End Elements + +Begin SubModelPart Parts_Parts_Auto2 // Group Parts Auto1 // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 11 + 12 + 13 + 14 + 15 + 16 + 19 + 20 + 21 + 22 + 23 + 25 + 26 + 29 + 30 + 31 + 32 + 35 + 36 + 37 + 38 + 41 + 43 + 44 + 47 + 48 + 49 + 50 + 51 + 52 + 55 + 56 + 59 + 60 + 63 + 64 + 65 + 66 + 67 + 69 + 70 + 73 + 74 + 75 + 76 + 77 + 78 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart Parts_Parts_Auto1 // Group Parts Auto2 // Subtree Parts + Begin SubModelPartNodes + 10 + 17 + 18 + 24 + 27 + 28 + 33 + 34 + 39 + 40 + 42 + 45 + 46 + 53 + 54 + 57 + 58 + 61 + 62 + 68 + 71 + 72 + 79 + 80 + 90 + End SubModelPartNodes + Begin SubModelPartElements + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto2 // Group Displacement Auto3 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart + +Begin SubModelPart GroupPositiveX + Begin SubModelPartNodes + 54 + 62 + 72 + 80 + 90 + 46 + 57 + 68 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart + +Begin SubModelPart GroupNegativeX + Begin SubModelPartNodes + 10 + 18 + 28 + 40 + 53 + 24 + 33 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart + +Begin SubModelPart GroupPositiveY + Begin SubModelPartNodes + 10 + 17 + 27 + 39 + 54 + 24 + 34 + 46 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart + +Begin SubModelPart GroupNegativeY + Begin SubModelPartNodes + 90 + 79 + 71 + 61 + 53 + 68 + 58 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart diff --git a/applications/ContactStructuralMechanicsApplication/tests/integration_tests/test_double_curvature_integration_quadrilateral.mdpa b/applications/ContactStructuralMechanicsApplication/tests/integration_tests/test_double_curvature_integration_quadrilateral.mdpa new file mode 100755 index 000000000000..82008c6b07d0 --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/integration_tests/test_double_curvature_integration_quadrilateral.mdpa @@ -0,0 +1,11810 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Nodes + 1 64.3496778316 0.0000000000 0.0000000000 + 2 63.7125523085 0.0000000000 0.0000000000 + 3 64.0435143760 1.4723121515 0.0000000000 + 4 64.3458061644 0.0294082322 1.5247968859 + 5 63.7085199958 0.0306284558 1.5621233308 + 6 63.3959581587 1.5224724095 0.0000000000 + 7 64.0963263440 1.3216845216 1.5505785557 + 8 63.4467628509 1.3916670566 1.5963027290 + 9 63.7373509204 2.9446243029 0.0000000000 + 10 64.1288668493 1.1566640652 2.8045613350 + 11 64.3339544617 0.1194308514 3.0518346790 + 12 63.8719110095 2.5854392020 1.8114031558 + 13 63.6962098768 0.1241330932 3.1230850825 + 14 63.4803203379 1.2196822543 2.8691871008 + 15 63.0793640088 3.0449448189 0.0000000000 + 16 63.2124794003 2.7096170273 1.8509853463 + 17 63.9785309264 1.9966907485 3.7388004935 + 18 63.3206548863 2.1142474698 3.8194800084 + 19 63.5854799164 4.0324153013 1.8586143663 + 20 63.4311874649 4.4169364544 0.0000000000 + 21 64.3138225526 0.2723478826 4.5783730248 + 22 63.6753637113 0.2824754403 4.6800786470 + 23 62.7627698590 4.5674172284 0.0000000000 + 24 62.9006741635 4.2287521916 1.8804614928 + 25 63.6606080582 3.6992967382 3.6618487146 + 26 62.9708099807 3.9427360797 3.7310600615 + 27 63.2094670946 5.3911486054 1.8935114620 + 28 63.1250240093 5.8892486059 0.0000000000 + 29 63.9481853714 2.1907954498 5.6217352198 + 30 64.2852018377 0.4897437957 6.1014817270 + 31 62.4677628424 5.6613663844 1.8697165698 + 32 63.3355807947 5.0289599317 3.6125976422 + 33 63.2905757541 2.3052151074 5.7487141414 + 34 63.6458236742 0.5068542982 6.2301385677 + 35 62.3841762777 6.0643830366 0.0000000000 + 36 63.6616625497 3.7104477637 5.2539903844 + 37 62.5661550400 5.4302230571 3.5746529623 + 38 62.9664217829 3.9862416884 5.4040865699 + 39 63.4082361078 4.8044324932 4.9173421956 + 40 62.6676948442 6.6800784318 1.9704427532 + 41 62.3348849121 7.1624529035 0.0000000000 + 42 62.9166661371 6.2191881800 3.8827490609 + 43 62.5934086651 5.4061009210 5.1168532508 + 44 64.2479966650 0.7723451392 7.6181669773 + 45 61.8371042932 6.9959420813 1.8425164397 + 46 63.8954911799 2.5122955100 7.2241646072 + 47 63.6075529271 0.7975494833 7.7702797020 + 48 61.5377523209 7.3688831626 0.0000000000 + 49 62.0223360170 6.7140222323 3.4254690519 + 50 63.2437026720 2.5940870932 7.3814892395 + 51 63.5829041167 4.1122197760 6.7197783617 + 52 63.1647162904 5.6632116431 5.8579099106 + 53 62.9215395439 4.2243193039 6.9645181528 + 54 62.0773162956 6.6738417835 4.7082557854 + 55 61.8718470576 7.9656853855 2.0195439447 + 56 62.2129950854 7.5575385171 3.9965564016 + 57 62.5043601518 5.7468479872 6.4795185631 + 58 61.5163477294 8.4239742127 0.0000000000 + 59 61.3358481370 7.8398816802 3.4299497167 + 60 60.9872298167 8.2377890885 1.8660918875 + 61 61.5799335563 7.5358468724 4.4098757985 + 62 64.2022414141 1.1198907743 9.1255315972 + 63 63.8335369132 2.8901299014 8.7848818752 + 64 63.5606508898 1.1538058256 9.2976679202 + 65 60.6913283642 8.6733832886 0.0000000000 + 66 62.5135984975 7.1788022842 5.8253676046 + 67 63.1742609887 3.0081836503 8.9180099947 + 68 63.5073949014 4.5021112179 8.3281424795 + 69 61.8832415026 7.1263726817 5.7919728022 + 70 63.1079619939 5.9518788860 7.7331717775 + 71 62.8222844666 4.7121934716 8.5052090521 + 72 60.8542385813 9.1593031050 2.0928230523 + 73 61.1623909217 8.1733139855 4.8677662550 + 74 62.6829850080 6.9649505820 7.1630127917 + 75 60.5596060437 8.8147805132 3.5577777285 + 76 60.4750431968 9.4884338923 0.0000000000 + 77 61.2588519743 8.8380768315 4.1698711326 + 78 62.3168355905 6.3775656320 7.9805754862 + 79 60.0102791148 9.2964132375 1.9088373534 + 80 64.1481107729 1.5310538147 10.6209558985 + 81 59.5216335508 9.6919156469 0.0000000000 + 82 61.6845159962 8.4935122529 6.1861617205 + 83 63.7641268436 3.3150693227 10.3169506541 + 84 63.5053607891 1.5737758360 10.8098063481 + 85 61.4544066174 7.9657757164 7.0712546419 + 86 63.4204788450 4.9486212281 9.8931616935 + 87 63.0918591229 3.4960361497 10.4751966986 + 88 62.2950596511 7.7772107935 7.9030582309 + 89 59.6351009659 10.1964419896 2.1355038950 + 90 60.3329854057 9.2206450044 5.6201095797 + 91 62.7130616986 5.2466127696 10.1417715401 + 92 59.3228075203 10.4547630694 0.0000000000 + 93 59.4881925172 9.8519425071 3.8687421806 + 94 62.9182826081 6.6423269807 9.4690527360 + 95 60.0286016403 10.0294796081 4.3367669368 + 96 58.8077356229 10.2557728477 2.0104318062 + 97 58.3301423137 10.6911667291 0.0000000000 + 98 64.0859215334 2.0034279871 12.1022795640 + 99 62.0908749104 7.1227880481 9.7998736139 + 100 63.6948227413 3.7500037357 11.8079864708 + 101 60.5543939322 9.8161708234 6.7376404579 + 102 63.4420681212 2.0545313780 12.3047156253 + 103 63.3731422785 5.2340908993 11.4082056790 + 104 61.6312705122 8.8721931903 8.6549498116 + 105 63.0794535938 6.3130322066 10.9439190209 + 106 58.2967955278 11.0210607515 2.1174389843 + 107 63.0168699476 3.9607149323 12.0790122615 + 108 58.0647789599 11.2348472058 0.0000000000 + 109 58.6182419350 10.9729366726 4.2364455099 + 110 58.1268144291 10.8028316162 4.1060288525 + 111 60.8005061680 9.0912726801 8.8138673045 + 112 57.4402280985 11.0544227346 2.0501917403 + 113 62.3800537567 7.9681700625 10.4025437366 + 114 62.6081893706 5.7882001297 11.9811250306 + 115 56.9279161659 11.3194256366 0.0000000000 + 116 58.8399156420 10.5999827513 6.5493501723 + 117 60.3121282051 10.2291863108 8.1183509960 + 118 59.0452676016 10.9307307207 6.3207574678 + 119 62.8835338054 7.0065569188 11.8048223453 + 120 64.0161255943 2.5335807786 13.5679625378 + 121 63.6051038110 4.2911226748 13.2283605855 + 122 63.2633527598 5.7819836365 12.6655099670 + 123 56.9072493275 11.6794268034 2.1334799319 + 124 56.6447106337 11.7296654368 0.0000000000 + 125 63.3712901934 2.5921431142 13.7810856178 + 126 60.9716238646 9.8053364936 9.5251396451 + 127 57.2186747302 11.6727992643 4.2123054603 + 128 62.9511026622 4.3953768804 13.5953535293 + 129 56.5545168921 11.5724193322 3.8551721027 + 130 59.3767913792 10.9604856497 8.0839078857 + 131 55.9744362398 11.7106098500 1.9753097039 + 132 57.1276527677 11.4603817824 5.4964949988 + 133 55.4594674785 11.8311018486 0.0000000000 + 134 62.5953455921 5.9590384751 13.4520071309 + 135 61.8975711182 7.9145904721 12.2840695871 + 136 57.5565123007 11.7268079312 6.2187750506 + 137 61.7144176704 9.2606729756 11.5793297548 + 138 60.0344715770 10.7447966631 9.7346180498 + 139 55.2246423074 12.2244836679 0.0000000000 + 140 55.4584658106 12.2553426680 2.1298663577 + 141 63.9392953817 3.1171641813 15.0172055348 + 142 62.6311808435 7.8556878230 13.0700532212 + 143 62.2465851646 7.1881375244 13.4263015935 + 144 63.5030159953 4.9002319639 14.6538802979 + 145 63.1237446315 6.4605410753 14.0631993528 + 146 58.1502936072 11.7191250327 8.1934509851 + 147 55.7011615746 12.2858710895 4.1793228738 + 148 63.2936584550 3.1818147102 15.2383803220 + 149 60.6709616001 10.4297300660 11.1364130825 + 150 55.1071944862 12.1647633521 3.9754079886 + 151 54.4903472848 12.2913505719 1.9705042048 + 152 62.8616438603 4.9558120959 15.0675551531 + 153 55.8723243033 12.0703604679 6.0455277265 + 154 56.0790308776 12.3499412838 6.2171451770 + 155 54.0166042666 12.4030938968 0.0000000000 + 156 62.5055849074 6.4514067867 14.8517954150 + 157 58.9706749104 11.6050705091 10.1404184527 + 158 57.2680323070 11.8815154688 8.8905585105 + 159 59.9174920839 10.6352384192 11.8565181460 + 160 53.8699733754 12.8734760578 0.0000000000 + 161 54.0294900338 12.8355094809 2.0887266926 + 162 62.1413306384 7.6738779257 14.6332170177 + 163 56.6794121636 12.4227616345 8.3226529680 + 164 54.2328623594 12.8608990262 4.1070214802 + 165 63.8561041263 3.7490645022 16.4500178549 + 166 61.6837223949 8.7402680175 14.3120996453 + 167 60.0947866049 11.1833630412 12.0658395512 + 168 63.3977561714 5.5345750398 16.0768289592 + 169 61.4495211798 10.0321710946 13.4560591052 + 170 62.9843622303 7.1403599042 15.4725600900 + 171 62.4273967638 8.6190952202 14.6499457371 + 172 63.2098964488 3.8180503138 16.6768861003 + 173 53.4859053631 12.8127559303 3.9515039136 + 174 53.0214448501 12.9234614040 1.9631592327 + 175 54.5316287886 12.9344916071 6.1370173361 + 176 62.7635710799 5.5651485020 16.4895985220 + 177 54.0557983012 12.7766714526 6.0966489564 + 178 52.6281288530 13.1033010942 0.0000000000 + 179 57.6104079624 12.4675087505 10.6501983489 + 180 62.3943445313 7.0396243157 16.2224901991 + 181 52.5272434771 13.5506138231 0.0000000000 + 182 52.6719786117 13.5307570835 2.0174848019 + 183 62.0330345728 8.1896996352 15.8847742769 + 184 54.9582346369 13.0672895636 8.2427213354 + 185 61.6829000353 8.9950765105 15.5362204858 + 186 52.8015447913 13.5495302822 3.9825663814 + 187 54.6299316387 12.9022408747 8.5076087560 + 188 60.7416979107 10.3815872790 14.7441320477 + 189 63.7673040405 4.4235681187 17.8672292688 + 190 63.2896186625 6.2003199645 17.5321757089 + 191 63.1207966028 4.4948308353 18.0977030313 + 192 53.0006906423 13.6063601386 5.9602916623 + 193 51.9587738019 13.6004202178 3.8712348685 + 194 51.6323976589 13.7293404513 1.9281380831 + 195 62.8523350945 7.8281553615 17.0561464028 + 196 56.4820197296 12.7729805788 11.4045245901 + 197 62.2381130880 9.3842360691 16.2972906717 + 198 61.0529902009 10.9610887104 15.1161030636 + 199 51.2396534394 13.8035082915 0.0000000000 + 200 52.3431718209 13.5408251987 5.9358081536 + 201 62.6448654454 6.2735996619 17.9033699460 + 202 55.6344354617 13.2625255840 10.5572767090 + 203 58.9473646125 12.4148841706 13.4549567806 + 204 61.3229689229 9.8833835784 16.3026740883 + 205 53.3182331395 13.7129889880 8.0674010338 + 206 62.2401443859 7.7971641353 17.5978655384 + 207 51.2897481855 14.3633821315 0.0000000000 + 208 51.4488133171 14.3903076076 1.9372397453 + 209 61.8123915708 9.0198067515 17.1216949804 + 210 51.5465392355 14.3880279601 3.8440670828 + 211 52.6105553193 13.6581783851 8.0288769765 + 212 54.5267516478 13.4187957604 10.9421710388 + 213 63.6737053138 5.1345210320 19.2704512977 + 214 51.6664001739 14.4313762007 5.7881649667 + 215 63.1735524718 6.9080144326 18.9510785764 + 216 63.0271987346 5.2057772281 19.5026873788 + 217 53.7452721352 13.9228042064 10.3383891902 + 218 50.6583366171 14.5505715432 3.8061714608 + 219 50.4045013687 14.7047187916 1.9023361052 + 220 56.4441022547 13.5879564942 13.1002721849 + 221 57.5309500980 13.0194725395 14.2496990002 + 222 62.7124051979 8.5453497908 18.5332917651 + 223 50.9151107279 14.4670062128 5.7427932692 + 224 50.1728196934 14.9182600517 0.0000000000 + 225 62.5179225676 7.0204384952 19.2912668658 + 226 62.0814547505 10.1102642513 17.9464386077 + 227 51.7622427069 14.5631425513 7.7491560528 + 228 50.3276302458 15.4077421186 1.8507505602 + 229 50.3002605156 15.4957925182 0.0000000000 + 230 52.5697711880 14.0239285389 10.1242965309 + 231 59.6190480253 12.1358176949 16.4101230532 + 232 62.0747038348 8.5972041175 18.9874573374 + 233 60.9388425166 11.6911794149 17.1606426090 + 234 51.1164506821 14.5062275954 7.6866750788 + 235 50.3919690182 15.3984589192 3.6760079789 + 236 61.5622190325 9.9357349069 18.5040573043 + 237 60.7931677872 11.1417816247 17.7645485094 + 238 63.5761581652 5.8754651874 20.6619985179 + 239 50.4479720388 15.4420412600 5.5271682467 + 240 59.1068758966 13.1335899543 16.2193571750 + 241 54.1798936061 14.2853932257 12.6519761244 + 242 51.9317674212 14.7678946150 9.9827143496 + 243 62.9299722955 5.9442853527 20.8943576132 + 244 63.0545348397 7.6409389717 20.3683575276 + 245 49.5000619021 15.6515659728 3.7191086941 + 246 51.1710471710 14.7037865315 9.4734424093 + 247 49.2971466462 15.8238530359 1.8647372778 + 248 54.3254368645 14.1668952021 13.6274477909 + 249 49.6867395593 15.5477463423 5.5505849328 + 250 49.1496211309 16.0892505705 0.0000000000 + 251 62.5858092082 9.2411022858 20.0391770523 + 252 50.4496949661 15.5977410629 7.5170882918 + 253 62.3864311377 7.8001013733 20.7138843033 + 254 56.8637752408 14.1788742820 15.6185271189 + 255 49.3319550652 16.5175063156 1.8005868020 + 256 49.3107728457 16.6282029049 0.0000000000 + 257 49.8825497432 15.4992874109 7.4368997733 + 258 61.9625387197 10.7875609677 19.5906846212 + 259 49.3867897835 16.4899989929 3.5739202973 + 260 52.0492919869 14.6783132279 12.1194193294 + 261 61.9039449470 9.4332708026 20.4625308633 + 262 51.1020124449 14.9867131665 10.9383217193 + 263 52.3139185737 14.9979947269 12.3211690154 + 264 49.4260586116 16.5118938385 5.3403190364 + 265 60.9117329923 12.3325247416 19.0725208883 + 266 63.4755392342 6.6397418461 22.0447824262 + 267 61.3004251104 10.9239131609 20.1105133408 + 268 50.0271431173 15.5676645652 9.3228346110 + 269 54.5745303060 14.8290051302 15.0439008130 + 270 62.8300033479 6.7036248973 22.2757772756 + 271 62.9327825710 8.3925868184 21.7662344854 + 272 48.4991855028 16.8228317824 3.6820447775 + 273 49.4299030043 16.6059415203 7.0624446497 + 274 48.3179912335 17.0268481057 1.8488057862 + 275 50.2563581729 16.0194855195 9.7678975503 + 276 60.3391046094 12.3440169745 19.5960214272 + 277 48.6681771527 16.6755314821 5.5108498243 + 278 59.2706586462 13.8007695848 18.5348705127 + 279 48.1264225684 17.2602410892 0.0000000000 + 280 62.4600757760 9.9384288353 21.4735645331 + 281 62.2641664540 8.5553133688 22.1321215717 + 282 58.8378138268 13.6270765887 18.7792577062 + 283 48.4310072876 17.7086677667 1.7596803457 + 284 48.8303587893 16.5869435263 7.3606126113 + 285 48.3212851758 17.7606132916 0.0000000000 + 286 50.1404580138 15.7321783894 11.1913530106 + 287 49.4081687640 16.7345808888 8.4482753411 + 288 48.4752693054 17.6691651131 3.5047888306 + 289 52.5632184226 15.4042005247 14.4577844359 + 290 61.8854813061 11.3926927568 21.2001881318 + 291 56.5463567683 14.6452148288 17.6892383824 + 292 50.7568655438 15.9760615761 12.2403886256 + 293 48.5066038869 17.6686054025 5.2521976890 + 294 61.7456262932 10.2475649940 21.9814958098 + 295 48.9751793646 16.5736398456 9.1864020270 + 296 57.1177905154 14.8915444665 17.9713485187 + 297 63.3727426360 7.4205595298 23.4221889954 + 298 48.5232247583 17.7137669788 7.0191331940 + 299 60.9761662384 12.8822664665 20.9575801851 + 300 62.7281863177 7.4770020229 23.6504257575 + 301 47.6130010074 18.0523551026 3.6520893858 + 302 62.8171873697 9.1284963835 23.1429557547 + 303 47.4670846785 18.2619858898 1.8475931830 + 304 51.1738016421 16.0181475442 13.9028640467 + 305 61.0924639723 11.8183458567 21.7580007320 + 306 49.1066159846 16.6100677426 10.7886206389 + 307 47.7455223966 17.8930477200 5.4760067670 + 308 54.7083713910 15.5569698123 17.3403093976 + 309 47.1332700521 18.4494643500 0.0000000000 + 310 62.3512135280 10.5915969528 22.8738710922 + 311 48.5903375489 17.7262231008 8.7978712107 + 312 47.6341634134 18.9489260495 1.7745891091 + 313 47.8689578728 17.7858334003 7.3398579539 + 314 50.3495023846 16.0425392103 13.7509359036 + 315 47.4704242879 18.9771461061 0.0000000000 + 316 62.1415705084 9.3270708678 23.5712022514 + 317 47.6546710681 18.9199438457 3.5433483245 + 318 60.0761542626 13.3093093101 21.4306025834 + 319 59.4580081149 14.4027623478 20.5887371917 + 320 48.9371451942 17.4625582518 10.6274945773 + 321 61.8359484929 11.9134545613 22.6670912316 + 322 53.0602259428 15.6598780077 17.0563183491 + 323 47.6437927336 18.9515914944 5.3287780927 + 324 48.0004145661 17.7271966263 9.3724549573 + 325 52.2921271360 16.1129826985 16.4928770035 + 326 63.2686752240 8.2110300025 24.7979478304 + 327 61.5888163861 11.0759860138 23.5351694307 + 328 49.4055779749 17.2631604575 12.9547469454 + 329 58.5165431354 14.7053332034 20.9841056328 + 330 46.8329963614 19.3430440150 3.6495494137 + 331 47.5949982276 19.0566127827 7.1630958846 + 332 62.6254198433 8.2575908934 25.0220644191 + 333 46.7151724629 19.5727996654 1.8534165321 + 334 62.6953632433 9.8792344485 24.4679185848 + 335 57.3276250374 15.6328843929 20.1425851366 + 336 46.9213189510 19.1847154104 5.4507237846 + 337 61.0882658952 13.3242002191 22.7136132235 + 338 46.5670243798 19.8977460670 0.0000000000 + 339 62.2278918166 11.2597129476 24.1051804159 + 340 50.2771584971 16.9192080872 15.1227890773 + 341 48.2605794476 17.6475713276 11.9535772391 + 342 46.9398460214 20.2593274328 1.7906826844 + 343 60.9131933666 12.6572751015 23.3620510769 + 344 46.9228344735 20.3777118947 0.0000000000 + 345 46.9641896441 19.1265458263 7.2959107977 + 346 61.8200781720 12.2620729187 23.7765694411 + 347 46.9300679483 20.2583354564 3.5705787880 + 348 47.5546596351 19.1681140748 9.0907259646 + 349 62.0337232431 10.0610954698 25.0162222129 + 350 56.4109030262 15.8024410687 20.5344476384 + 351 54.7175559632 16.4292377614 19.6464091434 + 352 46.8565117372 20.3763165922 5.3759076229 + 353 59.6777070904 14.9351117277 22.4939225223 + 354 59.9117084115 14.1506012474 23.1913881310 + 355 46.9269645536 19.2243041929 9.2623043916 + 356 63.1642912756 9.0039048076 26.1755175492 + 357 46.1604338623 20.7265009952 3.6454869577 + 358 47.6049736755 19.1911024439 11.2219249960 + 359 46.0757967746 20.9772586706 1.8547487687 + 360 54.1941890576 16.4511473648 20.1214710089 + 361 46.2138657701 20.5506710641 5.3993262573 + 362 62.5226631830 9.0381052187 26.3938294803 + 363 62.5492152957 10.7029205119 25.7779118082 + 364 46.7425134474 20.5635020722 7.2047921509 + 365 61.4267556064 11.9729766761 25.2670999874 + 366 61.2965438348 13.5631344821 24.4649124502 + 367 46.0007787075 21.3460277841 0.0000000000 + 368 62.0079154003 12.1934335451 25.3018479430 + 369 46.3559925750 21.6687985015 1.8028451625 + 370 46.3752446592 21.7782776833 0.0000000000 + 371 46.2087985192 20.5048699329 7.1637217496 + 372 62.0002621624 10.5155403620 26.2522603094 + 373 57.6531801161 16.3293793848 22.2459285661 + 374 46.3175246975 21.7095312139 3.5686098302 + 375 51.6654569860 17.1688956460 18.9159587807 + 376 60.7356227581 13.4834990870 24.9048058244 + 377 58.3929502778 15.6584413563 23.1520163686 + 378 46.7493716510 19.5675150127 11.3980020663 + 379 47.8249224737 19.1076810251 13.7590106387 + 380 48.7157240674 17.8702102444 16.2927084911 + 381 61.6227161537 11.6506834200 26.2106830695 + 382 46.2226540211 21.8616023154 5.3382743201 + 383 46.5457187645 20.9000496331 9.1563994131 + 384 46.0891087814 20.6901661930 8.9752646414 + 385 59.9517641525 15.3622820327 24.3028294477 + 386 45.6354209076 22.1592989835 3.6193191511 + 387 59.8592308897 14.8134437509 24.8076932727 + 388 63.0607352016 9.7904912831 27.5559929256 + 389 45.5845973952 22.4426813732 1.8426214538 + 390 47.3552477961 18.9944869255 14.4895532280 + 391 45.6389659830 22.0034052991 5.3549195130 + 392 62.4209055892 9.8110308806 27.7684497884 + 393 62.4096022490 11.5226905653 27.1714857787 + 394 55.1225767942 17.3342885511 22.1258958614 + 395 45.9271329405 23.1088639367 1.7860355145 + 396 45.4345330352 22.7943095011 0.0000000000 + 397 45.8674658402 23.1867820051 0.0000000000 + 398 46.0176004200 22.2711541984 7.1152745675 + 399 45.5938022767 21.9686930537 7.0426795572 + 400 56.1959453211 16.9612191723 23.0748882675 + 401 61.8798524298 11.2339586212 27.4692287393 + 402 45.8769424996 23.1702229989 3.5041237039 + 403 61.8315326779 13.0551442549 26.7438380077 + 404 48.4935563211 18.8582338182 17.0590277007 + 405 61.0311229635 13.3733194697 26.6573948025 + 406 61.4419242105 12.4291394717 27.1632202049 + 407 58.0922314994 16.8478466227 24.0952554441 + 408 46.3180330770 21.2777313524 11.3166291078 + 409 50.0005487739 17.7980615364 19.6063549707 + 410 61.1019200747 14.5023319052 26.2485329140 + 411 45.7853344163 21.2279210590 10.8756616375 + 412 60.4349683248 14.4777300870 26.2789048944 + 413 45.7514184376 23.4561456086 5.1535601615 + 414 59.8172906806 15.2941502155 25.9619997890 + 415 45.4213609027 22.2563173106 8.7060719370 + 416 46.2002618124 20.4867622101 13.4436834651 + 417 58.5300730992 16.3263127586 25.0961904387 + 418 45.2658432382 23.6531201528 3.6026026658 + 419 45.2571063330 23.9678574787 1.8366873215 + 420 45.2397969743 23.4534636458 5.3039320367 + 421 59.8613079892 16.0874111857 25.9099959284 + 422 62.9589270640 10.5638008626 28.9433004517 + 423 45.7198070302 22.8865298010 8.9864259609 + 424 45.8359731358 24.6902604195 0.0000000000 + 425 45.3842530783 24.3454776431 0.0000000000 + 426 53.0257213955 17.7910037440 22.5624024346 + 427 47.4065700771 19.3202680056 17.2243731378 + 428 45.6579710807 24.5994783253 1.7228940009 + 429 62.3210450334 10.5695471077 29.1496656784 + 430 45.1572824223 23.4588101085 6.8979686907 + 431 56.0842674011 17.8494098415 24.0747027440 + 432 45.6071828991 24.6659103609 3.3287486717 + 433 62.2776774247 12.3124182962 28.5723952955 + 434 45.5499950565 23.9700534982 6.8445589501 + 435 61.7272189409 12.0654144479 28.7914585607 + 436 61.6658408558 13.8746920042 28.1685846590 + 437 46.0713607762 21.6812507954 13.7651593156 + 438 46.4551147223 20.3046359910 16.1666474344 + 439 58.2577805047 17.3906531059 25.6458084200 + 440 61.2189834112 13.3904549291 28.4531985774 + 441 45.5079941854 24.9259901421 4.8747229906 + 442 45.1141505090 22.8774129789 10.3750394273 + 443 51.4692142337 18.4741460462 22.2791165657 + 444 45.0136174006 23.6756928452 8.3655216318 + 445 45.3575250368 22.0081342537 12.6783211566 + 446 60.6718976706 14.5948126711 28.0823750608 + 447 60.9109359566 15.3437688209 27.7708782239 + 448 45.0742412093 25.1953342322 3.6051555942 + 449 58.9670465481 16.5790493637 26.7700578346 + 450 45.0043247152 24.9507386778 5.3100941349 + 451 45.1201174317 25.5309707701 1.8395988509 + 452 56.7089904587 18.1201749107 25.2872713345 + 453 59.9344873178 15.7226368379 27.5956932870 + 454 45.8044804314 26.1937388338 0.0000000000 + 455 45.3516874478 25.9001781201 0.0000000000 + 456 45.5734046275 26.0585918291 1.6663622853 + 457 56.5153331403 17.9087592672 25.6241082358 + 458 44.9150292584 24.8243559766 6.8369083171 + 459 45.5254465378 26.0280667887 3.1659472537 + 460 45.3321870865 23.6768375857 11.0654023028 + 461 45.5532684640 21.5713652100 15.0965129268 + 462 62.8597849600 11.3168599067 30.3410973784 + 463 45.3557060756 25.6128375218 6.2587297475 + 464 45.2520954994 24.8925143183 8.5391475587 + 465 59.7032462263 16.8559610333 27.4461764511 + 466 47.1178047487 19.9552804834 19.1070058200 + 467 44.8200020031 24.8473921717 7.9921042720 + 468 45.4627248997 26.2358340901 4.4032804729 + 469 62.2239740773 11.3068742221 30.5409259620 + 470 53.8933621571 18.8117247097 24.6995553687 + 471 62.1558863067 13.0623080655 29.9797891984 + 472 44.7185549061 24.5266135726 9.7394493274 + 473 61.5736883443 12.9039132237 30.1979948498 + 474 44.7251562939 23.6976605275 12.0852282189 + 475 50.7646595113 18.8637369155 23.5755220986 + 476 61.5285057461 14.6129309610 29.5971743553 + 477 45.0892001281 26.7398737855 3.6741872914 + 478 45.2040439473 27.0808161200 1.8736524098 + 479 45.5965147834 27.2524134985 3.0743733342 + 480 45.5263106340 27.0977761500 4.0452050826 + 481 45.6787777463 27.4663798356 1.6417055068 + 482 44.8903422507 22.8821468505 14.2758429712 + 483 44.9553871689 26.4753498547 5.4101328294 + 484 60.9974345842 14.3606475568 29.9124259419 + 485 45.7729877270 27.6972172482 0.0000000000 + 486 45.4157885205 26.9462926548 5.4137631866 + 487 55.6935077126 18.9102803726 26.1349754634 + 488 45.3191218172 27.4548785970 0.0000000000 + 489 44.8052930518 26.2394167152 7.0652530678 + 490 45.7123601384 22.2996488157 16.6806662463 + 491 47.6531256944 20.4204180303 20.7185708212 + 492 60.7668132847 16.0716494723 29.2297284902 + 493 57.6141105012 18.4773660843 27.2177312412 + 494 45.6656560882 21.5165329803 17.7705693705 + 495 48.6497084274 19.5160903698 22.4837392051 + 496 53.6691980710 18.9936465614 25.7187821164 + 497 45.1904636657 26.7364263368 7.6883329004 + 498 44.6317155937 26.0721494701 8.7560148253 + 499 60.3188865570 15.7816925936 29.6879367235 + 500 45.5928560826 27.8458001630 4.4872454585 + 501 62.7642215316 12.0427362115 31.7526313635 + 502 45.7896100676 28.3835912331 3.2336675795 + 503 44.8838900478 22.7405769562 16.3930059484 + 504 59.6285717205 17.5035079527 28.9297070894 + 505 45.9683058062 28.7925463481 1.7099602804 + 506 62.1305755717 12.0163063046 31.9452545884 + 507 44.8307513908 24.6727458707 13.4212265030 + 508 44.8886357281 26.1762205105 10.4293071102 + 509 45.3474249344 28.2874263400 3.7656797437 + 510 45.5333835799 28.6017702285 1.9132506707 + 511 46.1815776493 29.1322624711 0.0000000000 + 512 62.0412856202 13.7783439937 31.3969993569 + 513 45.7560484596 28.9365726597 0.0000000000 + 514 45.1283999399 27.9938624207 5.5367771720 + 515 59.2439157345 17.2469013925 29.3384017882 + 516 44.3613475482 25.5864385623 11.4097393467 + 517 44.5406869801 23.5394834777 15.4369930667 + 518 45.4464184947 28.0961006192 6.4714192396 + 519 44.3088830762 24.5621521275 13.8154183385 + 520 61.4399356465 13.6804398203 31.6596032753 + 521 44.9063599759 27.7376175990 7.1274597832 + 522 61.3985792364 15.3220867659 31.0367424620 + 523 57.2070605858 18.6966039490 28.4404527768 + 524 44.7229786742 27.5071719293 8.3292650797 + 525 45.8067683082 29.0146077597 5.0937873501 + 526 58.1292923257 18.7555543126 28.7166619371 + 527 46.1379251847 29.6481318313 3.5611740644 + 528 50.7914468282 19.6980048494 25.6770041017 + 529 46.4065160263 30.1437820573 1.8386009885 + 530 60.6329670233 16.7641482776 30.6815945975 + 531 60.8179648539 15.2299217075 31.5047867521 + 532 51.9570564997 19.9664120973 26.2666280396 + 533 46.0342712750 30.1049425966 1.9795155229 + 534 46.6681279491 30.5551847946 0.0000000000 + 535 45.8141116684 29.8189875603 3.8976988681 + 536 46.2590798347 30.4076940903 0.0000000000 + 537 49.3528283567 20.3461097997 24.8069615612 + 538 54.0937735437 19.9605437603 27.4006767029 + 539 45.5327247970 29.5405601711 5.7396607337 + 540 55.8793902718 19.7656817884 28.2381889929 + 541 44.4128101640 27.4857148536 10.4212220622 + 542 45.1115462035 28.4216449918 9.2742615323 + 543 62.6731361920 12.7345980542 33.1806029669 + 544 59.5419872102 18.1205570300 30.3424839742 + 545 45.1959191662 29.2211682561 7.4776096558 + 546 56.8430729915 19.6271921417 28.9201907540 + 547 44.0055471546 24.9876033712 15.5201685266 + 548 62.0417142499 12.6912750552 33.3651225994 + 549 45.8060581487 21.8122708127 21.6024259256 + 550 45.6933308565 29.7021235954 7.5525933047 + 551 60.0629841521 16.7767807614 31.4400072993 + 552 44.8017406382 28.7039533877 9.0808558666 + 553 46.2197667479 30.5087916998 5.7324157831 + 554 61.9319645513 14.4640004058 32.8335853997 + 555 46.6137107406 31.0774850090 3.8981212111 + 556 48.2818200902 20.5292540658 24.9605915583 + 557 46.8918636079 31.5359165161 2.0160332651 + 558 44.0439003012 24.4463445699 17.1904480596 + 559 44.5028741846 23.3625355845 19.1928404154 + 560 43.9622505813 26.7824512976 13.2675898961 + 561 61.3341702612 14.3560400920 33.1143454589 + 562 47.1546782489 31.9781071181 0.0000000000 + 563 46.5554071328 31.6215642096 2.0533247207 + 564 61.2585158477 16.0390808806 32.4919471829 + 565 58.0256118022 19.3876393946 30.1146545529 + 566 46.3520903811 31.3814004254 4.0154558407 + 567 44.9625270590 23.5793906496 19.8260954251 + 568 46.7619178475 31.8782500301 0.0000000000 + 569 44.4732365728 27.8736268077 12.6703598674 + 570 44.1814750203 25.8973749818 16.1615305789 + 571 53.7298809682 20.2352012722 28.5931798917 + 572 46.0761607029 31.1712636508 5.9198223744 + 573 60.4573196828 17.5124528780 32.1607280504 + 574 60.7027520110 15.9019039801 33.0354278475 + 575 56.4385873862 20.2287455632 29.8916348527 + 576 45.7054990253 30.9417541400 7.8440592436 + 577 58.8549163670 18.4833807618 31.5842768509 + 578 46.4982498266 22.1736273739 23.6487093980 + 579 62.5874022052 13.3858123370 34.6270384076 + 580 47.0965190261 32.6919783917 4.2147666824 + 581 47.3116837672 33.0369254742 2.1607541350 + 582 54.7887621311 20.6692788249 29.4700001284 + 583 46.7692323066 32.3267597056 6.2328515142 + 584 61.9582235728 13.3254497097 34.8023329395 + 585 45.1796704509 30.5193027963 9.8145396737 + 586 59.3049359354 18.9116668771 31.8535633160 + 587 47.3826323737 33.4496369884 0.0000000000 + 588 46.9326041504 33.1628067900 2.0810007993 + 589 43.5630276489 27.1888159304 15.3885779435 + 590 61.8268373524 15.1189815420 34.2968748025 + 591 52.7776991752 20.9463146016 28.9754992962 + 592 46.2663986040 31.8601983087 8.4187976994 + 593 46.7850305884 32.9988783150 4.0761368113 + 594 46.9258655792 33.4118922854 0.0000000000 + 595 46.0082741257 22.1524645103 24.4336685370 + 596 59.9734302745 17.4435908586 33.2020951575 + 597 61.2504782120 14.9420433780 34.5426026072 + 598 44.3633761029 29.6145076167 12.2419239255 + 599 50.3930855673 20.8718922636 28.2994740865 + 600 46.5702812769 32.9050855342 6.0102592697 + 601 50.3827949641 21.1983213910 28.2296410755 + 602 61.1299214927 16.7115167915 33.9779069765 + 603 57.7213851552 20.1759152265 31.6111434839 + 604 45.4149407073 31.1196376541 11.1802656140 + 605 46.2833400828 32.8631569359 7.9289111308 + 606 60.6537472507 16.3698727295 34.4627258219 + 607 47.9509922344 21.4760642307 27.2769553148 + 608 47.9727413335 21.9016818795 27.0749870954 + 609 43.2222353374 26.9575697558 17.6142450955 + 610 60.2841723372 18.2403836033 33.6909976650 + 611 56.6409493226 20.3691646780 31.7906385035 + 612 47.5208203574 34.6576392485 2.1809406306 + 613 47.3913755291 34.4846562061 4.2545357607 + 614 55.9303102696 21.0584630838 31.3886130494 + 615 62.5078484833 13.9900828474 36.0931843543 + 616 47.4459600792 34.9521111927 0.0000000000 + 617 47.0671478201 34.7551823738 2.0488018893 + 618 61.8808879128 13.9128723672 36.2579294248 + 619 46.9651735923 34.6534497469 4.0004752802 + 620 47.1839647764 34.4201309978 6.3166523095 + 621 45.8964905023 32.8781608978 9.9761446160 + 622 46.9912613931 34.9634331577 0.0000000000 + 623 60.0679445265 17.6549604833 34.6550740947 + 624 59.0843344999 19.6655006511 33.4152644839 + 625 43.1356703193 26.1364043760 20.0055186566 + 626 61.7170383094 15.7583244515 35.7825710703 + 627 43.9793332302 29.7397340711 15.4193502069 + 628 61.1648884344 15.4935392327 35.9290283187 + 629 46.0667380534 22.5651924854 26.4190172531 + 630 54.0054602864 21.5780923813 31.1343804575 + 631 46.7991164155 34.6714365701 5.9154497870 + 632 58.8681746239 19.2119467962 33.8639519237 + 633 43.7317833040 30.1052973996 15.0886582661 + 634 44.0908656744 25.0407392253 22.8529434612 + 635 43.3588513486 27.4299970708 19.1798856967 + 636 46.8854566186 34.4743744066 8.4656707348 + 637 60.5968326163 16.7880846507 35.6928340501 + 638 60.9725413295 17.4274211744 35.5183213491 + 639 43.4632283065 25.1083452675 22.6420467637 + 640 46.5821943903 34.8405641896 7.7365611489 + 641 51.8129439287 21.9216122251 30.8700516536 + 642 45.3296795053 32.8457513511 12.2790304825 + 643 57.3830520884 20.9826933498 33.2097386865 + 644 60.1758868609 17.6636276264 35.5594245947 + 645 45.5396015400 23.6677996927 26.2490742677 + 646 47.4820484200 36.2841674654 2.1170700791 + 647 44.1792585233 24.2061874538 24.8032202558 + 648 53.2440532340 21.7102840697 31.8694545904 + 649 47.5092877847 36.4545853970 0.0000000000 + 650 47.3841769350 36.2993679785 4.0910548792 + 651 46.9694783538 36.3298160437 1.9988393298 + 652 60.0656098879 19.0207923843 35.3038491998 + 653 62.4352369887 14.5416219062 37.5794393839 + 654 44.7573099556 23.7519813649 26.1351461137 + 655 47.0566305319 36.5143411544 0.0000000000 + 656 46.8923508015 36.2732501033 3.8860870618 + 657 61.8104211227 14.4481207772 37.7321431185 + 658 59.3668937893 19.0155395987 35.4240412044 + 659 46.4573432950 34.7557153821 10.8952050854 + 660 55.4531981377 21.8891589830 33.0607469080 + 661 45.1800089263 32.9512801614 14.1170742578 + 662 46.7572676893 36.3194155690 5.6352859047 + 663 46.2941702593 35.2483214296 9.6421602783 + 664 61.0568424015 16.0696006761 37.3306430317 + 665 61.6116232206 16.3568871780 37.3024609061 + 666 47.2039498756 36.5634335366 6.0032820729 + 667 42.9821334824 30.0567296187 17.7434381847 + 668 60.4393537471 17.4113614613 36.9314250888 + 669 46.8854138332 22.7505197694 29.3236554578 + 670 59.8926254840 18.4067736545 36.4282069316 + 671 58.7468622268 20.5320720810 35.1237293675 + 672 45.4628428356 23.4542696335 27.9500489577 + 673 49.0080394371 22.5860406028 30.7081803592 + 674 53.4582549389 22.3841679305 32.8559912328 + 675 46.8443880421 23.2767118709 29.1759895929 + 676 46.5596783601 36.5938731308 7.2526030083 + 677 44.6518673130 33.1974426791 14.9067534021 + 678 60.8363918086 18.0651636668 37.0945831168 + 679 47.2391672576 37.8260836536 1.9191198175 + 680 47.3219476631 37.9137345018 0.0000000000 + 681 49.0058572190 22.4768007119 31.5193811314 + 682 46.9188235417 37.0618226383 8.0226370413 + 683 47.1443617114 37.9520747840 3.6223811075 + 684 51.5867741402 22.6882219286 32.7416366436 + 685 46.6693863528 37.8680750912 1.9411972353 + 686 46.6719833629 37.9868288582 0.0000000000 + 687 56.9610182975 21.8429872645 34.9836179457 + 688 45.2509698192 24.3619563216 28.2463362455 + 689 62.3702377873 15.0353398576 39.0853365816 + 690 46.6131873604 37.8097746291 3.7773340506 + 691 44.0887253258 24.6630527372 27.2300118469 + 692 42.6644218928 28.3269754716 22.1089777877 + 693 61.7474435620 14.9264828431 39.2243883799 + 694 56.7238895977 21.5280217424 35.3234278710 + 695 45.8656408603 35.8737607593 11.8820193543 + 696 46.5165056940 37.7721257227 5.4284235594 + 697 59.8697432544 19.7309315412 36.9794746888 + 698 46.4303660215 37.6858435354 6.6573859044 + 699 42.2467236796 29.6192064433 20.5858608883 + 700 60.9482258428 16.6252603192 38.8118160430 + 701 46.0199239278 35.9713079131 13.2018139335 + 702 61.5083141868 16.9196319484 38.8801357594 + 703 46.2337608953 37.4456170765 8.8017746485 + 704 54.9194511568 22.7063818055 34.8296286547 + 705 58.4918083229 20.4960583877 36.9272142782 + 706 60.2646533544 18.0821969486 38.4067180437 + 707 46.8905563323 38.5528307391 5.2650813277 + 708 42.8465669637 26.1404605292 26.0377713335 + 709 44.7274118518 24.3742071005 29.1217828411 + 710 43.4496091889 32.3315720332 18.6559926917 + 711 59.5191621348 19.3646098730 37.8645353785 + 712 46.8536431862 39.1931523590 1.7970010737 + 713 43.0446490767 26.7650060532 26.0188674404 + 714 46.8301249210 39.1379864916 3.1531317456 + 715 58.4563910017 21.3040492601 36.8947155820 + 716 43.7753629524 33.4201518260 17.6232256922 + 717 46.7579877014 39.3077891257 0.0000000000 + 718 46.4751256475 37.8172166708 10.3032564202 + 719 49.5601291344 23.2459903478 33.1380062660 + 720 52.8973766096 23.1441867456 34.6306243825 + 721 51.5490447614 23.1998509430 34.1360140584 + 722 60.6829354329 18.7173488902 38.7980826678 + 723 45.3117884173 24.1910642901 30.5268384763 + 724 46.1852222496 39.3521568474 1.9171353139 + 725 46.1050418696 38.6886786004 7.2684271910 + 726 45.0211707456 35.2721747178 16.4071607405 + 727 46.0903320548 39.4246147837 0.0000000000 + 728 46.1506268422 39.2789500470 3.7686189358 + 729 62.3134048121 15.4670291624 40.6095874469 + 730 46.1099261626 39.1068257393 5.5639829479 + 731 45.2098536998 36.2553164456 14.6554661444 + 732 61.6924604743 15.3441208576 40.7333161333 + 733 52.9398465046 23.0565235020 35.3982915058 + 734 45.3573328542 24.8169347621 30.7508327799 + 735 46.8520093689 24.1041248319 32.1728750048 + 736 43.5151435949 25.5612541768 28.8991345890 + 737 46.4634485490 39.4383494596 7.1229513237 + 738 42.1352047809 28.9736497964 24.3687578999 + 739 56.5650284845 22.6303845783 36.8250078531 + 740 41.6910663121 28.8854366495 24.1268091441 + 741 60.8574569028 17.1101048045 40.3654741337 + 742 59.6669514579 20.4213403402 38.7904067990 + 743 61.4287068763 17.3872751194 40.4910516584 + 744 46.3651179925 40.2569260937 3.9412567773 + 745 46.2534272750 24.0374176820 32.5132925156 + 746 46.3374393310 40.4672968710 1.9248056382 + 747 45.5590342712 37.3343859781 14.9826638516 + 748 60.1036393851 18.7082063205 40.0691192190 + 749 46.1940277396 40.7018437496 0.0000000000 + 750 50.2189822405 23.7330281882 35.0498151717 + 751 43.5285481780 26.3676517705 29.3846537731 + 752 45.5467891741 39.0580453120 10.8639482496 + 753 54.3517289011 23.5177101533 36.8204643373 + 754 42.6529547501 33.4718164889 20.6114245339 + 755 42.2322093502 32.2314306088 22.1417677318 + 756 59.2117511100 20.2202594980 39.7892360865 + 757 45.5210401861 40.7807888968 1.8941558398 + 758 47.6606401853 24.1938637299 34.0221216542 + 759 45.5089316588 40.8617804789 0.0000000000 + 760 58.1836737201 22.0105964185 38.7638540619 + 761 60.5749855835 19.2354141361 40.5685047682 + 762 45.4789687877 40.7587203860 3.7575418061 + 763 62.2651559144 15.8335159259 42.1501883260 + 764 45.8056676658 39.1184786755 12.5888614767 + 765 61.6458449284 15.6982010825 42.2569233691 + 766 45.4297761622 40.6622022398 5.7275347684 + 767 45.4254821448 40.2992076471 8.0180238724 + 768 57.8814211019 21.6507958526 39.2276069377 + 769 44.4045853157 36.7534256153 17.5051893043 + 770 42.0059499076 27.4996605019 28.2781598503 + 771 45.8717348541 40.4045618855 9.3083485079 + 772 45.7856570055 41.4740769543 3.1727722449 + 773 60.8132460938 17.4512284972 41.9605962565 + 774 51.7061744210 24.0217549592 36.7273928743 + 775 45.6829298331 41.7072146443 1.7997372119 + 776 43.3702998899 26.0766662364 31.1752483429 + 777 55.8499340353 22.9734469825 38.6558620415 + 778 48.7343813501 23.9238096132 35.7680922625 + 779 61.3850597949 17.7270723373 42.1047319837 + 780 45.5725049166 25.2276458211 33.2694264247 + 781 44.5425285492 25.8449864812 32.3062098453 + 782 46.5676710477 24.4043552703 34.5828507128 + 783 45.5770253661 41.6330187513 5.7843267647 + 784 56.2632770726 23.3299023786 38.8551246747 + 785 45.5658814157 42.0582222278 0.0000000000 + 786 59.4940006107 21.0292802901 40.7588668025 + 787 60.0565550983 19.0700010927 41.8690359070 + 788 44.8387921799 39.4015062320 14.3302371625 + 789 44.7019536439 42.1086373841 1.8139376925 + 790 44.6962020486 42.1623793410 0.0000000000 + 791 46.1496996727 25.1684019663 34.6652157192 + 792 48.2232075918 24.5631173484 36.1680032748 + 793 44.2649049998 25.6531727480 33.3335107296 + 794 43.2628958893 26.9798081677 31.6361252069 + 795 62.2257604594 16.1327541150 43.7045796852 + 796 44.6399725812 42.1398698754 3.5963396109 + 797 41.3958448540 32.0801791650 24.9726874761 + 798 61.6078280896 15.9869676422 43.7927081990 + 799 45.1728410532 42.4315370544 3.6933153997 + 800 60.5350746589 19.5681586495 42.3643047271 + 801 43.8802087285 37.0039545697 20.3503882763 + 802 44.8590239979 25.9161008284 33.9605445664 + 803 54.1068922599 24.1787529899 38.9740859922 + 804 44.6412938833 38.8444310173 17.8651911384 + 805 52.8957993681 24.0637626795 38.8194679469 + 806 60.8189605515 17.6334205087 43.5237380131 + 807 44.9119298970 42.8556871469 1.9000840988 + 808 44.4374965893 42.3223519358 5.5219471599 + 809 57.9106245485 22.6651584569 40.7908379363 + 810 41.4365274621 33.5639751091 23.8560421115 + 811 41.6846650971 28.0474567857 30.5402898621 + 812 59.0835851850 20.7856349660 42.1227056766 + 813 61.3983339936 17.8883484823 43.6574877081 + 814 44.9462854412 42.4158500800 8.0872311826 + 815 41.1216127310 30.6746278802 27.6371899584 + 816 44.0600006980 26.5207297308 33.6168944338 + 817 44.9664827920 41.8216145136 11.3267328511 + 818 43.3545248632 37.2044249989 20.7313261318 + 819 44.6236183727 43.2302203041 0.0000000000 + 820 60.1443884308 19.0723426987 43.3798156296 + 821 40.6346159834 30.6187542276 27.6675008644 + 822 49.4252462018 24.7108495379 37.9065860072 + 823 44.9996510780 26.0194567701 34.9923069965 + 824 44.7902450946 40.7820511176 15.2420051232 + 825 46.4571427685 25.3692638002 36.2919140405 + 826 57.5736415873 22.3921078198 41.6438558597 + 827 42.4562859711 27.2587281622 32.6050275526 + 828 44.8764050305 25.6199546796 35.4310387089 + 829 44.0403821971 42.6719736706 8.0709146812 + 830 43.7750631765 43.2863268954 1.6947802206 + 831 42.1349468546 28.3450814428 31.6730454710 + 832 51.9288829329 24.6745745270 39.2303929715 + 833 44.1535103785 42.0708748391 11.2752590888 + 834 43.7256602443 43.3695508800 0.0000000000 + 835 42.6749249790 36.1506853355 23.0247459355 + 836 59.5868868363 20.1400827629 43.3762948118 + 837 43.7199932929 43.3223767918 3.2203248530 + 838 42.9997555604 27.4905344172 33.2542585477 + 839 56.0043620136 23.9196459689 40.9380754892 + 840 60.6789094443 19.4535077392 43.8890500435 + 841 62.1953365592 16.3638465800 45.2698384418 + 842 43.9832491895 40.0695264150 17.3772201872 + 843 61.5784984390 16.2097484563 45.3378514098 + 844 44.2989964207 43.5016007133 5.6825722059 + 845 41.3703629471 29.5127668664 30.4801742742 + 846 47.5303255739 25.1760268261 37.6169437926 + 847 44.1768135194 43.7175883351 3.8348774571 + 848 59.3680959048 21.5533034737 43.1695344092 + 849 55.6132029371 23.6926987614 41.4301889447 + 850 43.9441415530 44.0101556990 1.9807717863 + 851 43.9397632975 26.8629457013 34.9538334069 + 852 60.8112152789 17.8023286814 45.0820569879 + 853 43.3836406155 43.6543186911 4.6763764405 + 854 42.7591886998 27.1585173196 34.1609861884 + 855 61.4182176040 17.9904538238 45.1698725840 + 856 45.1311632139 26.2085535192 36.4114921543 + 857 43.9240029239 43.8614255276 7.2948638587 + 858 49.5229661931 24.7652750156 39.5622560881 + 859 43.6813553298 44.4022183804 0.0000000000 + 860 60.1397622215 19.2243776183 44.8837948834 + 861 41.3741522970 28.5856425222 32.5205422647 + 862 46.4507883072 25.6990256122 37.7925043614 + 863 54.0074077718 24.6939232300 41.1414459005 + 864 42.9493996015 44.1237710230 2.8607070061 + 865 40.4145937875 30.3496395194 30.3273190933 + 866 41.9367623236 28.7052675138 33.0135313489 + 867 45.7739494708 25.5326627062 37.6734395919 + 868 43.9532534311 43.6265738918 9.8549173580 + 869 47.9628727800 25.3026308469 38.8597707959 + 870 43.6393589447 42.2638399507 14.3469152476 + 871 42.8027847911 44.2682242591 1.6332354021 + 872 49.9198659162 25.1017494285 39.8869964506 + 873 60.7975369164 19.3303239453 45.2600627935 + 874 59.4786470935 20.4552736098 44.6589307230 + 875 42.9516518166 44.0528079779 6.2606318268 + 876 57.6365400902 23.2550383755 43.0412425649 + 877 60.0195400613 20.7479555779 44.6248673727 + 878 42.8547853066 27.8515398837 34.7794237983 + 879 42.6400874864 44.4553965610 0.0000000000 + 880 58.6929705663 21.5660647981 44.1646920915 + 881 40.4709766317 34.1660882667 26.8241028453 + 882 62.1738582985 16.5269901673 46.8428780837 + 883 53.1699499754 24.6372843031 41.7256759003 + 884 43.2041436236 44.6859103014 5.4916742944 + 885 61.5578099832 16.3668928792 46.8894015126 + 886 43.9484143601 27.1008644241 36.4010179074 + 887 43.0628124758 44.8422136815 3.8345242050 + 888 43.1969767170 44.6601897937 6.7336345541 + 889 42.1594496761 37.6342270841 24.0565829974 + 890 60.3260813099 20.2716405513 45.3976035579 + 891 57.3982774882 22.8637002091 43.8661748066 + 892 42.2973412788 44.6879458463 3.6629622314 + 893 43.1310564063 27.1258498246 36.2098038448 + 894 42.8210774834 45.0611444628 1.9759656962 + 895 45.2158902705 26.4305720232 37.8899175001 + 896 51.9998919575 25.1499684903 41.4378147139 + 897 39.9222641847 32.6230698069 29.0483475191 + 898 40.9945043836 30.0831836211 32.5867799897 + 899 60.8073526979 17.9223460933 46.6801961708 + 900 61.4124787044 18.1088129233 46.6931100057 + 901 42.2104805136 44.7471178736 5.1351608983 + 902 42.8773500112 38.9615015080 23.3886042037 + 903 46.6554225813 25.8955766116 39.2815471731 + 904 55.7754112512 24.4060879148 43.1213436228 + 905 42.4948345941 45.3187383612 0.0000000000 + 906 43.0225798454 44.7662224809 8.5335210878 + 907 43.4757795723 43.8307433651 13.2779751458 + 908 42.4702349132 44.4196266417 9.1832233266 + 909 41.3785421430 28.7189386492 34.4838453978 + 910 41.8022537697 29.0010030747 34.5650893154 + 911 41.7798928393 45.0848261150 1.8233516771 + 912 41.3844599376 36.4288237888 26.3222775467 + 913 48.3127768900 25.5363522108 40.4820228702 + 914 60.1307595232 19.3532771272 46.4871103934 + 915 60.7747775392 19.4663726879 46.6218395472 + 916 42.5400037283 44.1915771683 11.7345355381 + 917 40.2159341068 30.4638382444 32.5297385920 + 918 55.6717859615 24.0327470839 43.8033471474 + 919 42.8157614971 28.0985764806 36.3178382596 + 920 42.8573697503 41.0182015432 20.7876084839 + 921 41.8815382110 44.9923806461 7.1478584236 + 922 41.3917180259 45.3699395470 0.0000000000 + 923 42.3782779395 45.3793037804 7.1689599137 + 924 59.4265938796 20.6671078781 46.3141206567 + 925 44.0136818296 27.2976655761 37.9544703848 + 926 43.1197185202 40.8831760894 21.9157689123 + 927 50.1744072967 25.4641896930 41.8753352864 + 928 60.1944545077 20.5844063697 46.5077599019 + 929 42.0787344174 45.6197247519 5.6710847892 + 930 43.3071296997 42.2906093764 19.4524319548 + 931 59.5890059353 21.5330316074 46.0989960211 + 932 58.6659737759 22.6125946291 45.4847389500 + 933 53.8621267581 25.1093980992 43.3075434763 + 934 41.8424778185 45.7812295637 3.9129958220 + 935 42.7206916884 43.0225103762 17.3605684627 + 936 45.3591791458 26.6092553808 39.4381019797 + 937 41.2868673248 45.4278974828 5.4813212181 + 938 61.5455979867 16.4596522022 48.4444418173 + 939 62.1611715520 16.6233555743 48.4206320690 + 940 40.0223962684 32.5826938812 31.1824056772 + 941 39.5887314770 32.6474810145 30.7812418518 + 942 41.5757144970 45.9431999044 1.9905325433 + 943 58.5690959839 21.8900067775 46.0873964467 + 944 40.9337713647 45.6358477356 3.7639193182 + 945 43.5248686131 27.1474474266 38.4841664589 + 946 40.1027277491 34.6898486487 29.3392104872 + 947 46.8748035224 26.0765166525 40.8355149949 + 948 39.8359151909 34.8418959805 28.9605860288 + 949 42.4082458088 45.2409285404 11.2201841030 + 950 40.8187482338 30.3508966589 34.3530568706 + 951 50.4339821146 25.2669532280 42.7538519917 + 952 53.7742116078 24.8340181085 44.0107079661 + 953 41.2817262614 46.2074493975 0.0000000000 + 954 60.8257989906 17.9512520109 48.3154187737 + 955 61.4255267900 18.1489945125 48.3116949560 + 956 57.2343140210 23.8217057885 45.3285682401 + 957 41.7404978202 29.2168478974 36.1709670426 + 958 41.0681189478 37.5966399126 26.8308707948 + 959 40.4888034159 45.8688098491 1.9237095118 + 960 40.0596736513 31.9465661759 32.7361126709 + 961 42.0570994187 44.4817677066 14.4257211073 + 962 46.2882497439 25.9113688513 41.1012511799 + 963 41.5496756215 28.7221097613 36.6428707682 + 964 57.3640150167 23.1004577690 45.9488005271 + 965 52.0940131013 25.4939464185 43.5538151618 + 966 42.8360255908 28.2854274947 37.8928879735 + 967 48.5641112253 25.7895656518 42.2514294817 + 968 60.1531844435 19.3788822687 48.2079660227 + 969 41.5853414583 45.9719546246 9.4108301232 + 970 40.0916701628 46.1817730278 0.0000000000 + 971 60.7716291676 19.5388222410 48.2433725699 + 972 40.1102151693 30.5408231661 34.6671462451 + 973 44.1173410163 27.4510860011 39.5209211067 + 974 42.6320981536 44.2843907722 17.2805577151 + 975 42.1249430257 39.8939301763 25.4805610998 + 976 40.8615239439 45.7385983371 9.8138145994 + 977 40.4272197577 45.9833038406 7.7652881568 + 978 41.0350953743 46.3222760619 7.6905232037 + 979 55.5390574024 24.7882916419 45.3557807486 + 980 40.7186433171 46.4685161155 5.8724817090 + 981 40.4687484866 46.5635321553 4.0094392014 + 982 45.5318526452 26.7584218894 41.0516222507 + 983 39.9640661382 46.1875943574 5.8352016113 + 984 40.2240106970 46.6546204332 2.0356804195 + 985 55.8774139122 24.1430194284 45.9238280065 + 986 60.1040682145 20.8140477006 48.1294567456 + 987 59.4389089371 20.7277578648 48.1114445923 + 988 39.2779960114 32.6702234346 32.8286617695 + 989 61.5415997336 16.4900219495 50.0000000000 + 990 51.9869197510 25.3104085398 44.5733423308 + 991 39.5210720675 46.3534040591 3.9513392125 + 992 62.1570157309 16.6549221690 50.0000000000 + 993 50.3537427896 25.7538743672 43.8717462541 + 994 40.7330567491 30.5079201032 36.0176441664 + 995 39.9598450660 31.9081725339 34.2805420141 + 996 39.9302189645 46.8253260376 0.0000000000 + 997 40.8087739104 45.7745686530 12.1070841530 + 998 47.0873018508 26.2587809027 42.5767644628 + 999 41.7404977513 29.3681310475 37.8050134762 + 1000 39.0807120518 46.5064014152 2.0089852892 + 1001 59.3418746211 21.9692736906 47.9423357996 + 1002 39.2637420759 35.0008623480 30.9588989018 + 1003 47.8324517517 25.7482117342 43.3529215038 + 1004 39.5502985650 33.2862326714 33.0720786301 + 1005 58.5769580704 21.9814702574 48.0216657011 + 1006 53.8539030847 25.3823023361 45.5072805087 + 1007 42.9027415539 28.4228987422 39.4998086290 + 1008 60.8688979747 17.8825257156 50.0000000000 + 1009 61.4761955604 18.0643229926 50.0000000000 + 1010 38.6205294125 46.6571880994 0.0000000000 + 1011 54.2367428108 24.9021261578 46.0519623964 + 1012 40.1736640503 37.5479804050 29.1381943571 + 1013 58.3098901658 23.1066613880 47.7017004187 + 1014 41.7527499393 28.7456837754 38.9095621574 + 1015 39.4095449379 34.3212284909 32.4451768391 + 1016 44.2498731435 27.5727667358 41.1551148714 + 1017 48.7593268700 26.0151445634 44.1356755103 + 1018 43.7056960790 27.3720490551 41.1434733387 + 1019 49.9153338806 25.6096068883 44.8428099271 + 1020 42.1457077821 43.5620635523 22.1086129321 + 1021 51.0581340750 25.5253021587 45.2992129716 + 1022 40.1414640851 30.5025377175 36.9396629576 + 1023 57.4543964136 23.1403998788 47.9713653935 + 1024 40.1966749040 37.5034589808 29.9666957089 + 1025 41.4976873087 44.1610011296 20.4023061103 + 1026 60.2117651159 19.2824952132 50.0000000000 + 1027 38.7713942941 47.2280214000 2.0624776073 + 1028 38.9521966912 47.2010983184 4.0819454413 + 1029 60.8110361233 19.4812338899 50.0000000000 + 1030 41.0334308577 45.3242142235 17.1957506241 + 1031 45.6860549503 26.8964881556 42.7283925314 + 1032 52.1707526206 25.7367973178 45.6876730518 + 1033 42.0014573126 42.4676499567 24.4051048039 + 1034 39.0980059370 47.2043599370 6.0491017423 + 1035 38.4992744997 47.2877512441 0.0000000000 + 1036 56.9654368601 24.1670309471 47.6151522170 + 1037 38.3660271543 46.8679865022 6.1512595566 + 1038 39.8533207330 31.9604532587 35.9215237761 + 1039 38.7546875105 46.8034264918 8.1788667009 + 1040 40.7036698022 30.6096105307 37.6772889829 + 1041 37.9763780022 46.9363251289 4.1440650119 + 1042 39.2930387591 47.2008136360 7.9766837013 + 1043 39.3473446792 33.4477721236 34.2899980080 + 1044 52.6686064205 25.3536936707 46.3009964738 + 1045 41.4244230033 42.2407079460 24.7831971338 + 1046 40.8673245067 39.2720748443 28.9056532783 + 1047 37.5884716529 47.0150989365 2.1117370872 + 1048 40.1792281843 46.2308485771 14.5374305080 + 1049 41.7794272911 29.4781843642 39.4495336686 + 1050 39.5936333584 47.1558794315 9.9813573020 + 1051 39.4450259997 36.1541523236 31.7910690035 + 1052 39.0333679287 32.6768875900 35.1152382286 + 1053 38.9590824642 46.8147202371 10.2778674330 + 1054 48.3844890394 25.8358493075 45.0187586221 + 1055 59.4982636292 20.6541976464 50.0000000000 + 1056 56.1075924623 24.1314053353 47.9799818838 + 1057 40.0136717906 47.0292330239 12.2345880246 + 1058 60.0883263936 20.8692669179 50.0000000000 + 1059 41.6962299355 44.8319304268 20.7949558795 + 1060 47.2505929810 26.4188455509 44.3631018210 + 1061 37.1501036906 47.1323721019 0.0000000000 + 1062 42.9892091945 28.5319506928 41.1474802931 + 1063 55.4680722757 24.9869198356 47.6441353249 + 1064 50.5033883126 25.9631248625 45.9152439060 + 1065 40.5627369607 46.7017115543 15.0846144505 + 1066 38.7333458880 35.0921447252 33.1643503896 + 1067 51.3294535651 25.6002370619 46.5487507354 + 1068 40.8868106811 40.9984768137 27.6226441493 + 1069 44.3539728108 27.6908648850 42.8215562215 + 1070 45.1600522076 26.7842013210 43.7961396620 + 1071 39.4188417469 37.5044783107 31.2457715133 + 1072 46.5575515682 26.2674225548 44.6993427778 + 1073 38.8564997431 46.9701421714 12.3766546679 + 1074 37.2413565653 47.6852091100 2.0793578425 + 1075 58.6385076910 21.9381004913 50.0000000000 + 1076 59.2167654518 22.1677892381 50.0000000000 + 1077 54.6331009120 24.8754180840 48.0200111153 + 1078 37.0683300349 47.7501764505 0.0000000000 + 1079 37.3073282929 47.7119474210 4.0976384566 + 1080 39.0015290741 34.9833134693 34.0712155503 + 1081 49.9447365034 25.7572101678 46.4689617365 + 1082 47.3010666740 26.1019646263 45.3900490042 + 1083 41.8635889622 28.8616761521 41.1871874365 + 1084 53.9274806601 25.5239959680 47.7205635567 + 1085 39.7879530243 31.9967717606 37.5726549009 + 1086 40.2841525142 30.4005544398 39.2208955870 + 1087 39.1517145270 33.5441882621 35.8495461308 + 1088 48.9362235788 26.1798295388 46.0751229950 + 1089 40.6948678625 30.7014125087 39.3511894050 + 1090 45.8293459672 27.0093702589 44.4783603232 + 1091 41.1904427054 41.7235865430 27.8199794736 + 1092 36.3053303173 47.4030564397 4.2770049857 + 1093 37.2956986337 47.7876187804 6.0846531812 + 1094 36.0103632756 47.4161910944 2.1829622872 + 1095 36.6020203325 47.4132648674 6.3639377009 + 1096 41.8243818393 29.5769315989 41.1171273139 + 1097 57.5822729689 23.0652053625 50.0000000000 + 1098 36.8552915453 47.4615239898 8.4978378692 + 1099 58.1459123468 23.3068477695 50.0000000000 + 1100 53.1344823186 25.3548601735 48.1085647439 + 1101 40.2477396723 40.2012818512 29.7776289569 + 1102 35.6804041092 47.6073214441 0.0000000000 + 1103 48.5401948076 25.9411993016 46.5396487081 + 1104 37.2678316159 47.8967197542 8.0564253271 + 1105 41.1962347850 44.7809667761 23.6075952139 + 1106 39.7088230231 38.4646461224 31.8253643179 + 1107 52.3048927015 25.8667995608 47.8311744737 + 1108 40.5098937641 46.5523560169 19.2448544508 + 1109 43.0751353086 28.6229466205 42.8345750757 + 1110 38.9527739099 32.5118377726 37.4986319195 + 1111 43.4090046148 27.8291975015 43.5410199207 + 1112 47.4249835261 26.5253424311 46.1904525055 + 1113 36.9695200571 47.5774218470 10.6557330111 + 1114 38.3547254350 47.3365936329 14.5092960866 + 1115 35.6794863313 48.0139616870 2.0370479031 + 1116 51.6658408330 25.6439250657 48.1783207298 + 1117 56.3599655991 24.0102648701 50.0000000000 + 1118 37.2577732498 48.0350755178 10.0974668622 + 1119 56.9071115192 24.2611820519 50.0000000000 + 1120 35.6313823872 48.1698700525 0.0000000000 + 1121 47.2535435463 26.2054406068 46.5831245191 + 1122 38.9980197009 47.0822934979 17.0301677727 + 1123 44.4605191110 27.7781035565 44.5374495464 + 1124 38.9296943281 36.8850315501 33.8387109772 + 1125 35.6219825797 48.0742376548 4.0023546971 + 1126 50.7050275447 26.0742750266 47.9511622811 + 1127 38.2959284678 35.0811783389 35.5431603882 + 1128 34.3938274720 47.6525844251 2.1717201282 + 1129 39.7482140023 32.0338201243 39.2690579496 + 1130 39.0059647203 33.5772651059 37.5203876707 + 1131 37.0525255846 47.7033984259 12.5301809196 + 1132 34.5990901497 47.6995002120 4.2954960795 + 1133 38.7628673459 37.5809421264 33.3729945895 + 1134 38.6757583099 35.2738712830 35.7480965545 + 1135 34.1514856341 47.6552553799 0.0000000000 + 1136 50.1720749749 25.8280121932 48.1623302075 + 1137 46.0253275398 26.5960770076 46.3112812302 + 1138 40.7247199037 30.7540213974 41.0563180807 + 1139 35.4398761134 48.1878960595 5.9349937857 + 1140 39.6395110498 39.8422899035 31.5651862907 + 1141 39.4996431177 46.6168063879 20.1145037162 + 1142 40.4345668705 30.3303449234 41.3017124463 + 1143 55.0071971621 24.7563896430 50.0000000000 + 1144 34.7554283681 47.7890062743 6.4486114402 + 1145 55.5363085334 25.0133518414 50.0000000000 + 1146 45.9823260924 27.0755267835 46.2744417850 + 1147 40.8275043689 44.1096235918 26.7102046072 + 1148 41.8789952742 29.6545142483 42.8251881244 + 1149 37.1441992649 48.2489436178 12.3032257680 + 1150 49.1594429392 26.2623437510 48.0087475100 + 1151 34.1284140401 48.1196178832 0.0000000000 + 1152 34.1342808628 48.1555213656 1.9585796807 + 1153 44.7038771729 27.2000493996 45.9494971962 + 1154 48.7094558669 26.0040146530 48.1930213456 + 1155 41.8079635648 29.0937398083 43.4859686724 + 1156 34.7919094705 47.9366791728 8.6589871931 + 1157 39.8869509744 45.6984157689 23.7477613558 + 1158 40.1761493446 46.5355104605 22.4368790926 + 1159 35.1315637761 48.3613529834 7.9294883426 + 1160 53.5538244809 25.2809754415 50.0000000000 + 1161 39.1004624616 32.1248181460 39.8277772439 + 1162 54.0640978282 25.5409191298 50.0000000000 + 1163 43.1703760307 28.6825855585 44.5767177849 + 1164 33.9729308520 48.2178716023 3.8271308970 + 1165 32.7684619190 47.6496726993 2.1028069678 + 1166 32.6093718027 47.6036943704 0.0000000000 + 1167 32.8953116172 47.7426808916 4.2114434031 + 1168 36.5318871686 48.0452271036 14.3726067526 + 1169 39.0946886555 38.7808182228 33.9265360877 + 1170 47.6292504556 26.5688112042 48.0837002100 + 1171 40.0009004705 41.1600740716 31.8214684108 + 1172 47.2672999678 26.2805520627 48.1865184369 + 1173 52.0451376342 25.6176763531 50.0000000000 + 1174 35.5048960356 48.1468266045 12.5864182702 + 1175 52.5364752767 25.8788199640 50.0000000000 + 1176 44.5948245381 27.8142883207 46.3307089257 + 1177 38.9199133528 33.5545762220 39.2244060361 + 1178 33.6056826315 48.3183502738 5.6453479534 + 1179 39.7435571893 32.0473147098 41.0036981474 + 1180 38.3776892214 48.1992768396 17.7981524426 + 1181 32.6254456930 48.0693657139 0.0000000000 + 1182 32.9571939713 47.8825011718 6.3198303428 + 1183 38.4452417406 35.2731281016 37.4786438455 + 1184 32.6263265254 48.0649445148 1.8477795827 + 1185 38.4883730712 37.0699296433 35.7547776688 + 1186 37.1498529012 48.0456999012 16.6707322919 + 1187 34.8285589688 48.5768742132 9.9614225267 + 1188 36.8334217604 48.5724232896 14.6317696830 + 1189 39.4580516852 31.5794351744 41.4176904159 + 1190 34.5846510706 48.1939284814 11.1402746120 + 1191 43.2164063908 28.1237417683 45.7954150106 + 1192 40.7763001165 30.7829980225 42.8032196747 + 1193 32.4354273863 48.1009377237 3.5593935099 + 1194 31.2279062510 47.3764254314 2.0173490825 + 1195 39.7522055738 42.3212366388 30.8585425170 + 1196 31.1060653788 47.3668913226 0.0000000000 + 1197 50.5128948812 25.8256868858 50.0000000000 + 1198 50.9854088910 26.0875705580 50.0000000000 + 1199 39.8294119674 43.5227515480 29.3966042600 + 1200 39.5390973606 41.4989680129 31.9817801670 + 1201 39.0390569455 39.9823631551 33.5183621867 + 1202 31.3018208277 47.4912239148 4.0501316721 + 1203 45.9029397906 26.7305514715 48.0978034964 + 1204 41.9595179894 29.6903017941 44.5843035159 + 1205 32.8061770325 48.0635281633 8.3784553220 + 1206 37.9916321488 34.8752128009 38.2701463056 + 1207 46.1679338369 27.0796614292 48.1181333178 + 1208 31.1781946194 47.7475347868 0.0000000000 + 1209 31.1948964291 47.7472597591 1.7528172078 + 1210 33.0231539951 48.4537700290 7.5067832258 + 1211 39.9263019588 46.2445560171 25.5501971549 + 1212 31.9661282158 48.1194315461 5.1362824461 + 1213 40.3603648532 30.5199325196 43.4157484806 + 1214 38.1246156117 37.6821603939 35.8394595592 + 1215 29.6697219955 46.8076660352 0.0000000000 + 1216 40.1382469095 43.4938089485 30.2868878193 + 1217 31.1458336974 47.7991673047 3.3389108577 + 1218 29.7357390838 46.8819714346 1.8893676787 + 1219 31.2784734742 47.6435827789 6.0432732445 + 1220 48.9762957945 26.0004590407 50.0000000000 + 1221 49.4302643154 26.2651318756 50.0000000000 + 1222 43.2886670260 28.6931026734 46.3409835087 + 1223 29.7739253591 46.9957160238 3.8175520547 + 1224 31.0461544132 47.8462263221 4.5040557800 + 1225 38.6683121972 48.0915238161 21.1537284298 + 1226 34.7617519669 48.4706217321 13.9716409256 + 1227 34.4713654072 48.8453901139 12.0181172418 + 1228 29.7768517822 47.2019365963 0.0000000000 + 1229 29.8313134743 47.2649105211 1.7701691108 + 1230 28.2830846838 46.1482993363 0.0000000000 + 1231 28.3585026009 46.2493742562 1.8265170541 + 1232 39.4436155343 45.2486583432 27.8007054831 + 1233 29.8783993790 47.3622624063 3.4117645002 + 1234 44.5331493659 27.3873206674 47.9792904752 + 1235 38.8848532602 33.4956989292 40.9705199027 + 1236 37.2023034303 48.2683909894 19.6277328184 + 1237 41.7983300376 29.2292675041 45.7250929562 + 1238 29.7228483426 47.1431240782 5.7389402751 + 1239 31.0890099445 47.8096489049 7.9279558149 + 1240 38.2924721062 35.1849694990 39.2179717645 + 1241 28.4358118099 46.5325813420 0.0000000000 + 1242 28.3850122032 46.3574687779 3.5864053553 + 1243 26.9589393217 45.3625775360 0.0000000000 + 1244 39.7775832217 32.0256448230 42.7774077434 + 1245 35.3827035724 48.5921839660 16.1823223249 + 1246 30.0495302986 47.5510182921 4.9855796424 + 1247 28.5107069919 46.6412972521 1.7764407183 + 1248 27.0489241158 45.5067176948 1.7503709517 + 1249 38.5767825979 38.9101088574 35.8802505939 + 1250 39.2605838929 40.8136592355 34.2253425406 + 1251 32.2832044267 48.2821235813 10.3711506809 + 1252 38.1526486934 37.0488974586 37.5315949422 + 1253 32.5554776128 48.6576471166 9.5672519653 + 1254 44.7670428915 27.7859726231 48.1478899213 + 1255 30.7847193504 47.9847743104 6.7527560299 + 1256 47.8895439516 26.5373250725 50.0000000000 + 1257 47.4533370761 26.2656246996 50.0000000000 + 1258 27.1425453572 45.7651824790 0.0000000000 + 1259 28.5557047972 46.7544135242 3.4707031681 + 1260 27.0643795306 45.6089055333 3.4531719880 + 1261 25.6355199495 44.5772865239 0.0000000000 + 1262 27.2358158603 45.9105557599 1.7332501150 + 1263 28.3151172923 46.4871452225 5.4099833212 + 1264 40.8415943655 30.7900544781 44.5900147941 + 1265 25.7362476268 44.6908166931 1.6651550633 + 1266 27.2630939162 46.0199932783 3.4325544841 + 1267 29.5378035349 47.2937062042 7.5383087754 + 1268 28.6022210454 46.9236433997 5.1313240780 + 1269 25.7244415130 44.7669579178 3.2915966390 + 1270 25.8492789044 44.9977836159 0.0000000000 + 1271 26.9878595680 45.7146545609 5.1120392595 + 1272 25.9414926743 45.1052379673 1.6679522144 + 1273 33.1397524550 48.6329133974 13.1794542421 + 1274 24.3128836155 43.7924601513 0.0000000000 + 1275 30.7101719325 47.9654918921 9.6326917260 + 1276 24.2903139467 43.8013680329 1.5331767837 + 1277 42.0620115491 29.6816446356 46.3580249396 + 1278 25.9354770043 45.1853262482 3.2888421069 + 1279 27.2344243120 46.1515530038 5.0587172214 + 1280 25.6228328980 44.8396951274 4.8738186212 + 1281 28.1304578480 46.6189697855 7.1602400744 + 1282 24.5560124517 44.2303847528 0.0000000000 + 1283 24.2216598322 43.8284646967 3.0647641703 + 1284 39.5956865717 45.7106272963 28.9807368467 + 1285 43.1715231264 28.2417780324 47.9275612603 + 1286 24.5338786412 44.2391206082 1.5118083593 + 1287 28.6818218732 47.1773067006 6.8766847349 + 1288 35.4227512281 49.2546202902 16.8867986012 + 1289 38.6619525960 47.9550322492 24.2824406527 + 1290 46.3998246036 27.0130655372 50.0000000000 + 1291 45.9796534237 26.7299618097 50.0000000000 + 1292 39.0010088146 32.2673192768 43.2252959940 + 1293 38.4403086436 40.1026955117 35.6845672517 + 1294 25.8586106583 45.2741923395 4.8669479568 + 1295 26.8196600235 45.8308145854 6.7916907196 + 1296 39.0505253595 42.3131099859 33.5451667884 + 1297 33.7702255252 49.2156156468 14.1328943418 + 1298 30.3776420500 48.1846254334 9.0782552530 + 1299 24.4664300470 44.2657414727 3.0241691857 + 1300 38.0484426826 34.0940056118 41.3516483662 + 1301 24.1057791303 43.8742009273 4.5930566480 + 1302 29.2641511165 47.4520789976 9.2067934345 + 1303 37.5990038496 48.1267699004 23.1511833915 + 1304 33.7856051985 48.8919818786 15.7006283842 + 1305 32.0152618152 48.9094363722 11.5926144210 + 1306 25.4581994677 44.9281622512 6.4518256573 + 1307 27.1563681113 46.3184264565 6.7149837410 + 1308 43.4426619331 28.6438050634 48.1589753988 + 1309 40.4785144943 30.4787081347 45.6336701871 + 1310 24.3523561791 44.3107645753 4.5353642133 + 1311 35.3224604965 48.9417034486 18.7166543503 + 1312 38.2069211004 35.0499682794 40.9796006176 + 1313 38.8917531489 33.4130870024 42.7538622243 + 1314 25.7206164109 45.3804686866 6.4412578418 + 1315 30.2015050663 48.0544153188 10.8840465203 + 1316 27.8738348573 46.7605106198 8.7975288159 + 1317 36.5153495456 49.2742221654 19.9108357113 + 1318 23.9419724648 43.9388527572 6.1162703195 + 1319 37.9094809755 36.9056059787 39.2645166111 + 1320 26.5731262587 45.9506253979 8.3939794295 + 1321 28.4564311483 47.3725183570 8.7661288891 + 1322 39.0337350040 43.8249482772 32.3822974664 + 1323 39.8233758200 31.9982723439 44.5622176093 + 1324 38.1530426876 38.8150624654 37.6705379268 + 1325 30.9491508846 48.4571198578 12.2510966114 + 1326 24.1907702017 44.3745399357 6.0435832323 + 1327 25.2254245355 45.0268311627 8.0097995688 + 1328 26.9141890686 46.4617610527 8.4284787457 + 1329 38.7134454950 40.7831271158 36.2238231679 + 1330 28.9504832732 47.6141869174 10.6968517253 + 1331 44.5823088758 27.3903813807 50.0000000000 + 1332 44.9878773576 27.6864271265 50.0000000000 + 1333 25.5001824598 45.4931067952 8.0221253258 + 1334 40.9251911141 30.7620682471 46.3619054731 + 1335 23.7300727339 44.0224861388 7.6326131119 + 1336 41.8750119958 29.2373273052 47.8761252798 + 1337 39.1022178891 42.3271492790 34.9931652493 + 1338 29.8339414230 48.3790398889 11.0874480100 + 1339 39.2716686400 43.3586401698 33.8886902754 + 1340 38.0802081200 47.4253421311 26.8271221301 + 1341 27.5631561788 46.9191937510 10.3681537280 + 1342 23.9813015494 44.4572138100 7.5469913001 + 1343 32.0887594288 48.9916711264 15.0167381107 + 1344 33.9357127370 49.1921071251 17.9361199856 + 1345 37.5137113213 37.8944753590 38.9080880615 + 1346 26.2751963780 46.0947103207 9.9748883385 + 1347 24.9534356269 45.1545974146 9.5571107366 + 1348 42.2088117147 29.6072547194 48.1601563353 + 1349 28.0429720628 47.5398226273 10.5884235159 + 1350 31.3572080056 49.1934880053 13.5400319569 + 1351 38.7108258815 45.3062580865 31.3478945259 + 1352 26.6053882829 46.6235304891 10.0936797738 + 1353 23.4705215789 44.1249267633 9.1403714782 + 1354 25.2186750157 45.6212367112 9.5834716150 + 1355 28.8493404648 47.9157716489 12.2520772091 + 1356 38.5138123756 47.7194238588 27.6416689342 + 1357 36.9322309395 49.3241769839 22.9822011456 + 1358 23.7241774527 44.5586965141 9.0438134042 + 1359 38.5541831515 42.2859899075 35.5959357917 + 1360 32.7830656416 49.6421481938 16.1356874912 + 1361 39.3134072406 31.8525297639 45.6575337006 + 1362 38.1765175193 34.8914302895 42.7811369195 + 1363 39.1026654782 45.1358047545 32.5659044827 + 1364 32.6815556438 49.3220490306 17.3218356716 + 1365 37.7472325578 36.6920396940 41.0290482643 + 1366 43.2671590652 28.2028609047 50.0000000000 + 1367 27.2552971543 47.1350576733 11.9413841760 + 1368 38.9302097015 33.3159352642 44.5528224868 + 1369 43.6593035055 28.5128277728 50.0000000000 + 1370 38.2855610718 40.4042125191 37.8323785543 + 1371 37.8170548197 38.6123816501 39.3783740932 + 1372 25.9370213899 46.2671544545 11.5328329749 + 1373 30.2214652904 48.7802819194 14.4155941879 + 1374 24.6344446353 45.3057092139 11.0947017565 + 1375 38.3678948204 33.2924200363 44.3830796395 + 1376 29.2108056778 48.5835375948 12.9400462955 + 1377 38.5983996258 43.8333120801 34.3548059829 + 1378 39.9027411823 31.9282067170 46.3587064032 + 1379 23.1644244212 44.2457383391 10.6380082342 + 1380 40.6478068401 30.3603835372 47.8268895441 + 1381 33.9528740524 49.9075925813 18.9069026181 + 1382 24.8735470610 45.7596930242 11.1210579544 + 1383 37.9210999274 40.4585006362 37.9992898594 + 1384 26.1788947578 46.7684681287 11.7207930939 + 1385 23.4202848122 44.6786380027 10.5324318104 + 1386 27.5644296029 47.7230201572 12.3193222961 + 1387 41.0615168735 30.6621245049 48.1564140779 + 1388 28.3780089250 48.1735765372 13.9843439432 + 1389 31.1501724506 49.3315376553 16.7150395062 + 1390 37.2477605504 36.6865732076 41.6786722946 + 1391 37.7729194150 34.5109776649 43.9237438742 + 1392 37.9240683928 47.0153562253 30.3669067133 + 1393 38.6643527119 42.6394723149 36.8076339032 + 1394 24.2642492184 45.4724134984 12.6113851267 + 1395 26.8320531720 47.3566491250 13.5527675077 + 1396 25.5342089629 46.4539573709 13.0833993102 + 1397 30.3974938940 49.4761751219 15.4243050730 + 1398 22.8135773211 44.3842119901 12.1242634262 + 1399 42.0314739211 29.1321028324 50.0000000000 + 1400 37.1374998462 49.2291191364 26.1394988679 + 1401 38.3479540336 44.9826021794 33.8850586454 + 1402 42.4111645426 29.4566881467 50.0000000000 + 1403 23.0712051758 44.8164140645 12.0114884389 + 1404 24.4796818543 45.9141785886 12.6334805158 + 1405 38.3706301557 41.6866331001 38.0152171782 + 1406 31.7124320444 49.6070951991 18.2834282388 + 1407 34.7156634120 50.1736676960 21.7888359953 + 1408 25.6993120995 46.9231019862 13.2887034755 + 1409 37.6555759727 36.4650004382 42.8048391622 + 1410 32.0964032815 49.7164473017 19.1070330807 + 1411 38.1896031508 34.7260587681 44.5800368125 + 1412 37.9373002332 40.2914485854 39.4589689138 + 1413 38.3672043103 47.1496231179 31.3340656993 + 1414 28.5083385263 48.7908647287 14.6875924798 + 1415 38.4639231913 33.1085984827 45.9858112342 + 1416 37.5539735912 38.3538302977 41.1349433079 + 1417 26.9535355561 47.8777993114 13.9730419329 + 1418 29.4487794876 49.0588560781 16.1745093889 + 1419 38.9973209872 33.1982149543 46.3604119924 + 1420 38.2727792427 44.0601206560 35.6873326163 + 1421 34.2606322034 49.8323076809 22.5873268652 + 1422 32.8007213765 49.8481749639 20.4845325771 + 1423 39.5468133159 31.5824896737 47.8470279721 + 1424 38.1093564670 42.5556677153 37.5698941803 + 1425 31.4524667189 50.0922754455 18.0335404211 + 1426 38.6431327461 44.4265066060 35.8312982876 + 1427 27.7921631319 48.4141213158 15.6178774043 + 1428 40.0112837969 31.8170737532 48.1658536386 + 1429 23.8270704411 45.6432181358 14.1171965422 + 1430 22.4204620970 44.5393681831 13.5982483692 + 1431 25.0692090738 46.6485923199 14.6122313470 + 1432 35.9392512375 49.3668359563 26.2514928798 + 1433 26.3189803122 47.5701946529 15.1172551092 + 1434 22.6792184896 44.9711248419 13.4799825768 + 1435 30.3803830530 49.6144524645 18.0821724392 + 1436 24.0364679562 46.0827550209 14.1297264258 + 1437 40.8741369851 30.1572863308 50.0000000000 + 1438 41.2427631793 30.4976274334 50.0000000000 + 1439 25.1848938311 47.0895080054 14.7963901526 + 1440 37.2851054657 39.6243095538 40.9225900328 + 1441 37.7562963073 46.5286876602 33.3241541065 + 1442 37.1747177650 36.2491670488 43.9963044776 + 1443 35.3299861871 50.3285850213 24.7937875285 + 1444 29.3785096002 49.7467211781 17.1950046478 + 1445 26.3021255910 48.0294623834 15.5265661028 + 1446 38.1082035650 41.9252544359 39.3849446480 + 1447 37.7671856223 34.4163063397 45.9709818156 + 1448 32.3706174929 50.5384218128 20.8003392867 + 1449 37.3797982224 38.0473711970 42.8742293793 + 1450 27.5924439170 48.9375505820 16.3585847284 + 1451 28.7247547628 49.3182312315 17.6997186426 + 1452 37.6248975541 36.2247796962 44.5916173500 + 1453 21.9882102816 44.7099709529 15.0595228635 + 1454 37.6126672653 41.3391630960 39.9640749410 + 1455 37.6135419158 40.0712528040 41.2358709029 + 1456 23.3386585292 45.8155883305 15.5876980350 + 1457 38.2288266336 34.5710435547 46.3637223535 + 1458 38.2433577123 46.2663774510 34.7589431390 + 1459 36.5220125579 48.8058103618 29.5907088306 + 1460 22.2472753084 45.1416057988 14.9373537370 + 1461 38.6332423306 32.8346226323 47.9311839017 + 1462 24.5389574138 46.8327711301 16.0925749848 + 1463 27.1355599977 48.6389273963 17.1541155367 + 1464 37.0052948333 38.5210520779 42.5880636241 + 1465 23.5496413343 46.2569734875 15.5882969686 + 1466 37.8121869229 45.6273896283 35.5187613085 + 1467 25.7445087261 47.7737266330 16.6139310039 + 1468 39.0875849513 33.0598651359 48.1673257065 + 1469 29.9189500635 49.9548118844 19.6037838105 + 1470 37.8908193482 44.3514992833 37.3922042703 + 1471 38.2478849457 43.5284257072 38.6391842326 + 1472 24.6254785162 47.2492509375 16.2388622986 + 1473 36.9047184087 49.2488024824 29.9546009253 + 1474 39.8105333812 31.2792554398 50.0000000000 + 1475 40.1701437513 31.6368503471 50.0000000000 + 1476 25.5882867861 48.1293494996 16.9270470627 + 1477 30.1859866933 50.5149278090 19.8620855781 + 1478 37.7411788884 43.0535600755 39.3993764097 + 1479 21.5205406467 44.8945525607 16.5081472615 + 1480 33.1787860811 50.9266604938 23.7347900829 + 1481 22.8267578026 45.9962292917 17.0093735556 + 1482 21.7789413956 45.3264495863 16.3835407838 + 1483 35.6414022699 50.3584737433 27.9895530003 + 1484 37.3524590996 39.6170136247 42.9729363000 + 1485 23.9765887230 47.0131350678 17.5107920943 + 1486 37.2833346371 37.7338273566 44.6273387626 + 1487 28.0191911608 49.5974036970 19.1962640366 + 1488 37.1821213351 35.9231205719 46.0420357843 + 1489 36.7834823974 48.1667032706 32.7266294802 + 1490 26.5572262145 49.0189406597 17.9212899143 + 1491 23.0514029749 46.4525004381 17.0099232322 + 1492 37.6398797812 35.9895999898 46.3958156212 + 1493 36.8680012680 37.8895446947 44.3910145280 + 1494 28.1877509009 49.9716954484 18.9073280383 + 1495 25.1319988544 47.9708220429 18.0489286816 + 1496 37.8702678292 34.1568827870 47.9669847189 + 1497 26.4604399341 48.8604492135 18.6085036717 + 1498 38.0761206402 45.3014209007 37.7763496859 + 1499 37.4079827824 48.1223659667 33.6753210858 + 1500 24.0953056366 47.4272128370 17.5796990592 + 1501 38.2974982842 34.4008910397 48.1787280999 + 1502 37.7684400725 42.0824071662 41.4341329422 + 1503 24.9324818151 48.1532342618 17.9913483952 + 1504 37.1925793949 40.8258579092 42.3491181205 + 1505 38.8609938243 32.4991206638 50.0000000000 + 1506 39.2140069062 32.8753019434 50.0000000000 + 1507 36.9811302514 39.8662598349 43.3688942625 + 1508 37.0653429563 47.2592209038 35.2694290305 + 1509 33.0971179408 50.7247308438 25.9445546181 + 1510 29.3878608358 50.4020842691 21.4836199204 + 1511 21.0216781636 45.0914454789 17.9447041813 + 1512 37.3984424934 42.1573988960 41.6026162515 + 1513 37.3816694701 46.0232118944 37.2755736969 + 1514 22.3030733512 46.1982547594 18.4127130593 + 1515 21.2783220335 45.5240359162 17.8190113278 + 1516 37.5319757416 44.7210799375 39.0924368914 + 1517 30.8904190833 51.1293714122 22.7259086896 + 1518 33.9048712879 51.1701078411 26.6833747257 + 1519 23.4185655339 47.2172547370 18.8953022086 + 1520 22.5522993296 46.6927596601 18.4464698467 + 1521 37.1800248228 39.2895976607 44.6643367871 + 1522 34.5142295245 50.4092392414 29.1031206758 + 1523 37.4512118619 41.1469367888 43.1721857597 + 1524 24.4954268315 48.1549705750 19.4133338882 + 1525 37.8835531331 44.0874500873 40.5458799676 + 1526 37.2404449544 37.4791229498 46.3929021845 + 1527 27.2143733192 49.8636897724 20.6729231548 + 1528 36.8184463667 37.4630616071 46.1934527211 + 1529 23.6951910050 47.7753183559 19.0232478010 + 1530 25.6924780237 49.0434485747 20.0080986778 + 1531 25.1352359033 48.8773561232 19.4371664507 + 1532 37.5211203733 47.1315645831 36.9291135807 + 1533 37.2542084938 35.5844067690 48.0119040990 + 1534 36.8181539328 39.3644296679 44.7502174469 + 1535 30.2209494286 50.8672776158 23.6737949965 + 1536 37.6723816387 35.8091966123 48.1982610448 + 1537 37.4331480132 43.6700667093 41.0756422867 + 1538 28.7172520140 50.9025951455 21.6655714375 + 1539 35.3225059898 50.6281876039 30.4199259638 + 1540 38.0457078660 33.8123957725 50.0000000000 + 1541 36.9912635228 40.7113380330 43.9596875630 + 1542 38.3948195748 34.2081826430 50.0000000000 + 1543 36.1156066322 49.8574479816 32.5882893920 + 1544 26.8195327456 50.1315327560 20.6284426431 + 1545 20.4962637280 45.2988180215 19.3702882707 + 1546 21.7609743198 46.4057388184 19.7862033341 + 1547 35.3146022617 49.8115721916 32.2065408522 + 1548 20.7499752019 45.7325658278 19.2447589277 + 1549 37.1075963642 41.5613811994 43.5744835863 + 1550 22.8459616528 47.4137342363 20.2221150873 + 1551 31.6930343523 51.6240014806 25.6796205780 + 1552 21.9386395384 46.8875083803 19.8915934466 + 1553 37.2552841196 40.7422568506 44.7097812678 + 1554 37.4827982710 42.0987662260 43.6185238091 + 1555 34.2696000239 51.2817242160 29.4214135247 + 1556 23.8655505029 48.3278660154 20.6928006462 + 1557 37.0609095134 46.2546180407 38.9698975581 + 1558 37.5918647420 45.9634233807 39.7884637698 + 1559 37.6085304380 43.0831255278 42.9506125201 + 1560 37.0715694184 39.0241526537 46.3820490488 + 1561 24.9072313547 49.1495641817 21.2115103536 + 1562 35.9615533650 48.9196840693 34.9732833921 + 1563 37.2176606819 45.1359209955 40.6588391095 + 1564 37.2177725821 42.7979219667 43.1270455820 + 1565 36.8896433539 40.6408888867 44.9779559195 + 1566 36.5833754618 47.6717378799 37.2303068661 + 1567 36.7029731229 38.9887154194 46.3387380348 + 1568 25.9534149564 49.8757421902 21.8607099029 + 1569 22.9628550937 47.9878348772 20.6031383084 + 1570 36.8287281239 37.0924717708 48.0589053557 + 1571 37.2328309918 37.2845784019 48.1882788898 + 1572 36.5853137478 48.9370884209 35.9248658570 + 1573 37.3847564601 35.2095697074 50.0000000000 + 1574 26.9246384109 50.5166336168 22.8303129289 + 1575 19.9492634359 45.5147101510 20.7864660873 + 1576 37.7331382852 35.6257010176 50.0000000000 + 1577 21.2222276341 46.6357758531 21.1466805491 + 1578 20.1988225793 45.9500968147 20.6622694047 + 1579 32.6966524802 51.8569917829 28.4227213566 + 1580 24.0132795318 49.1169863780 21.4828989610 + 1581 22.2968951274 47.6387130463 21.5265257983 + 1582 37.3663031831 42.0843619130 44.7676087857 + 1583 37.5754453484 44.6783288640 42.3551059846 + 1584 29.9675298259 51.4429479075 26.1825248252 + 1585 34.6588186069 51.1372025894 31.9017062750 + 1586 29.2513132605 51.7044151798 24.6818887225 + 1587 36.9980374043 41.8440387380 44.9012926088 + 1588 21.2695000634 47.0204996467 21.2406802854 + 1589 23.3063934429 48.5311652484 21.9069027564 + 1590 37.1621620723 44.2681711026 42.6981620271 + 1591 25.1469026205 49.8016266495 22.5060247392 + 1592 36.8807224563 46.3089558532 40.3192499419 + 1593 24.3103374400 49.2842885557 22.2498046403 + 1594 32.0005073808 51.5237602664 28.8172170944 + 1595 37.1188739955 40.5623493976 46.3734146407 + 1596 25.4998394299 50.3247590900 22.4611190795 + 1597 36.7659204734 40.4145031532 46.4582232287 + 1598 27.2792442342 51.2638036866 23.5157482229 + 1599 36.9246162740 47.8177610505 39.0427708111 + 1600 27.3878785092 51.0845889667 24.4190782431 + 1601 36.6416067535 38.6181365999 48.0972780777 + 1602 22.0829862438 48.0068549584 21.9669887238 + 1603 37.0149058108 38.8271510202 48.1657623921 + 1604 37.4513738840 43.4501721614 44.4801025752 + 1605 25.3080114324 50.2141830140 23.3627577984 + 1606 36.9055629169 36.6787534159 50.0000000000 + 1607 37.0619391954 43.1571078396 44.6826713439 + 1608 33.3521727141 51.2627744680 31.8627318012 + 1609 19.3858842391 45.7370667682 22.1952103935 + 1610 20.6713731009 46.8682274356 22.4897594663 + 1611 37.2572725030 37.1156211379 50.0000000000 + 1612 36.2926873055 47.8063704673 39.2372359091 + 1613 19.6300656159 46.1745759490 22.0734600004 + 1614 35.2570246931 50.5808564976 34.8818699056 + 1615 33.2346074394 51.9480467151 30.9281087208 + 1616 21.7676842382 47.8893273210 22.8182312390 + 1617 36.8659589225 45.7975673780 42.1650054487 + 1618 20.6567723545 47.1255944277 22.4157703415 + 1619 23.9712793615 49.5986427142 23.3680213830 + 1620 22.8223210004 48.8008148100 23.1308308337 + 1621 37.2049554172 46.4566108566 41.8051552839 + 1622 37.2444866977 42.0396433493 46.3266832590 + 1623 21.3572695334 47.8178192944 22.6947825063 + 1624 34.4173320082 50.5369574529 34.7369677851 + 1625 35.4046417314 49.3778253821 37.2085478812 + 1626 36.8868457011 41.8546966487 46.4370135229 + 1627 30.3774356034 52.3205476983 27.9505866453 + 1628 31.9754672562 52.3266930710 29.9666585345 + 1629 22.6703535880 49.1215692638 23.3145830411 + 1630 36.6725084098 40.1307384934 48.1494778157 + 1631 37.0308496610 40.3956019723 48.1381901027 + 1632 37.3456348410 45.0370271346 44.1462430272 + 1633 25.2753597788 50.7408104121 24.7440274374 + 1634 36.9462353955 44.6443741921 44.4096848144 + 1635 36.6452867302 38.2016063201 50.0000000000 + 1636 35.8741254034 49.6233013028 38.2249796324 + 1637 27.2681162685 51.6387250636 26.4170039209 + 1638 24.2129086506 50.4557692846 24.1724301091 + 1639 37.0053829539 38.6588307444 50.0000000000 + 1640 18.8114998112 45.9637669712 23.5988145892 + 1641 21.2705518727 48.2666605331 23.6846909501 + 1642 20.1133391629 47.1251137304 23.8648788368 + 1643 36.2718722688 47.4774785709 41.3317564792 + 1644 20.2057020996 47.3943325178 23.6450477651 + 1645 19.0491110171 46.4038692918 23.4805967674 + 1646 37.3213357189 43.5487373989 46.2006546180 + 1647 21.2460862858 48.1869747935 24.1658589115 + 1648 29.3029075458 52.0799210800 28.7474570619 + 1649 23.6614301294 50.0240652078 24.6843253399 + 1650 36.9420220992 43.2552818570 46.3490353831 + 1651 33.6824059671 51.8663719055 33.8391796636 + 1652 25.7505296650 51.4954600583 25.2166614271 + 1653 22.3726116992 49.1608321402 24.4714310985 + 1654 36.7940946736 41.6450497821 48.1537085583 + 1655 37.1555504061 41.9581769100 48.0944929907 + 1656 36.4550088281 48.3162130191 41.2451477757 + 1657 31.0973007575 52.2190311513 31.5437092252 + 1658 27.2642400575 52.3061557669 27.0122941356 + 1659 36.5901858676 46.1769925996 44.0368936650 + 1660 36.6246676834 39.7468148100 50.0000000000 + 1661 36.9379876732 46.7358480739 43.8313827553 + 1662 35.1336970051 49.5232529280 39.4137371779 + 1663 36.9947098724 40.2229497212 50.0000000000 + 1664 25.0549538683 51.3057645268 26.4464518958 + 1665 18.2315873594 46.1926489955 24.9997930831 + 1666 21.9616572268 49.5786491272 25.1854074100 + 1667 20.7958551101 48.6344831089 25.0803592795 + 1668 19.5562278422 47.4043478933 25.2665981779 + 1669 37.2006365494 45.1381299602 46.0170596038 + 1670 19.6923285689 47.6817028466 24.9892653602 + 1671 31.8745419676 52.7157290766 32.5529863997 + 1672 36.8124350931 44.7527258461 46.2003036076 + 1673 32.4976059934 51.9114326832 34.5025334455 + 1674 18.4615068171 46.6357871241 24.8861958440 + 1675 20.7129597803 48.4993587479 25.5452057464 + 1676 34.4117260132 51.2945235683 37.2337816893 + 1677 23.1978495142 50.6077619177 25.6872677387 + 1678 33.8354673355 50.9979613305 37.1950684972 + 1679 24.4412681463 51.3934262204 26.1159162094 + 1680 23.2919787254 50.5240289463 26.2336816311 + 1681 21.8897020008 49.5413563732 25.8863265919 + 1682 36.8658418946 43.1272981914 48.1292023109 + 1683 37.2369093624 43.5052433444 48.0409141163 + 1684 29.8224819539 52.9721178033 30.7214763648 + 1685 26.8062841606 52.2169709305 28.6613154577 + 1686 36.7372811487 41.2889636927 50.0000000000 + 1687 37.1114698389 41.7833714482 50.0000000000 + 1688 35.1613708770 49.3242859951 41.3590693546 + 1689 35.9327713285 47.8242323067 43.6170232684 + 1690 35.2871182886 50.1721528172 40.6689147604 + 1691 17.6516733857 46.4215316205 26.4007728941 + 1692 36.4386128728 46.2932736122 45.9945867515 + 1693 28.6098865252 52.7081647152 31.3557076688 + 1694 19.1418930745 47.9601138400 26.3700276026 + 1695 24.4548177278 51.9267534140 27.4447840354 + 1696 20.2570734022 48.9520889446 26.4722372581 + 1697 18.9901125658 47.6748591581 26.6661835620 + 1698 17.8730743608 46.8680318558 26.2924653609 + 1699 36.1720667841 48.5389815960 43.5697542456 + 1700 36.8041813355 46.7723342957 45.8543165343 + 1701 21.3508121992 49.9023506860 26.6562908435 + 1702 36.7571832680 44.6447616700 48.0698528595 + 1703 20.1533248821 48.8324749479 27.0046888808 + 1704 37.1283391266 45.0862008695 47.9639993165 + 1705 24.5740774287 51.8657926652 28.4078781843 + 1706 32.6399429100 52.6209452208 36.1451373583 + 1707 22.5272154509 50.9258545732 27.1807518441 + 1708 36.8343088010 42.8316839524 50.0000000000 + 1709 21.3322001388 49.9549487178 27.4739460148 + 1710 22.7639140600 51.0205880256 27.9736724069 + 1711 37.2045859901 43.3443434345 50.0000000000 + 1712 30.3319271362 52.8282689375 34.2233472609 + 1713 26.6238756527 53.0389088729 29.8656542695 + 1714 31.8924875752 52.3913455779 37.0197014726 + 1715 34.1882095548 50.5221224990 41.3799224721 + 1716 20.8402896204 50.1192077408 27.7952483572 + 1717 33.4666804470 51.2792088941 39.9354578124 + 1718 17.0772844361 46.6482336082 27.8043810849 + 1719 19.8252509659 49.3158229463 27.7962918288 + 1720 18.6353581678 48.2672194279 27.7455389768 + 1721 34.9458581648 49.4789877235 43.3651946475 + 1722 18.4053097923 47.9462374628 28.1150426833 + 1723 17.2898266178 47.0982302653 27.7012293868 + 1724 35.7751685514 47.9232614344 45.7869411746 + 1725 36.4106929435 46.1642305449 47.9812574307 + 1726 26.1530035131 52.8148027342 31.1162921959 + 1727 30.5674843895 53.4651100185 34.8998430937 + 1728 33.6748897578 51.9055993791 39.8106629839 + 1729 36.7687146754 44.3744661890 50.0000000000 + 1730 36.1409919159 48.3887135254 45.7536875885 + 1731 36.7667213418 46.6585019693 47.8964721902 + 1732 19.5389147708 49.1608917193 28.5608927989 + 1733 37.1256360267 44.9039736666 50.0000000000 + 1734 23.8666537680 52.4855895490 29.4642394191 + 1735 20.6761222230 50.3161931556 29.1230384084 + 1736 21.4606238797 51.1147929617 28.9441414649 + 1737 34.8797306240 50.5197681606 43.4908753922 + 1738 27.9545834244 53.2867748336 33.9584307028 + 1739 28.1613355559 53.7468039468 33.5105437850 + 1740 22.0658470875 51.4467528845 29.7949899807 + 1741 23.8148212795 52.4107479590 30.6262973059 + 1742 16.5138978694 46.8705931341 29.2131321458 + 1743 19.6130160698 49.8870542780 29.1865300324 + 1744 18.1908922754 48.6409118957 29.1671392152 + 1745 33.8604029810 50.8232701156 42.8878884829 + 1746 16.7173615599 47.3241729242 29.1150944817 + 1747 17.8166594851 48.1952239120 29.5655373334 + 1748 35.8331865513 47.6731919305 47.8804486720 + 1749 36.4673921840 45.8885978802 50.0000000000 + 1750 29.7687475032 53.3206740366 36.8591965758 + 1751 31.7133632990 53.2779606514 38.6873504622 + 1752 36.1820331538 48.1711096269 47.8613161476 + 1753 18.9180164494 49.4257369782 30.0541473165 + 1754 36.8083141481 46.4322245133 50.0000000000 + 1755 31.4767987547 52.7395369732 39.5087548980 + 1756 34.7223718304 49.6746640832 45.6443078587 + 1757 25.5430377132 53.6310713327 32.4106363662 + 1758 35.2668659202 49.8806904140 45.8208383968 + 1759 19.9882756427 50.5810469444 30.6806536911 + 1760 32.6520625368 51.9591265272 42.1718555925 + 1761 15.9668876532 47.0864891805 30.6293194894 + 1762 25.3871925103 53.3988713755 33.7346161798 + 1763 23.1329250625 53.0132015949 31.6433673578 + 1764 16.1611787975 47.5436892256 30.5364474100 + 1765 17.7125350913 49.0212166232 30.6993695492 + 1766 17.2448599197 48.4297297945 31.0161537964 + 1767 34.2782474615 51.1901207346 44.8081007884 + 1768 21.1885001635 51.7222845341 31.5690416562 + 1769 20.9389485639 51.7879029251 31.1246106045 + 1770 19.1950138745 50.4361853144 30.9082283966 + 1771 35.9570895819 47.3455432900 50.0000000000 + 1772 33.0407374722 52.4259870160 42.7293055123 + 1773 33.5693495415 51.0845058647 44.7488592098 + 1774 29.4067599255 54.1252912106 37.5388066328 + 1775 35.0439492806 49.1222557880 47.8620557533 + 1776 18.3252526546 49.6568613665 31.5019961631 + 1777 36.2814962034 47.9008302257 50.0000000000 + 1778 35.4260916775 49.5618458963 47.9048876378 + 1779 27.5252936142 53.7841984496 36.6204113609 + 1780 19.3534521942 50.7529873053 32.0398276029 + 1781 34.4432576530 50.9624571897 46.2377036379 + 1782 29.4766732269 53.6495499137 39.2685522292 + 1783 34.0917817792 50.4607978296 46.6918384442 + 1784 22.5319667842 52.8660038508 33.1892155563 + 1785 20.2814632428 51.5534199724 32.4302339464 + 1786 15.4414612116 47.2938664616 32.0549156617 + 1787 33.3872197551 52.1045870720 44.7525698867 + 1788 15.6266165397 47.7546722650 31.9673507828 + 1789 31.0026761975 53.0947545582 41.8187815383 + 1790 26.7166692081 54.3684491999 36.2054220474 + 1791 16.7054588670 48.6463570912 32.4474564549 + 1792 17.1990886112 49.3558593818 32.2770458597 + 1793 32.2923530761 52.2489170117 44.1919637298 + 1794 35.2661731213 48.7257805670 50.0000000000 + 1795 30.9299067669 53.8172529436 41.3157778721 + 1796 24.3498522442 54.0881778202 34.7138192909 + 1797 18.6767991968 50.8651847155 32.6503966668 + 1798 17.8100649602 49.9011975509 32.9209255191 + 1799 22.3600536943 53.4023511939 33.6143622906 + 1800 34.2311263346 50.2649927434 48.1215147595 + 1801 33.2811951407 51.3547935163 46.3424601537 + 1802 35.5736763816 49.2904355038 50.0000000000 + 1803 20.3902858418 52.2843045978 33.0888296152 + 1804 34.5644432088 50.7800009644 48.0434657752 + 1805 20.3943881142 52.0874659497 33.6104591597 + 1806 18.9568134083 51.0558548657 33.3779759533 + 1807 25.0525845279 53.9378267603 36.4962627955 + 1808 33.5407571128 51.9407563681 46.3624464745 + 1809 14.9425852826 47.4907646868 33.4914866605 + 1810 32.6747575897 52.7238481946 45.1791781894 + 1811 27.3763505708 54.1528298147 39.1911193516 + 1812 15.1187766553 47.9551084177 33.4094526045 + 1813 16.2105677953 48.8609854222 33.8799400348 + 1814 31.9363989035 53.2783680568 44.3940461030 + 1815 29.2489768569 53.9026592890 41.6237821253 + 1816 16.6882062736 49.6584623185 33.8892443596 + 1817 30.8172077798 53.2575223486 43.9182411838 + 1818 34.4152042941 50.0131159488 50.0000000000 + 1819 28.4233015266 54.6625734358 40.2834912448 + 1820 17.3425941121 50.1488481543 34.3526205919 + 1821 32.1081806046 52.3970701465 46.0496130409 + 1822 33.2882266354 51.3332228089 48.0518671764 + 1823 21.6350695339 53.5965209298 35.0835151356 + 1824 34.7053638171 50.5847777666 50.0000000000 + 1825 33.6205906016 51.8467712414 48.1016620311 + 1826 32.6169439537 52.7704354394 46.4174653680 + 1827 18.1682060658 51.2739820603 34.4701874102 + 1828 18.5155923174 51.3458441924 34.8601373126 + 1829 19.9545268244 52.7616795424 35.0156594262 + 1830 14.4749015220 47.6753518697 34.9401261532 + 1831 22.2364912554 53.6645188460 36.4558519066 + 1832 20.0586881492 52.5681829851 35.4797536005 + 1833 30.2628623112 54.2365002878 43.5831318551 + 1834 14.6424382412 48.1431114519 34.8639157944 + 1835 15.7569431154 49.0716413277 35.3280954530 + 1836 25.2486972040 54.3544691581 39.1813778339 + 1837 22.6441740764 54.2811293431 36.6301919289 + 1838 27.3834837547 54.3980650559 41.5819482790 + 1839 16.8852545148 50.3523072741 35.7804951450 + 1840 16.1559470104 49.8802806035 35.5104307433 + 1841 31.5184760256 53.5786926994 46.1075366567 + 1842 33.4192524594 51.1913713405 50.0000000000 + 1843 29.1794161737 54.0442997388 43.8191709750 + 1844 32.1366270018 52.3756433839 47.9508910334 + 1845 30.7469246646 53.3344776794 45.9293074042 + 1846 25.0171618531 54.9209211416 39.2374609970 + 1847 32.5664129962 52.8111518909 48.0969636265 + 1848 18.0525099863 51.5542555213 36.3077694435 + 1849 33.6918520481 51.7676606203 50.0000000000 + 1850 14.0426356616 47.8459601829 36.4014154316 + 1851 19.3883502003 52.6716077797 36.9580249720 + 1852 14.2019633873 48.3169597214 36.3313739405 + 1853 17.6217826143 51.6049959619 36.3773902701 + 1854 28.1349435143 54.9510651201 42.9999392181 + 1855 23.1382496999 54.3186540289 39.1641232737 + 1856 15.3634238333 49.3080189140 36.8344711117 + 1857 20.7350380340 53.5637987716 37.8801401873 + 1858 25.5426779157 54.6258888269 41.5685332029 + 1859 29.9543639698 54.4441319294 45.7181869901 + 1860 16.5248448183 50.6279832025 37.3096788729 + 1861 15.5463914282 49.9134807902 37.0391426910 + 1862 27.5171107735 54.5365846296 43.8246805483 + 1863 32.2940182872 52.2462955889 50.0000000000 + 1864 19.8846588229 53.5587433223 37.6053859775 + 1865 30.8354590938 53.2997335905 47.9206668648 + 1866 29.2499660633 54.0874813676 45.8988417798 + 1867 31.3439624794 53.7061960042 47.9808643774 + 1868 17.6842869183 51.7714154916 37.7266206236 + 1869 32.5492178417 52.8249644564 50.0000000000 + 1870 18.9283573630 52.7747347930 38.2097578291 + 1871 13.6495070608 48.0011216554 37.8754135079 + 1872 19.9426783153 53.4031587816 38.5580413707 + 1873 21.5310144553 54.1536035407 39.6051735454 + 1874 13.8012021343 48.4751336777 37.8119182263 + 1875 16.7222347074 51.4354815540 38.0386946869 + 1876 23.7209750045 54.6685481637 41.5347761865 + 1877 15.0212522667 49.5562201636 38.4123045956 + 1878 25.6213781838 55.2930631417 42.6842093030 + 1879 14.9634157238 49.8434796458 38.4160892978 + 1880 25.8794501055 54.7961249560 43.8581358396 + 1881 28.1252702351 55.0844250504 45.4342497469 + 1882 16.2415656977 50.9426270806 38.9413781890 + 1883 27.7253559335 54.5873335440 45.8805838142 + 1884 20.2072634590 53.8104403552 39.8749886995 + 1885 29.4455948198 54.0406890443 47.9194106196 + 1886 31.0556439104 53.1650423463 50.0000000000 + 1887 29.8843485742 54.5143224938 47.8423913202 + 1888 18.8966977858 53.1475622214 39.6911042736 + 1889 21.8397015525 54.8800811402 40.5859542948 + 1890 17.5145827404 52.1598991530 39.3970169270 + 1891 13.2986475264 48.1396002141 39.3616793259 + 1892 31.2937489594 53.7437516167 50.0000000000 + 1893 22.0556631564 54.5546545986 41.6255241686 + 1894 13.4434059647 48.6163500136 39.3051180077 + 1895 15.8570880047 51.0421550335 39.2821752389 + 1896 17.9962588071 52.9710639715 39.6269102198 + 1897 14.5318112682 49.8228919740 39.6642230878 + 1898 24.1912319891 54.8870262528 43.7993993383 + 1899 14.7144413143 49.7895698475 40.0690177483 + 1900 15.2648544920 50.6799358392 39.9992191847 + 1901 26.1801333497 54.8808031027 45.9422352470 + 1902 26.1293341076 55.4393915589 45.3695727777 + 1903 20.5863714830 54.2573711585 41.6945328827 + 1904 27.9789191839 54.5746715770 47.9421703924 + 1905 29.7153990869 53.9263044768 50.0000000000 + 1906 28.2634532100 55.1156509840 47.7509155517 + 1907 23.2691476841 55.3706460658 43.2414283117 + 1908 16.0249839644 51.3107071926 40.8302359843 + 1909 12.9925387714 48.2604163671 40.8593245158 + 1910 29.9366513201 54.5020126345 50.0000000000 + 1911 19.0115473180 53.6096861687 41.5536837322 + 1912 16.5029499424 52.0820109713 40.7182200766 + 1913 13.1311599078 48.7395884600 40.8100738130 + 1914 17.4703165011 52.6093215879 41.2783031135 + 1915 22.5215340138 54.8350013932 43.7516411933 + 1916 14.3311772655 50.0188305267 41.0201279058 + 1917 15.3718296571 51.1154690497 41.1131310241 + 1918 24.5420612776 55.0121790663 45.8775190363 + 1919 14.4003249418 49.9420298851 41.7772388446 + 1920 26.4761154479 54.9034338311 47.9688423788 + 1921 19.4243518678 54.3942210853 42.3435904437 + 1922 28.2851595469 54.4990521448 50.0000000000 + 1923 24.1691063703 55.5607526272 45.5776087728 + 1924 20.9275108945 54.6012948180 43.7307770305 + 1925 26.5501946082 55.4759851891 47.7297381591 + 1926 12.7329764518 48.3628613981 42.3670913360 + 1927 28.4903511879 55.0685283530 50.0000000000 + 1928 12.8663419988 48.8441077868 42.3254974460 + 1929 21.4501696154 55.2487400903 44.1115575240 + 1930 22.9715193584 55.0148148671 45.9040480930 + 1931 19.3268530662 54.0847267024 43.6270529513 + 1932 14.1636702188 50.2392417066 42.5818267646 + 1933 15.4059688918 51.5573370108 42.7532285254 + 1934 13.9479458283 49.7922311342 43.1819167621 + 1935 15.8176318492 51.6658208996 43.1469596330 + 1936 24.9042904364 55.0711438177 47.9508988093 + 1937 17.6007708802 53.1121487609 43.3956460922 + 1938 17.0136056698 53.0341544398 43.0327255675 + 1939 26.7900664261 54.8703008360 50.0000000000 + 1940 24.8533558895 55.6344871436 47.8233081448 + 1941 22.5366344868 55.5294246445 45.9840493061 + 1942 12.5210655297 48.4464991967 43.8834472960 + 1943 21.3463179617 54.8552912818 45.8393042297 + 1944 26.9811436835 55.4329293365 50.0000000000 + 1945 20.7119681616 55.1677309137 44.9827699373 + 1946 12.6501155492 48.9294488540 43.8498103891 + 1947 19.4729142829 54.7176370645 44.5486568772 + 1948 14.9003390865 50.9952111726 44.2910846656 + 1949 23.3485289277 55.1067145626 47.9620619516 + 1950 13.6272374088 49.7003151301 44.5005201663 + 1951 13.9630925168 50.3719130176 44.2834466901 + 1952 19.7550918391 54.4674943311 45.7812265097 + 1953 25.2625893221 55.0696862343 50.0000000000 + 1954 15.1635713792 51.6533601181 44.4846272978 + 1955 17.9720722775 53.9722096988 44.8070361330 + 1956 21.2032319009 55.3702816589 46.3048164075 + 1957 14.3852306007 50.5759483335 44.9685223434 + 1958 23.2676085069 55.6509812571 47.9682886606 + 1959 16.3431455524 52.7828812264 44.7539275102 + 1960 18.0660798571 53.6888396138 45.6184434107 + 1961 25.4413211222 55.6262811090 50.0000000000 + 1962 12.3572475068 48.5111555092 45.4066862860 + 1963 16.5757627696 52.6846882072 45.5806962912 + 1964 21.7639474459 55.0084706809 47.9309301186 + 1965 17.1737532907 53.5029347517 45.3205846592 + 1966 19.8365923891 55.0088538093 46.2662710494 + 1967 12.4829551995 48.9954243285 45.3812497429 + 1968 15.4764490848 51.7947649683 45.9606848262 + 1969 23.7236779328 55.1339879532 50.0000000000 + 1970 13.5429691338 49.8548284997 46.2561722810 + 1971 21.7588848938 55.5346507914 48.0616415285 + 1972 14.6022794976 50.9699446389 46.2408327350 + 1973 18.4506052396 54.4077604897 46.3862257266 + 1974 20.2106597620 54.7204242830 47.9078499105 + 1975 23.8913342977 55.6855934472 50.0000000000 + 1976 13.7807696860 50.4662094017 46.2865398564 + 1977 15.0691799188 51.8122176116 46.3115384885 + 1978 17.2940080748 53.7085385183 46.4981187802 + 1979 16.2121744850 52.8729391946 46.3943576921 + 1980 12.2413558775 48.5568960526 46.9350262228 + 1981 12.9763460772 49.3431629198 47.1943794481 + 1982 20.2894330100 55.2395962343 48.0602804789 + 1983 18.6292101762 54.1393178811 47.8145233362 + 1984 12.3647031687 49.0420964841 46.9179709941 + 1985 22.1849705040 55.0795405726 50.0000000000 + 1986 13.1479577094 49.8832682870 47.2219051493 + 1987 17.2111578314 53.3260166116 47.7932948886 + 1988 22.3426277176 55.6249057110 50.0000000000 + 1989 18.8600784193 54.7141085442 48.1083284745 + 1990 15.9877308574 52.4111468058 47.9033591804 + 1991 14.9696358647 51.4897728386 48.0268313436 + 1992 13.9689551241 50.4676282642 48.1572238570 + 1993 20.6617164473 54.8622175291 50.0000000000 + 1994 17.5500695678 53.9856829269 48.1393262252 + 1995 13.1037642597 49.5574180061 48.4428284827 + 1996 12.1726929406 48.5839961984 48.4666950721 + 1997 16.3518461050 53.1166483003 48.1539911273 + 1998 14.1588821843 51.0296423427 48.2301813083 + 1999 15.2275739615 52.1179647467 48.1686712656 + 2000 20.8109861878 55.3985823731 50.0000000000 + 2001 12.2946485540 49.0697459026 48.4581387933 + 2002 13.2514430888 50.0719073455 48.4680956657 + 2003 19.1869956262 54.4273848152 50.0000000000 + 2004 19.3302517241 54.9525490407 50.0000000000 + 2005 17.8053021934 53.7537333676 50.0000000000 + 2006 16.5279016347 52.8983958666 50.0000000000 + 2007 13.2095349995 49.7052844800 50.0000000000 + 2008 12.1501194767 48.5929055779 50.0000000000 + 2009 14.2610632175 50.8258934483 50.0000000000 + 2010 15.3515222652 51.9090522262 50.0000000000 + 2011 17.9443619336 54.2684319052 50.0000000000 + 2012 12.2716206715 49.0788346337 50.0000000000 + 2013 13.3344888061 50.1947021813 50.0000000000 + 2014 16.6633087949 53.4047141856 50.0000000000 + 2015 14.3897654994 51.3195878397 50.0000000000 + 2016 15.4836686619 52.4083159184 50.0000000000 +End Nodes + + +Begin Elements MembraneElement3D4N// GUI group identifier: Parts Auto1 + 915 0 1286 1282 1270 1272 + 916 0 1 4 7 3 + 917 0 2012 2001 2002 2013 + 918 0 1299 1286 1272 1278 + 919 0 4 11 10 7 + 920 0 939 992 1009 955 + 921 0 2001 1984 1986 2002 + 922 0 1310 1299 1278 1294 + 923 0 11 21 17 10 + 924 0 1984 1967 1976 1986 + 925 0 882 939 955 900 + 926 0 1326 1310 1294 1314 + 927 0 21 30 29 17 + 928 0 1967 1946 1951 1976 + 929 0 841 882 900 855 + 930 0 1342 1326 1314 1333 + 931 0 9 3 7 12 + 932 0 1946 1928 1932 1951 + 933 0 30 44 46 29 + 934 0 795 841 855 813 + 935 0 1358 1342 1333 1354 + 936 0 1928 1913 1916 1932 + 937 0 1270 1258 1262 1272 + 938 0 44 62 63 46 + 939 0 1385 1358 1354 1382 + 940 0 763 795 813 779 + 941 0 1009 1029 971 955 + 942 0 1913 1894 1897 1916 + 943 0 1403 1385 1382 1404 + 944 0 62 80 83 63 + 945 0 2015 2013 2002 1998 + 946 0 729 763 779 743 + 947 0 1894 1874 1879 1897 + 948 0 1434 1403 1404 1436 + 949 0 80 98 100 83 + 950 0 20 9 12 19 + 951 0 689 729 743 702 + 952 0 1874 1852 1861 1879 + 953 0 1460 1434 1436 1465 + 954 0 98 120 121 100 + 955 0 653 689 702 665 + 956 0 1852 1834 1840 1861 + 957 0 1258 1241 1247 1262 + 958 0 1241 1228 1229 1247 + 959 0 1228 1208 1209 1229 + 960 0 1208 1181 1184 1209 + 961 0 1181 1151 1152 1184 + 962 0 1151 1120 1115 1152 + 963 0 1120 1078 1074 1115 + 964 0 1078 1035 1027 1074 + 965 0 1035 996 984 1027 + 966 0 996 953 942 984 + 967 0 953 905 894 942 + 968 0 905 859 850 894 + 969 0 859 819 807 850 + 970 0 819 785 775 807 + 971 0 785 749 746 775 + 972 0 749 717 712 746 + 973 0 717 680 679 712 + 974 0 680 649 646 679 + 975 0 649 616 612 646 + 976 0 616 587 581 612 + 977 0 587 562 557 581 + 978 0 562 534 529 557 + 979 0 534 511 505 529 + 980 0 511 485 481 505 + 981 0 485 454 456 481 + 982 0 454 424 428 456 + 983 0 424 397 395 428 + 984 0 397 370 369 395 + 985 0 370 344 342 369 + 986 0 344 315 312 342 + 987 0 315 285 283 312 + 988 0 285 256 255 283 + 989 0 256 229 228 255 + 990 0 229 207 208 228 + 991 0 207 181 182 208 + 992 0 181 160 161 182 + 993 0 160 139 140 161 + 994 0 139 124 123 140 + 995 0 124 108 106 123 + 996 0 108 92 89 106 + 997 0 92 76 72 89 + 998 0 76 58 55 72 + 999 0 58 41 40 55 + 1000 0 41 28 27 40 + 1001 0 28 20 19 27 + 1002 0 1482 1460 1465 1491 + 1003 0 120 141 144 121 + 1004 0 1834 1812 1816 1840 + 1005 0 615 653 665 626 + 1006 0 1515 1482 1491 1520 + 1007 0 141 165 168 144 + 1008 0 1029 1058 986 971 + 1009 0 1812 1788 1792 1816 + 1010 0 1548 1515 1520 1552 + 1011 0 579 615 626 590 + 1012 0 165 189 190 168 + 1013 0 2016 2015 1998 1999 + 1014 0 2014 2016 1999 1997 + 1015 0 2011 2014 1997 1994 + 1016 0 2004 2011 1994 1989 + 1017 0 2000 2004 1989 1982 + 1018 0 1988 2000 1982 1971 + 1019 0 1975 1988 1971 1958 + 1020 0 1961 1975 1958 1940 + 1021 0 1944 1961 1940 1925 + 1022 0 1927 1944 1925 1906 + 1023 0 1910 1927 1906 1887 + 1024 0 1892 1910 1887 1867 + 1025 0 1869 1892 1867 1847 + 1026 0 1849 1869 1847 1825 + 1027 0 1824 1849 1825 1804 + 1028 0 1802 1824 1804 1778 + 1029 0 1777 1802 1778 1752 + 1030 0 1754 1777 1752 1731 + 1031 0 1733 1754 1731 1704 + 1032 0 1711 1733 1704 1683 + 1033 0 1687 1711 1683 1655 + 1034 0 1663 1687 1655 1631 + 1035 0 1639 1663 1631 1603 + 1036 0 1611 1639 1603 1571 + 1037 0 1576 1611 1571 1536 + 1038 0 1542 1576 1536 1501 + 1039 0 1506 1542 1501 1468 + 1040 0 1475 1506 1468 1428 + 1041 0 1438 1475 1428 1387 + 1042 0 1402 1438 1387 1348 + 1043 0 1369 1402 1348 1308 + 1044 0 1332 1369 1308 1254 + 1045 0 1290 1332 1254 1207 + 1046 0 1256 1290 1207 1170 + 1047 0 1221 1256 1170 1150 + 1048 0 1198 1221 1150 1126 + 1049 0 1175 1198 1126 1107 + 1050 0 1162 1175 1107 1084 + 1051 0 1145 1162 1084 1063 + 1052 0 1119 1145 1063 1036 + 1053 0 1099 1119 1036 1013 + 1054 0 1076 1099 1013 1001 + 1055 0 1058 1076 1001 986 + 1056 0 1788 1764 1765 1792 + 1057 0 1578 1548 1552 1588 + 1058 0 543 579 590 554 + 1059 0 1764 1746 1744 1765 + 1060 0 189 213 215 190 + 1061 0 1613 1578 1588 1618 + 1062 0 1746 1723 1720 1744 + 1063 0 1645 1613 1618 1644 + 1064 0 501 543 554 512 + 1065 0 1723 1698 1694 1720 + 1066 0 213 238 244 215 + 1067 0 1674 1645 1644 1670 + 1068 0 1674 1670 1694 1698 + 1069 0 462 501 512 471 + 1070 0 238 266 271 244 + 1071 0 422 462 471 433 + 1072 0 266 297 302 271 + 1073 0 388 422 433 393 + 1074 0 297 326 334 302 + 1075 0 356 388 393 363 + 1076 0 356 363 334 326 + 1077 0 1998 2002 1986 1976 + 1078 0 1999 1998 1976 1977 + 1079 0 1997 1999 1977 1979 + 1080 0 12 7 10 17 + 1081 0 955 971 915 900 + 1082 0 855 900 915 873 + 1083 0 19 12 17 25 + 1084 0 1278 1272 1262 1266 + 1085 0 1262 1247 1259 1266 + 1086 0 1294 1278 1266 1279 + 1087 0 813 855 873 840 + 1088 0 779 813 840 800 + 1089 0 743 779 800 761 + 1090 0 702 743 761 722 + 1091 0 1314 1294 1279 1307 + 1092 0 971 986 928 915 + 1093 0 986 1001 931 928 + 1094 0 1001 1013 932 931 + 1095 0 1013 1036 956 932 + 1096 0 1036 1063 979 956 + 1097 0 1063 1084 1006 979 + 1098 0 1084 1107 1032 1006 + 1099 0 17 29 36 25 + 1100 0 27 19 25 32 + 1101 0 1976 1951 1954 1977 + 1102 0 1333 1314 1307 1328 + 1103 0 1354 1333 1328 1352 + 1104 0 1382 1354 1352 1384 + 1105 0 1404 1382 1384 1408 + 1106 0 1436 1404 1408 1439 + 1107 0 1465 1436 1439 1472 + 1108 0 1491 1465 1472 1500 + 1109 0 1520 1491 1500 1529 + 1110 0 1994 1997 1979 1978 + 1111 0 1989 1994 1978 1973 + 1112 0 1982 1989 1973 1966 + 1113 0 1971 1982 1966 1956 + 1114 0 1958 1971 1956 1941 + 1115 0 1940 1958 1941 1923 + 1116 0 1925 1940 1923 1902 + 1117 0 1906 1925 1902 1881 + 1118 0 1887 1906 1881 1859 + 1119 0 1107 1126 1064 1032 + 1120 0 1126 1150 1088 1064 + 1121 0 1150 1170 1112 1088 + 1122 0 1170 1207 1146 1112 + 1123 0 1207 1254 1176 1146 + 1124 0 1254 1308 1222 1176 + 1125 0 1308 1348 1277 1222 + 1126 0 1348 1387 1334 1277 + 1127 0 1387 1428 1378 1334 + 1128 0 1428 1468 1419 1378 + 1129 0 1468 1501 1457 1419 + 1130 0 1501 1536 1492 1457 + 1131 0 1536 1571 1526 1492 + 1132 0 1571 1603 1560 1526 + 1133 0 1603 1631 1595 1560 + 1134 0 1867 1887 1859 1841 + 1135 0 1847 1867 1841 1826 + 1136 0 1825 1847 1826 1808 + 1137 0 1804 1825 1808 1781 + 1138 0 29 46 51 36 + 1139 0 46 63 68 51 + 1140 0 63 83 86 68 + 1141 0 83 100 103 86 + 1142 0 100 121 122 103 + 1143 0 121 144 145 122 + 1144 0 144 168 170 145 + 1145 0 168 190 195 170 + 1146 0 190 215 222 195 + 1147 0 215 244 251 222 + 1148 0 244 271 280 251 + 1149 0 271 302 310 280 + 1150 0 302 334 339 310 + 1151 0 334 363 368 339 + 1152 0 363 393 403 368 + 1153 0 1552 1520 1529 1569 + 1154 0 1588 1552 1569 1602 + 1155 0 1618 1588 1602 1623 + 1156 0 1644 1618 1623 1641 + 1157 0 1670 1644 1641 1667 + 1158 0 1694 1670 1667 1696 + 1159 0 1720 1694 1696 1719 + 1160 0 1778 1804 1781 1758 + 1161 0 1752 1778 1758 1730 + 1162 0 1731 1752 1730 1700 + 1163 0 1704 1731 1700 1669 + 1164 0 1683 1704 1669 1646 + 1165 0 1631 1655 1622 1595 + 1166 0 1655 1683 1646 1622 + 1167 0 665 702 722 678 + 1168 0 626 665 678 638 + 1169 0 590 626 638 602 + 1170 0 554 590 602 564 + 1171 0 512 554 564 522 + 1172 0 471 512 522 476 + 1173 0 433 471 476 436 + 1174 0 393 433 436 403 + 1175 0 1744 1720 1719 1743 + 1176 0 1765 1744 1743 1770 + 1177 0 1792 1765 1770 1797 + 1178 0 1951 1932 1933 1954 + 1179 0 1932 1916 1917 1933 + 1180 0 1916 1897 1900 1917 + 1181 0 1897 1879 1895 1900 + 1182 0 1879 1861 1875 1895 + 1183 0 1861 1840 1853 1875 + 1184 0 1247 1229 1233 1259 + 1185 0 1229 1209 1217 1233 + 1186 0 1209 1184 1193 1217 + 1187 0 1184 1152 1164 1193 + 1188 0 1152 1115 1125 1164 + 1189 0 1115 1074 1079 1125 + 1190 0 1074 1027 1028 1079 + 1191 0 1027 984 981 1028 + 1192 0 984 942 934 981 + 1193 0 942 894 887 934 + 1194 0 894 850 847 887 + 1195 0 850 807 799 847 + 1196 0 807 775 772 799 + 1197 0 775 746 744 772 + 1198 0 746 712 714 744 + 1199 0 712 679 683 714 + 1200 0 679 646 650 683 + 1201 0 646 612 613 650 + 1202 0 612 581 580 613 + 1203 0 581 557 555 580 + 1204 0 557 529 527 555 + 1205 0 529 505 502 527 + 1206 0 505 481 479 502 + 1207 0 481 456 459 479 + 1208 0 456 428 432 459 + 1209 0 428 395 402 432 + 1210 0 395 369 374 402 + 1211 0 369 342 347 374 + 1212 0 342 312 317 347 + 1213 0 312 283 288 317 + 1214 0 283 255 259 288 + 1215 0 255 228 235 259 + 1216 0 228 208 210 235 + 1217 0 208 182 186 210 + 1218 0 182 161 164 186 + 1219 0 161 140 147 164 + 1220 0 140 123 127 147 + 1221 0 123 106 109 127 + 1222 0 106 89 95 109 + 1223 0 89 72 77 95 + 1224 0 72 55 56 77 + 1225 0 40 27 32 42 + 1226 0 55 40 42 56 + 1227 0 915 928 890 873 + 1228 0 77 56 66 82 + 1229 0 928 931 877 890 + 1230 0 931 932 848 877 + 1231 0 873 890 877 840 + 1232 0 1279 1266 1259 1268 + 1233 0 1307 1279 1268 1287 + 1234 0 1328 1307 1287 1321 + 1235 0 1352 1328 1321 1349 + 1236 0 932 956 876 848 + 1237 0 32 25 36 39 + 1238 0 1384 1352 1349 1386 + 1239 0 1979 1977 1954 1959 + 1240 0 1259 1233 1246 1268 + 1241 0 1954 1933 1938 1959 + 1242 0 1978 1979 1959 1965 + 1243 0 1933 1917 1912 1938 + 1244 0 1917 1900 1895 1912 + 1245 0 1895 1875 1896 1912 + 1246 0 1973 1978 1965 1955 + 1247 0 1938 1955 1965 1959 + 1248 0 1966 1973 1955 1947 + 1249 0 1956 1966 1947 1945 + 1250 0 1941 1956 1945 1929 + 1251 0 1923 1941 1929 1907 + 1252 0 66 56 42 52 + 1253 0 42 32 39 52 + 1254 0 1233 1217 1224 1246 + 1255 0 1217 1193 1212 1224 + 1256 0 1193 1164 1178 1212 + 1257 0 1408 1384 1386 1417 + 1258 0 1439 1408 1417 1445 + 1259 0 1472 1439 1445 1476 + 1260 0 1500 1472 1476 1503 + 1261 0 1529 1500 1503 1531 + 1262 0 1569 1529 1531 1580 + 1263 0 1602 1569 1580 1629 + 1264 0 1623 1602 1629 1641 + 1265 0 95 77 82 101 + 1266 0 109 95 101 118 + 1267 0 127 109 118 136 + 1268 0 147 127 136 154 + 1269 0 164 147 154 175 + 1270 0 1875 1853 1864 1896 + 1271 0 1840 1816 1827 1853 + 1272 0 1816 1792 1797 1827 + 1273 0 800 840 877 848 + 1274 0 761 800 848 786 + 1275 0 722 761 786 742 + 1276 0 678 722 742 697 + 1277 0 638 678 697 652 + 1278 0 602 638 652 610 + 1279 0 564 602 610 573 + 1280 0 36 51 52 39 + 1281 0 51 68 70 52 + 1282 0 68 86 94 70 + 1283 0 86 103 105 94 + 1284 0 103 122 119 105 + 1285 0 122 145 142 119 + 1286 0 145 170 171 142 + 1287 0 170 195 197 171 + 1288 0 195 222 226 197 + 1289 0 222 251 258 226 + 1290 0 251 280 290 258 + 1291 0 280 310 321 290 + 1292 0 310 339 346 321 + 1293 0 339 368 366 346 + 1294 0 368 403 410 366 + 1295 0 403 436 447 410 + 1296 0 436 476 492 447 + 1297 0 476 522 530 492 + 1298 0 522 564 573 530 + 1299 0 956 979 904 876 + 1300 0 979 1006 933 904 + 1301 0 1006 1032 965 933 + 1302 0 1032 1064 993 965 + 1303 0 1064 1088 1017 993 + 1304 0 1088 1112 1060 1017 + 1305 0 1112 1146 1090 1060 + 1306 0 1146 1176 1123 1090 + 1307 0 1176 1222 1163 1123 + 1308 0 1222 1277 1204 1163 + 1309 0 1277 1334 1264 1204 + 1310 0 1334 1378 1323 1264 + 1311 0 1378 1419 1368 1323 + 1312 0 1419 1457 1411 1368 + 1313 0 1457 1492 1452 1411 + 1314 0 1492 1526 1486 1452 + 1315 0 1526 1560 1521 1486 + 1316 0 1560 1595 1553 1521 + 1317 0 1595 1622 1582 1553 + 1318 0 1622 1646 1604 1582 + 1319 0 1646 1669 1632 1604 + 1320 0 1669 1700 1661 1632 + 1321 0 1700 1730 1699 1661 + 1322 0 1730 1758 1737 1699 + 1323 0 1758 1781 1767 1737 + 1324 0 1781 1808 1787 1767 + 1325 0 1808 1826 1810 1787 + 1326 0 1826 1841 1814 1810 + 1327 0 1841 1859 1833 1814 + 1328 0 1859 1881 1854 1833 + 1329 0 1902 1923 1907 1878 + 1330 0 1881 1902 1878 1854 + 1331 0 186 164 175 192 + 1332 0 210 186 192 214 + 1333 0 235 210 214 239 + 1334 0 259 235 239 264 + 1335 0 288 259 264 293 + 1336 0 317 288 293 323 + 1337 0 347 317 323 352 + 1338 0 374 347 352 382 + 1339 0 402 374 382 413 + 1340 0 432 402 413 441 + 1341 0 459 432 441 468 + 1342 0 479 459 468 480 + 1343 0 502 479 480 500 + 1344 0 527 502 500 525 + 1345 0 555 527 525 553 + 1346 0 580 555 553 583 + 1347 0 613 580 583 620 + 1348 0 650 613 620 666 + 1349 0 683 650 666 707 + 1350 0 714 683 707 744 + 1351 0 1719 1696 1701 1716 + 1352 0 1743 1719 1716 1736 + 1353 0 1707 1736 1716 1701 + 1354 0 1696 1667 1666 1701 + 1355 0 1667 1641 1629 1666 + 1356 0 1770 1743 1736 1769 + 1357 0 1797 1770 1769 1803 + 1358 0 981 934 929 980 + 1359 0 934 887 884 929 + 1360 0 1028 981 980 1034 + 1361 0 887 847 844 884 + 1362 0 847 799 783 844 + 1363 0 799 772 744 783 + 1364 0 1079 1028 1034 1093 + 1365 0 1125 1079 1093 1139 + 1366 0 1164 1125 1139 1178 + 1367 0 1246 1224 1212 1255 + 1368 0 1268 1246 1255 1287 + 1369 0 1827 1797 1803 1829 + 1370 0 1853 1827 1829 1864 + 1371 0 1321 1287 1255 1298 + 1372 0 1349 1321 1298 1338 + 1373 0 1386 1349 1338 1376 + 1374 0 1417 1386 1376 1414 + 1375 0 1445 1417 1414 1450 + 1376 0 1476 1445 1450 1490 + 1377 0 1503 1476 1490 1531 + 1378 0 744 707 737 783 + 1379 0 52 70 74 66 + 1380 0 70 94 88 74 + 1381 0 105 119 113 94 + 1382 0 119 142 137 113 + 1383 0 707 666 682 737 + 1384 0 666 620 636 682 + 1385 0 620 583 592 636 + 1386 0 583 553 550 592 + 1387 0 500 486 518 525 + 1388 0 525 518 550 553 + 1389 0 82 66 74 88 + 1390 0 101 82 88 104 + 1391 0 88 94 113 104 + 1392 0 142 171 169 137 + 1393 0 171 197 198 169 + 1394 0 197 226 233 198 + 1395 0 226 258 265 233 + 1396 0 258 290 299 265 + 1397 0 290 321 337 299 + 1398 0 321 346 366 337 + 1399 0 1947 1955 1938 1921 + 1400 0 1945 1947 1921 1929 + 1401 0 1907 1929 1921 1889 + 1402 0 1878 1907 1889 1846 + 1403 0 1854 1878 1846 1819 + 1404 0 1833 1854 1819 1795 + 1405 0 1814 1833 1795 1772 + 1406 0 1810 1814 1772 1787 + 1407 0 1767 1787 1772 1737 + 1408 0 1912 1896 1921 1938 + 1409 0 1921 1896 1864 1889 + 1410 0 1632 1661 1621 1583 + 1411 0 1604 1632 1583 1559 + 1412 0 1661 1699 1656 1621 + 1413 0 1699 1737 1690 1656 + 1414 0 1582 1604 1559 1554 + 1415 0 1553 1582 1554 1523 + 1416 0 1502 1523 1554 1559 + 1417 0 1521 1553 1523 1484 + 1418 0 1486 1521 1484 1449 + 1419 0 1452 1486 1449 1409 + 1420 0 1411 1452 1409 1362 + 1421 0 1368 1411 1362 1313 + 1422 0 1323 1368 1313 1244 + 1423 0 1264 1323 1244 1192 + 1424 0 1204 1264 1192 1148 + 1425 0 1163 1204 1148 1109 + 1426 0 1123 1163 1109 1069 + 1427 0 1090 1123 1069 1031 + 1428 0 1060 1090 1031 998 + 1429 0 1017 1060 998 967 + 1430 0 993 1017 967 927 + 1431 0 965 993 927 896 + 1432 0 933 965 896 863 + 1433 0 904 933 863 839 + 1434 0 876 904 839 809 + 1435 0 848 876 809 786 + 1436 0 742 786 809 760 + 1437 0 697 742 760 715 + 1438 0 652 697 715 671 + 1439 0 610 652 671 624 + 1440 0 573 610 624 586 + 1441 0 530 573 586 544 + 1442 0 492 530 544 504 + 1443 0 447 492 504 465 + 1444 0 410 447 465 421 + 1445 0 366 410 421 385 + 1446 0 441 413 434 463 + 1447 0 413 382 398 434 + 1448 0 382 352 364 398 + 1449 0 468 441 463 486 + 1450 0 480 468 486 500 + 1451 0 352 323 331 364 + 1452 0 323 293 298 331 + 1453 0 293 264 273 298 + 1454 0 264 239 252 273 + 1455 0 239 214 227 252 + 1456 0 214 192 205 227 + 1457 0 192 175 184 205 + 1458 0 175 154 163 184 + 1459 0 154 136 146 163 + 1460 0 136 118 130 146 + 1461 0 118 101 117 130 + 1462 0 980 929 923 978 + 1463 0 929 884 888 923 + 1464 0 884 844 857 888 + 1465 0 1034 980 978 1042 + 1466 0 1093 1034 1042 1104 + 1467 0 1139 1093 1104 1159 + 1468 0 1178 1139 1159 1210 + 1469 0 1212 1178 1210 1255 + 1470 0 844 783 814 857 + 1471 0 1666 1629 1638 1677 + 1472 0 1701 1666 1677 1707 + 1473 0 1629 1580 1596 1638 + 1474 0 1580 1531 1544 1596 + 1475 0 1769 1736 1734 1763 + 1476 0 1736 1707 1695 1734 + 1477 0 1695 1707 1677 1679 + 1478 0 1544 1531 1490 1494 + 1479 0 117 101 104 126 + 1480 0 130 117 126 138 + 1481 0 146 130 138 157 + 1482 0 163 146 157 179 + 1483 0 104 113 137 126 + 1484 0 1484 1523 1502 1455 + 1485 0 1449 1484 1455 1416 + 1486 0 1409 1449 1416 1365 + 1487 0 1362 1409 1365 1312 + 1488 0 1313 1362 1312 1235 + 1489 0 184 163 179 202 + 1490 0 205 184 202 217 + 1491 0 366 385 353 337 + 1492 0 385 421 439 407 + 1493 0 421 465 493 439 + 1494 0 465 504 526 493 + 1495 0 1244 1313 1235 1179 + 1496 0 1192 1244 1179 1138 + 1497 0 1148 1192 1138 1096 + 1498 0 1109 1148 1096 1062 + 1499 0 1069 1109 1062 1016 + 1500 0 1031 1069 1016 982 + 1501 0 998 1031 982 947 + 1502 0 967 998 947 913 + 1503 0 927 967 913 872 + 1504 0 896 927 872 832 + 1505 0 863 896 832 803 + 1506 0 227 205 217 242 + 1507 0 252 227 242 275 + 1508 0 273 252 275 287 + 1509 0 298 273 287 311 + 1510 0 331 298 311 348 + 1511 0 364 331 348 383 + 1512 0 398 364 383 423 + 1513 0 434 398 423 464 + 1514 0 463 434 464 497 + 1515 0 486 463 497 518 + 1516 0 1737 1772 1728 1690 + 1517 0 1490 1450 1444 1494 + 1518 0 1450 1414 1397 1444 + 1519 0 814 783 737 771 + 1520 0 923 888 857 906 + 1521 0 978 923 906 969 + 1522 0 1042 978 969 1050 + 1523 0 1104 1042 1050 1118 + 1524 0 1159 1104 1118 1187 + 1525 0 1210 1159 1187 1253 + 1526 0 1255 1210 1253 1298 + 1527 0 1338 1298 1253 1305 + 1528 0 1376 1338 1305 1350 + 1529 0 1414 1376 1350 1397 + 1530 0 857 814 868 906 + 1531 0 550 518 497 542 + 1532 0 592 550 542 604 + 1533 0 636 592 604 659 + 1534 0 682 636 659 718 + 1535 0 737 682 718 771 + 1536 0 504 544 565 526 + 1537 0 544 586 603 565 + 1538 0 586 624 643 603 + 1539 0 624 671 687 643 + 1540 0 671 715 739 687 + 1541 0 839 863 803 784 + 1542 0 809 839 784 760 + 1543 0 715 760 784 739 + 1544 0 1769 1763 1799 1803 + 1545 0 1829 1803 1799 1823 + 1546 0 1864 1829 1823 1837 + 1547 0 1889 1864 1837 1846 + 1548 0 1763 1734 1713 1757 + 1549 0 1677 1638 1652 1679 + 1550 0 1638 1596 1598 1652 + 1551 0 1596 1544 1538 1598 + 1552 0 299 337 353 319 + 1553 0 265 299 319 278 + 1554 0 233 265 278 240 + 1555 0 198 233 240 203 + 1556 0 169 198 203 167 + 1557 0 137 169 167 149 + 1558 0 1772 1795 1751 1728 + 1559 0 1795 1819 1774 1751 + 1560 0 1819 1846 1790 1774 + 1561 0 1583 1621 1558 1525 + 1562 0 1559 1583 1525 1502 + 1563 0 1621 1656 1599 1558 + 1564 0 1656 1690 1636 1599 + 1565 0 157 167 203 179 + 1566 0 167 157 138 149 + 1567 0 138 126 137 149 + 1568 0 385 407 373 353 + 1569 0 868 814 771 817 + 1570 0 1734 1695 1658 1713 + 1571 0 1695 1679 1652 1658 + 1572 0 906 868 949 969 + 1573 0 1799 1763 1757 1796 + 1574 0 1823 1799 1796 1837 + 1575 0 1846 1837 1796 1790 + 1576 0 1544 1494 1477 1538 + 1577 0 1494 1444 1425 1477 + 1578 0 1305 1253 1187 1227 + 1579 0 1350 1305 1227 1297 + 1580 0 1444 1397 1360 1425 + 1581 0 1397 1350 1297 1360 + 1582 0 1690 1728 1676 1636 + 1583 0 202 179 203 220 + 1584 0 217 202 220 241 + 1585 0 497 464 508 542 + 1586 0 464 423 460 508 + 1587 0 423 383 408 460 + 1588 0 383 348 358 408 + 1589 0 348 311 320 358 + 1590 0 311 287 275 320 + 1591 0 242 217 241 263 + 1592 0 275 242 263 292 + 1593 0 1652 1598 1586 1658 + 1594 0 1598 1538 1517 1586 + 1595 0 1187 1118 1149 1227 + 1596 0 1118 1050 1057 1149 + 1597 0 1050 969 949 1057 + 1598 0 1728 1751 1706 1676 + 1599 0 771 718 764 817 + 1600 0 1751 1774 1727 1706 + 1601 0 203 240 254 220 + 1602 0 240 278 296 254 + 1603 0 278 319 335 296 + 1604 0 319 353 373 335 + 1605 0 407 439 452 431 + 1606 0 1774 1790 1739 1727 + 1607 0 1790 1796 1757 1739 + 1608 0 718 659 701 764 + 1609 0 604 542 508 569 + 1610 0 659 604 661 701 + 1611 0 1016 1062 1007 973 + 1612 0 982 1016 973 936 + 1613 0 947 982 936 903 + 1614 0 913 947 903 869 + 1615 0 872 913 869 822 + 1616 0 1062 1096 1049 1007 + 1617 0 1096 1138 1089 1049 + 1618 0 1138 1179 1129 1089 + 1619 0 1179 1235 1177 1129 + 1620 0 832 872 822 774 + 1621 0 1235 1312 1240 1177 + 1622 0 1312 1365 1319 1240 + 1623 0 1365 1416 1371 1319 + 1624 0 1416 1455 1412 1371 + 1625 0 1455 1502 1446 1412 + 1626 0 1502 1525 1471 1446 + 1627 0 1525 1558 1498 1471 + 1628 0 803 832 774 753 + 1629 0 784 803 753 739 + 1630 0 1558 1599 1532 1498 + 1631 0 687 739 753 704 + 1632 0 1599 1636 1572 1532 + 1633 0 643 687 704 660 + 1634 0 603 643 660 614 + 1635 0 565 603 614 575 + 1636 0 526 565 575 546 + 1637 0 1757 1713 1684 1739 + 1638 0 275 292 328 320 + 1639 0 526 546 540 493 + 1640 0 439 493 487 452 + 1641 0 407 431 394 373 + 1642 0 1538 1477 1448 1517 + 1643 0 431 452 487 470 + 1644 0 292 263 289 304 + 1645 0 263 241 269 289 + 1646 0 1636 1676 1614 1572 + 1647 0 241 220 254 269 + 1648 0 868 817 907 949 + 1649 0 1676 1706 1651 1614 + 1650 0 1706 1727 1671 1651 + 1651 0 1297 1227 1149 1188 + 1652 0 1360 1297 1188 1288 + 1653 0 1477 1425 1381 1448 + 1654 0 1425 1360 1288 1381 + 1655 0 1684 1713 1658 1627 + 1656 0 1658 1586 1551 1627 + 1657 0 1586 1517 1480 1551 + 1658 0 704 753 774 720 + 1659 0 660 704 720 674 + 1660 0 614 660 674 630 + 1661 0 575 614 630 582 + 1662 0 546 575 582 540 + 1663 0 358 320 328 379 + 1664 0 408 358 379 437 + 1665 0 460 408 437 507 + 1666 0 508 460 507 569 + 1667 0 701 661 726 747 + 1668 0 335 373 394 351 + 1669 0 1727 1739 1684 1671 + 1670 0 254 296 308 269 + 1671 0 296 335 351 308 + 1672 0 817 764 824 907 + 1673 0 1057 949 907 1065 + 1674 0 1149 1057 1065 1188 + 1675 0 661 604 569 627 + 1676 0 764 701 747 824 + 1677 0 869 903 862 846 + 1678 0 903 936 895 862 + 1679 0 936 973 925 895 + 1680 0 973 1007 966 925 + 1681 0 1007 1049 999 966 + 1682 0 1049 1089 1040 999 + 1683 0 1089 1129 1085 1040 + 1684 0 1129 1177 1130 1085 + 1685 0 822 869 846 792 + 1686 0 825 792 846 862 + 1687 0 1177 1240 1183 1130 + 1688 0 1240 1319 1252 1183 + 1689 0 1319 1371 1324 1252 + 1690 0 1371 1412 1370 1324 + 1691 0 1412 1446 1405 1370 + 1692 0 1446 1471 1393 1405 + 1693 0 1471 1498 1426 1393 + 1694 0 1498 1532 1458 1426 + 1695 0 1532 1572 1499 1458 + 1696 0 774 822 792 750 + 1697 0 487 493 540 538 + 1698 0 292 304 340 328 + 1699 0 431 470 443 394 + 1700 0 470 487 538 532 + 1701 0 304 289 325 340 + 1702 0 289 269 308 325 + 1703 0 351 394 443 375 + 1704 0 1517 1448 1407 1480 + 1705 0 1572 1614 1543 1499 + 1706 0 1448 1381 1317 1407 + 1707 0 1381 1288 1180 1317 + 1708 0 1288 1188 1065 1180 + 1709 0 627 569 507 570 + 1710 0 507 437 490 570 + 1711 0 774 750 721 720 + 1712 0 750 792 758 719 + 1713 0 792 825 791 758 + 1714 0 862 895 856 825 + 1715 0 895 925 886 856 + 1716 0 925 966 919 886 + 1717 0 966 999 957 919 + 1718 0 999 1040 994 957 + 1719 0 1040 1085 1038 994 + 1720 0 1085 1130 1087 1038 + 1721 0 1130 1183 1134 1087 + 1722 0 1183 1252 1185 1134 + 1723 0 1252 1324 1249 1185 + 1724 0 1324 1370 1329 1249 + 1725 0 1370 1405 1393 1329 + 1726 0 1614 1651 1585 1543 + 1727 0 379 328 340 404 + 1728 0 308 351 375 325 + 1729 0 340 325 375 404 + 1730 0 437 379 404 490 + 1731 0 674 720 721 684 + 1732 0 630 674 684 641 + 1733 0 582 630 641 591 + 1734 0 540 582 591 538 + 1735 0 661 627 710 726 + 1736 0 1651 1671 1615 1585 + 1737 0 907 824 974 1065 + 1738 0 747 726 804 824 + 1739 0 1671 1684 1628 1615 + 1740 0 1684 1627 1579 1628 + 1741 0 1627 1551 1518 1579 + 1742 0 1551 1480 1443 1518 + 1743 0 1393 1426 1339 1337 + 1744 0 1426 1458 1363 1339 + 1745 0 1458 1499 1413 1363 + 1746 0 825 856 823 791 + 1747 0 1393 1337 1250 1329 + 1748 0 856 886 851 823 + 1749 0 1337 1339 1171 1250 + 1750 0 1339 1363 1216 1171 + 1751 0 886 919 878 851 + 1752 0 919 957 910 878 + 1753 0 957 994 950 910 + 1754 0 532 538 591 601 + 1755 0 994 1038 995 950 + 1756 0 1038 1087 1043 995 + 1757 0 750 719 684 721 + 1758 0 1363 1413 1284 1216 + 1759 0 1615 1628 1579 1555 + 1760 0 1443 1480 1407 1357 + 1761 0 1180 1065 974 1108 + 1762 0 1317 1180 1108 1225 + 1763 0 1407 1317 1225 1357 + 1764 0 1249 1329 1250 1169 + 1765 0 1185 1249 1169 1124 + 1766 0 1087 1134 1080 1043 + 1767 0 1134 1185 1124 1080 + 1768 0 1579 1518 1483 1555 + 1769 0 1585 1615 1555 1539 + 1770 0 1499 1543 1473 1413 + 1771 0 1543 1585 1539 1473 + 1772 0 1518 1443 1400 1483 + 1773 0 710 627 570 635 + 1774 0 591 641 673 601 + 1775 0 673 641 684 719 + 1776 0 719 758 735 673 + 1777 0 758 791 780 735 + 1778 0 375 443 491 404 + 1779 0 470 532 537 443 + 1780 0 804 726 710 801 + 1781 0 824 804 930 974 + 1782 0 570 490 567 635 + 1783 0 490 404 491 567 + 1784 0 780 791 823 802 + 1785 0 823 851 816 802 + 1786 0 851 878 838 816 + 1787 0 878 910 866 838 + 1788 0 1250 1171 1106 1169 + 1789 0 910 950 898 866 + 1790 0 950 995 960 898 + 1791 0 995 1043 1004 960 + 1792 0 1043 1080 1015 1004 + 1793 0 1080 1124 1051 1015 + 1794 0 1124 1169 1106 1051 + 1795 0 1400 1443 1357 1289 + 1796 0 1555 1483 1473 1539 + 1797 0 1483 1400 1356 1473 + 1798 0 1413 1473 1356 1284 + 1799 0 1357 1225 1158 1289 + 1800 0 710 755 835 801 + 1801 0 755 710 635 692 + 1802 0 537 532 601 608 + 1803 0 443 537 578 491 + 1804 0 974 930 1059 1108 + 1805 0 1225 1108 1059 1158 + 1806 0 930 804 801 926 + 1807 0 567 491 578 634 + 1808 0 601 673 675 608 + 1809 0 635 567 634 692 + 1810 0 673 735 734 675 + 1811 0 735 780 781 734 + 1812 0 1216 1284 1147 1091 + 1813 0 1147 1284 1356 1211 + 1814 0 1356 1400 1289 1211 + 1815 0 781 780 802 816 + 1816 0 781 816 838 794 + 1817 0 838 866 831 794 + 1818 0 1289 1158 1105 1211 + 1819 0 1147 1211 1105 1033 + 1820 0 866 898 845 831 + 1821 0 898 960 940 845 + 1822 0 960 1004 1015 940 + 1823 0 1015 1051 946 940 + 1824 0 1051 1106 1024 946 + 1825 0 1171 1216 1091 1046 + 1826 0 1106 1171 1046 1024 + 1827 0 835 755 797 912 + 1828 0 1158 1059 1020 1105 + 1829 0 1059 930 926 1020 + 1830 0 801 835 902 926 + 1831 0 755 692 738 797 + 1832 0 537 608 645 578 + 1833 0 608 675 688 645 + 1834 0 675 734 751 688 + 1835 0 734 781 794 751 + 1836 0 1091 1147 1033 975 + 1837 0 1105 1020 926 1033 + 1838 0 1033 926 902 975 + 1839 0 902 835 912 975 + 1840 0 1091 975 912 1046 + 1841 0 1024 1046 912 946 + 1842 0 912 797 815 946 + 1843 0 634 578 645 713 + 1844 0 692 634 713 738 + 1845 0 797 738 713 815 + 1846 0 645 688 751 713 + 1847 0 794 831 845 751 + 1848 0 713 751 845 815 + 1849 0 815 845 940 946 +End Elements + +Begin Elements MembraneElement3D4N// GUI group identifier: Parts Auto2 + 1 0 1276 1274 1261 1265 + 2 0 2008 1996 1995 2007 + 3 0 938 989 1008 954 + 4 0 2 5 8 6 + 5 0 1283 1276 1265 1269 + 6 0 1996 1980 1981 1995 + 7 0 885 938 954 899 + 8 0 5 13 14 8 + 9 0 1301 1283 1269 1280 + 10 0 1980 1962 1970 1981 + 11 0 843 885 899 852 + 12 0 13 22 18 14 + 13 0 1318 1301 1280 1306 + 14 0 1962 1942 1950 1970 + 15 0 798 843 852 806 + 16 0 1335 1318 1306 1327 + 17 0 1942 1926 1934 1950 + 18 0 22 34 33 18 + 19 0 1353 1335 1327 1347 + 20 0 1926 1909 1919 1934 + 21 0 765 798 806 773 + 22 0 34 47 50 33 + 23 0 1008 1026 968 954 + 24 0 15 6 8 16 + 25 0 1379 1353 1347 1374 + 26 0 1909 1891 1899 1919 + 27 0 732 765 773 741 + 28 0 47 64 67 50 + 29 0 2009 2007 1995 1992 + 30 0 1261 1243 1248 1265 + 31 0 1398 1379 1374 1394 + 32 0 1891 1871 1877 1899 + 33 0 693 732 741 700 + 34 0 64 84 87 67 + 35 0 1430 1398 1394 1429 + 36 0 1871 1850 1856 1877 + 37 0 657 693 700 664 + 38 0 84 102 107 87 + 39 0 1453 1430 1429 1456 + 40 0 1850 1830 1835 1856 + 41 0 618 657 664 628 + 42 0 102 125 128 107 + 43 0 1479 1453 1456 1481 + 44 0 1830 1809 1813 1835 + 45 0 1026 1055 987 968 + 46 0 584 618 628 597 + 47 0 125 148 152 128 + 48 0 1511 1479 1481 1514 + 49 0 1809 1786 1791 1813 + 50 0 23 15 16 24 + 51 0 548 584 597 561 + 52 0 1545 1511 1514 1546 + 53 0 1786 1761 1766 1791 + 54 0 148 172 176 152 + 55 0 2010 2009 1992 1991 + 56 0 2006 2010 1991 1990 + 57 0 2005 2006 1990 1987 + 58 0 2003 2005 1987 1983 + 59 0 1993 2003 1983 1974 + 60 0 1985 1993 1974 1964 + 61 0 1969 1985 1964 1949 + 62 0 1953 1969 1949 1936 + 63 0 1939 1953 1936 1920 + 64 0 1922 1939 1920 1904 + 65 0 1905 1922 1904 1885 + 66 0 1886 1905 1885 1865 + 67 0 1863 1886 1865 1844 + 68 0 1842 1863 1844 1822 + 69 0 1818 1842 1822 1800 + 70 0 1794 1818 1800 1775 + 71 0 1771 1794 1775 1748 + 72 0 1749 1771 1748 1725 + 73 0 1729 1749 1725 1702 + 74 0 1708 1729 1702 1682 + 75 0 1686 1708 1682 1654 + 76 0 1660 1686 1654 1630 + 77 0 1635 1660 1630 1601 + 78 0 1606 1635 1601 1570 + 79 0 1573 1606 1570 1533 + 80 0 1540 1573 1533 1496 + 81 0 1505 1540 1496 1461 + 82 0 1474 1505 1461 1423 + 83 0 1437 1474 1423 1380 + 84 0 1399 1437 1380 1336 + 85 0 1366 1399 1336 1285 + 86 0 1331 1366 1285 1234 + 87 0 1291 1331 1234 1203 + 88 0 1257 1291 1203 1172 + 89 0 1220 1257 1172 1154 + 90 0 1197 1220 1154 1136 + 91 0 1173 1197 1136 1116 + 92 0 1160 1173 1116 1100 + 93 0 1143 1160 1100 1077 + 94 0 1117 1143 1077 1056 + 95 0 1097 1117 1056 1023 + 96 0 1075 1097 1023 1005 + 97 0 1055 1075 1005 987 + 98 0 1243 1230 1231 1248 + 99 0 1230 1215 1218 1231 + 100 0 1215 1196 1194 1218 + 101 0 1196 1166 1165 1194 + 102 0 1166 1135 1128 1165 + 103 0 1135 1102 1094 1128 + 104 0 1102 1061 1047 1094 + 105 0 1061 1010 1000 1047 + 106 0 1010 970 959 1000 + 107 0 970 922 911 959 + 108 0 922 879 871 911 + 109 0 879 834 830 871 + 110 0 834 790 789 830 + 111 0 790 759 757 789 + 112 0 759 727 724 757 + 113 0 727 686 685 724 + 114 0 686 655 651 685 + 115 0 655 622 617 651 + 116 0 622 594 588 617 + 117 0 594 568 563 588 + 118 0 568 536 533 563 + 119 0 536 513 510 533 + 120 0 513 488 478 510 + 121 0 488 455 451 478 + 122 0 455 425 419 451 + 123 0 425 396 389 419 + 124 0 396 367 359 389 + 125 0 367 338 333 359 + 126 0 338 309 303 333 + 127 0 309 279 274 303 + 128 0 279 250 247 274 + 129 0 250 224 219 247 + 130 0 224 199 194 219 + 131 0 199 178 174 194 + 132 0 178 155 151 174 + 133 0 155 133 131 151 + 134 0 133 115 112 131 + 135 0 115 97 96 112 + 136 0 97 81 79 96 + 137 0 81 65 60 79 + 138 0 65 48 45 60 + 139 0 48 35 31 45 + 140 0 35 23 24 31 + 141 0 1575 1545 1546 1577 + 142 0 1761 1742 1747 1766 + 143 0 506 548 561 520 + 144 0 172 191 201 176 + 145 0 1609 1575 1577 1610 + 146 0 1742 1718 1722 1747 + 147 0 1640 1609 1610 1642 + 148 0 1718 1691 1697 1722 + 149 0 469 506 520 473 + 150 0 191 216 225 201 + 151 0 1665 1640 1642 1668 + 152 0 1665 1668 1697 1691 + 153 0 429 469 473 435 + 154 0 216 243 253 225 + 155 0 392 429 435 401 + 156 0 243 270 281 253 + 157 0 362 392 401 372 + 158 0 270 300 316 281 + 159 0 300 332 349 316 + 160 0 332 362 372 349 + 161 0 1992 1995 1981 1970 + 162 0 1991 1992 1970 1972 + 163 0 1990 1991 1972 1968 + 164 0 16 8 14 18 + 165 0 954 968 914 899 + 166 0 852 899 914 860 + 167 0 1265 1248 1260 1269 + 168 0 1248 1231 1242 1260 + 169 0 1231 1218 1223 1242 + 170 0 1218 1194 1202 1223 + 171 0 806 852 860 820 + 172 0 773 806 820 787 + 173 0 741 773 787 748 + 174 0 700 741 748 706 + 175 0 24 16 18 26 + 176 0 1280 1269 1260 1271 + 177 0 1306 1280 1271 1295 + 178 0 1194 1165 1167 1202 + 179 0 1165 1128 1132 1167 + 180 0 1327 1306 1295 1320 + 181 0 1347 1327 1320 1346 + 182 0 1374 1347 1346 1372 + 183 0 1394 1374 1372 1396 + 184 0 968 987 924 914 + 185 0 987 1005 943 924 + 186 0 1005 1023 964 943 + 187 0 1023 1056 985 964 + 188 0 1056 1077 1011 985 + 189 0 1077 1100 1044 1011 + 190 0 1100 1116 1067 1044 + 191 0 1429 1394 1396 1431 + 192 0 1456 1429 1431 1462 + 193 0 1481 1456 1462 1485 + 194 0 1514 1481 1485 1519 + 195 0 1970 1950 1957 1972 + 196 0 18 33 38 26 + 197 0 31 24 26 37 + 198 0 1546 1514 1519 1550 + 199 0 1577 1546 1550 1581 + 200 0 1610 1577 1581 1616 + 201 0 1642 1610 1616 1647 + 202 0 1668 1642 1647 1675 + 203 0 1697 1668 1675 1703 + 204 0 1722 1697 1703 1732 + 205 0 1747 1722 1732 1753 + 206 0 1766 1747 1753 1776 + 207 0 664 700 706 668 + 208 0 1987 1990 1968 1963 + 209 0 1983 1987 1963 1960 + 210 0 1974 1983 1960 1952 + 211 0 1964 1974 1952 1943 + 212 0 1949 1964 1943 1930 + 213 0 1936 1949 1930 1918 + 214 0 1920 1936 1918 1901 + 215 0 1904 1920 1901 1883 + 216 0 1885 1904 1883 1866 + 217 0 1865 1885 1866 1845 + 218 0 1844 1865 1845 1821 + 219 0 1822 1844 1821 1801 + 220 0 1800 1822 1801 1783 + 221 0 1775 1800 1783 1756 + 222 0 1748 1775 1756 1724 + 223 0 1725 1748 1724 1692 + 224 0 1702 1725 1692 1672 + 225 0 1682 1702 1672 1650 + 226 0 1654 1682 1650 1626 + 227 0 1630 1654 1626 1597 + 228 0 1601 1630 1597 1567 + 229 0 1570 1601 1567 1528 + 230 0 1533 1570 1528 1488 + 231 0 1496 1533 1488 1447 + 232 0 1461 1496 1447 1415 + 233 0 1423 1461 1415 1361 + 234 0 1380 1423 1361 1309 + 235 0 1336 1380 1309 1237 + 236 0 1285 1336 1237 1191 + 237 0 1234 1285 1191 1153 + 238 0 1203 1234 1153 1137 + 239 0 1172 1203 1137 1121 + 240 0 1154 1172 1121 1103 + 241 0 1136 1154 1103 1081 + 242 0 1116 1136 1081 1067 + 243 0 1791 1766 1776 1798 + 244 0 1813 1791 1798 1820 + 245 0 1835 1813 1820 1839 + 246 0 1856 1835 1839 1860 + 247 0 1877 1856 1860 1882 + 248 0 1899 1877 1882 1908 + 249 0 1950 1934 1948 1957 + 250 0 1919 1899 1908 1935 + 251 0 1934 1919 1935 1948 + 252 0 628 664 668 637 + 253 0 597 628 637 606 + 254 0 561 597 606 574 + 255 0 520 561 574 531 + 256 0 473 520 531 484 + 257 0 435 473 484 440 + 258 0 401 435 440 406 + 259 0 372 401 406 381 + 260 0 349 372 381 365 + 261 0 316 349 365 327 + 262 0 281 316 327 294 + 263 0 33 50 53 38 + 264 0 50 67 71 53 + 265 0 67 87 91 71 + 266 0 87 107 114 91 + 267 0 253 281 294 261 + 268 0 225 253 261 232 + 269 0 201 225 232 206 + 270 0 176 201 206 180 + 271 0 152 176 180 156 + 272 0 107 128 134 114 + 273 0 128 152 156 134 + 274 0 45 31 37 49 + 275 0 60 45 49 59 + 276 0 79 60 59 75 + 277 0 96 79 75 93 + 278 0 112 96 93 110 + 279 0 131 112 110 129 + 280 0 151 131 129 150 + 281 0 174 151 150 173 + 282 0 1128 1094 1092 1132 + 283 0 1094 1047 1041 1092 + 284 0 1047 1000 991 1041 + 285 0 1000 959 944 991 + 286 0 959 911 892 944 + 287 0 911 871 864 892 + 288 0 871 830 837 864 + 289 0 830 789 796 837 + 290 0 789 757 762 796 + 291 0 757 724 728 762 + 292 0 724 685 690 728 + 293 0 685 651 656 690 + 294 0 651 617 619 656 + 295 0 617 588 593 619 + 296 0 588 563 566 593 + 297 0 563 533 535 566 + 298 0 533 510 509 535 + 299 0 510 478 477 509 + 300 0 478 451 448 477 + 301 0 451 419 418 448 + 302 0 419 389 386 418 + 303 0 389 359 357 386 + 304 0 359 333 330 357 + 305 0 333 303 301 330 + 306 0 303 274 272 301 + 307 0 274 247 245 272 + 308 0 247 219 218 245 + 309 0 219 194 193 218 + 310 0 194 174 173 193 + 311 0 1271 1260 1242 1263 + 312 0 1242 1223 1238 1263 + 313 0 860 914 924 874 + 314 0 820 860 874 836 + 315 0 1223 1202 1219 1238 + 316 0 37 26 38 43 + 317 0 49 37 43 54 + 318 0 1968 1972 1957 1948 + 319 0 59 49 54 61 + 320 0 787 820 836 812 + 321 0 748 787 812 756 + 322 0 706 748 756 711 + 323 0 38 53 57 43 + 324 0 53 71 78 57 + 325 0 71 91 99 78 + 326 0 91 114 135 99 + 327 0 114 134 143 135 + 328 0 924 943 880 874 + 329 0 874 880 812 836 + 330 0 75 59 61 73 + 331 0 93 75 73 90 + 332 0 110 93 90 116 + 333 0 1963 1968 1948 1935 + 334 0 1960 1963 1935 1937 + 335 0 1952 1960 1937 1931 + 336 0 1943 1952 1931 1924 + 337 0 1930 1943 1924 1915 + 338 0 129 110 116 132 + 339 0 150 129 132 153 + 340 0 173 150 153 177 + 341 0 193 173 177 200 + 342 0 1918 1930 1915 1898 + 343 0 1901 1918 1898 1880 + 344 0 1883 1901 1880 1862 + 345 0 134 156 162 143 + 346 0 156 180 183 162 + 347 0 180 206 209 183 + 348 0 206 232 236 209 + 349 0 232 261 267 236 + 350 0 668 706 711 670 + 351 0 637 668 670 644 + 352 0 606 637 644 623 + 353 0 574 606 623 596 + 354 0 531 574 596 551 + 355 0 484 531 551 499 + 356 0 440 484 499 446 + 357 0 406 440 446 405 + 358 0 381 406 405 365 + 359 0 943 964 891 880 + 360 0 964 985 918 891 + 361 0 985 1011 952 918 + 362 0 1011 1044 990 952 + 363 0 1044 1067 1021 990 + 364 0 1067 1081 1019 1021 + 365 0 1081 1103 1054 1019 + 366 0 1103 1121 1082 1054 + 367 0 218 193 200 223 + 368 0 245 218 223 249 + 369 0 272 245 249 277 + 370 0 301 272 277 307 + 371 0 330 301 307 336 + 372 0 357 330 336 361 + 373 0 386 357 361 391 + 374 0 418 386 391 420 + 375 0 448 418 420 450 + 376 0 477 448 450 483 + 377 0 509 477 483 514 + 378 0 1866 1883 1862 1843 + 379 0 1845 1866 1843 1817 + 380 0 1821 1845 1817 1793 + 381 0 1801 1821 1793 1773 + 382 0 1783 1801 1773 1756 + 383 0 1121 1137 1072 1082 + 384 0 1137 1153 1070 1072 + 385 0 1153 1191 1111 1070 + 386 0 1191 1237 1155 1111 + 387 0 1237 1309 1213 1155 + 388 0 1309 1361 1292 1213 + 389 0 1361 1415 1375 1292 + 390 0 1415 1447 1391 1375 + 391 0 1447 1488 1442 1391 + 392 0 1488 1528 1493 1442 + 393 0 1528 1567 1534 1493 + 394 0 1567 1597 1565 1534 + 395 0 1597 1626 1587 1565 + 396 0 1626 1650 1607 1587 + 397 0 1650 1672 1634 1607 + 398 0 1672 1692 1659 1634 + 399 0 1692 1724 1689 1659 + 400 0 1724 1756 1721 1689 + 401 0 261 294 305 267 + 402 0 294 327 343 305 + 403 0 535 509 514 539 + 404 0 566 535 539 572 + 405 0 593 566 572 600 + 406 0 619 593 600 631 + 407 0 656 619 631 662 + 408 0 690 656 662 696 + 409 0 728 690 696 730 + 410 0 762 728 730 766 + 411 0 796 762 766 808 + 412 0 837 796 808 853 + 413 0 864 837 853 892 + 414 0 327 365 376 343 + 415 0 1732 1703 1709 1735 + 416 0 1703 1675 1681 1709 + 417 0 1675 1647 1653 1681 + 418 0 1647 1616 1620 1653 + 419 0 1616 1581 1589 1620 + 420 0 1753 1732 1735 1759 + 421 0 1776 1753 1759 1780 + 422 0 1581 1550 1556 1589 + 423 0 1550 1519 1524 1556 + 424 0 1798 1776 1780 1806 + 425 0 1820 1798 1806 1828 + 426 0 1839 1820 1828 1848 + 427 0 1519 1485 1495 1524 + 428 0 1485 1462 1467 1495 + 429 0 1462 1431 1433 1467 + 430 0 1860 1839 1848 1868 + 431 0 1882 1860 1868 1890 + 432 0 1908 1882 1890 1914 + 433 0 991 944 937 983 + 434 0 944 892 901 937 + 435 0 1041 991 983 1037 + 436 0 1092 1041 1037 1095 + 437 0 1132 1092 1095 1144 + 438 0 1202 1167 1182 1219 + 439 0 1167 1132 1144 1182 + 440 0 1372 1346 1341 1367 + 441 0 1346 1320 1316 1341 + 442 0 1320 1295 1281 1316 + 443 0 1295 1271 1263 1281 + 444 0 1396 1372 1367 1395 + 445 0 1431 1396 1395 1433 + 446 0 43 57 69 54 + 447 0 901 892 853 875 + 448 0 937 901 875 921 + 449 0 983 937 921 977 + 450 0 1281 1263 1238 1267 + 451 0 1267 1238 1219 1239 + 452 0 1937 1935 1908 1914 + 453 0 376 365 405 412 + 454 0 343 376 387 354 + 455 0 1316 1281 1267 1302 + 456 0 1341 1316 1302 1330 + 457 0 1367 1341 1330 1355 + 458 0 1037 983 977 1039 + 459 0 57 78 85 69 + 460 0 73 61 54 69 + 461 0 78 99 111 85 + 462 0 69 85 90 73 + 463 0 1395 1367 1355 1388 + 464 0 1433 1395 1388 1427 + 465 0 1467 1433 1427 1463 + 466 0 1495 1467 1463 1497 + 467 0 1524 1495 1497 1530 + 468 0 1556 1524 1530 1561 + 469 0 1589 1556 1561 1593 + 470 0 1620 1589 1593 1619 + 471 0 1653 1620 1619 1649 + 472 0 1681 1653 1649 1680 + 473 0 1709 1681 1680 1710 + 474 0 305 343 354 318 + 475 0 267 305 318 276 + 476 0 236 267 276 237 + 477 0 209 236 237 204 + 478 0 183 209 204 185 + 479 0 162 183 185 166 + 480 0 143 162 166 135 + 481 0 1735 1709 1710 1740 + 482 0 1759 1735 1740 1768 + 483 0 1756 1773 1745 1721 + 484 0 1780 1759 1768 1785 + 485 0 1806 1780 1785 1805 + 486 0 1095 1037 1039 1098 + 487 0 1144 1095 1098 1156 + 488 0 1182 1144 1156 1205 + 489 0 880 891 826 812 + 490 0 891 918 849 826 + 491 0 918 952 883 849 + 492 0 952 990 951 883 + 493 0 990 1021 1019 951 + 494 0 1019 1054 1003 951 + 495 0 1054 1082 1072 1003 + 496 0 1111 1155 1083 1018 + 497 0 1155 1213 1142 1083 + 498 0 1213 1292 1189 1142 + 499 0 99 135 159 111 + 500 0 1773 1793 1760 1745 + 501 0 1793 1817 1789 1760 + 502 0 1931 1937 1914 1911 + 503 0 1924 1931 1911 1903 + 504 0 1915 1924 1903 1893 + 505 0 1898 1915 1893 1876 + 506 0 1880 1898 1876 1858 + 507 0 1862 1880 1858 1838 + 508 0 1914 1890 1888 1911 + 509 0 1890 1868 1870 1888 + 510 0 1868 1848 1851 1870 + 511 0 1848 1828 1832 1851 + 512 0 405 446 453 412 + 513 0 446 499 515 453 + 514 0 499 551 577 515 + 515 0 551 596 632 577 + 516 0 596 623 658 632 + 517 0 623 644 670 658 + 518 0 670 711 705 658 + 519 0 711 756 768 705 + 520 0 756 812 826 768 + 521 0 539 514 521 545 + 522 0 572 539 545 576 + 523 0 514 483 489 521 + 524 0 483 450 458 489 + 525 0 450 420 430 458 + 526 0 420 391 399 430 + 527 0 391 361 371 399 + 528 0 361 336 345 371 + 529 0 336 307 313 345 + 530 0 307 277 284 313 + 531 0 277 249 257 284 + 532 0 249 223 234 257 + 533 0 223 200 211 234 + 534 0 200 177 187 211 + 535 0 177 153 158 187 + 536 0 153 132 116 158 + 537 0 600 572 576 605 + 538 0 631 600 605 640 + 539 0 662 631 640 676 + 540 0 696 662 676 698 + 541 0 730 696 698 725 + 542 0 766 730 725 767 + 543 0 808 766 767 829 + 544 0 853 808 829 875 + 545 0 116 111 159 158 + 546 0 1442 1493 1464 1390 + 547 0 1493 1534 1507 1464 + 548 0 1534 1565 1541 1507 + 549 0 1565 1587 1549 1541 + 550 0 1587 1607 1564 1549 + 551 0 1607 1634 1590 1564 + 552 0 1634 1659 1617 1590 + 553 0 1659 1689 1643 1617 + 554 0 1689 1721 1688 1643 + 555 0 1851 1832 1831 1857 + 556 0 1862 1838 1815 1843 + 557 0 1815 1789 1817 1843 + 558 0 1832 1828 1806 1805 + 559 0 1870 1851 1857 1872 + 560 0 1375 1391 1300 1292 + 561 0 1391 1442 1390 1300 + 562 0 1464 1507 1504 1440 + 563 0 1507 1541 1549 1504 + 564 0 1549 1564 1512 1504 + 565 0 875 829 908 921 + 566 0 977 921 908 976 + 567 0 1688 1721 1745 1715 + 568 0 1564 1590 1537 1512 + 569 0 1590 1617 1563 1537 + 570 0 1643 1688 1662 1612 + 571 0 1617 1643 1592 1563 + 572 0 1070 1111 1018 962 + 573 0 1072 1070 962 1003 + 574 0 387 376 412 414 + 575 0 354 387 417 377 + 576 0 412 453 449 414 + 577 0 449 417 387 414 + 578 0 1903 1911 1888 1884 + 579 0 1888 1870 1872 1884 + 580 0 1893 1903 1884 1873 + 581 0 1876 1893 1873 1855 + 582 0 1858 1876 1855 1836 + 583 0 1838 1858 1836 1811 + 584 0 318 354 377 329 + 585 0 276 318 329 282 + 586 0 237 276 282 231 + 587 0 204 237 231 188 + 588 0 185 204 188 166 + 589 0 135 166 188 159 + 590 0 1390 1464 1440 1345 + 591 0 1745 1760 1717 1715 + 592 0 453 515 523 449 + 593 0 1189 1292 1300 1161 + 594 0 1219 1182 1205 1239 + 595 0 1302 1267 1239 1275 + 596 0 1330 1302 1275 1315 + 597 0 1355 1330 1315 1325 + 598 0 1388 1355 1325 1373 + 599 0 1427 1388 1373 1418 + 600 0 1463 1427 1418 1451 + 601 0 1497 1463 1451 1487 + 602 0 1530 1497 1487 1527 + 603 0 1561 1530 1527 1568 + 604 0 1593 1561 1568 1591 + 605 0 1619 1593 1591 1605 + 606 0 1649 1619 1605 1633 + 607 0 1680 1649 1633 1664 + 608 0 1710 1680 1664 1705 + 609 0 1740 1710 1705 1741 + 610 0 1768 1740 1741 1784 + 611 0 1785 1768 1784 1805 + 612 0 1039 977 976 1053 + 613 0 1098 1039 1053 1113 + 614 0 1156 1098 1113 1190 + 615 0 1205 1156 1190 1251 + 616 0 1239 1205 1251 1275 + 617 0 1315 1275 1251 1325 + 618 0 768 826 849 777 + 619 0 705 768 777 694 + 620 0 658 705 694 632 + 621 0 577 632 694 611 + 622 0 515 577 611 523 + 623 0 849 883 805 777 + 624 0 883 951 858 805 + 625 0 951 1003 962 858 + 626 0 1760 1789 1755 1717 + 627 0 158 159 221 196 + 628 0 187 158 196 212 + 629 0 211 187 212 230 + 630 0 234 211 230 246 + 631 0 257 234 246 268 + 632 0 284 257 268 295 + 633 0 313 284 295 324 + 634 0 345 313 324 355 + 635 0 371 345 355 384 + 636 0 399 371 384 415 + 637 0 430 399 415 444 + 638 0 458 430 444 467 + 639 0 489 458 467 498 + 640 0 521 489 498 524 + 641 0 545 521 524 552 + 642 0 576 545 552 585 + 643 0 605 576 585 621 + 644 0 640 605 621 663 + 645 0 676 640 663 703 + 646 0 698 676 703 725 + 647 0 1083 1142 1086 1014 + 648 0 1142 1189 1161 1086 + 649 0 1018 1083 1014 945 + 650 0 1838 1811 1782 1815 + 651 0 1811 1836 1807 1779 + 652 0 1789 1815 1782 1755 + 653 0 1811 1779 1750 1782 + 654 0 1836 1855 1831 1807 + 655 0 1855 1873 1857 1831 + 656 0 1884 1872 1857 1873 + 657 0 767 752 833 829 + 658 0 1592 1643 1612 1557 + 659 0 1662 1688 1715 1717 + 660 0 725 703 752 767 + 661 0 1563 1592 1557 1516 + 662 0 1537 1563 1516 1478 + 663 0 1504 1512 1454 1440 + 664 0 1454 1512 1537 1478 + 665 0 1018 945 867 962 + 666 0 377 417 457 400 + 667 0 417 449 523 457 + 668 0 908 829 833 916 + 669 0 329 377 400 350 + 670 0 1086 1161 1110 1022 + 671 0 703 663 695 752 + 672 0 663 621 642 695 + 673 0 621 585 598 642 + 674 0 188 231 221 159 + 675 0 1161 1300 1206 1110 + 676 0 282 329 350 291 + 677 0 231 282 291 221 + 678 0 585 552 541 598 + 679 0 552 524 498 541 + 680 0 1251 1190 1273 1325 + 681 0 1373 1325 1273 1343 + 682 0 1418 1373 1343 1389 + 683 0 1451 1418 1389 1435 + 684 0 1487 1451 1435 1469 + 685 0 1527 1487 1469 1510 + 686 0 1568 1527 1510 1574 + 687 0 1591 1568 1574 1605 + 688 0 1633 1605 1574 1600 + 689 0 1664 1633 1600 1637 + 690 0 1705 1664 1637 1685 + 691 0 1741 1705 1685 1726 + 692 0 1784 1741 1726 1762 + 693 0 1831 1784 1762 1807 + 694 0 212 196 221 248 + 695 0 230 212 248 260 + 696 0 246 230 260 262 + 697 0 268 246 262 286 + 698 0 295 268 286 306 + 699 0 324 295 306 341 + 700 0 355 324 341 378 + 701 0 384 355 378 411 + 702 0 415 384 411 442 + 703 0 444 415 442 472 + 704 0 467 444 472 498 + 705 0 976 908 916 997 + 706 0 1053 976 997 1073 + 707 0 1113 1053 1073 1131 + 708 0 1190 1113 1131 1174 + 709 0 1345 1440 1454 1383 + 710 0 858 962 867 778 + 711 0 805 858 778 733 + 712 0 777 805 733 694 + 713 0 611 694 733 648 + 714 0 523 611 648 571 + 715 0 1662 1717 1678 1625 + 716 0 1612 1662 1625 1566 + 717 0 1717 1755 1714 1678 + 718 0 1755 1782 1750 1714 + 719 0 945 893 828 867 + 720 0 1190 1174 1226 1273 + 721 0 1600 1574 1510 1535 + 722 0 1637 1600 1535 1584 + 723 0 1612 1566 1513 1557 + 724 0 498 472 516 541 + 725 0 1014 1086 1022 963 + 726 0 945 1014 963 893 + 727 0 1343 1273 1226 1304 + 728 0 1389 1343 1304 1364 + 729 0 1435 1389 1364 1406 + 730 0 1174 1131 1168 1226 + 731 0 1625 1678 1624 1562 + 732 0 1566 1625 1562 1508 + 733 0 1516 1557 1513 1470 + 734 0 1454 1478 1424 1383 + 735 0 1478 1516 1470 1424 + 736 0 1131 1073 1114 1168 + 737 0 1073 997 1048 1114 + 738 0 1469 1435 1406 1410 + 739 0 1206 1345 1214 1127 + 740 0 1345 1383 1293 1214 + 741 0 1678 1714 1673 1624 + 742 0 1714 1750 1712 1673 + 743 0 1750 1779 1738 1712 + 744 0 1779 1807 1762 1738 + 745 0 1685 1637 1584 1648 + 746 0 1110 1206 1127 1052 + 747 0 472 442 474 516 + 748 0 442 411 445 474 + 749 0 411 378 416 445 + 750 0 378 341 390 416 + 751 0 997 916 961 1048 + 752 0 916 833 870 961 + 753 0 833 752 788 870 + 754 0 752 695 731 788 + 755 0 523 571 496 457 + 756 0 400 457 496 426 + 757 0 350 400 426 360 + 758 0 1022 1110 1052 972 + 759 0 291 350 360 322 + 760 0 221 291 322 248 + 761 0 260 248 322 314 + 762 0 341 306 286 314 + 763 0 260 314 286 262 + 764 0 1726 1685 1648 1693 + 765 0 1762 1726 1693 1738 + 766 0 695 642 677 731 + 767 0 598 541 516 560 + 768 0 642 598 633 677 + 769 0 1510 1469 1410 1422 + 770 0 778 867 828 782 + 771 0 648 733 778 681 + 772 0 571 648 681 599 + 773 0 828 893 854 793 + 774 0 1383 1424 1359 1293 + 775 0 1510 1422 1421 1535 + 776 0 1424 1470 1420 1359 + 777 0 1470 1513 1466 1420 + 778 0 1513 1566 1508 1466 + 779 0 1712 1738 1693 1657 + 780 0 1673 1712 1657 1608 + 781 0 1624 1673 1608 1547 + 782 0 1562 1624 1547 1489 + 783 0 1508 1562 1489 1441 + 784 0 1226 1168 1245 1304 + 785 0 1364 1304 1245 1344 + 786 0 1406 1364 1344 1410 + 787 0 1168 1114 1186 1245 + 788 0 1114 1048 1122 1186 + 789 0 1048 961 1030 1122 + 790 0 961 870 935 1030 + 791 0 390 341 314 380 + 792 0 870 788 842 935 + 793 0 963 1022 972 909 + 794 0 893 963 909 854 + 795 0 778 782 745 681 + 796 0 516 474 519 560 + 797 0 474 445 482 519 + 798 0 445 416 461 482 + 799 0 416 390 438 461 + 800 0 788 731 769 842 + 801 0 599 681 669 607 + 802 0 360 426 409 322 + 803 0 314 322 409 380 + 804 0 571 599 528 496 + 805 0 426 496 528 475 + 806 0 599 607 556 528 + 807 0 633 598 560 589 + 808 0 731 677 716 769 + 809 0 677 633 667 716 + 810 0 782 828 793 745 + 811 0 1693 1648 1594 1657 + 812 0 1648 1584 1509 1594 + 813 0 972 1052 988 917 + 814 0 1052 1127 1066 988 + 815 0 1127 1214 1133 1066 + 816 0 1214 1293 1201 1133 + 817 0 1535 1421 1509 1584 + 818 0 1466 1508 1441 1401 + 819 0 438 390 380 427 + 820 0 1293 1359 1296 1201 + 821 0 1420 1466 1401 1377 + 822 0 1359 1420 1377 1296 + 823 0 909 972 917 861 + 824 0 854 909 861 827 + 825 0 1344 1245 1186 1311 + 826 0 1410 1344 1311 1422 + 827 0 560 519 547 589 + 828 0 519 482 517 547 + 829 0 482 461 503 517 + 830 0 461 438 494 503 + 831 0 1186 1122 1236 1311 + 832 0 1122 1030 1141 1236 + 833 0 1030 935 1025 1141 + 834 0 935 842 920 1025 + 835 0 842 769 818 920 + 836 0 769 716 754 818 + 837 0 633 589 609 667 + 838 0 716 667 699 754 + 839 0 1608 1657 1594 1522 + 840 0 426 475 495 409 + 841 0 475 528 556 495 + 842 0 1547 1608 1522 1459 + 843 0 1489 1547 1459 1392 + 844 0 1441 1489 1392 1351 + 845 0 681 745 723 669 + 846 0 380 409 466 427 + 847 0 1594 1509 1432 1522 + 848 0 1133 1201 1140 1071 + 849 0 1066 1133 1071 1002 + 850 0 988 1066 1002 941 + 851 0 917 988 941 865 + 852 0 607 669 672 629 + 853 0 1401 1441 1351 1322 + 854 0 854 827 776 793 + 855 0 1422 1311 1236 1421 + 856 0 494 438 427 466 + 857 0 861 917 865 811 + 858 0 827 861 811 776 + 859 0 745 793 776 723 + 860 0 589 547 558 609 + 861 0 547 517 503 558 + 862 0 503 494 559 558 + 863 0 1377 1401 1322 1296 + 864 0 1201 1296 1200 1140 + 865 0 669 723 709 672 + 866 0 699 667 609 625 + 867 0 609 558 559 625 + 868 0 466 409 495 549 + 869 0 494 466 549 559 + 870 0 495 556 595 549 + 871 0 629 595 556 607 + 872 0 1432 1509 1421 1303 + 873 0 1421 1236 1141 1303 + 874 0 1459 1522 1432 1340 + 875 0 1392 1459 1340 1232 + 876 0 1351 1392 1232 1199 + 877 0 1141 1025 1157 1303 + 878 0 1432 1303 1157 1340 + 879 0 818 754 810 889 + 880 0 1025 920 1045 1157 + 881 0 1340 1157 1045 1232 + 882 0 1071 1140 1101 1012 + 883 0 1002 1071 1012 948 + 884 0 941 1002 948 897 + 885 0 865 941 897 821 + 886 0 629 672 691 654 + 887 0 754 699 740 810 + 888 0 1322 1351 1199 1195 + 889 0 1296 1322 1195 1200 + 890 0 1140 1200 1195 1101 + 891 0 629 654 647 595 + 892 0 691 672 709 736 + 893 0 811 865 821 770 + 894 0 654 691 708 647 + 895 0 776 811 770 736 + 896 0 776 736 709 723 + 897 0 549 595 647 639 + 898 0 691 736 770 708 + 899 0 559 549 639 625 + 900 0 1199 1232 1045 1068 + 901 0 1195 1199 1068 1101 + 902 0 1012 1101 1068 958 + 903 0 699 625 639 740 + 904 0 920 818 889 1045 + 905 0 889 958 1068 1045 + 906 0 810 740 821 881 + 907 0 639 647 708 740 + 908 0 708 770 821 740 + 909 0 948 1012 958 881 + 910 0 958 889 810 881 + 911 0 897 948 881 821 + 912 0 1831 1832 1805 1784 + 913 0 1300 1390 1345 1206 + 914 0 111 116 90 85 +End Elements + +Begin SubModelPart Parts_Parts_Auto1 // Group Parts Auto1 // Subtree Parts + Begin SubModelPartNodes + 1 + 3 + 4 + 7 + 9 + 10 + 11 + 12 + 17 + 19 + 20 + 21 + 25 + 27 + 28 + 29 + 30 + 32 + 36 + 39 + 40 + 41 + 42 + 44 + 46 + 51 + 52 + 55 + 56 + 58 + 62 + 63 + 66 + 68 + 70 + 72 + 74 + 76 + 77 + 80 + 82 + 83 + 86 + 88 + 89 + 92 + 94 + 95 + 98 + 100 + 101 + 103 + 104 + 105 + 106 + 108 + 109 + 113 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 126 + 127 + 130 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 144 + 145 + 146 + 147 + 149 + 154 + 157 + 160 + 161 + 163 + 164 + 165 + 167 + 168 + 169 + 170 + 171 + 175 + 179 + 181 + 182 + 184 + 186 + 189 + 190 + 192 + 195 + 197 + 198 + 202 + 203 + 205 + 207 + 208 + 210 + 213 + 214 + 215 + 217 + 220 + 222 + 226 + 227 + 228 + 229 + 233 + 235 + 238 + 239 + 240 + 241 + 242 + 244 + 251 + 252 + 254 + 255 + 256 + 258 + 259 + 263 + 264 + 265 + 266 + 269 + 271 + 273 + 275 + 278 + 280 + 283 + 285 + 287 + 288 + 289 + 290 + 292 + 293 + 296 + 297 + 298 + 299 + 302 + 304 + 308 + 310 + 311 + 312 + 315 + 317 + 319 + 320 + 321 + 323 + 325 + 326 + 328 + 331 + 334 + 335 + 337 + 339 + 340 + 342 + 344 + 346 + 347 + 348 + 351 + 352 + 353 + 356 + 358 + 363 + 364 + 366 + 368 + 369 + 370 + 373 + 374 + 375 + 379 + 382 + 383 + 385 + 388 + 393 + 394 + 395 + 397 + 398 + 402 + 403 + 404 + 407 + 408 + 410 + 413 + 421 + 422 + 423 + 424 + 428 + 431 + 432 + 433 + 434 + 436 + 437 + 439 + 441 + 443 + 447 + 452 + 454 + 456 + 459 + 460 + 462 + 463 + 464 + 465 + 468 + 470 + 471 + 476 + 479 + 480 + 481 + 485 + 486 + 487 + 490 + 491 + 492 + 493 + 497 + 500 + 501 + 502 + 504 + 505 + 507 + 508 + 511 + 512 + 518 + 522 + 525 + 526 + 527 + 529 + 530 + 532 + 534 + 537 + 538 + 540 + 542 + 543 + 544 + 546 + 550 + 553 + 554 + 555 + 557 + 562 + 564 + 565 + 567 + 569 + 570 + 573 + 575 + 578 + 579 + 580 + 581 + 582 + 583 + 586 + 587 + 590 + 591 + 592 + 601 + 602 + 603 + 604 + 608 + 610 + 612 + 613 + 614 + 615 + 616 + 620 + 624 + 626 + 627 + 630 + 634 + 635 + 636 + 638 + 641 + 643 + 645 + 646 + 649 + 650 + 652 + 653 + 659 + 660 + 661 + 665 + 666 + 671 + 673 + 674 + 675 + 678 + 679 + 680 + 682 + 683 + 684 + 687 + 688 + 689 + 692 + 697 + 701 + 702 + 704 + 707 + 710 + 712 + 713 + 714 + 715 + 717 + 718 + 719 + 720 + 721 + 722 + 726 + 729 + 734 + 735 + 737 + 738 + 739 + 742 + 743 + 744 + 746 + 747 + 749 + 750 + 751 + 753 + 755 + 758 + 760 + 761 + 763 + 764 + 771 + 772 + 774 + 775 + 779 + 780 + 781 + 783 + 784 + 785 + 786 + 791 + 792 + 794 + 795 + 797 + 799 + 800 + 801 + 802 + 803 + 804 + 807 + 809 + 813 + 814 + 815 + 816 + 817 + 819 + 822 + 823 + 824 + 825 + 831 + 832 + 835 + 838 + 839 + 840 + 841 + 844 + 845 + 846 + 847 + 848 + 850 + 851 + 855 + 856 + 857 + 859 + 862 + 863 + 866 + 868 + 869 + 872 + 873 + 876 + 877 + 878 + 882 + 884 + 886 + 887 + 888 + 890 + 894 + 895 + 896 + 898 + 900 + 902 + 903 + 904 + 905 + 906 + 907 + 910 + 912 + 913 + 915 + 919 + 923 + 925 + 926 + 927 + 928 + 929 + 930 + 931 + 932 + 933 + 934 + 936 + 939 + 940 + 942 + 946 + 947 + 949 + 950 + 953 + 955 + 956 + 957 + 960 + 965 + 966 + 967 + 969 + 971 + 973 + 974 + 975 + 978 + 979 + 980 + 981 + 982 + 984 + 986 + 992 + 993 + 994 + 995 + 996 + 998 + 999 + 1001 + 1004 + 1006 + 1007 + 1009 + 1013 + 1015 + 1016 + 1017 + 1020 + 1024 + 1027 + 1028 + 1029 + 1031 + 1032 + 1033 + 1034 + 1035 + 1036 + 1038 + 1040 + 1042 + 1043 + 1046 + 1049 + 1050 + 1051 + 1057 + 1058 + 1059 + 1060 + 1062 + 1063 + 1064 + 1065 + 1069 + 1074 + 1076 + 1078 + 1079 + 1080 + 1084 + 1085 + 1087 + 1088 + 1089 + 1090 + 1091 + 1093 + 1096 + 1099 + 1104 + 1105 + 1106 + 1107 + 1108 + 1109 + 1112 + 1115 + 1118 + 1119 + 1120 + 1123 + 1124 + 1125 + 1126 + 1129 + 1130 + 1134 + 1138 + 1139 + 1145 + 1146 + 1147 + 1148 + 1149 + 1150 + 1151 + 1152 + 1158 + 1159 + 1162 + 1163 + 1164 + 1169 + 1170 + 1171 + 1175 + 1176 + 1177 + 1178 + 1179 + 1180 + 1181 + 1183 + 1184 + 1185 + 1187 + 1188 + 1192 + 1193 + 1198 + 1204 + 1207 + 1208 + 1209 + 1210 + 1211 + 1212 + 1216 + 1217 + 1221 + 1222 + 1224 + 1225 + 1227 + 1228 + 1229 + 1233 + 1235 + 1240 + 1241 + 1244 + 1246 + 1247 + 1249 + 1250 + 1252 + 1253 + 1254 + 1255 + 1256 + 1258 + 1259 + 1262 + 1264 + 1266 + 1268 + 1270 + 1272 + 1277 + 1278 + 1279 + 1282 + 1284 + 1286 + 1287 + 1288 + 1289 + 1290 + 1294 + 1297 + 1298 + 1299 + 1305 + 1307 + 1308 + 1310 + 1312 + 1313 + 1314 + 1317 + 1319 + 1321 + 1323 + 1324 + 1326 + 1328 + 1329 + 1332 + 1333 + 1334 + 1337 + 1338 + 1339 + 1342 + 1348 + 1349 + 1350 + 1352 + 1354 + 1356 + 1357 + 1358 + 1360 + 1362 + 1363 + 1365 + 1368 + 1369 + 1370 + 1371 + 1376 + 1378 + 1381 + 1382 + 1384 + 1385 + 1386 + 1387 + 1393 + 1397 + 1400 + 1402 + 1403 + 1404 + 1405 + 1407 + 1408 + 1409 + 1411 + 1412 + 1413 + 1414 + 1416 + 1417 + 1419 + 1425 + 1426 + 1428 + 1434 + 1436 + 1438 + 1439 + 1443 + 1444 + 1445 + 1446 + 1448 + 1449 + 1450 + 1452 + 1455 + 1457 + 1458 + 1460 + 1465 + 1468 + 1471 + 1472 + 1473 + 1475 + 1476 + 1477 + 1480 + 1482 + 1483 + 1484 + 1486 + 1490 + 1491 + 1492 + 1494 + 1498 + 1499 + 1500 + 1501 + 1502 + 1503 + 1506 + 1515 + 1517 + 1518 + 1520 + 1521 + 1523 + 1525 + 1526 + 1529 + 1531 + 1532 + 1536 + 1538 + 1539 + 1542 + 1543 + 1544 + 1548 + 1551 + 1552 + 1553 + 1554 + 1555 + 1558 + 1559 + 1560 + 1569 + 1571 + 1572 + 1576 + 1578 + 1579 + 1580 + 1582 + 1583 + 1585 + 1586 + 1588 + 1595 + 1596 + 1598 + 1599 + 1602 + 1603 + 1604 + 1611 + 1613 + 1614 + 1615 + 1618 + 1621 + 1622 + 1623 + 1627 + 1628 + 1629 + 1631 + 1632 + 1636 + 1638 + 1639 + 1641 + 1644 + 1645 + 1646 + 1651 + 1652 + 1655 + 1656 + 1658 + 1661 + 1663 + 1666 + 1667 + 1669 + 1670 + 1671 + 1674 + 1676 + 1677 + 1679 + 1683 + 1684 + 1687 + 1690 + 1694 + 1695 + 1696 + 1698 + 1699 + 1700 + 1701 + 1704 + 1706 + 1707 + 1711 + 1713 + 1716 + 1719 + 1720 + 1723 + 1727 + 1728 + 1730 + 1731 + 1733 + 1734 + 1736 + 1737 + 1739 + 1743 + 1744 + 1746 + 1751 + 1752 + 1754 + 1757 + 1758 + 1763 + 1764 + 1765 + 1767 + 1769 + 1770 + 1772 + 1774 + 1777 + 1778 + 1781 + 1787 + 1788 + 1790 + 1792 + 1795 + 1796 + 1797 + 1799 + 1802 + 1803 + 1804 + 1808 + 1810 + 1812 + 1814 + 1816 + 1819 + 1823 + 1824 + 1825 + 1826 + 1827 + 1829 + 1833 + 1834 + 1837 + 1840 + 1841 + 1846 + 1847 + 1849 + 1852 + 1853 + 1854 + 1859 + 1861 + 1864 + 1867 + 1869 + 1874 + 1875 + 1878 + 1879 + 1881 + 1887 + 1889 + 1892 + 1894 + 1895 + 1896 + 1897 + 1900 + 1902 + 1906 + 1907 + 1910 + 1912 + 1913 + 1916 + 1917 + 1921 + 1923 + 1925 + 1927 + 1928 + 1929 + 1932 + 1933 + 1938 + 1940 + 1941 + 1944 + 1945 + 1946 + 1947 + 1951 + 1954 + 1955 + 1956 + 1958 + 1959 + 1961 + 1965 + 1966 + 1967 + 1971 + 1973 + 1975 + 1976 + 1977 + 1978 + 1979 + 1982 + 1984 + 1986 + 1988 + 1989 + 1994 + 1997 + 1998 + 1999 + 2000 + 2001 + 2002 + 2004 + 2011 + 2012 + 2013 + 2014 + 2015 + 2016 + End SubModelPartNodes + Begin SubModelPartElements + 915 + 916 + 917 + 918 + 919 + 920 + 921 + 922 + 923 + 924 + 925 + 926 + 927 + 928 + 929 + 930 + 931 + 932 + 933 + 934 + 935 + 936 + 937 + 938 + 939 + 940 + 941 + 942 + 943 + 944 + 945 + 946 + 947 + 948 + 949 + 950 + 951 + 952 + 953 + 954 + 955 + 956 + 957 + 958 + 959 + 960 + 961 + 962 + 963 + 964 + 965 + 966 + 967 + 968 + 969 + 970 + 971 + 972 + 973 + 974 + 975 + 976 + 977 + 978 + 979 + 980 + 981 + 982 + 983 + 984 + 985 + 986 + 987 + 988 + 989 + 990 + 991 + 992 + 993 + 994 + 995 + 996 + 997 + 998 + 999 + 1000 + 1001 + 1002 + 1003 + 1004 + 1005 + 1006 + 1007 + 1008 + 1009 + 1010 + 1011 + 1012 + 1013 + 1014 + 1015 + 1016 + 1017 + 1018 + 1019 + 1020 + 1021 + 1022 + 1023 + 1024 + 1025 + 1026 + 1027 + 1028 + 1029 + 1030 + 1031 + 1032 + 1033 + 1034 + 1035 + 1036 + 1037 + 1038 + 1039 + 1040 + 1041 + 1042 + 1043 + 1044 + 1045 + 1046 + 1047 + 1048 + 1049 + 1050 + 1051 + 1052 + 1053 + 1054 + 1055 + 1056 + 1057 + 1058 + 1059 + 1060 + 1061 + 1062 + 1063 + 1064 + 1065 + 1066 + 1067 + 1068 + 1069 + 1070 + 1071 + 1072 + 1073 + 1074 + 1075 + 1076 + 1077 + 1078 + 1079 + 1080 + 1081 + 1082 + 1083 + 1084 + 1085 + 1086 + 1087 + 1088 + 1089 + 1090 + 1091 + 1092 + 1093 + 1094 + 1095 + 1096 + 1097 + 1098 + 1099 + 1100 + 1101 + 1102 + 1103 + 1104 + 1105 + 1106 + 1107 + 1108 + 1109 + 1110 + 1111 + 1112 + 1113 + 1114 + 1115 + 1116 + 1117 + 1118 + 1119 + 1120 + 1121 + 1122 + 1123 + 1124 + 1125 + 1126 + 1127 + 1128 + 1129 + 1130 + 1131 + 1132 + 1133 + 1134 + 1135 + 1136 + 1137 + 1138 + 1139 + 1140 + 1141 + 1142 + 1143 + 1144 + 1145 + 1146 + 1147 + 1148 + 1149 + 1150 + 1151 + 1152 + 1153 + 1154 + 1155 + 1156 + 1157 + 1158 + 1159 + 1160 + 1161 + 1162 + 1163 + 1164 + 1165 + 1166 + 1167 + 1168 + 1169 + 1170 + 1171 + 1172 + 1173 + 1174 + 1175 + 1176 + 1177 + 1178 + 1179 + 1180 + 1181 + 1182 + 1183 + 1184 + 1185 + 1186 + 1187 + 1188 + 1189 + 1190 + 1191 + 1192 + 1193 + 1194 + 1195 + 1196 + 1197 + 1198 + 1199 + 1200 + 1201 + 1202 + 1203 + 1204 + 1205 + 1206 + 1207 + 1208 + 1209 + 1210 + 1211 + 1212 + 1213 + 1214 + 1215 + 1216 + 1217 + 1218 + 1219 + 1220 + 1221 + 1222 + 1223 + 1224 + 1225 + 1226 + 1227 + 1228 + 1229 + 1230 + 1231 + 1232 + 1233 + 1234 + 1235 + 1236 + 1237 + 1238 + 1239 + 1240 + 1241 + 1242 + 1243 + 1244 + 1245 + 1246 + 1247 + 1248 + 1249 + 1250 + 1251 + 1252 + 1253 + 1254 + 1255 + 1256 + 1257 + 1258 + 1259 + 1260 + 1261 + 1262 + 1263 + 1264 + 1265 + 1266 + 1267 + 1268 + 1269 + 1270 + 1271 + 1272 + 1273 + 1274 + 1275 + 1276 + 1277 + 1278 + 1279 + 1280 + 1281 + 1282 + 1283 + 1284 + 1285 + 1286 + 1287 + 1288 + 1289 + 1290 + 1291 + 1292 + 1293 + 1294 + 1295 + 1296 + 1297 + 1298 + 1299 + 1300 + 1301 + 1302 + 1303 + 1304 + 1305 + 1306 + 1307 + 1308 + 1309 + 1310 + 1311 + 1312 + 1313 + 1314 + 1315 + 1316 + 1317 + 1318 + 1319 + 1320 + 1321 + 1322 + 1323 + 1324 + 1325 + 1326 + 1327 + 1328 + 1329 + 1330 + 1331 + 1332 + 1333 + 1334 + 1335 + 1336 + 1337 + 1338 + 1339 + 1340 + 1341 + 1342 + 1343 + 1344 + 1345 + 1346 + 1347 + 1348 + 1349 + 1350 + 1351 + 1352 + 1353 + 1354 + 1355 + 1356 + 1357 + 1358 + 1359 + 1360 + 1361 + 1362 + 1363 + 1364 + 1365 + 1366 + 1367 + 1368 + 1369 + 1370 + 1371 + 1372 + 1373 + 1374 + 1375 + 1376 + 1377 + 1378 + 1379 + 1380 + 1381 + 1382 + 1383 + 1384 + 1385 + 1386 + 1387 + 1388 + 1389 + 1390 + 1391 + 1392 + 1393 + 1394 + 1395 + 1396 + 1397 + 1398 + 1399 + 1400 + 1401 + 1402 + 1403 + 1404 + 1405 + 1406 + 1407 + 1408 + 1409 + 1410 + 1411 + 1412 + 1413 + 1414 + 1415 + 1416 + 1417 + 1418 + 1419 + 1420 + 1421 + 1422 + 1423 + 1424 + 1425 + 1426 + 1427 + 1428 + 1429 + 1430 + 1431 + 1432 + 1433 + 1434 + 1435 + 1436 + 1437 + 1438 + 1439 + 1440 + 1441 + 1442 + 1443 + 1444 + 1445 + 1446 + 1447 + 1448 + 1449 + 1450 + 1451 + 1452 + 1453 + 1454 + 1455 + 1456 + 1457 + 1458 + 1459 + 1460 + 1461 + 1462 + 1463 + 1464 + 1465 + 1466 + 1467 + 1468 + 1469 + 1470 + 1471 + 1472 + 1473 + 1474 + 1475 + 1476 + 1477 + 1478 + 1479 + 1480 + 1481 + 1482 + 1483 + 1484 + 1485 + 1486 + 1487 + 1488 + 1489 + 1490 + 1491 + 1492 + 1493 + 1494 + 1495 + 1496 + 1497 + 1498 + 1499 + 1500 + 1501 + 1502 + 1503 + 1504 + 1505 + 1506 + 1507 + 1508 + 1509 + 1510 + 1511 + 1512 + 1513 + 1514 + 1515 + 1516 + 1517 + 1518 + 1519 + 1520 + 1521 + 1522 + 1523 + 1524 + 1525 + 1526 + 1527 + 1528 + 1529 + 1530 + 1531 + 1532 + 1533 + 1534 + 1535 + 1536 + 1537 + 1538 + 1539 + 1540 + 1541 + 1542 + 1543 + 1544 + 1545 + 1546 + 1547 + 1548 + 1549 + 1550 + 1551 + 1552 + 1553 + 1554 + 1555 + 1556 + 1557 + 1558 + 1559 + 1560 + 1561 + 1562 + 1563 + 1564 + 1565 + 1566 + 1567 + 1568 + 1569 + 1570 + 1571 + 1572 + 1573 + 1574 + 1575 + 1576 + 1577 + 1578 + 1579 + 1580 + 1581 + 1582 + 1583 + 1584 + 1585 + 1586 + 1587 + 1588 + 1589 + 1590 + 1591 + 1592 + 1593 + 1594 + 1595 + 1596 + 1597 + 1598 + 1599 + 1600 + 1601 + 1602 + 1603 + 1604 + 1605 + 1606 + 1607 + 1608 + 1609 + 1610 + 1611 + 1612 + 1613 + 1614 + 1615 + 1616 + 1617 + 1618 + 1619 + 1620 + 1621 + 1622 + 1623 + 1624 + 1625 + 1626 + 1627 + 1628 + 1629 + 1630 + 1631 + 1632 + 1633 + 1634 + 1635 + 1636 + 1637 + 1638 + 1639 + 1640 + 1641 + 1642 + 1643 + 1644 + 1645 + 1646 + 1647 + 1648 + 1649 + 1650 + 1651 + 1652 + 1653 + 1654 + 1655 + 1656 + 1657 + 1658 + 1659 + 1660 + 1661 + 1662 + 1663 + 1664 + 1665 + 1666 + 1667 + 1668 + 1669 + 1670 + 1671 + 1672 + 1673 + 1674 + 1675 + 1676 + 1677 + 1678 + 1679 + 1680 + 1681 + 1682 + 1683 + 1684 + 1685 + 1686 + 1687 + 1688 + 1689 + 1690 + 1691 + 1692 + 1693 + 1694 + 1695 + 1696 + 1697 + 1698 + 1699 + 1700 + 1701 + 1702 + 1703 + 1704 + 1705 + 1706 + 1707 + 1708 + 1709 + 1710 + 1711 + 1712 + 1713 + 1714 + 1715 + 1716 + 1717 + 1718 + 1719 + 1720 + 1721 + 1722 + 1723 + 1724 + 1725 + 1726 + 1727 + 1728 + 1729 + 1730 + 1731 + 1732 + 1733 + 1734 + 1735 + 1736 + 1737 + 1738 + 1739 + 1740 + 1741 + 1742 + 1743 + 1744 + 1745 + 1746 + 1747 + 1748 + 1749 + 1750 + 1751 + 1752 + 1753 + 1754 + 1755 + 1756 + 1757 + 1758 + 1759 + 1760 + 1761 + 1762 + 1763 + 1764 + 1765 + 1766 + 1767 + 1768 + 1769 + 1770 + 1771 + 1772 + 1773 + 1774 + 1775 + 1776 + 1777 + 1778 + 1779 + 1780 + 1781 + 1782 + 1783 + 1784 + 1785 + 1786 + 1787 + 1788 + 1789 + 1790 + 1791 + 1792 + 1793 + 1794 + 1795 + 1796 + 1797 + 1798 + 1799 + 1800 + 1801 + 1802 + 1803 + 1804 + 1805 + 1806 + 1807 + 1808 + 1809 + 1810 + 1811 + 1812 + 1813 + 1814 + 1815 + 1816 + 1817 + 1818 + 1819 + 1820 + 1821 + 1822 + 1823 + 1824 + 1825 + 1826 + 1827 + 1828 + 1829 + 1830 + 1831 + 1832 + 1833 + 1834 + 1835 + 1836 + 1837 + 1838 + 1839 + 1840 + 1841 + 1842 + 1843 + 1844 + 1845 + 1846 + 1847 + 1848 + 1849 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart Parts_Parts_Auto2 // Group Parts Auto2 // Subtree Parts + Begin SubModelPartNodes + 2 + 5 + 6 + 8 + 13 + 14 + 15 + 16 + 18 + 22 + 23 + 24 + 26 + 31 + 33 + 34 + 35 + 37 + 38 + 43 + 45 + 47 + 48 + 49 + 50 + 53 + 54 + 57 + 59 + 60 + 61 + 64 + 65 + 67 + 69 + 71 + 73 + 75 + 78 + 79 + 81 + 84 + 85 + 87 + 90 + 91 + 93 + 96 + 97 + 99 + 102 + 107 + 110 + 111 + 112 + 114 + 115 + 116 + 125 + 128 + 129 + 131 + 132 + 133 + 134 + 135 + 143 + 148 + 150 + 151 + 152 + 153 + 155 + 156 + 158 + 159 + 162 + 166 + 172 + 173 + 174 + 176 + 177 + 178 + 180 + 183 + 185 + 187 + 188 + 191 + 193 + 194 + 196 + 199 + 200 + 201 + 204 + 206 + 209 + 211 + 212 + 216 + 218 + 219 + 221 + 223 + 224 + 225 + 230 + 231 + 232 + 234 + 236 + 237 + 243 + 245 + 246 + 247 + 248 + 249 + 250 + 253 + 257 + 260 + 261 + 262 + 267 + 268 + 270 + 272 + 274 + 276 + 277 + 279 + 281 + 282 + 284 + 286 + 291 + 294 + 295 + 300 + 301 + 303 + 305 + 306 + 307 + 309 + 313 + 314 + 316 + 318 + 322 + 324 + 327 + 329 + 330 + 332 + 333 + 336 + 338 + 341 + 343 + 345 + 349 + 350 + 354 + 355 + 357 + 359 + 360 + 361 + 362 + 365 + 367 + 371 + 372 + 376 + 377 + 378 + 380 + 381 + 384 + 386 + 387 + 389 + 390 + 391 + 392 + 396 + 399 + 400 + 401 + 405 + 406 + 409 + 411 + 412 + 414 + 415 + 416 + 417 + 418 + 419 + 420 + 425 + 426 + 427 + 429 + 430 + 435 + 438 + 440 + 442 + 444 + 445 + 446 + 448 + 449 + 450 + 451 + 453 + 455 + 457 + 458 + 461 + 466 + 467 + 469 + 472 + 473 + 474 + 475 + 477 + 478 + 482 + 483 + 484 + 488 + 489 + 494 + 495 + 496 + 498 + 499 + 503 + 506 + 509 + 510 + 513 + 514 + 515 + 516 + 517 + 519 + 520 + 521 + 523 + 524 + 528 + 531 + 533 + 535 + 536 + 539 + 541 + 545 + 547 + 548 + 549 + 551 + 552 + 556 + 558 + 559 + 560 + 561 + 563 + 566 + 568 + 571 + 572 + 574 + 576 + 577 + 584 + 585 + 588 + 589 + 593 + 594 + 595 + 596 + 597 + 598 + 599 + 600 + 605 + 606 + 607 + 609 + 611 + 617 + 618 + 619 + 621 + 622 + 623 + 625 + 628 + 629 + 631 + 632 + 633 + 637 + 639 + 640 + 642 + 644 + 647 + 648 + 651 + 654 + 655 + 656 + 657 + 658 + 662 + 663 + 664 + 667 + 668 + 669 + 670 + 672 + 676 + 677 + 681 + 685 + 686 + 690 + 691 + 693 + 694 + 695 + 696 + 698 + 699 + 700 + 703 + 705 + 706 + 708 + 709 + 711 + 716 + 723 + 724 + 725 + 727 + 728 + 730 + 731 + 732 + 733 + 736 + 740 + 741 + 745 + 748 + 752 + 754 + 756 + 757 + 759 + 762 + 765 + 766 + 767 + 768 + 769 + 770 + 773 + 776 + 777 + 778 + 782 + 787 + 788 + 789 + 790 + 793 + 796 + 798 + 805 + 806 + 808 + 810 + 811 + 812 + 818 + 820 + 821 + 826 + 827 + 828 + 829 + 830 + 833 + 834 + 836 + 837 + 842 + 843 + 849 + 852 + 853 + 854 + 858 + 860 + 861 + 864 + 865 + 867 + 870 + 871 + 874 + 875 + 879 + 880 + 881 + 883 + 885 + 889 + 891 + 892 + 893 + 897 + 899 + 901 + 908 + 909 + 911 + 914 + 916 + 917 + 918 + 920 + 921 + 922 + 924 + 935 + 937 + 938 + 941 + 943 + 944 + 945 + 948 + 951 + 952 + 954 + 958 + 959 + 961 + 962 + 963 + 964 + 968 + 970 + 972 + 976 + 977 + 983 + 985 + 987 + 988 + 989 + 990 + 991 + 997 + 1000 + 1002 + 1003 + 1005 + 1008 + 1010 + 1011 + 1012 + 1014 + 1018 + 1019 + 1021 + 1022 + 1023 + 1025 + 1026 + 1030 + 1037 + 1039 + 1041 + 1044 + 1045 + 1047 + 1048 + 1052 + 1053 + 1054 + 1055 + 1056 + 1061 + 1066 + 1067 + 1068 + 1070 + 1071 + 1072 + 1073 + 1075 + 1077 + 1081 + 1082 + 1083 + 1086 + 1092 + 1094 + 1095 + 1097 + 1098 + 1100 + 1101 + 1102 + 1103 + 1110 + 1111 + 1113 + 1114 + 1116 + 1117 + 1121 + 1122 + 1127 + 1128 + 1131 + 1132 + 1133 + 1135 + 1136 + 1137 + 1140 + 1141 + 1142 + 1143 + 1144 + 1153 + 1154 + 1155 + 1156 + 1157 + 1160 + 1161 + 1165 + 1166 + 1167 + 1168 + 1172 + 1173 + 1174 + 1182 + 1186 + 1189 + 1190 + 1191 + 1194 + 1195 + 1196 + 1197 + 1199 + 1200 + 1201 + 1202 + 1203 + 1205 + 1206 + 1213 + 1214 + 1215 + 1218 + 1219 + 1220 + 1223 + 1226 + 1230 + 1231 + 1232 + 1234 + 1236 + 1237 + 1238 + 1239 + 1242 + 1243 + 1245 + 1248 + 1251 + 1257 + 1260 + 1261 + 1263 + 1265 + 1267 + 1269 + 1271 + 1273 + 1274 + 1275 + 1276 + 1280 + 1281 + 1283 + 1285 + 1291 + 1292 + 1293 + 1295 + 1296 + 1300 + 1301 + 1302 + 1303 + 1304 + 1306 + 1309 + 1311 + 1315 + 1316 + 1318 + 1320 + 1322 + 1325 + 1327 + 1330 + 1331 + 1335 + 1336 + 1340 + 1341 + 1343 + 1344 + 1345 + 1346 + 1347 + 1351 + 1353 + 1355 + 1359 + 1361 + 1364 + 1366 + 1367 + 1372 + 1373 + 1374 + 1375 + 1377 + 1379 + 1380 + 1383 + 1388 + 1389 + 1390 + 1391 + 1392 + 1394 + 1395 + 1396 + 1398 + 1399 + 1401 + 1406 + 1410 + 1415 + 1418 + 1420 + 1421 + 1422 + 1423 + 1424 + 1427 + 1429 + 1430 + 1431 + 1432 + 1433 + 1435 + 1437 + 1440 + 1441 + 1442 + 1447 + 1451 + 1453 + 1454 + 1456 + 1459 + 1461 + 1462 + 1463 + 1464 + 1466 + 1467 + 1469 + 1470 + 1474 + 1478 + 1479 + 1481 + 1485 + 1487 + 1488 + 1489 + 1493 + 1495 + 1496 + 1497 + 1504 + 1505 + 1507 + 1508 + 1509 + 1510 + 1511 + 1512 + 1513 + 1514 + 1516 + 1519 + 1522 + 1524 + 1527 + 1528 + 1530 + 1533 + 1534 + 1535 + 1537 + 1540 + 1541 + 1545 + 1546 + 1547 + 1549 + 1550 + 1556 + 1557 + 1561 + 1562 + 1563 + 1564 + 1565 + 1566 + 1567 + 1568 + 1570 + 1573 + 1574 + 1575 + 1577 + 1581 + 1584 + 1587 + 1589 + 1590 + 1591 + 1592 + 1593 + 1594 + 1597 + 1600 + 1601 + 1605 + 1606 + 1607 + 1608 + 1609 + 1610 + 1612 + 1616 + 1617 + 1619 + 1620 + 1624 + 1625 + 1626 + 1630 + 1633 + 1634 + 1635 + 1637 + 1640 + 1642 + 1643 + 1647 + 1648 + 1649 + 1650 + 1653 + 1654 + 1657 + 1659 + 1660 + 1662 + 1664 + 1665 + 1668 + 1672 + 1673 + 1675 + 1678 + 1680 + 1681 + 1682 + 1685 + 1686 + 1688 + 1689 + 1691 + 1692 + 1693 + 1697 + 1702 + 1703 + 1705 + 1708 + 1709 + 1710 + 1712 + 1714 + 1715 + 1717 + 1718 + 1721 + 1722 + 1724 + 1725 + 1726 + 1729 + 1732 + 1735 + 1738 + 1740 + 1741 + 1742 + 1745 + 1747 + 1748 + 1749 + 1750 + 1753 + 1755 + 1756 + 1759 + 1760 + 1761 + 1762 + 1766 + 1768 + 1771 + 1773 + 1775 + 1776 + 1779 + 1780 + 1782 + 1783 + 1784 + 1785 + 1786 + 1789 + 1791 + 1793 + 1794 + 1798 + 1800 + 1801 + 1805 + 1806 + 1807 + 1809 + 1811 + 1813 + 1815 + 1817 + 1818 + 1820 + 1821 + 1822 + 1828 + 1830 + 1831 + 1832 + 1835 + 1836 + 1838 + 1839 + 1842 + 1843 + 1844 + 1845 + 1848 + 1850 + 1851 + 1855 + 1856 + 1857 + 1858 + 1860 + 1862 + 1863 + 1865 + 1866 + 1868 + 1870 + 1871 + 1872 + 1873 + 1876 + 1877 + 1880 + 1882 + 1883 + 1884 + 1885 + 1886 + 1888 + 1890 + 1891 + 1893 + 1898 + 1899 + 1901 + 1903 + 1904 + 1905 + 1908 + 1909 + 1911 + 1914 + 1915 + 1918 + 1919 + 1920 + 1922 + 1924 + 1926 + 1930 + 1931 + 1934 + 1935 + 1936 + 1937 + 1939 + 1942 + 1943 + 1948 + 1949 + 1950 + 1952 + 1953 + 1957 + 1960 + 1962 + 1963 + 1964 + 1968 + 1969 + 1970 + 1972 + 1974 + 1980 + 1981 + 1983 + 1985 + 1987 + 1990 + 1991 + 1992 + 1993 + 1995 + 1996 + 2003 + 2005 + 2006 + 2007 + 2008 + 2009 + 2010 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + 257 + 258 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 269 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 278 + 279 + 280 + 281 + 282 + 283 + 284 + 285 + 286 + 287 + 288 + 289 + 290 + 291 + 292 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 303 + 304 + 305 + 306 + 307 + 308 + 309 + 310 + 311 + 312 + 313 + 314 + 315 + 316 + 317 + 318 + 319 + 320 + 321 + 322 + 323 + 324 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 332 + 333 + 334 + 335 + 336 + 337 + 338 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 347 + 348 + 349 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 359 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + 369 + 370 + 371 + 372 + 373 + 374 + 375 + 376 + 377 + 378 + 379 + 380 + 381 + 382 + 383 + 384 + 385 + 386 + 387 + 388 + 389 + 390 + 391 + 392 + 393 + 394 + 395 + 396 + 397 + 398 + 399 + 400 + 401 + 402 + 403 + 404 + 405 + 406 + 407 + 408 + 409 + 410 + 411 + 412 + 413 + 414 + 415 + 416 + 417 + 418 + 419 + 420 + 421 + 422 + 423 + 424 + 425 + 426 + 427 + 428 + 429 + 430 + 431 + 432 + 433 + 434 + 435 + 436 + 437 + 438 + 439 + 440 + 441 + 442 + 443 + 444 + 445 + 446 + 447 + 448 + 449 + 450 + 451 + 452 + 453 + 454 + 455 + 456 + 457 + 458 + 459 + 460 + 461 + 462 + 463 + 464 + 465 + 466 + 467 + 468 + 469 + 470 + 471 + 472 + 473 + 474 + 475 + 476 + 477 + 478 + 479 + 480 + 481 + 482 + 483 + 484 + 485 + 486 + 487 + 488 + 489 + 490 + 491 + 492 + 493 + 494 + 495 + 496 + 497 + 498 + 499 + 500 + 501 + 502 + 503 + 504 + 505 + 506 + 507 + 508 + 509 + 510 + 511 + 512 + 513 + 514 + 515 + 516 + 517 + 518 + 519 + 520 + 521 + 522 + 523 + 524 + 525 + 526 + 527 + 528 + 529 + 530 + 531 + 532 + 533 + 534 + 535 + 536 + 537 + 538 + 539 + 540 + 541 + 542 + 543 + 544 + 545 + 546 + 547 + 548 + 549 + 550 + 551 + 552 + 553 + 554 + 555 + 556 + 557 + 558 + 559 + 560 + 561 + 562 + 563 + 564 + 565 + 566 + 567 + 568 + 569 + 570 + 571 + 572 + 573 + 574 + 575 + 576 + 577 + 578 + 579 + 580 + 581 + 582 + 583 + 584 + 585 + 586 + 587 + 588 + 589 + 590 + 591 + 592 + 593 + 594 + 595 + 596 + 597 + 598 + 599 + 600 + 601 + 602 + 603 + 604 + 605 + 606 + 607 + 608 + 609 + 610 + 611 + 612 + 613 + 614 + 615 + 616 + 617 + 618 + 619 + 620 + 621 + 622 + 623 + 624 + 625 + 626 + 627 + 628 + 629 + 630 + 631 + 632 + 633 + 634 + 635 + 636 + 637 + 638 + 639 + 640 + 641 + 642 + 643 + 644 + 645 + 646 + 647 + 648 + 649 + 650 + 651 + 652 + 653 + 654 + 655 + 656 + 657 + 658 + 659 + 660 + 661 + 662 + 663 + 664 + 665 + 666 + 667 + 668 + 669 + 670 + 671 + 672 + 673 + 674 + 675 + 676 + 677 + 678 + 679 + 680 + 681 + 682 + 683 + 684 + 685 + 686 + 687 + 688 + 689 + 690 + 691 + 692 + 693 + 694 + 695 + 696 + 697 + 698 + 699 + 700 + 701 + 702 + 703 + 704 + 705 + 706 + 707 + 708 + 709 + 710 + 711 + 712 + 713 + 714 + 715 + 716 + 717 + 718 + 719 + 720 + 721 + 722 + 723 + 724 + 725 + 726 + 727 + 728 + 729 + 730 + 731 + 732 + 733 + 734 + 735 + 736 + 737 + 738 + 739 + 740 + 741 + 742 + 743 + 744 + 745 + 746 + 747 + 748 + 749 + 750 + 751 + 752 + 753 + 754 + 755 + 756 + 757 + 758 + 759 + 760 + 761 + 762 + 763 + 764 + 765 + 766 + 767 + 768 + 769 + 770 + 771 + 772 + 773 + 774 + 775 + 776 + 777 + 778 + 779 + 780 + 781 + 782 + 783 + 784 + 785 + 786 + 787 + 788 + 789 + 790 + 791 + 792 + 793 + 794 + 795 + 796 + 797 + 798 + 799 + 800 + 801 + 802 + 803 + 804 + 805 + 806 + 807 + 808 + 809 + 810 + 811 + 812 + 813 + 814 + 815 + 816 + 817 + 818 + 819 + 820 + 821 + 822 + 823 + 824 + 825 + 826 + 827 + 828 + 829 + 830 + 831 + 832 + 833 + 834 + 835 + 836 + 837 + 838 + 839 + 840 + 841 + 842 + 843 + 844 + 845 + 846 + 847 + 848 + 849 + 850 + 851 + 852 + 853 + 854 + 855 + 856 + 857 + 858 + 859 + 860 + 861 + 862 + 863 + 864 + 865 + 866 + 867 + 868 + 869 + 870 + 871 + 872 + 873 + 874 + 875 + 876 + 877 + 878 + 879 + 880 + 881 + 882 + 883 + 884 + 885 + 886 + 887 + 888 + 889 + 890 + 891 + 892 + 893 + 894 + 895 + 896 + 897 + 898 + 899 + 900 + 901 + 902 + 903 + 904 + 905 + 906 + 907 + 908 + 909 + 910 + 911 + 912 + 913 + 914 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto1 // Group Displacement Auto1 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + 257 + 258 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 269 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 278 + 279 + 280 + 281 + 282 + 283 + 284 + 285 + 286 + 287 + 288 + 289 + 290 + 291 + 292 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 303 + 304 + 305 + 306 + 307 + 308 + 309 + 310 + 311 + 312 + 313 + 314 + 315 + 316 + 317 + 318 + 319 + 320 + 321 + 322 + 323 + 324 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 332 + 333 + 334 + 335 + 336 + 337 + 338 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 347 + 348 + 349 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 359 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + 369 + 370 + 371 + 372 + 373 + 374 + 375 + 376 + 377 + 378 + 379 + 380 + 381 + 382 + 383 + 384 + 385 + 386 + 387 + 388 + 389 + 390 + 391 + 392 + 393 + 394 + 395 + 396 + 397 + 398 + 399 + 400 + 401 + 402 + 403 + 404 + 405 + 406 + 407 + 408 + 409 + 410 + 411 + 412 + 413 + 414 + 415 + 416 + 417 + 418 + 419 + 420 + 421 + 422 + 423 + 424 + 425 + 426 + 427 + 428 + 429 + 430 + 431 + 432 + 433 + 434 + 435 + 436 + 437 + 438 + 439 + 440 + 441 + 442 + 443 + 444 + 445 + 446 + 447 + 448 + 449 + 450 + 451 + 452 + 453 + 454 + 455 + 456 + 457 + 458 + 459 + 460 + 461 + 462 + 463 + 464 + 465 + 466 + 467 + 468 + 469 + 470 + 471 + 472 + 473 + 474 + 475 + 476 + 477 + 478 + 479 + 480 + 481 + 482 + 483 + 484 + 485 + 486 + 487 + 488 + 489 + 490 + 491 + 492 + 493 + 494 + 495 + 496 + 497 + 498 + 499 + 500 + 501 + 502 + 503 + 504 + 505 + 506 + 507 + 508 + 509 + 510 + 511 + 512 + 513 + 514 + 515 + 516 + 517 + 518 + 519 + 520 + 521 + 522 + 523 + 524 + 525 + 526 + 527 + 528 + 529 + 530 + 531 + 532 + 533 + 534 + 535 + 536 + 537 + 538 + 539 + 540 + 541 + 542 + 543 + 544 + 545 + 546 + 547 + 548 + 549 + 550 + 551 + 552 + 553 + 554 + 555 + 556 + 557 + 558 + 559 + 560 + 561 + 562 + 563 + 564 + 565 + 566 + 567 + 568 + 569 + 570 + 571 + 572 + 573 + 574 + 575 + 576 + 577 + 578 + 579 + 580 + 581 + 582 + 583 + 584 + 585 + 586 + 587 + 588 + 589 + 590 + 591 + 592 + 593 + 594 + 595 + 596 + 597 + 598 + 599 + 600 + 601 + 602 + 603 + 604 + 605 + 606 + 607 + 608 + 609 + 610 + 611 + 612 + 613 + 614 + 615 + 616 + 617 + 618 + 619 + 620 + 621 + 622 + 623 + 624 + 625 + 626 + 627 + 628 + 629 + 630 + 631 + 632 + 633 + 634 + 635 + 636 + 637 + 638 + 639 + 640 + 641 + 642 + 643 + 644 + 645 + 646 + 647 + 648 + 649 + 650 + 651 + 652 + 653 + 654 + 655 + 656 + 657 + 658 + 659 + 660 + 661 + 662 + 663 + 664 + 665 + 666 + 667 + 668 + 669 + 670 + 671 + 672 + 673 + 674 + 675 + 676 + 677 + 678 + 679 + 680 + 681 + 682 + 683 + 684 + 685 + 686 + 687 + 688 + 689 + 690 + 691 + 692 + 693 + 694 + 695 + 696 + 697 + 698 + 699 + 700 + 701 + 702 + 703 + 704 + 705 + 706 + 707 + 708 + 709 + 710 + 711 + 712 + 713 + 714 + 715 + 716 + 717 + 718 + 719 + 720 + 721 + 722 + 723 + 724 + 725 + 726 + 727 + 728 + 729 + 730 + 731 + 732 + 733 + 734 + 735 + 736 + 737 + 738 + 739 + 740 + 741 + 742 + 743 + 744 + 745 + 746 + 747 + 748 + 749 + 750 + 751 + 752 + 753 + 754 + 755 + 756 + 757 + 758 + 759 + 760 + 761 + 762 + 763 + 764 + 765 + 766 + 767 + 768 + 769 + 770 + 771 + 772 + 773 + 774 + 775 + 776 + 777 + 778 + 779 + 780 + 781 + 782 + 783 + 784 + 785 + 786 + 787 + 788 + 789 + 790 + 791 + 792 + 793 + 794 + 795 + 796 + 797 + 798 + 799 + 800 + 801 + 802 + 803 + 804 + 805 + 806 + 807 + 808 + 809 + 810 + 811 + 812 + 813 + 814 + 815 + 816 + 817 + 818 + 819 + 820 + 821 + 822 + 823 + 824 + 825 + 826 + 827 + 828 + 829 + 830 + 831 + 832 + 833 + 834 + 835 + 836 + 837 + 838 + 839 + 840 + 841 + 842 + 843 + 844 + 845 + 846 + 847 + 848 + 849 + 850 + 851 + 852 + 853 + 854 + 855 + 856 + 857 + 858 + 859 + 860 + 861 + 862 + 863 + 864 + 865 + 866 + 867 + 868 + 869 + 870 + 871 + 872 + 873 + 874 + 875 + 876 + 877 + 878 + 879 + 880 + 881 + 882 + 883 + 884 + 885 + 886 + 887 + 888 + 889 + 890 + 891 + 892 + 893 + 894 + 895 + 896 + 897 + 898 + 899 + 900 + 901 + 902 + 903 + 904 + 905 + 906 + 907 + 908 + 909 + 910 + 911 + 912 + 913 + 914 + 915 + 916 + 917 + 918 + 919 + 920 + 921 + 922 + 923 + 924 + 925 + 926 + 927 + 928 + 929 + 930 + 931 + 932 + 933 + 934 + 935 + 936 + 937 + 938 + 939 + 940 + 941 + 942 + 943 + 944 + 945 + 946 + 947 + 948 + 949 + 950 + 951 + 952 + 953 + 954 + 955 + 956 + 957 + 958 + 959 + 960 + 961 + 962 + 963 + 964 + 965 + 966 + 967 + 968 + 969 + 970 + 971 + 972 + 973 + 974 + 975 + 976 + 977 + 978 + 979 + 980 + 981 + 982 + 983 + 984 + 985 + 986 + 987 + 988 + 989 + 990 + 991 + 992 + 993 + 994 + 995 + 996 + 997 + 998 + 999 + 1000 + 1001 + 1002 + 1003 + 1004 + 1005 + 1006 + 1007 + 1008 + 1009 + 1010 + 1011 + 1012 + 1013 + 1014 + 1015 + 1016 + 1017 + 1018 + 1019 + 1020 + 1021 + 1022 + 1023 + 1024 + 1025 + 1026 + 1027 + 1028 + 1029 + 1030 + 1031 + 1032 + 1033 + 1034 + 1035 + 1036 + 1037 + 1038 + 1039 + 1040 + 1041 + 1042 + 1043 + 1044 + 1045 + 1046 + 1047 + 1048 + 1049 + 1050 + 1051 + 1052 + 1053 + 1054 + 1055 + 1056 + 1057 + 1058 + 1059 + 1060 + 1061 + 1062 + 1063 + 1064 + 1065 + 1066 + 1067 + 1068 + 1069 + 1070 + 1071 + 1072 + 1073 + 1074 + 1075 + 1076 + 1077 + 1078 + 1079 + 1080 + 1081 + 1082 + 1083 + 1084 + 1085 + 1086 + 1087 + 1088 + 1089 + 1090 + 1091 + 1092 + 1093 + 1094 + 1095 + 1096 + 1097 + 1098 + 1099 + 1100 + 1101 + 1102 + 1103 + 1104 + 1105 + 1106 + 1107 + 1108 + 1109 + 1110 + 1111 + 1112 + 1113 + 1114 + 1115 + 1116 + 1117 + 1118 + 1119 + 1120 + 1121 + 1122 + 1123 + 1124 + 1125 + 1126 + 1127 + 1128 + 1129 + 1130 + 1131 + 1132 + 1133 + 1134 + 1135 + 1136 + 1137 + 1138 + 1139 + 1140 + 1141 + 1142 + 1143 + 1144 + 1145 + 1146 + 1147 + 1148 + 1149 + 1150 + 1151 + 1152 + 1153 + 1154 + 1155 + 1156 + 1157 + 1158 + 1159 + 1160 + 1161 + 1162 + 1163 + 1164 + 1165 + 1166 + 1167 + 1168 + 1169 + 1170 + 1171 + 1172 + 1173 + 1174 + 1175 + 1176 + 1177 + 1178 + 1179 + 1180 + 1181 + 1182 + 1183 + 1184 + 1185 + 1186 + 1187 + 1188 + 1189 + 1190 + 1191 + 1192 + 1193 + 1194 + 1195 + 1196 + 1197 + 1198 + 1199 + 1200 + 1201 + 1202 + 1203 + 1204 + 1205 + 1206 + 1207 + 1208 + 1209 + 1210 + 1211 + 1212 + 1213 + 1214 + 1215 + 1216 + 1217 + 1218 + 1219 + 1220 + 1221 + 1222 + 1223 + 1224 + 1225 + 1226 + 1227 + 1228 + 1229 + 1230 + 1231 + 1232 + 1233 + 1234 + 1235 + 1236 + 1237 + 1238 + 1239 + 1240 + 1241 + 1242 + 1243 + 1244 + 1245 + 1246 + 1247 + 1248 + 1249 + 1250 + 1251 + 1252 + 1253 + 1254 + 1255 + 1256 + 1257 + 1258 + 1259 + 1260 + 1261 + 1262 + 1263 + 1264 + 1265 + 1266 + 1267 + 1268 + 1269 + 1270 + 1271 + 1272 + 1273 + 1274 + 1275 + 1276 + 1277 + 1278 + 1279 + 1280 + 1281 + 1282 + 1283 + 1284 + 1285 + 1286 + 1287 + 1288 + 1289 + 1290 + 1291 + 1292 + 1293 + 1294 + 1295 + 1296 + 1297 + 1298 + 1299 + 1300 + 1301 + 1302 + 1303 + 1304 + 1305 + 1306 + 1307 + 1308 + 1309 + 1310 + 1311 + 1312 + 1313 + 1314 + 1315 + 1316 + 1317 + 1318 + 1319 + 1320 + 1321 + 1322 + 1323 + 1324 + 1325 + 1326 + 1327 + 1328 + 1329 + 1330 + 1331 + 1332 + 1333 + 1334 + 1335 + 1336 + 1337 + 1338 + 1339 + 1340 + 1341 + 1342 + 1343 + 1344 + 1345 + 1346 + 1347 + 1348 + 1349 + 1350 + 1351 + 1352 + 1353 + 1354 + 1355 + 1356 + 1357 + 1358 + 1359 + 1360 + 1361 + 1362 + 1363 + 1364 + 1365 + 1366 + 1367 + 1368 + 1369 + 1370 + 1371 + 1372 + 1373 + 1374 + 1375 + 1376 + 1377 + 1378 + 1379 + 1380 + 1381 + 1382 + 1383 + 1384 + 1385 + 1386 + 1387 + 1388 + 1389 + 1390 + 1391 + 1392 + 1393 + 1394 + 1395 + 1396 + 1397 + 1398 + 1399 + 1400 + 1401 + 1402 + 1403 + 1404 + 1405 + 1406 + 1407 + 1408 + 1409 + 1410 + 1411 + 1412 + 1413 + 1414 + 1415 + 1416 + 1417 + 1418 + 1419 + 1420 + 1421 + 1422 + 1423 + 1424 + 1425 + 1426 + 1427 + 1428 + 1429 + 1430 + 1431 + 1432 + 1433 + 1434 + 1435 + 1436 + 1437 + 1438 + 1439 + 1440 + 1441 + 1442 + 1443 + 1444 + 1445 + 1446 + 1447 + 1448 + 1449 + 1450 + 1451 + 1452 + 1453 + 1454 + 1455 + 1456 + 1457 + 1458 + 1459 + 1460 + 1461 + 1462 + 1463 + 1464 + 1465 + 1466 + 1467 + 1468 + 1469 + 1470 + 1471 + 1472 + 1473 + 1474 + 1475 + 1476 + 1477 + 1478 + 1479 + 1480 + 1481 + 1482 + 1483 + 1484 + 1485 + 1486 + 1487 + 1488 + 1489 + 1490 + 1491 + 1492 + 1493 + 1494 + 1495 + 1496 + 1497 + 1498 + 1499 + 1500 + 1501 + 1502 + 1503 + 1504 + 1505 + 1506 + 1507 + 1508 + 1509 + 1510 + 1511 + 1512 + 1513 + 1514 + 1515 + 1516 + 1517 + 1518 + 1519 + 1520 + 1521 + 1522 + 1523 + 1524 + 1525 + 1526 + 1527 + 1528 + 1529 + 1530 + 1531 + 1532 + 1533 + 1534 + 1535 + 1536 + 1537 + 1538 + 1539 + 1540 + 1541 + 1542 + 1543 + 1544 + 1545 + 1546 + 1547 + 1548 + 1549 + 1550 + 1551 + 1552 + 1553 + 1554 + 1555 + 1556 + 1557 + 1558 + 1559 + 1560 + 1561 + 1562 + 1563 + 1564 + 1565 + 1566 + 1567 + 1568 + 1569 + 1570 + 1571 + 1572 + 1573 + 1574 + 1575 + 1576 + 1577 + 1578 + 1579 + 1580 + 1581 + 1582 + 1583 + 1584 + 1585 + 1586 + 1587 + 1588 + 1589 + 1590 + 1591 + 1592 + 1593 + 1594 + 1595 + 1596 + 1597 + 1598 + 1599 + 1600 + 1601 + 1602 + 1603 + 1604 + 1605 + 1606 + 1607 + 1608 + 1609 + 1610 + 1611 + 1612 + 1613 + 1614 + 1615 + 1616 + 1617 + 1618 + 1619 + 1620 + 1621 + 1622 + 1623 + 1624 + 1625 + 1626 + 1627 + 1628 + 1629 + 1630 + 1631 + 1632 + 1633 + 1634 + 1635 + 1636 + 1637 + 1638 + 1639 + 1640 + 1641 + 1642 + 1643 + 1644 + 1645 + 1646 + 1647 + 1648 + 1649 + 1650 + 1651 + 1652 + 1653 + 1654 + 1655 + 1656 + 1657 + 1658 + 1659 + 1660 + 1661 + 1662 + 1663 + 1664 + 1665 + 1666 + 1667 + 1668 + 1669 + 1670 + 1671 + 1672 + 1673 + 1674 + 1675 + 1676 + 1677 + 1678 + 1679 + 1680 + 1681 + 1682 + 1683 + 1684 + 1685 + 1686 + 1687 + 1688 + 1689 + 1690 + 1691 + 1692 + 1693 + 1694 + 1695 + 1696 + 1697 + 1698 + 1699 + 1700 + 1701 + 1702 + 1703 + 1704 + 1705 + 1706 + 1707 + 1708 + 1709 + 1710 + 1711 + 1712 + 1713 + 1714 + 1715 + 1716 + 1717 + 1718 + 1719 + 1720 + 1721 + 1722 + 1723 + 1724 + 1725 + 1726 + 1727 + 1728 + 1729 + 1730 + 1731 + 1732 + 1733 + 1734 + 1735 + 1736 + 1737 + 1738 + 1739 + 1740 + 1741 + 1742 + 1743 + 1744 + 1745 + 1746 + 1747 + 1748 + 1749 + 1750 + 1751 + 1752 + 1753 + 1754 + 1755 + 1756 + 1757 + 1758 + 1759 + 1760 + 1761 + 1762 + 1763 + 1764 + 1765 + 1766 + 1767 + 1768 + 1769 + 1770 + 1771 + 1772 + 1773 + 1774 + 1775 + 1776 + 1777 + 1778 + 1779 + 1780 + 1781 + 1782 + 1783 + 1784 + 1785 + 1786 + 1787 + 1788 + 1789 + 1790 + 1791 + 1792 + 1793 + 1794 + 1795 + 1796 + 1797 + 1798 + 1799 + 1800 + 1801 + 1802 + 1803 + 1804 + 1805 + 1806 + 1807 + 1808 + 1809 + 1810 + 1811 + 1812 + 1813 + 1814 + 1815 + 1816 + 1817 + 1818 + 1819 + 1820 + 1821 + 1822 + 1823 + 1824 + 1825 + 1826 + 1827 + 1828 + 1829 + 1830 + 1831 + 1832 + 1833 + 1834 + 1835 + 1836 + 1837 + 1838 + 1839 + 1840 + 1841 + 1842 + 1843 + 1844 + 1845 + 1846 + 1847 + 1848 + 1849 + 1850 + 1851 + 1852 + 1853 + 1854 + 1855 + 1856 + 1857 + 1858 + 1859 + 1860 + 1861 + 1862 + 1863 + 1864 + 1865 + 1866 + 1867 + 1868 + 1869 + 1870 + 1871 + 1872 + 1873 + 1874 + 1875 + 1876 + 1877 + 1878 + 1879 + 1880 + 1881 + 1882 + 1883 + 1884 + 1885 + 1886 + 1887 + 1888 + 1889 + 1890 + 1891 + 1892 + 1893 + 1894 + 1895 + 1896 + 1897 + 1898 + 1899 + 1900 + 1901 + 1902 + 1903 + 1904 + 1905 + 1906 + 1907 + 1908 + 1909 + 1910 + 1911 + 1912 + 1913 + 1914 + 1915 + 1916 + 1917 + 1918 + 1919 + 1920 + 1921 + 1922 + 1923 + 1924 + 1925 + 1926 + 1927 + 1928 + 1929 + 1930 + 1931 + 1932 + 1933 + 1934 + 1935 + 1936 + 1937 + 1938 + 1939 + 1940 + 1941 + 1942 + 1943 + 1944 + 1945 + 1946 + 1947 + 1948 + 1949 + 1950 + 1951 + 1952 + 1953 + 1954 + 1955 + 1956 + 1957 + 1958 + 1959 + 1960 + 1961 + 1962 + 1963 + 1964 + 1965 + 1966 + 1967 + 1968 + 1969 + 1970 + 1971 + 1972 + 1973 + 1974 + 1975 + 1976 + 1977 + 1978 + 1979 + 1980 + 1981 + 1982 + 1983 + 1984 + 1985 + 1986 + 1987 + 1988 + 1989 + 1990 + 1991 + 1992 + 1993 + 1994 + 1995 + 1996 + 1997 + 1998 + 1999 + 2000 + 2001 + 2002 + 2003 + 2004 + 2005 + 2006 + 2007 + 2008 + 2009 + 2010 + 2011 + 2012 + 2013 + 2014 + 2015 + 2016 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto2 // Group Displacement Auto2 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + 257 + 258 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 269 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 278 + 279 + 280 + 281 + 282 + 283 + 284 + 285 + 286 + 287 + 288 + 289 + 290 + 291 + 292 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 303 + 304 + 305 + 306 + 307 + 308 + 309 + 310 + 311 + 312 + 313 + 314 + 315 + 316 + 317 + 318 + 319 + 320 + 321 + 322 + 323 + 324 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 332 + 333 + 334 + 335 + 336 + 337 + 338 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 347 + 348 + 349 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 359 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + 369 + 370 + 371 + 372 + 373 + 374 + 375 + 376 + 377 + 378 + 379 + 380 + 381 + 382 + 383 + 384 + 385 + 386 + 387 + 388 + 389 + 390 + 391 + 392 + 393 + 394 + 395 + 396 + 397 + 398 + 399 + 400 + 401 + 402 + 403 + 404 + 405 + 406 + 407 + 408 + 409 + 410 + 411 + 412 + 413 + 414 + 415 + 416 + 417 + 418 + 419 + 420 + 421 + 422 + 423 + 424 + 425 + 426 + 427 + 428 + 429 + 430 + 431 + 432 + 433 + 434 + 435 + 436 + 437 + 438 + 439 + 440 + 441 + 442 + 443 + 444 + 445 + 446 + 447 + 448 + 449 + 450 + 451 + 452 + 453 + 454 + 455 + 456 + 457 + 458 + 459 + 460 + 461 + 462 + 463 + 464 + 465 + 466 + 467 + 468 + 469 + 470 + 471 + 472 + 473 + 474 + 475 + 476 + 477 + 478 + 479 + 480 + 481 + 482 + 483 + 484 + 485 + 486 + 487 + 488 + 489 + 490 + 491 + 492 + 493 + 494 + 495 + 496 + 497 + 498 + 499 + 500 + 501 + 502 + 503 + 504 + 505 + 506 + 507 + 508 + 509 + 510 + 511 + 512 + 513 + 514 + 515 + 516 + 517 + 518 + 519 + 520 + 521 + 522 + 523 + 524 + 525 + 526 + 527 + 528 + 529 + 530 + 531 + 532 + 533 + 534 + 535 + 536 + 537 + 538 + 539 + 540 + 541 + 542 + 543 + 544 + 545 + 546 + 547 + 548 + 549 + 550 + 551 + 552 + 553 + 554 + 555 + 556 + 557 + 558 + 559 + 560 + 561 + 562 + 563 + 564 + 565 + 566 + 567 + 568 + 569 + 570 + 571 + 572 + 573 + 574 + 575 + 576 + 577 + 578 + 579 + 580 + 581 + 582 + 583 + 584 + 585 + 586 + 587 + 588 + 589 + 590 + 591 + 592 + 593 + 594 + 595 + 596 + 597 + 598 + 599 + 600 + 601 + 602 + 603 + 604 + 605 + 606 + 607 + 608 + 609 + 610 + 611 + 612 + 613 + 614 + 615 + 616 + 617 + 618 + 619 + 620 + 621 + 622 + 623 + 624 + 625 + 626 + 627 + 628 + 629 + 630 + 631 + 632 + 633 + 634 + 635 + 636 + 637 + 638 + 639 + 640 + 641 + 642 + 643 + 644 + 645 + 646 + 647 + 648 + 649 + 650 + 651 + 652 + 653 + 654 + 655 + 656 + 657 + 658 + 659 + 660 + 661 + 662 + 663 + 664 + 665 + 666 + 667 + 668 + 669 + 670 + 671 + 672 + 673 + 674 + 675 + 676 + 677 + 678 + 679 + 680 + 681 + 682 + 683 + 684 + 685 + 686 + 687 + 688 + 689 + 690 + 691 + 692 + 693 + 694 + 695 + 696 + 697 + 698 + 699 + 700 + 701 + 702 + 703 + 704 + 705 + 706 + 707 + 708 + 709 + 710 + 711 + 712 + 713 + 714 + 715 + 716 + 717 + 718 + 719 + 720 + 721 + 722 + 723 + 724 + 725 + 726 + 727 + 728 + 729 + 730 + 731 + 732 + 733 + 734 + 735 + 736 + 737 + 738 + 739 + 740 + 741 + 742 + 743 + 744 + 745 + 746 + 747 + 748 + 749 + 750 + 751 + 752 + 753 + 754 + 755 + 756 + 757 + 758 + 759 + 760 + 761 + 762 + 763 + 764 + 765 + 766 + 767 + 768 + 769 + 770 + 771 + 772 + 773 + 774 + 775 + 776 + 777 + 778 + 779 + 780 + 781 + 782 + 783 + 784 + 785 + 786 + 787 + 788 + 789 + 790 + 791 + 792 + 793 + 794 + 795 + 796 + 797 + 798 + 799 + 800 + 801 + 802 + 803 + 804 + 805 + 806 + 807 + 808 + 809 + 810 + 811 + 812 + 813 + 814 + 815 + 816 + 817 + 818 + 819 + 820 + 821 + 822 + 823 + 824 + 825 + 826 + 827 + 828 + 829 + 830 + 831 + 832 + 833 + 834 + 835 + 836 + 837 + 838 + 839 + 840 + 841 + 842 + 843 + 844 + 845 + 846 + 847 + 848 + 849 + 850 + 851 + 852 + 853 + 854 + 855 + 856 + 857 + 858 + 859 + 860 + 861 + 862 + 863 + 864 + 865 + 866 + 867 + 868 + 869 + 870 + 871 + 872 + 873 + 874 + 875 + 876 + 877 + 878 + 879 + 880 + 881 + 882 + 883 + 884 + 885 + 886 + 887 + 888 + 889 + 890 + 891 + 892 + 893 + 894 + 895 + 896 + 897 + 898 + 899 + 900 + 901 + 902 + 903 + 904 + 905 + 906 + 907 + 908 + 909 + 910 + 911 + 912 + 913 + 914 + 915 + 916 + 917 + 918 + 919 + 920 + 921 + 922 + 923 + 924 + 925 + 926 + 927 + 928 + 929 + 930 + 931 + 932 + 933 + 934 + 935 + 936 + 937 + 938 + 939 + 940 + 941 + 942 + 943 + 944 + 945 + 946 + 947 + 948 + 949 + 950 + 951 + 952 + 953 + 954 + 955 + 956 + 957 + 958 + 959 + 960 + 961 + 962 + 963 + 964 + 965 + 966 + 967 + 968 + 969 + 970 + 971 + 972 + 973 + 974 + 975 + 976 + 977 + 978 + 979 + 980 + 981 + 982 + 983 + 984 + 985 + 986 + 987 + 988 + 989 + 990 + 991 + 992 + 993 + 994 + 995 + 996 + 997 + 998 + 999 + 1000 + 1001 + 1002 + 1003 + 1004 + 1005 + 1006 + 1007 + 1008 + 1009 + 1010 + 1011 + 1012 + 1013 + 1014 + 1015 + 1016 + 1017 + 1018 + 1019 + 1020 + 1021 + 1022 + 1023 + 1024 + 1025 + 1026 + 1027 + 1028 + 1029 + 1030 + 1031 + 1032 + 1033 + 1034 + 1035 + 1036 + 1037 + 1038 + 1039 + 1040 + 1041 + 1042 + 1043 + 1044 + 1045 + 1046 + 1047 + 1048 + 1049 + 1050 + 1051 + 1052 + 1053 + 1054 + 1055 + 1056 + 1057 + 1058 + 1059 + 1060 + 1061 + 1062 + 1063 + 1064 + 1065 + 1066 + 1067 + 1068 + 1069 + 1070 + 1071 + 1072 + 1073 + 1074 + 1075 + 1076 + 1077 + 1078 + 1079 + 1080 + 1081 + 1082 + 1083 + 1084 + 1085 + 1086 + 1087 + 1088 + 1089 + 1090 + 1091 + 1092 + 1093 + 1094 + 1095 + 1096 + 1097 + 1098 + 1099 + 1100 + 1101 + 1102 + 1103 + 1104 + 1105 + 1106 + 1107 + 1108 + 1109 + 1110 + 1111 + 1112 + 1113 + 1114 + 1115 + 1116 + 1117 + 1118 + 1119 + 1120 + 1121 + 1122 + 1123 + 1124 + 1125 + 1126 + 1127 + 1128 + 1129 + 1130 + 1131 + 1132 + 1133 + 1134 + 1135 + 1136 + 1137 + 1138 + 1139 + 1140 + 1141 + 1142 + 1143 + 1144 + 1145 + 1146 + 1147 + 1148 + 1149 + 1150 + 1151 + 1152 + 1153 + 1154 + 1155 + 1156 + 1157 + 1158 + 1159 + 1160 + 1161 + 1162 + 1163 + 1164 + 1165 + 1166 + 1167 + 1168 + 1169 + 1170 + 1171 + 1172 + 1173 + 1174 + 1175 + 1176 + 1177 + 1178 + 1179 + 1180 + 1181 + 1182 + 1183 + 1184 + 1185 + 1186 + 1187 + 1188 + 1189 + 1190 + 1191 + 1192 + 1193 + 1194 + 1195 + 1196 + 1197 + 1198 + 1199 + 1200 + 1201 + 1202 + 1203 + 1204 + 1205 + 1206 + 1207 + 1208 + 1209 + 1210 + 1211 + 1212 + 1213 + 1214 + 1215 + 1216 + 1217 + 1218 + 1219 + 1220 + 1221 + 1222 + 1223 + 1224 + 1225 + 1226 + 1227 + 1228 + 1229 + 1230 + 1231 + 1232 + 1233 + 1234 + 1235 + 1236 + 1237 + 1238 + 1239 + 1240 + 1241 + 1242 + 1243 + 1244 + 1245 + 1246 + 1247 + 1248 + 1249 + 1250 + 1251 + 1252 + 1253 + 1254 + 1255 + 1256 + 1257 + 1258 + 1259 + 1260 + 1261 + 1262 + 1263 + 1264 + 1265 + 1266 + 1267 + 1268 + 1269 + 1270 + 1271 + 1272 + 1273 + 1274 + 1275 + 1276 + 1277 + 1278 + 1279 + 1280 + 1281 + 1282 + 1283 + 1284 + 1285 + 1286 + 1287 + 1288 + 1289 + 1290 + 1291 + 1292 + 1293 + 1294 + 1295 + 1296 + 1297 + 1298 + 1299 + 1300 + 1301 + 1302 + 1303 + 1304 + 1305 + 1306 + 1307 + 1308 + 1309 + 1310 + 1311 + 1312 + 1313 + 1314 + 1315 + 1316 + 1317 + 1318 + 1319 + 1320 + 1321 + 1322 + 1323 + 1324 + 1325 + 1326 + 1327 + 1328 + 1329 + 1330 + 1331 + 1332 + 1333 + 1334 + 1335 + 1336 + 1337 + 1338 + 1339 + 1340 + 1341 + 1342 + 1343 + 1344 + 1345 + 1346 + 1347 + 1348 + 1349 + 1350 + 1351 + 1352 + 1353 + 1354 + 1355 + 1356 + 1357 + 1358 + 1359 + 1360 + 1361 + 1362 + 1363 + 1364 + 1365 + 1366 + 1367 + 1368 + 1369 + 1370 + 1371 + 1372 + 1373 + 1374 + 1375 + 1376 + 1377 + 1378 + 1379 + 1380 + 1381 + 1382 + 1383 + 1384 + 1385 + 1386 + 1387 + 1388 + 1389 + 1390 + 1391 + 1392 + 1393 + 1394 + 1395 + 1396 + 1397 + 1398 + 1399 + 1400 + 1401 + 1402 + 1403 + 1404 + 1405 + 1406 + 1407 + 1408 + 1409 + 1410 + 1411 + 1412 + 1413 + 1414 + 1415 + 1416 + 1417 + 1418 + 1419 + 1420 + 1421 + 1422 + 1423 + 1424 + 1425 + 1426 + 1427 + 1428 + 1429 + 1430 + 1431 + 1432 + 1433 + 1434 + 1435 + 1436 + 1437 + 1438 + 1439 + 1440 + 1441 + 1442 + 1443 + 1444 + 1445 + 1446 + 1447 + 1448 + 1449 + 1450 + 1451 + 1452 + 1453 + 1454 + 1455 + 1456 + 1457 + 1458 + 1459 + 1460 + 1461 + 1462 + 1463 + 1464 + 1465 + 1466 + 1467 + 1468 + 1469 + 1470 + 1471 + 1472 + 1473 + 1474 + 1475 + 1476 + 1477 + 1478 + 1479 + 1480 + 1481 + 1482 + 1483 + 1484 + 1485 + 1486 + 1487 + 1488 + 1489 + 1490 + 1491 + 1492 + 1493 + 1494 + 1495 + 1496 + 1497 + 1498 + 1499 + 1500 + 1501 + 1502 + 1503 + 1504 + 1505 + 1506 + 1507 + 1508 + 1509 + 1510 + 1511 + 1512 + 1513 + 1514 + 1515 + 1516 + 1517 + 1518 + 1519 + 1520 + 1521 + 1522 + 1523 + 1524 + 1525 + 1526 + 1527 + 1528 + 1529 + 1530 + 1531 + 1532 + 1533 + 1534 + 1535 + 1536 + 1537 + 1538 + 1539 + 1540 + 1541 + 1542 + 1543 + 1544 + 1545 + 1546 + 1547 + 1548 + 1549 + 1550 + 1551 + 1552 + 1553 + 1554 + 1555 + 1556 + 1557 + 1558 + 1559 + 1560 + 1561 + 1562 + 1563 + 1564 + 1565 + 1566 + 1567 + 1568 + 1569 + 1570 + 1571 + 1572 + 1573 + 1574 + 1575 + 1576 + 1577 + 1578 + 1579 + 1580 + 1581 + 1582 + 1583 + 1584 + 1585 + 1586 + 1587 + 1588 + 1589 + 1590 + 1591 + 1592 + 1593 + 1594 + 1595 + 1596 + 1597 + 1598 + 1599 + 1600 + 1601 + 1602 + 1603 + 1604 + 1605 + 1606 + 1607 + 1608 + 1609 + 1610 + 1611 + 1612 + 1613 + 1614 + 1615 + 1616 + 1617 + 1618 + 1619 + 1620 + 1621 + 1622 + 1623 + 1624 + 1625 + 1626 + 1627 + 1628 + 1629 + 1630 + 1631 + 1632 + 1633 + 1634 + 1635 + 1636 + 1637 + 1638 + 1639 + 1640 + 1641 + 1642 + 1643 + 1644 + 1645 + 1646 + 1647 + 1648 + 1649 + 1650 + 1651 + 1652 + 1653 + 1654 + 1655 + 1656 + 1657 + 1658 + 1659 + 1660 + 1661 + 1662 + 1663 + 1664 + 1665 + 1666 + 1667 + 1668 + 1669 + 1670 + 1671 + 1672 + 1673 + 1674 + 1675 + 1676 + 1677 + 1678 + 1679 + 1680 + 1681 + 1682 + 1683 + 1684 + 1685 + 1686 + 1687 + 1688 + 1689 + 1690 + 1691 + 1692 + 1693 + 1694 + 1695 + 1696 + 1697 + 1698 + 1699 + 1700 + 1701 + 1702 + 1703 + 1704 + 1705 + 1706 + 1707 + 1708 + 1709 + 1710 + 1711 + 1712 + 1713 + 1714 + 1715 + 1716 + 1717 + 1718 + 1719 + 1720 + 1721 + 1722 + 1723 + 1724 + 1725 + 1726 + 1727 + 1728 + 1729 + 1730 + 1731 + 1732 + 1733 + 1734 + 1735 + 1736 + 1737 + 1738 + 1739 + 1740 + 1741 + 1742 + 1743 + 1744 + 1745 + 1746 + 1747 + 1748 + 1749 + 1750 + 1751 + 1752 + 1753 + 1754 + 1755 + 1756 + 1757 + 1758 + 1759 + 1760 + 1761 + 1762 + 1763 + 1764 + 1765 + 1766 + 1767 + 1768 + 1769 + 1770 + 1771 + 1772 + 1773 + 1774 + 1775 + 1776 + 1777 + 1778 + 1779 + 1780 + 1781 + 1782 + 1783 + 1784 + 1785 + 1786 + 1787 + 1788 + 1789 + 1790 + 1791 + 1792 + 1793 + 1794 + 1795 + 1796 + 1797 + 1798 + 1799 + 1800 + 1801 + 1802 + 1803 + 1804 + 1805 + 1806 + 1807 + 1808 + 1809 + 1810 + 1811 + 1812 + 1813 + 1814 + 1815 + 1816 + 1817 + 1818 + 1819 + 1820 + 1821 + 1822 + 1823 + 1824 + 1825 + 1826 + 1827 + 1828 + 1829 + 1830 + 1831 + 1832 + 1833 + 1834 + 1835 + 1836 + 1837 + 1838 + 1839 + 1840 + 1841 + 1842 + 1843 + 1844 + 1845 + 1846 + 1847 + 1848 + 1849 + 1850 + 1851 + 1852 + 1853 + 1854 + 1855 + 1856 + 1857 + 1858 + 1859 + 1860 + 1861 + 1862 + 1863 + 1864 + 1865 + 1866 + 1867 + 1868 + 1869 + 1870 + 1871 + 1872 + 1873 + 1874 + 1875 + 1876 + 1877 + 1878 + 1879 + 1880 + 1881 + 1882 + 1883 + 1884 + 1885 + 1886 + 1887 + 1888 + 1889 + 1890 + 1891 + 1892 + 1893 + 1894 + 1895 + 1896 + 1897 + 1898 + 1899 + 1900 + 1901 + 1902 + 1903 + 1904 + 1905 + 1906 + 1907 + 1908 + 1909 + 1910 + 1911 + 1912 + 1913 + 1914 + 1915 + 1916 + 1917 + 1918 + 1919 + 1920 + 1921 + 1922 + 1923 + 1924 + 1925 + 1926 + 1927 + 1928 + 1929 + 1930 + 1931 + 1932 + 1933 + 1934 + 1935 + 1936 + 1937 + 1938 + 1939 + 1940 + 1941 + 1942 + 1943 + 1944 + 1945 + 1946 + 1947 + 1948 + 1949 + 1950 + 1951 + 1952 + 1953 + 1954 + 1955 + 1956 + 1957 + 1958 + 1959 + 1960 + 1961 + 1962 + 1963 + 1964 + 1965 + 1966 + 1967 + 1968 + 1969 + 1970 + 1971 + 1972 + 1973 + 1974 + 1975 + 1976 + 1977 + 1978 + 1979 + 1980 + 1981 + 1982 + 1983 + 1984 + 1985 + 1986 + 1987 + 1988 + 1989 + 1990 + 1991 + 1992 + 1993 + 1994 + 1995 + 1996 + 1997 + 1998 + 1999 + 2000 + 2001 + 2002 + 2003 + 2004 + 2005 + 2006 + 2007 + 2008 + 2009 + 2010 + 2011 + 2012 + 2013 + 2014 + 2015 + 2016 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart diff --git a/applications/ContactStructuralMechanicsApplication/tests/integration_tests/test_double_curvature_integration.mdpa b/applications/ContactStructuralMechanicsApplication/tests/integration_tests/test_double_curvature_integration_triangle.mdpa similarity index 100% rename from applications/ContactStructuralMechanicsApplication/tests/integration_tests/test_double_curvature_integration.mdpa rename to applications/ContactStructuralMechanicsApplication/tests/integration_tests/test_double_curvature_integration_triangle.mdpa diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_hexa.mdpa b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_hexa.mdpa new file mode 100755 index 000000000000..2863068a590b --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_hexa.mdpa @@ -0,0 +1,1388 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Nodes + 1 0.0000000000 1.0000000000 -0.2500000000 + 2 0.0000000000 1.0000000000 -0.1250000000 + 3 0.1250000000 1.0000000000 -0.2500000000 + 4 0.0000000000 0.8750000000 -0.2500000000 + 5 0.1250000000 0.8750000000 -0.2500000000 + 6 0.1250000000 1.0000000000 -0.1250000000 + 7 0.0000000000 0.8750000000 -0.1250000000 + 8 0.1250000000 0.8750000000 -0.1250000000 + 9 0.0000000000 1.0000000000 0.0000000000 + 10 0.2500000000 1.0000000000 -0.2500000000 + 11 0.0000000000 0.7500000000 -0.2500000000 + 12 0.2500000000 0.8750000000 -0.2500000000 + 13 0.1250000000 1.0000000000 0.0000000000 + 14 0.0000000000 0.8750000000 0.0000000000 + 15 0.2500000000 1.0000000000 -0.1250000000 + 16 0.0000000000 0.7500000000 -0.1250000000 + 17 0.1250000000 0.7500000000 -0.2500000000 + 18 0.1250000000 0.8750000000 0.0000000000 + 19 0.2500000000 0.8750000000 -0.1250000000 + 20 0.1250000000 0.7500000000 -0.1250000000 + 21 0.2500000000 1.0000000000 0.0000000000 + 22 0.0000000000 0.7500000000 0.0000000000 + 23 0.2500000000 0.7500000000 -0.2500000000 + 24 0.3750000000 1.0000000000 -0.2500000000 + 25 0.0000000000 0.6250000000 -0.2500000000 + 26 0.2500000000 0.8750000000 0.0000000000 + 27 0.2500000000 0.7500000000 -0.1250000000 + 28 0.1250000000 0.7500000000 0.0000000000 + 29 0.1250000000 0.6250000000 -0.2500000000 + 30 0.3750000000 1.0000000000 -0.1250000000 + 31 0.0000000000 0.6250000000 -0.1250000000 + 32 0.3750000000 0.8750000000 -0.2500000000 + 33 0.1250000000 0.6250000000 -0.1250000000 + 34 0.3750000000 0.8750000000 -0.1250000000 + 35 0.2500000000 0.7500000000 0.0000000000 + 36 0.2500000000 0.7500000000 0.0000000000 + 37 0.2500000000 0.6250000000 -0.2500000000 + 38 0.3750000000 1.0000000000 0.0000000000 + 39 0.0000000000 0.6250000000 0.0000000000 + 40 0.3750000000 0.7500000000 -0.2500000000 + 41 0.1250000000 0.6250000000 0.0000000000 + 42 0.2500000000 0.6250000000 -0.1250000000 + 43 0.3750000000 0.8750000000 0.0000000000 + 44 0.3750000000 0.7500000000 -0.1250000000 + 45 0.5000000000 1.0000000000 -0.2500000000 + 46 0.0000000000 0.5000000000 -0.2500000000 + 47 0.3750000000 0.7500000000 0.0000000000 + 48 0.2500000000 0.6250000000 0.0000000000 + 49 0.2500000000 0.7500000000 0.1250000000 + 50 0.2500000000 0.6250000000 0.0000000000 + 51 0.3750000000 0.7500000000 0.0000000000 + 52 0.5000000000 1.0000000000 -0.1250000000 + 53 0.0000000000 0.5000000000 -0.1250000000 + 54 0.1250000000 0.5000000000 -0.2500000000 + 55 0.5000000000 0.8750000000 -0.2500000000 + 56 0.3750000000 0.6250000000 -0.2500000000 + 57 0.1250000000 0.5000000000 -0.1250000000 + 58 0.5000000000 0.8750000000 -0.1250000000 + 59 0.3750000000 0.6250000000 -0.1250000000 + 60 0.5000000000 1.0000000000 0.0000000000 + 61 0.0000000000 0.5000000000 0.0000000000 + 62 0.2500000000 0.5000000000 -0.2500000000 + 63 0.5000000000 0.7500000000 -0.2500000000 + 64 0.1250000000 0.5000000000 0.0000000000 + 65 0.5000000000 0.8750000000 0.0000000000 + 66 0.2500000000 0.5000000000 -0.1250000000 + 67 0.5000000000 0.7500000000 -0.1250000000 + 68 0.3750000000 0.6250000000 0.0000000000 + 69 0.3750000000 0.7500000000 0.1250000000 + 70 0.2500000000 0.6250000000 0.1250000000 + 71 0.3750000000 0.6250000000 0.0000000000 + 72 0.5000000000 0.7500000000 0.0000000000 + 73 0.2500000000 0.5000000000 0.0000000000 + 74 0.2500000000 0.7500000000 0.2500000000 + 75 0.2500000000 0.5000000000 0.0000000000 + 76 0.5000000000 0.7500000000 0.0000000000 + 77 0.6250000000 1.0000000000 -0.2500000000 + 78 0.0000000000 0.3750000000 -0.2500000000 + 79 0.3750000000 0.5000000000 -0.2500000000 + 80 0.5000000000 0.6250000000 -0.2500000000 + 81 0.6250000000 1.0000000000 -0.1250000000 + 82 0.0000000000 0.3750000000 -0.1250000000 + 83 0.1250000000 0.3750000000 -0.2500000000 + 84 0.3750000000 0.5000000000 -0.1250000000 + 85 0.5000000000 0.6250000000 -0.1250000000 + 86 0.6250000000 0.8750000000 -0.2500000000 + 87 0.3750000000 0.6250000000 0.1250000000 + 88 0.1250000000 0.3750000000 -0.1250000000 + 89 0.6250000000 0.8750000000 -0.1250000000 + 90 0.6250000000 1.0000000000 0.0000000000 + 91 0.0000000000 0.3750000000 0.0000000000 + 92 0.3750000000 0.5000000000 0.0000000000 + 93 0.5000000000 0.6250000000 0.0000000000 + 94 0.5000000000 0.7500000000 0.1250000000 + 95 0.3750000000 0.7500000000 0.2500000000 + 96 0.2500000000 0.5000000000 0.1250000000 + 97 0.2500000000 0.6250000000 0.2500000000 + 98 0.2500000000 0.3750000000 -0.2500000000 + 99 0.3750000000 0.5000000000 0.0000000000 + 100 0.5000000000 0.6250000000 0.0000000000 + 101 0.6250000000 0.7500000000 -0.2500000000 + 102 0.1250000000 0.3750000000 0.0000000000 + 103 0.2500000000 0.3750000000 -0.1250000000 + 104 0.6250000000 0.8750000000 0.0000000000 + 105 0.6250000000 0.7500000000 -0.1250000000 + 106 0.5000000000 0.5000000000 -0.2500000000 + 107 0.6250000000 0.7500000000 0.0000000000 + 108 0.2500000000 0.3750000000 0.0000000000 + 109 0.2500000000 0.7500000000 0.3750000000 + 110 0.2500000000 0.3750000000 0.0000000000 + 111 0.5000000000 0.5000000000 -0.1250000000 + 112 0.6250000000 0.7500000000 0.0000000000 + 113 0.3750000000 0.3750000000 -0.2500000000 + 114 0.3750000000 0.5000000000 0.1250000000 + 115 0.5000000000 0.6250000000 0.1250000000 + 116 0.3750000000 0.6250000000 0.2500000000 + 117 0.6250000000 0.6250000000 -0.2500000000 + 118 0.3750000000 0.3750000000 -0.1250000000 + 119 0.6250000000 0.6250000000 -0.1250000000 + 120 0.5000000000 0.5000000000 0.0000000000 + 121 0.7500000000 1.0000000000 -0.2500000000 + 122 0.0000000000 0.2500000000 -0.2500000000 + 123 0.5000000000 0.5000000000 0.0000000000 + 124 0.5000000000 0.7500000000 0.2500000000 + 125 0.2500000000 0.5000000000 0.2500000000 + 126 0.7500000000 0.8750000000 -0.2500000000 + 127 0.7500000000 1.0000000000 -0.1250000000 + 128 0.0000000000 0.2500000000 -0.1250000000 + 129 0.1250000000 0.2500000000 -0.2500000000 + 130 0.3750000000 0.3750000000 0.0000000000 + 131 0.3750000000 0.3750000000 0.0000000000 + 132 0.6250000000 0.6250000000 0.0000000000 + 133 0.6250000000 0.7500000000 0.1250000000 + 134 0.3750000000 0.7500000000 0.3750000000 + 135 0.2500000000 0.3750000000 0.1250000000 + 136 0.2500000000 0.6250000000 0.3750000000 + 137 0.1250000000 0.2500000000 -0.1250000000 + 138 0.7500000000 0.8750000000 -0.1250000000 + 139 0.6250000000 0.6250000000 0.0000000000 + 140 0.7500000000 0.7500000000 -0.2500000000 + 141 0.7500000000 1.0000000000 0.0000000000 + 142 0.0000000000 0.2500000000 0.0000000000 + 143 0.2500000000 0.2500000000 -0.2500000000 + 144 0.7500000000 0.8750000000 0.0000000000 + 145 0.1250000000 0.2500000000 0.0000000000 + 146 0.5000000000 0.3750000000 -0.2500000000 + 147 0.5000000000 0.5000000000 0.1250000000 + 148 0.3750000000 0.5000000000 0.2500000000 + 149 0.2500000000 0.2500000000 -0.1250000000 + 150 0.7500000000 0.7500000000 -0.1250000000 + 151 0.5000000000 0.6250000000 0.2500000000 + 152 0.6250000000 0.5000000000 -0.2500000000 + 153 0.5000000000 0.3750000000 -0.1250000000 + 154 0.6250000000 0.5000000000 -0.1250000000 + 155 0.3750000000 0.3750000000 0.1250000000 + 156 0.6250000000 0.6250000000 0.1250000000 + 157 0.3750000000 0.6250000000 0.3750000000 + 158 0.7500000000 0.7500000000 0.0000000000 + 159 0.2500000000 0.2500000000 0.0000000000 + 160 0.7500000000 0.7500000000 0.0000000000 + 161 0.2500000000 0.7500000000 0.5000000000 + 162 0.2500000000 0.2500000000 0.0000000000 + 163 0.6250000000 0.5000000000 0.0000000000 + 164 0.7500000000 0.6250000000 -0.2500000000 + 165 0.5000000000 0.3750000000 0.0000000000 + 166 0.5000000000 0.3750000000 0.0000000000 + 167 0.6250000000 0.7500000000 0.2500000000 + 168 0.5000000000 0.7500000000 0.3750000000 + 169 0.2500000000 0.3750000000 0.2500000000 + 170 0.2500000000 0.5000000000 0.3750000000 + 171 0.3750000000 0.2500000000 -0.2500000000 + 172 0.6250000000 0.5000000000 0.0000000000 + 173 0.3750000000 0.2500000000 -0.1250000000 + 174 0.7500000000 0.6250000000 -0.1250000000 + 175 0.5000000000 0.5000000000 0.2500000000 + 176 0.7500000000 0.6250000000 0.0000000000 + 177 0.3750000000 0.2500000000 0.0000000000 + 178 0.7500000000 0.6250000000 0.0000000000 + 179 0.2500000000 0.2500000000 0.1250000000 + 180 0.7500000000 0.7500000000 0.1250000000 + 181 0.3750000000 0.7500000000 0.5000000000 + 182 0.2500000000 0.6250000000 0.5000000000 + 183 0.8750000000 1.0000000000 -0.2500000000 + 184 0.0000000000 0.1250000000 -0.2500000000 + 185 0.3750000000 0.2500000000 0.0000000000 + 186 0.8750000000 1.0000000000 -0.1250000000 + 187 0.0000000000 0.1250000000 -0.1250000000 + 188 0.1250000000 0.1250000000 -0.2500000000 + 189 0.5000000000 0.3750000000 0.1250000000 + 190 0.3750000000 0.3750000000 0.2500000000 + 191 0.6250000000 0.5000000000 0.1250000000 + 192 0.3750000000 0.5000000000 0.3750000000 + 193 0.6250000000 0.6250000000 0.2500000000 + 194 0.5000000000 0.6250000000 0.3750000000 + 195 0.6250000000 0.3750000000 -0.2500000000 + 196 0.8750000000 0.8750000000 -0.2500000000 + 197 0.1250000000 0.1250000000 -0.1250000000 + 198 0.8750000000 0.8750000000 -0.1250000000 + 199 0.6250000000 0.3750000000 -0.1250000000 + 200 0.7500000000 0.5000000000 -0.2500000000 + 201 0.5000000000 0.2500000000 -0.2500000000 + 202 0.8750000000 1.0000000000 0.0000000000 + 203 0.0000000000 0.1250000000 0.0000000000 + 204 0.2500000000 0.1250000000 -0.2500000000 + 205 0.5000000000 0.2500000000 -0.1250000000 + 206 0.7500000000 0.5000000000 -0.1250000000 + 207 0.8750000000 0.7500000000 -0.2500000000 + 208 0.1250000000 0.1250000000 0.0000000000 + 209 0.3750000000 0.2500000000 0.1250000000 + 210 0.7500000000 0.6250000000 0.1250000000 + 211 0.6250000000 0.7500000000 0.3750000000 + 212 0.2500000000 0.3750000000 0.3750000000 + 213 0.2500000000 0.1250000000 -0.1250000000 + 214 0.8750000000 0.7500000000 -0.1250000000 + 215 0.3750000000 0.6250000000 0.5000000000 + 216 0.6250000000 0.3750000000 0.0000000000 + 217 0.8750000000 0.8750000000 0.0000000000 + 218 0.6250000000 0.3750000000 0.0000000000 + 219 0.7500000000 0.5000000000 0.0000000000 + 220 0.5000000000 0.2500000000 0.0000000000 + 221 0.7500000000 0.5000000000 0.0000000000 + 222 0.2500000000 0.2500000000 0.2500000000 + 223 0.7500000000 0.7500000000 0.2500000000 + 224 0.5000000000 0.7500000000 0.5000000000 + 225 0.2500000000 0.5000000000 0.5000000000 + 226 0.5000000000 0.2500000000 0.0000000000 + 227 0.2500000000 0.1250000000 0.0000000000 + 228 0.5000000000 0.3750000000 0.2500000000 + 229 0.6250000000 0.5000000000 0.2500000000 + 230 0.5000000000 0.5000000000 0.3750000000 + 231 0.8750000000 0.7500000000 0.0000000000 + 232 0.3750000000 0.1250000000 -0.2500000000 + 233 0.8750000000 0.6250000000 -0.2500000000 + 234 0.6250000000 0.3750000000 0.1250000000 + 235 0.3750000000 0.3750000000 0.3750000000 + 236 0.6250000000 0.6250000000 0.3750000000 + 237 0.3750000000 0.1250000000 -0.1250000000 + 238 0.8750000000 0.6250000000 -0.1250000000 + 239 0.7500000000 0.3750000000 -0.2500000000 + 240 0.5000000000 0.2500000000 0.1250000000 + 241 0.3750000000 0.2500000000 0.2500000000 + 242 0.7500000000 0.5000000000 0.1250000000 + 243 0.7500000000 0.6250000000 0.2500000000 + 244 0.3750000000 0.5000000000 0.5000000000 + 245 0.5000000000 0.6250000000 0.5000000000 + 246 0.6250000000 0.2500000000 -0.2500000000 + 247 0.3750000000 0.1250000000 0.0000000000 + 248 0.8750000000 0.6250000000 0.0000000000 + 249 0.7500000000 0.3750000000 -0.1250000000 + 250 0.6250000000 0.2500000000 -0.1250000000 + 251 0.0000000000 0.0000000000 -0.2500000000 + 252 1.0000000000 1.0000000000 -0.2500000000 + 253 0.6250000000 0.2500000000 0.0000000000 + 254 0.7500000000 0.3750000000 0.0000000000 + 255 0.2500000000 0.2500000000 0.3750000000 + 256 0.7500000000 0.7500000000 0.3750000000 + 257 0.6250000000 0.7500000000 0.5000000000 + 258 0.2500000000 0.3750000000 0.5000000000 + 259 0.1250000000 0.0000000000 -0.2500000000 + 260 0.0000000000 0.0000000000 -0.1250000000 + 261 1.0000000000 1.0000000000 -0.1250000000 + 262 1.0000000000 0.8750000000 -0.2500000000 + 263 0.7500000000 0.3750000000 0.0000000000 + 264 0.5000000000 0.1250000000 -0.2500000000 + 265 0.6250000000 0.2500000000 0.0000000000 + 266 0.8750000000 0.5000000000 -0.2500000000 + 267 0.1250000000 0.0000000000 -0.1250000000 + 268 1.0000000000 0.8750000000 -0.1250000000 + 269 0.6250000000 0.3750000000 0.2500000000 + 270 0.5000000000 0.3750000000 0.3750000000 + 271 0.6250000000 0.5000000000 0.3750000000 + 272 0.5000000000 0.1250000000 -0.1250000000 + 273 0.8750000000 0.5000000000 -0.1250000000 + 274 0.0000000000 0.0000000000 0.0000000000 + 275 1.0000000000 1.0000000000 0.0000000000 + 276 0.2500000000 0.0000000000 -0.2500000000 + 277 1.0000000000 0.7500000000 -0.2500000000 + 278 0.5000000000 0.2500000000 0.2500000000 + 279 0.7500000000 0.5000000000 0.2500000000 + 280 0.5000000000 0.5000000000 0.5000000000 + 281 0.1250000000 0.0000000000 0.0000000000 + 282 1.0000000000 0.8750000000 0.0000000000 + 283 0.5000000000 0.1250000000 0.0000000000 + 284 0.2500000000 0.0000000000 -0.1250000000 + 285 1.0000000000 0.7500000000 -0.1250000000 + 286 0.8750000000 0.5000000000 0.0000000000 + 287 0.6250000000 0.2500000000 0.1250000000 + 288 0.3750000000 0.2500000000 0.3750000000 + 289 0.7500000000 0.3750000000 0.1250000000 + 290 0.7500000000 0.6250000000 0.3750000000 + 291 0.3750000000 0.3750000000 0.5000000000 + 292 0.6250000000 0.6250000000 0.5000000000 + 293 0.2500000000 0.0000000000 0.0000000000 + 294 1.0000000000 0.7500000000 0.0000000000 + 295 0.7500000000 0.2500000000 -0.2500000000 + 296 0.3750000000 0.0000000000 -0.2500000000 + 297 1.0000000000 0.6250000000 -0.2500000000 + 298 0.7500000000 0.2500000000 -0.1250000000 + 299 0.3750000000 0.0000000000 -0.1250000000 + 300 1.0000000000 0.6250000000 -0.1250000000 + 301 0.6250000000 0.1250000000 -0.2500000000 + 302 0.8750000000 0.3750000000 -0.2500000000 + 303 0.6250000000 0.3750000000 0.3750000000 + 304 0.8750000000 0.3750000000 -0.1250000000 + 305 0.6250000000 0.1250000000 -0.1250000000 + 306 0.7500000000 0.2500000000 0.0000000000 + 307 0.2500000000 0.2500000000 0.5000000000 + 308 0.7500000000 0.7500000000 0.5000000000 + 309 0.7500000000 0.2500000000 0.0000000000 + 310 0.3750000000 0.0000000000 0.0000000000 + 311 1.0000000000 0.6250000000 0.0000000000 + 312 0.6250000000 0.2500000000 0.2500000000 + 313 0.5000000000 0.2500000000 0.3750000000 + 314 0.7500000000 0.3750000000 0.2500000000 + 315 0.7500000000 0.5000000000 0.3750000000 + 316 0.5000000000 0.3750000000 0.5000000000 + 317 0.6250000000 0.5000000000 0.5000000000 + 318 0.6250000000 0.1250000000 0.0000000000 + 319 0.8750000000 0.3750000000 0.0000000000 + 320 0.5000000000 0.0000000000 -0.2500000000 + 321 1.0000000000 0.5000000000 -0.2500000000 + 322 0.7500000000 0.2500000000 0.1250000000 + 323 0.3750000000 0.2500000000 0.5000000000 + 324 0.7500000000 0.6250000000 0.5000000000 + 325 0.5000000000 0.0000000000 -0.1250000000 + 326 1.0000000000 0.5000000000 -0.1250000000 + 327 0.5000000000 0.0000000000 0.0000000000 + 328 1.0000000000 0.5000000000 0.0000000000 + 329 0.7500000000 0.1250000000 -0.2500000000 + 330 0.8750000000 0.2500000000 -0.2500000000 + 331 0.7500000000 0.1250000000 -0.1250000000 + 332 0.6250000000 0.2500000000 0.3750000000 + 333 0.7500000000 0.3750000000 0.3750000000 + 334 0.8750000000 0.2500000000 -0.1250000000 + 335 0.6250000000 0.3750000000 0.5000000000 + 336 0.7500000000 0.2500000000 0.2500000000 + 337 0.5000000000 0.2500000000 0.5000000000 + 338 0.7500000000 0.5000000000 0.5000000000 + 339 0.7500000000 0.1250000000 0.0000000000 + 340 0.6250000000 0.0000000000 -0.2500000000 + 341 1.0000000000 0.3750000000 -0.2500000000 + 342 0.8750000000 0.2500000000 0.0000000000 + 343 0.6250000000 0.0000000000 -0.1250000000 + 344 1.0000000000 0.3750000000 -0.1250000000 + 345 0.6250000000 0.0000000000 0.0000000000 + 346 1.0000000000 0.3750000000 0.0000000000 + 347 0.7500000000 0.2500000000 0.3750000000 + 348 0.6250000000 0.2500000000 0.5000000000 + 349 0.7500000000 0.3750000000 0.5000000000 + 350 0.8750000000 0.1250000000 -0.2500000000 + 351 0.8750000000 0.1250000000 -0.1250000000 + 352 0.7500000000 0.0000000000 -0.2500000000 + 353 1.0000000000 0.2500000000 -0.2500000000 + 354 0.7500000000 0.0000000000 -0.1250000000 + 355 1.0000000000 0.2500000000 -0.1250000000 + 356 0.8750000000 0.1250000000 0.0000000000 + 357 0.7500000000 0.0000000000 0.0000000000 + 358 1.0000000000 0.2500000000 0.0000000000 + 359 0.7500000000 0.2500000000 0.5000000000 + 360 0.8750000000 0.0000000000 -0.2500000000 + 361 1.0000000000 0.1250000000 -0.2500000000 + 362 0.8750000000 0.0000000000 -0.1250000000 + 363 1.0000000000 0.1250000000 -0.1250000000 + 364 0.8750000000 0.0000000000 0.0000000000 + 365 1.0000000000 0.1250000000 0.0000000000 + 366 1.0000000000 0.0000000000 -0.2500000000 + 367 1.0000000000 0.0000000000 -0.1250000000 + 368 1.0000000000 0.0000000000 0.0000000000 +End Nodes + + +Begin Elements UpdatedLagrangianElement3D8N// GUI group identifier: Parts Auto1 + 1 0 155 135 108 131 209 179 159 177 + 2 0 189 155 131 166 240 209 177 220 + 3 0 234 189 166 218 287 240 220 253 + 4 0 289 234 218 254 322 287 253 306 + 5 0 190 169 135 155 241 222 179 209 + 6 0 228 190 155 189 278 241 209 240 + 7 0 269 228 189 234 312 278 240 287 + 8 0 314 269 234 289 336 312 287 322 + 9 0 235 212 169 190 288 255 222 241 + 10 0 270 235 190 228 313 288 241 278 + 11 0 303 270 228 269 332 313 278 312 + 12 0 333 303 269 314 347 332 312 336 + 13 0 291 258 212 235 323 307 255 288 + 14 0 316 291 235 270 337 323 288 313 + 15 0 335 316 270 303 348 337 313 332 + 16 0 349 335 303 333 359 348 332 347 + 17 0 114 96 73 99 155 135 108 131 + 18 0 147 114 99 120 189 155 131 166 + 19 0 191 147 120 163 234 189 166 218 + 20 0 242 191 163 221 289 234 218 254 + 21 0 148 125 96 114 190 169 135 155 + 22 0 175 148 114 147 228 190 155 189 + 23 0 229 175 147 191 269 228 189 234 + 24 0 279 229 191 242 314 269 234 289 + 25 0 192 170 125 148 235 212 169 190 + 26 0 230 192 148 175 270 235 190 228 + 27 0 271 230 175 229 303 270 228 269 + 28 0 315 271 229 279 333 303 269 314 + 29 0 244 225 170 192 291 258 212 235 + 30 0 280 244 192 230 316 291 235 270 + 31 0 317 280 230 271 335 316 270 303 + 32 0 338 317 271 315 349 335 303 333 + 33 0 87 70 48 71 114 96 73 99 + 34 0 115 87 71 100 147 114 99 120 + 35 0 156 115 100 132 191 147 120 163 + 36 0 210 156 132 178 242 191 163 221 + 37 0 116 97 70 87 148 125 96 114 + 38 0 151 116 87 115 175 148 114 147 + 39 0 193 151 115 156 229 175 147 191 + 40 0 243 193 156 210 279 229 191 242 + 41 0 157 136 97 116 192 170 125 148 + 42 0 194 157 116 151 230 192 148 175 + 43 0 236 194 151 193 271 230 175 229 + 44 0 290 236 193 243 315 271 229 279 + 45 0 215 182 136 157 244 225 170 192 + 46 0 245 215 157 194 280 244 192 230 + 47 0 292 245 194 236 317 280 230 271 + 48 0 324 292 236 290 338 317 271 315 + 49 0 69 49 35 47 87 70 48 71 + 50 0 94 69 47 72 115 87 71 100 + 51 0 133 94 72 107 156 115 100 132 + 52 0 180 133 107 160 210 156 132 178 + 53 0 95 74 49 69 116 97 70 87 + 54 0 124 95 69 94 151 116 87 115 + 55 0 167 124 94 133 193 151 115 156 + 56 0 223 167 133 180 243 193 156 210 + 57 0 134 109 74 95 157 136 97 116 + 58 0 168 134 95 124 194 157 116 151 + 59 0 211 168 124 167 236 194 151 193 + 60 0 256 211 167 223 290 236 193 243 + 61 0 181 161 109 134 215 182 136 157 + 62 0 224 181 134 168 245 215 157 194 + 63 0 257 224 168 211 292 245 194 236 + 64 0 308 257 211 256 324 292 236 290 +End Elements + +Begin Elements UpdatedLagrangianElement3D8N// GUI group identifier: Parts Auto2 + 65 0 351 363 365 356 362 367 368 364 + 66 0 331 351 356 339 354 362 364 357 + 67 0 305 331 339 318 343 354 357 345 + 68 0 272 305 318 283 325 343 345 327 + 69 0 237 272 283 247 299 325 327 310 + 70 0 213 237 247 227 284 299 310 293 + 71 0 197 213 227 208 267 284 293 281 + 72 0 187 197 208 203 260 267 281 274 + 73 0 350 361 363 351 360 366 367 362 + 74 0 329 350 351 331 352 360 362 354 + 75 0 301 329 331 305 340 352 354 343 + 76 0 264 301 305 272 320 340 343 325 + 77 0 232 264 272 237 296 320 325 299 + 78 0 204 232 237 213 276 296 299 284 + 79 0 188 204 213 197 259 276 284 267 + 80 0 184 188 197 187 251 259 267 260 + 81 0 334 355 358 342 351 363 365 356 + 82 0 298 334 342 309 331 351 356 339 + 83 0 250 298 309 265 305 331 339 318 + 84 0 205 250 265 226 272 305 318 283 + 85 0 173 205 226 185 237 272 283 247 + 86 0 149 173 185 162 213 237 247 227 + 87 0 137 149 162 145 197 213 227 208 + 88 0 128 137 145 142 187 197 208 203 + 89 0 330 353 355 334 350 361 363 351 + 90 0 295 330 334 298 329 350 351 331 + 91 0 246 295 298 250 301 329 331 305 + 92 0 201 246 250 205 264 301 305 272 + 93 0 171 201 205 173 232 264 272 237 + 94 0 143 171 173 149 204 232 237 213 + 95 0 129 143 149 137 188 204 213 197 + 96 0 122 129 137 128 184 188 197 187 + 97 0 304 344 346 319 334 355 358 342 + 98 0 249 304 319 263 298 334 342 309 + 99 0 199 249 263 216 250 298 309 265 + 100 0 153 199 216 165 205 250 265 226 + 101 0 118 153 165 130 173 205 226 185 + 102 0 103 118 130 110 149 173 185 162 + 103 0 88 103 110 102 137 149 162 145 + 104 0 82 88 102 91 128 137 145 142 + 105 0 302 341 344 304 330 353 355 334 + 106 0 239 302 304 249 295 330 334 298 + 107 0 195 239 249 199 246 295 298 250 + 108 0 146 195 199 153 201 246 250 205 + 109 0 113 146 153 118 171 201 205 173 + 110 0 98 113 118 103 143 171 173 149 + 111 0 83 98 103 88 129 143 149 137 + 112 0 78 83 88 82 122 129 137 128 + 113 0 273 326 328 286 304 344 346 319 + 114 0 206 273 286 219 249 304 319 263 + 115 0 154 206 219 172 199 249 263 216 + 116 0 111 154 172 123 153 199 216 165 + 117 0 84 111 123 92 118 153 165 130 + 118 0 66 84 92 75 103 118 130 110 + 119 0 57 66 75 64 88 103 110 102 + 120 0 53 57 64 61 82 88 102 91 + 121 0 266 321 326 273 302 341 344 304 + 122 0 200 266 273 206 239 302 304 249 + 123 0 152 200 206 154 195 239 249 199 + 124 0 106 152 154 111 146 195 199 153 + 125 0 79 106 111 84 113 146 153 118 + 126 0 62 79 84 66 98 113 118 103 + 127 0 54 62 66 57 83 98 103 88 + 128 0 46 54 57 53 78 83 88 82 + 129 0 238 300 311 248 273 326 328 286 + 130 0 174 238 248 176 206 273 286 219 + 131 0 119 174 176 139 154 206 219 172 + 132 0 85 119 139 93 111 154 172 123 + 133 0 59 85 93 68 84 111 123 92 + 134 0 42 59 68 50 66 84 92 75 + 135 0 33 42 50 41 57 66 75 64 + 136 0 31 33 41 39 53 57 64 61 + 137 0 233 297 300 238 266 321 326 273 + 138 0 164 233 238 174 200 266 273 206 + 139 0 117 164 174 119 152 200 206 154 + 140 0 80 117 119 85 106 152 154 111 + 141 0 56 80 85 59 79 106 111 84 + 142 0 37 56 59 42 62 79 84 66 + 143 0 29 37 42 33 54 62 66 57 + 144 0 25 29 33 31 46 54 57 53 + 145 0 214 285 294 231 238 300 311 248 + 146 0 150 214 231 158 174 238 248 176 + 147 0 105 150 158 112 119 174 176 139 + 148 0 67 105 112 76 85 119 139 93 + 149 0 44 67 76 51 59 85 93 68 + 150 0 27 44 51 36 42 59 68 50 + 151 0 20 27 36 28 33 42 50 41 + 152 0 16 20 28 22 31 33 41 39 + 153 0 207 277 285 214 233 297 300 238 + 154 0 140 207 214 150 164 233 238 174 + 155 0 101 140 150 105 117 164 174 119 + 156 0 63 101 105 67 80 117 119 85 + 157 0 40 63 67 44 56 80 85 59 + 158 0 23 40 44 27 37 56 59 42 + 159 0 17 23 27 20 29 37 42 33 + 160 0 11 17 20 16 25 29 33 31 + 161 0 198 268 282 217 214 285 294 231 + 162 0 138 198 217 144 150 214 231 158 + 163 0 89 138 144 104 105 150 158 112 + 164 0 58 89 104 65 67 105 112 76 + 165 0 34 58 65 43 44 67 76 51 + 166 0 19 34 43 26 27 44 51 36 + 167 0 8 19 26 18 20 27 36 28 + 168 0 7 8 18 14 16 20 28 22 + 169 0 196 262 268 198 207 277 285 214 + 170 0 126 196 198 138 140 207 214 150 + 171 0 86 126 138 89 101 140 150 105 + 172 0 55 86 89 58 63 101 105 67 + 173 0 32 55 58 34 40 63 67 44 + 174 0 12 32 34 19 23 40 44 27 + 175 0 5 12 19 8 17 23 27 20 + 176 0 4 5 8 7 11 17 20 16 + 177 0 186 261 275 202 198 268 282 217 + 178 0 127 186 202 141 138 198 217 144 + 179 0 81 127 141 90 89 138 144 104 + 180 0 52 81 90 60 58 89 104 65 + 181 0 30 52 60 38 34 58 65 43 + 182 0 15 30 38 21 19 34 43 26 + 183 0 6 15 21 13 8 19 26 18 + 184 0 2 6 13 9 7 8 18 14 + 185 0 183 252 261 186 196 262 268 198 + 186 0 121 183 186 127 126 196 198 138 + 187 0 77 121 127 81 86 126 138 89 + 188 0 45 77 81 52 55 86 89 58 + 189 0 24 45 52 30 32 55 58 34 + 190 0 10 24 30 15 12 32 34 19 + 191 0 3 10 15 6 5 12 19 8 + 192 0 1 3 6 2 4 5 8 7 +End Elements + +Begin SubModelPart Parts_Parts_Auto1 // Group Parts Auto1 // Subtree Parts + Begin SubModelPartNodes + 35 + 47 + 48 + 49 + 69 + 70 + 71 + 72 + 73 + 74 + 87 + 94 + 95 + 96 + 97 + 99 + 100 + 107 + 108 + 109 + 114 + 115 + 116 + 120 + 124 + 125 + 131 + 132 + 133 + 134 + 135 + 136 + 147 + 148 + 151 + 155 + 156 + 157 + 159 + 160 + 161 + 163 + 166 + 167 + 168 + 169 + 170 + 175 + 177 + 178 + 179 + 180 + 181 + 182 + 189 + 190 + 191 + 192 + 193 + 194 + 209 + 210 + 211 + 212 + 215 + 218 + 220 + 221 + 222 + 223 + 224 + 225 + 228 + 229 + 230 + 234 + 235 + 236 + 240 + 241 + 242 + 243 + 244 + 245 + 253 + 254 + 255 + 256 + 257 + 258 + 269 + 270 + 271 + 278 + 279 + 280 + 287 + 288 + 289 + 290 + 291 + 292 + 303 + 306 + 307 + 308 + 312 + 313 + 314 + 315 + 316 + 317 + 322 + 323 + 324 + 332 + 333 + 335 + 336 + 337 + 338 + 347 + 348 + 349 + 359 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart Parts_Parts_Auto2 // Group Parts Auto2 // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 88 + 89 + 90 + 91 + 92 + 93 + 98 + 101 + 102 + 103 + 104 + 105 + 106 + 110 + 111 + 112 + 113 + 117 + 118 + 119 + 121 + 122 + 123 + 126 + 127 + 128 + 129 + 130 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 149 + 150 + 152 + 153 + 154 + 158 + 162 + 164 + 165 + 171 + 172 + 173 + 174 + 176 + 183 + 184 + 185 + 186 + 187 + 188 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 213 + 214 + 216 + 217 + 219 + 226 + 227 + 231 + 232 + 233 + 237 + 238 + 239 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 272 + 273 + 274 + 275 + 276 + 277 + 281 + 282 + 283 + 284 + 285 + 286 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 304 + 305 + 309 + 310 + 311 + 318 + 319 + 320 + 321 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 334 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + End SubModelPartNodes + Begin SubModelPartElements + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto1 // Group Displacement Auto1 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 3 + 4 + 5 + 10 + 11 + 12 + 17 + 23 + 24 + 25 + 29 + 32 + 37 + 40 + 45 + 46 + 54 + 55 + 56 + 62 + 63 + 77 + 78 + 79 + 80 + 83 + 86 + 98 + 101 + 106 + 113 + 117 + 121 + 122 + 126 + 129 + 140 + 143 + 146 + 152 + 164 + 171 + 183 + 184 + 188 + 195 + 196 + 200 + 201 + 204 + 207 + 232 + 233 + 239 + 246 + 251 + 252 + 259 + 262 + 264 + 266 + 276 + 277 + 295 + 296 + 297 + 301 + 302 + 320 + 321 + 329 + 330 + 340 + 341 + 350 + 352 + 353 + 360 + 361 + 366 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto2 // Group Displacement Auto2 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 161 + 181 + 182 + 215 + 224 + 225 + 244 + 245 + 257 + 258 + 280 + 291 + 292 + 307 + 308 + 316 + 317 + 323 + 324 + 335 + 337 + 338 + 348 + 349 + 359 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart Contact_Part // Group CONTACT + Begin SubModelPartNodes + 9 + 13 + 14 + 18 + 21 + 22 + 26 + 28 + 35 + 36 + 38 + 39 + 41 + 43 + 47 + 48 + 50 + 51 + 60 + 61 + 64 + 65 + 68 + 71 + 72 + 73 + 75 + 76 + 90 + 91 + 92 + 93 + 99 + 100 + 102 + 104 + 107 + 108 + 110 + 112 + 120 + 123 + 130 + 131 + 132 + 139 + 141 + 142 + 144 + 145 + 158 + 159 + 160 + 162 + 163 + 165 + 166 + 172 + 176 + 177 + 178 + 185 + 202 + 203 + 208 + 216 + 217 + 218 + 219 + 220 + 221 + 226 + 227 + 231 + 247 + 248 + 253 + 254 + 263 + 265 + 274 + 275 + 281 + 282 + 283 + 286 + 293 + 294 + 306 + 309 + 310 + 311 + 318 + 319 + 327 + 328 + 339 + 342 + 345 + 346 + 356 + 357 + 358 + 364 + 365 + 368 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_hexa_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_hexa_parameters.json new file mode 100755 index 000000000000..75548d8325ee --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_hexa_parameters.json @@ -0,0 +1,149 @@ +{ + "problem_data" : { + "problem_name" : "3D_contact_patch_test_large_disp_hexa", + "model_part_name" : "Structure", + "domain_size" : 3, + "parallel_type" : "OpenMP", + "time_step" : 0.05, + "start_time" : 0.0, + "end_time" : 0.85, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "Static", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Non-Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "mesh_tying_test/3D_contact_patch_test_large_disp_hexa", + "input_file_label" : 0 + }, + "material_import_settings" : { + "materials_filename" : "mesh_tying_test/3D_contact_patch_test_large_disp_materials.json" + }, + "contact_settings": + { + "mortar_type" : "ComponentsMeshTying" + }, + "line_search" : false, + "convergence_criterion" : "Contact_Mixed_criterion", + "displacement_relative_tolerance" : 0.0001, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 30, + "problem_domain_sub_model_part_list" : ["Parts_Parts_Auto1","Parts_Parts_Auto2"], + "processes_sub_model_part_list" : ["Parts_Parts_Auto1","Parts_Parts_Auto2","DISPLACEMENT_Displacement_Auto1","DISPLACEMENT_Displacement_Auto2","Contact_Part"], + "linear_solver_settings" : { + "solver_type" : "SuperLUSolver", + "scaling" : false + } + }, + "constraints_process_list" : [{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_Displacement_Auto1", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,0.0,0.0], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_Displacement_Auto2", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,0.0,"-2.0e-1*t"], + "interval" : [0.0,"End"] + } + }], + "loads_process_list" : [], + "contact_process_list" :[ + { + "python_module" : "mesh_tying_process", + "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", + "help" : "", + "process_name" : "MeshTyingProcess", + "Parameters" : { + "model_part_name" : "Structure", + "mesh_tying_model_part" : "Contact_Part", + "assume_master_slave" : "Parts_Parts_Auto1", + "geometry_element" : "Hexahedron", + "search_factor" : 1.0, + "max_number_results" : 100, + "type_search" : "InRadius", + "integration_order" : 3 + } + } + ], + "_output_configuration" : { + "result_file_configuration" : { + "gidpost_flags" : { + "GiDPostMode" : "GiD_PostBinary", + "WriteDeformedMeshFlag" : "WriteDeformed", + "MultiFileFlag" : "SingleFile" + }, + "file_label" : "step", + "output_control_type" : "step", + "output_frequency" : 1.0, + "body_output" : true, + "node_output" : false, + "skin_output" : false, + "plane_output" : [], + "nodal_results" : ["DISPLACEMENT","REACTION"], + "nodal_nonhistorical_results": ["NORMAL"], + "nodal_flags_results": ["ACTIVE","SLAVE"], + "gauss_point_results" : ["VON_MISES_STRESS","CAUCHY_STRESS_TENSOR"] + }, + "point_data_configuration" : [] + }, + "json_check_process" : [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Z"], + "input_file_name" : "mesh_tying_test/3D_contact_patch_test_large_disp_hexa_results.json", + "model_part_name" : "Contact_Part", + "time_frequency" : 1.0 + } + } + ], + "_json_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Z"], + "output_file_name" : "mesh_tying_test/3D_contact_patch_test_large_disp_hexa_results.json", + "model_part_name" : "Contact_Part", + "time_frequency" : 1.0 + } + } + ], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "material_import_settings" : { + "materials_filename" : "StructuralMaterials.json" + } +} diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_hexa_results.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_hexa_results.json new file mode 100755 index 000000000000..682bb831ccf0 --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_hexa_results.json @@ -0,0 +1 @@ +{"NODE_177": {"DISPLACEMENT_Z": []}, "NODE_227": {"DISPLACEMENT_Z": []}, "NODE_9": {"DISPLACEMENT_Z": []}, "NODE_365": {"DISPLACEMENT_Z": []}, "NODE_283": {"DISPLACEMENT_Z": []}, "NODE_218": {"DISPLACEMENT_Z": []}, "NODE_208": {"DISPLACEMENT_Z": []}, "NODE_132": {"DISPLACEMENT_Z": []}, "NODE_75": {"DISPLACEMENT_Z": []}, "NODE_39": {"DISPLACEMENT_Z": []}, "NODE_43": {"DISPLACEMENT_Z": []}, "NODE_102": {"DISPLACEMENT_Z": []}, "NODE_14": {"DISPLACEMENT_Z": []}, "NODE_21": {"DISPLACEMENT_Z": []}, "NODE_356": {"DISPLACEMENT_Z": []}, "NODE_104": {"DISPLACEMENT_Z": []}, "NODE_247": {"DISPLACEMENT_Z": []}, "NODE_274": {"DISPLACEMENT_Z": []}, "NODE_226": {"DISPLACEMENT_Z": []}, "NODE_91": {"DISPLACEMENT_Z": []}, "NODE_364": {"DISPLACEMENT_Z": []}, "NODE_100": {"DISPLACEMENT_Z": []}, "NODE_141": {"DISPLACEMENT_Z": []}, "NODE_144": {"DISPLACEMENT_Z": []}, "NODE_47": {"DISPLACEMENT_Z": []}, "NODE_162": {"DISPLACEMENT_Z": []}, "NODE_163": {"DISPLACEMENT_Z": []}, "NODE_309": {"DISPLACEMENT_Z": []}, "NODE_76": {"DISPLACEMENT_Z": []}, "NODE_108": {"DISPLACEMENT_Z": []}, "NODE_107": {"DISPLACEMENT_Z": []}, "NODE_123": {"DISPLACEMENT_Z": []}, "NODE_50": {"DISPLACEMENT_Z": []}, "NODE_68": {"DISPLACEMENT_Z": []}, "NODE_120": {"DISPLACEMENT_Z": []}, "NODE_254": {"DISPLACEMENT_Z": []}, "NODE_217": {"DISPLACEMENT_Z": []}, "NODE_327": {"DISPLACEMENT_Z": []}, "NODE_306": {"DISPLACEMENT_Z": []}, "NODE_166": {"DISPLACEMENT_Z": []}, "NODE_41": {"DISPLACEMENT_Z": []}, "NODE_18": {"DISPLACEMENT_Z": []}, "NODE_176": {"DISPLACEMENT_Z": []}, "NODE_172": {"DISPLACEMENT_Z": []}, "NODE_231": {"DISPLACEMENT_Z": []}, "NODE_253": {"DISPLACEMENT_Z": []}, "NODE_99": {"DISPLACEMENT_Z": []}, "NODE_165": {"DISPLACEMENT_Z": []}, "NODE_26": {"DISPLACEMENT_Z": []}, "NODE_357": {"DISPLACEMENT_Z": []}, "NODE_221": {"DISPLACEMENT_Z": []}, "NODE_281": {"DISPLACEMENT_Z": []}, "NODE_219": {"DISPLACEMENT_Z": []}, "NODE_22": {"DISPLACEMENT_Z": []}, "NODE_71": {"DISPLACEMENT_Z": []}, "NODE_92": {"DISPLACEMENT_Z": []}, "NODE_178": {"DISPLACEMENT_Z": []}, "NODE_61": {"DISPLACEMENT_Z": []}, "NODE_160": {"DISPLACEMENT_Z": []}, "TIME": [], "NODE_282": {"DISPLACEMENT_Z": []}, "NODE_339": {"DISPLACEMENT_Z": []}, "NODE_131": {"DISPLACEMENT_Z": []}, "NODE_216": {"DISPLACEMENT_Z": []}, "NODE_28": {"DISPLACEMENT_Z": []}, "NODE_342": {"DISPLACEMENT_Z": []}, "NODE_64": {"DISPLACEMENT_Z": []}, "NODE_112": {"DISPLACEMENT_Z": []}, "NODE_35": {"DISPLACEMENT_Z": []}, "NODE_65": {"DISPLACEMENT_Z": []}, "NODE_90": {"DISPLACEMENT_Z": []}, "NODE_318": {"DISPLACEMENT_Z": []}, "NODE_72": {"DISPLACEMENT_Z": []}, "NODE_203": {"DISPLACEMENT_Z": []}, "NODE_311": {"DISPLACEMENT_Z": []}, "NODE_73": {"DISPLACEMENT_Z": []}, "NODE_13": {"DISPLACEMENT_Z": []}, "NODE_139": {"DISPLACEMENT_Z": []}, "NODE_158": {"DISPLACEMENT_Z": []}, "NODE_345": {"DISPLACEMENT_Z": []}, "NODE_142": {"DISPLACEMENT_Z": []}, "NODE_48": {"DISPLACEMENT_Z": []}, "NODE_130": {"DISPLACEMENT_Z": []}, "NODE_51": {"DISPLACEMENT_Z": []}, "NODE_145": {"DISPLACEMENT_Z": []}, "NODE_294": {"DISPLACEMENT_Z": []}, "NODE_185": {"DISPLACEMENT_Z": []}, "NODE_202": {"DISPLACEMENT_Z": []}, "NODE_265": {"DISPLACEMENT_Z": []}, "NODE_110": {"DISPLACEMENT_Z": []}, "NODE_93": {"DISPLACEMENT_Z": []}, "NODE_248": {"DISPLACEMENT_Z": []}, "NODE_60": {"DISPLACEMENT_Z": []}, "NODE_263": {"DISPLACEMENT_Z": []}, "NODE_328": {"DISPLACEMENT_Z": []}, "NODE_36": {"DISPLACEMENT_Z": []}, "NODE_319": {"DISPLACEMENT_Z": []}, "NODE_346": {"DISPLACEMENT_Z": []}, "NODE_310": {"DISPLACEMENT_Z": []}, "NODE_159": {"DISPLACEMENT_Z": []}, "NODE_275": {"DISPLACEMENT_Z": []}, "NODE_286": {"DISPLACEMENT_Z": []}, "NODE_358": {"DISPLACEMENT_Z": []}, "NODE_220": {"DISPLACEMENT_Z": []}, "NODE_38": {"DISPLACEMENT_Z": []}, "NODE_368": {"DISPLACEMENT_Z": []}, "NODE_293": {"DISPLACEMENT_Z": []}} \ No newline at end of file diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_materials.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_materials.json new file mode 100755 index 000000000000..c86c33f3e1c9 --- /dev/null +++ b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_patch_test_large_disp_materials.json @@ -0,0 +1,31 @@ +{ + "properties" : [{ + "model_part_name" : "Parts_Parts_Auto1", + "properties_id" : 1, + "Material" : { + "constitutive_law" : { + "name" : "KratosMultiphysics.StructuralMechanicsApplication.HyperElastic3DLaw" + }, + "Variables" : { + "DENSITY" : 1000.0, + "YOUNG_MODULUS" : 1.0e9, + "POISSON_RATIO" : 0.29 + }, + "Tables" : {} + } + },{ + "model_part_name" : "Parts_Parts_Auto2", + "properties_id" : 2, + "Material" : { + "constitutive_law" : { + "name" : "KratosMultiphysics.StructuralMechanicsApplication.HyperElastic3DLaw" + }, + "Variables" : { + "DENSITY" : 1000.0, + "YOUNG_MODULUS" : 1.0e6, + "POISSON_RATIO" : 0.29 + }, + "Tables" : {} + } + }] +} diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_simplest_patch_matching_test_materials.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_simplest_patch_matching_test_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_simplest_patch_matching_test_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_simplest_patch_matching_test_parameters.json index 1bde7dbfdc8c..fc5af8c1440d 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_simplest_patch_matching_test_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_simplest_patch_matching_test_parameters.json @@ -68,7 +68,7 @@ } }], "loads_process_list" : [], - "contact_processes" :[{ + "contact_process_list" :[{ "python_module" : "mesh_tying_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", "help" : "", diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_simplest_patch_matching_test_results.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/3D_contact_simplest_patch_matching_test_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/hyper_simple_slope_patch_test_2D_materials.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/hyper_simple_slope_patch_test_2D_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/hyper_simple_slope_patch_test_2D_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/hyper_simple_slope_patch_test_2D_parameters.json index 00d8fd8da62e..996e679265a4 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/hyper_simple_slope_patch_test_2D_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/hyper_simple_slope_patch_test_2D_parameters.json @@ -66,7 +66,7 @@ "direction" : [0.0,-1.0,0.0] } }], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "mesh_tying_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/hyper_simple_slope_patch_test_2D_results.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/hyper_simple_slope_patch_test_2D_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_2D_materials.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_2D_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_2D_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_2D_parameters.json index ce995d165446..103138faa9d8 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_2D_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_2D_parameters.json @@ -77,7 +77,7 @@ } ], "loads_process_list" : [], - "contact_processes" :[ + "contact_process_list" :[ { "python_module" : "mesh_tying_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_2D_results.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_2D_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D.mdpa b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D.mdpa old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D_materials.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D_materials.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D_parameters.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D_parameters.json old mode 100644 new mode 100755 index 83a1d37a0579..facf349cc103 --- a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D_parameters.json +++ b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D_parameters.json @@ -149,7 +149,7 @@ "direction" : [0.0,-1.0,0.0] } }], - "contact_processes" :[{ + "contact_process_list" :[{ "python_module" : "mesh_tying_process", "kratos_module" : "KratosMultiphysics.ContactStructuralMechanicsApplication", "help" : "", diff --git a/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D_results.json b/applications/ContactStructuralMechanicsApplication/tests/mesh_tying_test/simple_patch_test_3D_results.json old mode 100644 new mode 100755 diff --git a/applications/ContactStructuralMechanicsApplication/tests/test_ContactStructuralMechanicsApplication.py b/applications/ContactStructuralMechanicsApplication/tests/test_ContactStructuralMechanicsApplication.py index ea6771fd11a1..c7a0f9883ccb 100644 --- a/applications/ContactStructuralMechanicsApplication/tests/test_ContactStructuralMechanicsApplication.py +++ b/applications/ContactStructuralMechanicsApplication/tests/test_ContactStructuralMechanicsApplication.py @@ -49,6 +49,9 @@ # ALM frictionless tests from ValidationTests import ALMIroningTestContact as TALMIroningTestContact from ValidationTests import ALMIroningDieTestContact as TALMIroningDieTestContact +from ValidationTests import LargeDisplacementPatchTestHexa as TLargeDisplacementPatchTestHexa +from ValidationTests import ALMLargeDisplacementPatchTestTetra as TALMLargeDisplacementPatchTestTetra +from ValidationTests import ALMLargeDisplacementPatchTestHexa as TALMLargeDisplacementPatchTestHexa def AssambleTestSuites(): ''' Populates the test suites to run. @@ -67,7 +70,9 @@ def AssambleTestSuites(): # Create a test suit with the selected tests (Small tests): smallSuite = suites['small'] # Exact integration tests - smallSuite.addTest(TTestDoubleCurvatureIntegration('test_double_curvature_integration')) + smallSuite.addTest(TTestDoubleCurvatureIntegration('test_double_curvature_integration_triangle')) + smallSuite.addTest(TTestDoubleCurvatureIntegration('test_double_curvature_integration_quad')) + smallSuite.addTest(TTestDoubleCurvatureIntegration('test_moving_mesh_integration_quad')) # Mesh tying tests smallSuite.addTest(TSimplePatchTestTwoDMeshTying('test_execution')) @@ -108,7 +113,10 @@ def AssambleTestSuites(): validationSuite.addTests(nightSuite) #validationSuite.addTest(TALMIroningTestContact('test_execution')) #validationSuite.addTest(TALMIroningDieTestContact('test_execution')) - + validationSuite.addTest(TLargeDisplacementPatchTestHexa('test_execution')) + validationSuite.addTest(TALMLargeDisplacementPatchTestTetra('test_execution')) + validationSuite.addTest(TALMLargeDisplacementPatchTestHexa('test_execution')) + # Create a test suit that contains all the tests: allSuite = suites['all'] allSuite.addTests( @@ -137,7 +145,7 @@ def AssambleTestSuites(): TALMMeshMovingMatchingTestContact, TALMMeshMovingNotMatchingTestContact, TALMTaylorPatchTestContact, - TALMTaylorPatchDynamicTestContact, # NOTE: Check that in debug dynamic gives an error + TALMTaylorPatchDynamicTestContact, TALMHertzSimpleTestContact, TALMHertzSimpleSphereTestContact, ##TALMHertzSphereTestContact, # FIXME: This test requieres the axisymmetric to work (memmory error, correct it) @@ -145,6 +153,9 @@ def AssambleTestSuites(): ## VALIDATION ##TALMIroningTestContact, ##TALMIroningDieTestContact, + #TLargeDisplacementPatchTestHexa, + #TALMLargeDisplacementPatchTestTetra, + #TALMLargeDisplacementPatchTestHexa, ]) ) diff --git a/applications/ContactStructuralMechanicsApplication/tests/test_double_curvature_integration.py b/applications/ContactStructuralMechanicsApplication/tests/test_double_curvature_integration.py index 39b9b0da2de0..a0381d85bee0 100755 --- a/applications/ContactStructuralMechanicsApplication/tests/test_double_curvature_integration.py +++ b/applications/ContactStructuralMechanicsApplication/tests/test_double_curvature_integration.py @@ -12,100 +12,170 @@ class TestDoubleCurvatureIntegration(KratosUnittest.TestCase): def setUp(self): pass - def test_double_curvature_integration(self): - input_filename = os.path.dirname(os.path.realpath(__file__)) + "/integration_tests/test_double_curvature_integration" - - main_model_part = KratosMultiphysics.ModelPart("Structure") + def __base_test_integration(self, input_filename, num_nodes): + self.main_model_part = KratosMultiphysics.ModelPart("Structure") - main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.DISPLACEMENT) - main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.REACTION) - main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.NORMAL) - main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.NORMAL_CONTACT_STRESS) - main_model_part.AddNodalSolutionStepVariable(ContactStructuralMechanicsApplication.WEIGHTED_GAP) - main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.NODAL_H) + self.main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.DISPLACEMENT) + self.main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.REACTION) + self.main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.NORMAL) + self.main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.NORMAL_CONTACT_STRESS) + self.main_model_part.AddNodalSolutionStepVariable(ContactStructuralMechanicsApplication.WEIGHTED_GAP) + self.main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.NODAL_H) - KratosMultiphysics.ModelPartIO(input_filename).ReadModelPart(main_model_part) + KratosMultiphysics.ModelPartIO(input_filename).ReadModelPart(self.main_model_part) - KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_X, KratosMultiphysics.REACTION_X,main_model_part) - KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_Y, KratosMultiphysics.REACTION_Y,main_model_part) - KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_Z, KratosMultiphysics.REACTION_Z,main_model_part) - KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.NORMAL_CONTACT_STRESS, ContactStructuralMechanicsApplication.WEIGHTED_GAP, main_model_part) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_X, KratosMultiphysics.REACTION_X,self.main_model_part) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_Y, KratosMultiphysics.REACTION_Y,self.main_model_part) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_Z, KratosMultiphysics.REACTION_Z,self.main_model_part) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.NORMAL_CONTACT_STRESS, ContactStructuralMechanicsApplication.WEIGHTED_GAP, self.main_model_part) - if (main_model_part.HasSubModelPart("Contact")): - interface_model_part = main_model_part.GetSubModelPart("Contact") + if (self.main_model_part.HasSubModelPart("Contact")): + interface_model_part = self.main_model_part.GetSubModelPart("Contact") else: - interface_model_part = main_model_part.CreateSubModelPart("Contact") + interface_model_part = self.main_model_part.CreateSubModelPart("Contact") - contact_model_part = main_model_part.GetSubModelPart("DISPLACEMENT_Displacement_Auto2") + self.contact_model_part = self.main_model_part.GetSubModelPart("DISPLACEMENT_Displacement_Auto2") - for node in contact_model_part.Nodes: + for node in self.contact_model_part.Nodes: node.Set(KratosMultiphysics.SLAVE, False) del(node) - model_part_slave = main_model_part.GetSubModelPart("Parts_Parts_Auto1") + model_part_slave = self.main_model_part.GetSubModelPart("Parts_Parts_Auto1") for node in model_part_slave.Nodes: node.Set(KratosMultiphysics.SLAVE, True) del(node) - for prop in main_model_part.GetProperties(): + for prop in self.main_model_part.GetProperties(): prop[ContactStructuralMechanicsApplication.INTEGRATION_ORDER_CONTACT] = 3 prop[ContactStructuralMechanicsApplication.ACTIVE_CHECK_FACTOR] = 3.0e-1 - for node in contact_model_part.Nodes: + for node in self.contact_model_part.Nodes: node.Set(KratosMultiphysics.INTERFACE, True) - Preprocess = ContactStructuralMechanicsApplication.InterfacePreprocessCondition(main_model_part) + Preprocess = ContactStructuralMechanicsApplication.InterfacePreprocessCondition(self.main_model_part) interface_parameters = KratosMultiphysics.Parameters("""{"condition_name": "", "final_string": "", "simplify_geometry": false}""") interface_parameters["condition_name"].SetString("ALMFrictionlessMortarContact") - Preprocess.GenerateInterfacePart3D(main_model_part, contact_model_part, interface_parameters) + Preprocess.GenerateInterfacePart3D(self.main_model_part, self.contact_model_part, interface_parameters) # We copy the conditions to the ContactSubModelPart - for cond in contact_model_part.Conditions: + for cond in self.contact_model_part.Conditions: interface_model_part.AddCondition(cond) del(cond) - for node in contact_model_part.Nodes: + for node in self.contact_model_part.Nodes: interface_model_part.AddNode(node, 0) del(node) # We initialize the conditions - alm_init_var = ContactStructuralMechanicsApplication.ALMFastInit(contact_model_part) + alm_init_var = ContactStructuralMechanicsApplication.ALMFastInit(self.contact_model_part) alm_init_var.Execute() search_parameters = KratosMultiphysics.Parameters(""" { - "search_factor" : 2.5, + "search_factor" : 3.5, "allocation_size" : 1000, "type_search" : "InRadius", "use_exact_integration" : true } """) - contact_search = ContactStructuralMechanicsApplication.TreeContactSearch(main_model_part, search_parameters) + contact_search = ContactStructuralMechanicsApplication.TreeContactSearch(self.main_model_part, search_parameters) # We initialize the search utility contact_search.CreatePointListMortar() contact_search.InitializeMortarConditions() contact_search.UpdateMortarConditions() - ## DEBUG - #self.__post_process(main_model_part) - #exact_integration = KratosMultiphysics.ExactMortarIntegrationUtility3D3N(3, True) + if (num_nodes == 3): + ## DEBUG + #self.__post_process() + #self.exact_integration = KratosMultiphysics.ExactMortarIntegrationUtility3D3N(3, True) + #print(self.main_model_part) + + self.exact_integration = KratosMultiphysics.ExactMortarIntegrationUtility3D3N(3) + else: + ## DEBUG + #self.__post_process() + #self.exact_integration = KratosMultiphysics.ExactMortarIntegrationUtility3D4N(3, True) + #print(self.main_model_part) + + self.exact_integration = KratosMultiphysics.ExactMortarIntegrationUtility3D4N(3) - exact_integration = KratosMultiphysics.ExactMortarIntegrationUtility3D3N(3) + def _double_curvature_tests(self, input_filename, num_nodes, list_of_border_cond): - # These conditions are in the border, and can not be integrated 100% accurate - list_of_border_cond = [1262,1263,1264,1265,1269,1270,1273,1275,1278,1282,1284,1285,1286,1288,1290,1291,1292,1294,1295,1297,1298,1302,1303,1305,1306,1307,1310,1313,1314,1318,1319,1320,1323,1325,1327,1328,1329,1331,1336,1337,1338,1340,1341,1342,1343,1344,1346,1347,1348,1349,1350,1353,1355,1357,1359,1360,1366,1367,1368,1369,1370,1377,1378,1379,1381,1382,1384,1385,1387,1393,1394,1395,1399,1400,1406,1410,1411,1412,1414,1415,1418,1419,1420,1424,1427,1429,1431,1436,1438,1444,1446,1447,1448,1449,1459,1462,1463,1465,1467,1468,1474,1477,1479,1485,1491,1493,1507,1515,1517,1531,1537,1539,1547,1549,1553,1563,1569,1575,1623,1640,1644,1654,1656,1663,1667,1675,1685,1687,1693,1697,1703,1707,1713,1715,1717,1719,1721,1723,1725] + self.__base_test_integration(input_filename, num_nodes) - for cond in contact_model_part.Conditions: + #print("Solution obtained") + tolerance = 5.0e-3 + for cond in self.contact_model_part.Conditions: if cond.Is(KratosMultiphysics.SLAVE): to_test = (cond.Id in list_of_border_cond) if (to_test == False): - area = exact_integration.TestGetExactAreaIntegration(cond) - condition_area = cond.GetArea() - self.assertAlmostEqual(area, condition_area,3) - - def __post_process(self, main_model_part): + area = self.exact_integration.TestGetExactAreaIntegration(cond) + condition_area = cond.GetArea() + check_value = abs((area - condition_area)/condition_area) + if (check_value > tolerance): + print(cond.Id,"\t",area,"\t", condition_area,"\t", self.__sci_str(check_value)) + else: + self.assertLess(check_value, tolerance) + + def _moving_nodes_tests(self, input_filename, num_nodes): + + self.__base_test_integration(input_filename, num_nodes) + + for iter in range(1): + delta_disp = 1.0e-6 + for node in self.main_model_part.GetSubModelPart("GroupPositiveX").Nodes: + #node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, (iter + 1) * delta_disp) + node.X += delta_disp + del(node) + for node in self.main_model_part.GetSubModelPart("GroupPositiveY").Nodes: + #node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, (iter + 1) * delta_disp) + node.Y += delta_disp + del(node) + for node in self.main_model_part.GetSubModelPart("GroupNegativeX").Nodes: + #node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, (iter + 1) * -delta_disp) + node.X -= delta_disp + del(node) + for node in self.main_model_part.GetSubModelPart("GroupNegativeY").Nodes: + #node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, (iter + 1) * -delta_disp) + node.Y -= delta_disp + del(node) + + #print("Solution obtained") + tolerance = 1.0e-5 + for cond in self.contact_model_part.Conditions: + if cond.Is(KratosMultiphysics.SLAVE): + area = self.exact_integration.TestGetExactAreaIntegration(cond) + condition_area = cond.GetArea() + check_value = abs((area - condition_area)/condition_area) + if (check_value > tolerance): + print(cond.Id,"\t",area,"\t", condition_area,"\t", self.__sci_str(check_value)) + else: + self.assertLess(check_value, tolerance) + + def test_double_curvature_integration_triangle(self): + input_filename = os.path.dirname(os.path.realpath(__file__)) + "/integration_tests/test_double_curvature_integration_triangle" + + # These conditions are in the border, and can not be integrated 100% accurate + list_of_border_cond = [1262,1263,1264,1265,1269,1270,1273,1275,1278,1282,1284,1285,1286,1288,1290,1291,1292,1294,1295,1297,1298,1302,1303,1305,1306,1307,1310,1313,1314,1318,1319,1320,1323,1325,1327,1328,1329,1331,1336,1337,1338,1340,1341,1342,1343,1344,1346,1347,1348,1349,1350,1353,1355,1357,1359,1360,1366,1367,1368,1369,1370,1377,1378,1379,1381,1382,1384,1385,1387,1393,1394,1395,1399,1400,1406,1410,1411,1412,1414,1415,1418,1419,1420,1424,1427,1429,1431,1436,1438,1444,1446,1447,1448,1449,1459,1462,1463,1465,1467,1468,1474,1477,1479,1485,1491,1493,1507,1515,1517,1531,1537,1539,1547,1549,1553,1563,1569,1575,1623,1640,1644,1654,1656,1663,1667,1675,1685,1687,1693,1697,1703,1707,1713,1715,1717,1719,1721,1723,1725] + + self._double_curvature_tests(input_filename, 3, list_of_border_cond) + + def test_double_curvature_integration_quad(self): + input_filename = os.path.dirname(os.path.realpath(__file__)) + "/integration_tests/test_double_curvature_integration_quadrilateral" + + # These conditions are in the border, and can not be integrated 100% accurate + list_of_border_cond = [916,917,919,920,923,925,927,929,933,934,938,940,941,944,945,946,949,951,954,955,962,963,965,966,967,968,969,970,971,973,974,977,978,979,980,981,982,983,984,985,986,988,989,990,995,996,1000,1003,1005,1007,1008,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1058,1060,1064,1066,1069,1070,1071,1072,1073,1074,1075,1076] + + self._double_curvature_tests(input_filename, 4, list_of_border_cond) + + def test_moving_mesh_integration_quad(self): + input_filename = os.path.dirname(os.path.realpath(__file__)) + "/integration_tests/quadrilaterals_moving_nodes" + + self._moving_nodes_tests(input_filename, 4) + + def __post_process(self): from gid_output_process import GiDOutputProcess - self.gid_output = GiDOutputProcess(main_model_part, + self.gid_output = GiDOutputProcess(self.main_model_part, "gid_output", KratosMultiphysics.Parameters(""" { @@ -113,7 +183,7 @@ def __post_process(self, main_model_part): "gidpost_flags": { "GiDPostMode": "GiD_PostBinary", "WriteDeformedMeshFlag": "WriteUndeformed", - "WriteConditionsFlag": "WriteConditions", + "WriteConditionsFlag": "WriteConditionsOnly", "MultiFileFlag": "SingleFile" }, "nodal_results" : ["DISPLACEMENT","NORMAL_CONTACT_STRESS","WEIGHTED_GAP"], @@ -130,11 +200,18 @@ def __post_process(self, main_model_part): self.gid_output.PrintOutput() self.gid_output.ExecuteFinalizeSolutionStep() self.gid_output.ExecuteFinalize() + + def __sci_str(self, x): + from decimal import Decimal + s = 10*Decimal(str(x)) + s = ('{:.' + str(len(s.normalize().as_tuple().digits) - 1) + 'E}').format(s) + s = s.replace('E+','D0') + s = s.replace('E-','D0-') + s = s.replace('.','') + if s.startswith('-'): + return '-.' + s[1:] + else: + return '.' + s if __name__ == '__main__': KratosUnittest.main() - - - - - diff --git a/applications/ContactStructuralMechanicsApplication/tests/test_integration.cpp b/applications/ContactStructuralMechanicsApplication/tests/test_integration.cpp index de4f0148cd7a..fa462f45a4af 100644 --- a/applications/ContactStructuralMechanicsApplication/tests/test_integration.cpp +++ b/applications/ContactStructuralMechanicsApplication/tests/test_integration.cpp @@ -32,7 +32,7 @@ #include "integration/quadrilateral_gauss_legendre_integration_points.h" /* Utilities */ -#include "custom_utilities/contact_utilities.h" +#include "utilities/mortar_utilities.h" #include "utilities/exact_mortar_segmentation_utility.h" namespace Kratos @@ -40,7 +40,7 @@ namespace Kratos namespace Testing { - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryNodeType; typedef Geometry GeometryPointType; @@ -580,8 +580,8 @@ namespace Kratos // Before clipping we rotate to a XY plane for (unsigned int i_node = 0; i_node < 3; i_node++) { - ContactUtilities::RotatePoint( aux_geometry[i_node], center, slave_tangent_xi, slave_tangent_eta, false); - ContactUtilities::RotatePoint( aux_geometry[i_node], center, slave_tangent_xi, slave_tangent_eta, true); + MortarUtilities::RotatePoint( aux_geometry[i_node], center, slave_tangent_xi, slave_tangent_eta, false); + MortarUtilities::RotatePoint( aux_geometry[i_node], center, slave_tangent_xi, slave_tangent_eta, true); } const double tolerance = 1.0e-6; diff --git a/applications/DEM_application/DEM_application.cpp b/applications/DEM_application/DEM_application.cpp index 12b52c0a7285..d4c4159919aa 100755 --- a/applications/DEM_application/DEM_application.cpp +++ b/applications/DEM_application/DEM_application.cpp @@ -244,6 +244,10 @@ namespace Kratos KRATOS_CREATE_VARIABLE(double, GLOBAL_DAMPING) KRATOS_CREATE_VARIABLE(double, NORMAL_IMPACT_VELOCITY) KRATOS_CREATE_VARIABLE(double, TANGENTIAL_IMPACT_VELOCITY) + KRATOS_CREATE_VARIABLE(double, FACE_NORMAL_IMPACT_VELOCITY) + KRATOS_CREATE_VARIABLE(double, FACE_TANGENTIAL_IMPACT_VELOCITY) + KRATOS_CREATE_VARIABLE(double, LINEAR_IMPULSE) + // *************** Continuum only BEGIN ************* KRATOS_CREATE_3D_VARIABLE_WITH_COMPONENTS(INITIAL_ROTA_MOMENT) @@ -619,6 +623,10 @@ namespace Kratos KRATOS_REGISTER_VARIABLE(GLOBAL_DAMPING) KRATOS_REGISTER_VARIABLE(NORMAL_IMPACT_VELOCITY) KRATOS_REGISTER_VARIABLE(TANGENTIAL_IMPACT_VELOCITY) + KRATOS_REGISTER_VARIABLE(FACE_NORMAL_IMPACT_VELOCITY) + KRATOS_REGISTER_VARIABLE(FACE_TANGENTIAL_IMPACT_VELOCITY) + KRATOS_REGISTER_VARIABLE(LINEAR_IMPULSE) + // *************** Continuum only BEGIN ************* KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS(INITIAL_ROTA_MOMENT) diff --git a/applications/DEM_application/DEM_application_variables.h b/applications/DEM_application/DEM_application_variables.h index b78448618040..0553b1bf576d 100644 --- a/applications/DEM_application/DEM_application_variables.h +++ b/applications/DEM_application/DEM_application_variables.h @@ -233,6 +233,10 @@ namespace Kratos KRATOS_DEFINE_VARIABLE(double, GLOBAL_DAMPING) KRATOS_DEFINE_VARIABLE(double, NORMAL_IMPACT_VELOCITY) KRATOS_DEFINE_VARIABLE(double, TANGENTIAL_IMPACT_VELOCITY) + KRATOS_DEFINE_VARIABLE(double, FACE_NORMAL_IMPACT_VELOCITY) + KRATOS_DEFINE_VARIABLE(double, FACE_TANGENTIAL_IMPACT_VELOCITY) + KRATOS_DEFINE_VARIABLE(double, LINEAR_IMPULSE) + // *************** Continuum only BEGIN ************* diff --git a/applications/DEM_application/custom_conditions/RigidEdge.cpp b/applications/DEM_application/custom_conditions/RigidEdge.cpp index c13a00314902..f4aaf930029b 100644 --- a/applications/DEM_application/custom_conditions/RigidEdge.cpp +++ b/applications/DEM_application/custom_conditions/RigidEdge.cpp @@ -33,8 +33,8 @@ RigidEdge3D::RigidEdge3D( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ) : DEMWall( NewId, pGeometry, pProperties ) diff --git a/applications/DEM_application/custom_conditions/RigidEdge.h b/applications/DEM_application/custom_conditions/RigidEdge.h index 35e104d0581f..eee58368ab1c 100644 --- a/applications/DEM_application/custom_conditions/RigidEdge.h +++ b/applications/DEM_application/custom_conditions/RigidEdge.h @@ -48,8 +48,8 @@ class RigidEdge3D : public DEMWall PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ); /** diff --git a/applications/DEM_application/custom_elements/analytic_spheric_particle.cpp b/applications/DEM_application/custom_elements/analytic_spheric_particle.cpp index 2465badb7cb0..37d4ec203a39 100644 --- a/applications/DEM_application/custom_elements/analytic_spheric_particle.cpp +++ b/applications/DEM_application/custom_elements/analytic_spheric_particle.cpp @@ -50,14 +50,22 @@ AnalyticSphericParticle::AnalyticSphericParticle(Element::Pointer p_spheric_part } -int AnalyticSphericParticle::GetNumberOfCollisions() -{ - return mNumberOfCollidingSpheres; -} +int AnalyticSphericParticle::GetNumberOfCollisions(){return mNumberOfCollidingSpheres;} +int AnalyticSphericParticle::GetNumberOfCollisionsWithFaces(){return mNumberOfCollidingSpheresWithFaces;} +int AnalyticSphericParticle::GetNumberOfCollisionsWithEdges(){return mNumberOfCollidingSpheresWithEdges;} + +array_1d &AnalyticSphericParticle::GetCollidingIds(){return mCollidingIds;} +array_1d &AnalyticSphericParticle::GetCollidingFaceIds(){return mCollidingFaceIds;} +array_1d &AnalyticSphericParticle::GetCollidingNormalRelativeVelocity(){return mCollidingNormalVelocities;} +array_1d &AnalyticSphericParticle::GetCollidingFaceNormalRelativeVelocity(){return mCollidingFaceNormalVelocities;} +array_1d &AnalyticSphericParticle::GetCollidingTangentialRelativeVelocity(){return mCollidingTangentialVelocities;} +array_1d &AnalyticSphericParticle::GetCollidingFaceTangentialRelativeVelocity(){return mCollidingFaceTangentialVelocities;} +array_1d &AnalyticSphericParticle::GetCollidingLinearImpulse(){return mCollidingLinearImpulse;} -void AnalyticSphericParticle::GetCollidingIds(array_1d& colliding_ids) +/* +void AnalyticSphericParticle::GetCollidingFaceIds(array_1d& colliding_ids_with_walls) { - colliding_ids = mCollidingIds; + colliding_ids_with_walls = mCollidingFaceIds; } void AnalyticSphericParticle::GetCollidingNormalRelativeVelocity(array_1d& colliding_normal_vel) @@ -65,27 +73,52 @@ void AnalyticSphericParticle::GetCollidingNormalRelativeVelocity(array_1d& colliding_normal_vel) +{ + colliding_normal_vel = mCollidingFaceNormalVelocities; +} + void AnalyticSphericParticle::GetCollidingTangentialRelativeVelocity(array_1d& colliding_tangential_vel) { colliding_tangential_vel = mCollidingTangentialVelocities; } +void AnalyticSphericParticle::GetCollidingFaceTangentialRelativeVelocity(array_1d& colliding_tangential_vel) +{ + colliding_tangential_vel = mCollidingFaceTangentialVelocities; +} + +void AnalyticSphericParticle::GetCollidingLinearImpulse(array_1d& colliding_linear_impulse) +{ + colliding_linear_impulse = mCollidingLinearImpulse; +} +*/ + void AnalyticSphericParticle::ClearImpactMemberVariables() { mNumberOfCollidingSpheres = 0; + mNumberOfCollidingSpheresWithFaces = 0; + mNumberOfCollidingSpheresWithEdges = 0; for (unsigned int i = 0; i < 4; ++i){ mCollidingIds[i] = 0; mCollidingRadii[i] = 0.0; mCollidingNormalVelocities[i] = 0.0; mCollidingTangentialVelocities[i] = 0.0; + mCollidingLinearImpulse[i] = 0.0; + + mCollidingFaceIds[i] = 0; + mCollidingFaceNormalVelocities[i] = 0.0; + mCollidingFaceTangentialVelocities[i] = 0.0; + mCollidingFaceSecondTangentialVelocities[i] = 0.0; + //mCollidingFaceCollisionTypes[i] = "f"; + } } Element::Pointer AnalyticSphericParticle::Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const { GeometryType::Pointer p_geom = GetGeometry().Create(ThisNodes); - KRATOS_WATCH(NewId) return Element::Pointer(new AnalyticSphericParticle(NewId, p_geom, pProperties)); } @@ -95,11 +128,19 @@ void AnalyticSphericParticle::PushBackIdToContactingNeighbours(BaseBufferType & GetPointerToDerivedDataBuffer(data_buffer)->mCurrentContactingNeighbourIds.push_back(id); } +void AnalyticSphericParticle::PushBackIdToContactingFaceNeighbours(BaseBufferType & data_buffer, int p_wall_id) +{ + GetPointerToDerivedDataBuffer(data_buffer)->mCurrentContactingFaceNeighbourIds.push_back(p_wall_id); +} + + void AnalyticSphericParticle::ClearNeighbours(BaseBufferType & data_buffer) { GetPointerToDerivedDataBuffer(data_buffer)->mCurrentContactingNeighbourIds.clear(); + GetPointerToDerivedDataBuffer(data_buffer)->mCurrentContactingFaceNeighbourIds.clear(); } + void AnalyticSphericParticle::EvaluateBallToBallForcesForPositiveIndentiations(SphericParticle::ParticleDataBuffer & data_buffer, const ProcessInfo& r_process_info, double LocalElasticContactForce[3], @@ -124,14 +165,14 @@ void AnalyticSphericParticle::EvaluateBallToBallForcesForPositiveIndentiations(S indentation, ViscoDampingLocalContactForce, cohesive_force, - p_neighbour_element, + p_neighbour_element, // ALREADY INCLUDED IN DATABUFFER sliding, LocalCoordSystem, OldLocalCoordSystem, neighbour_elastic_contact_force); const auto id = data_buffer.mpOtherParticle->Id(); - + if (IsNewNeighbour(id)){ RecordNewImpact(data_buffer); } @@ -140,25 +181,130 @@ void AnalyticSphericParticle::EvaluateBallToBallForcesForPositiveIndentiations(S } -bool AnalyticSphericParticle::IsNewNeighbour(const int nighbour_id) +void AnalyticSphericParticle::ComputeBallToRigidFaceContactForce(SphericParticle::ParticleDataBuffer & data_buffer, + array_1d& r_elastic_force, + array_1d& r_contact_force, + double& RollingResistance, + array_1d& rigid_element_force, + ProcessInfo& r_process_info, + int search_control) + { - const bool already_in_contact = std::find(mContactingNeighbourIds.begin(), mContactingNeighbourIds.end(), nighbour_id) != mContactingNeighbourIds.end(); + SphericParticle::ComputeBallToRigidFaceContactForce(data_buffer, + r_elastic_force, + r_contact_force, + RollingResistance, + rigid_element_force, + r_process_info, + search_control); + + + //const auto face_id = data_buffer.mNeighbourRigidFaces->Id(); //definir neighbor wall id + + std::vector& rNeighbours = this->mNeighbourRigidFaces; + + for (unsigned int i = 0; i < rNeighbours.size(); i++) { + DEMWall* p_wall = rNeighbours[i]; + if(p_wall == NULL) continue; + if(p_wall->IsPhantom()){ + p_wall->CheckSide(this); + continue; + } + int p_wall_id; + p_wall_id = p_wall->Id(); + if (IsNewFaceNeighbour(p_wall_id)){ + + RecordNewFaceImpact(data_buffer); + } + PushBackIdToContactingFaceNeighbours(data_buffer, int(p_wall_id)); + } +} + + +bool AnalyticSphericParticle::IsNewNeighbour(const int neighbour_id) +{ + const bool already_in_contact = std::find(mContactingNeighbourIds.begin(), mContactingNeighbourIds.end(), neighbour_id) != mContactingNeighbourIds.end(); return !already_in_contact; } + bool AnalyticSphericParticle::IsNewFaceNeighbour(const int p_wall_id) +{ + bool const already_in_contact = std::find(mContactingFaceNeighbourIds.begin(), mContactingFaceNeighbourIds.end(), p_wall_id) != mContactingFaceNeighbourIds.end(); + return !already_in_contact; +} + void AnalyticSphericParticle::RecordNewImpact(BaseBufferType & data_buffer) { mCollidingIds[mNumberOfCollidingSpheres] = data_buffer.mpOtherParticle->Id(); mCollidingRadii[mNumberOfCollidingSpheres] = data_buffer.mOtherRadius; mCollidingNormalVelocities[mNumberOfCollidingSpheres] = data_buffer.mLocalRelVel[2]; mCollidingTangentialVelocities[mNumberOfCollidingSpheres] = std::sqrt(data_buffer.mLocalRelVel[0] * data_buffer.mLocalRelVel[0] + data_buffer.mLocalRelVel[1] * data_buffer.mLocalRelVel[1]); + + /* + double mass = GetMass(); + double other_mass = data_buffer.mpOtherParticle->GetMass(); + + const array_1d& vel = this->GetGeometry()[0].FastGetSolutionStepValue(VELOCITY); + //array_1d local_vel; + //GeometryFunctions::VectorGlobal2Local(LocalCoordSystem, vel, local_vel); + //double v_pre = local_vel[2]; + double v_pre = vel[2]; + double other_v_pre = v_pre - data_buffer.mLocalRelVel[2]; + + double p1 = mass * v_pre; + double p2 = other_mass * other_v_pre; + double q1 = mass * v_pre * v_pre; + double q2 = other_mass * other_v_pre * other_v_pre; + + double a = (p1*p2)/other_mass; + double b = mass/other_mass; + double c = (q1*q2)/mass; + + double v_post_1 = (2*a + sqrt(4*a*a-4*(1+b)*(a*a/b-c))) / (2*(1+b)); + //double v_post_2 = (2*a - sqrt(4*a*a-4*(1+b)*(a*a/b-c))) / (2*(1+b)); + //criteri per decidir la solucio correcta + double LinearImpulse = mass * (v_post_1 - v_pre); + */ + mCollidingLinearImpulse[mNumberOfCollidingSpheres] = 0.0; ++mNumberOfCollidingSpheres; } + void AnalyticSphericParticle::RecordNewFaceImpact(BaseBufferType & data_buffer) +{ + + mCollidingFaceNormalVelocities[mNumberOfCollidingSpheresWithFaces] = data_buffer.mLocalRelVel[2]; + mCollidingFaceTangentialVelocities[mNumberOfCollidingSpheresWithFaces] = std::sqrt(data_buffer.mLocalRelVel[0] * data_buffer.mLocalRelVel[0] + data_buffer.mLocalRelVel[1] * data_buffer.mLocalRelVel[1]); + ++mNumberOfCollidingSpheresWithFaces; + + + // //char impact_type = data_buffer.mImpactType; WORK IN PROGRESS + // if (impact_type == "f") + // { + // mCollidingFaceNormalVelocities[mNumberOfCollidingSpheresWithFaces] = data_buffer.mLocalRelVel[2]; + // mCollidingFaceTangentialVelocities[mNumberOfCollidingSpheresWithFaces] = std::sqrt(data_buffer.mLocalRelVel[0] * data_buffer.mLocalRelVel[0] + data_buffer.mLocalRelVel[1] * data_buffer.mLocalRelVel[1]); + // ++mNumberOfCollidingSpheresWithFaces; + // } + // else if (impact_type == "e"){ // investigate correct components + // // mCollidingEdgeNormalVelocities[mNumberOfCollidingSpheresWithEdges] = data_buffer.mLocalRelVel[2]; + // // mCollidingEdgeVelocitiesAlongEdge[mNumberOfCollidingSpheresWithEdges] = data_buffer.mLocalRelVel[0]; + // // mCollidingEdgeVelocitiesTransverseToEdge[mNumberOfCollidingSpheresWithEdges] = data_buffer.mLocalRelVel[1]; + // // ++mNumberOfCollidingSpheresWithEdges; + // } + // else if (impact_type == "v"){ + + // } + // else{ + + // } // To-Do kratos error + + +} + void AnalyticSphericParticle::FinalizeForceComputation(BaseType::ParticleDataBuffer & data_buffer) { mContactingNeighbourIds = AnalyticSphericParticle::GetPointerToDerivedDataBuffer(data_buffer)->mCurrentContactingNeighbourIds; + mContactingFaceNeighbourIds = AnalyticSphericParticle::GetPointerToDerivedDataBuffer(data_buffer)->mCurrentContactingFaceNeighbourIds; ClearNeighbours(data_buffer); } diff --git a/applications/DEM_application/custom_elements/analytic_spheric_particle.h b/applications/DEM_application/custom_elements/analytic_spheric_particle.h index 751fb1c6e67f..7c5acf3b2691 100644 --- a/applications/DEM_application/custom_elements/analytic_spheric_particle.h +++ b/applications/DEM_application/custom_elements/analytic_spheric_particle.h @@ -59,9 +59,25 @@ void PrintInfo(std::ostream& rOStream) const override {rOStream << "AnalyticSphe void PrintData(std::ostream& rOStream) const override {} int GetNumberOfCollisions(); -void GetCollidingIds(array_1d& colliding_ids); +int GetNumberOfCollisionsWithFaces(); +int GetNumberOfCollisionsWithEdges(); + +array_1d &GetCollidingIds(); +array_1d &GetCollidingNormalRelativeVelocity(); +array_1d &GetCollidingTangentialRelativeVelocity(); +array_1d &GetCollidingFaceIds(); +array_1d &GetCollidingFaceNormalRelativeVelocity(); +array_1d &GetCollidingFaceTangentialRelativeVelocity(); +array_1d &GetCollidingLinearImpulse(); + +/* void GetCollidingNormalRelativeVelocity(array_1d& colliding_normal_vel); void GetCollidingTangentialRelativeVelocity(array_1d& colliding_tangential_vel); +void GetCollidingFaceIds(array_1d& colliding_ids); +void GetCollidingFaceNormalRelativeVelocity(array_1d& colliding_normal_vel); +void GetCollidingFaceTangentialRelativeVelocity(array_1d& colliding_tangential_vel); +void GetCollidingLinearImpulse(array_1d& colliding_linear_impulse); +*/ protected: @@ -74,6 +90,7 @@ ParticleDataBuffer(SphericParticle* p_this_particle): SphericParticle::ParticleD virtual ~ParticleDataBuffer(){} std::vector mCurrentContactingNeighbourIds; +std::vector mCurrentContactingFaceNeighbourIds; }; std::unique_ptr CreateParticleDataBuffer(SphericParticle* p_this_particle) override @@ -84,6 +101,9 @@ std::unique_ptr CreateParticleDataBuffer(Sp void PushBackIdToContactingNeighbours(BaseBufferType &data_buffer, int id); +void PushBackIdToContactingFaceNeighbours(BaseBufferType & data_buffer, int p_wall_id); + + void ClearNeighbours(BaseBufferType & data_buffer); private: @@ -91,6 +111,8 @@ void ClearNeighbours(BaseBufferType & data_buffer); friend class Serializer; std::vector NeighboursContactStatus; unsigned int mNumberOfCollidingSpheres; +unsigned int mNumberOfCollidingSpheresWithFaces; +unsigned int mNumberOfCollidingSpheresWithEdges; /* 4 is taken as the maximum number of particles simultaneously coming into contact with this sphere. Whenever more than 4 particles happen to come into contact at @@ -103,9 +125,18 @@ array_1d mCollidingIds; array_1d mCollidingRadii; array_1d mCollidingNormalVelocities; array_1d mCollidingTangentialVelocities; +array_1d mCollidingLinearImpulse; std::vector mContactingNeighbourIds; std::unique_ptr mpDataBuffer; +array_1d mCollidingFaceIds; +array_1d mCollidingFaceNormalVelocities; +array_1d mCollidingFaceTangentialVelocities; +array_1d mCollidingFaceSecondTangentialVelocities; +array_1d mCollidingFaceCollisionTypes; +std::vector mContactingFaceNeighbourIds; + + ParticleDataBuffer* GetPointerToDerivedDataBuffer(BaseBufferType& data_buffer) { BaseBufferType *p_raw_data_buffer = &data_buffer; @@ -131,11 +162,23 @@ void EvaluateBallToBallForcesForPositiveIndentiations(SphericParticle::ParticleD double OldLocalCoordSystem[3][3], array_1d& neighbour_elastic_contact_force) override; +void ComputeBallToRigidFaceContactForce(SphericParticle::ParticleDataBuffer & data_buffer, + array_1d& r_elastic_force, + array_1d& r_contact_force, + double& RollingResistance, + array_1d& rigid_element_force, + ProcessInfo& r_process_info, + int search_control) override; + -bool IsNewNeighbour(const int nighbour_id); +bool IsNewNeighbour(const int neighbour_id); + +bool IsNewFaceNeighbour(const int neighbour_id); void RecordNewImpact(BaseType::ParticleDataBuffer & data_buffer); +void RecordNewFaceImpact(BaseType::ParticleDataBuffer & data_buffer); + void save(Serializer& rSerializer) const override { KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, SphericParticle); diff --git a/applications/DEM_application/custom_elements/spheric_continuum_particle.cpp b/applications/DEM_application/custom_elements/spheric_continuum_particle.cpp index aaef5a781d44..e2e6d99c552d 100644 --- a/applications/DEM_application/custom_elements/spheric_continuum_particle.cpp +++ b/applications/DEM_application/custom_elements/spheric_continuum_particle.cpp @@ -125,8 +125,8 @@ namespace Kratos { int ContactType = -1; array_1d& Weight = this->mContactConditionWeights[i]; - ComputeConditionRelativeData(i,rFemNeighbours[i], LocalCoordSystem, DistPToB, Weight, wall_delta_disp_at_contact_point, wall_velocity_at_contact_point, ContactType); - + rFemNeighbours[i]->ComputeConditionRelativeData(i, this, LocalCoordSystem, DistPToB, Weight, wall_delta_disp_at_contact_point, wall_velocity_at_contact_point, ContactType); + double initial_delta = -(DistPToB - GetRadius()); mFemIniNeighbourIds[i] = rFemNeighbours[i]->Id(); diff --git a/applications/DEM_application/custom_elements/spheric_particle.cpp b/applications/DEM_application/custom_elements/spheric_particle.cpp index ecb74c354fbd..fb92a7009c6d 100644 --- a/applications/DEM_application/custom_elements/spheric_particle.cpp +++ b/applications/DEM_application/custom_elements/spheric_particle.cpp @@ -188,7 +188,7 @@ void SphericParticle::CalculateRightHandSide(ProcessInfo& r_process_info, double ComputeBallToBallContactForce(data_buffer, r_process_info, elastic_force, contact_force, RollingResistance); - ComputeBallToRigidFaceContactForce(elastic_force, contact_force, RollingResistance, rigid_element_force, r_process_info, data_buffer.mDt, search_control); + ComputeBallToRigidFaceContactForce(data_buffer, elastic_force, contact_force, RollingResistance, rigid_element_force, r_process_info, search_control); if (this->IsNot(DEMFlags::BELONGS_TO_A_CLUSTER)){ ComputeAdditionalForces(additional_forces, additionally_applied_moment, r_process_info, gravity); @@ -284,8 +284,10 @@ void SphericParticle::CalculateMaxBallToFaceIndentation(double& r_current_max_in int ContactType = -1; array_1d& Weight = this->mContactConditionWeights[i]; - ComputeConditionRelativeData(i,rNeighbours[i], LocalCoordSystem, DistPToB, Weight, wall_delta_disp_at_contact_point, wall_velocity_at_contact_point, ContactType); + //ComputeConditionRelativeData(i,rNeighbours[i], LocalCoordSystem, DistPToB, Weight, wall_delta_disp_at_contact_point, wall_velocity_at_contact_point, ContactType); + rNeighbours[i]->ComputeConditionRelativeData(i, this, LocalCoordSystem, DistPToB, Weight, wall_delta_disp_at_contact_point, wall_velocity_at_contact_point, ContactType); + if(ContactType > 0){ double indentation = GetInteractionRadius() - DistPToB; r_current_max_indentation = (indentation > r_current_max_indentation) ? indentation : r_current_max_indentation; @@ -782,17 +784,17 @@ void SphericParticle::EvaluateBallToBallForcesForPositiveIndentiations(SphericPa ViscoDampingLocalContactForce, cohesive_force, this, p_neighbour_element, sliding, LocalCoordSystem); } -void SphericParticle::ComputeBallToRigidFaceContactForce(array_1d& r_elastic_force, +void SphericParticle::ComputeBallToRigidFaceContactForce(SphericParticle::ParticleDataBuffer & data_buffer, + array_1d& r_elastic_force, array_1d& r_contact_force, double& RollingResistance, array_1d& rigid_element_force, - ProcessInfo& r_process_info, - double mTimeStep, + ProcessInfo& r_process_info, int search_control) { KRATOS_TRY - RenewData(); + RenewData(); std::vector& rNeighbours = this->mNeighbourRigidFaces; array_1d vel = GetGeometry()[0].FastGetSolutionStepValue(VELOCITY); @@ -897,7 +899,7 @@ void SphericParticle::ComputeBallToRigidFaceContactForce(array_1d& r_ const double area = KRATOS_M_PI * GetInteractionRadius() * GetInteractionRadius(); const double density = GetDensity(); const double inverse_of_volume = 1.0 / (4.0 * 0.333333333333333 * area * GetInteractionRadius()); - ComputeWear(LocalCoordSystem, vel, DeltVel, mTimeStep, density, sliding, inverse_of_volume, LocalElasticContactForce[2], wall); + ComputeWear(LocalCoordSystem, vel, DeltVel, data_buffer.mDt, density, sliding, inverse_of_volume, LocalElasticContactForce[2], wall); } //wall->GetProperties()[COMPUTE_WEAR] if if (this->Is(DEMFlags::HAS_STRESS_TENSOR)) { @@ -913,7 +915,7 @@ void SphericParticle::RenewData() { //To be redefined } -void SphericParticle::ComputeConditionRelativeData(int rigid_neighbour_index, +void SphericParticle::ComputeConditionRelativeData(int rigid_neighbour_index, // check for delete DEMWall* const wall, double LocalCoordSystem[3][3], double& DistPToB, diff --git a/applications/DEM_application/custom_elements/spheric_particle.h b/applications/DEM_application/custom_elements/spheric_particle.h index e97029539325..382a9f467a6b 100644 --- a/applications/DEM_application/custom_elements/spheric_particle.h +++ b/applications/DEM_application/custom_elements/spheric_particle.h @@ -99,6 +99,9 @@ array_1d mDomainMin; array_1d mDomainMax; SphericParticle* mpThisParticle; SphericParticle* mpOtherParticle; + +std::vector mNeighbourRigidFaces; + }; typedef std::unique_ptr BufferPointerType; @@ -256,6 +259,7 @@ double mInelasticFrictionalEnergy; double mInelasticViscodampingEnergy; std::vector mNeighbourElements; std::vector mContactingNeighbourIds; +std::vector mContactingFaceNeighbourIds; std::vector mNeighbourRigidFaces; std::vector mNeighbourPotentialRigidFaces; @@ -285,13 +289,13 @@ std::vector mFemOldNeighbourIds; SphericParticle(); -virtual void ComputeBallToRigidFaceContactForce(array_1d& rElasticForce, +virtual void ComputeBallToRigidFaceContactForce(ParticleDataBuffer & data_buffer, + array_1d& rElasticForce, array_1d& rContactForce, double& RollingResistance, array_1d& rigid_element_force, - ProcessInfo& r_process_info, - double mTimeStep, - int search_control) final; + ProcessInfo& r_process_info, + int search_control) ; virtual void InitializeSolutionStep(ProcessInfo& r_process_info) override; diff --git a/applications/DEM_application/custom_python/DEM_python_application.cpp b/applications/DEM_application/custom_python/DEM_python_application.cpp index 21bb886eeb67..3fbcc0f39a18 100755 --- a/applications/DEM_application/custom_python/DEM_python_application.cpp +++ b/applications/DEM_application/custom_python/DEM_python_application.cpp @@ -228,6 +228,9 @@ BOOST_PYTHON_MODULE(KratosDEMApplication) KRATOS_REGISTER_IN_PYTHON_VARIABLE(GLOBAL_DAMPING) KRATOS_REGISTER_IN_PYTHON_VARIABLE(NORMAL_IMPACT_VELOCITY) KRATOS_REGISTER_IN_PYTHON_VARIABLE(TANGENTIAL_IMPACT_VELOCITY) + KRATOS_REGISTER_IN_PYTHON_VARIABLE(FACE_NORMAL_IMPACT_VELOCITY) + KRATOS_REGISTER_IN_PYTHON_VARIABLE(FACE_TANGENTIAL_IMPACT_VELOCITY) + KRATOS_REGISTER_IN_PYTHON_VARIABLE(LINEAR_IMPULSE) // *************** Continuum only BEGIN ************* KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS(INITIAL_ROTA_MOMENT) diff --git a/applications/DEM_application/custom_python/add_custom_utilities_to_python.cpp b/applications/DEM_application/custom_python/add_custom_utilities_to_python.cpp index d3ecd762339c..fc5ac2a974ed 100755 --- a/applications/DEM_application/custom_python/add_custom_utilities_to_python.cpp +++ b/applications/DEM_application/custom_python/add_custom_utilities_to_python.cpp @@ -228,6 +228,7 @@ void AddCustomUtilitiesToPython() { .def("GetParticleData", &AnalyticParticleWatcher::GetParticleData) .def("GetAllParticlesData", &AnalyticParticleWatcher::GetAllParticlesData) .def("SetNodalMaxImpactVelocities", &AnalyticParticleWatcher::SetNodalMaxImpactVelocities) + .def("SetNodalMaxFaceImpactVelocities", &AnalyticParticleWatcher::SetNodalMaxFaceImpactVelocities) ; class_ @@ -254,6 +255,7 @@ void AddCustomUtilitiesToPython() { .def("SetClusterInformationInProperties", &PreUtilities::SetClusterInformationInProperties) .def("CreateCartesianSpecimenMdpa", &PreUtilities::CreateCartesianSpecimenMdpa) .def("BreakBondUtility", &PreUtilities::BreakBondUtility) + .def("FillAnalyticSubModelPartUtility", &PreUtilities::FillAnalyticSubModelPartUtility) ; class_ diff --git a/applications/DEM_application/custom_utilities/analytic_tools/analytic_particle_watcher.cpp b/applications/DEM_application/custom_utilities/analytic_tools/analytic_particle_watcher.cpp index 273364cdadbd..775dbf0442db 100644 --- a/applications/DEM_application/custom_utilities/analytic_tools/analytic_particle_watcher.cpp +++ b/applications/DEM_application/custom_utilities/analytic_tools/analytic_particle_watcher.cpp @@ -25,51 +25,106 @@ typedef Kratos::AnalyticSphericParticle AnalyticParticle; void AnalyticParticleWatcher::MakeMeasurements(ModelPart& analytic_model_part) { const double current_time = analytic_model_part.GetProcessInfo()[TIME]; - ImpactsTimeStepDataBase time_step_database(current_time); + InterParticleImpactDataOfAParticle time_step_database(current_time); + FaceParticleImpactDataOfAParticle face_time_step_database(current_time); for (ElementsIteratorType i_elem = analytic_model_part.ElementsBegin(); i_elem != analytic_model_part.ElementsEnd(); ++i_elem){ AnalyticParticle& particle = dynamic_cast(*(*(i_elem.base()))); const int n_collisions = particle.GetNumberOfCollisions(); + if (n_collisions){ const int id = int(i_elem->Id()); - ParticleHistoryDatabase& particle_database = GetParticleDataBase(id); - array_1d colliding_ids; + InterParticleImpactDataOfATimeStep& particle_database = GetParticleDataBase(id); + const array_1d &colliding_ids = particle.GetCollidingIds(); + const array_1d &colliding_normal_vel = particle.GetCollidingNormalRelativeVelocity(); + const array_1d &colliding_tangential_vel = particle.GetCollidingTangentialRelativeVelocity(); + const array_1d &colliding_linear_impulse = particle.GetCollidingLinearImpulse(); + + /* array_1d colliding_normal_vel; array_1d colliding_tangential_vel; - particle.GetCollidingIds(colliding_ids); + array_1d colliding_linear_impulse; + particle.GetCollidingIds(); particle.GetCollidingNormalRelativeVelocity(colliding_normal_vel); particle.GetCollidingTangentialRelativeVelocity(colliding_tangential_vel); + particle.GetCollidingLinearImpulse(colliding_linear_impulse); + */ for (int i = 0; i < n_collisions; ++i){ time_step_database.PushBackImpacts(id, colliding_ids[i], colliding_normal_vel[i], colliding_tangential_vel[i]); - particle_database.PushBackImpacts(current_time, colliding_ids[i], colliding_normal_vel[i], colliding_tangential_vel[i]); + particle_database.PushBackImpacts(current_time, colliding_ids[i], colliding_normal_vel[i], colliding_tangential_vel[i], colliding_linear_impulse[i]); + } + } + + const int n_collisions_with_walls = particle.GetNumberOfCollisionsWithFaces(); + if (n_collisions_with_walls){ + const int id = int(i_elem->Id()); + FaceParticleImpactDataOfATimeStep& flat_wall_particle_database = GetParticleFaceDataBase(id); + const array_1d &colliding_ids_with_walls = particle.GetCollidingFaceIds(); + const array_1d &colliding_normal_vel = particle.GetCollidingFaceNormalRelativeVelocity(); + const array_1d &colliding_tangential_vel = particle.GetCollidingFaceTangentialRelativeVelocity(); + + /* + array_1d colliding_ids_with_walls; + array_1d colliding_normal_vel; + array_1d colliding_tangential_vel; + particle.GetCollidingFaceIds(colliding_ids_with_walls); + particle.GetCollidingFaceNormalRelativeVelocity(colliding_normal_vel); + particle.GetCollidingFaceTangentialRelativeVelocity(colliding_tangential_vel); + */ + + for (int i = 0; i < n_collisions_with_walls; ++i){ + face_time_step_database.PushBackImpacts(id, colliding_ids_with_walls[i], colliding_normal_vel[i], colliding_tangential_vel[i]); + flat_wall_particle_database.PushBackImpacts(current_time, colliding_ids_with_walls[i], colliding_normal_vel[i], colliding_tangential_vel[i]); } } } - mVectorOfTimeStepDatabases.push_back(time_step_database); + mInterParticleImpactDataOfAllParticles.push_back(time_step_database); + mFaceParticleImpactDataOfAllParticles.push_back(face_time_step_database); + if (time_step_database.GetNumberOfImpacts()){} +} + +void AnalyticParticleWatcher::SetNodalMaxImpactVelocities(ModelPart& analytic_model_part) +{ + for (ElementsIteratorType i_elem = analytic_model_part.ElementsBegin(); i_elem != analytic_model_part.ElementsEnd(); ++i_elem){ + AnalyticParticle& particle = dynamic_cast(*(*(i_elem.base()))); + + const int id = int(i_elem->Id()); + InterParticleImpactDataOfATimeStep& particle_database = GetParticleDataBase(id); + double db_normal_impact_velocity = 0.0; + double db_tangential_impact_velocity = 0.0; + particle_database.GetMaxCollidingSpeedFromDatabase(db_normal_impact_velocity, db_tangential_impact_velocity); - if (time_step_database.GetNumberOfImpacts()){ + // get current nodal values + double& current_max_normal_velocity = particle.GetGeometry()[0].FastGetSolutionStepValue(NORMAL_IMPACT_VELOCITY); + double& current_max_tangential_velocity = particle.GetGeometry()[0].FastGetSolutionStepValue(TANGENTIAL_IMPACT_VELOCITY); + // choose max between current and database + current_max_normal_velocity = std::max(current_max_normal_velocity, db_normal_impact_velocity); + current_max_tangential_velocity = std::max(current_max_tangential_velocity, db_tangential_impact_velocity); } + + //double avg_normal_impact_velocity = normal_velocity_sum/number_of_elements; // retrieve average impact velocity + //double avg_tangential_impact_velocity = tangential_velocity_sum/number_of_elements; } -void AnalyticParticleWatcher::SetNodalMaxImpactVelocities(ModelPart& analytic_model_part) +void AnalyticParticleWatcher::SetNodalMaxFaceImpactVelocities(ModelPart& analytic_model_part) { for (ElementsIteratorType i_elem = analytic_model_part.ElementsBegin(); i_elem != analytic_model_part.ElementsEnd(); ++i_elem){ AnalyticParticle& particle = dynamic_cast(*(*(i_elem.base()))); const int id = int(i_elem->Id()); - ParticleHistoryDatabase& particle_database = GetParticleDataBase(id); + FaceParticleImpactDataOfATimeStep& particle_database = GetParticleFaceDataBase(id); double db_normal_impact_velocity = 0.0; double db_tangential_impact_velocity = 0.0; - particle_database.GetMaxVelocities(db_normal_impact_velocity, db_tangential_impact_velocity); + particle_database.GetMaxCollidingSpeedFromDatabase(db_normal_impact_velocity, db_tangential_impact_velocity); // get current nodal values - double& current_max_normal_velocity = particle.GetGeometry()[0].FastGetSolutionStepValue(NORMAL_IMPACT_VELOCITY);//set initial value somewhere - double& current_max_tangential_velocity = particle.GetGeometry()[0].FastGetSolutionStepValue(TANGENTIAL_IMPACT_VELOCITY); + double& current_max_normal_velocity = particle.GetGeometry()[0].FastGetSolutionStepValue(FACE_NORMAL_IMPACT_VELOCITY); + double& current_max_tangential_velocity = particle.GetGeometry()[0].FastGetSolutionStepValue(FACE_TANGENTIAL_IMPACT_VELOCITY); // choose max between current and database current_max_normal_velocity = std::max(current_max_normal_velocity, db_normal_impact_velocity); @@ -78,6 +133,26 @@ void AnalyticParticleWatcher::SetNodalMaxImpactVelocities(ModelPart& analytic_mo } + + +void AnalyticParticleWatcher::SetNodalMaxLinearImpulse(ModelPart& analytic_model_part) +{ + for (ElementsIteratorType i_elem = analytic_model_part.ElementsBegin(); i_elem != analytic_model_part.ElementsEnd(); ++i_elem){ + AnalyticParticle& particle = dynamic_cast(*(*(i_elem.base()))); + + const int id = int(i_elem->Id()); + InterParticleImpactDataOfATimeStep& particle_database = GetParticleDataBase(id); + double db_linear_impulse = 0.0; + particle_database.GetMaxLinearImpulseFromDatabase(db_linear_impulse); + + // get current nodal values + double& current_max_linear_impulse = particle.GetGeometry()[0].FastGetSolutionStepValue(LINEAR_IMPULSE); + + // choose max between current and database + current_max_linear_impulse = std::max(current_max_linear_impulse, db_linear_impulse); + } +} + void AnalyticParticleWatcher::ClearList(boost::python::list& my_list) { while(len(my_list)){ @@ -91,7 +166,7 @@ void AnalyticParticleWatcher::GetParticleData(int id, boost::python::list normal_relative_vel, boost::python::list tangential_relative_vel) { - mMapOfParticleHistoryDatabases[id].FillUpPythonLists(times, neighbour_ids, normal_relative_vel, tangential_relative_vel); + mInterParticleImpactDataOfAllTimeSteps[id].FillUpPythonLists(times, neighbour_ids, normal_relative_vel, tangential_relative_vel); } void AnalyticParticleWatcher::GetAllParticlesData(ModelPart& analytic_model_part, @@ -129,14 +204,14 @@ void AnalyticParticleWatcher::GetTimeStepsData(boost::python::list ids, ClearList(neighbour_ids); ClearList(normal_relative_vel); ClearList(tangential_relative_vel); - const int n_time_steps = mVectorOfTimeStepDatabases.size(); + const int n_time_steps = mInterParticleImpactDataOfAllParticles.size(); for (int i = 0; i < n_time_steps; ++i){ boost::python::list ids_i; boost::python::list neighbour_ids_i; boost::python::list normal_relative_vel_i; boost::python::list tangential_relative_vel_i; - mVectorOfTimeStepDatabases[i].FillUpPythonLists(ids_i, neighbour_ids_i, normal_relative_vel_i, tangential_relative_vel_i); + mInterParticleImpactDataOfAllParticles[i].FillUpPythonLists(ids_i, neighbour_ids_i, normal_relative_vel_i, tangential_relative_vel_i); ids.append(ids_i); neighbour_ids.append(neighbour_ids_i); normal_relative_vel.append(normal_relative_vel_i); @@ -145,13 +220,22 @@ void AnalyticParticleWatcher::GetTimeStepsData(boost::python::list ids, } -AnalyticParticleWatcher::ParticleHistoryDatabase& AnalyticParticleWatcher::GetParticleDataBase(int id) +AnalyticParticleWatcher::InterParticleImpactDataOfATimeStep& AnalyticParticleWatcher::GetParticleDataBase(int id) +{ + if (mInterParticleImpactDataOfAllTimeSteps.find(id) == mInterParticleImpactDataOfAllTimeSteps.end()){ + AnalyticParticleWatcher::InterParticleImpactDataOfATimeStep new_particle_database(id); + mInterParticleImpactDataOfAllTimeSteps[id] = new_particle_database; + } + return mInterParticleImpactDataOfAllTimeSteps[id]; +} + +AnalyticParticleWatcher::FaceParticleImpactDataOfATimeStep& AnalyticParticleWatcher::GetParticleFaceDataBase(int id) { - if (mMapOfParticleHistoryDatabases.find(id) == mMapOfParticleHistoryDatabases.end()){ - AnalyticParticleWatcher::ParticleHistoryDatabase new_particle_database(id); - mMapOfParticleHistoryDatabases[id] = new_particle_database; + if (mFaceParticleImpactDataOfAllTimeSteps.find(id) == mFaceParticleImpactDataOfAllTimeSteps.end()){ + AnalyticParticleWatcher::FaceParticleImpactDataOfATimeStep new_particle_database(id); + mFaceParticleImpactDataOfAllTimeSteps[id] = new_particle_database; } - return mMapOfParticleHistoryDatabases[id]; + return mFaceParticleImpactDataOfAllTimeSteps[id]; } /// Turn back information as a string. diff --git a/applications/DEM_application/custom_utilities/analytic_tools/analytic_particle_watcher.h b/applications/DEM_application/custom_utilities/analytic_tools/analytic_particle_watcher.h index 461a8cccf9db..d1f6d0692405 100644 --- a/applications/DEM_application/custom_utilities/analytic_tools/analytic_particle_watcher.h +++ b/applications/DEM_application/custom_utilities/analytic_tools/analytic_particle_watcher.h @@ -36,12 +36,12 @@ AnalyticParticleWatcher(){} virtual ~AnalyticParticleWatcher(){} -class ImpactsTimeStepDataBase // It holds the historical information gathered in a single time step +class InterParticleImpactDataOfAParticle // It holds the historical information gathered in a single time step { public: - ImpactsTimeStepDataBase(const double time) : mNImpacts(0)/*, mTime(time)*/{} - ~ImpactsTimeStepDataBase(){} + InterParticleImpactDataOfAParticle(const double time) : mNImpacts(0)/*, mTime(time)*/{} + ~InterParticleImpactDataOfAParticle(){} int GetNumberOfImpacts() { @@ -84,6 +84,7 @@ class ImpactsTimeStepDataBase // It holds the historical information gathered i std::vector mId2; std::vector mRelVelNormal; std::vector mRelVelTangential; + bool ImpactIsNew(const int id_2) { @@ -91,13 +92,144 @@ class ImpactsTimeStepDataBase // It holds the historical information gathered i } }; -class ParticleHistoryDatabase // It holds the historical information gathered for a single particle +class InterParticleImpactDataOfATimeStep // It holds the historical information gathered for a single particle { public: - ParticleHistoryDatabase(): mNImpacts(0)/*, mId(0)*/{} - ParticleHistoryDatabase(const int id) : mNImpacts(0)/*, mId(id)*/{} - ~ParticleHistoryDatabase(){} + InterParticleImpactDataOfATimeStep(): mNImpacts(0)/*, mId(0)*/{} + InterParticleImpactDataOfATimeStep(const int id) : mNImpacts(0)/*, mId(id)*/{} + ~InterParticleImpactDataOfATimeStep(){} + + void PushBackImpacts(const double time, const int id2, const double normal_vel, const double tang_vel, const double linear_impulse) + { + ++mNImpacts; + mTimes.push_back(time); + mId2.push_back(id2); + mRelVelNormal.push_back(normal_vel); + mRelVelTangential.push_back(tang_vel); + mLinearImpulse.push_back(linear_impulse); + } + + void FillUpPythonLists(boost::python::list& times, + boost::python::list& neighbour_ids, + boost::python::list& normal_relative_vel, + boost::python::list& tangential_relative_vel) + { + for (int i = 0; i < mNImpacts; ++i){ + AnalyticParticleWatcher::ClearList(times); + AnalyticParticleWatcher::ClearList(neighbour_ids); + AnalyticParticleWatcher::ClearList(normal_relative_vel); + AnalyticParticleWatcher::ClearList(tangential_relative_vel); + times.append(mTimes[i]); + neighbour_ids.append(mId2[i]); + normal_relative_vel.append(mRelVelNormal[i]); + tangential_relative_vel.append(mRelVelTangential[i]); + } + } + + void GetMaxCollidingSpeedFromDatabase(double& db_normal_impact_velocity, double& db_tangential_impact_velocity){ + if(mRelVelNormal.size()){ + db_normal_impact_velocity = std::abs(*(std::max_element(mRelVelNormal.begin(), mRelVelNormal.end()))); + db_tangential_impact_velocity = std::abs(*(std::max_element(mRelVelTangential.begin(), mRelVelTangential.end()))); + } + else { + db_normal_impact_velocity = 0.0; + db_tangential_impact_velocity = 0.0; + } + + } + + + void GetMaxLinearImpulseFromDatabase(double& db_linear_impulse){ + if(mRelVelNormal.size()){ + db_linear_impulse = std::abs(*(std::max_element(mLinearImpulse.begin(), mLinearImpulse.end()))); + + } + else { + db_linear_impulse = 0.0; + + } + + } + + private: + + int mNImpacts; + //int mId; + std::vector mTimes; + std::vector mId2; + std::vector mRelVelNormal; + std::vector mRelVelTangential; + std::vector mLinearImpulse; +}; + + + + +// FaceParticleImpactDataOfAParticle + +class FaceParticleImpactDataOfAParticle // It holds the historical information gathered in a single time step against flat walls +{ + public: + + FaceParticleImpactDataOfAParticle(const double time) : mNImpacts(0)/*, mTime(time)*/{} + ~FaceParticleImpactDataOfAParticle(){} + + int GetNumberOfImpacts() + { + return mNImpacts; + } + + void PushBackImpacts(const int id1, const int id2, const double normal_vel, const double tang_vel) + { + if (ImpactIsNew(id2)){ + ++mNImpacts; + mId1.push_back(id1); + mId2.push_back(id2); + mRelVelNormal.push_back(normal_vel); + mRelVelTangential.push_back(tang_vel); + } + } + + void FillUpPythonLists(boost::python::list& ids, + boost::python::list& neighbour_ids, + boost::python::list& normal_relative_vel, + boost::python::list& tangential_relative_vel) + { + for (int i = 0; i < mNImpacts; ++i){ + AnalyticParticleWatcher::ClearList(ids); + AnalyticParticleWatcher::ClearList(neighbour_ids); + AnalyticParticleWatcher::ClearList(normal_relative_vel); + AnalyticParticleWatcher::ClearList(tangential_relative_vel); + ids.append(mId1[i]); + neighbour_ids.append(mId2[i]); + normal_relative_vel.append(mRelVelNormal[i]); + tangential_relative_vel.append(mRelVelTangential[i]); + } + } + + private: + + int mNImpacts; + /*double mTime;*/ + std::vector mId1; + std::vector mId2; + std::vector mRelVelNormal; + std::vector mRelVelTangential; + + bool ImpactIsNew(const int id_2) + { + return std::find(mId1.begin(), mId1.end(), id_2) != mId1.end(); + } + }; + +class FaceParticleImpactDataOfATimeStep // It holds the historical information gathered for a single particle against flat walls + { + public: + + FaceParticleImpactDataOfATimeStep(): mNImpacts(0)/*, mId(0)*/{} + FaceParticleImpactDataOfATimeStep(const int id) : mNImpacts(0)/*, mId(id)*/{} + ~FaceParticleImpactDataOfATimeStep(){} void PushBackImpacts(const double time, const int id2, const double normal_vel, const double tang_vel) { @@ -125,7 +257,7 @@ class ParticleHistoryDatabase // It holds the historical information gathered fo } } - void GetMaxVelocities(double& db_normal_impact_velocity, double& db_tangential_impact_velocity){ + void GetMaxCollidingSpeedFromDatabase(double& db_normal_impact_velocity, double& db_tangential_impact_velocity){ if(mRelVelNormal.size()){ db_normal_impact_velocity = std::abs(*(std::max_element(mRelVelNormal.begin(), mRelVelNormal.end()))); db_tangential_impact_velocity = std::abs(*(std::max_element(mRelVelTangential.begin(), mRelVelTangential.end()))); @@ -147,6 +279,8 @@ class ParticleHistoryDatabase // It holds the historical information gathered fo std::vector mRelVelTangential; }; +// + static void ClearList(boost::python::list& my_list); // its best to pass empty lists in the first place to avoid this operation void GetParticleData(int id, @@ -169,8 +303,11 @@ void GetTimeStepsData(boost::python::list ids, virtual void MakeMeasurements(ModelPart &analytic_model_part); virtual void SetNodalMaxImpactVelocities(ModelPart &analytic_model_part); +virtual void SetNodalMaxFaceImpactVelocities(ModelPart &analytic_model_part); +virtual void SetNodalMaxLinearImpulse(ModelPart &analytic_model_part); -virtual ParticleHistoryDatabase& GetParticleDataBase(int id); +virtual InterParticleImpactDataOfATimeStep& GetParticleDataBase(int id); +virtual FaceParticleImpactDataOfATimeStep& GetParticleFaceDataBase(int id); /// Turn back information as a string virtual std::string Info() const; @@ -185,8 +322,18 @@ virtual void PrintData(std::ostream& rOStream) const; private: std::set mSetOfIds; -std::vector mVectorOfTimeStepDatabases; -std::map mMapOfParticleHistoryDatabases; + +std::vector mInterParticleImpactDataOfAllParticles; +std::map mInterParticleImpactDataOfAllTimeSteps; + +std::vector mFaceParticleImpactDataOfAllParticles; +std::map mFaceParticleImpactDataOfAllTimeSteps; + +// std::vector mEdgeParticleImpactDataOfAllParticles; inactive +// std::map mEdgeParticleImpactDataOfAllTimeSteps; + +// std::vector mVertexParticleImpactDataOfAllParticles; inactive +// std::map mVertexParticleImpactDataOfAllTimeSteps; /// Assignment operator AnalyticParticleWatcher & operator=(AnalyticParticleWatcher const& rOther); diff --git a/applications/DEM_application/custom_utilities/inlet.cpp b/applications/DEM_application/custom_utilities/inlet.cpp index eec1ac119961..b00dd6413643 100644 --- a/applications/DEM_application/custom_utilities/inlet.cpp +++ b/applications/DEM_application/custom_utilities/inlet.cpp @@ -63,7 +63,7 @@ namespace Kratos { mTotalNumberOfParticlesInjected = 0; mTotalMassInjected = 0.0; SetNormalizedMaxIndentationForRelease(0.0); - SetNormalizedMaxIndentationForNewParticleCreation(0.05); + SetNormalizedMaxIndentationForNewParticleCreation(0.0); mWarningTooSmallInlet = false; mWarningTooSmallInletForMassFlow = false; @@ -398,13 +398,14 @@ namespace Kratos { } // (push_back) //Inlet BLOCKED nodes are ACTIVE when injecting, but once they are not in contact with other balls, ACTIVE can be reseted. } - if (valid_elements_length < number_of_particles_to_insert) { + if (valid_elements_length < number_of_particles_to_insert) { number_of_particles_to_insert = valid_elements_length; + if(!imposed_mass_flow_option){ + ThrowWarningTooSmallInlet(mp); + } } - if(!imposed_mass_flow_option){ - ThrowWarningTooSmallInlet(mp); - } + PropertiesProxy* p_fast_properties = NULL; int general_properties_id = mInletModelPart.GetProperties(mp[PROPERTIES_ID]).Id(); diff --git a/applications/DEM_application/custom_utilities/pre_utilities.h b/applications/DEM_application/custom_utilities/pre_utilities.h index d2ddd7199707..2db2be4168f9 100644 --- a/applications/DEM_application/custom_utilities/pre_utilities.h +++ b/applications/DEM_application/custom_utilities/pre_utilities.h @@ -85,6 +85,40 @@ class PreUtilities p_properties->SetValue(CLUSTER_INFORMATION, cl_info); } + + void FillAnalyticSubModelPartUtility(ModelPart& rSpheresModelPart, ModelPart& rAnalyticSpheresModelPart){ + ElementsArrayType& pElements = rSpheresModelPart.GetCommunicator().LocalMesh().Elements(); + std::vector > temporal_vector_of_ids; + int mNumberOfThreads = OpenMPUtils::GetNumThreads(); + temporal_vector_of_ids.resize(mNumberOfThreads); + + #pragma omp parallel for + for (int k = 0; k < (int)pElements.size(); k++) { + ElementsArrayType::iterator it = pElements.ptr_begin() + k; + int analytic_particle_id = it->Id(); + temporal_vector_of_ids[OpenMPUtils::ThisThread()].push_back(analytic_particle_id); + } + std::vector vector_of_ids; + for (int i = 0; i < mNumberOfThreads; i++) { + vector_of_ids.insert(vector_of_ids.end(), temporal_vector_of_ids[i].begin(), temporal_vector_of_ids[i].end()); + } + rAnalyticSpheresModelPart.AddElements(vector_of_ids); + } + + +// non-OMP version +// void FillAnalyticSubModelPartUtility(ModelPart& rSpheresModelPart, ModelPart& rAnalyticSpheresModelPart){ +// ElementsArrayType& pElements = rSpheresModelPart.GetCommunicator().LocalMesh().Elements(); +// std::vector vector_of_ids; +// for (int k = 0; k < (int)pElements.size(); k++) { +// ElementsArrayType::iterator it = pElements.ptr_begin() + k; +// int analytic_particle_id = it->Id(); +// vector_of_ids.push_back(analytic_particle_id); +// } +// rAnalyticSpheresModelPart.AddElements(vector_of_ids); +// } + + void BreakBondUtility(ModelPart& rSpheresModelPart){ ElementsArrayType& pElements = rSpheresModelPart.GetCommunicator().LocalMesh().Elements(); diff --git a/applications/DEM_application/python_scripts/DEM_procedures.py b/applications/DEM_application/python_scripts/DEM_procedures.py index f939e0f3e9d1..bcd312d80fa6 100644 --- a/applications/DEM_application/python_scripts/DEM_procedures.py +++ b/applications/DEM_application/python_scripts/DEM_procedures.py @@ -402,6 +402,10 @@ def AddSpheresVariables(self, model_part, DEM_parameters): model_part.AddNodalSolutionStepVariable(ANGULAR_VELOCITY) #TODO: only if self.DEM_parameters-RotationOption! Check that no one accesses them in c++ without checking the rotation option model_part.AddNodalSolutionStepVariable(NORMAL_IMPACT_VELOCITY) model_part.AddNodalSolutionStepVariable(TANGENTIAL_IMPACT_VELOCITY) + model_part.AddNodalSolutionStepVariable(FACE_NORMAL_IMPACT_VELOCITY) + model_part.AddNodalSolutionStepVariable(FACE_TANGENTIAL_IMPACT_VELOCITY) + model_part.AddNodalSolutionStepVariable(LINEAR_IMPULSE) + # FORCES model_part.AddNodalSolutionStepVariable(ELASTIC_FORCES) @@ -526,6 +530,10 @@ def SetInitialNodalValues(self, spheres_model_part, cluster_model_part, DEM_inle for node in mesh_nodes: node.SetSolutionStepValue(NORMAL_IMPACT_VELOCITY, 0.0) node.SetSolutionStepValue(TANGENTIAL_IMPACT_VELOCITY, 0.0) + node.SetSolutionStepValue(FACE_NORMAL_IMPACT_VELOCITY, 0.0) + node.SetSolutionStepValue(FACE_TANGENTIAL_IMPACT_VELOCITY, 0.0) + node.SetSolutionStepValue(LINEAR_IMPULSE, 0.0) + def SetUpBufferSizeInAllModelParts(self, spheres_model_part, spheres_b_size, cluster_model_part, clusters_b_size, DEM_inlet_model_part, inlet_b_size, rigid_face_model_part, rigid_b_size): spheres_model_part.SetBufferSize(spheres_b_size) @@ -756,7 +764,7 @@ def CreateDirectories(self, main_path, problem_name, run_code = ''): sys.exit("\nExecution was aborted.\n") ''' - shutil.rmtree(os.path.join(main_path, problem_name + '_Post_Files'), ignore_errors = True) + shutil.rmtree(os.path.join(main_path, problem_name + '_Post_Files' + run_code), ignore_errors = True) shutil.rmtree(os.path.join(main_path, problem_name + '_Graphs' ), ignore_errors = True) for directory in [post_path, data_and_results, graphs_path, MPI_results]: @@ -1351,6 +1359,8 @@ def __init__(self, DEM_parameters, post_path): self.PostNormalImpactVelocity = GetBoolParameterIfItExists(self.DEM_parameters, "PostNormalImpactVelocity") self.PostTangentialImpactVelocity = GetBoolParameterIfItExists(self.DEM_parameters, "PostTangentialImpactVelocity") self.VelTrapGraphExportFreq = self.DEM_parameters["VelTrapGraphExportFreq"].GetDouble() + #self.PostFaceNormalImpactVelocity = getattr(self.DEM_parameters, "PostFaceNormalImpactVelocity", 0) + #self.PostFaceTangentialImpactVelocity = getattr(self.DEM_parameters, "PostFaceTangentialImpactVelocity", 0) if not "PostBoundingBox" in self.DEM_parameters.keys(): self.PostBoundingBox = 0 @@ -1382,11 +1392,15 @@ def __init__(self, DEM_parameters, post_path): #Analytic if not "PostNormalImpactVelocity" in self.DEM_parameters.keys(): - PostNormalImpactVelocity = 0 - PostTangentialImpactVelocity = 0 + self.PostNormalImpactVelocity = 0 + self.PostTangentialImpactVelocity = 0 + self.PostFaceTangentialImpactVelocity = 0 + self.PostFaceNormalImpactVelocity = 0 else: - PostNormalImpactVelocity = self.DEM_parameters["PostNormalImpactVelocity"].GetBool() - PostTangentialImpactVelocity = self.DEM_parameters["PostTangentialImpactVelocity"].GetBool() + self.PostNormalImpactVelocity = self.DEM_parameters["PostNormalImpactVelocity"].GetBool() + self.PostTangentialImpactVelocity = self.DEM_parameters["PostTangentialImpactVelocity"].GetBool() + self.PostFaceTangentialImpactVelocity = 1 + self.PostFaceNormalImpactVelocity = 1 # Ice if "PostVirtualSeaSurfaceX1" in self.DEM_parameters.keys(): @@ -1455,9 +1469,12 @@ def AddSpheresVariables(self): self.PushPrintVar(self.PostHeatFlux, HEATFLUX, self.spheres_variables) self.PushPrintVar(self.PostNormalImpactVelocity, NORMAL_IMPACT_VELOCITY, self.spheres_variables) self.PushPrintVar(self.PostTangentialImpactVelocity, TANGENTIAL_IMPACT_VELOCITY, self.spheres_variables) - + self.PushPrintVar(self.PostFaceNormalImpactVelocity, FACE_NORMAL_IMPACT_VELOCITY, self.spheres_variables) + self.PushPrintVar(self.PostFaceTangentialImpactVelocity, FACE_TANGENTIAL_IMPACT_VELOCITY, self.spheres_variables) + #self.PushPrintVar(self.PostLinearImpulse, LINEAR_IMPULSE, self.spheres_variables) #self.PushPrintVar( 1, DELTA_DISPLACEMENT, self.spheres_variables) # Debugging #self.PushPrintVar( 1, PARTICLE_ROTATION_ANGLE, self.spheres_variables) # Debugging + if "PostRollingResistanceMoment" in self.DEM_parameters.keys(): if self.DEM_parameters["RotationOption"].GetBool(): if self.DEM_parameters["RollingFrictionOption"].GetBool(): diff --git a/applications/DEM_application/python_scripts/KratosDEMSpreader.py b/applications/DEM_application/python_scripts/KratosDEMSpreader.py index 732b024ba4a6..486a7c13cc43 100644 --- a/applications/DEM_application/python_scripts/KratosDEMSpreader.py +++ b/applications/DEM_application/python_scripts/KratosDEMSpreader.py @@ -364,7 +364,6 @@ os.chdir(list_path) demio.PrintMultifileLists(time, post_path) os.chdir(main_path) - os.chdir(post_path) if DEM_parameters["ContactMeshOption"].GetBool(): diff --git a/applications/DEM_application/python_scripts/analytic_tools/analytic_data_procedures.py b/applications/DEM_application/python_scripts/analytic_tools/analytic_data_procedures.py index f8e3e4fcf647..4120fdf122d4 100644 --- a/applications/DEM_application/python_scripts/analytic_tools/analytic_data_procedures.py +++ b/applications/DEM_application/python_scripts/analytic_tools/analytic_data_procedures.py @@ -11,6 +11,9 @@ def __init__(self, analytic_particle_watcher, path, do_clear_data = True): def SetNodalMaxImpactVelocities(self, analytic_model_part): self.analytic_particle_watcher.SetNodalMaxImpactVelocities(analytic_model_part) + def SetNodalMaxFaceImpactVelocities(self, analytic_model_part): + self.analytic_particle_watcher.SetNodalMaxFaceImpactVelocities(analytic_model_part) + class FaceWatcherAnalyzer: def __init__(self, analytic_face_watcher, path, do_clear_data = True): diff --git a/applications/DEM_application/python_scripts/main_script.py b/applications/DEM_application/python_scripts/main_script.py index 6554e48f7ad0..a0f68052f01c 100644 --- a/applications/DEM_application/python_scripts/main_script.py +++ b/applications/DEM_application/python_scripts/main_script.py @@ -36,7 +36,8 @@ def __init__(self): self.creator_destructor = self.SetParticleCreatorDestructor() self.dem_fem_search = self.SetDemFemSearch() self.procedures = self.SetProcedures() - #self.SetAnalyticParticleWatcher() + self.SetAnalyticParticleWatcher() + self.PreUtilities = PreUtilities() # Creating necessary directories: @@ -50,6 +51,11 @@ def __init__(self): self.materialTest = DEM_procedures.MaterialTest() self.scheme = self.SetScheme() + # Define control variables + self.p_frequency = 100 # activate every 100 steps + self.step_count = 0 + self.p_count = self.p_frequency + # Set the print function TO_DO: do this better... self.KRATOSprint = self.procedures.KRATOSprint @@ -76,6 +82,14 @@ def __init__(self): self.Setdt() self.SetFinalTime() + def IsCountStep(self): + self.step_count += 1 + if self.step_count == self.p_count: + self.p_count += self.p_frequency + return True + else: + return False + def SetAnalyticParticleWatcher(self): self.main_path = os.getcwd() #revisar from analytic_tools import analytic_data_procedures @@ -163,6 +177,12 @@ def FillAnalyticSubModelParts(self): analytic_particle_ids = [elem.Id for elem in self.spheres_model_part.Elements] self.analytic_model_part.AddElements(analytic_particle_ids) + def FillAnalyticSubModelPartsWithNewParticles(self): + self.analytic_model_part = self.spheres_model_part.GetSubModelPart('AnalyticParticlesPart') + self.PreUtilities.FillAnalyticSubModelPartUtility(self.spheres_model_part, self.analytic_model_part) + #analytic_particle_ids = [elem.Id for elem in self.spheres_model_part.Elements] + #self.analytic_model_part.AddElements(analytic_particle_ids) + def Initialize(self): self.AddVariables() @@ -357,19 +377,24 @@ def InitializeTimeStep(self): pass def BeforeSolveOperations(self, time): - pass + if "PostNormalImpactVelocity" in self.DEM_parameters.keys(): + if self.DEM_parameters["PostNormalImpactVelocity"].GetBool(): + if self.IsCountStep(): + #time_to_print = self.time - self.time_old_print # add new particles to analytic mp each time an output is generated + #if (self.DEM_parameters["OutputTimeStep"].GetDouble() - time_to_print < 1e-2 * self.dt): + self.FillAnalyticSubModelPartsWithNewParticles() def BeforePrintingOperations(self, time): pass def AfterSolveOperations(self): - if "AnalyticParticle" in self.DEM_parameters.keys(): #TODO: Change the name of AnalyticParticle to something more understandable - if self.DEM_parameters["AnalyticParticle"].GetBool(): + if "PostNormalImpactVelocity" in self.DEM_parameters.keys(): + if self.DEM_parameters["PostNormalImpactVelocity"].GetBool(): self.particle_watcher.MakeMeasurements(self.analytic_model_part) time_to_print = self.time - self.time_old_print if (self.DEM_parameters["OutputTimeStep"].GetDouble() - time_to_print < 1e-2 * self.dt): self.particle_watcher.SetNodalMaxImpactVelocities(self.analytic_model_part) - #self.particle_watcher.MakeMeasurements(self.all_model_parts.Get('AnalyticParticlesPart')) + self.particle_watcher.SetNodalMaxFaceImpactVelocities(self.analytic_model_part) def FinalizeTimeStep(self, time): pass diff --git a/applications/ExternalSolversApplication/CMakeLists.txt b/applications/ExternalSolversApplication/CMakeLists.txt index 7532a4e61451..91ee579f50a7 100644 --- a/applications/ExternalSolversApplication/CMakeLists.txt +++ b/applications/ExternalSolversApplication/CMakeLists.txt @@ -2,11 +2,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) message("**** configuring KratosExternalSolversApplication ****") - - - include_directories( ${CMAKE_SOURCE_DIR}/kratos ) -include_directories( ${CMAKE_SOURCE_DIR}/external_libraries ) +include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/external_libraries ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/custom_external_libraries/SuperLU_4.3 ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/custom_external_libraries ) diff --git a/applications/ExternalSolversApplication/custom_utilities/feast_condition_number_utility.h b/applications/ExternalSolversApplication/custom_utilities/feast_condition_number_utility.h new file mode 100755 index 000000000000..1a77fba79e74 --- /dev/null +++ b/applications/ExternalSolversApplication/custom_utilities/feast_condition_number_utility.h @@ -0,0 +1,250 @@ +// | / | +// ' / __| _` | __| _ \ __| +// . \ | ( | | ( |\__ ` +// _|\_\_| \__,_|\__|\___/ ____/ +// Multi-Physics +// +// License: BSD License +// Kratos default license: kratos/license.txt +// +// Main authors: Vicente Mataix Ferrandiz +// + +#if !defined(KRATOS_FEAST_CONDITION_NUMBER_UTILITY ) +#define KRATOS_FEAST_CONDITION_NUMBER_UTILITY + + +/* System includes */ + +/* External includes */ + +/* Project includes */ +#include "linear_solvers/linear_solver.h" +#ifdef INCLUDE_FEAST + #include "external_includes/feast_solver.h" +#endif + +namespace Kratos +{ + +///@name Kratos Globals +///@{ + +///@} +///@name Type Definitions +///@{ + +///@} +///@name Enum's +///@{ + +///@} +///@name Functions +///@{ + +///@} +///@name Kratos Classes +///@{ + +/// This utility uses the FEAST solver to obtain (estimate) the the condition number of a regular matrix +/** + * Regular matrix: A*A^H=A^H*A + */ +template, + class TDenseSpace = UblasSpace + > +class FEASTConditionNumberUtility +{ +public: + + ///@name Type Definitions + ///@{ + + typedef Matrix MatrixType; + + typedef Vector VectorType; + + typedef std::size_t SizeType; + + typedef std::size_t IndexType; + + typedef typename TSparseSpace::MatrixType SparseMatrixType; + + typedef typename TSparseSpace::VectorType SparseVectorType; + + typedef typename TDenseSpace::MatrixType DenseMatrixType; + + typedef typename TDenseSpace::VectorType DenseVectorType; + + typedef std::complex ComplexType; + + typedef compressed_matrix ComplexSparseMatrixType; + + typedef matrix ComplexDenseMatrixType; + + typedef vector ComplexVectorType; + + typedef UblasSpace ComplexSparseSpaceType; + + typedef UblasSpace ComplexDenseSpaceType; + + typedef LinearSolver ComplexLinearSolverType; + + ///@} + ///@name Life Cycle + ///@{ + + /* Constructor */ + + + /** Destructor */ + + ///@} + ///@name Operators + ///@{ + + + ///@} + ///@name Operations + ///@{ + + /** + * Computes the condition number using the maximum and minimum eigenvalue of the system (in moduli) + * @param InputMatrix: The matrix to obtain the condition number + * @param pLinearSolver: The complex linear solver considered in the FEAST solver + * @return condition_number: The condition number obtained + */ + static inline double ConditionNumber( + const MatrixType& InputMatrix, + ComplexLinearSolverType::Pointer pLinearSolver = nullptr + ) + { +#ifdef INCLUDE_FEAST + typedef FEASTSolver FEASTSolverType; + + Parameters this_params(R"( + { + "solver_type": "FEAST", + "print_feast_output": false, + "perform_stochastic_estimate": true, + "solve_eigenvalue_problem": true, + "lambda_min": 0.0, + "lambda_max": 1.0, + "echo_level": 0, + "number_of_eigenvalues": 0, + "search_dimension": 10 + })"); + + const std::size_t size = InputMatrix.size1(); + + const double normA = TSparseSpace::TwoNorm(InputMatrix); + this_params["lambda_max"].SetDouble(normA); + this_params["lambda_min"].SetDouble(-normA); + this_params["number_of_eigenvalues"].SetInt(size * 2/3 - 1); + this_params["search_dimension"].SetInt(3/2 * size + 1); + SparseMatrixType copy_matrix = InputMatrix; + SparseMatrixType identity_matrix = IdentityMatrix(size, size); + + // Create the auxilary eigen system + DenseMatrixType eigen_vectors; + DenseVectorType eigen_values; + + // Create the FEAST solver + FEASTSolverType FEASTSolver(boost::make_shared(this_params), pLinearSolver); + + // Solve the problem + FEASTSolver.Solve(copy_matrix, identity_matrix, eigen_values, eigen_vectors); + + // Size of the eigen values vector + const int dim_eigen_values = eigen_values.size(); + + // We get the moduli of the eigen values + #pragma omp parallel for + for (int i = 0; i < dim_eigen_values; i++) + { + eigen_values[i] = std::abs(eigen_values[i]); + } + + // Now we sort the vector + std::sort(eigen_values.begin(), eigen_values.end()); + + // We compute the eigen value + double condition_number = 0.0; + if (dim_eigen_values > 0) condition_number = eigen_values[dim_eigen_values - 1]/eigen_values[0]; +#else + const double condition_number = 0.0; + KRATOS_ERROR << "YOU MUST COMPILE FEAST IN ORDER TO USE THIS UTILITY" << std::endl; +#endif + + return condition_number; + } + + ///@} + ///@name Access + ///@{ + + + ///@} + ///@name Inquiry + ///@{ + + + ///@} + ///@name Input and output + ///@{ + + ///@} + ///@name Friends + ///@{ + +private: + + ///@name Private static Member Variables + ///@{ + + ///@} + ///@name Private member Variables + ///@{ + + ///@} + ///@name Private Operators + ///@{ + + ///@} + ///@name Private Operations + ///@{ + + ///@} + ///@name Private Access + ///@{ + + ///@} + ///@name Private Inquiry + ///@{ + + ///@} + ///@name Private LifeCycle + ///@{ + + ///@} + ///@name Unaccessible methods + ///@{ + + FEASTConditionNumberUtility(void); + + FEASTConditionNumberUtility(FEASTConditionNumberUtility& rSource); + +}; /* Class FEASTConditionNumberUtility */ + +///@name Type Definitions +///@{ + + +///@} +///@name Input and output +///@{ + +} /* namespace Kratos.*/ + +#endif /* KRATOS_FEAST_CONDITION_NUMBER_UTILITY defined */ + diff --git a/applications/FSIapplication/custom_utilities/AdvancedNMPointsMapper.cpp b/applications/FSIapplication/custom_utilities/AdvancedNMPointsMapper.cpp index d03d2abe8baa..f6b400d48423 100644 --- a/applications/FSIapplication/custom_utilities/AdvancedNMPointsMapper.cpp +++ b/applications/FSIapplication/custom_utilities/AdvancedNMPointsMapper.cpp @@ -37,8 +37,8 @@ void GaussPointItem::Project(Condition::Pointer pOriginCond, if (dimension == 2) { - Point<3> point_projected; - Point<3> point_to_project = Point(this->Coordinate(1), this->Coordinate(2), this->Coordinate(3)); + Point point_projected; + Point point_to_project = Point(this->Coordinate(1), this->Coordinate(2), this->Coordinate(3)); ProjectPointToLine(rOriginGeom[0], point_to_project, point_projected, Dist); array_1d point_projected_local_coor; @@ -94,9 +94,9 @@ void GaussPointItem::Project(Condition::Pointer pOriginCond, * @return PointProjected: The point pojected over the plane * @return dist: The distance between the point and the plane */ -void GaussPointItem::ProjectPointToLine(const Point<3>& PointInPlane, - const Point<3>& PointToBeProjected, - Point<3>& PointProjected, +void GaussPointItem::ProjectPointToLine(const Point& PointInPlane, + const Point& PointToBeProjected, + Point& PointProjected, double& dist) { array_1d vector_points; @@ -122,7 +122,7 @@ void GaussPointItem::GetProjectedValue(const Variable & rOriginVar, const unsigned int dimension = rOriginGeom.WorkingSpaceDimension(); // Shape functions values in the projected Gauss pt. - Point<3> GPloccoords = (dimension == 2) ? Point(mOriginCoords[0], 0.0, 0.0) : Point(mOriginCoords[0], mOriginCoords[1], 0.0); + Point GPloccoords = (dimension == 2) ? Point(mOriginCoords[0], 0.0, 0.0) : Point(mOriginCoords[0], mOriginCoords[1], 0.0); Vector shfunc_values; rOriginGeom.ShapeFunctionsValues(shfunc_values, GPloccoords); @@ -153,7 +153,7 @@ void GaussPointItem::GetProjectedValue(const Variable >& rOri if (mProjStatus == 1) // Get Interpolated value from origin condition { // Shape functions values in the projected Gauss pt. - Point<3> GPloccoords = (dimension == 2) ? Point(mOriginCoords[0], 0.0, 0.0) : Point(mOriginCoords[0], mOriginCoords[1], 0.0); + Point GPloccoords = (dimension == 2) ? Point(mOriginCoords[0], 0.0, 0.0) : Point(mOriginCoords[0], mOriginCoords[1], 0.0); Vector shfunc_values; rOriginGeom.ShapeFunctionsValues(shfunc_values, GPloccoords); @@ -293,7 +293,7 @@ void AdvancedNMPointsMapper::FindNeighbours(double SearchRadiusFactor) cond_it != mrOriginModelPart.ConditionsEnd(); cond_it++) { - Point<3> Center; + Point Center; ComputeGeometryCenterAndRadius(*cond_it.base(), Center, Radius); MaxRadius = std::max(MaxRadius, Radius); @@ -412,7 +412,7 @@ void AdvancedNMPointsMapper::ComputeConditionNormal(const Condition::Pointer Con * @return Radius: Geometry radius */ void AdvancedNMPointsMapper::ComputeGeometryCenterAndRadius(const Condition::Pointer Cond, - Point<3>& Center, + Point& Center, double& Radius) { Radius = 0.0; diff --git a/applications/FSIapplication/custom_utilities/AdvancedNMPointsMapper.hpp b/applications/FSIapplication/custom_utilities/AdvancedNMPointsMapper.hpp index 9bb3f7b5448a..9b17c415e92a 100644 --- a/applications/FSIapplication/custom_utilities/AdvancedNMPointsMapper.hpp +++ b/applications/FSIapplication/custom_utilities/AdvancedNMPointsMapper.hpp @@ -48,7 +48,7 @@ namespace Kratos /** @brief Custom Gauss Point container to be used by the mapper */ -class GaussPointItem: public Point<3> +class GaussPointItem: public Point { public: @@ -68,7 +68,7 @@ class GaussPointItem: public Point<3> /// Default constructors GaussPointItem(): - Point<3>(), + Point(), mArea(0), mProjStatus(0) { @@ -78,7 +78,7 @@ class GaussPointItem: public Point<3> GaussPointItem(array_1d Coords, double Area, array_1d Normal): - Point<3>(Coords), + Point(Coords), mArea(Area), mNormal(Normal), mProjStatus(0) @@ -86,7 +86,7 @@ class GaussPointItem: public Point<3> ///Copy constructor (not really required) GaussPointItem(const GaussPointItem& rhs): - Point<3>(rhs), + Point(rhs), mArea(rhs.mArea), mNormal(rhs.mNormal), mProjStatus(rhs.mProjStatus), @@ -192,9 +192,9 @@ class GaussPointItem: public Point<3> * @return PointProjected: The point pojected over the plane * @return dist: The distance between the point and the plane */ - void ProjectPointToLine(const Point<3> & PointInPlane, - const Point<3> & PointToBeProjected, - Point<3> & PointProjected, + void ProjectPointToLine(const Point & PointInPlane, + const Point & PointToBeProjected, + Point & PointProjected, double & dist); /** @@ -487,7 +487,7 @@ class AdvancedNMPointsMapper * @return Radius: Geometry radius */ void ComputeGeometryCenterAndRadius(const Condition::Pointer pCond, - Point<3>& Center, + Point& Center, double& Radius); /** diff --git a/applications/FluidDynamicsApplication/python_scripts/navier_stokes_base_solver.py b/applications/FluidDynamicsApplication/python_scripts/navier_stokes_base_solver.py index fe388ccf3c6e..f022f77c5200 100755 --- a/applications/FluidDynamicsApplication/python_scripts/navier_stokes_base_solver.py +++ b/applications/FluidDynamicsApplication/python_scripts/navier_stokes_base_solver.py @@ -107,6 +107,8 @@ def AddVariables(self): self.main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.DIVPROJ) self.main_model_part.AddNodalSolutionStepVariable(KratosCFD.PATCH_INDEX) # PATCH_INDEX belongs to FluidDynamicsApp. self.main_model_part.AddNodalSolutionStepVariable(KratosMultiphysics.EXTERNAL_PRESSURE) + self.main_model_part.AddNodalSolutionStepVariable(KratosCFD.Q_VALUE) # Q_VALUE belongs to FluidDynamicsApp. + print("Base class fluid solver variables added correctly") diff --git a/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_membrane_element.h b/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_membrane_element.h index 089fe117e1d1..7a5122bf68ad 100644 --- a/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_membrane_element.h +++ b/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_membrane_element.h @@ -1,79 +1,79 @@ -#if !defined(KRATOS_MESHLESS_MEMBRANE_ELEMENT_H_INCLUDED ) -#define KRATOS_MESHLESS_MEMBRANE_ELEMENT_H_INCLUDED - - - -// System includes - - -// External includes -#include "boost/smart_ptr.hpp" - - -// Project includes -#include "includes/define.h" -#include "includes/element.h" -#include "includes/ublas_interface.h" -#include "includes/variables.h" - -#include "custom_elements/meshless_base_element.h" - -namespace Kratos -{ - -///@name Kratos Globals -///@{ - -///@} -///@name Type Definitions -///@{ - -///@} -///@name Enum's -///@{ - -///@} -///@name Functions -///@{ - -///@} -///@name Kratos Classes -///@{ - -/// Short class definition. -/** Detail class definition. -*/ -class MeshlessMembraneElement - : public MeshlessBaseElement -{ -public: - ///@name Type Definitions - ///@{ - - /// Counted pointer of MeshlessMembraneElement - KRATOS_CLASS_POINTER_DEFINITION(MeshlessMembraneElement); - - ///@} - ///@name Life Cycle - ///@{ - - /// Default constructor. - MeshlessMembraneElement(IndexType NewId, GeometryType::Pointer pGeometry); - MeshlessMembraneElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties); - - /// Destructor. - virtual ~MeshlessMembraneElement(); - - - ///@} - ///@name Operators - ///@{ - - - ///@} - ///@name Operations - - Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override; +#if !defined(KRATOS_MESHLESS_MEMBRANE_ELEMENT_H_INCLUDED ) +#define KRATOS_MESHLESS_MEMBRANE_ELEMENT_H_INCLUDED + + + +// System includes + + +// External includes +#include "boost/smart_ptr.hpp" + + +// Project includes +#include "includes/define.h" +#include "includes/element.h" +#include "includes/ublas_interface.h" +#include "includes/variables.h" + +#include "custom_elements/meshless_base_element.h" + +namespace Kratos +{ + +///@name Kratos Globals +///@{ + +///@} +///@name Type Definitions +///@{ + +///@} +///@name Enum's +///@{ + +///@} +///@name Functions +///@{ + +///@} +///@name Kratos Classes +///@{ + +/// Short class definition. +/** Detail class definition. +*/ +class MeshlessMembraneElement + : public MeshlessBaseElement +{ +public: + ///@name Type Definitions + ///@{ + + /// Counted pointer of MeshlessMembraneElement + KRATOS_CLASS_POINTER_DEFINITION(MeshlessMembraneElement); + + ///@} + ///@name Life Cycle + ///@{ + + /// Default constructor. + MeshlessMembraneElement(IndexType NewId, GeometryType::Pointer pGeometry); + MeshlessMembraneElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties); + + /// Destructor. + virtual ~MeshlessMembraneElement(); + + + ///@} + ///@name Operators + ///@{ + + + ///@} + ///@name Operations + + Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override; void EquationIdVector( @@ -135,7 +135,7 @@ class MeshlessMembraneElement std::vector mConstitutiveLawVector; - Geometry< Point<3, double> >::Pointer mpReferenceGeometry; + Geometry< Point>::Pointer mpReferenceGeometry; Vector mDetJ0; @@ -311,35 +311,35 @@ class MeshlessMembraneElement ///@} -}; // Class MeshlessMembraneElement - -///@} - -///@name Type Definitions -///@{ - - -///@} -///@name Input and output -///@{ - - -/// input stream function -/* inline std::istream& operator >> (std::istream& rIStream, - MeshlessMembraneElement& rThis); -*/ -/// output stream function -/* inline std::ostream& operator << (std::ostream& rOStream, - const MeshlessMembraneElement& rThis) - { - rThis.PrintInfo(rOStream); - rOStream << std::endl; - rThis.PrintData(rOStream); - - return rOStream; - }*/ -///@} - -} // namespace Kratos. - +}; // Class MeshlessMembraneElement + +///@} + +///@name Type Definitions +///@{ + + +///@} +///@name Input and output +///@{ + + +/// input stream function +/* inline std::istream& operator >> (std::istream& rIStream, + MeshlessMembraneElement& rThis); +*/ +/// output stream function +/* inline std::ostream& operator << (std::ostream& rOStream, + const MeshlessMembraneElement& rThis) + { + rThis.PrintInfo(rOStream); + rOStream << std::endl; + rThis.PrintData(rOStream); + + return rOStream; + }*/ +///@} + +} // namespace Kratos. + #endif // KRATOS_MESHLESS_MESHLESS_MEMBRANE_ELEMENT_H_INCLUDED defined \ No newline at end of file diff --git a/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_shell_element.h b/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_shell_element.h index 1de4c2701e6e..d01b12fd65f0 100644 --- a/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_shell_element.h +++ b/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_shell_element.h @@ -1,79 +1,79 @@ -#if !defined(KRATOS_MESHLESS_SHELL_ELEMENT_H_INCLUDED ) -#define KRATOS_MESHLESS_SHELL_ELEMENT_H_INCLUDED - - - -// System includes - - -// External includes -#include "boost/smart_ptr.hpp" - - -// Project includes -#include "includes/define.h" -#include "includes/element.h" -#include "includes/ublas_interface.h" -#include "includes/variables.h" - -#include "custom_elements/meshless_base_element.h" - -namespace Kratos -{ - -///@name Kratos Globals -///@{ - -///@} -///@name Type Definitions -///@{ - -///@} -///@name Enum's -///@{ - -///@} -///@name Functions -///@{ - -///@} -///@name Kratos Classes -///@{ - -/// Short class definition. -/** Detail class definition. -*/ -class MeshlessShellElement - : public MeshlessBaseElement -{ -public: - ///@name Type Definitions - ///@{ - - /// Counted pointer of MeshlessShellElement - KRATOS_CLASS_POINTER_DEFINITION(MeshlessShellElement); - - ///@} - ///@name Life Cycle - ///@{ - - /// Default constructor. - MeshlessShellElement(IndexType NewId, GeometryType::Pointer pGeometry); - MeshlessShellElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties); - - /// Destructor. - virtual ~MeshlessShellElement(); - - - ///@} - ///@name Operators - ///@{ - - - ///@} - ///@name Operations - - Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override; +#if !defined(KRATOS_MESHLESS_SHELL_ELEMENT_H_INCLUDED ) +#define KRATOS_MESHLESS_SHELL_ELEMENT_H_INCLUDED + + + +// System includes + + +// External includes +#include "boost/smart_ptr.hpp" + + +// Project includes +#include "includes/define.h" +#include "includes/element.h" +#include "includes/ublas_interface.h" +#include "includes/variables.h" + +#include "custom_elements/meshless_base_element.h" + +namespace Kratos +{ + +///@name Kratos Globals +///@{ + +///@} +///@name Type Definitions +///@{ + +///@} +///@name Enum's +///@{ + +///@} +///@name Functions +///@{ + +///@} +///@name Kratos Classes +///@{ + +/// Short class definition. +/** Detail class definition. +*/ +class MeshlessShellElement + : public MeshlessBaseElement +{ +public: + ///@name Type Definitions + ///@{ + + /// Counted pointer of MeshlessShellElement + KRATOS_CLASS_POINTER_DEFINITION(MeshlessShellElement); + + ///@} + ///@name Life Cycle + ///@{ + + /// Default constructor. + MeshlessShellElement(IndexType NewId, GeometryType::Pointer pGeometry); + MeshlessShellElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties); + + /// Destructor. + virtual ~MeshlessShellElement(); + + + ///@} + ///@name Operators + ///@{ + + + ///@} + ///@name Operations + + Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override; void EquationIdVector( @@ -128,7 +128,7 @@ class MeshlessShellElement ConstitutiveLaw::Pointer mConstitutiveLawVector; - Geometry< Point<3, double> >::Pointer mpReferenceGeometry; + Geometry< Point >::Pointer mpReferenceGeometry; double mDetJ0; @@ -276,35 +276,35 @@ class MeshlessShellElement ///@} -}; // Class MeshlessShellElement - -///@} - -///@name Type Definitions -///@{ - - -///@} -///@name Input and output -///@{ - - -/// input stream function -/* inline std::istream& operator >> (std::istream& rIStream, - MeshlessShellElement& rThis); -*/ -/// output stream function -/* inline std::ostream& operator << (std::ostream& rOStream, - const MeshlessShellElement& rThis) - { - rThis.PrintInfo(rOStream); - rOStream << std::endl; - rThis.PrintData(rOStream); - - return rOStream; - }*/ -///@} - -} // namespace Kratos. - +}; // Class MeshlessShellElement + +///@} + +///@name Type Definitions +///@{ + + +///@} +///@name Input and output +///@{ + + +/// input stream function +/* inline std::istream& operator >> (std::istream& rIStream, + MeshlessShellElement& rThis); +*/ +/// output stream function +/* inline std::ostream& operator << (std::ostream& rOStream, + const MeshlessShellElement& rThis) + { + rThis.PrintInfo(rOStream); + rOStream << std::endl; + rThis.PrintData(rOStream); + + return rOStream; + }*/ +///@} + +} // namespace Kratos. + #endif // KRATOS_MESHLESS_MESHLESS_SHELL_ELEMENT_H_INCLUDED defined \ No newline at end of file diff --git a/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_shell_element_old.h b/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_shell_element_old.h index dec99254de92..bd5e926767b3 100644 --- a/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_shell_element_old.h +++ b/applications/IGAStructuralMechanicsApplication/custom_elements/meshless_shell_element_old.h @@ -1,128 +1,128 @@ -/* -============================================================================== -KratosIGAStructuralMechanicsApplication -A library based on: -Kratos -A General Purpose Software for Multi-Physics Finite Element Analysis -Version 1.0 (Released on march 05, 2007). - -Copyright 2007 -Pooyan Dadvand, Riccardo Rossi -pooyan@cimne.upc.edu -rrossi@cimne.upc.edu -- CIMNE (International Center for Numerical Methods in Engineering), -Gran Capita' s/n, 08034 Barcelona, Spain - - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following condition: - -Distribution of this code for any commercial purpose is permissible -ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNERS. - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -============================================================================== -*/ -// -// Project Name: Kratos -// Last Modified by: $Author: rrossi $ -// Date: $Date: 2007-03-06 10:30:32 $ -// Revision: $Revision: 1.2 $ -// -// - - -#if !defined(KRATOS_MESHLESS_SHELL_ELEMENT_H_INCLUDED ) -#define KRATOS_MESHLESS_SHELL_ELEMENT_H_INCLUDED - - - -// System includes - - -// External includes -#include "boost/smart_ptr.hpp" - - -// Project includes -#include "includes/define.h" -#include "includes/element.h" -#include "includes/ublas_interface.h" -#include "includes/variables.h" - -#include "custom_elements/meshless_base_element.h" - -namespace Kratos -{ - -///@name Kratos Globals -///@{ - -///@} -///@name Type Definitions -///@{ - -///@} -///@name Enum's -///@{ - -///@} -///@name Functions -///@{ - -///@} -///@name Kratos Classes -///@{ - -/// Short class definition. -/** Detail class definition. -*/ -class MeshlessShellElement - : public MeshlessBaseElement -{ -public: - ///@name Type Definitions - ///@{ - - /// Counted pointer of MeshlessShellElement - KRATOS_CLASS_POINTER_DEFINITION(MeshlessShellElement); - - ///@} - ///@name Life Cycle - ///@{ - - /// Default constructor. - MeshlessShellElement(IndexType NewId, GeometryType::Pointer pGeometry); - MeshlessShellElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties); - - /// Destructor. - virtual ~MeshlessShellElement(); - - - ///@} - ///@name Operators - ///@{ - - - ///@} - ///@name Operations - - Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const; +/* +============================================================================== +KratosIGAStructuralMechanicsApplication +A library based on: +Kratos +A General Purpose Software for Multi-Physics Finite Element Analysis +Version 1.0 (Released on march 05, 2007). + +Copyright 2007 +Pooyan Dadvand, Riccardo Rossi +pooyan@cimne.upc.edu +rrossi@cimne.upc.edu +- CIMNE (International Center for Numerical Methods in Engineering), +Gran Capita' s/n, 08034 Barcelona, Spain + + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following condition: + +Distribution of this code for any commercial purpose is permissible +ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNERS. + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +============================================================================== +*/ +// +// Project Name: Kratos +// Last Modified by: $Author: rrossi $ +// Date: $Date: 2007-03-06 10:30:32 $ +// Revision: $Revision: 1.2 $ +// +// + + +#if !defined(KRATOS_MESHLESS_SHELL_ELEMENT_H_INCLUDED ) +#define KRATOS_MESHLESS_SHELL_ELEMENT_H_INCLUDED + + + +// System includes + + +// External includes +#include "boost/smart_ptr.hpp" + + +// Project includes +#include "includes/define.h" +#include "includes/element.h" +#include "includes/ublas_interface.h" +#include "includes/variables.h" + +#include "custom_elements/meshless_base_element.h" + +namespace Kratos +{ + +///@name Kratos Globals +///@{ + +///@} +///@name Type Definitions +///@{ + +///@} +///@name Enum's +///@{ + +///@} +///@name Functions +///@{ + +///@} +///@name Kratos Classes +///@{ + +/// Short class definition. +/** Detail class definition. +*/ +class MeshlessShellElement + : public MeshlessBaseElement +{ +public: + ///@name Type Definitions + ///@{ + + /// Counted pointer of MeshlessShellElement + KRATOS_CLASS_POINTER_DEFINITION(MeshlessShellElement); + + ///@} + ///@name Life Cycle + ///@{ + + /// Default constructor. + MeshlessShellElement(IndexType NewId, GeometryType::Pointer pGeometry); + MeshlessShellElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties); + + /// Destructor. + virtual ~MeshlessShellElement(); + + + ///@} + ///@name Operators + ///@{ + + + ///@} + ///@name Operations + + Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const; void EquationIdVector( @@ -184,7 +184,7 @@ class MeshlessShellElement std::vector mConstitutiveLawVector; - Geometry< Point<3, double> >::Pointer mpReferenceGeometry; + Geometry< Point >::Pointer mpReferenceGeometry; Vector mDetJ0; @@ -371,35 +371,35 @@ class MeshlessShellElement ///@} -}; // Class MeshlessShellElement - -///@} - -///@name Type Definitions -///@{ - - -///@} -///@name Input and output -///@{ - - -/// input stream function -/* inline std::istream& operator >> (std::istream& rIStream, - MeshlessShellElement& rThis); -*/ -/// output stream function -/* inline std::ostream& operator << (std::ostream& rOStream, - const MeshlessShellElement& rThis) - { - rThis.PrintInfo(rOStream); - rOStream << std::endl; - rThis.PrintData(rOStream); - - return rOStream; - }*/ -///@} - -} // namespace Kratos. - +}; // Class MeshlessShellElement + +///@} + +///@name Type Definitions +///@{ + + +///@} +///@name Input and output +///@{ + + +/// input stream function +/* inline std::istream& operator >> (std::istream& rIStream, + MeshlessShellElement& rThis); +*/ +/// output stream function +/* inline std::ostream& operator << (std::ostream& rOStream, + const MeshlessShellElement& rThis) + { + rThis.PrintInfo(rOStream); + rOStream << std::endl; + rThis.PrintData(rOStream); + + return rOStream; + }*/ +///@} + +} // namespace Kratos. + #endif // KRATOS_MESHLESS_MESHLESS_SHELL_ELEMENT_H_INCLUDED defined \ No newline at end of file diff --git a/applications/MappingApplication/custom_configures/interface_object_configure.h b/applications/MappingApplication/custom_configures/interface_object_configure.h index 34f0025e24cb..9f38e311eab3 100644 --- a/applications/MappingApplication/custom_configures/interface_object_configure.h +++ b/applications/MappingApplication/custom_configures/interface_object_configure.h @@ -80,7 +80,7 @@ class InterfaceObjectConfigure * @param PointType Point of doubles with 3 coordinates (Dimension = 3) * @param PointerType Pointer to Point of doubles with 3 coordinates (Dimension = 3) */ - typedef Point PointType; + typedef Point PointType; /** Additional types needed by the bins. * @param PointContainerType Point Container. diff --git a/applications/MappingApplication/custom_utilities/interface_geometry_object.h b/applications/MappingApplication/custom_utilities/interface_geometry_object.h index e3a756313a43..51dc1e7ed2d0 100644 --- a/applications/MappingApplication/custom_utilities/interface_geometry_object.h +++ b/applications/MappingApplication/custom_utilities/interface_geometry_object.h @@ -71,7 +71,11 @@ class InterfaceGeometryObject : public InterfaceObject ///@name Life Cycle ///@{ - /// Default constructor. + // A default constructor necessary for serialization + InterfaceGeometryObject() : InterfaceObject() + { + } + InterfaceGeometryObject(Geometry>& rGeometry, const double ApproximationTolerance, const int EchoLevel, const int ConstructionIndex, GeometryData::IntegrationMethod IntegrationMethod = GeometryData::NumberOfIntegrationMethods) : mpGeometry(&rGeometry), @@ -340,7 +344,23 @@ class InterfaceGeometryObject : public InterfaceObject double mApproximationTolerance = 0.0f; int mConstructionIndex; GeometryData::IntegrationMethod mIntegrationMethod; + + ///@} + ///@name Serialization + ///@{ + friend class Serializer; + + virtual void save(Serializer& rSerializer) const + { + KRATOS_ERROR << "This object is not supposed to be used with serialization!" << std::endl; + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, InterfaceObject); + } + virtual void load(Serializer& rSerializer) + { + KRATOS_ERROR << "This object is not supposed to be used with serialization!" << std::endl; + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, InterfaceObject); + } ///@} ///@name Private Operators @@ -384,7 +404,6 @@ class InterfaceGeometryObject : public InterfaceObject } } - ///@} ///@name Private Access ///@{ diff --git a/applications/MappingApplication/custom_utilities/interface_node.h b/applications/MappingApplication/custom_utilities/interface_node.h index e2ad2b0f635f..60b9457fb7a1 100644 --- a/applications/MappingApplication/custom_utilities/interface_node.h +++ b/applications/MappingApplication/custom_utilities/interface_node.h @@ -66,7 +66,11 @@ class InterfaceNode : public InterfaceObject ///@name Life Cycle ///@{ - /// Default constructor. + // A default constructor necessary for serialization + InterfaceNode() : InterfaceObject() + { + } + InterfaceNode(Node<3>& rNode, const int EchoLevel) : mpNode(&rNode) { SetCoordinates(); @@ -216,6 +220,23 @@ class InterfaceNode : public InterfaceObject ///@{ Node<3>* mpNode; + + ///@} + ///@name Serialization + ///@{ + + friend class Serializer; + + virtual void save(Serializer& rSerializer) const + { + KRATOS_ERROR << "This object is not supposed to be used with serialization!" << std::endl; + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, InterfaceObject); + } + virtual void load(Serializer& rSerializer) + { + KRATOS_ERROR << "This object is not supposed to be used with serialization!" << std::endl; + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, InterfaceObject); + } ///@} ///@name Private Operators diff --git a/applications/MappingApplication/custom_utilities/interface_object.h b/applications/MappingApplication/custom_utilities/interface_object.h index ca0e481abba2..f758d42b71d1 100644 --- a/applications/MappingApplication/custom_utilities/interface_object.h +++ b/applications/MappingApplication/custom_utilities/interface_object.h @@ -22,6 +22,7 @@ // Project includes #include "includes/define.h" +#include "includes/serializer.h" #include "mapper_utilities.h" #include "../mapping_application_variables.h" @@ -60,7 +61,7 @@ namespace Kratos * objects of this type have to be created * Look into the class description of the MapperCommunicator to see how this Object is used in the application */ -class InterfaceObject : public Point<3> +class InterfaceObject : public Point { public: ///@name Type Definitions @@ -84,7 +85,7 @@ class InterfaceObject : public Point<3> ///@name Life Cycle ///@{ - InterfaceObject(double X, double Y, double Z) : Point<3>(X, Y, Z) // constuct from coordinates + InterfaceObject(double X, double Y, double Z) : Point(X, Y, Z) // constuct from coordinates { SetInitialValuesToMembers(); } @@ -253,7 +254,7 @@ class InterfaceObject : public Point<3> ///@{ // This constructor is called by its derived classes - InterfaceObject() : Point<3>(0.0f, 0.0f, 0.0f) + InterfaceObject() : Point(0.0f, 0.0f, 0.0f) { SetInitialValuesToMembers(); } @@ -320,6 +321,23 @@ class InterfaceObject : public Point<3> int mNeighborRank; bool mIsBeingSent; + ///@} + ///@name Serialization + ///@{ + + friend class Serializer; + + virtual void save(Serializer& rSerializer) const + { + KRATOS_ERROR << "This object is not supposed to be used with serialization!" << std::endl; + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Point); + } + virtual void load(Serializer& rSerializer) + { + KRATOS_ERROR << "This object is not supposed to be used with serialization!" << std::endl; + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Point); + } + ///@} ///@name Private Operators ///@{ diff --git a/applications/MappingApplication/custom_utilities/mapper_communicator.h b/applications/MappingApplication/custom_utilities/mapper_communicator.h index 3506ebe78266..f32ccfff0545 100644 --- a/applications/MappingApplication/custom_utilities/mapper_communicator.h +++ b/applications/MappingApplication/custom_utilities/mapper_communicator.h @@ -25,6 +25,7 @@ #include "interface_object_manager_serial.h" #include "interface_search_structure.h" #include "mapper_utilities.h" +#include "mapper_flags.h" namespace Kratos @@ -213,6 +214,13 @@ class MapperCommunicator ExchangeDataLocal(FunctionPointerOrigin, FunctionPointerDestination); } + virtual void TransferVariableData(std::function&)> FunctionPointerOrigin, + std::function FunctionPointerDestination ) + { + ExchangeDataLocal(FunctionPointerOrigin, FunctionPointerDestination); + } + + virtual int MyPID() // Copy from "kratos/includes/communicator.h" { return 0; diff --git a/applications/MappingApplication/custom_utilities/mapper_utilities.h b/applications/MappingApplication/custom_utilities/mapper_utilities.h index a521234b0ba0..c0309f4d5402 100644 --- a/applications/MappingApplication/custom_utilities/mapper_utilities.h +++ b/applications/MappingApplication/custom_utilities/mapper_utilities.h @@ -295,21 +295,21 @@ class MapperUtilities // check destination bbox corner points in origin bbox // check lower point - Point<3> point_to_check_1(bbox_destination[1], bbox_destination[3], bbox_destination[5]); + Point point_to_check_1(bbox_destination[1], bbox_destination[3], bbox_destination[5]); if (MapperUtilities::PointIsInsideBoundingBox(&bbox_origin_tol[0], point_to_check_1)) return true; // check higher point - Point<3> point_to_check_2(bbox_destination[0], bbox_destination[2], bbox_destination[4]); + Point point_to_check_2(bbox_destination[0], bbox_destination[2], bbox_destination[4]); if (MapperUtilities::PointIsInsideBoundingBox(&bbox_origin_tol[0], point_to_check_2)) return true; // check origin bbox corner points in destination bbox // check lower point - Point<3> point_to_check_3(bbox_origin[1], bbox_origin[3], bbox_origin[5]); + Point point_to_check_3(bbox_origin[1], bbox_origin[3], bbox_origin[5]); if (MapperUtilities::PointIsInsideBoundingBox(&bbox_destination_tol[0], point_to_check_3)) return true; // check higher point - Point<3> point_to_check_4(bbox_origin[0], bbox_origin[2], bbox_origin[4]); + Point point_to_check_4(bbox_origin[0], bbox_origin[2], bbox_origin[4]); if (MapperUtilities::PointIsInsideBoundingBox(&bbox_destination_tol[0], point_to_check_4)) return true; @@ -317,7 +317,7 @@ class MapperUtilities } static bool PointIsInsideBoundingBox(double* BoundingBox, - const Point<3>& rPoint) + const Point& rPoint) { // The Bounding Box should have some tolerance already! bool is_inside = false; if (rPoint.X() < BoundingBox[0] && rPoint.X() > BoundingBox[1]) // check x-direction diff --git a/applications/MappingApplication/mapping_application.cpp b/applications/MappingApplication/mapping_application.cpp index 25bd1bdc906f..793b46c084a5 100644 --- a/applications/MappingApplication/mapping_application.cpp +++ b/applications/MappingApplication/mapping_application.cpp @@ -35,7 +35,11 @@ namespace Kratos { -KratosMappingApplication::KratosMappingApplication() { } +KratosMappingApplication::KratosMappingApplication() : + mInterfaceObject(0.0, 0.0, 0.0), + mInterfaceNode(), + mInterfaceGeometryObject() +{} void KratosMappingApplication::Register() { @@ -65,5 +69,6 @@ void KratosMappingApplication::Register() // Needed to exchange Information abt the found neighbors (i.e. only for debugging) KRATOS_REGISTER_VARIABLE( NEIGHBOR_RANK ) KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS( NEIGHBOR_COORDINATES ) + } } // namespace Kratos. \ No newline at end of file diff --git a/applications/MappingApplication/mapping_application.h b/applications/MappingApplication/mapping_application.h index c4e076a7bdff..c3c9f1de03a4 100644 --- a/applications/MappingApplication/mapping_application.h +++ b/applications/MappingApplication/mapping_application.h @@ -31,6 +31,9 @@ #include "includes/define.h" #include "includes/kratos_application.h" #include "includes/variables.h" +#include "custom_utilities/interface_object.h" +#include "custom_utilities/interface_node.h" +#include "custom_utilities/interface_geometry_object.h" namespace Kratos @@ -190,8 +193,9 @@ class KratosMappingApplication : public KratosApplication ///@name Member Variables ///@{ - // const Elem2D mElem2D; - // const Elem3D mElem3D; + const InterfaceObject mInterfaceObject; + const InterfaceNode mInterfaceNode; + const InterfaceGeometryObject mInterfaceGeometryObject; ///@} ///@name Private Operators diff --git a/applications/MeshingApplication/custom_processes/internal_variables_interpolation_process.h b/applications/MeshingApplication/custom_processes/internal_variables_interpolation_process.h index 28871d4865b4..4968b5290c57 100755 --- a/applications/MeshingApplication/custom_processes/internal_variables_interpolation_process.h +++ b/applications/MeshingApplication/custom_processes/internal_variables_interpolation_process.h @@ -58,7 +58,7 @@ namespace Kratos /** @brief Custom Gauss Point container to be used by the search */ class GaussPointItem - : public Point<3> + : public Point { public: @@ -73,12 +73,12 @@ class GaussPointItem /// Default constructors GaussPointItem(): - Point<3>() + Point() { } GaussPointItem(const array_1d Coords): - Point<3>(Coords) + Point(Coords) { } @@ -86,7 +86,7 @@ class GaussPointItem const array_1d Coords, ConstitutiveLaw::Pointer pConstitutiveLaw, const double Weight - ):Point<3>(Coords), + ):Point(Coords), mpConstitutiveLaw(std::move(pConstitutiveLaw)), mWeight(Weight) { @@ -111,9 +111,9 @@ class GaussPointItem * @return The point */ - Point<3> GetPoint() + Point GetPoint() { - Point<3> Point(this->Coordinates()); + Point Point(this->Coordinates()); return Point; } @@ -123,7 +123,7 @@ class GaussPointItem * @param The point */ - void SetPoint(const Point<3> Point) + void SetPoint(const Point Point) { this->Coordinates() = Point.Coordinates(); } diff --git a/applications/MeshingApplication/custom_processes/mmg_process.cpp b/applications/MeshingApplication/custom_processes/mmg_process.cpp index 8ecb33e0baf9..13b2de38148d 100644 --- a/applications/MeshingApplication/custom_processes/mmg_process.cpp +++ b/applications/MeshingApplication/custom_processes/mmg_process.cpp @@ -311,7 +311,10 @@ void MmgProcess::InitializeMeshData() bool to_check_elem = false; if (num_conditions > 0) { - mpRefCondition[0] = conditions_array.begin()->Create(0, conditions_array.begin()->GetGeometry(), conditions_array.begin()->pGetProperties()); + const std::string type_name = (TDim == 2) ? "Condition2D2N" : "Condition3D"; + Condition const& r_clone_condition = KratosComponents::Get(type_name); + mpRefCondition[0] = r_clone_condition.Create(0, r_clone_condition.GetGeometry(), conditions_array.begin()->pGetProperties()); +// mpRefCondition[0] = conditions_array.begin()->Create(0, conditions_array.begin()->GetGeometry(), conditions_array.begin()->pGetProperties()); to_check_cond = true; } if (num_elements > 0) diff --git a/applications/MeshingApplication/custom_processes/nodal_values_interpolation_process.h b/applications/MeshingApplication/custom_processes/nodal_values_interpolation_process.h index 03a3b981146c..010d8f86b82b 100644 --- a/applications/MeshingApplication/custom_processes/nodal_values_interpolation_process.h +++ b/applications/MeshingApplication/custom_processes/nodal_values_interpolation_process.h @@ -154,7 +154,7 @@ class NodalValuesInterpolationProcess Vector ShapeFunctions; Element::Pointer pElement; - const bool IsFound = PointLocator.FindPointOnMeshSimplified(itNode->Coordinates(), ShapeFunctions, pElement, mMaxNumberOfResults); + const bool IsFound = PointLocator.FindPointOnMeshSimplified(itNode->Coordinates(), ShapeFunctions, pElement, mMaxNumberOfResults, 5.0e-2); if (IsFound == false) { diff --git a/applications/MeshingApplication/custom_utilities/binbased_projection.h b/applications/MeshingApplication/custom_utilities/binbased_projection.h index 13ebef04745c..96a6564d7964 100644 --- a/applications/MeshingApplication/custom_utilities/binbased_projection.h +++ b/applications/MeshingApplication/custom_utilities/binbased_projection.h @@ -324,10 +324,6 @@ class BinBasedMeshTransfer } //defintions for spatial search -// typedef typename BinBasedNodesInElementLocator::PointType PointType; -// typedef typename PointType::Pointer PointTypePointer; - typedef typename BinBasedNodesInElementLocator::PointIterator PointIterator; -// typedef typename BinBasedNodesInElementLocator::DistanceIterator DistanceIterator; typedef typename BinBasedNodesInElementLocator::PointVector PointVector; typedef typename BinBasedNodesInElementLocator::DistanceVector DistanceVector; const unsigned int max_results = 5000; diff --git a/applications/MeshingApplication/python_scripts/mmg_process.py b/applications/MeshingApplication/python_scripts/mmg_process.py index 4691e14742cb..2cb8bbc5bfae 100644 --- a/applications/MeshingApplication/python_scripts/mmg_process.py +++ b/applications/MeshingApplication/python_scripts/mmg_process.py @@ -68,6 +68,7 @@ def __init__(self,Model,params): }, "save_external_files" : false, "max_number_of_searchs" : 1000, + "debug_mode" : false, "echo_level" : 3 } """) @@ -277,6 +278,13 @@ def _ExecuteRefinement(self): print("Remeshing") self.MmgProcess.Execute() + if (self.params["debug_mode"].GetBool() == True): + self.gid_mode = KratosMultiphysics.GiDPostMode.GiD_PostBinary + self.singlefile = KratosMultiphysics.MultiFileFlag.SingleFile + self.deformed_mesh_flag = KratosMultiphysics.WriteDeformedMeshFlag.WriteUndeformed + self.write_conditions = KratosMultiphysics.WriteConditionsFlag.WriteConditions + self._debug_output(self.step, "") + if (self.strategy == "LevelSet"): self.local_gradient.Execute() # Recalculate gradient after remeshing @@ -319,6 +327,22 @@ def __generate_variable_list_from_input(self,param): return variable_list + def _debug_output(self, label, name): + + gid_io = KratosMultiphysics.GidIO("REMESHING_"+name+"_STEP_"+str(label), self.gid_mode, self.singlefile, self.deformed_mesh_flag, self.write_conditions) + + gid_io.InitializeMesh(label) + gid_io.WriteMesh(self.Model[self.model_part_name].GetMesh()) + gid_io.FinalizeMesh() + gid_io.InitializeResults(label, self.Model[self.model_part_name].GetMesh()) + if (self.params["framework"].GetString() == "Lagrangian"): + gid_io.WriteNodalResults(KratosMultiphysics.DISPLACEMENT, self.Model[self.model_part_name].Nodes, label, 0) + else: + gid_io.WriteNodalResults(KratosMultiphysics.VELOCITY, self.Model[self.model_part_name].Nodes, label, 0) + gid_io.FinalizeResults() + + #raise NameError("DEBUG") + def _linear_interpolation(x, x_list, y_list): tb = KratosMultiphysics.PiecewiseLinearTable() for i in range(len(x_list)): diff --git a/applications/MeshingApplication/tests/SmallTests.py b/applications/MeshingApplication/tests/SmallTests.py index 9b3667cccaf4..fc95930d43a5 100644 --- a/applications/MeshingApplication/tests/SmallTests.py +++ b/applications/MeshingApplication/tests/SmallTests.py @@ -60,6 +60,9 @@ class TwoDCavityTest(MeshingTestFactory): class TwoDDynamicBeamTest(MeshingTestFactory): file_name = "mmg_lagrangian_test/beam2D_test" +class TwoDDynamicBeamLineLoadTest(MeshingTestFactory): + file_name = "mmg_lagrangian_test/beam2D_line_load_test" + class ThreeDDynamicBeamTest(MeshingTestFactory): file_name = "mmg_lagrangian_test/beam3D_test" diff --git a/applications/MeshingApplication/tests/mmg_lagrangian_test/beam2D_line_load_test.mdpa b/applications/MeshingApplication/tests/mmg_lagrangian_test/beam2D_line_load_test.mdpa new file mode 100755 index 000000000000..293dca52a5c7 --- /dev/null +++ b/applications/MeshingApplication/tests/mmg_lagrangian_test/beam2D_line_load_test.mdpa @@ -0,0 +1,1204 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Nodes + 1 1.0000000000 0.1000000000 0.0000000000 + 2 1.0000000000 0.0750000000 0.0000000000 + 3 0.9750000000 0.1000000000 0.0000000000 + 4 0.9646412037 0.0721554519 0.0000000000 + 5 0.9500000000 0.1000000000 0.0000000000 + 6 1.0000000000 0.0500000000 0.0000000000 + 7 0.9750000000 0.0433012702 0.0000000000 + 8 0.9378472222 0.0713301712 0.0000000000 + 9 0.9250000000 0.1000000000 0.0000000000 + 10 1.0000000000 0.0250000000 0.0000000000 + 11 0.9500000000 0.0433012702 0.0000000000 + 12 0.9625000000 0.0216506351 0.0000000000 + 13 0.9125000000 0.0702860790 0.0000000000 + 14 0.9250000000 0.0433012702 0.0000000000 + 15 0.9000000000 0.1000000000 0.0000000000 + 16 1.0000000000 0.0000000000 0.0000000000 + 17 0.9375000000 0.0216506351 0.0000000000 + 18 0.9750000000 0.0000000000 0.0000000000 + 19 0.9500000000 0.0000000000 0.0000000000 + 20 0.9000000000 0.0433012702 0.0000000000 + 21 0.8875000000 0.0701620285 0.0000000000 + 22 0.9125000000 0.0216506351 0.0000000000 + 23 0.9250000000 0.0000000000 0.0000000000 + 24 0.8750000000 0.1000000000 0.0000000000 + 25 0.8875000000 0.0216506351 0.0000000000 + 26 0.8750000000 0.0433012702 0.0000000000 + 27 0.8625000000 0.0702860790 0.0000000000 + 28 0.9000000000 0.0000000000 0.0000000000 + 29 0.8500000000 0.1000000000 0.0000000000 + 30 0.8625000000 0.0216506351 0.0000000000 + 31 0.8750000000 0.0000000000 0.0000000000 + 32 0.8500000000 0.0433012702 0.0000000000 + 33 0.8375000000 0.0649519053 0.0000000000 + 34 0.8250000000 0.1000000000 0.0000000000 + 35 0.8500000000 0.0000000000 0.0000000000 + 36 0.8375000000 0.0216506351 0.0000000000 + 37 0.8250000000 0.0433012702 0.0000000000 + 38 0.8125000000 0.0694177252 0.0000000000 + 39 0.8000000000 0.1000000000 0.0000000000 + 40 0.8250000000 0.0000000000 0.0000000000 + 41 0.8125000000 0.0216506351 0.0000000000 + 42 0.8000000000 0.0433012702 0.0000000000 + 43 0.7875000000 0.0701620285 0.0000000000 + 44 0.8000000000 0.0000000000 0.0000000000 + 45 0.7750000000 0.1000000000 0.0000000000 + 46 0.7875000000 0.0216506351 0.0000000000 + 47 0.7750000000 0.0433012702 0.0000000000 + 48 0.7625000000 0.0711751080 0.0000000000 + 49 0.7750000000 0.0000000000 0.0000000000 + 50 0.7500000000 0.1000000000 0.0000000000 + 51 0.7625000000 0.0216506351 0.0000000000 + 52 0.7500000000 0.0433012702 0.0000000000 + 53 0.7375000000 0.0702860790 0.0000000000 + 54 0.7500000000 0.0000000000 0.0000000000 + 55 0.7375000000 0.0216506351 0.0000000000 + 56 0.7250000000 0.1000000000 0.0000000000 + 57 0.7250000000 0.0433012702 0.0000000000 + 58 0.7125000000 0.0701620285 0.0000000000 + 59 0.7250000000 0.0000000000 0.0000000000 + 60 0.7125000000 0.0216506351 0.0000000000 + 61 0.7000000000 0.1000000000 0.0000000000 + 62 0.7000000000 0.0433012702 0.0000000000 + 63 0.6875000000 0.0694177252 0.0000000000 + 64 0.7000000000 0.0000000000 0.0000000000 + 65 0.6875000000 0.0216506351 0.0000000000 + 66 0.6750000000 0.1000000000 0.0000000000 + 67 0.6750000000 0.0433012702 0.0000000000 + 68 0.6625000000 0.0649519053 0.0000000000 + 69 0.6750000000 0.0000000000 0.0000000000 + 70 0.6625000000 0.0216506351 0.0000000000 + 71 0.6500000000 0.1000000000 0.0000000000 + 72 0.6500000000 0.0433012702 0.0000000000 + 73 0.6375000000 0.0702860790 0.0000000000 + 74 0.6500000000 0.0000000000 0.0000000000 + 75 0.6375000000 0.0216506351 0.0000000000 + 76 0.6250000000 0.1000000000 0.0000000000 + 77 0.6250000000 0.0433012702 0.0000000000 + 78 0.6250000000 0.0000000000 0.0000000000 + 79 0.6125000000 0.0701620285 0.0000000000 + 80 0.6125000000 0.0216506351 0.0000000000 + 81 0.6000000000 0.1000000000 0.0000000000 + 82 0.6000000000 0.0433012702 0.0000000000 + 83 0.6000000000 0.0000000000 0.0000000000 + 84 0.5875000000 0.0694177252 0.0000000000 + 85 0.5875000000 0.0216506351 0.0000000000 + 86 0.5750000000 0.1000000000 0.0000000000 + 87 0.5750000000 0.0433012702 0.0000000000 + 88 0.5750000000 0.0000000000 0.0000000000 + 89 0.5625000000 0.0701620285 0.0000000000 + 90 0.5625000000 0.0216506351 0.0000000000 + 91 0.5500000000 0.1000000000 0.0000000000 + 92 0.5500000000 0.0433012702 0.0000000000 + 93 0.5500000000 0.0000000000 0.0000000000 + 94 0.5375000000 0.0649519053 0.0000000000 + 95 0.5375000000 0.0216506351 0.0000000000 + 96 0.5250000000 0.1000000000 0.0000000000 + 97 0.5250000000 0.0433012702 0.0000000000 + 98 0.5250000000 0.0000000000 0.0000000000 + 99 0.5125000000 0.0649519053 0.0000000000 + 100 0.5125000000 0.0216506351 0.0000000000 + 101 0.5000000000 0.1000000000 0.0000000000 + 102 0.5000000000 0.0433012702 0.0000000000 + 103 0.5000000000 0.0000000000 0.0000000000 + 104 0.4875000000 0.0783493649 0.0000000000 + 105 0.4875000000 0.0216506351 0.0000000000 + 106 0.4750000000 0.1000000000 0.0000000000 + 107 0.4750000000 0.0433012702 0.0000000000 + 108 0.4750000000 0.0000000000 0.0000000000 + 109 0.4625000000 0.0783493649 0.0000000000 + 110 0.4625000000 0.0216506351 0.0000000000 + 111 0.4500000000 0.1000000000 0.0000000000 + 112 0.4500000000 0.0433012702 0.0000000000 + 113 0.4500000000 0.0000000000 0.0000000000 + 114 0.4375000000 0.0716506351 0.0000000000 + 115 0.4375000000 0.0216506351 0.0000000000 + 116 0.4250000000 0.1000000000 0.0000000000 + 117 0.4250000000 0.0433012702 0.0000000000 + 118 0.4250000000 0.0000000000 0.0000000000 + 119 0.4125000000 0.0705341801 0.0000000000 + 120 0.4125000000 0.0216506351 0.0000000000 + 121 0.4000000000 0.1000000000 0.0000000000 + 122 0.4000000000 0.0433012702 0.0000000000 + 123 0.4000000000 0.0000000000 0.0000000000 + 124 0.3875000000 0.0703481043 0.0000000000 + 125 0.3875000000 0.0216506351 0.0000000000 + 126 0.3750000000 0.1000000000 0.0000000000 + 127 0.3750000000 0.0433012702 0.0000000000 + 128 0.3750000000 0.0000000000 0.0000000000 + 129 0.3625000000 0.0703170917 0.0000000000 + 130 0.3625000000 0.0216506351 0.0000000000 + 131 0.3500000000 0.1000000000 0.0000000000 + 132 0.3500000000 0.0433012702 0.0000000000 + 133 0.3500000000 0.0000000000 0.0000000000 + 134 0.3375000000 0.0712043977 0.0000000000 + 135 0.3375000000 0.0216506351 0.0000000000 + 136 0.3250000000 0.1000000000 0.0000000000 + 137 0.3250000000 0.0433012702 0.0000000000 + 138 0.3250000000 0.0000000000 0.0000000000 + 139 0.3125000000 0.0703067541 0.0000000000 + 140 0.3125000000 0.0216506351 0.0000000000 + 141 0.3000000000 0.1000000000 0.0000000000 + 142 0.3000000000 0.0433012702 0.0000000000 + 143 0.3000000000 0.0000000000 0.0000000000 + 144 0.2875000000 0.0702860790 0.0000000000 + 145 0.2875000000 0.0216506351 0.0000000000 + 146 0.2750000000 0.1000000000 0.0000000000 + 147 0.2750000000 0.0433012702 0.0000000000 + 148 0.2750000000 0.0000000000 0.0000000000 + 149 0.2625000000 0.0701620285 0.0000000000 + 150 0.2625000000 0.0216506351 0.0000000000 + 151 0.2500000000 0.1000000000 0.0000000000 + 152 0.2500000000 0.0433012702 0.0000000000 + 153 0.2500000000 0.0000000000 0.0000000000 + 154 0.2375000000 0.0694177252 0.0000000000 + 155 0.2375000000 0.0216506351 0.0000000000 + 156 0.2250000000 0.1000000000 0.0000000000 + 157 0.2250000000 0.0433012702 0.0000000000 + 158 0.2250000000 0.0000000000 0.0000000000 + 159 0.2125000000 0.0701620285 0.0000000000 + 160 0.2125000000 0.0216506351 0.0000000000 + 161 0.2000000000 0.1000000000 0.0000000000 + 162 0.2000000000 0.0433012702 0.0000000000 + 163 0.2000000000 0.0000000000 0.0000000000 + 164 0.1875000000 0.0649519053 0.0000000000 + 165 0.1875000000 0.0216506351 0.0000000000 + 166 0.1750000000 0.1000000000 0.0000000000 + 167 0.1750000000 0.0433012702 0.0000000000 + 168 0.1750000000 0.0000000000 0.0000000000 + 169 0.1625000000 0.0716506351 0.0000000000 + 170 0.1625000000 0.0216506351 0.0000000000 + 171 0.1500000000 0.1000000000 0.0000000000 + 172 0.1500000000 0.0433012702 0.0000000000 + 173 0.1500000000 0.0000000000 0.0000000000 + 174 0.1375000000 0.0783493649 0.0000000000 + 175 0.1375000000 0.0216506351 0.0000000000 + 176 0.1250000000 0.1000000000 0.0000000000 + 177 0.1250000000 0.0566987298 0.0000000000 + 178 0.1250000000 0.0000000000 0.0000000000 + 179 0.1125000000 0.0783493649 0.0000000000 + 180 0.1125000000 0.0283493649 0.0000000000 + 181 0.1000000000 0.1000000000 0.0000000000 + 182 0.1000000000 0.0566987298 0.0000000000 + 183 0.1000000000 0.0000000000 0.0000000000 + 184 0.0875000000 0.0783493649 0.0000000000 + 185 0.0875000000 0.0350480947 0.0000000000 + 186 0.0750000000 0.1000000000 0.0000000000 + 187 0.0750000000 0.0566987298 0.0000000000 + 188 0.0750000000 0.0000000000 0.0000000000 + 189 0.0625000000 0.0783493649 0.0000000000 + 190 0.0613095238 0.0300610580 0.0000000000 + 191 0.0500000000 0.1000000000 0.0000000000 + 192 0.0500000000 0.0566987298 0.0000000000 + 193 0.0500000000 0.0000000000 0.0000000000 + 194 0.0375000000 0.0783493649 0.0000000000 + 195 0.0303571429 0.0319207935 0.0000000000 + 196 0.0250000000 0.1000000000 0.0000000000 + 197 0.0250000000 0.0566987298 0.0000000000 + 198 0.0250000000 0.0000000000 0.0000000000 + 199 0.0000000000 0.1000000000 0.0000000000 + 200 0.0000000000 0.0750000000 0.0000000000 + 201 0.0000000000 0.0500000000 0.0000000000 + 202 0.0000000000 0.0250000000 0.0000000000 + 203 0.0000000000 0.0000000000 0.0000000000 +End Nodes + + +Begin Elements SmallDisplacementElement2D3N// GUI group identifier: Parts Auto1 + 1 0 203 198 202 + 2 0 44 40 41 + 3 0 101 106 104 + 4 0 41 40 36 + 5 0 44 41 46 + 6 0 104 106 109 + 7 0 36 40 35 + 8 0 46 41 42 + 9 0 109 106 111 + 10 0 42 41 37 + 11 0 46 42 47 + 12 0 37 41 36 + 13 0 42 37 38 + 14 0 47 42 43 + 15 0 37 36 32 + 16 0 38 37 33 + 17 0 43 42 38 + 18 0 32 36 30 + 19 0 33 37 32 + 20 0 43 38 39 + 21 0 30 36 35 + 22 0 30 35 31 + 23 0 30 31 25 + 24 0 25 31 28 + 25 0 30 25 26 + 26 0 25 28 22 + 27 0 26 25 20 + 28 0 22 28 23 + 29 0 25 22 20 + 30 0 22 23 17 + 31 0 20 22 14 + 32 0 17 23 19 + 33 0 22 17 14 + 34 0 17 19 12 + 35 0 14 17 11 + 36 0 12 19 18 + 37 0 17 12 11 + 38 0 11 12 7 + 39 0 7 12 10 + 40 0 11 7 4 + 41 0 4 7 2 + 42 0 11 4 8 + 43 0 8 4 5 + 44 0 11 8 14 + 45 0 14 8 13 + 46 0 13 8 9 + 47 0 14 13 20 + 48 0 20 13 21 + 49 0 21 13 15 + 50 0 20 21 26 + 51 0 26 21 27 + 52 0 27 21 24 + 53 0 26 27 32 + 54 0 32 27 33 + 55 0 26 32 30 + 56 0 33 27 29 + 57 0 123 118 120 + 58 0 120 118 115 + 59 0 123 120 125 + 60 0 115 118 113 + 61 0 120 115 117 + 62 0 125 120 122 + 63 0 115 113 110 + 64 0 117 115 112 + 65 0 122 120 117 + 66 0 110 113 108 + 67 0 112 115 110 + 68 0 110 108 105 + 69 0 112 110 107 + 70 0 105 108 103 + 71 0 110 105 107 + 72 0 105 103 100 + 73 0 107 105 102 + 74 0 100 103 98 + 75 0 105 100 102 + 76 0 102 100 97 + 77 0 97 100 95 + 78 0 102 97 99 + 79 0 95 100 98 + 80 0 97 95 92 + 81 0 99 97 94 + 82 0 92 95 90 + 83 0 97 92 94 + 84 0 90 95 93 + 85 0 94 92 89 + 86 0 93 95 98 + 87 0 90 93 88 + 88 0 89 92 87 + 89 0 90 88 85 + 90 0 87 92 90 + 91 0 89 87 84 + 92 0 85 88 83 + 93 0 84 87 82 + 94 0 89 84 86 + 95 0 85 83 80 + 96 0 82 87 85 + 97 0 80 83 78 + 98 0 85 80 82 + 99 0 85 87 90 + 100 0 80 78 75 + 101 0 82 80 77 + 102 0 75 78 74 + 103 0 80 75 77 + 104 0 75 74 70 + 105 0 77 75 72 + 106 0 70 74 69 + 107 0 75 70 72 + 108 0 72 70 67 + 109 0 67 70 65 + 110 0 72 67 68 + 111 0 65 70 69 + 112 0 67 65 62 + 113 0 68 67 63 + 114 0 65 69 64 + 115 0 62 65 60 + 116 0 63 67 62 + 117 0 65 64 60 + 118 0 63 62 58 + 119 0 60 64 59 + 120 0 58 62 57 + 121 0 63 58 61 + 122 0 57 62 60 + 123 0 58 57 53 + 124 0 57 60 55 + 125 0 53 57 52 + 126 0 58 53 56 + 127 0 55 60 59 + 128 0 52 57 55 + 129 0 55 59 54 + 130 0 52 55 51 + 131 0 55 54 51 + 132 0 51 54 49 + 133 0 51 49 46 + 134 0 46 49 44 + 135 0 51 46 47 + 136 0 51 47 52 + 137 0 52 47 48 + 138 0 48 47 43 + 139 0 52 48 53 + 140 0 53 48 50 + 141 0 15 24 21 + 142 0 181 186 184 + 143 0 184 186 189 + 144 0 181 184 179 + 145 0 189 186 191 + 146 0 179 184 182 + 147 0 181 179 176 + 148 0 182 184 187 + 149 0 179 182 177 + 150 0 176 179 174 + 151 0 182 187 185 + 152 0 177 182 180 + 153 0 174 179 177 + 154 0 185 187 190 + 155 0 180 182 185 + 156 0 190 187 192 + 157 0 185 190 188 + 158 0 192 187 189 + 159 0 190 192 195 + 160 0 189 187 184 + 161 0 192 189 194 + 162 0 195 192 197 + 163 0 194 189 191 + 164 0 197 192 194 + 165 0 195 201 202 + 166 0 197 194 200 + 167 0 125 122 127 + 168 0 127 122 124 + 169 0 125 127 130 + 170 0 124 122 119 + 171 0 127 124 129 + 172 0 125 130 128 + 173 0 124 119 121 + 174 0 129 124 126 + 175 0 128 130 133 + 176 0 133 130 135 + 177 0 135 130 132 + 178 0 133 135 138 + 179 0 132 130 127 + 180 0 138 135 140 + 181 0 132 127 129 + 182 0 140 135 137 + 183 0 138 140 143 + 184 0 137 135 132 + 185 0 140 137 142 + 186 0 143 140 145 + 187 0 137 132 134 + 188 0 142 137 139 + 189 0 145 140 142 + 190 0 134 132 129 + 191 0 139 137 134 + 192 0 134 129 131 + 193 0 119 122 117 + 194 0 119 117 114 + 195 0 114 117 112 + 196 0 119 114 116 + 197 0 114 112 109 + 198 0 125 128 123 + 199 0 142 139 144 + 200 0 144 139 141 + 201 0 142 144 147 + 202 0 147 144 149 + 203 0 142 147 145 + 204 0 149 144 146 + 205 0 147 149 152 + 206 0 145 147 150 + 207 0 152 149 154 + 208 0 147 152 150 + 209 0 145 150 148 + 210 0 154 149 151 + 211 0 150 152 155 + 212 0 148 150 153 + 213 0 145 148 143 + 214 0 155 152 157 + 215 0 150 155 153 + 216 0 157 152 154 + 217 0 155 157 160 + 218 0 153 155 158 + 219 0 157 154 159 + 220 0 160 157 162 + 221 0 155 160 158 + 222 0 159 154 156 + 223 0 160 162 165 + 224 0 158 160 163 + 225 0 165 162 167 + 226 0 163 160 165 + 227 0 167 162 164 + 228 0 165 167 170 + 229 0 164 162 159 + 230 0 167 164 169 + 231 0 170 167 172 + 232 0 159 162 157 + 233 0 169 164 166 + 234 0 172 167 169 + 235 0 172 169 174 + 236 0 163 165 168 + 237 0 168 165 170 + 238 0 168 170 173 + 239 0 173 170 175 + 240 0 175 170 172 + 241 0 173 175 178 + 242 0 175 172 177 + 243 0 178 175 180 + 244 0 16 10 18 + 245 0 141 146 144 + 246 0 61 66 63 + 247 0 77 72 73 + 248 0 73 72 68 + 249 0 77 73 79 + 250 0 73 68 71 + 251 0 79 73 76 + 252 0 77 79 82 + 253 0 82 79 84 + 254 0 84 79 81 + 255 0 183 178 180 + 256 0 121 126 124 + 257 0 39 45 43 + 258 0 199 200 196 + 259 0 176 174 171 + 260 0 171 174 169 + 261 0 1 3 2 + 262 0 161 166 164 + 263 0 81 86 84 + 264 0 48 43 45 + 265 0 193 188 190 + 266 0 111 116 114 + 267 0 12 18 10 + 268 0 29 34 33 + 269 0 191 196 194 + 270 0 194 196 200 + 271 0 102 99 104 + 272 0 6 2 7 + 273 0 151 156 154 + 274 0 71 76 73 + 275 0 104 109 107 + 276 0 131 136 134 + 277 0 177 180 175 + 278 0 50 56 53 + 279 0 201 195 197 + 280 0 5 9 8 + 281 0 91 96 94 + 282 0 38 33 34 + 283 0 198 193 195 + 284 0 109 111 114 + 285 0 24 29 27 + 286 0 112 107 109 + 287 0 10 6 7 + 288 0 146 151 149 + 289 0 66 71 68 + 290 0 68 63 66 + 291 0 126 131 129 + 292 0 45 50 48 + 293 0 200 201 197 + 294 0 180 185 183 + 295 0 3 5 4 + 296 0 166 171 169 + 297 0 139 134 136 + 298 0 86 91 89 + 299 0 94 89 91 + 300 0 188 183 185 + 301 0 116 121 119 + 302 0 107 102 104 + 303 0 34 39 38 + 304 0 99 94 96 + 305 0 156 161 159 + 306 0 76 81 79 + 307 0 174 177 172 + 308 0 136 141 139 + 309 0 56 61 58 + 310 0 101 104 99 + 311 0 9 15 13 + 312 0 190 195 193 + 313 0 96 101 99 + 314 0 164 159 161 + 315 0 202 198 195 + 316 0 2 3 4 +End Elements + +Begin Conditions LineLoadCondition2D2N// GUI group identifier: Load on lines Auto1 +1 0 1 3 +2 0 3 5 +3 0 5 9 +4 0 9 15 +5 0 15 24 +6 0 24 29 +7 0 29 34 +8 0 34 39 +9 0 39 45 +10 0 45 50 +11 0 50 56 +12 0 56 61 +13 0 61 66 +14 0 66 71 +15 0 71 76 +16 0 76 81 +17 0 81 86 +18 0 86 91 +19 0 91 96 +20 0 96 101 +21 0 101 106 +22 0 106 111 +23 0 111 116 +24 0 116 121 +25 0 121 126 +26 0 126 131 +27 0 131 136 +28 0 136 141 +29 0 141 146 +30 0 146 151 +31 0 151 156 +32 0 156 161 +33 0 161 166 +34 0 166 171 +35 0 171 176 +36 0 176 181 +37 0 181 186 +38 0 186 191 +39 0 191 196 +40 0 196 199 +End Conditions + +Begin SubModelPart Parts_Parts_Auto1 // Group Parts Auto1 // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + 257 + 258 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 269 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 278 + 279 + 280 + 281 + 282 + 283 + 284 + 285 + 286 + 287 + 288 + 289 + 290 + 291 + 292 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 303 + 304 + 305 + 306 + 307 + 308 + 309 + 310 + 311 + 312 + 313 + 314 + 315 + 316 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Displacement_Auto1 // Group Displacement Auto1 // Subtree DISPLACEMENT + Begin SubModelPartNodes + 199 + 200 + 201 + 202 + 203 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart LineLoad2D_Load_on_lines_Auto1 // Group Load on lines Auto1 // Subtree LineLoad2D + Begin SubModelPartNodes + 1 + 3 + 5 + 9 + 15 + 24 + 29 + 34 + 39 + 45 + 50 + 56 + 61 + 66 + 71 + 76 + 81 + 86 + 91 + 96 + 101 + 106 + 111 + 116 + 121 + 126 + 131 + 136 + 141 + 146 + 151 + 156 + 161 + 166 + 171 + 176 + 181 + 186 + 191 + 196 + 199 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + End SubModelPartConditions +End SubModelPart diff --git a/applications/MeshingApplication/tests/mmg_lagrangian_test/beam2D_line_load_test_parameters.json b/applications/MeshingApplication/tests/mmg_lagrangian_test/beam2D_line_load_test_parameters.json new file mode 100644 index 000000000000..93120fd144d3 --- /dev/null +++ b/applications/MeshingApplication/tests/mmg_lagrangian_test/beam2D_line_load_test_parameters.json @@ -0,0 +1,148 @@ +{ + "problem_data" : { + "problem_name" : "beam2D_line_load_test", + "model_part_name" : "MainModelPart", + "domain_size" : 2, + "solve_problem" : true, + "problem_type" : "solid", + "parallel_type" : "OpenMP", + "time_step" : 0.0005, + "start_time" : 0.0, + "end_time" : 0.005, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_implicit_dynamic_solver", + "echo_level" : 0, + "solution_type" : "Dynamic", + "time_integration_method" : "Implicit", + "scheme_type" : "Newmark", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "mmg_lagrangian_test/beam2D_line_load_test", + "input_file_label" : 0 + }, + "material_import_settings" :{ + "materials_filename": "mmg_lagrangian_test/materials_2D.json" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 0.0001, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 10, + "linear_solver_settings" : { + "solver_type" : "SuperLUSolver", + "scaling" : false + }, + "problem_domain_sub_model_part_list" : ["Parts_Parts_Auto1"], + "processes_sub_model_part_list" : ["Parts_Parts_Auto1","DISPLACEMENT_Displacement_Auto1","LineLoad2D_Load_on_lines_Auto1"] + }, + "constraints_process_list" : [{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_Displacement_Auto1", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,0.0,0.0], + "interval" : [0.0,"End"] + } + }], + "loads_process_list" : [{ + "python_module" : "assign_vector_by_direction_to_condition_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process sets a vector variable value over a condition", + "check" : "DirectorVectorNonZero direction", + "process_name" : "AssignModulusAndDirectionToConditionsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "LineLoad2D_Load_on_lines_Auto1", + "variable_name" : "LINE_LOAD", + "modulus" : -1.0e7, + "direction" : [0.0,1,0.0], + "interval" : [0.0,"End"] + } + }], + "_output_configuration" : { + "result_file_configuration" : { + "gidpost_flags" : { + "GiDPostMode" : "GiD_PostBinary", + "WriteDeformedMeshFlag" : "WriteDeformed", + "WriteConditionsFlag" : "WriteConditions", + "MultiFileFlag" : "MultipleFiles" + }, + "file_label" : "step", + "output_control_type" : "step", + "output_frequency" : 1, + "body_output" : true, + "node_output" : false, + "skin_output" : false, + "plane_output" : [], + "nodal_results" : ["DISPLACEMENT","REACTION","VELOCITY","ACCELERATION"], + "gauss_point_results" : ["GREEN_LAGRANGE_STRAIN_TENSOR","CAUCHY_STRESS_TENSOR","VON_MISES_STRESS"] + }, + "point_data_configuration" : [] + }, + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "recursive_remeshing_process" :[ + { + "python_module" : "mmg_process", + "kratos_module" : "KratosMultiphysics.MeshingApplication", + "help" : "This process automatically remesh using MMG library", + "process_name" : "MmgProcess", + "Parameters" : { + "model_part_name" : "MainModelPart", + "strategy" : "Hessian", + "hessian_strategy_parameters" :{ + "metric_variable" : ["DISPLACEMENT"], + "interpolation_error" : 0.004 + }, + "framework" : "Lagrangian", + "automatic_remesh" : true, + "automatic_remesh_parameters" :{ + "automatic_remesh_type" : "Ratio", + "min_size_ratio" : 0.5, + "max_size_ratio" : 1.0, + "refer_type" : "Mean" + }, + "initial_remeshing" : false, + "step_frequency" : 10, + "enforce_current" : true, + "filename" : "mmg_lagrangian_test/beam2D_line_load_test", + "save_external_files" : true, + "anisotropy_remeshing" : false, + "echo_level" : 0, + "debug_mode" : false + } + } + ], + "compare_two_files_check_process" :[ + { + "python_module" : "compare_two_files_check_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process compares two files and executes an Unittest Assert", + "process_name" : "CompareTwoFilesCheckProcess", + "Parameters" : { + "file_name_1" : "mmg_lagrangian_test/beam2D_line_load_test_step=10.sol", + "file_name_2" : "mmg_lagrangian_test/beam2D_line_load_test_result.sol", + "deterministic" : false, + "error_assumed" : 1.0e-6, + "dimension" : 2, + "non_deterministic_comp" : "sol_file" + } + } + ] +} diff --git a/applications/MeshingApplication/tests/mmg_lagrangian_test/beam2D_line_load_test_result.sol b/applications/MeshingApplication/tests/mmg_lagrangian_test/beam2D_line_load_test_result.sol new file mode 100644 index 000000000000..49b23f2c0557 --- /dev/null +++ b/applications/MeshingApplication/tests/mmg_lagrangian_test/beam2D_line_load_test_result.sol @@ -0,0 +1,215 @@ +MeshVersionFormatted 2 + + +Dimension 2 + + +SolAtVertices +203 +1 3 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1957.84006671068 0 1957.84006671068 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +1761.51283593089 0 1761.51283593089 +2086.73762288371 0 2086.73762288371 +1596.1682065273 0 1596.1682065273 +1596.1682065273 0 1596.1682065273 +2812.23189255761 0 2812.23189255761 +2278.65787931335 0 2278.65787931335 +2723.42730652938 0 2723.42730652938 +3055.19625590926 0 3055.19625590926 +2008.6981361874 0 2008.6981361874 +3630.74961204059 0 3630.74961204059 +3350.35851092335 0 3350.35851092335 +3020.69257502552 0 3020.69257502552 +3878.66753811399 0 3878.66753811399 +4321.89992521743 0 4321.89992521743 +4526.12677060427 0 4526.12677060427 +4152.55879158755 0 4152.55879158755 +4519.30403792106 0 4519.30403792106 +5393.98099569404 0 5393.98099569404 +6108.55010454095 0 6108.55010454095 +6338.84409679203 0 6338.84409679203 +5460.7974388932 0 5460.7974388932 +5765.0587837581 0 5765.0587837581 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 +6384.67282610918 0 6384.67282610918 + + +End diff --git a/applications/MeshingApplication/tests/test_MeshingApplication.py b/applications/MeshingApplication/tests/test_MeshingApplication.py index 00f8d9285a52..c94e050ce59c 100644 --- a/applications/MeshingApplication/tests/test_MeshingApplication.py +++ b/applications/MeshingApplication/tests/test_MeshingApplication.py @@ -28,6 +28,7 @@ from SmallTests import ThreeDHessianTest as TThreeDHessianTest from SmallTests import TwoDCavityTest as TTwoDCavityTest from SmallTests import TwoDDynamicBeamTest as TTwoDDynamicBeamTest +from SmallTests import TwoDDynamicBeamLineLoadTest as TTwoDDynamicBeamLineLoadTest from SmallTests import ThreeDDynamicBeamTest as TThreeDDynamicBeamTest from SmallTests import TwoDDynamicPlasticBeamTest as TTwoDDynamicPlasticBeamTest @@ -65,6 +66,7 @@ def AssambleTestSuites(): smallSuite.addTest(TTestRemeshMMG('test_remesh_sphere')) if (missing_external_solid_dependencies == False): smallSuite.addTest(TTwoDDynamicBeamTest('test_execution')) + smallSuite.addTest(TTwoDDynamicBeamLineLoadTest('test_execution')) smallSuite.addTest(TThreeDDynamicBeamTest('test_execution')) smallSuite.addTest(TTwoDDynamicPlasticBeamTest('test_execution')) else: @@ -113,8 +115,9 @@ def AssambleTestSuites(): allSuite.addTests( KratosUnittest.TestLoader().loadTestsFromTestCases([ TTwoDDynamicBeamTest, + TTwoDDynamicBeamLineLoadTest, TThreeDDynamicBeamTest, - #TTwoDDynamicPlasticBeamTest, + ##TTwoDDynamicPlasticBeamTest, ]) ) else: diff --git a/applications/OpenCLapplication/custom_python/add_spatial_containers_to_python.cpp b/applications/OpenCLapplication/custom_python/add_spatial_containers_to_python.cpp index dfb98bfb7534..b0c7324cc360 100644 --- a/applications/OpenCLapplication/custom_python/add_spatial_containers_to_python.cpp +++ b/applications/OpenCLapplication/custom_python/add_spatial_containers_to_python.cpp @@ -68,7 +68,7 @@ void AddSpatialContainersToPython() static const std::size_t Dim = 3; - typedef Kratos::Point PointType; + typedef Kratos::Point PointType; typedef Kratos::Tetrahedra3D4ObjectType; typedef PointType* PtrPointType; diff --git a/applications/OpenCLapplication/spatial_containers/main_cpp_3d-2-Triangle.cpp b/applications/OpenCLapplication/spatial_containers/main_cpp_3d-2-Triangle.cpp index e30ff1b4a9cd..29ea96058c55 100644 --- a/applications/OpenCLapplication/spatial_containers/main_cpp_3d-2-Triangle.cpp +++ b/applications/OpenCLapplication/spatial_containers/main_cpp_3d-2-Triangle.cpp @@ -45,7 +45,7 @@ class Point coord[i] = rrandom(); } - void operator=(Point const& Other) + void operator=(Point const& Other) { for(std::size_t i = 0; i < dim_type; i++) coord[i] = Other.coord[i]; @@ -53,7 +53,7 @@ class Point }; template< std::size_t dim_type > -std::ostream & operator<<( std::ostream& rOut, Point & rPoint) +std::ostream & operator<<( std::ostream& rOut, Point & rPoint) { rOut << "(" << rPoint.id << ") "; for(std::size_t i = 0 ; i < dim_type ; i++) @@ -62,7 +62,7 @@ std::ostream & operator<<( std::ostream& rOut, Point & rPoint) }; template< std::size_t dim_type > -std::istream & operator>>( std::istream& rIn, Point & rPoint) +std::istream & operator>>( std::istream& rIn, Point & rPoint) { for(std::size_t i = 0 ; i < dim_type ; i++) rIn >> rPoint[i]; @@ -102,7 +102,7 @@ class PointDistance2 }; template< std::size_t dim > -bool LowerPoint( Point const& reference, Point const& new_ ) +bool LowerPoint(Point const& reference,Point const& new_ ) { for(std::size_t i = 0 ; i < dim ; i++) if( reference[i] < new_[i] ) @@ -111,7 +111,7 @@ bool LowerPoint( Point const& reference, Point const& new_ ) }; template< std::size_t dim > -bool UpperPoint( Point const& reference, Point const& new_ ) +bool UpperPoint(Point const& reference,Point const& new_ ) { for(std::size_t i = 0 ; i < dim ; i++) if( reference[i] > new_[i] ) @@ -157,7 +157,7 @@ int main(int arg, char* argv[]) static const std::size_t Dim = 3; - typedef Point PointType; + typedefPoint PointType; typedef PointType* PtrPointType; typedef PtrPointType* PointVector; diff --git a/applications/OpenCLapplication/spatial_containers/main_cpp_3d-2-openCL.cpp b/applications/OpenCLapplication/spatial_containers/main_cpp_3d-2-openCL.cpp index dfba4835f6d5..615e16098428 100644 --- a/applications/OpenCLapplication/spatial_containers/main_cpp_3d-2-openCL.cpp +++ b/applications/OpenCLapplication/spatial_containers/main_cpp_3d-2-openCL.cpp @@ -44,7 +44,7 @@ class Point coord[i] = rrandom(); } - void operator=(Point const& Other) + void operator=(Point const& Other) { for(std::size_t i = 0; i < dim_type; i++) coord[i] = Other.coord[i]; @@ -52,7 +52,7 @@ class Point }; template< std::size_t dim_type > -std::ostream & operator<<( std::ostream& rOut, Point & rPoint) +std::ostream & operator<<( std::ostream& rOut,Point & rPoint) { rOut << "(" << rPoint.id << ") "; for(std::size_t i = 0 ; i < dim_type ; i++) @@ -61,7 +61,7 @@ std::ostream & operator<<( std::ostream& rOut, Point & rPoint) }; template< std::size_t dim_type > -std::istream & operator>>( std::istream& rIn, Point & rPoint) +std::istream & operator>>( std::istream& rIn,Point & rPoint) { for(std::size_t i = 0 ; i < dim_type ; i++) rIn >> rPoint[i]; @@ -101,7 +101,7 @@ class PointDistance2 }; template< std::size_t dim > -bool LowerPoint( Point const& reference, Point const& new_ ) +bool LowerPoint( Point const& reference, Point const& new_ ) { for(std::size_t i = 0 ; i < dim ; i++) if( reference[i] < new_[i] ) @@ -110,7 +110,7 @@ bool LowerPoint( Point const& reference, Point const& new_ ) }; template< std::size_t dim > -bool UpperPoint( Point const& reference, Point const& new_ ) +bool UpperPoint( Point const& reference, Point const& new_ ) { for(std::size_t i = 0 ; i < dim ; i++) if( reference[i] > new_[i] ) @@ -156,7 +156,7 @@ int main(int arg, char* argv[]) static const std::size_t Dim = 3; - typedef Point PointType; + typedef Point PointType; typedef PointType* PtrPointType; typedef PtrPointType* PointVector; diff --git a/applications/ParticleMechanicsApplication/CMakeLists.txt b/applications/ParticleMechanicsApplication/CMakeLists.txt index 7bf2902fe0b9..ab1d229701d4 100644 --- a/applications/ParticleMechanicsApplication/CMakeLists.txt +++ b/applications/ParticleMechanicsApplication/CMakeLists.txt @@ -13,6 +13,7 @@ set( KRATOS_PARTICLE_MECHANICS_APPLICATION_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/custom_python/add_custom_utilities_to_python.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_python/add_custom_strategies_to_python.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_python/add_custom_constitutive_laws_to_python.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/custom_python/add_custom_processes_to_python.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/updated_lagrangian.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/updated_lagrangian_UP.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/updated_lagrangian_quadrilateral.cpp diff --git a/applications/ParticleMechanicsApplication/custom_elements/updated_lagrangian.cpp b/applications/ParticleMechanicsApplication/custom_elements/updated_lagrangian.cpp index 301d8d72382c..259234b1f62a 100644 --- a/applications/ParticleMechanicsApplication/custom_elements/updated_lagrangian.cpp +++ b/applications/ParticleMechanicsApplication/custom_elements/updated_lagrangian.cpp @@ -480,72 +480,11 @@ void UpdatedLagrangian::CalculateElementalSystem( LocalSystemComponents& rLocalS //this->SetValue(MP_DENSITY, MP_Density); this->SetValue(MP_VOLUME, MP_Volume); - - - - - if ( rLocalSystem.CalculationFlags.Is(UpdatedLagrangian::COMPUTE_LHS_MATRIX) ) //calculation of the matrix is required - { - - //create constitutive law parameters: - ConstitutiveLaw::Parameters Values(GetGeometry(),GetProperties(),rCurrentProcessInfo); - - - //set constitutive law flags: - Flags &ConstitutiveLawOptions=Values.GetOptions(); - - //std::cout<<"in CalculateElementalSystem 5"<CalculateKinematics(Variables,rCurrentProcessInfo); - - //set general variables to constitutivelaw parameters - this->SetGeneralVariables(Variables,Values); - - mConstitutiveLawVector->CalculateMaterialResponse(Values, Variables.StressMeasure); - - //this->SetValue(MP_CAUCHY_STRESS_VECTOR, Variables.StressVector); - //this->SetValue(MP_ALMANSI_STRAIN_VECTOR, Variables.StrainVector); - - //at the first iteration I recover the previous state of stress and strain - //if(rCurrentProcessInfo[NL_ITERATION_NUMBER] == 1) - //{ - //this->SetValue(PREVIOUS_MP_CAUCHY_STRESS_VECTOR, Variables.StressVector); - //this->SetValue(PREVIOUS_MP_ALMANSI_STRAIN_VECTOR, Variables.StrainVector); - //} - //the MP density is updated - double MP_Density = (GetProperties()[DENSITY]) / Variables.detFT; - this->SetValue(MP_DENSITY, MP_Density); - //if(this->Id() == 1786 || this->Id() == 1836) - //{ - //std::cout<<"density "<Id() << GetProperties()[DENSITY]<GetValue(MP_MASS)/this->GetValue(MP_DENSITY); - - //this->SetValue(MP_DENSITY, MP_Density); - this->SetValue(MP_VOLUME, MP_Volume); - - - - - if ( rLocalSystem.CalculationFlags.Is(UpdatedLagrangian::COMPUTE_LHS_MATRIX) ) //calculation of the matrix is required - { + if ( rLocalSystem.CalculationFlags.Is(UpdatedLagrangian::COMPUTE_LHS_MATRIX) ) //calculation of the matrix is required + { //contributions to stiffness matrix calculated on the reference config this->CalculateAndAddLHS ( rLocalSystem, Variables, MP_Volume ); - } if ( rLocalSystem.CalculationFlags.Is(UpdatedLagrangian::COMPUTE_RHS_VECTOR) ) //calculation of the vector is required @@ -554,11 +493,8 @@ void UpdatedLagrangian::CalculateElementalSystem( LocalSystemComponents& rLocalS VolumeForce = this->CalculateVolumeForce( VolumeForce, Variables ); this->CalculateAndAddRHS ( rLocalSystem, Variables, VolumeForce, MP_Volume ); - } - - KRATOS_CATCH( "" ) } //*********************************COMPUTE KINEMATICS********************************* @@ -1494,8 +1430,9 @@ void UpdatedLagrangian::FinalizeNonLinearIteration( ProcessInfo& rCurrentProcess ////************************************************************************************ ////************************************************************************************ - ConstitutiveLawOptions.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN); - ConstitutiveLawOptions.Set(ConstitutiveLaw::COMPUTE_STRESS); +void UpdatedLagrangian::FinalizeSolutionStep( ProcessInfo& rCurrentProcessInfo ) +{ + KRATOS_TRY //create and initialize element variables: GeneralVariables Variables; @@ -1535,7 +1472,6 @@ void UpdatedLagrangian::FinalizeNonLinearIteration( ProcessInfo& rCurrentProcess } - ////************************************************************************************ ////************************************************************************************ @@ -1709,8 +1645,9 @@ void UpdatedLagrangian::InitializeMaterial() else KRATOS_THROW_ERROR( std::logic_error, "a constitutive law needs to be specified for the element with ID ", this->Id() ) //std::cout<< "in initialize material "<Id() << GetProperties()[DENSITY]<Id() == 541 || this->Id() == 534 || this->Id() == 538) - //{ - //std::cout<<" in calculate elemental system "<CalculateKinematics(Variables,rCurrentProcessInfo); - - //set general variables to constitutivelaw parameters - this->SetGeneralVariables(Variables,Values); - - mConstitutiveLawVector->CalculateMaterialResponse(Values, Variables.StressMeasure); - - //double TraceStress = 0; - //Matrix I=identity_matrix( dimension ); - //Matrix StressTensor = MathUtils::StressVectorToTensor( Variables.StressVector ); - //for( unsigned int i=0; i::StressVectorToTensor( Variables.IsoStressVector ); - //IsoStressTensor = StressTensor - Pressure * I; - - //double IsoStressNorm = 0; - ////IsoStressNorm = sqrt((IsoStressTensor(0,0)*IsoStressTensor(0,0))+(IsoStressTensor(1,1)*IsoStressTensor(1,1))+(IsoStressTensor(2,2)*IsoStressTensor(2,2))+ - ////(IsoStressTensor(0,1)*IsoStressTensor(0,1))+(IsoStressTensor(0,2)*IsoStressTensor(0,2))+(IsoStressTensor(1,2)*IsoStressTensor(1,2))+ - ////(IsoStressTensor(1,0)*IsoStressTensor(1,0))+(IsoStressTensor(2,0)*IsoStressTensor(2,0))+(IsoStressTensor(2,1)*IsoStressTensor(2,1))); - - //IsoStressNorm = sqrt((IsoStressTensor(0,0)*IsoStressTensor(0,0))+(IsoStressTensor(1,1)*IsoStressTensor(1,1))+ - //(IsoStressTensor(0,1)*IsoStressTensor(0,1))+(IsoStressTensor(1,0)*IsoStressTensor(1,0))); - //Variables.Normal = IsoStressTensor / IsoStressNorm; - //if (IsoStressTensor(0,0) == 0 || IsoStressTensor(1,1) == 0 || IsoStressTensor(0,1) == 0 || IsoStressTensor(1,0)) - //{ - //Variables.Normal = ZeroMatrix(dimension); - //} - - - //std::cout<<"IsoStressTensor "<SetValue(MP_CAUCHY_STRESS_VECTOR, Variables.StressVector); - //std::cout<<"AAAAAAAAAAAAAAAAAAAAAAAAAA"<SetValue(MP_ALMANSI_STRAIN_VECTOR, Variables.StrainVector); - //double EquivalentPlasticStrain = mConstitutiveLawVector->GetValue( PLASTIC_STRAIN, EquivalentPlasticStrain ); - //this->SetValue(MP_EQUIVALENT_PLASTIC_STRAIN, EquivalentPlasticStrain); - //at the first iteration I recover the previous state of stress and strain - if(rCurrentProcessInfo[NL_ITERATION_NUMBER] == 1) - { - this->SetValue(PREVIOUS_MP_CAUCHY_STRESS_VECTOR, Variables.StressVector); - this->SetValue(PREVIOUS_MP_ALMANSI_STRAIN_VECTOR, Variables.StrainVector); - } - //the MP density is updated - double MP_Density = (GetProperties()[DENSITY]) / Variables.detFT; - //if(this->Id() == 1786 || this->Id() == 1836) - //{ - //std::cout<<"density "<Id() << GetProperties()[DENSITY]<GetValue(MP_MASS)/this->GetValue(MP_DENSITY); - - this->SetValue(MP_DENSITY, MP_Density); - this->SetValue(MP_VOLUME, MP_Volume); - - - - - if ( rLocalSystem.CalculationFlags.Is(UpdatedLagrangianQuadrilateral::COMPUTE_LHS_MATRIX) ) //calculation of the matrix is required - { - - //contributions to stiffness matrix calculated on the reference config - this->CalculateAndAddLHS ( rLocalSystem, Variables, MP_Volume ); + //the integration weight is evaluated + double MP_Volume = this->GetValue(MP_MASS)/this->GetValue(MP_DENSITY); + + this->SetValue(MP_DENSITY, MP_Density); + this->SetValue(MP_VOLUME, MP_Volume); + + + + + if ( rLocalSystem.CalculationFlags.Is(UpdatedLagrangianQuadrilateral::COMPUTE_LHS_MATRIX) ) //calculation of the matrix is required + { + + //contributions to stiffness matrix calculated on the reference config + this->CalculateAndAddLHS ( rLocalSystem, Variables, MP_Volume ); } @@ -629,8 +548,6 @@ void UpdatedLagrangianQuadrilateral::CalculateElementalSystem( LocalSystemCompon } - - KRATOS_CATCH( "" ) } //*********************************COMPUTE KINEMATICS********************************* @@ -1634,11 +1551,8 @@ void UpdatedLagrangianQuadrilateral::FinalizeSolutionStep( ProcessInfo& rCurrent //create constitutive law parameters: ConstitutiveLaw::Parameters Values(GetGeometry(),GetProperties(),rCurrentProcessInfo); - ConstitutiveLawOptions.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN); - ConstitutiveLawOptions.Set(ConstitutiveLaw::COMPUTE_STRESS); - //ConstitutiveLawOptions.Set(ConstitutiveLaw::ISOCHORIC_TENSOR_ONLY); - //compute element kinematics B, F, DN_DX ... - this->CalculateKinematics(Variables, rCurrentProcessInfo); + //set constitutive law flags: + Flags &ConstitutiveLawOptions=Values.GetOptions(); ConstitutiveLawOptions.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN); ConstitutiveLawOptions.Set(ConstitutiveLaw::COMPUTE_STRESS); diff --git a/applications/ParticleMechanicsApplication/custom_processes/particle_erase_process.h b/applications/ParticleMechanicsApplication/custom_processes/particle_erase_process.h new file mode 100644 index 000000000000..f61b8d9165e9 --- /dev/null +++ b/applications/ParticleMechanicsApplication/custom_processes/particle_erase_process.h @@ -0,0 +1,312 @@ +/* +============================================================================== +KratosPFEMApplication +A library based on: +Kratos +A General Purpose Software for Multi-Physics Finite Element Analysis +Version 1.0 (Released on march 05, 2007). + +Copyright 2007 +Pooyan Dadvand, Riccardo Rossi +pooyan@cimne.upc.edu +rrossi@cimne.upc.edu +- CIMNE (International Center for Numerical Methods in Engineering), +Gran Capita' s/n, 08034 Barcelona, Spain + + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following condition: + +Distribution of this code for any commercial purpose is permissible +ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNERS. + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +============================================================================== +*/ + +// +// Project Name: Kratos +// Last Modified by: $Author: iiaconeta $ +// +// + + +#if !defined(KRATOS_PARTICLE_ERASE_PROCESS_INCLUDED ) +#define KRATOS_PARTICLE_ERASE_PROCESS_INCLUDED + + + +// System includes +#include +#include +#include + +// External includes + + +// Project includes +#include "includes/define.h" +#include "processes/process.h" +#include "includes/node.h" +#include "includes/element.h" +#include "includes/model_part.h" +#include "includes/kratos_flags.h" + +#include "utilities/math_utils.h" + +#include "particle_mechanics_application.h" +//#include "custom_utilities/compute_mls_shape_functions_utility.h" +//#include "custom_processes/compute_shape_functions_process.h" + +namespace Kratos +{ + +///@name Kratos Globals +///@{ + +///@} +///@name Type Definitions +///@{ + + +///@} +///@name Enum's +///@{ + +///@} +///@name Functions +///@{ + +///@} +///@name Kratos Classes +///@{ + +/// Short class definition. +//erases the nodes marked as +/** Detail class definition. +*/ + +class ParticleEraseProcess + : public Process +{ +public: + ///@name Type Definitions + ///@{ + + /// Pointer definition of NodeAndElementEraseProcess + KRATOS_CLASS_POINTER_DEFINITION(ParticleEraseProcess); + + ///@} + ///@name Life Cycle + ///@{ + + /// Default constructor. + ParticleEraseProcess(ModelPart& model_part) + : mr_model_part(model_part) + { + KRATOS_TRY + KRATOS_CATCH(""); + } + + /// Destructor. + virtual ~ParticleEraseProcess() + { + } + + + ///@} + ///@name Operators + ///@{ + + void operator()() + { + Execute(); + } + + + ///@} + ///@name Operations + ///@{ + + virtual void Execute() + { + KRATOS_TRY; + + + mr_model_part.RemoveElements( TO_ERASE ); + int num_element = mr_model_part.NumberOfElements(); + KRATOS_WATCH(num_element); + + KRATOS_CATCH(""); + } + + + ///@} + ///@name Access + ///@{ + + + ///@} + ///@name Inquiry + ///@{ + + + ///@} + ///@name Input and output + ///@{ + + /// Turn back information as a string. + virtual std::string Info() const + { + return "ParticleEraseProcess"; + } + + /// Print information about this object. + virtual void PrintInfo(std::ostream& rOStream) const + { + rOStream << "ParticleEraseProcess"; + } + + /// Print object's data. + virtual void PrintData(std::ostream& rOStream) const + { + } + + + ///@} + ///@name Friends + ///@{ + + + ///@} + +protected: + ///@name Protected static Member Variables + ///@{ + + + ///@} + ///@name Protected member Variables + ///@{ + + + ///@} + ///@name Protected Operators + ///@{ + + + ///@} + ///@name Protected Operations + ///@{ + + + ///@} + ///@name Protected Access + ///@{ + + + ///@} + ///@name Protected Inquiry + ///@{ + + + ///@} + ///@name Protected LifeCycle + ///@{ + + + ///@} + +private: + ///@name Static Member Variables + ///@{ + + + ///@} + ///@name Member Variables + ///@{ + ModelPart& mr_model_part; + PointerVector > mTrashedNodes; + + + ///@} + ///@name Private Operators + ///@{ + + ///@} + ///@name Private Operations + ///@{ + + + ///@} + ///@name Private Access + ///@{ + + + ///@} + ///@name Private Inquiry + ///@{ + + + ///@} + ///@name Un accessible methods + ///@{ + + /// Assignment operator. + ParticleEraseProcess& operator=(ParticleEraseProcess const& rOther); + + /// Copy constructor. + //NodeAndElementEraseProcess(NodeAndElementEraseProcess const& rOther); + + + ///@} + +}; // Class NodeAndElementEraseProcess + +///@} + +///@name Type Definitions +///@{ + + +///@} +///@name Input and output +///@{ + + +/// input stream function +inline std::istream& operator >> (std::istream& rIStream, + ParticleEraseProcess& rThis); + +/// output stream function +inline std::ostream& operator << (std::ostream& rOStream, + const ParticleEraseProcess& rThis) +{ + rThis.PrintInfo(rOStream); + rOStream << std::endl; + rThis.PrintData(rOStream); + + return rOStream; +} +///@} + + +} // namespace Kratos. + +#endif // KRATOS_NODE_AND_ELEMENT_ERASE_PROCESS_INCLUDED defined + diff --git a/applications/ParticleMechanicsApplication/custom_python/add_custom_processes_to_python.cpp b/applications/ParticleMechanicsApplication/custom_python/add_custom_processes_to_python.cpp new file mode 100644 index 000000000000..09cd5502e4ea --- /dev/null +++ b/applications/ParticleMechanicsApplication/custom_python/add_custom_processes_to_python.cpp @@ -0,0 +1,50 @@ +// | / | +// ' / __| _` | __| _ \ __| +// . \ | ( | | ( |\__ \. +// _|\_\_| \__,_|\__|\___/ ____/ +// Multi-Physics +// +// License: BSD License +// Kratos default license: kratos/license.txt +// +// Main authors: Ilaria Iaconeta +// +// + + + +// System includes + +// External includes +#include + + +// Project includes +#include "includes/define.h" +#include "processes/process.h" +#include "custom_python/add_custom_processes_to_python.h" +#include "custom_processes/particle_erase_process.h" + + +#include "includes/node.h" + +namespace Kratos +{ + +namespace Python +{ +void AddCustomProcessesToPython() +{ + using namespace boost::python; + + + + class_ >("ParticleEraseProcess", init < ModelPart& >()); + +} + +} // namespace Python. + +} // Namespace Kratos + + diff --git a/applications/ParticleMechanicsApplication/custom_python/add_custom_processes_to_python.h b/applications/ParticleMechanicsApplication/custom_python/add_custom_processes_to_python.h new file mode 100644 index 000000000000..e1d36dfe309a --- /dev/null +++ b/applications/ParticleMechanicsApplication/custom_python/add_custom_processes_to_python.h @@ -0,0 +1,44 @@ +// | / | +// ' / __| _` | __| _ \ __| +// . \ | ( | | ( |\__ \. +// _|\_\_| \__,_|\__|\___/ ____/ +// Multi-Physics +// +// License: BSD License +// Kratos default license: kratos/license.txt +// +// Main authors: Ilaria Iaconeta +// +// + + + + +#if !defined(KRATOS_ADD_PROCESSES_TO_PYTHON_H_INCLUDED ) +#define KRATOS_ADD_PROCESSES_TO_PYTHON_H_INCLUDED + + + +// System includes + + +// External includes + + +// Project includes +#include "includes/define.h" + + +namespace Kratos +{ + +namespace Python +{ + +void AddCustomProcessesToPython(); + +} // namespace Python. + +} // namespace Kratos. + +#endif // KRATOS_ADD_PROCESSES_TO_PYTHON_H_INCLUDED defined diff --git a/applications/ParticleMechanicsApplication/custom_python/particle_mechanics_python_application.cpp b/applications/ParticleMechanicsApplication/custom_python/particle_mechanics_python_application.cpp index f3f64222ad63..b82b51560538 100644 --- a/applications/ParticleMechanicsApplication/custom_python/particle_mechanics_python_application.cpp +++ b/applications/ParticleMechanicsApplication/custom_python/particle_mechanics_python_application.cpp @@ -63,6 +63,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "custom_python/add_custom_strategies_to_python.h" #include "custom_python/add_custom_utilities_to_python.h" #include "custom_python/add_custom_constitutive_laws_to_python.h" +#include "custom_python/add_custom_processes_to_python.h" #include "custom_elements/updated_lagrangian.hpp" #include "custom_elements/updated_lagrangian_UP.hpp" @@ -139,6 +140,7 @@ BOOST_PYTHON_MODULE(KratosParticleMechanicsApplication) AddCustomStrategiesToPython(); AddCustomUtilitiesToPython(); AddCustomConstitutiveLawsToPython(); + AddCustomProcessesToPython(); def("CreateUpdatedLagragian2D3N", &CreateUpdatedLagragian2D3N); def("CreateUpdatedLagragianUP2D3N", &CreateUpdatedLagragianUP2D3N); diff --git a/applications/ParticleMechanicsApplication/custom_strategies/schemes/MPM_residual_based_bossak_scheme.hpp b/applications/ParticleMechanicsApplication/custom_strategies/schemes/MPM_residual_based_bossak_scheme.hpp index 7781c6b5ecb5..fadf9706b380 100644 --- a/applications/ParticleMechanicsApplication/custom_strategies/schemes/MPM_residual_based_bossak_scheme.hpp +++ b/applications/ParticleMechanicsApplication/custom_strategies/schemes/MPM_residual_based_bossak_scheme.hpp @@ -225,11 +225,13 @@ class MPMResidualBasedBossakScheme: public Scheme } - for (ModelPart::NodeIterator i = r_model_part.NodesBegin(); - i != r_model_part.NodesEnd(); ++i) - { - - array_1d & DeltaDisplacement = (i)->FastGetSolutionStepValue(DISPLACEMENT); + #pragma omp parallel for + + for(unsigned int iter = 0; iter < r_model_part.Nodes().size(); ++iter) + { + + auto i = r_model_part.NodesBegin() + iter; + array_1d & DeltaDisplacement = (i)->FastGetSolutionStepValue(DISPLACEMENT); array_1d & CurrentVelocity = (i)->FastGetSolutionStepValue(VELOCITY, 0); @@ -245,19 +247,11 @@ class MPMResidualBasedBossakScheme: public Scheme UpdateVelocityUpdate (CurrentVelocity, DeltaDisplacement, PreviousVelocity); UpdateAcceleration (CurrentAcceleration, DeltaDisplacement, PreviousVelocity, PreviousAcceleration); + } - //if ((i)->Id() == 55 || (i)->Id() == 61 || (i)->Id() == 69) - //{ - //std::cout<<"DeltaDisplacement "<<(i)->Id()<Id()<Id()<Id()<Id()< ) { //std::cout << " Prediction " << std::endl; - array_1d DeltaDisplacement; - - - - - for (ModelPart::NodeIterator i = r_model_part.NodesBegin(); - i != r_model_part.NodesEnd(); ++i) - { - //predicting displacement = 0.0; - //ATTENTION::: the prediction is performed only on active nodes - - array_1d & PreviousVelocity = (i)->FastGetSolutionStepValue(VELOCITY, 1); + //array_1d DeltaDisplacement; + + #pragma omp parallel for + + for(unsigned int iter = 0; iter < r_model_part.Nodes().size(); ++iter) + { + + auto i = r_model_part.NodesBegin() + iter; + array_1d & PreviousVelocity = (i)->FastGetSolutionStepValue(VELOCITY, 1); array_1d & PreviousDisplacement = (i)->FastGetSolutionStepValue(DISPLACEMENT, 1); array_1d & CurrentDisplacement = (i)->FastGetSolutionStepValue(DISPLACEMENT); //array_1d & ImposedDisplacement = (i)->FastGetSolutionStepValue(IMPOSED_DISPLACEMENT); array_1d & PreviousAcceleration = (i)->FastGetSolutionStepValue(ACCELERATION, 1); - //if ((i)->Id() == 2693 || (i)->Id() == 2790 || (i)->Id() == 2721) - //{ - //std::cout<<"PreviousVelocity "<<(i)->Id()<Id()<pGetDof(DISPLACEMENT_X))->IsFixed() == false) @@ -359,17 +346,11 @@ class MPMResidualBasedBossakScheme: public Scheme UpdateVelocityPredict (CurrentVelocity, CurrentDisplacement, PreviousVelocity, PreviousAcceleration); UpdateAcceleration (CurrentAcceleration, CurrentDisplacement, PreviousVelocity, PreviousAcceleration); + + } - //if ((i)->Id() == 2693 || (i)->Id() == 2790 || (i)->Id() == 2721 ) - //{ - //std::cout<<"CurrentVelocityUpdated in the predict "<<(i)->Id()<Id()< //LOOP OVER THE GRID NODES PERFORMED FOR CLEAR ALL NODAL INFORMATION - for (ModelPart::NodeIterator i = mr_grid_model_part.NodesBegin(); - i != mr_grid_model_part.NodesEnd(); ++i) - { - if( (i)->SolutionStepsDataHas(NODAL_MOMENTUM) && (i)->SolutionStepsDataHas(NODAL_MASS) && (i)->SolutionStepsDataHas(NODAL_INERTIA))//&& (i)->SolutionStepsDataHas(NODAL_INTERNAL_FORCE) ) + + #pragma omp parallel for + + for(unsigned int iter = 0; iter < mr_grid_model_part.Nodes().size(); ++iter) + { + + auto i = mr_grid_model_part.NodesBegin() + iter; + if( (i)->SolutionStepsDataHas(NODAL_MOMENTUM) && (i)->SolutionStepsDataHas(NODAL_MASS) && (i)->SolutionStepsDataHas(NODAL_INERTIA))//&& (i)->SolutionStepsDataHas(NODAL_INTERNAL_FORCE) ) { array_1d & NodalMomentum = (i)->FastGetSolutionStepValue(NODAL_MOMENTUM); @@ -514,8 +499,10 @@ class MPMResidualBasedBossakScheme: public Scheme DeltaNodalAcceleration.clear(); //NodalStress.clear(); } + } - } + + @@ -547,10 +534,15 @@ class MPMResidualBasedBossakScheme: public Scheme //std::cout<< "ItNum "<SolutionStepsDataHas(NODAL_MOMENTUM) && (i)->SolutionStepsDataHas(NODAL_MASS) && (i)->SolutionStepsDataHas(NODAL_INERTIA))//&& (i)->SolutionStepsDataHas(NODAL_INTERNAL_FORCE) ) + + + #pragma omp parallel for + + for(unsigned int iter = 0; iter < mr_grid_model_part.Nodes().size(); ++iter) + { + + auto i = mr_grid_model_part.NodesBegin() + iter; + if( (i)->SolutionStepsDataHas(NODAL_MOMENTUM) && (i)->SolutionStepsDataHas(NODAL_MASS) && (i)->SolutionStepsDataHas(NODAL_INERTIA))//&& (i)->SolutionStepsDataHas(NODAL_INTERNAL_FORCE) ) { array_1d & NodalMomentum = (i)->FastGetSolutionStepValue(NODAL_MOMENTUM); @@ -568,18 +560,9 @@ class MPMResidualBasedBossakScheme: public Scheme NodalMass = 0.0; } - - //if ((i)->Id() == 69 || (i)->Id() == 55 || (i)->Id() == 61) - - //{ - //std::cout<<"***************before calling initializa solution step********************************"<Id() << "\t" <<(i)->FastGetSolutionStepValue(AUX_VELOCITY,1)<Id() << "\t" <<(i)->FastGetSolutionStepValue(AUX_ACCELERATION,1)<Id() << "\t" <<(i)->FastGetSolutionStepValue(NODAL_MOMENTUM)<Id() << "\t" <<(i)->FastGetSolutionStepValue(NODAL_INERTIA)<Id() << "\t" <<(i)->FastGetSolutionStepValue(NODAL_MASS)< Scheme::InitializeSolutionStep(r_model_part,A,Dx,b); - for (ModelPart::NodeIterator i = r_model_part.NodesBegin(); - i != r_model_part.NodesEnd(); ++i) - { - double & NodalMass = (i)->FastGetSolutionStepValue(NODAL_MASS); - //double & DeltaNodalPressure=(i)->FastGetSolutionStepValue(AUX_PRESSURE,1); + #pragma omp parallel for + + for(unsigned int iter = 0; iter < mr_grid_model_part.Nodes().size(); ++iter) + { + + auto i = mr_grid_model_part.NodesBegin() + iter; + double & NodalMass = (i)->FastGetSolutionStepValue(NODAL_MASS); + double DeltaNodalPressure = 0.0; if (NodalMass > 1.0e-16 )//> 1.0e-18) { - //if ((i)->Id() == 69 || (i)->Id() == 55 || (i)->Id() == 61) - - //{ - //std::cout<<"***************after calling initializa solution step********************************"<Id() << "\t" <<(i)->FastGetSolutionStepValue(AUX_VELOCITY,1)<Id() << "\t" <<(i)->FastGetSolutionStepValue(AUX_ACCELERATION,1)<Id() << "\t" <<(i)->FastGetSolutionStepValue(NODAL_MOMENTUM)<Id() << "\t" <<(i)->FastGetSolutionStepValue(NODAL_INERTIA)<Id() << "\t" <<(i)->FastGetSolutionStepValue(NODAL_MASS)< & DeltaNodalVelocity = (i)->FastGetSolutionStepValue(AUX_VELOCITY,1); array_1d & DeltaNodalAcceleration = (i)->FastGetSolutionStepValue(AUX_ACCELERATION,1); @@ -626,52 +603,13 @@ class MPMResidualBasedBossakScheme: public Scheme array_1d & NodalAcceleration = (i)->FastGetSolutionStepValue(ACCELERATION,1); double & NodalPressure = (i)->FastGetSolutionStepValue(PRESSURE,1); - //if ((i)->Id() == 2276)// || (i)->Id() == 4159 || (i)->Id() == 4163) - //{ - - ////std::cout<<"NodalVelocity "<<(i)->Id()<Id()<Id()<Id()<Id()<Id() == 2276)// || (i)->Id() == 4159 || (i)->Id() == 4163) - //{ - - //std::cout<<"NodalPressure_BEFORE "<<(i)->Id()<HasDofFor(DISPLACEMENT_X)) - //{ - //DeltaNodalVelocity[0] = NodalMomentum[0]/NodalMass; - //DeltaNodalAcceleration[0] = NodalInertia[0]/NodalMass; - - //} - //if (i->HasDofFor(DISPLACEMENT_Y)) - //{ - //DeltaNodalVelocity[1] = NodalMomentum[1]/NodalMass; - //DeltaNodalAcceleration[1] = NodalInertia[1]/NodalMass; - - //} - //if (i->HasDofFor(DISPLACEMENT_Z)) - //{ - //DeltaNodalVelocity[2] = NodalMomentum[2]/NodalMass; - //DeltaNodalAcceleration[2] = NodalInertia[2]/NodalMass; - - //} + if (i->HasDofFor(PRESSURE)) { DeltaNodalPressure = NodalMPressure/NodalMass; } - -//************************************************************************************************************************************************************ - if ((i->pGetDof(DISPLACEMENT_X))->IsFixed() == false) { DeltaNodalVelocity[0] = NodalMomentum[0]/NodalMass; @@ -692,15 +630,7 @@ class MPMResidualBasedBossakScheme: public Scheme DeltaNodalVelocity[1] = NodalMomentum[1]/NodalMass; - ////if ((i)->Id() == 69 || (i)->Id() == 55 || (i)->Id() == 61) - - ////{ - - ////std::cout<<"DeltaNodalVelocity[1] "<<(i)->Id() << "\t" <<(i)->FastGetSolutionStepValue(AUX_VELOCITY,1)[1]<Id() << "\t" <<(i)->FastGetSolutionStepValue(AUX_ACCELERATION,1)[1]<Id() << "\t" <<(i)->FastGetSolutionStepValue(NODAL_MOMENTUM)[1]<Id() << "\t" <<(i)->FastGetSolutionStepValue(NODAL_MASS)< } } //************************************************************************************************************************************************************ - //(i)->FastGetSolutionStepValue(VELOCITY,1) += DeltaNodalVelocity; - //(i)->FastGetSolutionStepValue(ACCELERATION,1) += DeltaNodalAcceleration; - - - + NodalVelocity += DeltaNodalVelocity; NodalAcceleration += DeltaNodalAcceleration; NodalPressure += DeltaNodalPressure; - //if ((i)->Id() == 2276)// || (i)->Id() == 4159 || (i)->Id() == 4163) - //{ - - //std::cout<<"NodalPressure_AFTER "<<(i)->Id()< NormVel += (NodalVelocity[0]*NodalVelocity[0]+NodalVelocity[1]*NodalVelocity[1]+NodalVelocity[2]*NodalVelocity[2]); NormAcc += (NodalAcceleration[0]*NodalAcceleration[0]+NodalAcceleration[1]*NodalAcceleration[1]+NodalAcceleration[2]*NodalAcceleration[2]); NormPres += (NodalPressure * NodalPressure); - //if ((i)->Id() == 1998)// || (i)->Id() == 4159 || (i)->Id() == 4163) - //{ - //std::cout<<"DeltaNodalVelocity "<<(i)->Id()<Id()<Id()<Id()<Id()<<(i)->FastGetSolutionStepValue(VELOCITY)<Id()<<(i)->FastGetSolutionStepValue(ACCELERATION)<Id()<<(i)->FastGetSolutionStepValue(NODAL_DISPMASS)<Id()<Id()<Id() == 36)// || (i)->Id() == 55 || (i)->Id() == 61) - - //{ - ////std::cout<<"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"<Id()<<(i)->FastGetSolutionStepValue(NODAL_MOMENTUM)<Id()<<(i)->FastGetSolutionStepValue(NODAL_MASS)<Id()<<(i)->FastGetSolutionStepValue(NODAL_INERTIA)<Id()<Id()<Id()<<(i)->FastGetSolutionStepValue(VELOCITY,1)<Id()<<(i)->FastGetSolutionStepValue(ACCELERATION,1)< ElementsArrayType& rElements = rModelPart.Elements(); ProcessInfo& CurrentProcessInfo = rModelPart.GetProcessInfo(); - //double TotalEnergy = 0.0; - //double KineticEnergy = 0.0; - //double StrainEnergy = 0.0; + //********************************************************************************************************************************************* for (ModelPart::NodeIterator i = rModelPart.NodesBegin(); i != rModelPart.NodesEnd(); ++i) { array_1d & NodalVelocity = (i)->FastGetSolutionStepValue(VELOCITY,0); array_1d & NodalAcceleration = (i)->FastGetSolutionStepValue(ACCELERATION,0); - //if ((i)->Id() == 1998)// || (i)->Id() == 2790 || (i)->Id() == 2721 ) - //{ - //std::cout<<"FINALIZE "<Id()<Id()<pGetDof(DISPLACEMENT_X))->IsFixed() == true) @@ -959,76 +819,15 @@ class MPMResidualBasedBossakScheme: public Scheme ElementsArrayType::iterator ElementsBegin = rElements.begin() + ElementPartition[k]; ElementsArrayType::iterator ElementsEnd = rElements.begin() + ElementPartition[k + 1]; - //double TotalKineticEnergy = 0.0; - //double TotalStrainEnergy = 0.0; + for (ElementsArrayType::iterator itElem = ElementsBegin; itElem != ElementsEnd; itElem++) { itElem->FinalizeSolutionStep(CurrentProcessInfo); - //AFTER THE FINALIZATION OF TIME STEP, KINETIC AND STRAIN ENERGY CAN BE EVALUATED. - //const array_1d MP_Velocity = itElem->GetValue(MP_VELOCITY); - //array_1d AUX_MP_Velocity = itElem->GetValue(AUX_MP_VELOCITY); - //array_1d AUX_MP_Acceleration = itElem->GetValue(AUX_MP_ACCELERATION); - //AUX_MP_Velocity.clear(); - //AUX_MP_Acceleration.clear(); - //const Vector MP_Stress = itElem->GetValue(MP_CAUCHY_STRESS_VECTOR); - //const Vector Previous_MP_Stress = itElem->GetValue(PREVIOUS_MP_CAUCHY_STRESS_VECTOR); - //const Vector MP_Strain = itElem->GetValue(MP_ALMANSI_STRAIN_VECTOR); - //const Vector Previous_MP_Strain = itElem->GetValue(PREVIOUS_MP_ALMANSI_STRAIN_VECTOR); - //const Vector MP_DeltaStrain = MP_Strain - Previous_MP_Strain; - //if(itElem->Id() == 17370) - //{ - //std::cout<<"MP_Strain " << MP_Strain<GetValue(MP_MASS); - //double MP_Volume = itElem->GetValue(MP_VOLUME); - - //double MP_KineticEnergy = 0.0; - //double MP_StrainEnergy = 0.0; - - //for(unsigned int k = 0;k<3;k++) - //{ - //MP_KineticEnergy += 0.5 * MP_Mass * MP_Velocity[k] * MP_Velocity[k] ; - //} - //for(unsigned int j = 0; j < MP_Stress.size(); j++) - //{ - //MP_StrainEnergy += 0.5 * MP_Volume * (MP_Stress[j]) * (MP_Strain[j]); - //} - //itElem->SetValue(MP_KINETIC_ENERGY, MP_KineticEnergy);// + MP_Previous_KineticEnergy; - //if(itElem->Id() == 17370) - //{ - //std::cout<<" MP_StrainEnergy "<< MP_StrainEnergy<GetValue(MP_STRAIN_ENERGY)<GetValue(MP_STRAIN_ENERGY); - //MP_StrainEnergy += Previous_MP_StrainEnergy;// + MP_Previous_StrainEnergy; - //itElem->SetValue(MP_STRAIN_ENERGY, MP_StrainEnergy); - - //TotalKineticEnergy += MP_KineticEnergy; - //TotalStrainEnergy += MP_StrainEnergy; - //in the finilize of each time step the auxiliary variables are reset. - //itElem->SetValue(AUX_MP_VELOCITY,AUX_MP_Velocity); - //itElem->SetValue(AUX_MP_ACCELERATION,AUX_MP_Acceleration); - //itElem->SetValue(MP_BOOL ,0); + } - //std::cout<<"Total ENERGY "<< "\t" << TotalKineticEnergy + TotalStrainEnergy<Id() == 18144) - //{ - //itElem->SetValue(MP_KINETIC_ENERGY, TotalKineticEnergy); - //itElem->SetValue(MP_STRAIN_ENERGY, TotalStrainEnergy); - //itElem->SetValue(MP_TOTAL_ENERGY, TotalKineticEnergy + TotalStrainEnergy); - //} - //} + } diff --git a/applications/ParticleMechanicsApplication/custom_strategies/strategies/MPM_strategy.h b/applications/ParticleMechanicsApplication/custom_strategies/strategies/MPM_strategy.h index 0181c944d7b2..700c6a1c7dad 100644 --- a/applications/ParticleMechanicsApplication/custom_strategies/strategies/MPM_strategy.h +++ b/applications/ParticleMechanicsApplication/custom_strategies/strategies/MPM_strategy.h @@ -48,7 +48,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* System includes */ #include - +//#include /* External includes */ #include "boost/smart_ptr.hpp" @@ -64,25 +64,26 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "solid_mechanics_application.h" //geometry utilities #include "utilities/geometry_utilities.h" -//#include "strucural_application.h" + #include "particle_mechanics_application.h" #include "custom_elements/updated_lagrangian.hpp" -//#include "custom_strategies/custom_schemes/schemes/residual_based_bossak_scheme.hpp" + #include "custom_strategies/schemes/MPM_residual_based_bossak_scheme.hpp" -//#include "custom_strategies/schemes/residual_based_static_scheme.hpp" + #include "solving_strategies/schemes/residualbased_incrementalupdate_static_scheme.h" -//#include "custom_strategies/builders_and_solvers/residual_based_builder_and_solver.hpp" + #include "solving_strategies/builder_and_solvers/residualbased_elimination_builder_and_solver.h" -// #include "custom_strategies/custom_builders_and_solvers/block_residual_based_builder_and_solver.hpp" + //convergence criterias #include "solving_strategies/convergencecriterias/convergence_criteria.h" +#include "solving_strategies/convergencecriterias/residual_criteria.h" #include "custom_strategies/convergence_criteria/displacement_convergence_criterion.hpp" #include "custom_strategies/strategies/MPM_residual_based_newton_raphson_strategy.hpp" -#include "custom_strategies/strategies/MPM_strategy.h" +//#include "custom_strategies/strategies/MPM_strategy.h" #include "solving_strategies/builder_and_solvers/builder_and_solver.h" #include "solving_strategies/schemes/scheme.h" @@ -92,7 +93,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "solving_strategies/strategies/residualbased_linear_strategy.h" #include "solving_strategies/builder_and_solvers/residualbased_block_builder_and_solver.h" #include "solving_strategies/schemes/residualbased_incrementalupdate_static_scheme.h" -#include "solving_strategies/convergencecriterias/residual_criteria.h" + #include "utilities/binbased_fast_point_locator.h" #include "custom_utilities/quad_binbased_fast_point_locator.h" @@ -483,7 +484,11 @@ class MPMStrategy virtual double Solve() { //check which nodes and elements are ACTIVE and populate the MPM model part + //std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now(); + + + this->SearchElement(mr_grid_model_part, mr_mpm_model_part); mp_solving_strategy->Initialize(); @@ -499,7 +504,10 @@ class MPMStrategy mp_solving_strategy->FinalizeSolutionStep(); mp_solving_strategy->Clear(); - //std::cout<<" clear the solving strategy"< Reset(ACTIVE); - i ->GetGeometry()[0].Reset(ACTIVE); - i ->GetGeometry()[1].Reset(ACTIVE); - i ->GetGeometry()[2].Reset(ACTIVE); + + + + + + #pragma omp parallel for + for(unsigned int i = 0; i < grid_model_part.Elements().size(); ++i){ + + auto elemItr = grid_model_part.Elements().begin() + i; + elemItr -> Reset(ACTIVE); + elemItr ->GetGeometry()[0].Reset(ACTIVE); + elemItr ->GetGeometry()[1].Reset(ACTIVE); + elemItr ->GetGeometry()[2].Reset(ACTIVE); if (TDim ==3) { - i ->GetGeometry()[3].Reset(ACTIVE); + elemItr ->GetGeometry()[3].Reset(ACTIVE); } - //i -> SetValue(COUNTER, 0); - } - //std::cout << " 22222222222222222222 "< SearchStructure(grid_model_part); SearchStructure.UpdateSearchDatabase(); - + #pragma omp parallel + { typename BinBasedFastPointLocator::ResultContainerType results(max_results); - //loop over the material points - for (ModelPart::ElementIterator k = mpm_model_part.ElementsBegin(); - k != mpm_model_part.ElementsEnd(); ++k) - { - //const unsigned int number_of_nodes = k -> GetGeometry().PointsNumber(); - array_1d xg = k -> GetValue(GAUSS_COORD); + #pragma omp for + for(unsigned int i = 0; i < mpm_model_part.Elements().size(); ++i){ + + auto elemItr = mpm_model_part.Elements().begin() + i; + + array_1d xg = elemItr -> GetValue(GAUSS_COORD); + //KRATOS_WATCH(xg); typename BinBasedFastPointLocator::ResultIteratorType result_begin = results.begin(); Element::Pointer pelem; @@ -834,103 +847,78 @@ class MPMStrategy if (is_found == true) { pelem->Set(ACTIVE); - //std::cout<<"pelem->Id() "<Id()< GetValue(COUNTER); - //counter += 1; - //pelem -> SetValue(COUNTER, counter); + - k->GetGeometry()(0) = pelem->GetGeometry()(0); - k->GetGeometry()(1) = pelem->GetGeometry()(1); - k->GetGeometry()(2) = pelem->GetGeometry()(2); + elemItr->GetGeometry()(0) = pelem->GetGeometry()(0); + elemItr->GetGeometry()(1) = pelem->GetGeometry()(1); + elemItr->GetGeometry()(2) = pelem->GetGeometry()(2); pelem->GetGeometry()[0].Set(ACTIVE); pelem->GetGeometry()[1].Set(ACTIVE); pelem->GetGeometry()[2].Set(ACTIVE); - + if (TDim ==3) { - k->GetGeometry()(3) = pelem->GetGeometry()(3); + elemItr->GetGeometry()(3) = pelem->GetGeometry()(3); pelem->GetGeometry()[3].Set(ACTIVE); } - //if use quadrilateral add this line - //k->GetGeometry()(3) = pelem->GetGeometry()(3); - - //if(k->Id() == 18274) - //{ - //std::cout<<"GetGeometry()[0].Id()"<GetGeometry()[0].Id()<GetGeometry()[1].Id()<GetGeometry()[2].Id()< N; + QuadBinBasedFastPointLocator SearchStructure(grid_model_part); SearchStructure.UpdateSearchDatabase(); - + #pragma omp parallel + { typename QuadBinBasedFastPointLocator::ResultContainerType results(max_results); //loop over the material points - for (ModelPart::ElementIterator k = mpm_model_part.ElementsBegin(); - k != mpm_model_part.ElementsEnd(); ++k) - { - //const unsigned int number_of_nodes = k -> GetGeometry().PointsNumber(); - array_1d xg = k -> GetValue(GAUSS_COORD); + #pragma omp for + for(unsigned int i = 0; i < mpm_model_part.Elements().size(); ++i){ + + auto elemItr = mpm_model_part.Elements().begin() + i; + + array_1d xg = elemItr -> GetValue(GAUSS_COORD); typename QuadBinBasedFastPointLocator::ResultIteratorType result_begin = results.begin(); Element::Pointer pelem; //FindPointOnMesh find the element in which a given point falls and the relative shape functions bool is_found = SearchStructure.FindPointOnMesh(xg, pelem, result_begin, max_results); - //std::cout<< "k->Id() "<Id()<Set(ACTIVE); - //std::cout<< "k->Id() "<Id()<Id() "<Id()< GetValue(COUNTER); - //counter += 1; - //pelem -> SetValue(COUNTER, counter); - - k->GetGeometry()(0) = pelem->GetGeometry()(0); - k->GetGeometry()(1) = pelem->GetGeometry()(1); - k->GetGeometry()(2) = pelem->GetGeometry()(2); - k->GetGeometry()(3) = pelem->GetGeometry()(3); - //if use quadrilateral add this line - //k->GetGeometry()(3) = pelem->GetGeometry()(3); - - - //if(k->Id() == 27938) - //{ - //std::cout<<"GetGeometry()[0].Id()"<GetGeometry()[0].Id()<GetGeometry()[1].Id()<GetGeometry()[2].Id()<GetGeometry()[3].Id()<Id() == 14716) - { - std::cout<<"pelem->Id()"<Id()<GetGeometry()(0) = pelem->GetGeometry()(0); + elemItr->GetGeometry()(1) = pelem->GetGeometry()(1); + elemItr->GetGeometry()(2) = pelem->GetGeometry()(2); + elemItr->GetGeometry()(3) = pelem->GetGeometry()(3); + + } @@ -938,30 +926,9 @@ class MPMStrategy } } - - - - //loop over grid element to know how many MP fall in each element - //for (ModelPart::ElementIterator i = grid_model_part.ElementsBegin(); - //i != grid_model_part.ElementsEnd(); ++i) - //{ - //if(i->IsDefined(ACTIVE)) - //{ - //int MP_number_per_element = i->GetValue(COUNTER); - //for (ModelPart::ElementIterator k = mpm_model_part.ElementsBegin(); - //k != mpm_model_part.ElementsEnd(); ++k) - //{ - //if (k->GetGeometry()(0) == i->GetGeometry()(0) && k->GetGeometry()(1) == i->GetGeometry()(1) && k->GetGeometry()(2) == i->GetGeometry()(2)) - //{ - //k->SetValue(MP_NUMBER, MP_number_per_element); - //} - - //} - - //} - - //} - + + } + } diff --git a/applications/ParticleMechanicsApplication/custom_utilities/fast_quad_spatial_containers_configure.h b/applications/ParticleMechanicsApplication/custom_utilities/fast_quad_spatial_containers_configure.h index 181433ab3c48..b07ee3ab063c 100644 --- a/applications/ParticleMechanicsApplication/custom_utilities/fast_quad_spatial_containers_configure.h +++ b/applications/ParticleMechanicsApplication/custom_utilities/fast_quad_spatial_containers_configure.h @@ -64,7 +64,7 @@ class FastQuadSpatialContainersConfigure /// Pointer definition of FastQuadSpatialContainersConfigure KRATOS_CLASS_POINTER_DEFINITION(FastQuadSpatialContainersConfigure); - typedef Point<3, double> PointType; /// always the point 3D + typedef Point PointType; /// always the point 3D typedef std::vector::iterator DistanceIteratorType; typedef ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; diff --git a/applications/PfemFluidDynamicsApplication/custom_processes/adaptive_time_interval_process.hpp b/applications/PfemFluidDynamicsApplication/custom_processes/adaptive_time_interval_process.hpp index 06c273c07d85..3699363d60e1 100644 --- a/applications/PfemFluidDynamicsApplication/custom_processes/adaptive_time_interval_process.hpp +++ b/applications/PfemFluidDynamicsApplication/custom_processes/adaptive_time_interval_process.hpp @@ -298,7 +298,7 @@ namespace Kratos } const array_1d &Vel = itElem->GetGeometry()[i].FastGetSolutionStepValue(VELOCITY); - Point<3> updatedNodalCoordinates=itElem->GetGeometry()[i].Coordinates()+Vel*temporaryTimeInterval; + Point updatedNodalCoordinates=itElem->GetGeometry()[i].Coordinates()+Vel*temporaryTimeInterval; updatedElementCoordinates.push_back(Node<3>::Pointer(new Node<3>(i,updatedNodalCoordinates.X(),updatedNodalCoordinates.Y(),updatedNodalCoordinates.Z()))); } @@ -333,7 +333,7 @@ namespace Kratos for(unsigned int i=0; iGetGeometry().size(); i++) { const array_1d &Vel = itElem->GetGeometry()[i].FastGetSolutionStepValue(VELOCITY); - Point<3> updatedNodalCoordinates=itElem->GetGeometry()[i].Coordinates()+Vel*temporaryTimeInterval*2.5; + Point updatedNodalCoordinates=itElem->GetGeometry()[i].Coordinates()+Vel*temporaryTimeInterval*2.5; updatedEnlargedElementCoordinates.push_back(Node<3>::Pointer(new Node<3>(i,updatedNodalCoordinates.X(),updatedNodalCoordinates.Y(),updatedNodalCoordinates.Z()))); } @@ -365,7 +365,7 @@ namespace Kratos solidElement=true; } const array_1d &Vel = itElem->GetGeometry()[i].FastGetSolutionStepValue(VELOCITY); - Point<3> updatedNodalCoordinates=itElem->GetGeometry()[i].Coordinates()+Vel*temporaryTimeInterval; + Point updatedNodalCoordinates=itElem->GetGeometry()[i].Coordinates()+Vel*temporaryTimeInterval; updatedElementCoordinates.push_back(Node<3>::Pointer(new Node<3>(i,updatedNodalCoordinates.X(),updatedNodalCoordinates.Y(),updatedNodalCoordinates.Z()))); } @@ -400,7 +400,7 @@ namespace Kratos for(unsigned int i=0; iGetGeometry().size(); i++) { const array_1d &Vel = itElem->GetGeometry()[i].FastGetSolutionStepValue(VELOCITY); - Point<3> updatedNodalCoordinates=itElem->GetGeometry()[i].Coordinates()+Vel*temporaryTimeInterval*2.5; + Point updatedNodalCoordinates=itElem->GetGeometry()[i].Coordinates()+Vel*temporaryTimeInterval*2.5; updatedEnlargedElementCoordinates.push_back(Node<3>::Pointer(new Node<3>(i,updatedNodalCoordinates.X(),updatedNodalCoordinates.Y(),updatedNodalCoordinates.Z()))); } diff --git a/applications/PfemFluidDynamicsApplication/custom_processes/set_active_flag_process.hpp b/applications/PfemFluidDynamicsApplication/custom_processes/set_active_flag_process.hpp index 1ffe5a8817c3..aa9081d54bbf 100644 --- a/applications/PfemFluidDynamicsApplication/custom_processes/set_active_flag_process.hpp +++ b/applications/PfemFluidDynamicsApplication/custom_processes/set_active_flag_process.hpp @@ -173,7 +173,7 @@ namespace Kratos { if(itElem->GetGeometry()[j].IsNot(RIGID) && itElem->GetGeometry()[j].Is(FREE_SURFACE)){ - Point<3> freeSurfaceToRigidNodeVector=itElem->GetGeometry()[i].Coordinates()-itElem->GetGeometry()[j].Coordinates(); + Point freeSurfaceToRigidNodeVector=itElem->GetGeometry()[i].Coordinates()-itElem->GetGeometry()[j].Coordinates(); const array_1d &freeSurfaceVelocity = itElem->GetGeometry()[j].FastGetSolutionStepValue(VELOCITY); double freeSurfaceToRigidNodeDistance=sqrt(freeSurfaceToRigidNodeVector[0]*freeSurfaceToRigidNodeVector[0]+ diff --git a/applications/PfemSolidMechanicsApplication/custom_processes/contact_refine_mesh_boundary_process.hpp b/applications/PfemSolidMechanicsApplication/custom_processes/contact_refine_mesh_boundary_process.hpp index d9a240f04601..8f8dcf15d837 100644 --- a/applications/PfemSolidMechanicsApplication/custom_processes/contact_refine_mesh_boundary_process.hpp +++ b/applications/PfemSolidMechanicsApplication/custom_processes/contact_refine_mesh_boundary_process.hpp @@ -162,7 +162,7 @@ class ContactRefineMeshBoundaryProcess if( (mrRemesh.Refine->RefiningOptions.Is(ModelerUtilities::REFINE_INSERT_NODES) || mrRemesh.Refine->RefiningOptions.Is(ModelerUtilities::REFINE_ADD_NODES)) && mrRemesh.Refine->RefiningOptions.Is(ModelerUtilities::REFINE_BOUNDARY) ) { - std::vector > list_of_points; + std::vector list_of_points; std::vector list_of_conditions; unsigned int conditions_size = mrModelPart.Conditions(mMeshId).size(); @@ -351,7 +351,7 @@ class ContactRefineMeshBoundaryProcess //******************************************************************************************* //******************************************************************************************* - void BuildNewConditions( ModelPart& rModelPart, std::vector >& list_of_points, std::vector& list_of_conditions, RefineCounters& rLocalRefineInfo ) + void BuildNewConditions( ModelPart& rModelPart, std::vector& list_of_points, std::vector& list_of_conditions, RefineCounters& rLocalRefineInfo ) { KRATOS_TRY @@ -521,7 +521,7 @@ class ContactRefineMeshBoundaryProcess //******************************************************************************************* //******************************************************************************************* - bool RefineContactBoundary(ModelPart& rModelPart, std::vector >& list_of_points, std::vector& list_of_conditions, RefineCounters& rLocalRefineInfo ) + bool RefineContactBoundary(ModelPart& rModelPart, std::vector& list_of_points, std::vector& list_of_conditions, RefineCounters& rLocalRefineInfo ) { KRATOS_TRY @@ -822,7 +822,7 @@ class ContactRefineMeshBoundaryProcess //******************************************************************************************* //******************************************************************************************* - bool RefineOtherBoundary(ModelPart& rModelPart, std::vector >& list_of_points, std::vector& list_of_conditions, RefineCounters& rLocalRefineInfo ) + bool RefineOtherBoundary(ModelPart& rModelPart, std::vector& list_of_points, std::vector& list_of_conditions, RefineCounters& rLocalRefineInfo ) { KRATOS_TRY diff --git a/applications/SolidMechanicsApplication/custom_utilities/solid_mechanics_math_utilities.hpp b/applications/SolidMechanicsApplication/custom_utilities/solid_mechanics_math_utilities.hpp index 4ca321359469..08db2de545dc 100644 --- a/applications/SolidMechanicsApplication/custom_utilities/solid_mechanics_math_utilities.hpp +++ b/applications/SolidMechanicsApplication/custom_utilities/solid_mechanics_math_utilities.hpp @@ -1613,12 +1613,12 @@ template class SolidMechanicsMathUtilities * @param result_points vertices of overlapping polygon * @return false= no overlapping polygon, true= overlapping polygon found */ - static bool Clipping(std::vector* >& clipping_points,std::vector* >& subjected_points, std::vector* >& result_points, double tolerance) + static bool Clipping(std::vector& clipping_points,std::vector& subjected_points, std::vector& result_points, double tolerance) { result_points= subjected_points; Vector actual_edge(3); Vector actual_normal(3); - std::vector* > temp_results; + std::vector temp_results; bool is_visible= false; for(unsigned int clipp_edge=0; clipp_edge class SolidMechanicsMathUtilities if(is_visible) temp_results.push_back(result_points[subj_edge]); - temp_results.push_back(new Point<3>((*(clipping_points[clipp_edge])+coeff(1)*(*(clipping_points[index_clipp_2])-*(clipping_points[clipp_edge]))))); + temp_results.push_back(new Point((*(clipping_points[clipp_edge])+coeff(1)*(*(clipping_points[index_clipp_2])-*(clipping_points[clipp_edge]))))); is_visible= !is_visible; diff --git a/applications/StructuralMechanicsApplication/CMakeLists.txt b/applications/StructuralMechanicsApplication/CMakeLists.txt index 08e80658197f..a107a7aecb4b 100644 --- a/applications/StructuralMechanicsApplication/CMakeLists.txt +++ b/applications/StructuralMechanicsApplication/CMakeLists.txt @@ -29,6 +29,8 @@ set( KRATOS_STRUCTURAL_MECHANICS_APPLICATION_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/axisym_elastic_isotropic.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/hyper_elastic_isotropic_neo_hookean_3d.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/hyper_elastic_isotropic_neo_hookean_plane_strain_2d.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/linear_elastic_orthotropic_2D_law.cpp + ## ELEMENTS #Adding truss element @@ -42,7 +44,9 @@ set( KRATOS_STRUCTURAL_MECHANICS_APPLICATION_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/membrane_element.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/isotropic_shell_element.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/shell_thick_element_3D4N.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/shell_thin_element_3D4N.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/shell_thin_element_3D3N.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/shell_thick_element_3D3N.cpp ${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/prestress_membrane_element.cpp # Solid elements diff --git a/applications/StructuralMechanicsApplication/custom_constitutive/linear_elastic_orthotropic_2D_law.cpp b/applications/StructuralMechanicsApplication/custom_constitutive/linear_elastic_orthotropic_2D_law.cpp new file mode 100644 index 000000000000..6a346864059a --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_constitutive/linear_elastic_orthotropic_2D_law.cpp @@ -0,0 +1,243 @@ +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Peter Wilson +// Contact: A.Winterstein@tum.de +// + +// System includes +#include + +// External includes +#include + +// Project includes +#include "includes/properties.h" +#include "includes/checks.h" +#include "custom_constitutive/linear_elastic_orthotropic_2D_law.hpp" + +#include "structural_mechanics_application_variables.h" + +namespace Kratos +{ + //******************************CONSTRUCTOR********************************* + //************************************************************************** + + LinearElasticOrthotropic2DLaw::LinearElasticOrthotropic2DLaw() + : ConstitutiveLaw() + { + } + + //******************************COPY CONSTRUCTOR**************************** + //************************************************************************** + + LinearElasticOrthotropic2DLaw::LinearElasticOrthotropic2DLaw + (const LinearElasticOrthotropic2DLaw& rOther) + : ConstitutiveLaw(rOther) + { + } + + //********************************CLONE************************************* + //************************************************************************** + + ConstitutiveLaw::Pointer LinearElasticOrthotropic2DLaw::Clone() const + { + LinearElasticOrthotropic2DLaw::Pointer p_clone + (new LinearElasticOrthotropic2DLaw(*this)); + return p_clone; + } + + //*******************************DESTRUCTOR********************************* + //************************************************************************** + + LinearElasticOrthotropic2DLaw::~LinearElasticOrthotropic2DLaw() + { + } + + //*****************************MATERIAL RESPONSES*************************** + //************************************************************************** + + void LinearElasticOrthotropic2DLaw::CalculateMaterialResponsePK2(Parameters& rValues) + { + //1.- Lame constants + //const double& YoungModulus = MaterialProperties[YOUNG_MODULUS]; + //const double& PoissonCoefficient = MaterialProperties[POISSON_RATIO]; + + //a.-Check if the constitutive parameters are passed correctly to the law calculation + //CheckParameters(rValues); + + //b.- Get Values to compute the constitutive law: + Flags &Options = rValues.GetOptions(); + + const Properties& MaterialProperties = rValues.GetMaterialProperties(); + + Vector& StrainVector = rValues.GetStrainVector(); + Vector& StressVector = rValues.GetStressVector(); + + //-----------------------------// + + if (Options.Is(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN)) + { + //only needed + const Matrix& DeformationGradientF = rValues.GetDeformationGradientF(); + + //4.-Right Cauchy Green + Matrix RightCauchyGreen = prod(trans(DeformationGradientF), DeformationGradientF); + + //5.-Green-Lagrange Strain: + + //E= 0.5*(FT*F-1) + this->CalculateGreenLagrangeStrain(RightCauchyGreen, StrainVector); + } + + //7.-Calculate Total PK2 stress + + if (Options.Is(ConstitutiveLaw::COMPUTE_STRESS)) + { + if (Options.Is(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR)) + { + Matrix& ConstitutiveMatrix = rValues.GetConstitutiveMatrix(); + this->CalculateLinearElasticMatrix(ConstitutiveMatrix, MaterialProperties); + this->CalculateStress(StrainVector, ConstitutiveMatrix, StressVector); + } + else { + Matrix ConstitutiveMatrix(StrainVector.size(), StrainVector.size()); + noalias(ConstitutiveMatrix) = ZeroMatrix(StrainVector.size(), StrainVector.size()); + + this->CalculateLinearElasticMatrix(ConstitutiveMatrix, MaterialProperties); + this->CalculateStress(StrainVector, ConstitutiveMatrix, StressVector); + } + } + else if (Options.IsNot(ConstitutiveLaw::COMPUTE_STRESS) && Options.Is(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR)) + { + Matrix& ConstitutiveMatrix = rValues.GetConstitutiveMatrix(); + this->CalculateLinearElasticMatrix(ConstitutiveMatrix, MaterialProperties); + } + } + + //***********************COMPUTE TOTAL STRAIN***************************************** + //************************************************************************************ + + void LinearElasticOrthotropic2DLaw::CalculateGreenLagrangeStrain(const Matrix & rRightCauchyGreen, + Vector& rStrainVector) + { + // TAKEN FROM LinearElasticPlasticPlaneStrain2DLaw + //E= 0.5*(FT*F-1) + rStrainVector[0] = 0.5 * (rRightCauchyGreen(0, 0) - 1.00); + rStrainVector[1] = 0.5 * (rRightCauchyGreen(1, 1) - 1.00); + rStrainVector[2] = rRightCauchyGreen(0, 1); + } + + //***********************COMPUTE TOTAL STRESS PK2************************************* + //************************************************************************************ + + void LinearElasticOrthotropic2DLaw::CalculateStress(const Vector & rStrainVector, + const Matrix & rConstitutiveMatrix, + Vector& rStressVector) + { + //1.-2nd Piola Kirchhoff StressVector increment + if (rStressVector.size() != rStrainVector.size()) + rStressVector.resize(rStrainVector.size(), false); + + noalias(rStressVector) = prod(rConstitutiveMatrix, rStrainVector); + } + + //***********************COMPUTE LINEAR ELASTIC MATRIX********************** + //************************************************************************** + + void LinearElasticOrthotropic2DLaw::CalculateLinearElasticMatrix(Matrix& rConstitutiveMatrix, + const Properties& rMaterialProperties) + { + //double G13 = G12; // currently handled through "shell_cross_section.cpp" + //double G23 = G12; // currently handled through "shell_cross_section.cpp" + const double v12 = rMaterialProperties[POISSON_RATIO_XY]; + + const double v21 = v12*rMaterialProperties[YOUNG_MODULUS_Y] / rMaterialProperties[YOUNG_MODULUS_X]; + + const double Q11 = rMaterialProperties[YOUNG_MODULUS_X] / (1.0 - v12*v21); + const double Q12 = v12*rMaterialProperties[YOUNG_MODULUS_Y] / (1.0 - v12*v21); + const double Q22 = rMaterialProperties[YOUNG_MODULUS_Y] / (1.0 - v12*v21); + const double Q66 = rMaterialProperties[SHEAR_MODULUS_XY]; + //double Q44 = G23; + //double Q55 = G13; + + const double theta = 0.0; // rotation currently handled through + // "shell_cross_section.cpp" variable iPlyAngle. Left in for clarity. + + const double c = cos(theta); + const double c2 = c*c; + const double c4 = c2 * c2; + const double s = sin(theta); + const double s2 = s*s; + const double s4 = s2*s2; + + rConstitutiveMatrix.clear(); + + rConstitutiveMatrix(0, 0) = Q11*c4 + 2.0*(Q12 + 2.0*Q66)*s2*c2 + Q22*s4; // Q11_hat + rConstitutiveMatrix(0, 1) = (Q11 + Q22 - 4.0*Q66)*s2*c2 + Q12*(s4 + c4); // Q12_hat + rConstitutiveMatrix(0, 2) = (Q11 - Q12 - 2.0*Q66)*s*c2*c + (Q12 - Q22 + 2.0*Q66)*s*s2*c;// Q16_hat + + rConstitutiveMatrix(1, 0) = rConstitutiveMatrix(0, 1); + rConstitutiveMatrix(1, 1) = Q11*s4 + 2.0 * (Q12 + 2.0*Q66)*s2*c2 + Q22*c4; // Q22_hat + rConstitutiveMatrix(1, 2) = (Q11 - Q12 - 2.0*Q66)*s2*s*c + (Q12 - Q22 + 2.0*Q66)*c2*c*s;// Q16_hat + + rConstitutiveMatrix(2, 0) = rConstitutiveMatrix(0, 2); + rConstitutiveMatrix(2, 1) = rConstitutiveMatrix(1, 2); + rConstitutiveMatrix(2, 2) = (Q11 + Q22 - 2.0*Q12 - 2.0*Q66)*s2*c2 + Q66*(s4 + c4); //Q66_hat + } + + //*************************CONSTITUTIVE LAW GENERAL FEATURES ************************* + //************************************************************************************ + + + void LinearElasticOrthotropic2DLaw::GetLawFeatures(Features& rFeatures) + { + //Set the type of law + rFeatures.mOptions.Set(PLANE_STRESS_LAW); + rFeatures.mOptions.Set(INFINITESIMAL_STRAINS); + rFeatures.mOptions.Set(ANISOTROPIC); + + //Set strain measure required by the consitutive law + rFeatures.mStrainMeasures.push_back(StrainMeasure_Infinitesimal); + rFeatures.mStrainMeasures.push_back(StrainMeasure_Deformation_Gradient); + + //Set the strain size + rFeatures.mStrainSize = GetStrainSize(); + + //Set the spacedimension + rFeatures.mSpaceDimension = WorkingSpaceDimension(); + } + + + //******************CHECK CONSISTENCY IN THE CONSTITUTIVE LAW************************* + //************************************************************************************ + + bool LinearElasticOrthotropic2DLaw::CheckParameters(Parameters& rValues) + { + return rValues.CheckAllParameters(); + } + + int LinearElasticOrthotropic2DLaw::Check(const Properties& rMaterialProperties, + const GeometryType& rElementGeometry, + const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_CHECK_VARIABLE_KEY(YOUNG_MODULUS_X); + KRATOS_CHECK(rMaterialProperties.Has(YOUNG_MODULUS_X)); + + KRATOS_CHECK_VARIABLE_KEY(YOUNG_MODULUS_Y); + KRATOS_CHECK(rMaterialProperties.Has(YOUNG_MODULUS_Y)); + + KRATOS_CHECK_VARIABLE_KEY(POISSON_RATIO_XY); + KRATOS_CHECK(rMaterialProperties.Has(POISSON_RATIO_XY)); + + KRATOS_CHECK_VARIABLE_KEY(DENSITY); + KRATOS_CHECK(rMaterialProperties.Has(DENSITY)); + + return 0; + } +} // Namespace Kratos \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/custom_constitutive/linear_elastic_orthotropic_2D_law.hpp b/applications/StructuralMechanicsApplication/custom_constitutive/linear_elastic_orthotropic_2D_law.hpp new file mode 100644 index 000000000000..b6b3e7077647 --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_constitutive/linear_elastic_orthotropic_2D_law.hpp @@ -0,0 +1,202 @@ +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Peter Wilson +// Contact: A.Winterstein@tum.de +// + +#if !defined (KRATOS_LINEAR_ELASTIC_ORTHOTROPIC_2D_LAW_H_INCLUDED) +#define KRATOS_LINEAR_ELASTIC_ORTHOTROPIC_2D_LAW_H_INCLUDED + +// System includes + +// External includes + +// Project includes +#include "includes/constitutive_law.h" + +namespace Kratos +{ + /** + * Defines a linear elastic orthotropic constitutive law in 2D (Plane Stress) + * This material law is defined by the parameters: + * 1) ELASTIC MODULI (E1, E2, G12) + * 2) POISSON RATIOS (v12, v21) + * Valid for small strains. + */ + + class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) LinearElasticOrthotropic2DLaw : public ConstitutiveLaw + { + public: + /** + * Type Definitions + */ + typedef ProcessInfo ProcessInfoType; + typedef ConstitutiveLaw BaseType; + typedef std::size_t SizeType; + /** + * Counted pointer of LinearElasticOrthotropic3DLaw + */ + + KRATOS_CLASS_POINTER_DEFINITION(LinearElasticOrthotropic2DLaw); + + /** + * Life Cycle + */ + + /** + * Default constructor. + */ + LinearElasticOrthotropic2DLaw(); + + /** + * Clone function (has to be implemented by any derived class) + * @return a pointer to a new instance of this constitutive law + */ + ConstitutiveLaw::Pointer Clone() const override; + + /** + * Copy constructor. + */ + LinearElasticOrthotropic2DLaw(const LinearElasticOrthotropic2DLaw& rOther); + + /** + * Destructor. + */ + ~LinearElasticOrthotropic2DLaw() override; + + /** + * Operators + */ + + /** + * Operations needed by the base class: + */ + /** + * Voigt tensor size: + */ + SizeType GetStrainSize() override + { + return 3; + }; + + /** + * This function is designed to be called once to check compatibility with element + * @param rFeatures + */ + void GetLawFeatures(Features& rFeatures) override; + + /** + * Computes the material response: + * PK2 stresses and algorithmic ConstitutiveMatrix + * @param rValues + * @see Parameters + */ + void CalculateMaterialResponsePK2(Parameters & rValues) override; + + /** + * This function is designed to be called once to perform all the checks needed + * on the input provided. Checks can be "expensive" as the function is designed + * to catch user's errors. + * @param rMaterialProperties + * @param rElementGeometry + * @param rCurrentProcessInfo + * @return + */ + int Check(const Properties& rMaterialProperties, const GeometryType& rElementGeometry, const ProcessInfo& rCurrentProcessInfo) override; + + protected: + + ///@name Protected static Member Variables + ///@{ + ///@} + ///@name Protected member Variables + ///@{ + ///@} + ///@name Protected Operators + ///@{ + ///@} + ///@name Protected Operations + ///@{ + ///@} + /** + * Calculates the GreenLagrange strains + * @param rRightCauchyGreen + * @param rStrainVector + */ + void CalculateGreenLagrangeStrain(const Matrix & rRightCauchyGreen, + Vector& rStrainVector); + + /** + * Calculates the stresses for given strain state + * @param rStrainVector + * @param rConstitutiveMatrix + * @param rStressVector the stress vector corresponding to the deformation + */ + virtual void CalculateStress(const Vector &rStrainVector, + const Matrix &rConstitutiveMatrix, + Vector& rStressVector); + + /** + * calculates the linear elastic constitutive matrix in terms of Young's modulus and + * Poisson ratio + * @param E the Young's modulus + * @param NU the Poisson ratio + * @return the linear elastic constitutive matrix + */ + + virtual void CalculateLinearElasticMatrix(Matrix& rConstitutiveMatrix, + const Properties& rMaterialProperties); + + /** + * This function is designed to be called when before the material response + * to check if all needed parameters for the constitutive are initialized + * @param Parameters + * @return + */ + bool CheckParameters(Parameters& rValues); + + private: + + ///@name Static Member Variables + ///@{ + ///@} + ///@name Member Variables + ///@{ + ///@} + ///@name Private Operators + ///@{ + ///@} + ///@name Private Operations + ///@{ + ///@} + + ///@} + ///@name Private Access + ///@{ + ///@} + + ///@} + ///@name Serialization + ///@{ + friend class Serializer; + + void save(Serializer& rSerializer) const override + { + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, ConstitutiveLaw) + } + + void load(Serializer& rSerializer) override + { + KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, ConstitutiveLaw) + } + + ///@} + }; // Class LinearElasticOrthotropic2DLaw +} // namespace Kratos. +#endif // KRATOS_LINEAR_ELASTIC_ORTHOTROPIC_2D_LAW_H_INCLUDED defined \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/custom_elements/base_solid_element.cpp b/applications/StructuralMechanicsApplication/custom_elements/base_solid_element.cpp index 09b9921863e4..317dcaa02de6 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/base_solid_element.cpp +++ b/applications/StructuralMechanicsApplication/custom_elements/base_solid_element.cpp @@ -681,7 +681,7 @@ namespace Kratos for (unsigned int point_number = 0; point_number < integration_points.size(); point_number++) { - Point<3> global_point; + Point global_point; GetGeometry().GlobalCoordinates(global_point, integration_points[point_number]); rOutput[point_number] = global_point.Coordinates(); diff --git a/applications/StructuralMechanicsApplication/custom_elements/cr_beam_element_3D2N.cpp b/applications/StructuralMechanicsApplication/custom_elements/cr_beam_element_3D2N.cpp index 485ff771da1d..8faffaba426a 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/cr_beam_element_3D2N.cpp +++ b/applications/StructuralMechanicsApplication/custom_elements/cr_beam_element_3D2N.cpp @@ -1,1981 +1,1911 @@ -// KRATOS ___| | | | -// \___ \ __| __| | | __| __| | | __| _` | | -// | | | | | ( | | | | ( | | -// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS -// -// License: BSD License -// license: structural_mechanics_application/license.txt -// -// Main authors: Klaus B. Sautter -// -// -// -#include "custom_elements/cr_beam_element_3D2N.hpp" -#include "structural_mechanics_application_variables.h" -#include "includes/define.h" - - - -namespace Kratos -{ - - CrBeamElement3D2N::CrBeamElement3D2N(IndexType NewId, - GeometryType::Pointer pGeometry, bool rLinear) - : Element(NewId, pGeometry) - { - this->mIsLinearElement = rLinear; - } - - CrBeamElement3D2N::CrBeamElement3D2N(IndexType NewId, - GeometryType::Pointer pGeometry, - PropertiesType::Pointer pProperties, bool rLinear) - : Element(NewId, pGeometry, pProperties) - { - this->mIsLinearElement = rLinear; - } - - Element::Pointer CrBeamElement3D2N::Create(IndexType NewId, - NodesArrayType const& rThisNodes, - PropertiesType::Pointer pProperties) const - { - const GeometryType& rGeom = this->GetGeometry(); - return BaseType::Pointer(new CrBeamElement3D2N( - NewId, rGeom.Create(rThisNodes), pProperties, this->mIsLinearElement)); - } - - CrBeamElement3D2N::~CrBeamElement3D2N() {} - - void CrBeamElement3D2N::EquationIdVector(EquationIdVectorType& rResult, - ProcessInfo& rCurrentProcessInfo) { - - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension * 2; - - if (rResult.size() != local_size) rResult.resize(local_size); - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * number_of_nodes * dimension; - rResult[index] = this->GetGeometry()[i].GetDof(DISPLACEMENT_X) - .EquationId(); - rResult[index + 1] = this->GetGeometry()[i].GetDof(DISPLACEMENT_Y) - .EquationId(); - rResult[index + 2] = this->GetGeometry()[i].GetDof(DISPLACEMENT_Z) - .EquationId(); - - rResult[index + 3] = this->GetGeometry()[i].GetDof(ROTATION_X) - .EquationId(); - rResult[index + 4] = this->GetGeometry()[i].GetDof(ROTATION_Y) - .EquationId(); - rResult[index + 5] = this->GetGeometry()[i].GetDof(ROTATION_Z) - .EquationId(); - } - - } - - void CrBeamElement3D2N::GetDofList(DofsVectorType& rElementalDofList, - ProcessInfo& rCurrentProcessInfo) { - - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension * 2; - - if (rElementalDofList.size() != local_size) { - rElementalDofList.resize(local_size); - } - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * number_of_nodes * dimension; - rElementalDofList[index] = this->GetGeometry()[i] - .pGetDof(DISPLACEMENT_X); - rElementalDofList[index + 1] = this->GetGeometry()[i] - .pGetDof(DISPLACEMENT_Y); - rElementalDofList[index + 2] = this->GetGeometry()[i] - .pGetDof(DISPLACEMENT_Z); - - rElementalDofList[index + 3] = this->GetGeometry()[i] - .pGetDof(ROTATION_X); - rElementalDofList[index + 4] = this->GetGeometry()[i] - .pGetDof(ROTATION_Y); - rElementalDofList[index + 5] = this->GetGeometry()[i] - .pGetDof(ROTATION_Z); - } - } - - void CrBeamElement3D2N::Initialize() { - - KRATOS_TRY; - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension; - - if (this->mIterationCount == 0) - { - this->mNodalForces = ZeroVector(local_size * 2); - } - KRATOS_CATCH("") - } - - Matrix CrBeamElement3D2N::CreateElementStiffnessMatrix_Material() { - - KRATOS_TRY; - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension * 2; - - const double E = this->GetProperties()[YOUNG_MODULUS]; - const double G = this->CalculateShearModulus(); - const double A = this->GetProperties()[CROSS_AREA]; - const double L = this->CalculateReferenceLength(); - - Vector inertia = this->GetProperties()[LOCAL_INERTIA_VECTOR]; - const double J = inertia[0]; - const double Iy = inertia[1]; - const double Iz = inertia[2]; - - double Ay = 0.00; - if (this->GetProperties().Has(AREA_EFFECTIVE_Y) == true) { - Ay = GetProperties()[AREA_EFFECTIVE_Y]; - } - - double Az = 0.00; - if (this->GetProperties().Has(AREA_EFFECTIVE_Z) == true) { - Az = GetProperties()[AREA_EFFECTIVE_Z]; - } - const double Psi_y = this->CalculatePsi(Iy, Az); - const double Psi_z = this->CalculatePsi(Iz, Ay); - - - - Matrix LocalStiffnessMatrix = ZeroMatrix(local_size, local_size); - const double L3 = L*L*L; - const double L2 = L*L; - - - LocalStiffnessMatrix(0, 0) = E*A / L; - LocalStiffnessMatrix(6, 0) = -1.0 * LocalStiffnessMatrix(0, 0); - LocalStiffnessMatrix(0, 6) = LocalStiffnessMatrix(6, 0); - LocalStiffnessMatrix(6, 6) = LocalStiffnessMatrix(0, 0); - - LocalStiffnessMatrix(1, 1) = 12.0 * E * Iz * Psi_z / L3; - LocalStiffnessMatrix(1, 7) = -1.0 * LocalStiffnessMatrix(1, 1); - LocalStiffnessMatrix(1, 5) = 6.0 * E * Iz * Psi_z / L2; - LocalStiffnessMatrix(1, 11) = LocalStiffnessMatrix(1, 5); - - LocalStiffnessMatrix(2, 2) = 12.0 * E *Iy * Psi_y / L3; - LocalStiffnessMatrix(2, 8) = -1.0 * LocalStiffnessMatrix(2, 2); - LocalStiffnessMatrix(2, 4) = -6.0 * E *Iy *Psi_y / L2; - LocalStiffnessMatrix(2, 10) = LocalStiffnessMatrix(2, 4); - - LocalStiffnessMatrix(4, 2) = LocalStiffnessMatrix(2, 4); - LocalStiffnessMatrix(5, 1) = LocalStiffnessMatrix(1, 5); - LocalStiffnessMatrix(3, 3) = G*J / L; - LocalStiffnessMatrix(4, 4) = E*Iy*(3.0 * Psi_y + 1.0) / L; - LocalStiffnessMatrix(5, 5) = E*Iz*(3.0 * Psi_z + 1.0) / L; - LocalStiffnessMatrix(4, 8) = -1.0 * LocalStiffnessMatrix(4, 2); - LocalStiffnessMatrix(5, 7) = -1.0 * LocalStiffnessMatrix(5, 1); - LocalStiffnessMatrix(3, 9) = -1.0 * LocalStiffnessMatrix(3, 3); - LocalStiffnessMatrix(4, 10) = E*Iy*(3.0 * Psi_y - 1) / L; - LocalStiffnessMatrix(5, 11) = E*Iz*(3.0 * Psi_z - 1) / L; - - LocalStiffnessMatrix(7, 1) = LocalStiffnessMatrix(1, 7); - LocalStiffnessMatrix(7, 5) = LocalStiffnessMatrix(5, 7); - LocalStiffnessMatrix(7, 7) = LocalStiffnessMatrix(1, 1); - LocalStiffnessMatrix(7, 11) = LocalStiffnessMatrix(7, 5); - - LocalStiffnessMatrix(8, 2) = LocalStiffnessMatrix(2, 8); - LocalStiffnessMatrix(8, 4) = LocalStiffnessMatrix(4, 8); - LocalStiffnessMatrix(8, 8) = LocalStiffnessMatrix(2, 2); - LocalStiffnessMatrix(8, 10) = LocalStiffnessMatrix(8, 4); - - LocalStiffnessMatrix(9, 3) = LocalStiffnessMatrix(3, 9); - LocalStiffnessMatrix(9, 9) = LocalStiffnessMatrix(3, 3); - - LocalStiffnessMatrix(10, 2) = LocalStiffnessMatrix(2, 10); - LocalStiffnessMatrix(10, 4) = LocalStiffnessMatrix(4, 10); - LocalStiffnessMatrix(10, 8) = LocalStiffnessMatrix(8, 10); - LocalStiffnessMatrix(10, 10) = LocalStiffnessMatrix(4, 4); - - LocalStiffnessMatrix(11, 1) = LocalStiffnessMatrix(1, 11); - LocalStiffnessMatrix(11, 5) = LocalStiffnessMatrix(5, 11); - LocalStiffnessMatrix(11, 7) = LocalStiffnessMatrix(7, 11); - LocalStiffnessMatrix(11, 11) = LocalStiffnessMatrix(5, 5); - - return LocalStiffnessMatrix; - KRATOS_CATCH("") - } - - Matrix CrBeamElement3D2N::CreateElementStiffnessMatrix_Geometry( - const Vector qe) { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension * 2; - - const double N = qe[6]; - const double Mt = qe[9]; - const double my_A = qe[4]; - const double mz_A = qe[5]; - const double my_B = qe[10]; - const double mz_B = qe[11]; - - const double L = this->CalculateCurrentLength(); - const double Qy = -1.00 * (mz_A + mz_B) / L; - const double Qz = (my_A + my_B) / L; - - Matrix LocalStiffnessMatrix = ZeroMatrix(local_size, local_size); - - LocalStiffnessMatrix(0, 1) = -Qy / L; - LocalStiffnessMatrix(0, 2) = -Qz / L; - LocalStiffnessMatrix(0, 7) = -1.0 * LocalStiffnessMatrix(0, 1); - LocalStiffnessMatrix(0, 8) = -1.0 * LocalStiffnessMatrix(0, 2); - - LocalStiffnessMatrix(1, 0) = LocalStiffnessMatrix(0, 1); - - LocalStiffnessMatrix(1, 1) = 1.2 * N / L; - - LocalStiffnessMatrix(1, 3) = my_A / L; - LocalStiffnessMatrix(1, 4) = Mt / L; - - LocalStiffnessMatrix(1, 5) = N / 10.0; - - LocalStiffnessMatrix(1, 6) = LocalStiffnessMatrix(0, 7); - LocalStiffnessMatrix(1, 7) = -1.00 * LocalStiffnessMatrix(1, 1); - LocalStiffnessMatrix(1, 9) = my_B / L; - LocalStiffnessMatrix(1, 10) = -1.00 * LocalStiffnessMatrix(1, 4); - LocalStiffnessMatrix(1, 11) = LocalStiffnessMatrix(1, 5); - - LocalStiffnessMatrix(2, 0) = LocalStiffnessMatrix(0, 2); - LocalStiffnessMatrix(2, 2) = LocalStiffnessMatrix(1, 1); - LocalStiffnessMatrix(2, 3) = mz_A / L; - LocalStiffnessMatrix(2, 4) = -1.00 * LocalStiffnessMatrix(1, 5); - LocalStiffnessMatrix(2, 5) = LocalStiffnessMatrix(1, 4); - LocalStiffnessMatrix(2, 6) = LocalStiffnessMatrix(0, 8); - LocalStiffnessMatrix(2, 8) = LocalStiffnessMatrix(1, 7); - LocalStiffnessMatrix(2, 9) = mz_B / L; - LocalStiffnessMatrix(2, 10) = LocalStiffnessMatrix(2, 4); - LocalStiffnessMatrix(2, 11) = LocalStiffnessMatrix(1, 10); - - for (int i = 0; i < 3; ++i) { - LocalStiffnessMatrix(3, i) = LocalStiffnessMatrix(i, 3); - } - LocalStiffnessMatrix(3, 4) = (-mz_A / 3.00) + (mz_B / 6.00); - LocalStiffnessMatrix(3, 5) = (my_A / 3.00) - (my_B / 6.00); - LocalStiffnessMatrix(3, 7) = -my_A / L; - LocalStiffnessMatrix(3, 8) = -mz_A / L; - LocalStiffnessMatrix(3, 10) = L*Qy / 6.00; - LocalStiffnessMatrix(3, 11) = L*Qz / 6.00; - - for (int i = 0; i < 4; ++i) { - LocalStiffnessMatrix(4, i) = LocalStiffnessMatrix(i, 4); - } - LocalStiffnessMatrix(4, 4) = 2.00 * L*N / 15.00; - LocalStiffnessMatrix(4, 7) = -Mt / L; - LocalStiffnessMatrix(4, 8) = N / 10.00; - LocalStiffnessMatrix(4, 9) = LocalStiffnessMatrix(3, 10); - LocalStiffnessMatrix(4, 10) = -L*N / 30.00; - LocalStiffnessMatrix(4, 11) = Mt / 2.00; - - - for (int i = 0; i < 5; ++i) { - LocalStiffnessMatrix(5, i) = LocalStiffnessMatrix(i, 5); - } - LocalStiffnessMatrix(5, 5) = LocalStiffnessMatrix(4, 4); - LocalStiffnessMatrix(5, 7) = -N / 10.0; - LocalStiffnessMatrix(5, 8) = -Mt / L; - LocalStiffnessMatrix(5, 9) = LocalStiffnessMatrix(3, 11); - LocalStiffnessMatrix(5, 10) = -1.00 * LocalStiffnessMatrix(4, 11); - LocalStiffnessMatrix(5, 11) = LocalStiffnessMatrix(4, 10); - - for (int i = 0; i < 6; ++i) { - LocalStiffnessMatrix(6, i) = LocalStiffnessMatrix(i, 6); - } - LocalStiffnessMatrix(6, 7) = LocalStiffnessMatrix(0, 1); - LocalStiffnessMatrix(6, 8) = LocalStiffnessMatrix(0, 2); - - for (int i = 0; i < 7; ++i) { - LocalStiffnessMatrix(7, i) = LocalStiffnessMatrix(i, 7); - } - LocalStiffnessMatrix(7, 7) = LocalStiffnessMatrix(1, 1); - LocalStiffnessMatrix(7, 9) = -1.00 * LocalStiffnessMatrix(1, 9); - LocalStiffnessMatrix(7, 10) = LocalStiffnessMatrix(4, 1); - LocalStiffnessMatrix(7, 11) = LocalStiffnessMatrix(2, 4); - - for (int i = 0; i < 8; ++i) { - LocalStiffnessMatrix(8, i) = LocalStiffnessMatrix(i, 8); - } - LocalStiffnessMatrix(8, 8) = LocalStiffnessMatrix(1, 1); - LocalStiffnessMatrix(8, 9) = -1.00 * LocalStiffnessMatrix(2, 9); - LocalStiffnessMatrix(8, 10) = LocalStiffnessMatrix(1, 5); - LocalStiffnessMatrix(8, 11) = LocalStiffnessMatrix(1, 4); - - for (int i = 0; i < 9; ++i) { - LocalStiffnessMatrix(9, i) = LocalStiffnessMatrix(i, 9); - } - LocalStiffnessMatrix(9, 10) = (mz_A / 6.00) - (mz_B / 3.00); - LocalStiffnessMatrix(9, 11) = (-my_A / 6.00) + (my_B / 3.00); - - for (int i = 0; i < 10; ++i) { - LocalStiffnessMatrix(10, i) = LocalStiffnessMatrix(i, 10); - } - LocalStiffnessMatrix(10, 10) = LocalStiffnessMatrix(4, 4); - - for (int i = 0; i < 11; ++i) { - LocalStiffnessMatrix(11, i) = LocalStiffnessMatrix(i, 11); - } - LocalStiffnessMatrix(11, 11) = LocalStiffnessMatrix(4, 4); - - return LocalStiffnessMatrix; - KRATOS_CATCH("") - } - - Matrix CrBeamElement3D2N::CalculateDeformationStiffness() { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension; - - Matrix Kd = ZeroMatrix(local_size, local_size); - const double E = this->GetProperties()[YOUNG_MODULUS]; - const double G = this->CalculateShearModulus(); - const double A = this->GetProperties()[CROSS_AREA]; - const double L = this->CalculateReferenceLength(); - - Vector inertia = this->GetProperties()[LOCAL_INERTIA_VECTOR]; - const double J = inertia[0]; - const double Iy = inertia[1]; - const double Iz = inertia[2]; - - double Ay = 0.00; - if (this->GetProperties().Has(AREA_EFFECTIVE_Y) == true) { - Ay = GetProperties()[AREA_EFFECTIVE_Y]; - } - - double Az = 0.00; - if (this->GetProperties().Has(AREA_EFFECTIVE_Z) == true) { - Az = GetProperties()[AREA_EFFECTIVE_Z]; - } - const double Psi_y = this->CalculatePsi(Iy, Az); - const double Psi_z = this->CalculatePsi(Iz, Ay); - - Kd(0, 0) = G * J / L; - Kd(1, 1) = E * Iy / L; - Kd(2, 2) = E * Iz / L; - Kd(3, 3) = E * A / L; - Kd(4, 4) = 3.0 * E * Iy * Psi_y / L; - Kd(5, 5) = 3.0 * E * Iz * Psi_z / L; - - - //add geometric stiffness part - if (this->mIsLinearElement == false) - { - const double l = this->CalculateCurrentLength(); - const double N = this->mNodalForces[6]; - - const double Qy = -1.00 * (this->mNodalForces[5] + - this->mNodalForces[11]) / l; - - const double Qz = 1.00 * (this->mNodalForces[4] + - this->mNodalForces[10]) / l; - - const double N1 = l*N / 12.00; - const double N2 = l*N / 20.00; - const double Qy1 = -l*Qy / 6.00; - const double Qz1 = -l*Qz / 6.00; - - Kd(1, 1) += N1; - Kd(2, 2) += N1; - Kd(4, 4) += N2; - Kd(5, 5) += N2; - - Kd(0, 1) += Qy1; - Kd(0, 2) += Qz1; - Kd(1, 0) += Qy1; - Kd(2, 0) += Qz1; - - } - return Kd; - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::CalculateInitialLocalCS() { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int size = number_of_nodes * dimension; - const unsigned int local_size = size * 2; - - array_1d DirectionVectorX = ZeroVector(dimension); - array_1d DirectionVectorY = ZeroVector(dimension); - array_1d DirectionVectorZ = ZeroVector(dimension); - Vector ReferenceCoordinates = ZeroVector(size); - - ReferenceCoordinates[0] = this->GetGeometry()[0].X0(); - ReferenceCoordinates[1] = this->GetGeometry()[0].Y0(); - ReferenceCoordinates[2] = this->GetGeometry()[0].Z0(); - ReferenceCoordinates[3] = this->GetGeometry()[1].X0(); - ReferenceCoordinates[4] = this->GetGeometry()[1].Y0(); - ReferenceCoordinates[5] = this->GetGeometry()[1].Z0(); - - for (int i = 0; i < dimension; ++i) - { - DirectionVectorX[i] = (ReferenceCoordinates[i + dimension] - - ReferenceCoordinates[i]); - } - - //use orientation class 1st constructor - double theta_costum = 0.00; - if (this->GetProperties().Has(ANG_ROT) == true) { - theta_costum = this->GetProperties()[ANG_ROT]; - } - - - Orientation element_axis(DirectionVectorX, theta_costum); - element_axis.CalculateBasisVectors(DirectionVectorX, DirectionVectorY, - DirectionVectorZ); - //save them to update the local axis in every following iter. step - this->mNX0 = DirectionVectorX; - this->mNY0 = DirectionVectorY; - this->mNZ0 = DirectionVectorZ; - - - Matrix Temp = ZeroMatrix(dimension); - this->mRotationMatrix0 = ZeroMatrix(local_size); - element_axis.CalculateRotationMatrix(Temp); - this->AssembleSmallInBigMatrix(Temp, this->mRotationMatrix0); - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::CalculateTransformationMatrix(Matrix& rRotationMatrix) { - - KRATOS_TRY - //12x12 - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int size = number_of_nodes * dimension; - const unsigned int MatSize = 2 * size; - - //initialize local CS - if (this->mIterationCount == 0) this->CalculateInitialLocalCS(); - - //update local CS - Matrix AuxRotationMatrix = ZeroMatrix(dimension); - AuxRotationMatrix = this->UpdateRotationMatrixLocal(); - - if (rRotationMatrix.size1() != MatSize) { - rRotationMatrix.resize(MatSize, MatSize, false); - } - - rRotationMatrix = ZeroMatrix(MatSize); - //Building the rotation matrix for the local element matrix - this->AssembleSmallInBigMatrix(AuxRotationMatrix, rRotationMatrix); - KRATOS_CATCH("") - } - - Matrix CrBeamElement3D2N::CalculateTransformationS() { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int size = number_of_nodes * dimension; - const unsigned int MatSize = 2 * size; - - const double L = this->CalculateCurrentLength(); - Matrix S = ZeroMatrix(MatSize, size); - S(0, 3) = -1.00; - S(1, 5) = 2.00 / L; - S(2, 4) = -2.00 / L; - S(3, 0) = -1.00; - S(4, 1) = -1.00; - S(4, 4) = 1.00; - S(5, 2) = -1.00; - S(5, 5) = 1.00; - S(6, 3) = 1.00; - S(7, 5) = -2.00 / L; - S(8, 4) = 2.00 / L; - S(9, 0) = 1.00; - S(10, 1) = 1.00; - S(10, 4) = 1.00; - S(11, 2) = 1.00; - S(11, 5) = 1.00; - - return S; - KRATOS_CATCH("") - } - - Matrix CrBeamElement3D2N::UpdateRotationMatrixLocal() { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int size = number_of_nodes * dimension; - const unsigned int MatSize = 2 * size; - - Vector dPhiA = ZeroVector(dimension); - Vector dPhiB = ZeroVector(dimension); - Vector IncrementDeformation = ZeroVector(MatSize); - IncrementDeformation = this->mIncrementDeformation; - - for (int i = 0; i < dimension; ++i) { - dPhiA[i] = IncrementDeformation[i + 3]; - dPhiB[i] = IncrementDeformation[i + 9]; - } - - //calculating quaternions - Vector drA_vec = ZeroVector(dimension); - Vector drB_vec = ZeroVector(dimension); - double drA_sca, drB_sca; - - drA_vec = 0.50 * dPhiA; - drB_vec = 0.50 * dPhiB; - - drA_sca = 0.00; - drB_sca = 0.00; - for (int i = 0; i < dimension; ++i) { - drA_sca += drA_vec[i] * drA_vec[i]; - drB_sca += drB_vec[i] * drB_vec[i]; - } - drA_sca = 1.00 - drA_sca; - drB_sca = 1.00 - drB_sca; - - drA_sca = sqrt(drA_sca); - drB_sca = sqrt(drB_sca); - - - //1st solution step - if (mIterationCount == 0) { - this->mQuaternionVEC_A = ZeroVector(dimension); - this->mQuaternionVEC_B = ZeroVector(dimension); - this->mQuaternionSCA_A = 1.00; - this->mQuaternionSCA_B = 1.00; - } - - Vector tempVec = ZeroVector(dimension); - double tempSca = 0.00; - - //Node A - tempVec = this->mQuaternionVEC_A; - tempSca = this->mQuaternionSCA_A; - - this->mQuaternionSCA_A = drA_sca *tempSca; - for (int i = 0; i < dimension; ++i) { - this->mQuaternionSCA_A -= drA_vec[i] * tempVec[i]; - } - this->mQuaternionVEC_A = drA_sca*tempVec; - this->mQuaternionVEC_A += tempSca * drA_vec; - this->mQuaternionVEC_A += MathUtils::CrossProduct(drA_vec, tempVec); - - //Node B - tempVec = this->mQuaternionVEC_B; - tempSca = this->mQuaternionSCA_B; - - this->mQuaternionSCA_B = drB_sca *tempSca; - for (int i = 0; i < dimension; ++i) { - this->mQuaternionSCA_B -= drB_vec[i] * tempVec[i]; - } - - this->mQuaternionVEC_B = drB_sca*tempVec; - this->mQuaternionVEC_B += tempSca * drB_vec; - this->mQuaternionVEC_B += MathUtils::CrossProduct(drB_vec, tempVec); - - - //scalar part of difference quaternion - double scalar_diff; - scalar_diff = (this->mQuaternionSCA_A + this->mQuaternionSCA_B) * - (this->mQuaternionSCA_A + this->mQuaternionSCA_B); - - tempVec = this->mQuaternionVEC_A + this->mQuaternionVEC_B; - scalar_diff += MathUtils::Norm(tempVec) * - MathUtils::Norm(tempVec); - - scalar_diff = 0.50 * sqrt(scalar_diff); - - //mean rotation quaternion - double meanRotationScalar; - meanRotationScalar = (this->mQuaternionSCA_A + this->mQuaternionSCA_B) * 0.50; - meanRotationScalar = meanRotationScalar / scalar_diff; - - Vector meanRotationVector = ZeroVector(dimension); - meanRotationVector = (this->mQuaternionVEC_A + this->mQuaternionVEC_B) * 0.50; - meanRotationVector = meanRotationVector / scalar_diff; - - //vector part of difference quaternion - Vector vector_diff = ZeroVector(dimension); - vector_diff = this->mQuaternionSCA_A * this->mQuaternionVEC_B; - vector_diff -= this->mQuaternionSCA_B * this->mQuaternionVEC_A; - vector_diff += MathUtils::CrossProduct(this->mQuaternionVEC_A, - this->mQuaternionVEC_B); - - vector_diff = 0.50 * vector_diff / scalar_diff; - - //rotate inital element basis - const double r0 = meanRotationScalar; - const double r1 = meanRotationVector[0]; - const double r2 = meanRotationVector[1]; - const double r3 = meanRotationVector[2]; - - Quaternion q(r0, r1, r2, r3); - Vector rotatedNX0 = this->mNX0; - Vector rotatedNY0 = this->mNY0; - Vector rotatedNZ0 = this->mNZ0; - q.RotateVector3(rotatedNX0); - q.RotateVector3(rotatedNY0); - q.RotateVector3(rotatedNZ0); - - Matrix RotatedCS = ZeroMatrix(dimension, dimension); - for (int i = 0; i < dimension; ++i) { - RotatedCS(i, 0) = rotatedNX0[i]; - RotatedCS(i, 1) = rotatedNY0[i]; - RotatedCS(i, 2) = rotatedNZ0[i]; - } - - //rotate basis to element axis + redefine R - Vector n_bisectrix = ZeroVector(dimension); - Vector deltaX = ZeroVector(dimension); - double VectorNorm; - - deltaX[0] = this->mTotalNodalPosistion[3] - this->mTotalNodalPosistion[0]; - deltaX[1] = this->mTotalNodalPosistion[4] - this->mTotalNodalPosistion[1]; - deltaX[2] = this->mTotalNodalPosistion[5] - this->mTotalNodalPosistion[2]; - - - VectorNorm = MathUtils::Norm(deltaX); - if (VectorNorm != 0.00) deltaX /= VectorNorm; - - - n_bisectrix = rotatedNX0 + deltaX; - VectorNorm = MathUtils::Norm(n_bisectrix); - if (VectorNorm != 0.00) n_bisectrix /= VectorNorm; - - Matrix n_xyz = ZeroMatrix(dimension); - for (int i = 0; i < dimension; ++i) { - n_xyz(i, 0) = -1.0 * RotatedCS(i, 0); - n_xyz(i, 1) = 1.0 * RotatedCS(i, 1); - n_xyz(i, 2) = 1.0 * RotatedCS(i, 2); - } - - Matrix Identity = ZeroMatrix(dimension); - for (int i = 0; i < dimension; ++i) Identity(i, i) = 1.0; - Identity -= 2.0 * outer_prod(n_bisectrix, n_bisectrix); - n_xyz = prod(Identity, n_xyz); - - - //save current CS for GID OUTPUT - this->mNX = ZeroVector(dimension); - this->mNY = ZeroVector(dimension); - this->mNZ = ZeroVector(dimension); - for (int i = 0; i < dimension; ++i) - { - this->mNX[i] = n_xyz(i, 0); - this->mNY[i] = n_xyz(i, 1); - this->mNZ[i] = n_xyz(i, 2); - } - - //calculating deformation modes - this->mPhiS = ZeroVector(dimension); - this->mPhiA = ZeroVector(dimension); - this->mPhiS = prod(Matrix(trans(n_xyz)), vector_diff); - this->mPhiS *= 4.00; - - rotatedNX0 = ZeroVector(dimension); - tempVec = ZeroVector(dimension); - for (int i = 0; i < dimension; ++i) rotatedNX0[i] = n_xyz(i, 0); - tempVec = MathUtils::CrossProduct(rotatedNX0, n_bisectrix); - this->mPhiA = prod(Matrix(trans(n_xyz)), tempVec); - this->mPhiA *= 4.00; - - if (this->mIterationCount == 0) - { - this->mPhiS = ZeroVector(dimension); - this->mPhiA = ZeroVector(dimension); - } - return n_xyz; - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::GetValuesVector(Vector& rValues, int Step) { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int element_size = number_of_nodes * dimension * 2; - - if (rValues.size() != element_size) rValues.resize(element_size, false); - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * dimension * 2; - rValues[index] = this->GetGeometry()[i] - .FastGetSolutionStepValue(DISPLACEMENT_X, Step); - rValues[index + 1] = this->GetGeometry()[i] - .FastGetSolutionStepValue(DISPLACEMENT_Y, Step); - rValues[index + 2] = this->GetGeometry()[i] - .FastGetSolutionStepValue(DISPLACEMENT_Z, Step); - - rValues[index + 3] = this->GetGeometry()[i] - .FastGetSolutionStepValue(ROTATION_X, Step); - rValues[index + 4] = this->GetGeometry()[i] - .FastGetSolutionStepValue(ROTATION_Y, Step); - rValues[index + 5] = this->GetGeometry()[i] - .FastGetSolutionStepValue(ROTATION_Z, Step); - } - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::GetFirstDerivativesVector(Vector& rValues, int Step) - { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int element_size = number_of_nodes * dimension * 2; - - if (rValues.size() != element_size) rValues.resize(element_size, false); - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * dimension * 2; - rValues[index] = this->GetGeometry()[i]. - FastGetSolutionStepValue(VELOCITY_X, Step); - rValues[index + 1] = this->GetGeometry()[i]. - FastGetSolutionStepValue(VELOCITY_Y, Step); - rValues[index + 2] = this->GetGeometry()[i]. - FastGetSolutionStepValue(VELOCITY_Z, Step); - - rValues[index + 3] = this->GetGeometry()[i]. - FastGetSolutionStepValue(ANGULAR_VELOCITY_X, Step); - rValues[index + 4] = this->GetGeometry()[i]. - FastGetSolutionStepValue(ANGULAR_VELOCITY_Y, Step); - rValues[index + 5] = this->GetGeometry()[i]. - FastGetSolutionStepValue(ANGULAR_VELOCITY_Z, Step); - } - - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::GetSecondDerivativesVector(Vector& rValues, int Step) - { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int element_size = number_of_nodes * dimension * 2; - - if (rValues.size() != element_size) rValues.resize(element_size, false); - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * dimension * 2; - - rValues[index] = this->GetGeometry()[i] - .FastGetSolutionStepValue(ACCELERATION_X, Step); - rValues[index + 1] = this->GetGeometry()[i] - .FastGetSolutionStepValue(ACCELERATION_Y, Step); - rValues[index + 2] = this->GetGeometry()[i] - .FastGetSolutionStepValue(ACCELERATION_Z, Step); - - rValues[index + 3] = this->GetGeometry()[i]. - FastGetSolutionStepValue(ANGULAR_ACCELERATION_X, Step); - rValues[index + 4] = this->GetGeometry()[i]. - FastGetSolutionStepValue(ANGULAR_ACCELERATION_Y, Step); - rValues[index + 5] = this->GetGeometry()[i]. - FastGetSolutionStepValue(ANGULAR_ACCELERATION_Z, Step); - } - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::CalculateMassMatrix(MatrixType& rMassMatrix, - ProcessInfo& rCurrentProcessInfo) - { - KRATOS_TRY; - const int number_of_nodes = GetGeometry().PointsNumber(); - const int dimension = GetGeometry().WorkingSpaceDimension(); - const unsigned int MatSize = number_of_nodes * dimension * 2; - - if (rMassMatrix.size1() != MatSize) { - rMassMatrix.resize(MatSize, MatSize, false); - } - rMassMatrix = ZeroMatrix(MatSize, MatSize); - - - - if (this->GetProperties().Has(LUMPED_MASS_MATRIX) == true) { - this->mIsLumpedMassMatrix = GetProperties()[LUMPED_MASS_MATRIX]; - } - else this->mIsLumpedMassMatrix = false; - - - - if (this->mIsLumpedMassMatrix == true) - { - this->CalculateLumpedMassMatrix(rMassMatrix, rCurrentProcessInfo); - } - else - { - this->CalculateConsistentMassMatrix(rMassMatrix, rCurrentProcessInfo); - - Matrix RotationMatrix = ZeroMatrix(MatSize); - Matrix aux_matrix = ZeroMatrix(MatSize); - - RotationMatrix = this->mRotationMatrix; - aux_matrix = prod(RotationMatrix, rMassMatrix); - rMassMatrix = prod(aux_matrix, - Matrix(trans(RotationMatrix))); - } - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::CalculateDampingMatrix(MatrixType& rDampingMatrix, - ProcessInfo& rCurrentProcessInfo) { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int MatSize = number_of_nodes * dimension * 2; - - if (rDampingMatrix.size1() != MatSize) - { - rDampingMatrix.resize(MatSize, MatSize, false); - } - - rDampingMatrix = ZeroMatrix(MatSize, MatSize); - - Matrix StiffnessMatrix = ZeroMatrix(MatSize, MatSize); - - this->CalculateLeftHandSide(StiffnessMatrix, rCurrentProcessInfo); - - Matrix MassMatrix = ZeroMatrix(MatSize, MatSize); - - this->CalculateMassMatrix(MassMatrix, rCurrentProcessInfo); - - double alpha = 0.0; - if (this->GetProperties().Has(RAYLEIGH_ALPHA)) - { - alpha = this->GetProperties()[RAYLEIGH_ALPHA]; - } - else if (rCurrentProcessInfo.Has(RAYLEIGH_ALPHA)) - { - alpha = rCurrentProcessInfo[RAYLEIGH_ALPHA]; - } - - double beta = 0.0; - if (this->GetProperties().Has(RAYLEIGH_BETA)) - { - beta = this->GetProperties()[RAYLEIGH_BETA]; - } - else if (rCurrentProcessInfo.Has(RAYLEIGH_BETA)) - { - beta = rCurrentProcessInfo[RAYLEIGH_BETA]; - } - - rDampingMatrix += alpha * MassMatrix; - rDampingMatrix += beta * StiffnessMatrix; - - KRATOS_CATCH("") - } - - - Vector CrBeamElement3D2N::CalculateBodyForces() - { - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int localSize = number_of_nodes * dimension; - const unsigned int MatSize = number_of_nodes * dimension * 2; - - //getting shapefunctionvalues for linear SF - const Matrix& Ncontainer = this->GetGeometry().ShapeFunctionsValues( - GeometryData::GI_GAUSS_1); - - Vector EquivalentLineLoad = ZeroVector(dimension); - Vector BodyForcesGlobal = ZeroVector(MatSize); - - const double A = this->GetProperties()[CROSS_AREA]; - const double l = this->CalculateCurrentLength(); - const double rho = this->GetProperties()[DENSITY]; - - //calculating equivalent line load - for (int i = 0; i < number_of_nodes; ++i) - { - EquivalentLineLoad += A * rho* - this->GetGeometry()[i]. - FastGetSolutionStepValue(VOLUME_ACCELERATION)*Ncontainer(0, i); - } - - - // adding the nodal forces - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i*localSize; - for (int j = 0; j < dimension; ++j) - { - BodyForcesGlobal[j + index] = - EquivalentLineLoad[j] * Ncontainer(0, i) * l; - } - } - - // adding the nodal moments - this->CalculateAndAddWorkEquivalentNodalForcesLineLoad - (EquivalentLineLoad, BodyForcesGlobal, l); - - - // return the total ForceVector - return BodyForcesGlobal; - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::CalculateAndAddWorkEquivalentNodalForcesLineLoad( - const Vector ForceInput, VectorType& rRightHandSideVector, - const double GeometryLength) - { - KRATOS_TRY; - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - //calculate orthogonal load vector - Vector GeometricOrientation = ZeroVector(dimension); - GeometricOrientation[0] = this->GetGeometry()[1].X() - - this->GetGeometry()[0].X(); - GeometricOrientation[1] = this->GetGeometry()[1].Y() - - this->GetGeometry()[0].Y(); - if (dimension == 3) - { - GeometricOrientation[2] = this->GetGeometry()[1].Z() - - this->GetGeometry()[0].Z(); - } - - const double VectorNormA = MathUtils::Norm(GeometricOrientation); - if (VectorNormA != 0.00) GeometricOrientation /= VectorNormA; - - Vector LineLoadDir = ZeroVector(dimension); - for (int i = 0; i < dimension; ++i) - { - LineLoadDir[i] = ForceInput[i]; - } - - const double VectorNormB = MathUtils::Norm(LineLoadDir); - if (VectorNormB != 0.00) LineLoadDir /= VectorNormB; - - double cosAngle = 0.00; - for (int i = 0; i < dimension; ++i) - { - cosAngle += LineLoadDir[i] * GeometricOrientation[i]; - } - - const double sinAngle = sqrt(1.00 - (cosAngle*cosAngle)); - const double NormForceVectorOrth = sinAngle * VectorNormB; - - - Vector NodeA = ZeroVector(dimension); - NodeA[0] = this->GetGeometry()[0].X(); - NodeA[1] = this->GetGeometry()[0].Y(); - if (dimension == 3) NodeA[2] = this->GetGeometry()[0].Z(); - - Vector NodeB = ZeroVector(dimension); - NodeB = NodeA + LineLoadDir; - - Vector NodeC = ZeroVector(dimension); - NodeC = NodeA + (GeometricOrientation*cosAngle); - - Vector LoadOrthogonalDir = ZeroVector(dimension); - LoadOrthogonalDir = NodeB - NodeC; - const double VectorNormC = MathUtils::Norm(LoadOrthogonalDir); - if (VectorNormC != 0.00) LoadOrthogonalDir /= VectorNormC; - - - - // now caluclate respective work equivilent nodal moments - - const double CustomMoment = NormForceVectorOrth * - GeometryLength*GeometryLength / 12.00; - - Vector MomentNodeA = ZeroVector(dimension); - MomentNodeA = MathUtils::CrossProduct(GeometricOrientation, - LoadOrthogonalDir); - MomentNodeA *= CustomMoment; - - for (int i = 0; i < dimension; ++i) - { - rRightHandSideVector[(1 * dimension) + i] += MomentNodeA[i]; - rRightHandSideVector[(3 * dimension) + i] -= MomentNodeA[i]; - } - - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, - VectorType& rRightHandSideVector, - ProcessInfo& rCurrentProcessInfo) { - - KRATOS_TRY - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int LocalSize = NumNodes * dimension * 2; - - this->CalculateLeftHandSide(rLeftHandSideMatrix, rCurrentProcessInfo); - - //Nodal element forces global - Vector nodalForcesGlobal_q = ZeroVector(LocalSize); - nodalForcesGlobal_q = prod(this->mRotationMatrix, - this->mNodalForces); - - //create+compute RHS - //update Residual - rRightHandSideVector = ZeroVector(LocalSize); - rRightHandSideVector -= nodalForcesGlobal_q; - - - //LINEAR BEAM ELEMENT - if (this->mIsLinearElement == true) - { - Vector NodalDeformation = ZeroVector(LocalSize); - this->GetValuesVector(NodalDeformation); - rRightHandSideVector = ZeroVector(LocalSize); - rRightHandSideVector -= prod(rLeftHandSideMatrix, NodalDeformation); - } - //add bodyforces - rRightHandSideVector += this->CalculateBodyForces(); - this->mIterationCount++; - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::CalculateRightHandSide( - VectorType& rRightHandSideVector, - ProcessInfo& rCurrentProcessInfo) - { - - KRATOS_TRY; - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int size = NumNodes * dimension; - const int LocalSize = NumNodes * dimension * 2; - rRightHandSideVector = ZeroVector(LocalSize); - - - if (this->mIsLinearElement == false) - { - this->UpdateIncrementDeformation(); - Matrix TransformationMatrix = ZeroMatrix(LocalSize); - this->CalculateTransformationMatrix(TransformationMatrix); - Vector elementForces_t = ZeroVector(size); - elementForces_t = this->CalculateElementForces(); - Vector nodalForcesLocal_qe = ZeroVector(LocalSize); - Matrix TransformationMatrixS = ZeroMatrix(LocalSize, size); - TransformationMatrixS = this->CalculateTransformationS(); - nodalForcesLocal_qe = prod(TransformationMatrixS, - elementForces_t); - //save local nodal forces - this->mNodalForces = ZeroVector(LocalSize); - this->mNodalForces = nodalForcesLocal_qe; - - Vector nodalForcesGlobal_q = ZeroVector(LocalSize); - nodalForcesGlobal_q = prod(TransformationMatrix, nodalForcesLocal_qe); - rRightHandSideVector -= nodalForcesGlobal_q; - } - - //LINEAR BEAM ELEMENT - if (this->mIsLinearElement == true) - { - Matrix LeftHandSideMatrix = ZeroMatrix(LocalSize, LocalSize); - this->CalculateLeftHandSide(LeftHandSideMatrix, rCurrentProcessInfo); - Vector NodalDeformation = ZeroVector(LocalSize); - this->GetValuesVector(NodalDeformation); - rRightHandSideVector = ZeroVector(LocalSize); - rRightHandSideVector -= prod(LeftHandSideMatrix, NodalDeformation); - } - - //add bodyforces - rRightHandSideVector += this->CalculateBodyForces(); - KRATOS_CATCH("") - - } - - void CrBeamElement3D2N::CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, - ProcessInfo& rCurrentProcessInfo) { - - KRATOS_TRY - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int size = NumNodes * dimension; - const int LocalSize = NumNodes * dimension * 2; - - //update displacement_delta - this->UpdateIncrementDeformation(); - - //calculate Transformation Matrix - Matrix TransformationMatrix = ZeroMatrix(LocalSize); - this->CalculateTransformationMatrix(TransformationMatrix); - this->mRotationMatrix = ZeroMatrix(LocalSize); - this->mRotationMatrix = TransformationMatrix; - - //deformation modes - Vector elementForces_t = ZeroVector(size); - elementForces_t = this->CalculateElementForces(); - - //Nodal element forces local - Vector nodalForcesLocal_qe = ZeroVector(LocalSize); - Matrix TransformationMatrixS = ZeroMatrix(LocalSize, size); - TransformationMatrixS = this->CalculateTransformationS(); - nodalForcesLocal_qe = prod(TransformationMatrixS, elementForces_t); - - //save local nodal forces - this->mNodalForces = ZeroVector(LocalSize); - this->mNodalForces = nodalForcesLocal_qe; - - //resizing the matrices + create memory for LHS - rLeftHandSideMatrix = ZeroMatrix(LocalSize, LocalSize); - //creating LHS - rLeftHandSideMatrix += - this->CreateElementStiffnessMatrix_Material(); - rLeftHandSideMatrix += - this->CreateElementStiffnessMatrix_Geometry(nodalForcesLocal_qe); - - - Matrix aux_matrix = ZeroMatrix(LocalSize); - aux_matrix = prod(TransformationMatrix, rLeftHandSideMatrix); - rLeftHandSideMatrix = prod(aux_matrix, - Matrix(trans(TransformationMatrix))); - - //LINEAR BEAM ELEMENT - if (this->mIsLinearElement == true) - { - TransformationMatrix = this->mRotationMatrix0; - rLeftHandSideMatrix = ZeroMatrix(LocalSize, LocalSize); - rLeftHandSideMatrix += - this->CreateElementStiffnessMatrix_Material(); - aux_matrix = ZeroMatrix(LocalSize); - aux_matrix = prod(TransformationMatrix, rLeftHandSideMatrix); - rLeftHandSideMatrix = prod(aux_matrix, - Matrix(trans(TransformationMatrix))); - } - //assign global element variables - this->mLHS = rLeftHandSideMatrix; - KRATOS_CATCH("") - } - - Vector CrBeamElement3D2N::CalculateElementForces() { - - KRATOS_TRY; - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int LocalSize = NumNodes * dimension; - - Vector deformation_modes_total_V = ZeroVector(LocalSize); - const double L = this->CalculateReferenceLength(); - const double l = this->CalculateCurrentLength(); - - deformation_modes_total_V[3] = l - L; - for (int i = 0; i < 3; ++i) deformation_modes_total_V[i] = this->mPhiS[i]; - for (int i = 0; i < 2; ++i) deformation_modes_total_V[i + 4] = this->mPhiA[i + 1]; - //calculate element forces - Vector element_forces_t = ZeroVector(LocalSize); - Matrix deformation_stiffness_Kd = ZeroMatrix(LocalSize); - - deformation_stiffness_Kd = this->CalculateDeformationStiffness(); - element_forces_t = prod(deformation_stiffness_Kd, - deformation_modes_total_V); - - return element_forces_t; - KRATOS_CATCH("") - } - - double CrBeamElement3D2N::CalculateCurrentLength() { - - KRATOS_TRY; - const double du = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_X) - - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_X); - const double dv = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Y) - - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Y); - const double dw = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Z) - - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Z); - const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); - const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); - const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); - const double l = sqrt((du + dx)*(du + dx) + (dv + dy)*(dv + dy) + - (dw + dz)*(dw + dz)); - return l; - KRATOS_CATCH("") - - } - - double CrBeamElement3D2N::CalculatePsi(const double I, const double A_eff) { - - KRATOS_TRY; - const double E = this->GetProperties()[YOUNG_MODULUS]; - const double L = this->CalculateCurrentLength(); - const double G = this->CalculateShearModulus(); - - const double phi = (12.0 * E * I) / (L*L * G*A_eff); - double psi; - //interpret input A_eff == 0 as shearstiff -> psi = 1.0 - if (A_eff == 0.00) psi = 1.00; - else psi = 1.0 / (1.0 + phi); - - return psi; - KRATOS_CATCH("") - } - - double CrBeamElement3D2N::CalculateReferenceLength() { - - KRATOS_TRY; - const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); - const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); - const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); - const double L = sqrt(dx*dx + dy*dy + dz*dz); - return L; - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::UpdateIncrementDeformation() { - - KRATOS_TRY - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int size = NumNodes * dimension; - const int LocalSize = NumNodes * dimension * 2; - - Vector actualDeformation = ZeroVector(LocalSize); - Vector total_nodal_def = ZeroVector(LocalSize); - Vector total_nodal_pos = ZeroVector(size); - this->mIncrementDeformation = ZeroVector(LocalSize); - - if (mIterationCount == 0) this->mTotalNodalDeformation = ZeroVector(LocalSize); - this->GetValuesVector(actualDeformation, 0); - - this->mIncrementDeformation = actualDeformation - - this->mTotalNodalDeformation; - - this->mTotalNodalDeformation = ZeroVector(LocalSize); - this->mTotalNodalDeformation = actualDeformation; - - this->mTotalNodalPosistion = ZeroVector(size); - this->mTotalNodalPosistion[0] = this->GetGeometry()[0].X0() - + actualDeformation[0]; - this->mTotalNodalPosistion[1] = this->GetGeometry()[0].Y0() - + actualDeformation[1]; - this->mTotalNodalPosistion[2] = this->GetGeometry()[0].Z0() - + actualDeformation[2]; - - this->mTotalNodalPosistion[3] = this->GetGeometry()[1].X0() - + actualDeformation[6]; - this->mTotalNodalPosistion[4] = this->GetGeometry()[1].Y0() - + actualDeformation[7]; - this->mTotalNodalPosistion[5] = this->GetGeometry()[1].Z0() - + actualDeformation[8]; - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::CalculateOnIntegrationPoints( - const Variable >& rVariable, - std::vector< array_1d >& rOutput, - const ProcessInfo& rCurrentProcessInfo) { - - KRATOS_TRY - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int size = NumNodes * dimension; - const int LocalSize = NumNodes * dimension * 2; - - - //element with two nodes can only represent results at one node - const unsigned int& write_points_number = GetGeometry() - .IntegrationPointsNumber(Kratos::GeometryData::GI_GAUSS_3); - if (rOutput.size() != write_points_number) { - rOutput.resize(write_points_number); - } - - - this->UpdateIncrementDeformation(); - //calculate Transformation Matrix - Matrix TransformationMatrix = ZeroMatrix(LocalSize); - this->CalculateTransformationMatrix(TransformationMatrix); - //deformation modes - Vector elementForces_t = ZeroVector(size); - elementForces_t = this->CalculateElementForces(); - Vector Stress = ZeroVector(LocalSize); - Matrix TransformationMatrixS = ZeroMatrix(LocalSize, size); - TransformationMatrixS = this->CalculateTransformationS(); - Stress = prod(TransformationMatrixS, elementForces_t); - - //LINEAR BEAM ELEMENT - if (this->mIsLinearElement == true) - { - Matrix LeftHandSideMatrix = ZeroMatrix(LocalSize, LocalSize); - LeftHandSideMatrix = this->mLHS; - - Vector NodalDeformation = ZeroVector(LocalSize); - this->GetValuesVector(NodalDeformation); - Stress = ZeroVector(LocalSize); - Stress = prod(LeftHandSideMatrix, NodalDeformation); - Matrix TransformationMatrix = ZeroMatrix(LocalSize); - TransformationMatrix = this->mRotationMatrix; - Stress = prod(Matrix(trans(TransformationMatrix)), Stress); - } - - - //rOutput[GP 1,2,3][x,y,z] - - if (rVariable == MOMENT) - { - rOutput[0][0] = -1.0 *Stress[3] * 0.75 + Stress[9] * 0.25; - rOutput[1][0] = -1.0 *Stress[3] * 0.50 + Stress[9] * 0.50; - rOutput[2][0] = -1.0 *Stress[3] * 0.25 + Stress[9] * 0.75; - - rOutput[0][1] = -1.0 *Stress[4] * 0.75 + Stress[10] * 0.25; - rOutput[1][1] = -1.0 *Stress[4] * 0.50 + Stress[10] * 0.50; - rOutput[2][1] = -1.0 *Stress[4] * 0.25 + Stress[10] * 0.75; - - rOutput[0][2] = -1.0 *Stress[5] * 0.75 + Stress[11] * 0.25; - rOutput[1][2] = -1.0 *Stress[5] * 0.50 + Stress[11] * 0.50; - rOutput[2][2] = -1.0 *Stress[5] * 0.25 + Stress[11] * 0.75; - - } - if (rVariable == FORCE) - { - rOutput[0][0] = -1.0 * Stress[0] * 0.75 + Stress[6] * 0.25; - rOutput[1][0] = -1.0 * Stress[0] * 0.50 + Stress[6] * 0.50; - rOutput[2][0] = -1.0 * Stress[0] * 0.25 + Stress[6] * 0.75; - - rOutput[0][1] = -1.0 * Stress[1] * 0.75 + Stress[7] * 0.25; - rOutput[1][1] = -1.0 *Stress[1] * 0.50 + Stress[7] * 0.50; - rOutput[2][1] = -1.0 *Stress[1] * 0.25 + Stress[7] * 0.75; - - rOutput[0][2] = -1.0 *Stress[2] * 0.75 + Stress[8] * 0.25; - rOutput[1][2] = -1.0 *Stress[2] * 0.50 + Stress[8] * 0.50; - rOutput[2][2] = -1.0 *Stress[2] * 0.25 + Stress[8] * 0.75; - - } - - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::GetValueOnIntegrationPoints( - const Variable >& rVariable, - std::vector< array_1d >& rOutput, - const ProcessInfo& rCurrentProcessInfo) - { - KRATOS_TRY; - this->CalculateOnIntegrationPoints(rVariable, rOutput, rCurrentProcessInfo); - KRATOS_CATCH("") - } - - - - void CrBeamElement3D2N::CalculateOnIntegrationPoints(const Variable& rVariable, - std::vector< Vector >& rOutput, - const ProcessInfo& rCurrentProcessInfo) - { - KRATOS_TRY; - - if (rVariable == LOCAL_AXES_VECTOR) - { - rOutput.resize(3); - for (int i = 0; i < 3; ++i) rOutput[i] = ZeroVector(3); - - if (this->mIsLinearElement == true) - { - rOutput[0] = this->mNX0; - rOutput[1] = this->mNY0; - rOutput[2] = this->mNZ0; - } - else - { - rOutput[0] = this->mNX; - rOutput[1] = this->mNY; - rOutput[2] = this->mNZ; - } - } - - KRATOS_CATCH(""); - } - - void CrBeamElement3D2N::GetValueOnIntegrationPoints(const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo) - { - KRATOS_TRY; - this->CalculateOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::AssembleSmallInBigMatrix(Matrix SmallMatrix, - Matrix& BigMatrix) { - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int size = number_of_nodes * dimension; - const unsigned int MatSize = 2 * size; - - for (unsigned int kk = 0; kk < MatSize; kk += dimension) - { - for (int i = 0; iCalculateReferenceLength(); - const double L2 = L * L; - const double rho = this->GetProperties()[DENSITY]; - const double A = this->GetProperties()[CROSS_AREA]; - const double E = this->GetProperties()[YOUNG_MODULUS]; - Vector inertia = this->GetProperties()[LOCAL_INERTIA_VECTOR]; - const double J = inertia[0]; - const double Iy = inertia[1]; - const double Iz = inertia[2]; - const double G = this->CalculateShearModulus(); - - double Ay = 0.00; - if (this->GetProperties().Has(AREA_EFFECTIVE_Y) == true) { - Ay = GetProperties()[AREA_EFFECTIVE_Y]; - } - - double Az = 0.00; - if (this->GetProperties().Has(AREA_EFFECTIVE_Z) == true) { - Az = GetProperties()[AREA_EFFECTIVE_Z]; - } - - double IRy = Iy; - if (this->GetProperties().Has(INERTIA_ROT_Y) == true) { - IRy = GetProperties()[INERTIA_ROT_Y]; - } - - double IRz = Iz; - if (this->GetProperties().Has(INERTIA_ROT_Y) == true) { - IRz = GetProperties()[INERTIA_ROT_Z]; - } - - double Phiy = 0.00; - double Phiz = 0.00; - - if (Ay != 0.00) Phiz = (12.00 * E * Iz) / (L2*G*Ay); - if (Az != 0.00) Phiy = (12.00 * E * Iy) / (L2*G*Az); - - const double CTy = (rho * A * L) / ((1 + Phiy)*(1 + Phiy)); - const double CTz = (rho * A * L) / ((1 + Phiz)*(1 + Phiz)); - - const double CRy = (rho*IRy) / ((1 + Phiy)*(1 + Phiy)*L); - const double CRz = (rho*IRz) / ((1 + Phiz)*(1 + Phiz)*L); - - //longitudinal forces + torsional moment - const double M00 = (1.00 / 3.00)*A*rho*L; - const double M06 = M00 / 2.00; - const double M33 = (J*L*rho) / 3.00; - const double M39 = M33 / 2.00; - - rMassMatrix(0, 0) = M00; - rMassMatrix(0, 6) = M06; - rMassMatrix(6, 6) = M00; - rMassMatrix(3, 3) = M33; - rMassMatrix(3, 9) = M39; - rMassMatrix(9, 9) = M33; - - Matrix TempBendingMassMatrix = ZeroMatrix(smallMatSize, smallMatSize); - this->BuildSingleMassMatrix(TempBendingMassMatrix, Phiz, CTz, CRz, L); - - rMassMatrix(1, 1) = TempBendingMassMatrix(0, 0); - rMassMatrix(1, 5) = TempBendingMassMatrix(0, 1); - rMassMatrix(1, 7) = TempBendingMassMatrix(0, 2); - rMassMatrix(1, 11) = TempBendingMassMatrix(0, 3); - rMassMatrix(5, 5) = TempBendingMassMatrix(1, 1); - rMassMatrix(5, 7) = TempBendingMassMatrix(1, 2); - rMassMatrix(5, 11) = TempBendingMassMatrix(1, 3); - rMassMatrix(7, 7) = TempBendingMassMatrix(2, 2); - rMassMatrix(7, 11) = TempBendingMassMatrix(2, 3); - rMassMatrix(11, 11) = TempBendingMassMatrix(3, 3); - - TempBendingMassMatrix = ZeroMatrix(smallMatSize, smallMatSize); - this->BuildSingleMassMatrix(TempBendingMassMatrix, Phiy, CTy, CRy, L); - - rMassMatrix(2, 2) = TempBendingMassMatrix(0, 0); - rMassMatrix(2, 4) = TempBendingMassMatrix(0, 1); - rMassMatrix(2, 8) = TempBendingMassMatrix(0, 2); - rMassMatrix(2, 10) = TempBendingMassMatrix(0, 3); - rMassMatrix(4, 4) = TempBendingMassMatrix(1, 1); - rMassMatrix(4, 8) = TempBendingMassMatrix(1, 2); - rMassMatrix(4, 10) = TempBendingMassMatrix(1, 3); - rMassMatrix(8, 8) = TempBendingMassMatrix(2, 2); - rMassMatrix(8, 10) = TempBendingMassMatrix(2, 3); - rMassMatrix(10, 10) = TempBendingMassMatrix(3, 3); - - - for (int j = 1; j < 12; ++j) - { - for (int i = 0; i < j; ++i) - { - rMassMatrix(j, i) = rMassMatrix(i, j); - } - } - - KRATOS_CATCH("") - } - - void CrBeamElement3D2N::CalculateLumpedMassMatrix(MatrixType& rMassMatrix, - ProcessInfo& rCurrentProcessInfo) - { - KRATOS_TRY; - const int number_of_nodes = GetGeometry().PointsNumber(); - const int dimension = GetGeometry().WorkingSpaceDimension(); - const unsigned int MatSize = number_of_nodes * dimension * 2; - - if (rMassMatrix.size1() != MatSize) { - rMassMatrix.resize(MatSize, MatSize, false); - } - rMassMatrix = ZeroMatrix(MatSize, MatSize); - const double A = this->GetProperties()[CROSS_AREA]; - const double L = this->CalculateReferenceLength(); - const double rho = this->GetProperties()[DENSITY]; - - const double TotalMass = A * L * rho; - const double temp = 0.50 * TotalMass; - - //translatonal mass - for (int i = 0; i < number_of_nodes; ++i) - { - for (int j = 0; j < dimension; ++j) - { - int index = i * (dimension * 2) + j; - rMassMatrix(index, index) = temp; - } - } - //rotaional mass neglected alpha = 0 - KRATOS_CATCH("") - } - - CrBeamElement3D2N::IntegrationMethod - CrBeamElement3D2N::GetIntegrationMethod() const - { - //do this to have 3GP as an output in GID - return Kratos::GeometryData::GI_GAUSS_3; - } - - void CrBeamElement3D2N::AddExplicitContribution(const VectorType& rRHSVector, - const Variable& rRHSVariable, - Variable >& rDestinationVariable, - const ProcessInfo& rCurrentProcessInfo) - { - KRATOS_TRY; - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int element_size = number_of_nodes * dimension; - - if (rRHSVariable == RESIDUAL_VECTOR && rDestinationVariable == FORCE_RESIDUAL) - { - - for (int i = 0; i< number_of_nodes; ++i) - { - int index = element_size * i; - - GetGeometry()[i].SetLock(); - - array_1d &ForceResidual = - GetGeometry()[i].FastGetSolutionStepValue(FORCE_RESIDUAL); - - for (int j = 0; j &MomentResidual = - GetGeometry()[i].FastGetSolutionStepValue(MOMENT_RESIDUAL); - - for (int j = 0; jGetProperties()[POISSON_RATIO]; - const double E = this->GetProperties()[YOUNG_MODULUS]; - const double G = E / (2.0 * (1.0 + nu)); - return G; - KRATOS_CATCH("") - } - - int CrBeamElement3D2N::Check(const ProcessInfo& rCurrentProcessInfo) - { - KRATOS_TRY - - if (GetGeometry().WorkingSpaceDimension() != 3 || GetGeometry().size() != 2) - { - KRATOS_ERROR << - "The beam element works only in 3D and with 2 noded elements" << "" - << std::endl; - } - //verify that the variables are correctly initialized - if (VELOCITY.Key() == 0) { - KRATOS_ERROR << - "VELOCITY has Key zero! (check if the application is correctly registered" << "" - << std::endl; - } - if (DISPLACEMENT.Key() == 0) { - KRATOS_ERROR << - "DISPLACEMENT has Key zero! (check if the application is correctly registered"<< "" - << std::endl; - } - if (ACCELERATION.Key() == 0) { - KRATOS_ERROR << - "ACCELERATION has Key zero! (check if the application is correctly registered" << "" - << std::endl; - } - if (DENSITY.Key() == 0) { - KRATOS_ERROR << - "DENSITY has Key zero! (check if the application is correctly registered" << "" - << std::endl; - } - if (CROSS_AREA.Key() == 0) { - KRATOS_ERROR << - "CROSS_AREA has Key zero! (check if the application is correctly registered" << "" - << std::endl; - } - //verify that the dofs exist - for (unsigned int i = 0; iGetGeometry().size(); ++i) - { - if (this->GetGeometry()[i].SolutionStepsDataHas(DISPLACEMENT) == false) { - KRATOS_ERROR << - "missing variable DISPLACEMENT on node " << this->GetGeometry()[i].Id() - << std::endl; - } - if (this->GetGeometry()[i].HasDofFor(DISPLACEMENT_X) == false || - this->GetGeometry()[i].HasDofFor(DISPLACEMENT_Y) == false || - this->GetGeometry()[i].HasDofFor(DISPLACEMENT_Z) == false) { - KRATOS_ERROR << - "missing one of the dofs for the variable DISPLACEMENT on node " << - GetGeometry()[i].Id() << std::endl; - } - } - - - - if (this->GetProperties().Has(CROSS_AREA) == false || - this->GetProperties()[CROSS_AREA] == 0) - { - KRATOS_ERROR << "CROSS_AREA not provided for this element" << this->Id() - << std::endl; - } - - if (this->GetProperties().Has(YOUNG_MODULUS) == false || - this->GetProperties()[YOUNG_MODULUS] == 0) - { - KRATOS_ERROR << "YOUNG_MODULUS not provided for this element" << this->Id() - << std::endl; - } - if (this->GetProperties().Has(DENSITY) == false) - { - KRATOS_ERROR << "DENSITY not provided for this element" << this->Id() - << std::endl; - } - - if (this->GetProperties().Has(POISSON_RATIO) == false) - { - KRATOS_ERROR << "POISSON_RATIO not provided for this element" << this->Id() - << std::endl; - } - - if (this->GetProperties().Has(LOCAL_INERTIA_VECTOR) == false) - { - KRATOS_ERROR << "LOCAL_INERTIA_VECTOR not provided for this element" << this->Id() - << std::endl; - } - - return 0; - - KRATOS_CATCH("") - } - - Orientation::Orientation(array_1d& v1, const double theta) { - - KRATOS_TRY - //!!!!!!!!!! if crossproduct with array_1d type switch input order !!!!!!! - //If only direction of v1 is given -> Default case - const int dimension = 3; - - array_1d GlobalZ = ZeroVector(dimension); - GlobalZ[2] = 1.0; - - array_1d v2 = ZeroVector(dimension); - array_1d v3 = ZeroVector(dimension); - - double VectorNorm; - VectorNorm = MathUtils::Norm(v1); - if (VectorNorm != 0) v1 /= VectorNorm; - - if (v1[2] == 1.00) { - v2[1] = 1.0; - v3[0] = -1.0; - } - - if (v1[2] == -1.00) { - v2[1] = 1.0; - v3[0] = 1.0; - } - - if (fabs(v1[2]) != 1.00) { - - v2 = MathUtils::CrossProduct(v1, GlobalZ); - VectorNorm = MathUtils::Norm(v2); - if (VectorNorm != 0) v2 /= VectorNorm; - - v3 = MathUtils::CrossProduct(v2, v1); - VectorNorm = MathUtils::Norm(v3); - if (VectorNorm != 0) v3 /= VectorNorm; - } - - //manual rotation around the beam axis - if (theta != 0) { - const Vector nz_temp = v3; - const Vector ny_temp = v2; - const double CosTheta = cos(theta); - const double SinTheta = sin(theta); - - v2 = ny_temp * CosTheta + nz_temp * SinTheta; - VectorNorm = MathUtils::Norm(v2); - if (VectorNorm != 0) v2 /= VectorNorm; - - v3 = nz_temp * CosTheta - ny_temp * SinTheta; - VectorNorm = MathUtils::Norm(v3); - if (VectorNorm != 0) v3 /= VectorNorm; - } - - Matrix RotationMatrix = ZeroMatrix(dimension); - for (int i = 0; i < dimension; ++i) { - RotationMatrix(i, 0) = v1[i]; - RotationMatrix(i, 1) = v2[i]; - RotationMatrix(i, 2) = v3[i]; - } - - this->GetQuaternion() = Quaternion::FromRotationMatrix(RotationMatrix); - - KRATOS_CATCH("") - } - - Orientation::Orientation(array_1d& v1, array_1d& v2) { - - KRATOS_TRY - //If the user defines an aditional direction v2 - const int dimension = 3; - - - array_1d v3 = ZeroVector(dimension); - - double VectorNorm; - VectorNorm = MathUtils::Norm(v1); - if (VectorNorm != 0) v1 /= VectorNorm; - - VectorNorm = MathUtils::Norm(v2); - if (VectorNorm != 0) v2 /= VectorNorm; - - v3 = MathUtils::CrossProduct(v2, v1); - VectorNorm = MathUtils::Norm(v3); - if (VectorNorm != 0) v3 /= VectorNorm; - - - Matrix RotationMatrix = ZeroMatrix(dimension); - for (int i = 0; i < dimension; ++i) { - RotationMatrix(i, 0) = v1[i]; - RotationMatrix(i, 1) = v2[i]; - RotationMatrix(i, 2) = v3[i]; - } - - this->GetQuaternion() = Quaternion::FromRotationMatrix(RotationMatrix); - - KRATOS_CATCH("") - } - - void Orientation::CalculateRotationMatrix(Matrix& R) { - - KRATOS_TRY - if (R.size1() != 3 || R.size2() != 3) R.resize(3, 3, false); - const Quaternion q = this->GetQuaternion(); - q.ToRotationMatrix(R); - KRATOS_CATCH("") - } - - void Orientation::CalculateBasisVectors(array_1d& v1, - array_1d& v2, - array_1d& v3) { - - KRATOS_TRY - const Quaternion q = this->GetQuaternion(); - Matrix R = ZeroMatrix(3); - q.ToRotationMatrix(R); - if (v1.size() != 3) v1.resize(3, false); - if (v2.size() != 3) v2.resize(3, false); - if (v3.size() != 3) v3.resize(3, false); - - for (int i = 0; i < 3; ++i) { - v1[i] = R(i, 0); - v2[i] = R(i, 1); - v3[i] = R(i, 2); - } - KRATOS_CATCH("") - } - - - void CrBeamElement3D2N::save(Serializer& rSerializer) const - { - KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Element); - rSerializer.save("DeformationModes", this->mDeformationModes); - rSerializer.save("NodalPosition", this->mTotalNodalPosistion); - rSerializer.save("NodalDeformation", this->mTotalNodalDeformation); - rSerializer.save("IterationCounter", this->mIterationCount); - rSerializer.save("NodalForces", this->mNodalForces); - - - rSerializer.save("LocalInitalAxisX", this->mNX0); - rSerializer.save("LocalInitalAxisY", this->mNY0); - rSerializer.save("LocalInitalAxisZ", this->mNZ0); - - - rSerializer.save("QuaternionVecA", this->mQuaternionVEC_A); - rSerializer.save("QuaternionVecB", this->mQuaternionVEC_B); - rSerializer.save("QuaternionScaA", this->mQuaternionSCA_A); - rSerializer.save("QuaternionScaB", this->mQuaternionSCA_B); - - rSerializer.save("mIsLumpedMassMatrix", this->mIsLumpedMassMatrix); - } - - void CrBeamElement3D2N::load(Serializer& rSerializer) - { - KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element); - rSerializer.load("DeformationModes", this->mDeformationModes); - rSerializer.load("NodalPosition", this->mTotalNodalPosistion); - rSerializer.load("NodalDeformation", this->mTotalNodalDeformation); - rSerializer.load("IterationCounter", this->mIterationCount); - rSerializer.load("NodalForces", this->mNodalForces); - - rSerializer.load("LocalInitalAxisX", this->mNX0); - rSerializer.load("LocalInitalAxisY", this->mNY0); - rSerializer.load("LocalInitalAxisZ", this->mNZ0); - - - rSerializer.load("QuaternionVecA", this->mQuaternionVEC_A); - rSerializer.load("QuaternionVecB", this->mQuaternionVEC_B); - rSerializer.load("QuaternionScaA", this->mQuaternionSCA_A); - rSerializer.load("QuaternionScaB", this->mQuaternionSCA_B); - rSerializer.load("mIsLumpedMassMatrix", this->mIsLumpedMassMatrix); - } - -} // namespace Kratos. - - +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Klaus B. Sautter +// +// +// +// System includes + +// External includes + +// Project includes +#include "custom_elements/cr_beam_element_3D2N.hpp" +#include "structural_mechanics_application_variables.h" +#include "includes/define.h" + + + +namespace Kratos +{ + + CrBeamElement3D2N::CrBeamElement3D2N(IndexType NewId, + GeometryType::Pointer pGeometry, bool rLinear) + : Element(NewId, pGeometry) + { + this->mIsLinearElement = rLinear; + } + + CrBeamElement3D2N::CrBeamElement3D2N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, bool rLinear) + : Element(NewId, pGeometry, pProperties) + { + this->mIsLinearElement = rLinear; + } + + Element::Pointer CrBeamElement3D2N::Create(IndexType NewId, + NodesArrayType const& rThisNodes, + PropertiesType::Pointer pProperties) const + { + const GeometryType& rGeom = this->GetGeometry(); + return BaseType::Pointer(new CrBeamElement3D2N( + NewId, rGeom.Create(rThisNodes), pProperties, this->mIsLinearElement)); + } + + CrBeamElement3D2N::~CrBeamElement3D2N() {} + + void CrBeamElement3D2N::EquationIdVector(EquationIdVectorType& rResult, + ProcessInfo& rCurrentProcessInfo) { + if (rResult.size() != msElementSize) rResult.resize(msElementSize); + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * msNumberOfNodes * msDimension; + rResult[index] = this->GetGeometry()[i].GetDof(DISPLACEMENT_X) + .EquationId(); + rResult[index + 1] = this->GetGeometry()[i].GetDof(DISPLACEMENT_Y) + .EquationId(); + rResult[index + 2] = this->GetGeometry()[i].GetDof(DISPLACEMENT_Z) + .EquationId(); + + rResult[index + 3] = this->GetGeometry()[i].GetDof(ROTATION_X) + .EquationId(); + rResult[index + 4] = this->GetGeometry()[i].GetDof(ROTATION_Y) + .EquationId(); + rResult[index + 5] = this->GetGeometry()[i].GetDof(ROTATION_Z) + .EquationId(); + } + + } + + void CrBeamElement3D2N::GetDofList(DofsVectorType& rElementalDofList, + ProcessInfo& rCurrentProcessInfo) { + + if (rElementalDofList.size() != msElementSize) { + rElementalDofList.resize(msElementSize); + } + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * msNumberOfNodes * msDimension; + rElementalDofList[index] = this->GetGeometry()[i] + .pGetDof(DISPLACEMENT_X); + rElementalDofList[index + 1] = this->GetGeometry()[i] + .pGetDof(DISPLACEMENT_Y); + rElementalDofList[index + 2] = this->GetGeometry()[i] + .pGetDof(DISPLACEMENT_Z); + + rElementalDofList[index + 3] = this->GetGeometry()[i] + .pGetDof(ROTATION_X); + rElementalDofList[index + 4] = this->GetGeometry()[i] + .pGetDof(ROTATION_Y); + rElementalDofList[index + 5] = this->GetGeometry()[i] + .pGetDof(ROTATION_Z); + } + } + + void CrBeamElement3D2N::Initialize() { + + KRATOS_TRY; + if (this->mIterationCount == 0) + { + this->mNodalForces = ZeroVector(msElementSize); + this->CalculateInitialLocalCS(); + } + KRATOS_CATCH("") + } + + bounded_matrix + CrBeamElement3D2N::CreateElementStiffnessMatrix_Material() { + + KRATOS_TRY; + const double E = this->GetProperties()[YOUNG_MODULUS]; + const double G = this->CalculateShearModulus(); + const double A = this->GetProperties()[CROSS_AREA]; + const double L = this->CalculateReferenceLength(); + + bounded_vector inertia = this->GetProperties()[LOCAL_INERTIA_VECTOR]; + const double J = inertia[0]; + const double Iy = inertia[1]; + const double Iz = inertia[2]; + + double Ay = 0.00; + if (this->GetProperties().Has(AREA_EFFECTIVE_Y)) { + Ay = GetProperties()[AREA_EFFECTIVE_Y]; + } + + double Az = 0.00; + if (this->GetProperties().Has(AREA_EFFECTIVE_Z)) { + Az = GetProperties()[AREA_EFFECTIVE_Z]; + } + const double Psi_y = this->CalculatePsi(Iy, Az); + const double Psi_z = this->CalculatePsi(Iz, Ay); + + + + bounded_matrix + LocalStiffnessMatrix = ZeroMatrix(msElementSize, msElementSize); + const double L3 = L*L*L; + const double L2 = L*L; + + + LocalStiffnessMatrix(0, 0) = E*A / L; + LocalStiffnessMatrix(6, 0) = -1.0 * LocalStiffnessMatrix(0, 0); + LocalStiffnessMatrix(0, 6) = LocalStiffnessMatrix(6, 0); + LocalStiffnessMatrix(6, 6) = LocalStiffnessMatrix(0, 0); + + LocalStiffnessMatrix(1, 1) = 12.0 * E * Iz * Psi_z / L3; + LocalStiffnessMatrix(1, 7) = -1.0 * LocalStiffnessMatrix(1, 1); + LocalStiffnessMatrix(1, 5) = 6.0 * E * Iz * Psi_z / L2; + LocalStiffnessMatrix(1, 11) = LocalStiffnessMatrix(1, 5); + + LocalStiffnessMatrix(2, 2) = 12.0 * E *Iy * Psi_y / L3; + LocalStiffnessMatrix(2, 8) = -1.0 * LocalStiffnessMatrix(2, 2); + LocalStiffnessMatrix(2, 4) = -6.0 * E *Iy *Psi_y / L2; + LocalStiffnessMatrix(2, 10) = LocalStiffnessMatrix(2, 4); + + LocalStiffnessMatrix(4, 2) = LocalStiffnessMatrix(2, 4); + LocalStiffnessMatrix(5, 1) = LocalStiffnessMatrix(1, 5); + LocalStiffnessMatrix(3, 3) = G*J / L; + LocalStiffnessMatrix(4, 4) = E*Iy*(3.0 * Psi_y + 1.0) / L; + LocalStiffnessMatrix(5, 5) = E*Iz*(3.0 * Psi_z + 1.0) / L; + LocalStiffnessMatrix(4, 8) = -1.0 * LocalStiffnessMatrix(4, 2); + LocalStiffnessMatrix(5, 7) = -1.0 * LocalStiffnessMatrix(5, 1); + LocalStiffnessMatrix(3, 9) = -1.0 * LocalStiffnessMatrix(3, 3); + LocalStiffnessMatrix(4, 10) = E*Iy*(3.0 * Psi_y - 1) / L; + LocalStiffnessMatrix(5, 11) = E*Iz*(3.0 * Psi_z - 1) / L; + + LocalStiffnessMatrix(7, 1) = LocalStiffnessMatrix(1, 7); + LocalStiffnessMatrix(7, 5) = LocalStiffnessMatrix(5, 7); + LocalStiffnessMatrix(7, 7) = LocalStiffnessMatrix(1, 1); + LocalStiffnessMatrix(7, 11) = LocalStiffnessMatrix(7, 5); + + LocalStiffnessMatrix(8, 2) = LocalStiffnessMatrix(2, 8); + LocalStiffnessMatrix(8, 4) = LocalStiffnessMatrix(4, 8); + LocalStiffnessMatrix(8, 8) = LocalStiffnessMatrix(2, 2); + LocalStiffnessMatrix(8, 10) = LocalStiffnessMatrix(8, 4); + + LocalStiffnessMatrix(9, 3) = LocalStiffnessMatrix(3, 9); + LocalStiffnessMatrix(9, 9) = LocalStiffnessMatrix(3, 3); + + LocalStiffnessMatrix(10, 2) = LocalStiffnessMatrix(2, 10); + LocalStiffnessMatrix(10, 4) = LocalStiffnessMatrix(4, 10); + LocalStiffnessMatrix(10, 8) = LocalStiffnessMatrix(8, 10); + LocalStiffnessMatrix(10, 10) = LocalStiffnessMatrix(4, 4); + + LocalStiffnessMatrix(11, 1) = LocalStiffnessMatrix(1, 11); + LocalStiffnessMatrix(11, 5) = LocalStiffnessMatrix(5, 11); + LocalStiffnessMatrix(11, 7) = LocalStiffnessMatrix(7, 11); + LocalStiffnessMatrix(11, 11) = LocalStiffnessMatrix(5, 5); + + return LocalStiffnessMatrix; + KRATOS_CATCH("") + } + + bounded_matrix + CrBeamElement3D2N::CreateElementStiffnessMatrix_Geometry() { + + KRATOS_TRY; + //deformation modes + Vector elementForces_t = ZeroVector(msLocalSize); + elementForces_t = this->CalculateElementForces(); + + //Nodal element forces local + Vector nodalForcesLocal_qe = ZeroVector(msElementSize); + Matrix TransformationMatrixS = ZeroMatrix(msElementSize, msLocalSize); + TransformationMatrixS = this->CalculateTransformationS(); + nodalForcesLocal_qe = prod(TransformationMatrixS, elementForces_t); + + //save local nodal forces + this->mNodalForces = ZeroVector(msElementSize); + this->mNodalForces = nodalForcesLocal_qe; + + + + const double N = nodalForcesLocal_qe[6]; + const double Mt = nodalForcesLocal_qe[9]; + const double my_A = nodalForcesLocal_qe[4]; + const double mz_A = nodalForcesLocal_qe[5]; + const double my_B = nodalForcesLocal_qe[10]; + const double mz_B = nodalForcesLocal_qe[11]; + + const double L = this->CalculateCurrentLength(); + const double Qy = -1.00 * (mz_A + mz_B) / L; + const double Qz = (my_A + my_B) / L; + + bounded_matrix + LocalStiffnessMatrix = ZeroMatrix(msElementSize, msElementSize); + + LocalStiffnessMatrix(0, 1) = -Qy / L; + LocalStiffnessMatrix(0, 2) = -Qz / L; + LocalStiffnessMatrix(0, 7) = -1.0 * LocalStiffnessMatrix(0, 1); + LocalStiffnessMatrix(0, 8) = -1.0 * LocalStiffnessMatrix(0, 2); + + LocalStiffnessMatrix(1, 0) = LocalStiffnessMatrix(0, 1); + + LocalStiffnessMatrix(1, 1) = 1.2 * N / L; + + LocalStiffnessMatrix(1, 3) = my_A / L; + LocalStiffnessMatrix(1, 4) = Mt / L; + + LocalStiffnessMatrix(1, 5) = N / 10.0; + + LocalStiffnessMatrix(1, 6) = LocalStiffnessMatrix(0, 7); + LocalStiffnessMatrix(1, 7) = -1.00 * LocalStiffnessMatrix(1, 1); + LocalStiffnessMatrix(1, 9) = my_B / L; + LocalStiffnessMatrix(1, 10) = -1.00 * LocalStiffnessMatrix(1, 4); + LocalStiffnessMatrix(1, 11) = LocalStiffnessMatrix(1, 5); + + LocalStiffnessMatrix(2, 0) = LocalStiffnessMatrix(0, 2); + LocalStiffnessMatrix(2, 2) = LocalStiffnessMatrix(1, 1); + LocalStiffnessMatrix(2, 3) = mz_A / L; + LocalStiffnessMatrix(2, 4) = -1.00 * LocalStiffnessMatrix(1, 5); + LocalStiffnessMatrix(2, 5) = LocalStiffnessMatrix(1, 4); + LocalStiffnessMatrix(2, 6) = LocalStiffnessMatrix(0, 8); + LocalStiffnessMatrix(2, 8) = LocalStiffnessMatrix(1, 7); + LocalStiffnessMatrix(2, 9) = mz_B / L; + LocalStiffnessMatrix(2, 10) = LocalStiffnessMatrix(2, 4); + LocalStiffnessMatrix(2, 11) = LocalStiffnessMatrix(1, 10); + + for (int i = 0; i < 3; ++i) { + LocalStiffnessMatrix(3, i) = LocalStiffnessMatrix(i, 3); + } + LocalStiffnessMatrix(3, 4) = (-mz_A / 3.00) + (mz_B / 6.00); + LocalStiffnessMatrix(3, 5) = (my_A / 3.00) - (my_B / 6.00); + LocalStiffnessMatrix(3, 7) = -my_A / L; + LocalStiffnessMatrix(3, 8) = -mz_A / L; + LocalStiffnessMatrix(3, 10) = L*Qy / 6.00; + LocalStiffnessMatrix(3, 11) = L*Qz / 6.00; + + for (int i = 0; i < 4; ++i) { + LocalStiffnessMatrix(4, i) = LocalStiffnessMatrix(i, 4); + } + LocalStiffnessMatrix(4, 4) = 2.00 * L*N / 15.00; + LocalStiffnessMatrix(4, 7) = -Mt / L; + LocalStiffnessMatrix(4, 8) = N / 10.00; + LocalStiffnessMatrix(4, 9) = LocalStiffnessMatrix(3, 10); + LocalStiffnessMatrix(4, 10) = -L*N / 30.00; + LocalStiffnessMatrix(4, 11) = Mt / 2.00; + + + for (int i = 0; i < 5; ++i) { + LocalStiffnessMatrix(5, i) = LocalStiffnessMatrix(i, 5); + } + LocalStiffnessMatrix(5, 5) = LocalStiffnessMatrix(4, 4); + LocalStiffnessMatrix(5, 7) = -N / 10.0; + LocalStiffnessMatrix(5, 8) = -Mt / L; + LocalStiffnessMatrix(5, 9) = LocalStiffnessMatrix(3, 11); + LocalStiffnessMatrix(5, 10) = -1.00 * LocalStiffnessMatrix(4, 11); + LocalStiffnessMatrix(5, 11) = LocalStiffnessMatrix(4, 10); + + for (int i = 0; i < 6; ++i) { + LocalStiffnessMatrix(6, i) = LocalStiffnessMatrix(i, 6); + } + LocalStiffnessMatrix(6, 7) = LocalStiffnessMatrix(0, 1); + LocalStiffnessMatrix(6, 8) = LocalStiffnessMatrix(0, 2); + + for (int i = 0; i < 7; ++i) { + LocalStiffnessMatrix(7, i) = LocalStiffnessMatrix(i, 7); + } + LocalStiffnessMatrix(7, 7) = LocalStiffnessMatrix(1, 1); + LocalStiffnessMatrix(7, 9) = -1.00 * LocalStiffnessMatrix(1, 9); + LocalStiffnessMatrix(7, 10) = LocalStiffnessMatrix(4, 1); + LocalStiffnessMatrix(7, 11) = LocalStiffnessMatrix(2, 4); + + for (int i = 0; i < 8; ++i) { + LocalStiffnessMatrix(8, i) = LocalStiffnessMatrix(i, 8); + } + LocalStiffnessMatrix(8, 8) = LocalStiffnessMatrix(1, 1); + LocalStiffnessMatrix(8, 9) = -1.00 * LocalStiffnessMatrix(2, 9); + LocalStiffnessMatrix(8, 10) = LocalStiffnessMatrix(1, 5); + LocalStiffnessMatrix(8, 11) = LocalStiffnessMatrix(1, 4); + + for (int i = 0; i < 9; ++i) { + LocalStiffnessMatrix(9, i) = LocalStiffnessMatrix(i, 9); + } + LocalStiffnessMatrix(9, 10) = (mz_A / 6.00) - (mz_B / 3.00); + LocalStiffnessMatrix(9, 11) = (-my_A / 6.00) + (my_B / 3.00); + + for (int i = 0; i < 10; ++i) { + LocalStiffnessMatrix(10, i) = LocalStiffnessMatrix(i, 10); + } + LocalStiffnessMatrix(10, 10) = LocalStiffnessMatrix(4, 4); + + for (int i = 0; i < 11; ++i) { + LocalStiffnessMatrix(11, i) = LocalStiffnessMatrix(i, 11); + } + LocalStiffnessMatrix(11, 11) = LocalStiffnessMatrix(4, 4); + + return LocalStiffnessMatrix; + KRATOS_CATCH("") + } + + bounded_matrix + CrBeamElement3D2N::CalculateDeformationStiffness() { + + KRATOS_TRY + bounded_matrix + Kd = ZeroMatrix(msLocalSize, msLocalSize); + const double E = this->GetProperties()[YOUNG_MODULUS]; + const double G = this->CalculateShearModulus(); + const double A = this->GetProperties()[CROSS_AREA]; + const double L = this->CalculateReferenceLength(); + + bounded_vector inertia = this->GetProperties()[LOCAL_INERTIA_VECTOR]; + const double J = inertia[0]; + const double Iy = inertia[1]; + const double Iz = inertia[2]; + + double Ay = 0.00; + if (this->GetProperties().Has(AREA_EFFECTIVE_Y)) { + Ay = GetProperties()[AREA_EFFECTIVE_Y]; + } + + double Az = 0.00; + if (this->GetProperties().Has(AREA_EFFECTIVE_Z)) { + Az = GetProperties()[AREA_EFFECTIVE_Z]; + } + const double Psi_y = this->CalculatePsi(Iy, Az); + const double Psi_z = this->CalculatePsi(Iz, Ay); + + Kd(0, 0) = G * J / L; + Kd(1, 1) = E * Iy / L; + Kd(2, 2) = E * Iz / L; + Kd(3, 3) = E * A / L; + Kd(4, 4) = 3.0 * E * Iy * Psi_y / L; + Kd(5, 5) = 3.0 * E * Iz * Psi_z / L; + + + //add geometric stiffness part + if (this->mIsLinearElement == false) + { + const double l = this->CalculateCurrentLength(); + const double N = this->mNodalForces[6]; + + const double Qy = -1.00 * (this->mNodalForces[5] + + this->mNodalForces[11]) / l; + + const double Qz = 1.00 * (this->mNodalForces[4] + + this->mNodalForces[10]) / l; + + const double N1 = l*N / 12.00; + const double N2 = l*N / 20.00; + const double Qy1 = -l*Qy / 6.00; + const double Qz1 = -l*Qz / 6.00; + + Kd(1, 1) += N1; + Kd(2, 2) += N1; + Kd(4, 4) += N2; + Kd(5, 5) += N2; + + Kd(0, 1) += Qy1; + Kd(0, 2) += Qz1; + Kd(1, 0) += Qy1; + Kd(2, 0) += Qz1; + + } + return Kd; + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateInitialLocalCS() { + + KRATOS_TRY + array_1d DirectionVectorX = ZeroVector(msDimension); + array_1d DirectionVectorY = ZeroVector(msDimension); + array_1d DirectionVectorZ = ZeroVector(msDimension); + array_1d ReferenceCoordinates = ZeroVector(msLocalSize); + + ReferenceCoordinates[0] = this->GetGeometry()[0].X0(); + ReferenceCoordinates[1] = this->GetGeometry()[0].Y0(); + ReferenceCoordinates[2] = this->GetGeometry()[0].Z0(); + ReferenceCoordinates[3] = this->GetGeometry()[1].X0(); + ReferenceCoordinates[4] = this->GetGeometry()[1].Y0(); + ReferenceCoordinates[5] = this->GetGeometry()[1].Z0(); + + for (unsigned int i = 0; i < msDimension; ++i) + { + DirectionVectorX[i] = (ReferenceCoordinates[i + msDimension] + - ReferenceCoordinates[i]); + } + + //use orientation class 1st constructor + double theta_costum = 0.00; + if (this->GetProperties().Has(ANG_ROT)) theta_costum = this->GetProperties()[ANG_ROT]; + + + + Orientation element_axis(DirectionVectorX, theta_costum); + element_axis.CalculateBasisVectors(DirectionVectorX, DirectionVectorY, + DirectionVectorZ); + //save them to update the local axis in every following iter. step + this->mNX0 = DirectionVectorX; + this->mNY0 = DirectionVectorY; + this->mNZ0 = DirectionVectorZ; + + + Matrix Temp = ZeroMatrix(msDimension); + this->mRotationMatrix0 = ZeroMatrix(msElementSize); + element_axis.CalculateRotationMatrix(Temp); + this->AssembleSmallInBigMatrix(Temp, this->mRotationMatrix0); + + //provide Initial Rotation Matrix for strategies that dont call 'CalculateLocalSystem' + this->mRotationMatrix = ZeroMatrix(msElementSize); + this->mRotationMatrix = this->mRotationMatrix0; + + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateTransformationMatrix(bounded_matrix& rRotationMatrix) { + + KRATOS_TRY + //initialize local CS + if (this->mIterationCount == 0) this->CalculateInitialLocalCS(); + + //update local CS + Matrix AuxRotationMatrix = ZeroMatrix(msDimension); + AuxRotationMatrix = this->UpdateRotationMatrixLocal(); + + rRotationMatrix = ZeroMatrix(msElementSize); + //Building the rotation matrix for the local element matrix + this->AssembleSmallInBigMatrix(AuxRotationMatrix, rRotationMatrix); + KRATOS_CATCH("") + } + + bounded_matrix + CrBeamElement3D2N::CalculateTransformationS() { + + KRATOS_TRY + const double L = this->CalculateCurrentLength(); + bounded_matrix S = ZeroMatrix(msElementSize, msLocalSize); + S(0, 3) = -1.00; + S(1, 5) = 2.00 / L; + S(2, 4) = -2.00 / L; + S(3, 0) = -1.00; + S(4, 1) = -1.00; + S(4, 4) = 1.00; + S(5, 2) = -1.00; + S(5, 5) = 1.00; + S(6, 3) = 1.00; + S(7, 5) = -2.00 / L; + S(8, 4) = 2.00 / L; + S(9, 0) = 1.00; + S(10, 1) = 1.00; + S(10, 4) = 1.00; + S(11, 2) = 1.00; + S(11, 5) = 1.00; + + return S; + KRATOS_CATCH("") + } + + bounded_matrix + CrBeamElement3D2N::UpdateRotationMatrixLocal() { + + KRATOS_TRY + bounded_vector dPhiA = ZeroVector(msDimension); + bounded_vector dPhiB = ZeroVector(msDimension); + bounded_vector IncrementDeformation = ZeroVector(msElementSize); + IncrementDeformation = this->mIncrementDeformation; + + for (unsigned int i = 0; i < msDimension; ++i) { + dPhiA[i] = IncrementDeformation[i + 3]; + dPhiB[i] = IncrementDeformation[i + 9]; + } + + //calculating quaternions + Vector drA_vec = ZeroVector(msDimension); + Vector drB_vec = ZeroVector(msDimension); + double drA_sca, drB_sca; + + drA_vec = 0.50 * dPhiA; + drB_vec = 0.50 * dPhiB; + + drA_sca = 0.00; + drB_sca = 0.00; + for (unsigned int i = 0; i < msDimension; ++i) { + drA_sca += drA_vec[i] * drA_vec[i]; + drB_sca += drB_vec[i] * drB_vec[i]; + } + drA_sca = 1.00 - drA_sca; + drB_sca = 1.00 - drB_sca; + + drA_sca = sqrt(drA_sca); + drB_sca = sqrt(drB_sca); + + + //1st solution step + if (mIterationCount == 0) { + this->mQuaternionVEC_A = ZeroVector(msDimension); + this->mQuaternionVEC_B = ZeroVector(msDimension); + this->mQuaternionSCA_A = 1.00; + this->mQuaternionSCA_B = 1.00; + } + + Vector tempVec = ZeroVector(msDimension); + double tempSca = 0.00; + + //Node A + tempVec = this->mQuaternionVEC_A; + tempSca = this->mQuaternionSCA_A; + + this->mQuaternionSCA_A = drA_sca *tempSca; + for (unsigned int i = 0; i < msDimension; ++i) { + this->mQuaternionSCA_A -= drA_vec[i] * tempVec[i]; + } + this->mQuaternionVEC_A = drA_sca*tempVec; + this->mQuaternionVEC_A += tempSca * drA_vec; + this->mQuaternionVEC_A += MathUtils::CrossProduct(drA_vec, tempVec); + + //Node B + tempVec = this->mQuaternionVEC_B; + tempSca = this->mQuaternionSCA_B; + + this->mQuaternionSCA_B = drB_sca *tempSca; + for (unsigned int i = 0; i < msDimension; ++i) { + this->mQuaternionSCA_B -= drB_vec[i] * tempVec[i]; + } + + this->mQuaternionVEC_B = drB_sca*tempVec; + this->mQuaternionVEC_B += tempSca * drB_vec; + this->mQuaternionVEC_B += MathUtils::CrossProduct(drB_vec, tempVec); + + + //scalar part of difference quaternion + double scalar_diff; + scalar_diff = (this->mQuaternionSCA_A + this->mQuaternionSCA_B) * + (this->mQuaternionSCA_A + this->mQuaternionSCA_B); + + tempVec = this->mQuaternionVEC_A + this->mQuaternionVEC_B; + scalar_diff += MathUtils::Norm(tempVec) * + MathUtils::Norm(tempVec); + + scalar_diff = 0.50 * sqrt(scalar_diff); + + //mean rotation quaternion + double meanRotationScalar; + meanRotationScalar = (this->mQuaternionSCA_A + this->mQuaternionSCA_B) * 0.50; + meanRotationScalar = meanRotationScalar / scalar_diff; + + bounded_vector meanRotationVector = ZeroVector(msDimension); + meanRotationVector = (this->mQuaternionVEC_A + this->mQuaternionVEC_B) * 0.50; + meanRotationVector = meanRotationVector / scalar_diff; + + //vector part of difference quaternion + bounded_vector vector_diff = ZeroVector(msDimension); + vector_diff = this->mQuaternionSCA_A * this->mQuaternionVEC_B; + vector_diff -= this->mQuaternionSCA_B * this->mQuaternionVEC_A; + vector_diff += MathUtils::CrossProduct(this->mQuaternionVEC_A, + this->mQuaternionVEC_B); + + vector_diff = 0.50 * vector_diff / scalar_diff; + + //rotate inital element basis + const double r0 = meanRotationScalar; + const double r1 = meanRotationVector[0]; + const double r2 = meanRotationVector[1]; + const double r3 = meanRotationVector[2]; + + Quaternion q(r0, r1, r2, r3); + Vector rotatedNX0 = this->mNX0; + Vector rotatedNY0 = this->mNY0; + Vector rotatedNZ0 = this->mNZ0; + q.RotateVector3(rotatedNX0); + q.RotateVector3(rotatedNY0); + q.RotateVector3(rotatedNZ0); + + bounded_matrix RotatedCS = ZeroMatrix(msDimension, msDimension); + for (unsigned int i = 0; i < msDimension; ++i) { + RotatedCS(i, 0) = rotatedNX0[i]; + RotatedCS(i, 1) = rotatedNY0[i]; + RotatedCS(i, 2) = rotatedNZ0[i]; + } + + //rotate basis to element axis + redefine R + Vector n_bisectrix = ZeroVector(msDimension); + Vector deltaX = ZeroVector(msDimension); + double VectorNorm; + + deltaX[0] = this->mTotalNodalPosistion[3] - this->mTotalNodalPosistion[0]; + deltaX[1] = this->mTotalNodalPosistion[4] - this->mTotalNodalPosistion[1]; + deltaX[2] = this->mTotalNodalPosistion[5] - this->mTotalNodalPosistion[2]; + + + VectorNorm = MathUtils::Norm(deltaX); + if (VectorNorm != 0.00) deltaX /= VectorNorm; + + + n_bisectrix = rotatedNX0 + deltaX; + VectorNorm = MathUtils::Norm(n_bisectrix); + if (VectorNorm != 0.00) n_bisectrix /= VectorNorm; + + bounded_matrix n_xyz = ZeroMatrix(msDimension); + for (unsigned int i = 0; i < msDimension; ++i) { + n_xyz(i, 0) = -1.0 * RotatedCS(i, 0); + n_xyz(i, 1) = 1.0 * RotatedCS(i, 1); + n_xyz(i, 2) = 1.0 * RotatedCS(i, 2); + } + + bounded_matrix Identity = ZeroMatrix(msDimension); + for (unsigned int i = 0; i < msDimension; ++i) Identity(i, i) = 1.0; + Identity -= 2.0 * outer_prod(n_bisectrix, n_bisectrix); + n_xyz = prod(Identity, n_xyz); + + + //save current CS for GID OUTPUT + this->mNX = ZeroVector(msDimension); + this->mNY = ZeroVector(msDimension); + this->mNZ = ZeroVector(msDimension); + for (unsigned int i = 0; i < msDimension; ++i) + { + this->mNX[i] = n_xyz(i, 0); + this->mNY[i] = n_xyz(i, 1); + this->mNZ[i] = n_xyz(i, 2); + } + + //calculating deformation modes + this->mPhiS = ZeroVector(msDimension); + this->mPhiA = ZeroVector(msDimension); + this->mPhiS = prod(Matrix(trans(n_xyz)), vector_diff); + this->mPhiS *= 4.00; + + rotatedNX0 = ZeroVector(msDimension); + tempVec = ZeroVector(msDimension); + for (unsigned int i = 0; i < msDimension; ++i) rotatedNX0[i] = n_xyz(i, 0); + tempVec = MathUtils::CrossProduct(rotatedNX0, n_bisectrix); + this->mPhiA = prod(Matrix(trans(n_xyz)), tempVec); + this->mPhiA *= 4.00; + + if (this->mIterationCount == 0) + { + this->mPhiS = ZeroVector(msDimension); + this->mPhiA = ZeroVector(msDimension); + } + return n_xyz; + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::GetValuesVector(Vector& rValues, int Step) { + + KRATOS_TRY + if (rValues.size() != msElementSize) rValues.resize(msElementSize, false); + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * msDimension * 2; + rValues[index] = this->GetGeometry()[i] + .FastGetSolutionStepValue(DISPLACEMENT_X, Step); + rValues[index + 1] = this->GetGeometry()[i] + .FastGetSolutionStepValue(DISPLACEMENT_Y, Step); + rValues[index + 2] = this->GetGeometry()[i] + .FastGetSolutionStepValue(DISPLACEMENT_Z, Step); + + rValues[index + 3] = this->GetGeometry()[i] + .FastGetSolutionStepValue(ROTATION_X, Step); + rValues[index + 4] = this->GetGeometry()[i] + .FastGetSolutionStepValue(ROTATION_Y, Step); + rValues[index + 5] = this->GetGeometry()[i] + .FastGetSolutionStepValue(ROTATION_Z, Step); + } + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::GetFirstDerivativesVector(Vector& rValues, int Step) + { + + KRATOS_TRY + if (rValues.size() != msElementSize) rValues.resize(msElementSize, false); + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * msDimension * 2; + rValues[index] = this->GetGeometry()[i]. + FastGetSolutionStepValue(VELOCITY_X, Step); + rValues[index + 1] = this->GetGeometry()[i]. + FastGetSolutionStepValue(VELOCITY_Y, Step); + rValues[index + 2] = this->GetGeometry()[i]. + FastGetSolutionStepValue(VELOCITY_Z, Step); + + rValues[index + 3] = this->GetGeometry()[i]. + FastGetSolutionStepValue(ANGULAR_VELOCITY_X, Step); + rValues[index + 4] = this->GetGeometry()[i]. + FastGetSolutionStepValue(ANGULAR_VELOCITY_Y, Step); + rValues[index + 5] = this->GetGeometry()[i]. + FastGetSolutionStepValue(ANGULAR_VELOCITY_Z, Step); + } + + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::GetSecondDerivativesVector(Vector& rValues, int Step) + { + + KRATOS_TRY + if (rValues.size() != msElementSize) rValues.resize(msElementSize, false); + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * msDimension * 2; + + rValues[index] = this->GetGeometry()[i] + .FastGetSolutionStepValue(ACCELERATION_X, Step); + rValues[index + 1] = this->GetGeometry()[i] + .FastGetSolutionStepValue(ACCELERATION_Y, Step); + rValues[index + 2] = this->GetGeometry()[i] + .FastGetSolutionStepValue(ACCELERATION_Z, Step); + + rValues[index + 3] = this->GetGeometry()[i]. + FastGetSolutionStepValue(ANGULAR_ACCELERATION_X, Step); + rValues[index + 4] = this->GetGeometry()[i]. + FastGetSolutionStepValue(ANGULAR_ACCELERATION_Y, Step); + rValues[index + 5] = this->GetGeometry()[i]. + FastGetSolutionStepValue(ANGULAR_ACCELERATION_Z, Step); + } + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateMassMatrix(MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + if (rMassMatrix.size1() != msElementSize) { + rMassMatrix.resize(msElementSize, msElementSize, false); + } + rMassMatrix = ZeroMatrix(msElementSize, msElementSize); + + + + if (this->GetProperties().Has(LUMPED_MASS_MATRIX)) { + this->mIsLumpedMassMatrix = GetProperties()[LUMPED_MASS_MATRIX]; + } + else this->mIsLumpedMassMatrix = false; + + + + if (this->mIsLumpedMassMatrix) + { + this->CalculateLumpedMassMatrix(rMassMatrix, rCurrentProcessInfo); + } + else + { + this->CalculateConsistentMassMatrix(rMassMatrix, rCurrentProcessInfo); + + bounded_matrix RotationMatrix = ZeroMatrix(msElementSize,msElementSize); + bounded_matrix aux_matrix = ZeroMatrix(msElementSize,msElementSize); + + if (this->mIsLinearElement) + { + RotationMatrix = this->mRotationMatrix0; + } + else + { + RotationMatrix = this->mRotationMatrix; + } + aux_matrix = prod(RotationMatrix, rMassMatrix); + rMassMatrix = prod(aux_matrix, + Matrix(trans(RotationMatrix))); + } + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateDampingMatrix(MatrixType& rDampingMatrix, + ProcessInfo& rCurrentProcessInfo) { + + KRATOS_TRY + if (rDampingMatrix.size1() != msElementSize) + { + rDampingMatrix.resize(msElementSize, msElementSize, false); + } + + rDampingMatrix = ZeroMatrix(msElementSize, msElementSize); + + Matrix StiffnessMatrix = ZeroMatrix(msElementSize, msElementSize); + + this->CalculateLeftHandSide(StiffnessMatrix, rCurrentProcessInfo); + + Matrix MassMatrix = ZeroMatrix(msElementSize, msElementSize); + + this->CalculateMassMatrix(MassMatrix, rCurrentProcessInfo); + + double alpha = 0.0; + if (this->GetProperties().Has(RAYLEIGH_ALPHA)) + { + alpha = this->GetProperties()[RAYLEIGH_ALPHA]; + } + else if (rCurrentProcessInfo.Has(RAYLEIGH_ALPHA)) + { + alpha = rCurrentProcessInfo[RAYLEIGH_ALPHA]; + } + + double beta = 0.0; + if (this->GetProperties().Has(RAYLEIGH_BETA)) + { + beta = this->GetProperties()[RAYLEIGH_BETA]; + } + else if (rCurrentProcessInfo.Has(RAYLEIGH_BETA)) + { + beta = rCurrentProcessInfo[RAYLEIGH_BETA]; + } + + rDampingMatrix += alpha * MassMatrix; + rDampingMatrix += beta * StiffnessMatrix; + + KRATOS_CATCH("") + } + + + bounded_vector CrBeamElement3D2N::CalculateBodyForces() + { + KRATOS_TRY + //getting shapefunctionvalues for linear SF + const Matrix& Ncontainer = this->GetGeometry().ShapeFunctionsValues( + GeometryData::GI_GAUSS_1); + + bounded_vector EquivalentLineLoad = ZeroVector(msDimension); + bounded_vector BodyForcesGlobal = ZeroVector(msElementSize); + + const double A = this->GetProperties()[CROSS_AREA]; + const double l = this->CalculateCurrentLength(); + const double rho = this->GetProperties()[DENSITY]; + + //calculating equivalent line load + for (int i = 0; i < msNumberOfNodes; ++i) + { + EquivalentLineLoad += A * rho* + this->GetGeometry()[i]. + FastGetSolutionStepValue(VOLUME_ACCELERATION)*Ncontainer(0, i); + } + + + // adding the nodal forces + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i*msLocalSize; + for (int j = 0; j < msDimension; ++j) + { + BodyForcesGlobal[j + index] = + EquivalentLineLoad[j] * Ncontainer(0, i) * l; + } + } + + // adding the nodal moments + this->CalculateAndAddWorkEquivalentNodalForcesLineLoad + (EquivalentLineLoad, BodyForcesGlobal, l); + + + // return the total ForceVector + return BodyForcesGlobal; + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateAndAddWorkEquivalentNodalForcesLineLoad( + const bounded_vector ForceInput, + bounded_vector& rRightHandSideVector, + const double GeometryLength) + { + KRATOS_TRY; + //calculate orthogonal load vector + Vector GeometricOrientation = ZeroVector(msDimension); + GeometricOrientation[0] = this->GetGeometry()[1].X() + - this->GetGeometry()[0].X(); + GeometricOrientation[1] = this->GetGeometry()[1].Y() + - this->GetGeometry()[0].Y(); + if (msDimension == 3) + { + GeometricOrientation[2] = this->GetGeometry()[1].Z() + - this->GetGeometry()[0].Z(); + } + + const double VectorNormA = MathUtils::Norm(GeometricOrientation); + if (VectorNormA != 0.00) GeometricOrientation /= VectorNormA; + + Vector LineLoadDir = ZeroVector(msDimension); + for (int i = 0; i < msDimension; ++i) + { + LineLoadDir[i] = ForceInput[i]; + } + + const double VectorNormB = MathUtils::Norm(LineLoadDir); + if (VectorNormB != 0.00) LineLoadDir /= VectorNormB; + + double cosAngle = 0.00; + for (int i = 0; i < msDimension; ++i) + { + cosAngle += LineLoadDir[i] * GeometricOrientation[i]; + } + + const double sinAngle = sqrt(1.00 - (cosAngle*cosAngle)); + const double NormForceVectorOrth = sinAngle * VectorNormB; + + + Vector NodeA = ZeroVector(msDimension); + NodeA[0] = this->GetGeometry()[0].X(); + NodeA[1] = this->GetGeometry()[0].Y(); + if (msDimension == 3) NodeA[2] = this->GetGeometry()[0].Z(); + + Vector NodeB = ZeroVector(msDimension); + NodeB = NodeA + LineLoadDir; + + Vector NodeC = ZeroVector(msDimension); + NodeC = NodeA + (GeometricOrientation*cosAngle); + + Vector LoadOrthogonalDir = ZeroVector(msDimension); + LoadOrthogonalDir = NodeB - NodeC; + const double VectorNormC = MathUtils::Norm(LoadOrthogonalDir); + if (VectorNormC != 0.00) LoadOrthogonalDir /= VectorNormC; + + + + // now caluclate respective work equivilent nodal moments + + const double CustomMoment = NormForceVectorOrth * + GeometryLength*GeometryLength / 12.00; + + Vector MomentNodeA = ZeroVector(msDimension); + MomentNodeA = MathUtils::CrossProduct(GeometricOrientation, + LoadOrthogonalDir); + MomentNodeA *= CustomMoment; + + for (int i = 0; i < msDimension; ++i) + { + rRightHandSideVector[(1 * msDimension) + i] += MomentNodeA[i]; + rRightHandSideVector[(3 * msDimension) + i] -= MomentNodeA[i]; + } + + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) { + + KRATOS_TRY + this->CalculateLeftHandSide(rLeftHandSideMatrix, rCurrentProcessInfo); + + //Nodal element forces global + bounded_vector nodalForcesGlobal_q = ZeroVector(msElementSize); + nodalForcesGlobal_q = prod(this->mRotationMatrix, + this->mNodalForces); + + //create+compute RHS + //update Residual + rRightHandSideVector = ZeroVector(msElementSize); + rRightHandSideVector -= nodalForcesGlobal_q; + + + //LINEAR BEAM ELEMENT + if (this->mIsLinearElement) + { + Vector NodalDeformation = ZeroVector(msElementSize); + this->GetValuesVector(NodalDeformation); + rRightHandSideVector = ZeroVector(msElementSize); + rRightHandSideVector -= prod(rLeftHandSideMatrix, NodalDeformation); + } + //add bodyforces + rRightHandSideVector += this->CalculateBodyForces(); + this->mIterationCount++; + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateRightHandSide( + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + rRightHandSideVector = ZeroVector(msElementSize); + + if (this->mIsLinearElement == false) + { + this->UpdateIncrementDeformation(); + bounded_matrix TransformationMatrix = ZeroMatrix(msElementSize); + this->CalculateTransformationMatrix(TransformationMatrix); + bounded_vector elementForces_t = ZeroVector(msLocalSize); + elementForces_t = this->CalculateElementForces(); + bounded_vector nodalForcesLocal_qe = ZeroVector(msElementSize); + bounded_matrix TransformationMatrixS = ZeroMatrix(msElementSize, msLocalSize); + TransformationMatrixS = this->CalculateTransformationS(); + nodalForcesLocal_qe = prod(TransformationMatrixS, + elementForces_t); + //save local nodal forces + this->mNodalForces = ZeroVector(msElementSize); + this->mNodalForces = nodalForcesLocal_qe; + + bounded_vector nodalForcesGlobal_q = ZeroVector(msElementSize); + nodalForcesGlobal_q = prod(TransformationMatrix, nodalForcesLocal_qe); + rRightHandSideVector -= nodalForcesGlobal_q; + } + + //LINEAR BEAM ELEMENT + if (this->mIsLinearElement) + { + Matrix LeftHandSideMatrix = ZeroMatrix(msElementSize, msElementSize); + this->CalculateLeftHandSide(LeftHandSideMatrix, rCurrentProcessInfo); + Vector NodalDeformation = ZeroVector(msElementSize); + this->GetValuesVector(NodalDeformation); + rRightHandSideVector = ZeroVector(msElementSize); + rRightHandSideVector -= prod(LeftHandSideMatrix, NodalDeformation); + } + + //add bodyforces + rRightHandSideVector += this->CalculateBodyForces(); + KRATOS_CATCH("") + + } + + void CrBeamElement3D2N::CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, + ProcessInfo& rCurrentProcessInfo) { + + KRATOS_TRY; + //update displacement_delta + this->UpdateIncrementDeformation(); + + //calculate Transformation Matrix + bounded_matrix TransformationMatrix = ZeroMatrix(msElementSize); + this->CalculateTransformationMatrix(TransformationMatrix); + this->mRotationMatrix = ZeroMatrix(msElementSize); + this->mRotationMatrix = TransformationMatrix; + + + + //resizing the matrices + create memory for LHS + rLeftHandSideMatrix = ZeroMatrix(msElementSize, msElementSize); + //creating LHS + rLeftHandSideMatrix += + this->CreateElementStiffnessMatrix_Material(); + rLeftHandSideMatrix += + this->CreateElementStiffnessMatrix_Geometry(); + + + bounded_matrix aux_matrix = ZeroMatrix(msElementSize); + aux_matrix = prod(TransformationMatrix, rLeftHandSideMatrix); + rLeftHandSideMatrix = prod(aux_matrix, + Matrix(trans(TransformationMatrix))); + + //LINEAR BEAM ELEMENT + if (this->mIsLinearElement) + { + TransformationMatrix = this->mRotationMatrix0; + rLeftHandSideMatrix = ZeroMatrix(msElementSize, msElementSize); + rLeftHandSideMatrix += + this->CreateElementStiffnessMatrix_Material(); + bounded_matrix aux_matrix = ZeroMatrix(msElementSize); + aux_matrix = prod(TransformationMatrix, rLeftHandSideMatrix); + rLeftHandSideMatrix = prod(aux_matrix, + Matrix(trans(TransformationMatrix))); + } + //assign global element variables + this->mLHS = rLeftHandSideMatrix; + KRATOS_CATCH("") + } + + bounded_vector CrBeamElement3D2N::CalculateElementForces() { + + KRATOS_TRY; + bounded_vector deformation_modes_total_V = ZeroVector(msLocalSize); + const double L = this->CalculateReferenceLength(); + const double l = this->CalculateCurrentLength(); + + deformation_modes_total_V[3] = l - L; + for (int i = 0; i < 3; ++i) deformation_modes_total_V[i] = this->mPhiS[i]; + for (int i = 0; i < 2; ++i) deformation_modes_total_V[i + 4] = this->mPhiA[i + 1]; + //calculate element forces + bounded_vector element_forces_t = ZeroVector(msLocalSize); + bounded_matrix deformation_stiffness_Kd = ZeroMatrix(msLocalSize); + + deformation_stiffness_Kd = this->CalculateDeformationStiffness(); + element_forces_t = prod(deformation_stiffness_Kd, + deformation_modes_total_V); + + return element_forces_t; + KRATOS_CATCH("") + } + + double CrBeamElement3D2N::CalculateCurrentLength() { + + KRATOS_TRY; + const double du = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_X) + - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_X); + const double dv = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Y) + - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Y); + const double dw = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Z) + - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Z); + const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); + const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); + const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); + const double l = sqrt((du + dx)*(du + dx) + (dv + dy)*(dv + dy) + + (dw + dz)*(dw + dz)); + return l; + KRATOS_CATCH("") + + } + + double CrBeamElement3D2N::CalculatePsi(const double I, const double A_eff) { + + KRATOS_TRY; + const double E = this->GetProperties()[YOUNG_MODULUS]; + const double L = this->CalculateCurrentLength(); + const double G = this->CalculateShearModulus(); + + const double phi = (12.0 * E * I) / (L*L * G*A_eff); + double psi; + //interpret input A_eff == 0 as shearstiff -> psi = 1.0 + if (A_eff == 0.00) psi = 1.00; + else psi = 1.0 / (1.0 + phi); + + return psi; + KRATOS_CATCH("") + } + + double CrBeamElement3D2N::CalculateReferenceLength() { + + KRATOS_TRY; + const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); + const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); + const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); + const double L = sqrt(dx*dx + dy*dy + dz*dz); + return L; + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::UpdateIncrementDeformation() { + + KRATOS_TRY + Vector actualDeformation = ZeroVector(msElementSize); + this->mIncrementDeformation = ZeroVector(msElementSize); + + if (mIterationCount == 0) this->mTotalNodalDeformation = ZeroVector(msElementSize); + this->GetValuesVector(actualDeformation, 0); + + this->mIncrementDeformation = actualDeformation + - this->mTotalNodalDeformation; + + this->mTotalNodalDeformation = ZeroVector(msElementSize); + this->mTotalNodalDeformation = actualDeformation; + + this->mTotalNodalPosistion = ZeroVector(msLocalSize); + this->mTotalNodalPosistion[0] = this->GetGeometry()[0].X0() + + actualDeformation[0]; + this->mTotalNodalPosistion[1] = this->GetGeometry()[0].Y0() + + actualDeformation[1]; + this->mTotalNodalPosistion[2] = this->GetGeometry()[0].Z0() + + actualDeformation[2]; + + this->mTotalNodalPosistion[3] = this->GetGeometry()[1].X0() + + actualDeformation[6]; + this->mTotalNodalPosistion[4] = this->GetGeometry()[1].Y0() + + actualDeformation[7]; + this->mTotalNodalPosistion[5] = this->GetGeometry()[1].Z0() + + actualDeformation[8]; + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateOnIntegrationPoints( + const Variable >& rVariable, + std::vector< array_1d >& rOutput, + const ProcessInfo& rCurrentProcessInfo) { + + KRATOS_TRY + //element with two nodes can only represent results at one node + const unsigned int& write_points_number = GetGeometry() + .IntegrationPointsNumber(Kratos::GeometryData::GI_GAUSS_3); + if (rOutput.size() != write_points_number) { + rOutput.resize(write_points_number); + } + + + this->UpdateIncrementDeformation(); + //calculate Transformation Matrix + bounded_matrix TransformationMatrix = ZeroMatrix(msElementSize); + this->CalculateTransformationMatrix(TransformationMatrix); + //deformation modes + bounded_vector elementForces_t = ZeroVector(msLocalSize); + elementForces_t = this->CalculateElementForces(); + Vector Stress = ZeroVector(msElementSize); + bounded_matrix TransformationMatrixS = ZeroMatrix(msElementSize, msLocalSize); + TransformationMatrixS = this->CalculateTransformationS(); + Stress = prod(TransformationMatrixS, elementForces_t); + + //LINEAR BEAM ELEMENT + if (this->mIsLinearElement) + { + Matrix LeftHandSideMatrix = ZeroMatrix(msElementSize, msElementSize); + LeftHandSideMatrix = this->mLHS; + + Vector NodalDeformation = ZeroVector(msElementSize); + this->GetValuesVector(NodalDeformation); + Stress = ZeroVector(msElementSize); + Stress = prod(LeftHandSideMatrix, NodalDeformation); + bounded_matrix TransformationMatrix = ZeroMatrix(msElementSize); + TransformationMatrix = this->mRotationMatrix; + Stress = prod(Matrix(trans(TransformationMatrix)), Stress); + } + + + //rOutput[GP 1,2,3][x,y,z] + + if (rVariable == MOMENT) + { + rOutput[0][0] = -1.0 *Stress[3] * 0.75 + Stress[9] * 0.25; + rOutput[1][0] = -1.0 *Stress[3] * 0.50 + Stress[9] * 0.50; + rOutput[2][0] = -1.0 *Stress[3] * 0.25 + Stress[9] * 0.75; + + rOutput[0][1] = -1.0 *Stress[4] * 0.75 + Stress[10] * 0.25; + rOutput[1][1] = -1.0 *Stress[4] * 0.50 + Stress[10] * 0.50; + rOutput[2][1] = -1.0 *Stress[4] * 0.25 + Stress[10] * 0.75; + + rOutput[0][2] = -1.0 *Stress[5] * 0.75 + Stress[11] * 0.25; + rOutput[1][2] = -1.0 *Stress[5] * 0.50 + Stress[11] * 0.50; + rOutput[2][2] = -1.0 *Stress[5] * 0.25 + Stress[11] * 0.75; + + } + if (rVariable == FORCE) + { + rOutput[0][0] = -1.0 * Stress[0] * 0.75 + Stress[6] * 0.25; + rOutput[1][0] = -1.0 * Stress[0] * 0.50 + Stress[6] * 0.50; + rOutput[2][0] = -1.0 * Stress[0] * 0.25 + Stress[6] * 0.75; + + rOutput[0][1] = -1.0 * Stress[1] * 0.75 + Stress[7] * 0.25; + rOutput[1][1] = -1.0 *Stress[1] * 0.50 + Stress[7] * 0.50; + rOutput[2][1] = -1.0 *Stress[1] * 0.25 + Stress[7] * 0.75; + + rOutput[0][2] = -1.0 *Stress[2] * 0.75 + Stress[8] * 0.25; + rOutput[1][2] = -1.0 *Stress[2] * 0.50 + Stress[8] * 0.50; + rOutput[2][2] = -1.0 *Stress[2] * 0.25 + Stress[8] * 0.75; + + } + + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::GetValueOnIntegrationPoints( + const Variable >& rVariable, + std::vector< array_1d >& rOutput, + const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + this->CalculateOnIntegrationPoints(rVariable, rOutput, rCurrentProcessInfo); + KRATOS_CATCH("") + } + + + + void CrBeamElement3D2N::CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector< Vector >& rOutput, + const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + + if (rVariable == LOCAL_AXES_VECTOR) + { + rOutput.resize(3); + for (int i = 0; i < 3; ++i) rOutput[i] = ZeroVector(3); + + if (this->mIsLinearElement) + { + rOutput[0] = this->mNX0; + rOutput[1] = this->mNY0; + rOutput[2] = this->mNZ0; + } + else + { + rOutput[0] = this->mNX; + rOutput[1] = this->mNY; + rOutput[2] = this->mNZ; + } + } + + KRATOS_CATCH(""); + } + + void CrBeamElement3D2N::GetValueOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + this->CalculateOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::AssembleSmallInBigMatrix(Matrix SmallMatrix, + bounded_matrix& BigMatrix) { + + KRATOS_TRY + for (unsigned int kk = 0; kk < msElementSize; kk += msDimension) + { + for (int i = 0; i TempMassMatrix = ZeroMatrix(MatSize, MatSize); + const double Phi2 = Phi * Phi; + const double L2 = L*L; + + + TempMassMatrix(0, 0) = (13.00 / 35.00) + (7.00 / 10.00)*Phi + + (1.00 / 3.00)*Phi2; + TempMassMatrix(0, 1) = ((11.00 / 210.00) + (11.00 / 210.00)*Phi + + (1.00 / 24.00)*Phi2)*L; + TempMassMatrix(0, 2) = (9.00 / 70.00) + (3.00 / 10.00)*Phi + + (1.00 / 6.00)*Phi2; + TempMassMatrix(0, 3) = -((13.00 / 420.00) + (3.00 / 40.00)*Phi + + (1.00 / 24.00)*Phi2)*L; + TempMassMatrix(1, 0) = TempMassMatrix(0, 1); + TempMassMatrix(1, 1) = ((1.00 / 105.00) + (1.00 / 60.00)*Phi + + (1.00 / 120.00)*Phi2)*L2; + TempMassMatrix(1, 2) = ((13.00 / 420.00) + (3.00 / 40.00)*Phi + + (1.00 / 24.00)*Phi2)*L; + TempMassMatrix(1, 3) = -((1.00 / 140.00) + (1.00 / 60.00)*Phi + + (1.00 / 120.00)*Phi2)*L2; + TempMassMatrix(2, 0) = TempMassMatrix(0, 2); + TempMassMatrix(2, 1) = TempMassMatrix(1, 2); + TempMassMatrix(2, 2) = (13.00 / 35.00) + (7.00 / 10.00)*Phi + + (1.00 / 3.00)*Phi2; + TempMassMatrix(2, 3) = -((11.00 / 210.00) + (11.00 / 210.00)*Phi + + (1.00 / 24.00)*Phi2)*L; + TempMassMatrix(3, 0) = TempMassMatrix(0, 3); + TempMassMatrix(3, 1) = TempMassMatrix(1, 3); + TempMassMatrix(3, 2) = TempMassMatrix(2, 3); + TempMassMatrix(3, 3) = ((1.00 / 105.00) + (1.00 / 60.00)*Phi + + (1.00 / 120.00)*Phi2)*L2; + + TempMassMatrix *= CT; + rMassMatrix += TempMassMatrix; + + + TempMassMatrix = ZeroMatrix(MatSize, MatSize); + + TempMassMatrix(0, 0) = 6.00 / 5.00; + TempMassMatrix(0, 1) = ((1.00 / 10.00) - (1.00 / 2.00)*Phi)*L; + TempMassMatrix(0, 2) = -6.00 / 5.00; + TempMassMatrix(0, 3) = ((1.00 / 10.00) - (1.00 / 2.00)*Phi)*L; + TempMassMatrix(1, 0) = TempMassMatrix(0, 1); + TempMassMatrix(1, 1) = ((2.00 / 15.00) + (1.00 / 6.00)*Phi + + (1.00 / 3.00)*Phi2)*L2; + TempMassMatrix(1, 2) = ((-1.00 / 10.00) + (1.00 / 2.00)*Phi)*L; + TempMassMatrix(1, 3) = -((1.00 / 30.00) + (1.00 / 6.00)*Phi + - (1.00 / 6.00)*Phi2)*L2; + TempMassMatrix(2, 0) = TempMassMatrix(0, 2); + TempMassMatrix(2, 1) = TempMassMatrix(1, 2); + TempMassMatrix(2, 2) = 6.00 / 5.00; + TempMassMatrix(2, 3) = ((-1.00 / 10.00) + (1.00 / 2.00)*Phi)*L; + TempMassMatrix(3, 0) = TempMassMatrix(0, 3); + TempMassMatrix(3, 1) = TempMassMatrix(1, 3); + TempMassMatrix(3, 2) = TempMassMatrix(2, 3); + TempMassMatrix(3, 3) = ((2.00 / 15.00) + (1.00 / 6.00)*Phi + + (1.00 / 3.00)*Phi2)*L2; + + TempMassMatrix *= CR; + rMassMatrix += TempMassMatrix; + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateConsistentMassMatrix(MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + const int smallMatSize = msNumberOfNodes * 2; + + if (rMassMatrix.size1() != msElementSize) { + rMassMatrix.resize(msElementSize, msElementSize, false); + } + rMassMatrix = ZeroMatrix(msElementSize, msElementSize); + + const double L = this->CalculateReferenceLength(); + const double L2 = L * L; + const double rho = this->GetProperties()[DENSITY]; + const double A = this->GetProperties()[CROSS_AREA]; + const double E = this->GetProperties()[YOUNG_MODULUS]; + Vector inertia = this->GetProperties()[LOCAL_INERTIA_VECTOR]; + const double J = inertia[0]; + const double Iy = inertia[1]; + const double Iz = inertia[2]; + const double G = this->CalculateShearModulus(); + + double Ay = 0.00; + if (this->GetProperties().Has(AREA_EFFECTIVE_Y)) { + Ay = GetProperties()[AREA_EFFECTIVE_Y]; + } + + double Az = 0.00; + if (this->GetProperties().Has(AREA_EFFECTIVE_Z)) { + Az = GetProperties()[AREA_EFFECTIVE_Z]; + } + + double IRy = Iy; + if (this->GetProperties().Has(INERTIA_ROT_Y)) { + IRy = GetProperties()[INERTIA_ROT_Y]; + } + + double IRz = Iz; + if (this->GetProperties().Has(INERTIA_ROT_Y)) { + IRz = GetProperties()[INERTIA_ROT_Z]; + } + + double Phiy = 0.00; + double Phiz = 0.00; + + if (Ay != 0.00) Phiz = (12.00 * E * Iz) / (L2*G*Ay); + if (Az != 0.00) Phiy = (12.00 * E * Iy) / (L2*G*Az); + + const double CTy = (rho * A * L) / ((1 + Phiy)*(1 + Phiy)); + const double CTz = (rho * A * L) / ((1 + Phiz)*(1 + Phiz)); + + const double CRy = (rho*IRy) / ((1 + Phiy)*(1 + Phiy)*L); + const double CRz = (rho*IRz) / ((1 + Phiz)*(1 + Phiz)*L); + + //longitudinal forces + torsional moment + const double M00 = (1.00 / 3.00)*A*rho*L; + const double M06 = M00 / 2.00; + const double M33 = (J*L*rho) / 3.00; + const double M39 = M33 / 2.00; + + rMassMatrix(0, 0) = M00; + rMassMatrix(0, 6) = M06; + rMassMatrix(6, 6) = M00; + rMassMatrix(3, 3) = M33; + rMassMatrix(3, 9) = M39; + rMassMatrix(9, 9) = M33; + + Matrix TempBendingMassMatrix = ZeroMatrix(smallMatSize, smallMatSize); + this->BuildSingleMassMatrix(TempBendingMassMatrix, Phiz, CTz, CRz, L); + + rMassMatrix(1, 1) = TempBendingMassMatrix(0, 0); + rMassMatrix(1, 5) = TempBendingMassMatrix(0, 1); + rMassMatrix(1, 7) = TempBendingMassMatrix(0, 2); + rMassMatrix(1, 11) = TempBendingMassMatrix(0, 3); + rMassMatrix(5, 5) = TempBendingMassMatrix(1, 1); + rMassMatrix(5, 7) = TempBendingMassMatrix(1, 2); + rMassMatrix(5, 11) = TempBendingMassMatrix(1, 3); + rMassMatrix(7, 7) = TempBendingMassMatrix(2, 2); + rMassMatrix(7, 11) = TempBendingMassMatrix(2, 3); + rMassMatrix(11, 11) = TempBendingMassMatrix(3, 3); + + TempBendingMassMatrix = ZeroMatrix(smallMatSize, smallMatSize); + this->BuildSingleMassMatrix(TempBendingMassMatrix, Phiy, CTy, CRy, L); + + rMassMatrix(2, 2) = TempBendingMassMatrix(0, 0); + rMassMatrix(2, 4) = TempBendingMassMatrix(0, 1); + rMassMatrix(2, 8) = TempBendingMassMatrix(0, 2); + rMassMatrix(2, 10) = TempBendingMassMatrix(0, 3); + rMassMatrix(4, 4) = TempBendingMassMatrix(1, 1); + rMassMatrix(4, 8) = TempBendingMassMatrix(1, 2); + rMassMatrix(4, 10) = TempBendingMassMatrix(1, 3); + rMassMatrix(8, 8) = TempBendingMassMatrix(2, 2); + rMassMatrix(8, 10) = TempBendingMassMatrix(2, 3); + rMassMatrix(10, 10) = TempBendingMassMatrix(3, 3); + + + for (int j = 1; j < 12; ++j) + { + for (int i = 0; i < j; ++i) + { + rMassMatrix(j, i) = rMassMatrix(i, j); + } + } + + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateLumpedMassMatrix(MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + if (rMassMatrix.size1() != msElementSize) { + rMassMatrix.resize(msElementSize, msElementSize, false); + } + rMassMatrix = ZeroMatrix(msElementSize, msElementSize); + const double A = this->GetProperties()[CROSS_AREA]; + const double L = this->CalculateReferenceLength(); + const double rho = this->GetProperties()[DENSITY]; + + const double TotalMass = A * L * rho; + const double temp = 0.50 * TotalMass; + + //translatonal mass + for (int i = 0; i < msNumberOfNodes; ++i) + { + for (int j = 0; j < msDimension; ++j) + { + int index = i * (msDimension * 2) + j; + rMassMatrix(index, index) = temp; + } + } + //rotaional mass neglected alpha = 0 + KRATOS_CATCH("") + } + + CrBeamElement3D2N::IntegrationMethod + CrBeamElement3D2N::GetIntegrationMethod() const + { + //do this to have 3GP as an output in GID + return Kratos::GeometryData::GI_GAUSS_3; + } + + void CrBeamElement3D2N::AddExplicitContribution(const VectorType& rRHSVector, + const Variable& rRHSVariable, + Variable >& rDestinationVariable, + const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + if (rRHSVariable == RESIDUAL_VECTOR && rDestinationVariable == FORCE_RESIDUAL) + { + + for (int i = 0; i< msNumberOfNodes; ++i) + { + int index = msLocalSize * i; + + GetGeometry()[i].SetLock(); + + array_1d &ForceResidual = + GetGeometry()[i].FastGetSolutionStepValue(FORCE_RESIDUAL); + + for (int j = 0; j &MomentResidual = + GetGeometry()[i].FastGetSolutionStepValue(MOMENT_RESIDUAL); + + for (int j = 0; jGetProperties()[POISSON_RATIO]; + const double E = this->GetProperties()[YOUNG_MODULUS]; + const double G = E / (2.0 * (1.0 + nu)); + return G; + KRATOS_CATCH("") + } + + int CrBeamElement3D2N::Check(const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY + + if (GetGeometry().WorkingSpaceDimension() != 3 || GetGeometry().size() != 2) + { + KRATOS_ERROR << + "The beam element works only in 3D and with 2 noded elements" << "" + << std::endl; + } + //verify that the variables are correctly initialized + if (VELOCITY.Key() == 0) { + KRATOS_ERROR << + "VELOCITY has Key zero! (check if the application is correctly registered" << "" + << std::endl; + } + if (DISPLACEMENT.Key() == 0) { + KRATOS_ERROR << + "DISPLACEMENT has Key zero! (check if the application is correctly registered"<< "" + << std::endl; + } + if (ACCELERATION.Key() == 0) { + KRATOS_ERROR << + "ACCELERATION has Key zero! (check if the application is correctly registered" << "" + << std::endl; + } + if (DENSITY.Key() == 0) { + KRATOS_ERROR << + "DENSITY has Key zero! (check if the application is correctly registered" << "" + << std::endl; + } + if (CROSS_AREA.Key() == 0) { + KRATOS_ERROR << + "CROSS_AREA has Key zero! (check if the application is correctly registered" << "" + << std::endl; + } + //verify that the dofs exist + for (unsigned int i = 0; iGetGeometry().size(); ++i) + { + if (this->GetGeometry()[i].SolutionStepsDataHas(DISPLACEMENT) == false) { + KRATOS_ERROR << + "missing variable DISPLACEMENT on node " << this->GetGeometry()[i].Id() + << std::endl; + } + if (this->GetGeometry()[i].HasDofFor(DISPLACEMENT_X) == false || + this->GetGeometry()[i].HasDofFor(DISPLACEMENT_Y) == false || + this->GetGeometry()[i].HasDofFor(DISPLACEMENT_Z) == false) { + KRATOS_ERROR << + "missing one of the dofs for the variable DISPLACEMENT on node " << + GetGeometry()[i].Id() << std::endl; + } + } + + + + if (this->GetProperties().Has(CROSS_AREA) == false || + this->GetProperties()[CROSS_AREA] == 0) + { + KRATOS_ERROR << "CROSS_AREA not provided for this element" << this->Id() + << std::endl; + } + + if (this->GetProperties().Has(YOUNG_MODULUS) == false || + this->GetProperties()[YOUNG_MODULUS] == 0) + { + KRATOS_ERROR << "YOUNG_MODULUS not provided for this element" << this->Id() + << std::endl; + } + if (this->GetProperties().Has(DENSITY) == false) + { + KRATOS_ERROR << "DENSITY not provided for this element" << this->Id() + << std::endl; + } + + if (this->GetProperties().Has(POISSON_RATIO) == false) + { + KRATOS_ERROR << "POISSON_RATIO not provided for this element" << this->Id() + << std::endl; + } + + if (this->GetProperties().Has(LOCAL_INERTIA_VECTOR) == false) + { + KRATOS_ERROR << "LOCAL_INERTIA_VECTOR not provided for this element" << this->Id() + << std::endl; + } + else + { + Vector inertia = this->GetProperties()[LOCAL_INERTIA_VECTOR]; + if (inertia.size() != 3) + { + KRATOS_ERROR << "LOCAL_INERTIA_VECTOR must be of size 3 in element:" << this->Id() + << std::endl; + } + } + + return 0; + + KRATOS_CATCH("") + } + + Orientation::Orientation(array_1d& v1, const double theta) { + + KRATOS_TRY + //!!!!!!!!!! if crossproduct with array_1d type switch input order !!!!!!! + //If only direction of v1 is given -> Default case + array_1d GlobalZ = ZeroVector(msDimension); + GlobalZ[2] = 1.0; + + array_1d v2 = ZeroVector(msDimension); + array_1d v3 = ZeroVector(msDimension); + + double VectorNorm; + VectorNorm = MathUtils::Norm(v1); + if (VectorNorm != 0) v1 /= VectorNorm; + + if (v1[2] == 1.00) { + v2[1] = 1.0; + v3[0] = -1.0; + } + + if (v1[2] == -1.00) { + v2[1] = 1.0; + v3[0] = 1.0; + } + + if (fabs(v1[2]) != 1.00) { + + v2 = MathUtils::CrossProduct(v1, GlobalZ); + VectorNorm = MathUtils::Norm(v2); + if (VectorNorm != 0) v2 /= VectorNorm; + + v3 = MathUtils::CrossProduct(v2, v1); + VectorNorm = MathUtils::Norm(v3); + if (VectorNorm != 0) v3 /= VectorNorm; + } + + //manual rotation around the beam axis + if (theta != 0) { + const Vector nz_temp = v3; + const Vector ny_temp = v2; + const double CosTheta = cos(theta); + const double SinTheta = sin(theta); + + v2 = ny_temp * CosTheta + nz_temp * SinTheta; + VectorNorm = MathUtils::Norm(v2); + if (VectorNorm != 0) v2 /= VectorNorm; + + v3 = nz_temp * CosTheta - ny_temp * SinTheta; + VectorNorm = MathUtils::Norm(v3); + if (VectorNorm != 0) v3 /= VectorNorm; + } + + Matrix RotationMatrix = ZeroMatrix(msDimension); + for (int i = 0; i < msDimension; ++i) { + RotationMatrix(i, 0) = v1[i]; + RotationMatrix(i, 1) = v2[i]; + RotationMatrix(i, 2) = v3[i]; + } + + this->GetQuaternion() = Quaternion::FromRotationMatrix(RotationMatrix); + + KRATOS_CATCH("") + } + + Orientation::Orientation(array_1d& v1, array_1d& v2) { + + KRATOS_TRY + //If the user defines an aditional direction v2 + array_1d v3 = ZeroVector(msDimension); + + double VectorNorm; + VectorNorm = MathUtils::Norm(v1); + if (VectorNorm != 0) v1 /= VectorNorm; + + VectorNorm = MathUtils::Norm(v2); + if (VectorNorm != 0) v2 /= VectorNorm; + + v3 = MathUtils::CrossProduct(v2, v1); + VectorNorm = MathUtils::Norm(v3); + if (VectorNorm != 0) v3 /= VectorNorm; + + + Matrix RotationMatrix = ZeroMatrix(msDimension); + for (int i = 0; i < msDimension; ++i) { + RotationMatrix(i, 0) = v1[i]; + RotationMatrix(i, 1) = v2[i]; + RotationMatrix(i, 2) = v3[i]; + } + + this->GetQuaternion() = Quaternion::FromRotationMatrix(RotationMatrix); + + KRATOS_CATCH("") + } + + void Orientation::CalculateRotationMatrix(Matrix& R) { + + KRATOS_TRY + if (R.size1() != msDimension || R.size2() != msDimension) R.resize(msDimension, msDimension, false); + const Quaternion q = this->GetQuaternion(); + q.ToRotationMatrix(R); + KRATOS_CATCH("") + } + + void Orientation::CalculateBasisVectors(array_1d& v1, + array_1d& v2, + array_1d& v3) { + + KRATOS_TRY + const Quaternion q = this->GetQuaternion(); + Matrix R = ZeroMatrix(msDimension); + q.ToRotationMatrix(R); + if (v1.size() != msDimension) v1.resize(msDimension, false); + if (v2.size() != msDimension) v2.resize(msDimension, false); + if (v3.size() != msDimension) v3.resize(msDimension, false); + + for (int i = 0; i < msDimension; ++i) { + v1[i] = R(i, 0); + v2[i] = R(i, 1); + v3[i] = R(i, 2); + } + KRATOS_CATCH("") + } + + + void CrBeamElement3D2N::CalculateGeometricStiffnessMatrix(MatrixType& rGeometricStiffnessMatrix, + ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + rGeometricStiffnessMatrix = ZeroMatrix(msElementSize, msElementSize); + rGeometricStiffnessMatrix = this->CreateElementStiffnessMatrix_Geometry(); + KRATOS_CATCH("") + } + + void CrBeamElement3D2N::CalculateElasticStiffnessMatrix(MatrixType& rElasticStiffnessMatrix, + ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + rElasticStiffnessMatrix = ZeroMatrix(msElementSize, msElementSize); + rElasticStiffnessMatrix = this->CreateElementStiffnessMatrix_Material(); + KRATOS_CATCH("") + } + + + + void CrBeamElement3D2N::save(Serializer& rSerializer) const + { + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Element); + rSerializer.save("DeformationModes", this->mDeformationModes); + rSerializer.save("NodalPosition", this->mTotalNodalPosistion); + rSerializer.save("NodalDeformation", this->mTotalNodalDeformation); + rSerializer.save("IterationCounter", this->mIterationCount); + rSerializer.save("NodalForces", this->mNodalForces); + + + rSerializer.save("LocalInitalAxisX", this->mNX0); + rSerializer.save("LocalInitalAxisY", this->mNY0); + rSerializer.save("LocalInitalAxisZ", this->mNZ0); + + + rSerializer.save("QuaternionVecA", this->mQuaternionVEC_A); + rSerializer.save("QuaternionVecB", this->mQuaternionVEC_B); + rSerializer.save("QuaternionScaA", this->mQuaternionSCA_A); + rSerializer.save("QuaternionScaB", this->mQuaternionSCA_B); + + rSerializer.save("mIsLumpedMassMatrix", this->mIsLumpedMassMatrix); + } + + void CrBeamElement3D2N::load(Serializer& rSerializer) + { + KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element); + rSerializer.load("DeformationModes", this->mDeformationModes); + rSerializer.load("NodalPosition", this->mTotalNodalPosistion); + rSerializer.load("NodalDeformation", this->mTotalNodalDeformation); + rSerializer.load("IterationCounter", this->mIterationCount); + rSerializer.load("NodalForces", this->mNodalForces); + + rSerializer.load("LocalInitalAxisX", this->mNX0); + rSerializer.load("LocalInitalAxisY", this->mNY0); + rSerializer.load("LocalInitalAxisZ", this->mNZ0); + + + rSerializer.load("QuaternionVecA", this->mQuaternionVEC_A); + rSerializer.load("QuaternionVecB", this->mQuaternionVEC_B); + rSerializer.load("QuaternionScaA", this->mQuaternionSCA_A); + rSerializer.load("QuaternionScaB", this->mQuaternionSCA_B); + rSerializer.load("mIsLumpedMassMatrix", this->mIsLumpedMassMatrix); + } + +} // namespace Kratos. + + diff --git a/applications/StructuralMechanicsApplication/custom_elements/cr_beam_element_3D2N.hpp b/applications/StructuralMechanicsApplication/custom_elements/cr_beam_element_3D2N.hpp index 6788d658220f..2eabb0057b9d 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/cr_beam_element_3D2N.hpp +++ b/applications/StructuralMechanicsApplication/custom_elements/cr_beam_element_3D2N.hpp @@ -1,220 +1,245 @@ -// KRATOS ___| | | | -// \___ \ __| __| | | __| __| | | __| _` | | -// | | | | | ( | | | | ( | | -// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS -// -// License: BSD License -// license: structural_mechanics_application/license.txt -// -// Main authors: Klaus B. Sautter -// -// -// - -#if !defined(KRATOS_CR_BEAM_ELEMENT_3D2N_H_INCLUDED ) -#define KRATOS_CR_BEAM_ELEMENT_3D2N_H_INCLUDED - - -#include "includes/element.h" -#include "includes/define.h" -#include "includes/variables.h" -#include "includes/serializer.h" - -namespace Kratos -{ - - class CrBeamElement3D2N : public Element - { - public: - KRATOS_CLASS_POINTER_DEFINITION(CrBeamElement3D2N); - - - typedef Element BaseType; - typedef BaseType::GeometryType GeometryType; - typedef BaseType::NodesArrayType NodesArrayType; - typedef BaseType::PropertiesType PropertiesType; - typedef BaseType::IndexType IndexType; - typedef BaseType::SizeType SizeType; - typedef BaseType::MatrixType MatrixType; - typedef BaseType::VectorType VectorType; - typedef BaseType::EquationIdVectorType EquationIdVectorType; - typedef BaseType::DofsVectorType DofsVectorType; - - - CrBeamElement3D2N(IndexType NewId, GeometryType::Pointer pGeometry, - bool rLinear = false); - CrBeamElement3D2N(IndexType NewId, GeometryType::Pointer pGeometry, - PropertiesType::Pointer pProperties, - bool rLinear = false); - - - ~CrBeamElement3D2N() override; - - - BaseType::Pointer Create( - IndexType NewId, - NodesArrayType const& rThisNodes, - PropertiesType::Pointer pProperties) const override; - - void EquationIdVector( - EquationIdVectorType& rResult, - ProcessInfo& rCurrentProcessInfo) override; - - void GetDofList( - DofsVectorType& rElementalDofList, - ProcessInfo& rCurrentProcessInfo) override; - - void Initialize() override; - - Matrix CreateElementStiffnessMatrix_Material(); - Matrix CreateElementStiffnessMatrix_Geometry(const Vector qe); - Matrix CalculateDeformationStiffness(); - Matrix CalculateTransformationS(); - - Vector CalculateElementForces(); - - void CalculateTransformationMatrix( - Matrix& rRotationMatrix); - - void CalculateInitialLocalCS(); - - Matrix UpdateRotationMatrixLocal(); - - void CalculateLocalSystem( - MatrixType& rLeftHandSideMatrix, - VectorType& rRightHandSideVector, - ProcessInfo& rCurrentProcessInfo) override; - - void CalculateRightHandSide( - VectorType& rRightHandSideVector, - ProcessInfo& rCurrentProcessInfo) override; - - void CalculateLeftHandSide( - MatrixType& rLeftHandSideMatrix, - ProcessInfo& rCurrentProcessInfo) override; - - void CalculateMassMatrix( - MatrixType& rMassMatrix, - ProcessInfo& rCurrentProcessInfo) override; - - void CalculateLumpedMassMatrix( - MatrixType& rMassMatrix, - ProcessInfo& rCurrentProcessInfo); - - void CalculateConsistentMassMatrix( - MatrixType& rMassMatrix, - ProcessInfo& rCurrentProcessInfo); - - void BuildSingleMassMatrix( - MatrixType& rMassMatrix, - const double Phi, const double CT, const double CR, const double L); - - void CalculateDampingMatrix( - MatrixType& rDampingMatrix, - ProcessInfo& rCurrentProcessInfo) override; - - void AddExplicitContribution(const VectorType& rRHSVector, - const Variable& rRHSVariable, - Variable >& rDestinationVariable, - const ProcessInfo& rCurrentProcessInfo) override; - - void GetValuesVector( - Vector& rValues, - int Step = 0) override; - - void GetSecondDerivativesVector( - Vector& rValues, - int Step = 0) override; - - void GetFirstDerivativesVector( - Vector& rValues, - int Step = 0) override; - - void AssembleSmallInBigMatrix(Matrix SmallMatrix, Matrix& BigMatrix); - - int Check(const ProcessInfo& rCurrentProcessInfo) override; - - - double CalculateCurrentLength(); - double CalculatePsi(const double I, const double A_eff); - double CalculateShearModulus(); - double CalculateReferenceLength(); - void UpdateIncrementDeformation(); - - Vector CalculateBodyForces(); - - void CalculateOnIntegrationPoints( - const Variable >& rVariable, - std::vector< array_1d >& rOutput, - const ProcessInfo& rCurrentProcessInfo) override; - - void GetValueOnIntegrationPoints( - const Variable >& rVariable, - std::vector< array_1d >& rOutput, - const ProcessInfo& rCurrentProcessInfo) override; - - void CalculateOnIntegrationPoints( - const Variable& rVariable, - std::vector< Vector >& rOutput, - const ProcessInfo& rCurrentProcessInfo) override; - - void GetValueOnIntegrationPoints( - const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo) override; - - - IntegrationMethod GetIntegrationMethod() const override; - - void CalculateAndAddWorkEquivalentNodalForcesLineLoad( - const Vector ForceInput, VectorType& rRightHandSideVector, - const double GeometryLength); - - private: - double mdPhi_x_a, mRotInertiaY, mRotInertiaZ; - Vector mNX, mNY, mNZ, mRHS, mTotalDef, mTotalPos; - Vector mTotalNodalDeformation, mTotalNodalPosistion, mBodyForces; - Vector mDeformationModes, mIncrementDeformation; - Matrix mLHS, mRotationMatrix, mRotationMatrix0; - Vector mNX0, mNY0, mNZ0; - Vector mQuaternionVEC_A, mQuaternionVEC_B; - double mQuaternionSCA_A, mQuaternionSCA_B; - Vector mPhiS, mPhiA; - Vector mNodalForces; - - int mIterationCount = 0; - bool mIsLinearElement = false; - bool mIsLumpedMassMatrix = false; - - CrBeamElement3D2N() {}; - - - - friend class Serializer; - void save(Serializer& rSerializer) const override; - void load(Serializer& rSerializer) override; - }; - - - class Orientation - { - public: - Orientation(array_1d& v1, const double theta = 0.00); - Orientation(array_1d& v1, array_1d& v2); - - - void CalculateRotationMatrix(Matrix& R); - void CalculateBasisVectors(array_1d& v1, - array_1d& v2, - array_1d& v3); - - Quaternion& GetQuaternion() { return morientation; } - - private: - Quaternion morientation; - }; - - -} - -#endif +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Klaus B. Sautter +// +// +// + +#if !defined(KRATOS_CR_BEAM_ELEMENT_3D2N_H_INCLUDED ) +#define KRATOS_CR_BEAM_ELEMENT_3D2N_H_INCLUDED + +// System includes + +// External includes + +// Project includes +#include "includes/element.h" +#include "includes/define.h" +#include "includes/variables.h" +#include "includes/serializer.h" + +namespace Kratos +{ + + class CrBeamElement3D2N : public Element + { + private: + //const values + static constexpr int msNumberOfNodes = 2; + static constexpr int msDimension = 3; + static constexpr unsigned int msLocalSize = msNumberOfNodes * msDimension; + static constexpr unsigned int msElementSize = msLocalSize * 2; + + public: + KRATOS_CLASS_POINTER_DEFINITION(CrBeamElement3D2N); + + + typedef Element BaseType; + typedef BaseType::GeometryType GeometryType; + typedef BaseType::NodesArrayType NodesArrayType; + typedef BaseType::PropertiesType PropertiesType; + typedef BaseType::IndexType IndexType; + typedef BaseType::SizeType SizeType; + typedef BaseType::MatrixType MatrixType; + typedef BaseType::VectorType VectorType; + typedef BaseType::EquationIdVectorType EquationIdVectorType; + typedef BaseType::DofsVectorType DofsVectorType; + + + CrBeamElement3D2N(IndexType NewId, GeometryType::Pointer pGeometry, + bool rLinear = false); + CrBeamElement3D2N(IndexType NewId, GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + bool rLinear = false); + + + ~CrBeamElement3D2N() override; + + + BaseType::Pointer Create( + IndexType NewId, + NodesArrayType const& rThisNodes, + PropertiesType::Pointer pProperties) const override; + + void EquationIdVector( + EquationIdVectorType& rResult, + ProcessInfo& rCurrentProcessInfo) override; + + void GetDofList( + DofsVectorType& rElementalDofList, + ProcessInfo& rCurrentProcessInfo) override; + + void Initialize() override; + + bounded_matrix CreateElementStiffnessMatrix_Material(); + bounded_matrix CreateElementStiffnessMatrix_Geometry(); + bounded_matrix CalculateDeformationStiffness(); + bounded_matrix CalculateTransformationS(); + + bounded_vector CalculateElementForces(); + + void CalculateTransformationMatrix( + bounded_matrix& rRotationMatrix); + + void CalculateInitialLocalCS(); + + bounded_matrix UpdateRotationMatrixLocal(); + + void CalculateLocalSystem( + MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) override; + + void CalculateRightHandSide( + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) override; + + void CalculateLeftHandSide( + MatrixType& rLeftHandSideMatrix, + ProcessInfo& rCurrentProcessInfo) override; + + void CalculateMassMatrix( + MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo) override; + + void CalculateLumpedMassMatrix( + MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo); + + void CalculateConsistentMassMatrix( + MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo); + + void BuildSingleMassMatrix( + MatrixType& rMassMatrix, + const double Phi, const double CT, const double CR, const double L); + + void CalculateDampingMatrix( + MatrixType& rDampingMatrix, + ProcessInfo& rCurrentProcessInfo) override; + + void AddExplicitContribution(const VectorType& rRHSVector, + const Variable& rRHSVariable, + Variable >& rDestinationVariable, + const ProcessInfo& rCurrentProcessInfo) override; + + void GetValuesVector( + Vector& rValues, + int Step = 0) override; + + void GetSecondDerivativesVector( + Vector& rValues, + int Step = 0) override; + + void GetFirstDerivativesVector( + Vector& rValues, + int Step = 0) override; + + void AssembleSmallInBigMatrix(Matrix SmallMatrix, bounded_matrix& BigMatrix); + + int Check(const ProcessInfo& rCurrentProcessInfo) override; + + + double CalculateCurrentLength(); + double CalculatePsi(const double I, const double A_eff); + double CalculateShearModulus(); + double CalculateReferenceLength(); + void UpdateIncrementDeformation(); + + bounded_vector CalculateBodyForces(); + + void CalculateOnIntegrationPoints( + const Variable >& rVariable, + std::vector< array_1d >& rOutput, + const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints( + const Variable >& rVariable, + std::vector< array_1d >& rOutput, + const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateOnIntegrationPoints( + const Variable& rVariable, + std::vector< Vector >& rOutput, + const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints( + const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) override; + + + IntegrationMethod GetIntegrationMethod() const override; + + void CalculateAndAddWorkEquivalentNodalForcesLineLoad( + const bounded_vector ForceInput, + bounded_vector& rRightHandSideVector, + const double GeometryLength); + + + void CalculateGeometricStiffnessMatrix(MatrixType& rGeometricStiffnessMatrix, + ProcessInfo& rCurrentProcessInfo); + + void CalculateElasticStiffnessMatrix(MatrixType& rElasticStiffnessMatrix, + ProcessInfo& rCurrentProcessInfo); + + private: + double mdPhi_x_a, mRotInertiaY, mRotInertiaZ; + Vector mNX, mNY, mNZ, mRHS, mTotalDef, mTotalPos; + Vector mTotalNodalDeformation, mTotalNodalPosistion, mBodyForces; + Vector mDeformationModes, mIncrementDeformation; + Matrix mLHS, mRotationMatrix; + bounded_matrix mRotationMatrix0; + Vector mNX0, mNY0, mNZ0; + Vector mQuaternionVEC_A, mQuaternionVEC_B; + double mQuaternionSCA_A, mQuaternionSCA_B; + Vector mPhiS, mPhiA; + Vector mNodalForces; + + int mIterationCount = 0; + bool mIsLinearElement = false; + bool mIsLumpedMassMatrix = false; + + CrBeamElement3D2N() {}; + + + + friend class Serializer; + void save(Serializer& rSerializer) const override; + void load(Serializer& rSerializer) override; + }; + + + class Orientation + { + private: + //const values + static constexpr int msDimension = 3; + + public: + Orientation(array_1d& v1, const double theta = 0.00); + Orientation(array_1d& v1, array_1d& v2); + + + void CalculateRotationMatrix(Matrix& R); + void CalculateBasisVectors(array_1d& v1, + array_1d& v2, + array_1d& v3); + + Quaternion& GetQuaternion() { return morientation; } + + private: + Quaternion morientation; + }; + + +} + +#endif diff --git a/applications/StructuralMechanicsApplication/custom_elements/membrane_element.hpp b/applications/StructuralMechanicsApplication/custom_elements/membrane_element.hpp index f274ae88d4ad..7ed2da917c78 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/membrane_element.hpp +++ b/applications/StructuralMechanicsApplication/custom_elements/membrane_element.hpp @@ -108,7 +108,7 @@ class MembraneElement std::vector mConstitutiveLawVector; - Geometry< Point<3,double> >::Pointer mpReferenceGeometry; + Geometry::Pointer mpReferenceGeometry; Vector mDetJ0; diff --git a/applications/StructuralMechanicsApplication/custom_elements/prestress_membrane_element.hpp b/applications/StructuralMechanicsApplication/custom_elements/prestress_membrane_element.hpp index 5776dac4ccd6..b159370517ad 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/prestress_membrane_element.hpp +++ b/applications/StructuralMechanicsApplication/custom_elements/prestress_membrane_element.hpp @@ -115,7 +115,7 @@ namespace Kratos std::vector mConstitutiveLawVector; - Geometry< Point<3, double> >::Pointer mpReferenceGeometry; + Geometry< Point >::Pointer mpReferenceGeometry; Vector mDetJ0; diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D3N.cpp b/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D3N.cpp new file mode 100644 index 000000000000..6d00d428afae --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D3N.cpp @@ -0,0 +1,2812 @@ +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Peter Wilson +// contact: A.Winterstein@tum.de +// + +#include "shell_thick_element_3D3N.hpp" +#include "custom_utilities/shellt3_corotational_coordinate_transformation.hpp" +#include "structural_mechanics_application_variables.h" + +#include "custom_constitutive/linear_elastic_orthotropic_2D_law.hpp" + +#include "geometries/triangle_3d_3.h" + +#include +#include + + +/* +Element overview:--------------------------------------------------------------- +This element represents a 3-node Shell element +based on the Discrete Shear Gap theory (DSG) by Bletzinger. +This element is formulated for small strains, +but can be used in Geometrically nonlinear problems +involving large displacements and rotations +using a Corotational Coordinate Transformation. +Material nonlinearity is handled by means of the cross section object. + +Shell formulation references:--------------------------------------------------- +1. Bletzinger, K.U., Bischoff, M. and Ramm, E., 2000. A unified approach for + shear-locking-free triangular and rectangular shell finite elements. + Computers & Structures, 75(3), pp.321-334. +2. Rama, G., Marinkovic, D., Zehn, M., 2016. Efficient co-rotational + 3-node shell element. American Journal of Engineering and Applied Sciences, + Volume 9, Issue 2, Pages 420-431. +*/ + +namespace Kratos +{ + namespace Utilities + { + inline void InterpToStandardGaussPoints(double& v1, double& v2, + double& v3) + { + double vg1 = v1; + double vg2 = v2; + double vg3 = v3; +#ifdef OPT_AVERAGE_RESULTS + v1 = (vg1 + vg2 + vg3) / 3.0; + v2 = (vg1 + vg2 + vg3) / 3.0; + v3 = (vg1 + vg2 + vg3) / 3.0; +#else + v1 = (2.0*vg1) / 3.0 - vg2 / 3.0 + (2.0*vg3) / 3.0; + v2 = (2.0*vg1) / 3.0 + (2.0*vg2) / 3.0 - vg3 / 3.0; + v3 = (2.0*vg2) / 3.0 - vg1 / 3.0 + (2.0*vg3) / 3.0; +#endif // OPT_AVERAGE_RESULTS + } + + inline void InterpToStandardGaussPoints(std::vector< double >& v) + { + if (v.size() != 3) return; + InterpToStandardGaussPoints(v[0], v[1], v[2]); + } + + inline void InterpToStandardGaussPoints(std::vector< array_1d >& v) + { + if (v.size() != 3) return; + for (size_t i = 0; i < 3; i++) + InterpToStandardGaussPoints(v[0][i], v[1][i], v[2][i]); + } + + inline void InterpToStandardGaussPoints(std::vector< array_1d >& v) + { + if (v.size() != 3) return; + for (size_t i = 0; i < 6; i++) + InterpToStandardGaussPoints(v[0][i], v[1][i], v[2][i]); + } + + inline void InterpToStandardGaussPoints(std::vector< Vector >& v) + { + if (v.size() != 3) return; + size_t ncomp = v[0].size(); + for (int i = 1; i < 3; i++) + if (v[i].size() != ncomp) + return; + for (size_t i = 0; i < ncomp; i++) + InterpToStandardGaussPoints(v[0][i], v[1][i], v[2][i]); + } + + inline void InterpToStandardGaussPoints(std::vector< Matrix >& v) + { + if (v.size() != 3) return; + size_t nrows = v[0].size1(); + size_t ncols = v[0].size2(); + for (int i = 1; i < 3; i++) + if (v[i].size1() != nrows || v[i].size2() != ncols) + return; + for (size_t i = 0; i < nrows; i++) + for (size_t j = 0; j < ncols; j++) + InterpToStandardGaussPoints + (v[0](i, j), v[1](i, j), v[2](i, j)); + } + } + + // ========================================================================= + // + // Definitions + // + // ========================================================================= + + #define OPT_NUM_NODES 3 + #define OPT_STRAIN_SIZE 6 + #define OPT_NUM_DOFS 18 + + //---------------------------------------- + // preprocessors for the integration + // method used by this element. + + //#define OPT_1_POINT_INTEGRATION + + #ifdef OPT_1_POINT_INTEGRATION + #define OPT_INTEGRATION_METHOD Kratos::GeometryData::GI_GAUSS_1 + #define OPT_NUM_GP 1 + #else + #define OPT_INTEGRATION_METHOD Kratos::GeometryData::GI_GAUSS_2 + #define OPT_NUM_GP 3 + #endif // OPT_1_POINT_INTEGRATION + + //---------------------------------------- + // preprocessors to handle the output + // in case of 3 integration points + + //#define OPT_USES_INTERIOR_GAUSS_POINTS + + #ifdef OPT_1_POINT_INTEGRATION + #define OPT_INTERPOLATE_RESULTS_TO_STANDARD_GAUSS_POINTS(X) + #else + #ifdef OPT_USES_INTERIOR_GAUSS_POINTS + #define OPT_INTERPOLATE_RESULTS_TO_STANDARD_GAUSS_POINTS(X) + #else + #define OPT_INTERPOLATE_RESULTS_TO_STANDARD_GAUSS_POINTS(X) Utilities::InterpToStandardGaussPoints(X) + #endif // OPT_USES_INTERIOR_GAUSS_POINTS + #endif // OPT_1_POINT_INTEGRATION + + // ========================================================================= + // + // CalculationData + // + // ========================================================================= + + ShellThickElement3D3N::CalculationData::CalculationData + (const CoordinateTransformationBasePointerType& pCoordinateTransformation, + const ProcessInfo& rCurrentProcessInfo) + : LCS0(pCoordinateTransformation->CreateReferenceCoordinateSystem()) + , LCS(pCoordinateTransformation->CreateLocalCoordinateSystem()) + , CurrentProcessInfo(rCurrentProcessInfo) + + { + } + + // ========================================================================= + // + // Class ShellThickElement3D3N + // + // ========================================================================= + + ShellThickElement3D3N::ShellThickElement3D3N(IndexType NewId, + GeometryType::Pointer pGeometry, + bool NLGeom) + : Element(NewId, pGeometry) + , mpCoordinateTransformation(NLGeom ? + new ShellT3_CorotationalCoordinateTransformation(pGeometry) : + new ShellT3_CoordinateTransformation(pGeometry)) + { + mThisIntegrationMethod = OPT_INTEGRATION_METHOD; + } + + ShellThickElement3D3N::ShellThickElement3D3N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + bool NLGeom) + : Element(NewId, pGeometry, pProperties) + , mpCoordinateTransformation(NLGeom ? + new ShellT3_CorotationalCoordinateTransformation(pGeometry) : + new ShellT3_CoordinateTransformation(pGeometry)) + { + mThisIntegrationMethod = OPT_INTEGRATION_METHOD; + } + + ShellThickElement3D3N::ShellThickElement3D3N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + CoordinateTransformationBasePointerType pCoordinateTransformation) + : Element(NewId, pGeometry, pProperties) + , mpCoordinateTransformation(pCoordinateTransformation) + { + mThisIntegrationMethod = OPT_INTEGRATION_METHOD; + } + + ShellThickElement3D3N::~ShellThickElement3D3N() + { + } + + Element::Pointer ShellThickElement3D3N::Create(IndexType NewId, + NodesArrayType const& ThisNodes, + PropertiesType::Pointer pProperties) const + { + GeometryType::Pointer newGeom(GetGeometry().Create(ThisNodes)); + return boost::make_shared< ShellThickElement3D3N >(NewId, newGeom, + pProperties, mpCoordinateTransformation->Create(newGeom)); + } + + ShellThickElement3D3N::IntegrationMethod + ShellThickElement3D3N::GetIntegrationMethod() const + { + return mThisIntegrationMethod; + } + + void ShellThickElement3D3N::Initialize() + { + KRATOS_TRY + + const GeometryType & geom = GetGeometry(); + PropertiesType & props = GetProperties(); + + if (geom.PointsNumber() != OPT_NUM_NODES) + KRATOS_THROW_ERROR(std::logic_error, + "ShellThickElement3D3N Element - Wrong number of nodes", + geom.PointsNumber()); + + const GeometryType::IntegrationPointsArrayType & integrationPoints = + geom.IntegrationPoints(GetIntegrationMethod()); + + if (integrationPoints.size() != OPT_NUM_GP) + KRATOS_THROW_ERROR(std::logic_error, + "ShellThickElement3D3N Element - Wrong integration scheme", + integrationPoints.size()); + + if (mSections.size() != OPT_NUM_GP) + { + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + + ShellCrossSection::Pointer theSection; + if (props.Has(SHELL_CROSS_SECTION)) + { + theSection = props[SHELL_CROSS_SECTION]; + } + else if (theSection->CheckIsOrthotropic(props)) + { + // make new instance of shell cross section + theSection = ShellCrossSection::Pointer(new ShellCrossSection()); + + // Assign orthotropic material law for entire element + LinearElasticOrthotropic2DLaw OrthoLaw; + props.SetValue(CONSTITUTIVE_LAW, OrthoLaw.Clone()); + + // Parse material properties for each layer + Element* thisElement = this; + theSection->ParseOrthotropicPropertyMatrix(props, thisElement); + } + else + { + theSection = ShellCrossSection::Pointer(new ShellCrossSection()); + theSection->BeginStack(); + theSection-> + AddPly(props[THICKNESS], 0.0, 5, this->pGetProperties()); + theSection->EndStack(); + } + + mSections.clear(); + for (int i = 0; i < OPT_NUM_GP; i++) + { + ShellCrossSection::Pointer sectionClone = theSection->Clone(); + sectionClone->SetSectionBehavior(ShellCrossSection::Thick); + sectionClone->InitializeCrossSection(props, geom, + row(shapeFunctionsValues, i)); + mSections.push_back(sectionClone); + } + } + + mpCoordinateTransformation->Initialize(); + + this->SetupOrientationAngles(); + + KRATOS_CATCH("") + } + + void ShellThickElement3D3N::ResetConstitutiveLaw() + { + KRATOS_TRY + + const GeometryType & geom = GetGeometry(); + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + + const Properties& props = GetProperties(); + for (SizeType i = 0; i < mSections.size(); i++) + mSections[i]->ResetCrossSection(props, geom, + row(shapeFunctionsValues, i)); + + KRATOS_CATCH("") + } + + void ShellThickElement3D3N::EquationIdVector(EquationIdVectorType& rResult, + ProcessInfo& rCurrentProcessInfo) + { + if (rResult.size() != OPT_NUM_DOFS) + rResult.resize(OPT_NUM_DOFS, false); + + GeometryType & geom = this->GetGeometry(); + + for (SizeType i = 0; i < geom.size(); i++) + { + int index = i * 6; + NodeType & iNode = geom[i]; + + rResult[index] = iNode.GetDof(DISPLACEMENT_X).EquationId(); + rResult[index + 1] = iNode.GetDof(DISPLACEMENT_Y).EquationId(); + rResult[index + 2] = iNode.GetDof(DISPLACEMENT_Z).EquationId(); + + rResult[index + 3] = iNode.GetDof(ROTATION_X).EquationId(); + rResult[index + 4] = iNode.GetDof(ROTATION_Y).EquationId(); + rResult[index + 5] = iNode.GetDof(ROTATION_Z).EquationId(); + } + } + + void ShellThickElement3D3N::GetDofList(DofsVectorType& ElementalDofList, + ProcessInfo& CurrentProcessInfo) + { + ElementalDofList.resize(0); + ElementalDofList.reserve(OPT_NUM_DOFS); + + GeometryType & geom = this->GetGeometry(); + + for (SizeType i = 0; i < geom.size(); i++) + { + NodeType & iNode = geom[i]; + + ElementalDofList.push_back(iNode.pGetDof(DISPLACEMENT_X)); + ElementalDofList.push_back(iNode.pGetDof(DISPLACEMENT_Y)); + ElementalDofList.push_back(iNode.pGetDof(DISPLACEMENT_Z)); + + ElementalDofList.push_back(iNode.pGetDof(ROTATION_X)); + ElementalDofList.push_back(iNode.pGetDof(ROTATION_Y)); + ElementalDofList.push_back(iNode.pGetDof(ROTATION_Z)); + } + } + + int ShellThickElement3D3N::Check(const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY + + GeometryType& geom = GetGeometry(); + + // verify that the variables are correctly initialized + if (DISPLACEMENT.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "DISPLACEMENT has Key zero! (check if the application is correctly registered", ""); + + if (ROTATION.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "ROTATION has Key zero! (check if the application is correctly registered", ""); + + if (VELOCITY.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "VELOCITY has Key zero! (check if the application is correctly registered", ""); + + if (ACCELERATION.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "ACCELERATION has Key zero! (check if the application is correctly registered", ""); + + if (DENSITY.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "DENSITY has Key zero! (check if the application is correctly registered", ""); + + if (SHELL_CROSS_SECTION.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "SHELL_CROSS_SECTION has Key zero! (check if the application is correctly registered", ""); + + if (THICKNESS.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "THICKNESS has Key zero! (check if the application is correctly registered", ""); + + if (CONSTITUTIVE_LAW.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "CONSTITUTIVE_LAW has Key zero! (check if the application is correctly registered", ""); + + // verify that the dofs exist + for (unsigned int i = 0; i < geom.size(); i++) + { + if (geom[i].SolutionStepsDataHas(DISPLACEMENT) == false) + KRATOS_THROW_ERROR(std::invalid_argument, + "missing variable DISPLACEMENT on node ", geom[i].Id()); + + if (geom[i].HasDofFor(DISPLACEMENT_X) == false || + geom[i].HasDofFor(DISPLACEMENT_Y) == false || + geom[i].HasDofFor(DISPLACEMENT_Z) == false) + KRATOS_THROW_ERROR(std::invalid_argument, + "missing one of the dofs for the variable DISPLACEMENT on node ", + GetGeometry()[i].Id()); + + if (geom[i].SolutionStepsDataHas(ROTATION) == false) + KRATOS_THROW_ERROR(std::invalid_argument, + "missing variable ROTATION on node ", geom[i].Id()); + + if (geom[i].HasDofFor(ROTATION_X) == false || + geom[i].HasDofFor(ROTATION_Y) == false || + geom[i].HasDofFor(ROTATION_Z) == false) + KRATOS_THROW_ERROR(std::invalid_argument, + "missing one of the dofs for the variable ROTATION on node ", + geom[i].Id()); + + if (geom[i].GetBufferSize() < 2) + KRATOS_THROW_ERROR(std::logic_error, + "This Element needs at least a buffer size = 2", ""); + } + + // check properties + if (this->pGetProperties() == NULL) + KRATOS_THROW_ERROR(std::logic_error, + "Properties not provided for element ", this->Id()); + + const PropertiesType & props = this->GetProperties(); + + if (props.Has(SHELL_CROSS_SECTION)) + { + // if the user specified a cross section ... + + const ShellCrossSection::Pointer & section = + props[SHELL_CROSS_SECTION]; + if (section == NULL) + KRATOS_THROW_ERROR(std::logic_error, + "SHELL_CROSS_SECTION not provided for element ", this->Id()); + + section->Check(props, geom, rCurrentProcessInfo); + } + else if (props.Has(SHELL_ORTHOTROPIC_LAYERS)) + { + // perform orthotropic check later in shell_cross_section + } + else + { + // ... allow the automatic creation of a homogeneous section from a + // material and a thickness + + if (!props.Has(CONSTITUTIVE_LAW)) + KRATOS_THROW_ERROR(std::logic_error, + "CONSTITUTIVE_LAW not provided for element ", this->Id()); + + const ConstitutiveLaw::Pointer& claw = props[CONSTITUTIVE_LAW]; + if (claw == NULL) + KRATOS_THROW_ERROR(std::logic_error, + "CONSTITUTIVE_LAW not provided for element ", this->Id()); + + if (!props.Has(THICKNESS)) + KRATOS_THROW_ERROR(std::logic_error, + "THICKNESS not provided for element ", this->Id()); + + if (props[THICKNESS] <= 0.0) + KRATOS_THROW_ERROR(std::logic_error, + "wrong THICKNESS value provided for element ", this->Id()); + + ShellCrossSection::Pointer dummySection = + ShellCrossSection::Pointer(new ShellCrossSection()); + dummySection->BeginStack(); + dummySection->AddPly(props[THICKNESS], 0.0, 5, + this->pGetProperties()); + dummySection->EndStack(); + dummySection->SetSectionBehavior(ShellCrossSection::Thick); + dummySection->Check(props, geom, rCurrentProcessInfo); + } + + return 0; + + KRATOS_CATCH("") + } + + void ShellThickElement3D3N::GetValuesVector(Vector& values, int Step) + { + if (values.size() != OPT_NUM_DOFS) + values.resize(OPT_NUM_DOFS, false); + + const GeometryType & geom = GetGeometry(); + + for (SizeType i = 0; i < geom.size(); i++) + { + const NodeType & iNode = geom[i]; + const array_1d& disp = + iNode.FastGetSolutionStepValue(DISPLACEMENT, Step); + const array_1d& rot = + iNode.FastGetSolutionStepValue(ROTATION, Step); + + int index = i * 6; + values[index] = disp[0]; + values[index + 1] = disp[1]; + values[index + 2] = disp[2]; + + values[index + 3] = rot[0]; + values[index + 4] = rot[1]; + values[index + 5] = rot[2]; + } + } + + void ShellThickElement3D3N::GetFirstDerivativesVector(Vector& values, + int Step) + { + if (values.size() != OPT_NUM_DOFS) + values.resize(OPT_NUM_DOFS, false); + + const GeometryType & geom = GetGeometry(); + + for (SizeType i = 0; i < geom.size(); i++) + { + const NodeType & iNode = geom[i]; + const array_1d& vel = + iNode.FastGetSolutionStepValue(VELOCITY, Step); + + int index = i * 6; + values[index] = vel[0]; + values[index + 1] = vel[1]; + values[index + 2] = vel[2]; + values[index + 3] = 0.0; + values[index + 4] = 0.0; + values[index + 5] = 0.0; + } + } + + void ShellThickElement3D3N::GetSecondDerivativesVector(Vector& values, + int Step) + { + if (values.size() != OPT_NUM_DOFS) + values.resize(OPT_NUM_DOFS, false); + + const GeometryType & geom = GetGeometry(); + + for (SizeType i = 0; i < geom.size(); i++) + { + const NodeType & iNode = geom[i]; + const array_1d& acc = + iNode.FastGetSolutionStepValue(ACCELERATION, Step); + + int index = i * 6; + values[index] = acc[0]; + values[index + 1] = acc[1]; + values[index + 2] = acc[2]; + values[index + 3] = 0.0; + values[index + 4] = 0.0; + values[index + 5] = 0.0; + } + } + + void ShellThickElement3D3N::InitializeNonLinearIteration + (ProcessInfo& CurrentProcessInfo) + { + mpCoordinateTransformation-> + InitializeNonLinearIteration(CurrentProcessInfo); + + const GeometryType & geom = this->GetGeometry(); + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + for (SizeType i = 0; i < mSections.size(); i++) + mSections[i]->InitializeNonLinearIteration(GetProperties(), geom, + row(shapeFunctionsValues, i), CurrentProcessInfo); + } + + void ShellThickElement3D3N::FinalizeNonLinearIteration(ProcessInfo& CurrentProcessInfo) + { + mpCoordinateTransformation->FinalizeNonLinearIteration(CurrentProcessInfo); + + const GeometryType & geom = this->GetGeometry(); + const Matrix & shapeFunctionsValues = geom.ShapeFunctionsValues(GetIntegrationMethod()); + for (SizeType i = 0; i < mSections.size(); i++) + mSections[i]->FinalizeNonLinearIteration(GetProperties(), geom, row(shapeFunctionsValues, i), CurrentProcessInfo); + } + + void ShellThickElement3D3N::InitializeSolutionStep(ProcessInfo& CurrentProcessInfo) + { + PropertiesType& props = GetProperties(); + const GeometryType & geom = GetGeometry(); + const Matrix & shapeFunctionsValues = geom.ShapeFunctionsValues(GetIntegrationMethod()); + + for (SizeType i = 0; i < mSections.size(); i++) + mSections[i]->InitializeSolutionStep(props, geom, row(shapeFunctionsValues, i), CurrentProcessInfo); + + mpCoordinateTransformation->InitializeSolutionStep(CurrentProcessInfo); + } + + void ShellThickElement3D3N::FinalizeSolutionStep(ProcessInfo& CurrentProcessInfo) + { + const PropertiesType& props = GetProperties(); + const GeometryType& geom = GetGeometry(); + const Matrix & shapeFunctionsValues = geom.ShapeFunctionsValues(GetIntegrationMethod()); + + for (SizeType i = 0; i < mSections.size(); i++) + mSections[i]->FinalizeSolutionStep(props, geom, row(shapeFunctionsValues, i), CurrentProcessInfo); + + mpCoordinateTransformation->FinalizeSolutionStep(CurrentProcessInfo); + } + + void ShellThickElement3D3N::CalculateMassMatrix(MatrixType& rMassMatrix, ProcessInfo& rCurrentProcessInfo) + { + if ((rMassMatrix.size1() != OPT_NUM_DOFS) || (rMassMatrix.size2() != OPT_NUM_DOFS)) + rMassMatrix.resize(OPT_NUM_DOFS, OPT_NUM_DOFS, false); + noalias(rMassMatrix) = ZeroMatrix(OPT_NUM_DOFS, OPT_NUM_DOFS); + + // Compute the local coordinate system. + ShellT3_LocalCoordinateSystem referenceCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Average mass per unit area over the whole element + double av_mass_per_unit_area = 0.0; + for (size_t i = 0; i < OPT_NUM_GP; i++) + av_mass_per_unit_area += mSections[i]->CalculateMassPerUnitArea(); + av_mass_per_unit_area /= double(OPT_NUM_GP); + + // Flag for consistent or lumped mass matrix + bool bconsistent_matrix = false; + + // Consistent mass matrix + if (bconsistent_matrix) + { + // General matrix form as per Felippa plane stress CST eqn 31.27: + // http://kis.tu.kielce.pl/mo/COLORADO_FEM/colorado/IFEM.Ch31.pdf + // + // Density and thickness are averaged over element. + + // Average thickness over the whole element + double thickness = 0.0; + for (size_t i = 0; i < OPT_NUM_GP; i++) + thickness += mSections[i]->GetThickness(); + thickness /= double(OPT_NUM_GP); + + // Populate mass matrix with integation results + for (size_t row = 0; row < 18; row++) + { + if (row % 6 < 3) + { + // translational entry + for (size_t col = 0; col < 3; col++) + { + rMassMatrix(row, 6 * col + row % 6) = 1.0; + } + } + else + { + // rotational entry + for (size_t col = 0; col < 3; col++) + { + rMassMatrix(row, 6 * col + row % 6) = + thickness*thickness / 12.0; + } + } + + // Diagonal entry + rMassMatrix(row, row) *= 2.0; + } + + rMassMatrix *= + av_mass_per_unit_area*referenceCoordinateSystem.Area() / 12.0; + }// Consistent mass matrix + else + { + // Lumped mass matrix + + // lumped area + double lump_area = referenceCoordinateSystem.Area() / 3.0; + + // loop on nodes + for (size_t i = 0; i < 3; i++) + { + size_t index = i * 6; + + double nodal_mass = av_mass_per_unit_area * lump_area; + + // translational mass + rMassMatrix(index, index) = nodal_mass; + rMassMatrix(index + 1, index + 1) = nodal_mass; + rMassMatrix(index + 2, index + 2) = nodal_mass; + + // rotational mass - neglected for the moment... + } + }// Lumped mass matrix + } + + void ShellThickElement3D3N::CalculateDampingMatrix(MatrixType& rDampingMatrix, ProcessInfo& rCurrentProcessInfo) + { + if ((rDampingMatrix.size1() != OPT_NUM_DOFS) || (rDampingMatrix.size2() != OPT_NUM_DOFS)) + rDampingMatrix.resize(OPT_NUM_DOFS, OPT_NUM_DOFS, false); + + noalias(rDampingMatrix) = ZeroMatrix(OPT_NUM_DOFS, OPT_NUM_DOFS); + } + + void ShellThickElement3D3N::CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) + { + CalculateAll(rLeftHandSideMatrix, rRightHandSideVector, rCurrentProcessInfo, true, true); + } + + void ShellThickElement3D3N::CalculateRightHandSide(VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) + { + Matrix dummy; + CalculateAll(dummy, rRightHandSideVector, rCurrentProcessInfo, true, true); + } + + // ===================================================================================== + // + // Class ShellThickElement3D3N - Results on Gauss Points + // + // ===================================================================================== + + void ShellThickElement3D3N::GetValueOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + // resize output + if (rValues.size() != OPT_NUM_GP) + rValues.resize(OPT_NUM_GP); + + + int caseId = -1; + if (rVariable == TSAI_WU_RESERVE_FACTOR) + { + caseId = 10; + } + else if (rVariable == VON_MISES_STRESS || + rVariable == VON_MISES_STRESS_TOP_SURFACE || + rVariable == VON_MISES_STRESS_MIDDLE_SURFACE || + rVariable == VON_MISES_STRESS_BOTTOM_SURFACE) + { + caseId = 20; + } + else if (rVariable == SHELL_ELEMENT_MEMBRANE_ENERGY || + SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION || + SHELL_ELEMENT_BENDING_ENERGY || + SHELL_ELEMENT_BENDING_ENERGY_FRACTION || + SHELL_ELEMENT_SHEAR_ENERGY || + SHELL_ELEMENT_SHEAR_ENERGY_FRACTION) + { + caseId = 30; + } + + if (caseId > 19) // calculate stresses + { + // Initialize common calculation variables + CalculationData data(mpCoordinateTransformation, rCurrentProcessInfo); + data.CalculateLHS = true; + data.CalculateRHS = true; + InitializeCalculationData(data); + + // Get the current displacements in global coordinate system and + // transform to reference local system + ShellT3_LocalCoordinateSystem referenceCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + MatrixType Rdisp(18, 18); + referenceCoordinateSystem.ComputeTotalRotationMatrix(Rdisp); + data.localDisplacements = prod(Rdisp, data.globalDisplacements); + + // Get strains + noalias(data.generalizedStrains) = prod(data.B, data.localDisplacements); + + // Calculate the response of the Cross Section - setup for 1 GP + data.gpIndex = 0; + ShellCrossSection::Pointer & section = mSections[0]; + CalculateSectionResponse(data); + data.generalizedStresses = prod(data.D, data.generalizedStrains); + // (perform the calculation manually (outside material law) to + // ensure stabilization is used on the transverse shear part + // of the material matrix + + + double resultDouble = 0.0; + + if (caseId == 30) + { + // Energy calcs - these haven't been verified or tested yet. + CalculateShellElementEnergy(data, rVariable, resultDouble); + } + else if (caseId == 20) + { + //Von mises calcs + + // recover stresses + CalculateStressesFromForceResultants(data.generalizedStresses, + section->GetThickness()); + + // account for orientation + if (section->GetOrientationAngle() != 0.0) + { + Matrix R(8, 8); + section->GetRotationMatrixForGeneralizedStresses + (-(section->GetOrientationAngle()), R); + data.generalizedStresses = prod(R, data.generalizedStresses); + } + + CalculateVonMisesStress(data, rVariable, resultDouble); + } + else + { + KRATOS_ERROR << + "Error: ELEMENT ShellThinElement3D4N, METHOD GetValueOnIntegrationPoints(double)" + << std::endl; + } + + // loop over gauss points - for output only + for (unsigned int gauss_point = 0; gauss_point < OPT_NUM_GP; ++gauss_point) + { + // store the result calculated + rValues[gauss_point] = resultDouble; + } + } + else if (rVariable == TSAI_WU_RESERVE_FACTOR) + { + // resize output + if (rValues.size() != OPT_NUM_GP) + rValues.resize(OPT_NUM_GP); + + // Initialize common calculation variables + CalculationData data(mpCoordinateTransformation, rCurrentProcessInfo); + data.CalculateLHS = true; + data.CalculateRHS = true; + InitializeCalculationData(data); + data.gpIndex = 0; + + // Get the current displacements in global coordinate system and + // transform to reference local system + ShellT3_LocalCoordinateSystem referenceCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + MatrixType Rdisp(18, 18); + referenceCoordinateSystem.ComputeTotalRotationMatrix(Rdisp); + data.localDisplacements = prod(Rdisp, data.globalDisplacements); + + // Get strains + noalias(data.generalizedStrains) = prod(data.B, data.localDisplacements); + + // Get all laminae strengths + PropertiesType & props = GetProperties(); + ShellCrossSection::Pointer & section = mSections[0]; + std::vector Laminae_Strengths = + std::vector(section->NumberOfPlies()); + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + Laminae_Strengths[ply].resize(3, 3, 0.0); + Laminae_Strengths[ply].clear(); + } + section->GetLaminaeStrengths(Laminae_Strengths, props); + + // Define variables + Matrix R(8, 8); + + // Retrieve ply orientations + Vector ply_orientation(section->NumberOfPlies()); + section->GetLaminaeOrientation(ply_orientation); + double total_rotation = 0.0; + + //Calculate lamina stresses + CalculateLaminaStrains(data); + CalculateLaminaStresses(data); + + // Rotate lamina stress to lamina material principal directions + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + total_rotation = -ply_orientation[ply] - (section->GetOrientationAngle()); + section->GetRotationMatrixForGeneralizedStresses(total_rotation, R); + //top surface of current ply + data.rlaminateStresses[2 * ply] = prod(R, data.rlaminateStresses[2 * ply]); + //bottom surface of current ply + data.rlaminateStresses[2 * ply + 1] = prod(R, data.rlaminateStresses[2 * ply + 1]); + } + + // Calculate Tsai-Wu criterion for each ply, take min of all plies + double min_tsai_wu = 0.0; + double temp_tsai_wu = 0.0; + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + temp_tsai_wu = CalculateTsaiWuPlaneStress(data, Laminae_Strengths[ply], ply); + if (ply == 0) + { + min_tsai_wu = temp_tsai_wu; + } + else if (temp_tsai_wu < min_tsai_wu) + { + min_tsai_wu = temp_tsai_wu; + } + } + + // Gauss Loop + for (unsigned int gauss_point = 0; gauss_point < OPT_NUM_GP; ++gauss_point) + { + // Output min Tsai-Wu result + rValues[gauss_point] = min_tsai_wu; + + }// Gauss loop + + } // Tsai wu + else + { + for (int i = 0; i < OPT_NUM_GP; i++) + mSections[i]->GetValue(rVariable, rValues[i]); + } + + OPT_INTERPOLATE_RESULTS_TO_STANDARD_GAUSS_POINTS(rValues); + } + + void ShellThickElement3D3N::GetValueOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + if (rVariable == LOCAL_AXIS_VECTOR_1) + { + // LOCAL_AXIS_VECTOR_1 output DOES NOT include the effect of section + // orientation, which rotates the entrire element section in-plane + // and is used in element stiffness calculation. + + // resize output + if (rValues.size() != OPT_NUM_GP) + rValues.resize(OPT_NUM_GP); + + for (int i = 0; i < OPT_NUM_GP; ++i) rValues[i] = ZeroVector(3); + // Initialize common calculation variables + ShellT3_LocalCoordinateSystem localCoordinateSystem(mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + for (size_t GP = 0; GP < 1; GP++) + { + rValues[GP] = localCoordinateSystem.Vx(); + } + } + else if (rVariable == ORTHOTROPIC_FIBER_ORIENTATION_1) + { + // ORTHOTROPIC_FIBER_ORIENTATION_1 output DOES include the effect of + // section orientation, which rotates the entrire element section + // in-plane and is used in the element stiffness calculation. + + // resize output + if (rValues.size() != OPT_NUM_GP) + rValues.resize(OPT_NUM_GP); + + for (int i = 0; i < OPT_NUM_GP; ++i) rValues[i] = ZeroVector(3); + + // Initialize common calculation variables + // Compute the local coordinate system. + ShellT3_LocalCoordinateSystem localCoordinateSystem(mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Get local axis 1 in flattened LCS space + Vector3 localAxis1 = localCoordinateSystem.P2() - localCoordinateSystem.P1(); + + // Perform rotation of local axis 1 to fiber1 in flattened LCS space + Matrix localToFiberRotation = Matrix(3, 3, 0.0); + double fiberSectionRotation = mSections[0]->GetOrientationAngle(); + double c = std::cos(fiberSectionRotation); + double s = std::sin(fiberSectionRotation); + localToFiberRotation(0, 0) = c; + localToFiberRotation(0, 1) = -s; + localToFiberRotation(1, 0) = s; + localToFiberRotation(1, 1) = c; + localToFiberRotation(2, 2) = 1.0; + + Vector3 temp = prod(localToFiberRotation, localAxis1); + + // Transform result back to global cartesian coords and normalize + Matrix localToGlobalSmall = localCoordinateSystem.Orientation(); + Vector3 fiberAxis1 = prod(trans(localToGlobalSmall), temp); + fiberAxis1 /= std::sqrt(inner_prod(fiberAxis1, fiberAxis1)); + + //write results + for (size_t dir = 0; dir < 1; dir++) + { + rValues[dir] = fiberAxis1; + } + } + } + + void ShellThickElement3D3N::GetValueOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + if (TryGetValueOnIntegrationPoints_GeneralizedStrainsOrStresses(rVariable, rValues, rCurrentProcessInfo)) return; + } + + void ShellThickElement3D3N::GetValueOnIntegrationPoints(const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + if (TryGetValueOnIntegrationPoints_MaterialOrientation(rVariable, rValues, rCurrentProcessInfo)) return; + } + + void ShellThickElement3D3N::GetValueOnIntegrationPoints(const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + } + + void ShellThickElement3D3N::CalculateOnIntegrationPoints(const Variable& rVariable, std::vector& rValues, const ProcessInfo & rCurrentProcessInfo) + { + GetValueOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + } + + void ShellThickElement3D3N::CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + + GetValueOnIntegrationPoints(rVariable, rOutput, rCurrentProcessInfo); + + KRATOS_CATCH(""); + } + + void ShellThickElement3D3N::CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + GetValueOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + } + + void ShellThickElement3D3N::CalculateOnIntegrationPoints(const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + GetValueOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + } + + void ShellThickElement3D3N::CalculateOnIntegrationPoints(const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + GetValueOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + } + + void ShellThickElement3D3N::Calculate(const Variable& rVariable, Matrix & Output, const ProcessInfo & rCurrentProcessInfo) + { + if (rVariable == LOCAL_ELEMENT_ORIENTATION) + { + Output.resize(3, 3, false); + + // Compute the local coordinate system. + ShellT3_LocalCoordinateSystem localCoordinateSystem(mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + Output = localCoordinateSystem.Orientation(); + } + } + + void ShellThickElement3D3N::Calculate(const Variable& rVariable, double & rotationAngle, const ProcessInfo & rCurrentProcessInfo) + { + if (rVariable == ORTHOTROPIC_ORIENTATION_ASSIGNMENT) + { + if (rotationAngle != 0.0) + { + mOrthotropicSectionRotation = rotationAngle; + } + } + } + + void ShellThickElement3D3N::SetCrossSectionsOnIntegrationPoints(std::vector< ShellCrossSection::Pointer >& crossSections) + { + KRATOS_TRY + if (crossSections.size() != OPT_NUM_GP) + KRATOS_THROW_ERROR(std::logic_error, "The number of cross section is wrong", crossSections.size()); + mSections.clear(); + for (SizeType i = 0; i < crossSections.size(); i++) + mSections.push_back(crossSections[i]); + this->SetupOrientationAngles(); + KRATOS_CATCH("") + } + + // ===================================================================================== + // + // Class ShellThickElement3D3N - Private methods + // + // ===================================================================================== + + void ShellThickElement3D3N::CalculateStressesFromForceResultants + (VectorType& rstresses, const double& rthickness) + { + // Refer http://www.colorado.edu/engineering/CAS/courses.d/AFEM.d/AFEM.Ch20.d/AFEM.Ch20.pdf + + // membrane forces -> in-plane stresses (av. across whole thickness) + rstresses[0] /= rthickness; + rstresses[1] /= rthickness; + rstresses[2] /= rthickness; + + // bending moments -> peak in-plane stresses (@ top and bottom surface) + rstresses[3] *= 6.0 / (rthickness*rthickness); + rstresses[4] *= 6.0 / (rthickness*rthickness); + rstresses[5] *= 6.0 / (rthickness*rthickness); + + // shear forces -> peak shear stresses (@ midsurface) + rstresses[6] *= 1.5 / rthickness; + rstresses[7] *= 1.5 / rthickness; + } + + void ShellThickElement3D3N::CalculateLaminaStrains(CalculationData& data) + { + ShellCrossSection::Pointer& section = mSections[data.gpIndex]; + + // Get laminate properties + double thickness = section->GetThickness(); + double z_current = thickness / -2.0; // start from the top of the 1st layer + + // Establish current strains at the midplane + // (element coordinate system) + double e_x = data.generalizedStrains[0]; + double e_y = data.generalizedStrains[1]; + double e_xy = data.generalizedStrains[2]; //this is still engineering + //strain (2xtensorial shear) + double kap_x = data.generalizedStrains[3]; + double kap_y = data.generalizedStrains[4]; + double kap_xy = data.generalizedStrains[5]; //this is still engineering + //strain (2xtensorial shear) + + // Get ply thicknesses + Vector ply_thicknesses = Vector(section->NumberOfPlies(), 0.0); + section->GetPlyThicknesses(ply_thicknesses); + + // Resize output vector. 2 Surfaces for each ply + data.rlaminateStrains.resize(2 * section->NumberOfPlies()); + for (unsigned int i = 0; i < 2 * section->NumberOfPlies(); i++) + { + data.rlaminateStrains[i].resize(8, false); + data.rlaminateStrains[i].clear(); + } + + // Loop over all plies - start from top ply, top surface + for (unsigned int plyNumber = 0; + plyNumber < section->NumberOfPlies(); ++plyNumber) + { + // Calculate strains at top surface, arranged in columns. + // (element coordinate system) + data.rlaminateStrains[2 * plyNumber][0] = e_x + z_current*kap_x; + data.rlaminateStrains[2 * plyNumber][1] = e_y + z_current*kap_y; + data.rlaminateStrains[2 * plyNumber][2] = e_xy + z_current*kap_xy; + + if (data.parabolic_composite_transverse_shear_strains) + { + // assume parabolic transverse shear strain dist across whole + // laminate + data.rlaminateStrains[2 * plyNumber][6] = + 1.5*(1.0 - 4.0 * z_current*z_current / thickness / thickness)* + data.generalizedStrains[6]; + data.rlaminateStrains[2 * plyNumber][7] = + 1.5*(1.0 - 4.0 * z_current*z_current / thickness / thickness)* + data.generalizedStrains[7]; + } + else + { + // constant transverse shear strain dist + data.rlaminateStrains[2 * plyNumber][6] = data.generalizedStrains[6]; + data.rlaminateStrains[2 * plyNumber][7] = data.generalizedStrains[7]; + } + + + // Move to bottom surface of current layer + z_current += ply_thicknesses[plyNumber]; + + // Calculate strains at bottom surface, arranged in columns + // (element coordinate system) + data.rlaminateStrains[2 * plyNumber + 1][0] = e_x + z_current*kap_x; + data.rlaminateStrains[2 * plyNumber + 1][1] = e_y + z_current*kap_y; + data.rlaminateStrains[2 * plyNumber + 1][2] = e_xy + z_current*kap_xy; + + if (data.parabolic_composite_transverse_shear_strains) + { + data.rlaminateStrains[2 * plyNumber + 1][6] = + 1.5*(1.0 - 4.0 * z_current*z_current / thickness / thickness)* + data.generalizedStrains[6]; + data.rlaminateStrains[2 * plyNumber + 1][7] = + 1.5*(1.0 - 4.0 * z_current*z_current / thickness / thickness)* + data.generalizedStrains[7]; + } + else + { + data.rlaminateStrains[2 * plyNumber+1][6] = data.generalizedStrains[6]; + data.rlaminateStrains[2 * plyNumber+1][7] = data.generalizedStrains[7]; + } + } + } + + void ShellThickElement3D3N::CalculateLaminaStresses(CalculationData& data) + { + ShellCrossSection::Pointer& section = mSections[data.gpIndex]; + + // Setup flag to compute ply constitutive matrices + // (units [Pa] and rotated to element orientation) + section->SetupGetPlyConstitutiveMatrices(data.shearStabilisation); + CalculateSectionResponse(data); + + // Resize output vector. 2 Surfaces for each ply + data.rlaminateStresses.resize(2 * section->NumberOfPlies()); + for (unsigned int i = 0; i < 2 * section->NumberOfPlies(); i++) + { + data.rlaminateStresses[i].resize(8, false); + data.rlaminateStresses[i].clear(); + } + + // Loop over all plies - start from top ply, top surface + for (unsigned int plyNumber = 0; + plyNumber < section->NumberOfPlies(); ++plyNumber) + { + // determine stresses at currrent ply, top surface + // (element coordinate system) + data.rlaminateStresses[2 * plyNumber] = prod( + section->GetPlyConstitutiveMatrix(plyNumber), + data.rlaminateStrains[2 * plyNumber]); + + // determine stresses at currrent ply, bottom surface + // (element coordinate system) + data.rlaminateStresses[2 * plyNumber + 1] = prod( + section->GetPlyConstitutiveMatrix(plyNumber), + data.rlaminateStrains[2 * plyNumber + 1]); + } + } + + double ShellThickElement3D3N::CalculateTsaiWuPlaneStress(const CalculationData & data, const Matrix& rLamina_Strengths, const unsigned int& rPly) + { + // Incoming lamina strengths are organized as follows: + // Refer to 'shell_cross_section.cpp' for details. + // + // | T1, C1, T2 | + // | C2, S12, S13 | + // | S23 0 0 | + + // Convert raw lamina strengths into tsai strengths F_i and F_ij. + // Refer Reddy (2003) Section 10.9.4 (re-ordered for kratos DOFs). + // All F_i3 components ignored - thin shell theory. + // + + // Should be FALSE unless testing against other programs that ignore it. + bool disable_in_plane_interaction = false; + + // First, F_i + Vector F_i = Vector(3, 0.0); + F_i[0] = 1.0 / rLamina_Strengths(0, 0) - 1.0 / rLamina_Strengths(0, 1); + F_i[1] = 1.0 / rLamina_Strengths(0, 2) - 1.0 / rLamina_Strengths(1, 0); + F_i[2] = 0.0; + + // Second, F_ij + Matrix F_ij = Matrix(5, 5, 0.0); + F_ij.clear(); + F_ij(0, 0) = 1.0 / rLamina_Strengths(0, 0) / rLamina_Strengths(0, 1); // 11 + F_ij(1, 1) = 1.0 / rLamina_Strengths(0, 2) / rLamina_Strengths(1, 0); // 22 + F_ij(2, 2) = 1.0 / rLamina_Strengths(1, 1) / rLamina_Strengths(1, 1); // 12 + F_ij(0, 1) = F_ij(1, 0) = -0.5 / std::sqrt(rLamina_Strengths(0, 0)*rLamina_Strengths(0, 1)*rLamina_Strengths(0, 2)*rLamina_Strengths(1, 0)); + + if (disable_in_plane_interaction) + { + F_ij(0, 1) = F_ij(1, 0) = 0.0; + } + + // Third, addditional transverse shear terms + F_ij(3, 3) = 1.0 / rLamina_Strengths(1, 2) / rLamina_Strengths(1, 2); // 13 + F_ij(4, 4) = 1.0 / rLamina_Strengths(2, 0) / rLamina_Strengths(2, 0); // 23 + + // Evaluate Tsai-Wu @ top surface of current layer + double var_a = 0.0; + double var_b = 0.0; + for (size_t i = 0; i < 3; i++) + { + var_b += F_i[i] * data.rlaminateStresses[2 * rPly][i]; + for (size_t j = 0; j < 3; j++) + { + var_a += F_ij(i, j)*data.rlaminateStresses[2 * rPly][i] * data.rlaminateStresses[2 * rPly][j]; + } + } + var_a += F_ij(3, 3)*data.rlaminateStresses[2 * rPly][6] * data.rlaminateStresses[2 * rPly][6]; // Transverse shear 13 + var_a += F_ij(4, 4)*data.rlaminateStresses[2 * rPly][7] * data.rlaminateStresses[2 * rPly][7]; // Transverse shear 23 + + double tsai_reserve_factor_top = (-1.0*var_b + std::sqrt(var_b*var_b + 4.0 * var_a)) / 2.0 / var_a; + + // Evaluate Tsai-Wu @ bottom surface of current layer + var_a = 0.0; + var_b = 0.0; + for (size_t i = 0; i < 3; i++) + { + var_b += F_i[i] * data.rlaminateStresses[2 * rPly + 1][i]; + for (size_t j = 0; j < 3; j++) + { + var_a += F_ij(i, j)*data.rlaminateStresses[2 * rPly + 1][i] * data.rlaminateStresses[2 * rPly + 1][j]; + } + } + var_a += F_ij(3, 3)*data.rlaminateStresses[2 * rPly + 1][6] * data.rlaminateStresses[2 * rPly + 1][6]; // Transverse shear 13 + var_a += F_ij(4, 4)*data.rlaminateStresses[2 * rPly + 1][7] * data.rlaminateStresses[2 * rPly + 1][7]; // Transverse shear 23 + + double tsai_reserve_factor_bottom = (-1.0*var_b + std::sqrt(var_b*var_b + 4.0 * var_a)) / 2.0 / var_a; + + // Return min of both surfaces as the result for the whole ply + return std::min(tsai_reserve_factor_bottom, tsai_reserve_factor_top); + } + + void ShellThickElement3D3N::CalculateVonMisesStress(const CalculationData & data, const Variable& rVariable, double & rVon_Mises_Result) + { + // calc von mises stresses at top, mid and bottom surfaces for + // thick shell + double sxx, syy, sxy, sxz, syz; + double von_mises_top, von_mises_mid, von_mises_bottom; + // top surface: membrane and +bending contributions + // (no transverse shear) + sxx = data.generalizedStresses[0] + data.generalizedStresses[3]; + syy = data.generalizedStresses[1] + data.generalizedStresses[4]; + sxy = data.generalizedStresses[2] + data.generalizedStresses[5]; + von_mises_top = sxx*sxx - sxx*syy + syy*syy + 3.0*sxy*sxy; + + // mid surface: membrane and transverse shear contributions + // (no bending) + sxx = data.generalizedStresses[0]; + syy = data.generalizedStresses[1]; + sxy = data.generalizedStresses[2]; + sxz = data.generalizedStresses[6]; + syz = data.generalizedStresses[7]; + von_mises_mid = sxx*sxx - sxx*syy + syy*syy + + 3.0*(sxy*sxy + sxz*sxz + syz*syz); + + // bottom surface: membrane and -bending contributions + // (no transverse shear) + sxx = data.generalizedStresses[0] - data.generalizedStresses[3]; + syy = data.generalizedStresses[1] - data.generalizedStresses[4]; + sxy = data.generalizedStresses[2] - data.generalizedStresses[5]; + von_mises_bottom = sxx*sxx - sxx*syy + syy*syy + 3.0*sxy*sxy; + + + + // Output requested quantity + if (rVariable == VON_MISES_STRESS_TOP_SURFACE) + { + rVon_Mises_Result = sqrt(von_mises_top); + } + else if (rVariable == VON_MISES_STRESS_MIDDLE_SURFACE) + { + rVon_Mises_Result = sqrt(von_mises_mid); + } + else if (rVariable == VON_MISES_STRESS_BOTTOM_SURFACE) + { + rVon_Mises_Result = sqrt(von_mises_bottom); + } + else if (rVariable == VON_MISES_STRESS) + { + // take the greatest value and output + rVon_Mises_Result = + sqrt(std::max(von_mises_top, + std::max(von_mises_mid, von_mises_bottom))); + } + + } + + void ShellThickElement3D3N::CalculateShellElementEnergy(const CalculationData & data, const Variable& rVariable, double & rEnergy_Result) + { + // Energy calcs - these haven't been verified or tested yet. + + // At each Gauss Point the energy of that Gauss Point's weighted area + // dA*w_i is output. This means that the total energy of the element is + // the sum of the Gauss Point energies. Accordingly, the total energy of + // the system is the sum of Gauss Point energies over all elements. + + bool is_fraction_calc = false; + double totalEnergy = 1.0; + + if (rVariable == SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION || + rVariable == SHELL_ELEMENT_BENDING_ENERGY_FRACTION || + rVariable == SHELL_ELEMENT_SHEAR_ENERGY_FRACTION) + { + // need to calculate total energy over current dA first + totalEnergy = inner_prod(data.generalizedStresses, data.generalizedStrains)*data.TotalArea/3.0; + is_fraction_calc = true; + } + + if (rVariable == SHELL_ELEMENT_MEMBRANE_ENERGY || rVariable == SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION) + { + for (size_t i = 0; i < 3; i++) + { + rEnergy_Result += data.generalizedStresses[i] * data.generalizedStrains[i] * data.TotalArea / 3.0; + } + + if (is_fraction_calc) + { + rEnergy_Result /= totalEnergy; + } + } + else if (rVariable == SHELL_ELEMENT_BENDING_ENERGY || rVariable == SHELL_ELEMENT_BENDING_ENERGY_FRACTION) + { + for (size_t i = 3; i < 6; i++) + { + rEnergy_Result += data.generalizedStresses[i] * data.generalizedStrains[i] * data.TotalArea / 3.0; + } + + if (is_fraction_calc) + { + rEnergy_Result /= totalEnergy; + } + } + else if (rVariable == SHELL_ELEMENT_SHEAR_ENERGY || rVariable == SHELL_ELEMENT_SHEAR_ENERGY_FRACTION) + { + for (size_t i = 6; i < 8; i++) + { + rEnergy_Result += data.generalizedStresses[i] * data.generalizedStrains[i] * data.TotalArea / 3.0; + } + + if (is_fraction_calc) + { + rEnergy_Result /= totalEnergy; + } + } + } + + void ShellThickElement3D3N::CheckGeneralizedStressOrStrainOutput(const Variable& rVariable, int & ijob, bool & bGlobal) + { + if (rVariable == SHELL_STRAIN) + { + ijob = 1; + } + else if (rVariable == SHELL_STRAIN_GLOBAL) + { + ijob = 1; + bGlobal = true; + } + else if (rVariable == SHELL_CURVATURE) + { + ijob = 2; + } + else if (rVariable == SHELL_CURVATURE_GLOBAL) + { + ijob = 2; + bGlobal = true; + } + else if (rVariable == SHELL_FORCE) + { + ijob = 3; + } + else if (rVariable == SHELL_FORCE_GLOBAL) + { + ijob = 3; + bGlobal = true; + } + else if (rVariable == SHELL_MOMENT) + { + ijob = 4; + } + else if (rVariable == SHELL_MOMENT_GLOBAL) + { + ijob = 4; + bGlobal = true; + } + else if (rVariable == SHELL_STRESS_TOP_SURFACE) + { + ijob = 5; + } + else if (rVariable == SHELL_STRESS_TOP_SURFACE_GLOBAL) + { + ijob = 5; + bGlobal = true; + } + else if (rVariable == SHELL_STRESS_MIDDLE_SURFACE) + { + ijob = 6; + } + else if (rVariable == SHELL_STRESS_MIDDLE_SURFACE_GLOBAL) + { + ijob = 6; + bGlobal = true; + } + else if (rVariable == SHELL_STRESS_BOTTOM_SURFACE) + { + ijob = 7; + } + else if (rVariable == SHELL_STRESS_BOTTOM_SURFACE_GLOBAL) + { + ijob = 7; + bGlobal = true; + } + else if (rVariable == SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE) + { + ijob = 8; + } + else if (rVariable == SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE_GLOBAL) + { + ijob = 8; + bGlobal = true; + } + else if (rVariable == SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE) + { + ijob = 9; + } + else if (rVariable == SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE_GLOBAL) + { + ijob = 9; + bGlobal = true; + } + else if (rVariable == SHELL_ORTHOTROPIC_4PLY_THROUGH_THICKNESS) + { + // TESTING VARIABLE + ijob = 99; + } + } + + void ShellThickElement3D3N::DecimalCorrection(Vector& a) + { + double norm = norm_2(a); + double tolerance = std::max(norm * 1.0E-12, 1.0E-12); + for (SizeType i = 0; i < a.size(); i++) + if (std::abs(a(i)) < tolerance) + a(i) = 0.0; + } + + void ShellThickElement3D3N::SetupOrientationAngles() + { + ShellT3_LocalCoordinateSystem lcs(mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + Vector3Type normal; + noalias(normal) = lcs.Vz(); + + Vector3Type dZ; + dZ(0) = 0.0; + dZ(1) = 0.0; + dZ(2) = 1.0; // for the moment let's take this. But the user can specify its own triad! TODO + + Vector3Type dirX; + MathUtils::CrossProduct(dirX, dZ, normal); + + // try to normalize the x vector. if it is near zero it means that we need + // to choose a default one. + double dirX_norm = dirX(0)*dirX(0) + dirX(1)*dirX(1) + dirX(2)*dirX(2); + if (dirX_norm < 1.0E-12) + { + dirX(0) = 1.0; + dirX(1) = 0.0; + dirX(2) = 0.0; + } + else if (dirX_norm != 1.0) + { + dirX_norm = std::sqrt(dirX_norm); + dirX /= dirX_norm; + } + + Vector3Type elem_dirX = lcs.Vx(); + + // now calculate the angle between the element x direction and the material x direction. + Vector3Type& a = elem_dirX; + Vector3Type& b = dirX; + double a_dot_b = a(0)*b(0) + a(1)*b(1) + a(2)*b(2); + if (a_dot_b < -1.0) a_dot_b = -1.0; + if (a_dot_b > 1.0) a_dot_b = 1.0; + double angle = std::acos(a_dot_b); + + // if they are not counter-clock-wise, let's change the sign of the angle + if (angle != 0.0) + { + const MatrixType& R = lcs.Orientation(); + if (dirX(0)*R(1, 0) + dirX(1)*R(1, 1) + dirX(2)*R(1, 2) < 0.0) + angle = -angle; + } + + Properties props = GetProperties(); + if (props.Has(ORTHOTROPIC_ORIENTATION_ASSIGNMENT)) + { + for (CrossSectionContainerType::iterator it = mSections.begin(); it != mSections.end(); ++it) + (*it)->SetOrientationAngle(mOrthotropicSectionRotation); + } + else + { + for (CrossSectionContainerType::iterator it = mSections.begin(); it != mSections.end(); ++it) + (*it)->SetOrientationAngle(angle); + } + + } + + void ShellThickElement3D3N::CalculateSectionResponse(CalculationData& data) + { + const array_1d& loc = data.gpLocations[0]; + data.N(0) = 1.0 - loc[1] - loc[2]; + data.N(1) = loc[1]; + data.N(2) = loc[2]; + + ShellCrossSection::Pointer& section = mSections[0]; + data.SectionParameters.SetShapeFunctionsValues(data.N); + section->CalculateSectionResponse(data.SectionParameters, ConstitutiveLaw::StressMeasure_PK2); + + if (data.basicTriCST == false && + data.ignore_shear_stabilization == false) + { + //add in shear stabilization + data.shearStabilisation = (data.hMean*data.hMean) + / (data.hMean*data.hMean + data.alpha*data.h_e*data.h_e); + data.D(6, 6) *= data.shearStabilisation; + data.D(6, 7) *= data.shearStabilisation; + data.D(7, 6) *= data.shearStabilisation; + data.D(7, 7) *= data.shearStabilisation; + } + + if (data.ignore_shear_stabilization) + { + std::cout << "Not applying shear stabilisation to shear part of material matrix!" << std::endl; + } + } + + void ShellThickElement3D3N::InitializeCalculationData(CalculationData& data) + { + //------------------------------------- + // Computation of all stuff that remain + // constant throughout the calculations + + //------------------------------------- + // geometry data + + const double x12 = data.LCS0.X1() - data.LCS0.X2(); + const double x23 = data.LCS0.X2() - data.LCS0.X3(); + const double x31 = data.LCS0.X3() - data.LCS0.X1(); + const double x21 = -x12; + const double x32 = -x23; + const double x13 = -x31; + + const double y12 = data.LCS0.Y1() - data.LCS0.Y2(); + const double y23 = data.LCS0.Y2() - data.LCS0.Y3(); + const double y31 = data.LCS0.Y3() - data.LCS0.Y1(); + const double y21 = -y12; + + const double y13 = -y31; + + const double A = 0.5*(y21*x13 - x21*y13); + const double A2 = 2.0*A; + + double h = 0.0; + for (unsigned int i = 0; i < mSections.size(); i++) + h += mSections[i]->GetThickness(); + h /= (double)mSections.size(); + + data.hMean = h; + data.TotalArea = A; + data.dA = A; + + // create the integration point locations + if (data.gpLocations.size() != 0) data.gpLocations.clear(); + data.gpLocations.resize(OPT_NUM_GP); +#ifdef OPT_1_POINT_INTEGRATION + array_1d& gp0 = data.gpLocations[0]; + gp0[0] = 1.0 / 3.0; + gp0[1] = 1.0 / 3.0; + gp0[2] = 1.0 / 3.0; +#else + array_1d& gp0 = data.gpLocations[0]; + array_1d& gp1 = data.gpLocations[1]; + array_1d& gp2 = data.gpLocations[2]; +#ifdef OPT_USES_INTERIOR_GAUSS_POINTS + gp0[0] = 1.0 / 6.0; + gp0[1] = 1.0 / 6.0; + gp0[2] = 2.0 / 3.0; + gp1[0] = 2.0 / 3.0; + gp1[1] = 1.0 / 6.0; + gp1[2] = 1.0 / 6.0; + gp2[0] = 1.0 / 6.0; + gp2[1] = 2.0 / 3.0; + gp2[2] = 1.0 / 6.0; +#else + gp0[0] = 0.5; + gp0[1] = 0.5; + gp0[2] = 0.0; + gp1[0] = 0.0; + gp1[1] = 0.5; + gp1[2] = 0.5; + gp2[0] = 0.5; + gp2[1] = 0.0; + gp2[2] = 0.5; +#endif // OPT_USES_INTERIOR_GAUSS_POINTS + +#endif // OPT_1_POINT_INTEGRATION + + // cartesian derivatives + data.dNxy(0, 0) = (y13 - y12) / A2; + data.dNxy(0, 1) = (x12 - x13) / A2; + data.dNxy(1, 0) = -y13 / A2; + data.dNxy(1, 1) = x13 / A2; + data.dNxy(2, 0) = y12 / A2; + data.dNxy(2, 1) = -x12 / A2; + + // --------------------------------------------------------------------- + // Total Formulation: + // as per Efficient Co-Rotational 3-Node Shell Element paper (2016) + // --------------------------------------------------------------------- + + data.B.clear(); + + //Membrane components + // + //node 1 + data.B(0, 0) = y23; + data.B(1, 1) = x32; + data.B(2, 0) = x32; + data.B(2, 1) = y23; + + //node 2 + data.B(0, 6) = y31; + data.B(1, 7) = x13; + data.B(2, 6) = x13; + data.B(2, 7) = y31; + + //node 3 + data.B(0, 12) = y12; + data.B(1, 13) = x21; + data.B(2, 12) = x21; + data.B(2, 13) = y12; + + //Bending components + // + //node 1 + data.B(3, 4) = y23; + data.B(4, 3) = -1.0 * x32; + data.B(5, 3) = -1.0 * y23; + data.B(5, 4) = x32; + + //node 2 + data.B(3, 10) = y31; + data.B(4, 9) = -1.0 * x13; + data.B(5, 9) = -1.0 * y31; + data.B(5, 10) = x13; + + //node 3 + data.B(3, 16) = y12; + data.B(4, 15) = -1.0 * x21; + data.B(5, 15) = -1.0 * y12; + data.B(5, 16) = x21; + + //Shear components + // + if (data.specialDSGc3) + { + // Don't do anything here. + // The shear contribution will be added with 3GPs later on. + } + else if (data.smoothedDSG) + { + // Use smoothed DSG formulation according to [Nguyen-Thoi et al., 2013] + std::cout << "Using smoothed DSG" << std::endl; + CalculateSmoothedDSGBMatrix(data); + } + else if (data.basicTriCST == false) + { + // Use DSG method as per Bletzinger (2000) + // Entries denoted "altered by -1" are multiplied by -1 + + const double a = x21; + const double b = y21; + const double c = y31; + const double d = x31; + + //node 1 + data.B(6, 2) = b - c; + data.B(6, 4) = A; + + data.B(7, 2) = d - a; + data.B(7, 3) = -1.0*A; + + + //node 2 + data.B(6, 8) = c; + data.B(6, 9) = -1.0 * b*c / 2.0; + data.B(6, 10) = a*c / 2.0; + + data.B(7, 8) = -1.0 * d; + data.B(7, 9) = b*d / 2.0; + data.B(7, 10) = -1.0 * a*d / 2.0; + + //node 3 + data.B(6, 14) = -1.0 * b; + data.B(6, 15) = b*c / 2.0; + data.B(6, 16) = -b*d / 2.0; + + data.B(7, 14) = a; + data.B(7, 15) = -1.0 * a*c / 2.0; + data.B(7, 16) = a*d / 2.0; + } + else + { + // Basic CST displacement derived shear + // strain displacement matrix. + // Only for testing! + std::cout << "Using basic CST shear formulation!" << std::endl; + const Matrix & shapeFunctions = + GetGeometry().ShapeFunctionsValues(mThisIntegrationMethod); + + //node 1 + data.B(6, 2) = y23; + data.B(6, 3) = shapeFunctions(0, 0); + + data.B(7, 2) = x32; + data.B(7, 4) = shapeFunctions(0, 0); + + //node 2 + data.B(6, 8) = y31; + data.B(6, 9) = shapeFunctions(0, 1); + + data.B(7, 8) = x13; + data.B(7, 10) = shapeFunctions(0, 1); + + //node 3 + data.B(6, 14) = y12; + data.B(6, 15) = shapeFunctions(0, 2); + + data.B(7, 14) = x21; + data.B(7, 16) = shapeFunctions(0, 2); + } + + //Final multiplication + data.B /= (A2); + + //determine longest side length (eqn 22) - for shear correction + Vector P12 = Vector(data.LCS0.P1() - data.LCS0.P2()); + Vector P13 = Vector(data.LCS0.P1() - data.LCS0.P3()); + Vector P23 = Vector(data.LCS0.P2() - data.LCS0.P3()); + data.h_e = std::sqrt(inner_prod(P12, P12)); + double edge_length = std::sqrt(inner_prod(P13, P13)); + if (edge_length > data.h_e) { data.h_e = edge_length; } + edge_length = std::sqrt(inner_prod(P23, P23)); + if (edge_length > data.h_e) { data.h_e = edge_length; } + + //-------------------------------------- + // Calculate material matrices + // + + //allocate and setup + data.SectionParameters.SetElementGeometry(GetGeometry()); + data.SectionParameters.SetMaterialProperties(GetProperties()); + data.SectionParameters.SetProcessInfo(data.CurrentProcessInfo); + data.SectionParameters.SetGeneralizedStrainVector(data.generalizedStrains); + data.SectionParameters.SetGeneralizedStressVector(data.generalizedStresses); + data.SectionParameters.SetConstitutiveMatrix(data.D); + data.SectionParameters.SetShapeFunctionsDerivatives(data.dNxy); + Flags& options = data.SectionParameters.GetOptions(); + //options.Set(ConstitutiveLaw::COMPUTE_STRESS, data.CalculateRHS); //set + // to false so we use the shear stabilization added in + // 'CalculateSectionResponse()' + options.Set(ConstitutiveLaw::COMPUTE_STRESS, false); //set to false + options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, + data.CalculateLHS); + + //-------------------------------------- + // calculate the displacement vector + // in global and local coordinate systems + + data.globalDisplacements.clear(); + GetValuesVector(data.globalDisplacements); + + data.localDisplacements = + mpCoordinateTransformation->CalculateLocalDisplacements( + data.LCS, data.globalDisplacements); + } + + void ShellThickElement3D3N::CalculateDSGc3Contribution(CalculationData & data, MatrixType & rLeftHandSideMatrix) + { + std::cout << "DSGc3" << std::endl; + + // choose formulation options + bool use_pure_bubble_mode = false; + bool use_no_bubble_mode = true; + bool use_reconstructed_shear_gaps = false; + bool use_original_dsg = false; + bool use_original_dsg_with_bubble = false; + + // Material matrix data.D is already multiplied with A!!! + data.D *= 2.0; //now data.D is D*detJ + + // Modified B-matrix + Matrix BSuper = Matrix(2, 9, 0.0); + + // Get geometry data + const double x1 = data.LCS0.X1(); + const double y1 = data.LCS0.Y1(); + const double x2 = data.LCS0.X2(); + const double y2 = data.LCS0.Y2(); + const double x3 = data.LCS0.X3(); + const double y3 = data.LCS0.Y3(); + + // Geometric quantities + const double a = x2 - x1; + const double b = y2 - y1; + const double c = y3 - y1; + const double d = x3 - x1; + + // Numeric integration + int numberGPs = 3; + double integration_weight = 1.0 / 6.0; + if (use_original_dsg_with_bubble) + { + // use quartic integration + numberGPs = 7; + } + + std::vector< array_1d > quarticGPLocations; + quarticGPLocations.resize(7); + quarticGPLocations.clear(); + for (size_t i = 0; i < 7; i++) + { + quarticGPLocations[i].clear(); + quarticGPLocations[i][0] = 0.0; + quarticGPLocations[i][1] = 0.0; + } + Vector quarticGPweights = Vector(7, 0.0); + + quarticGPweights[0] = 1.0 / 40.0; + + quarticGPLocations[1][0] = 0.5; + quarticGPweights[1] = 1.0 / 15.0; + + quarticGPLocations[2][0] = 1.0; + quarticGPweights[2] = 1.0 / 40.0; + + quarticGPLocations[3][0] = 0.5; + quarticGPLocations[3][1] = 0.5; + quarticGPweights[3] = 1.0 / 15.0; + + quarticGPLocations[4][1] = 1.0; + quarticGPweights[4] = 1.0 / 40.0; + + quarticGPLocations[5][1] = 0.5; + quarticGPweights[5] = 1.0 / 15.0; + + quarticGPLocations[6][0] = 0.3; + quarticGPLocations[6][1] = 0.3; + quarticGPweights[6] = 9.0 / 40.0; + + + // Integration loop + double loc1, loc2; + for (int gauss_point = 0; gauss_point < numberGPs; gauss_point++) + { + if (use_original_dsg_with_bubble) + { + loc1 = quarticGPLocations[gauss_point][0]; + loc2 = quarticGPLocations[gauss_point][1]; + } + else + { + loc1 = data.gpLocations[gauss_point][0]; + loc2 = data.gpLocations[gauss_point][1]; + } + + BSuper.clear(); + + if (use_pure_bubble_mode) + { + std::cout << "use_pure_bubble_mode" << std::endl; + // pure bubble mode formulation below with no alterations + // DOFs are [w1,w2,w3,Rx1,...] + BSuper(0, 0) = -2.0*b*loc1 + 1.0*b + 2.0*c*loc2 - 1.0*c; + BSuper(0, 1) = 1.0*b*loc1 - 1.0*c*loc2 + 1.0*c; + BSuper(0, 2) = 1.0*b*loc1 - 1.0*b - 1.0*c*loc2; + BSuper(0, 3) = -1.0*b*(1.0*loc1 - 0.5); + BSuper(0, 4) = 0.5*b*loc1 + 0.5*c*loc2; + BSuper(0, 5) = -0.5*b*loc1 + 0.5*b + 0.5*c*loc2; + BSuper(0, 6) = -1.0*c*(1.0*loc2 - 0.5); + BSuper(0, 7) = 0.5*b*loc1 - 0.5*c*loc2 + 0.5*c; + BSuper(0, 8) = 0.5*b*loc1 + 0.5*c*loc2; + BSuper(1, 0) = 2.0*a*loc1 - 1.0*a - 2.0*d*loc2 + 1.0*d; + BSuper(1, 1) = -1.0*a*loc1 + 1.0*d*loc2 - 1.0*d; + BSuper(1, 2) = -1.0*a*loc1 + 1.0*a + 1.0*d*loc2; + BSuper(1, 3) = 1.0*a*(1.0*loc1 - 0.5); + BSuper(1, 4) = -0.5*a*loc1 - 0.5*d*loc2; + BSuper(1, 5) = 0.5*a*loc1 - 0.5*a - 0.5*d*loc2; + BSuper(1, 6) = 1.0*d*(1.0*loc2 - 0.5); + BSuper(1, 7) = -0.5*a*loc1 + 0.5*d*loc2 - 0.5*d; + BSuper(1, 8) = -0.5*a*loc1 - 0.5*d*loc2; + + BSuper /= (2.0*data.TotalArea); + } + else if (use_no_bubble_mode) + { + std::cout << "use_no_bubble_mode" << std::endl; + // pure no bubble mode formulation below with no alterations + // DOFs are [w1,w2,w3,Rx1,...] + + BSuper(0, 0) = b - c; + BSuper(0, 1) = c; + BSuper(0, 2) = -b; + BSuper(0, 3) = 0.5*(b - c)*(b*loc1 + c*loc2); + BSuper(0, 4) = -0.5*b*b * loc1 + 0.5*b*c*loc1 - 0.5*b*c*loc2 - 0.5*b*c + 0.5*c*c * loc2; + BSuper(0, 5) = 0.5*b*b * loc1 - 0.5*b*c*loc1 + 0.5*b*c*loc2 + 0.5*b*c - 0.5*c*c * loc2; + BSuper(0, 6) = -0.5*a*b*loc1 - 0.5*a*c*loc2 + 0.5*a*c + 0.5*b*d*loc1 - 0.5*b*d + 0.5*c*d*loc2; + BSuper(0, 7) = -0.5*a*b*loc1 - 0.5*a*c*loc2 + 0.5*a*c + 0.5*b*d*loc1 + 0.5*c*d*loc2; + BSuper(0, 8) = 0.5*a*b*loc1 + 0.5*a*c*loc2 - 0.5*b*d*loc1 - 0.5*b*d - 0.5*c*d*loc2; + BSuper(1, 0) = -a + d; + BSuper(1, 1) = -d; + BSuper(1, 2) = a; + BSuper(1, 3) = -0.5*a*b*loc1 + 0.5*a*c*loc1 - 0.5*a*c - 0.5*b*d*loc2 + 0.5*b*d + 0.5*c*d*loc2; + BSuper(1, 4) = 0.5*a*b*loc1 - 0.5*a*c*loc1 + 0.5*b*d*loc2 + 0.5*b*d - 0.5*c*d*loc2; + BSuper(1, 5) = -0.5*a*b*loc1 + 0.5*a*c*loc1 - 0.5*a*c - 0.5*b*d*loc2 + 0.5*c*d*loc2; + BSuper(1, 6) = 0.5*(a - d)*(a*loc1 + d*loc2); + BSuper(1, 7) = 0.5*a*a * loc1 - 0.5*a*d*loc1 + 0.5*a*d*loc2 - 0.5*a*d - 0.5*d*d * loc2; + BSuper(1, 8) = -0.5*a*a * loc1 + 0.5*a*d*loc1 - 0.5*a*d*loc2 + 0.5*a*d + 0.5*d*d * loc2; + + BSuper /= (2.0*data.TotalArea); + } + else if (use_reconstructed_shear_gaps) + { + std::cout << "use_reconstructed_shear_gaps" << std::endl; + // The reconstructed shear gap field is the same for + // bubble and no bubble modes + + BSuper(0, 0) = b - c; + BSuper(0, 1) = c; + BSuper(0, 2) = -b; + BSuper(0, 3) = -0.5*b*loc1 - 0.5*c*loc2; + BSuper(0, 4) = -0.5*b*c + 0.5*b*loc1 + 0.5*c*loc2; + BSuper(0, 5) = 0.5*b*c; + BSuper(0, 6) = 0.5*a*c - 0.5*b*d - 0.5*b*loc1 - 0.5*c*loc2; + BSuper(0, 7) = 0.5*a*c; + BSuper(0, 8) = -0.5*b*d + 0.5*b*loc1 + 0.5*c*loc2; + BSuper(1, 0) = -a + d; + BSuper(1, 1) = -d; + BSuper(1, 2) = a; + BSuper(1, 3) = -0.5*a*c + 0.5*a*loc1 + 0.5*b*d + 0.5*d*loc2; + BSuper(1, 4) = -0.5*a*loc1 + 0.5*b*d - 0.5*d*loc2; + BSuper(1, 5) = -0.5*a*c; + BSuper(1, 6) = 0.5*a*loc1 + 0.5*d*loc2; + BSuper(1, 7) = -0.5*a*d; + BSuper(1, 8) = 0.5*a*d - 0.5*a*loc1 - 0.5*d*loc2; + + BSuper /= (2.0*data.TotalArea); + } + else if (use_original_dsg) + { + std::cout << "use_original_dsg" << std::endl; + BSuper(0, 0) = 1.0*b - 1.0*c; + BSuper(0, 1) = c; + BSuper(0, 2) = -b; + BSuper(0, 3) = 0; + BSuper(0, 4) = -0.5*b*c; + BSuper(0, 5) = 0.5*b*c; + BSuper(0, 6) = 0.5*a*c - 0.5*b*d; + BSuper(0, 7) = 0.5*a*c; + BSuper(0, 8) = -0.5*b*d; + BSuper(1, 0) = -1.0*a + 1.0*d; + BSuper(1, 1) = -d; + BSuper(1, 2) = a; + BSuper(1, 3) = -0.5*a*c + 0.5*b*d; + BSuper(1, 4) = 0.5*b*d; + BSuper(1, 5) = -0.5*a*c; + BSuper(1, 6) = 0; + BSuper(1, 7) = -0.5*a*d; + BSuper(1, 8) = 0.5*a*d; + + BSuper /= (2.0*data.TotalArea); + } + else if (use_original_dsg_with_bubble) + { + std::cout << "use_original_dsg with bubble" << std::endl; + + BSuper(0, 0) = 1.0*b - 1.0*c; + BSuper(0, 1) = 1.0*c*(1.0); + BSuper(0, 2) = -1.0*b*(1.0); + BSuper(0, 3) = 0.0; + BSuper(0, 4) = -1.0*b*c*(3.0*loc1*loc1 + 12.0*loc1*loc2 - 3.0*loc1 + 3.0*loc2*loc2 - 3.0*loc2 + 0.5); + BSuper(0, 5) = 1.0*b*c*(3.0*loc1*loc1 + 12.0*loc1*loc2 - 3.0*loc1 + 3.0*loc2*loc2 - 3.0*loc2 + 0.5); + BSuper(0, 6) = 0.5*a*c - 0.5*b*d; + BSuper(0, 7) = 6.0*a*c*loc1*loc2 + 3.0*a*c*loc2*loc2 - 3.0*a*c*loc2 + 0.5*a*c + 3.0*b*d*loc1*loc1 + 6.0*b*d*loc1*loc2 - 3.0*b*d*loc1; + BSuper(0, 8) = -6.0*a*c*loc1*loc2 - 3.0*a*c*loc2*loc2 + 3.0*a*c*loc2 - 3.0*b*d*loc1*loc1 - 6.0*b*d*loc1*loc2 + 3.0*b*d*loc1 - 0.5*b*d; + BSuper(1, 0) = - 1.0*a + 1.0*d; + BSuper(1, 1) = -1.0*d*(1.0); + BSuper(1, 2) = 1.0*a*(1.0); + BSuper(1, 3) = -0.5*a*c + 0.5*b*d; + BSuper(1, 4) = 3.0*a*c*loc1*loc1 + 6.0*a*c*loc1*loc2 - 3.0*a*c*loc1 + 6.0*b*d*loc1*loc2 + 3.0*b*d*loc2*loc2 - 3.0*b*d*loc2 + 0.5*b*d; + BSuper(1, 5) = -3.0*a*c*loc1*loc1 - 6.0*a*c*loc1*loc2 + 3.0*a*c*loc1 - 0.5*a*c - 6.0*b*d*loc1*loc2 - 3.0*b*d*loc2*loc2 + 3.0*b*d*loc2; + BSuper(1, 6) = 0.0; + BSuper(1, 7) = -1.0*a*d*(3.0*loc1*loc1 + 12.0*loc1*loc2 - 3.0*loc1 + 3.0*loc2*loc2 - 3.0*loc2 + 0.5); + BSuper(1, 8) = 1.0*a*d*(3.0*loc1*loc1 + 12.0*loc1*loc2 - 3.0*loc1 + 3.0*loc2*loc2 - 3.0*loc2 + 0.5); + + BSuper /= (2.0*data.TotalArea); + + integration_weight = quarticGPweights[gauss_point]; + } + + //comparison K matrix, in Bletzinger DOF ordering + //Matrix temp2 = Matrix(prod(trans(BSuper), shearD)); + //shearK += prod(temp2, BSuper); + + data.B.clear(); + + // Transfer from Bletzinger B matrix to Kratos B matrix + // Dofs from [w1, w2, w3, px1, ...] to [w1, px1, py1, w2, ...] + for (size_t node = 0; node < 3; node++) + { + data.B(6, 2 + 6 * node) = BSuper(0, node); // w + data.B(6, 3 + 6 * node) = BSuper(0, 3 + node); // phix + data.B(6, 4 + 6 * node) = BSuper(0, 6 + node); // phiy + + data.B(7, 2 + 6 * node) = BSuper(1, node); // w + data.B(7, 3 + 6 * node) = BSuper(1, 3 + node); // phix + data.B(7, 4 + 6 * node) = BSuper(1, 6 + node); // phiy + } + // Add to stiffness matrix + Matrix temp = Matrix(prod(trans(data.B), data.D*integration_weight)); + rLeftHandSideMatrix += prod(temp, data.B); + } + } + + void ShellThickElement3D3N::CalculateSmoothedDSGBMatrix(CalculationData & data) + { + // Use smoothed DSG formulation according to [Nguyen-Thoi et al., 2013] + // + + //meta-triangle centre coords + const double x0 = (data.LCS0.X1() + data.LCS0.X2() + data.LCS0.X3()) / 3.0; + const double y0 = (data.LCS0.Y1() + data.LCS0.Y2() + data.LCS0.Y3()) / 3.0; + + + // Assemble sub triangle coords + std::vector subTriangleXCoords = std::vector(3); + std::vector subTriangleYCoords = std::vector(3); + for (size_t i = 0; i < 3; i++) + { + subTriangleXCoords[i].clear(); + subTriangleYCoords[i].clear(); + subTriangleXCoords[i][0] = x0; + subTriangleYCoords[i][0] = y0; + } + subTriangleXCoords[0][1] = data.LCS0.X1(); //subtri_1 = 0, 1, 2 + subTriangleXCoords[0][2] = data.LCS0.X2(); + subTriangleYCoords[0][1] = data.LCS0.Y1(); + subTriangleYCoords[0][2] = data.LCS0.Y2(); + + subTriangleXCoords[1][1] = data.LCS0.X2(); //subtri_2 = 0, 2, 3 + subTriangleXCoords[1][2] = data.LCS0.X3(); + subTriangleYCoords[1][1] = data.LCS0.Y2(); + subTriangleYCoords[1][2] = data.LCS0.Y3(); + + subTriangleXCoords[2][1] = data.LCS0.X3(); //subtri_3 = 0, 3, 1 + subTriangleXCoords[2][2] = data.LCS0.X1(); + subTriangleYCoords[2][1] = data.LCS0.Y3(); + subTriangleYCoords[2][2] = data.LCS0.Y1(); + + + // The mapping controls how the nodally grouped entries of the virgin + // sub-triangle B matrices are added to the meta-triangle shear B matrix + std::vector matrixMapping = std::vector(3); + matrixMapping[0][0] = 2; // node number, not index (number = index + 1) + matrixMapping[0][1] = 3; + matrixMapping[0][2] = 9; // signify no addition contribution needed + + matrixMapping[1][0] = 9; + matrixMapping[1][1] = 2; + matrixMapping[1][2] = 3; + + matrixMapping[2][0] = 3; + matrixMapping[2][1] = 9; + matrixMapping[2][2] = 2; + + + // Setup variables + Matrix smoothedShearMatrix = Matrix(2, 18, 0.0); + Matrix virginSubTriangleShearMatrix = Matrix(2, 18, 0.0); + Matrix convertedSubTriangleShearMatrix = Matrix(2, 18, 0.0); + double a, b, c, d, subTriangleArea; + + + // Loop over all sub triangles + for (size_t subTriangle = 0; subTriangle < 3; subTriangle++) + { + a = subTriangleXCoords[subTriangle][1] - subTriangleXCoords[subTriangle][0]; //x21 + b = subTriangleYCoords[subTriangle][1] - subTriangleYCoords[subTriangle][0]; //y21 + c = subTriangleYCoords[subTriangle][2] - subTriangleYCoords[subTriangle][0]; //y31 + d = subTriangleXCoords[subTriangle][2] - subTriangleXCoords[subTriangle][0]; //x31 + subTriangleArea = 0.5*(a*c - b*d); + + + // Calculate the DSG shear B matrix for only the current subtriangle + virginSubTriangleShearMatrix.clear(); + CalculateDSGShearBMatrix(virginSubTriangleShearMatrix, a, b, c, d, subTriangleArea); + + + // Setup matrix to store shear B converted from subtriangle DOFs to + // meta-triangle DOFs + convertedSubTriangleShearMatrix.clear(); + + + // Express the subtriangle B matrix in terms of the 3 meta-triangle + // nodes + for (size_t metaNode = 0; metaNode < 3; metaNode++) + { + for (size_t row = 0; row < 2; row++) + { + for (size_t col = 0; col < 6; col++) + { + // add in B_0 / 3.0 for all nodes in B matrix + convertedSubTriangleShearMatrix(row, metaNode * 6 + col) += virginSubTriangleShearMatrix(row, col) / 3.0; + } + } + + if (matrixMapping[subTriangle][metaNode] == 9) + { + // centre point entry. do nothing, entries already covered + // by operation above + } + else + { + // add in new entries + for (size_t row = 0; row < 2; row++) + { + for (size_t col = 0; col < 6; col++) + { + convertedSubTriangleShearMatrix(row, metaNode * 6 + col) += virginSubTriangleShearMatrix(row, 6*(matrixMapping[subTriangle][metaNode] - 1) + col); + } + } + } + } + + // Add subtriangle contribution to overall meta-triangle B matrix + smoothedShearMatrix += (convertedSubTriangleShearMatrix * subTriangleArea); + } + + + // Smooth by averaging over area + smoothedShearMatrix /= data.TotalArea; + smoothedShearMatrix *= (2.0*data.TotalArea); // to nullify data.B/=2A in main pipeline + + // copy over entries to main B matrix + for (size_t row = 0; row < 2; row++) + { + for (size_t col = 0; col < 18; col++) + { + data.B(row + 6, col) = smoothedShearMatrix(row, col); + } + } + } + + void ShellThickElement3D3N::CalculateDSGShearBMatrix(Matrix& shearBMatrix,const double & a, const double & b, const double & c, const double & d, const double & A) + { + //node 1 + shearBMatrix(0, 2) = b - c; + shearBMatrix(0, 4) = A; + + shearBMatrix(1, 2) = d - a; + shearBMatrix(1, 3) = -1.0*A; + + //node 2 + shearBMatrix(0, 8) = c; + shearBMatrix(0, 9) = -1.0 * b*c / 2.0; + shearBMatrix(0, 10) = a*c / 2.0; + + shearBMatrix(1, 8) = -1.0 * d; + shearBMatrix(1, 9) = b*d / 2.0; + shearBMatrix(1, 10) = -1.0 * a*d / 2.0; + + //node 3 + shearBMatrix(0, 14) = -1.0 * b; + shearBMatrix(0, 15) = b*c / 2.0; + shearBMatrix(0, 16) = -b*d / 2.0; + + shearBMatrix(1, 14) = a; + shearBMatrix(1, 15) = -1.0 * a*c / 2.0; + shearBMatrix(1, 16) = a*d / 2.0; + + shearBMatrix /= (2.0*A); + } + + void ShellThickElement3D3N::AddBodyForces(CalculationData& data, VectorType& rRightHandSideVector) + { + // This is hardcoded to use 1 gauss point, despite the declared def + // using 3 gps. + const GeometryType& geom = GetGeometry(); + + // Get shape functions +#ifdef OPT_USES_INTERIOR_GAUSS_POINTS + const Matrix & N = GetGeometry().ShapeFunctionsValues(mThisIntegrationMethod); +#else + // Disabled to use 1 gp below + /* + Matrix N(3, 3); + for (unsigned int igauss = 0; igauss < OPT_NUM_GP; igauss++) + { + const array_1d& loc = data.gpLocations[igauss]; + N(igauss, 0) = 1.0 - loc[1] - loc[2]; + N(igauss, 1) = loc[1]; + N(igauss, 2) = loc[2]; + } + */ + // 1 gp used! + Matrix N(1, 3); + N(0, 0) = 1.0 / 3.0; + N(0, 1) = 1.0 / 3.0; + N(0, 2) = 1.0 / 3.0; + +#endif // !OPT_USES_INTERIOR_GAUSS_POINTS + + // auxiliary + array_1d bf; + + // gauss loop to integrate the external force vector + //for (unsigned int igauss = 0; igauss < OPT_NUM_GP; igauss++) + for (unsigned int igauss = 0; igauss < 1; igauss++) + { + // get mass per unit area + double mass_per_unit_area = mSections[igauss]->CalculateMassPerUnitArea(); + + // interpolate nodal volume accelerations to this gauss point + // and obtain the body force vector + bf.clear(); + for (unsigned int inode = 0; inode < 3; inode++) + { + if (geom[inode].SolutionStepsDataHas(VOLUME_ACCELERATION)) + { + bf += N(igauss, inode) * geom[inode].FastGetSolutionStepValue(VOLUME_ACCELERATION); + } + } + bf *= (mass_per_unit_area * data.dA); + + // add it to the RHS vector + for (unsigned int inode = 0; inode < 3; inode++) + { + unsigned int index = inode * 6; + double iN = N(igauss, inode); + rRightHandSideVector[index + 0] += iN * bf[0]; + rRightHandSideVector[index + 1] += iN * bf[1]; + rRightHandSideVector[index + 2] += iN * bf[2]; + } + } + } + + void ShellThickElement3D3N::CalculateAll(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo, + const bool LHSrequired, + const bool RHSrequired) + { + KRATOS_TRY + // Resize the Left Hand Side if necessary, + // and initialize it to Zero + + if ((rLeftHandSideMatrix.size1() != OPT_NUM_DOFS) || (rLeftHandSideMatrix.size2() != OPT_NUM_DOFS)) + rLeftHandSideMatrix.resize(OPT_NUM_DOFS, OPT_NUM_DOFS, false); + noalias(rLeftHandSideMatrix) = ZeroMatrix(OPT_NUM_DOFS, OPT_NUM_DOFS); + + // Resize the Right Hand Side if necessary, + // and initialize it to Zero + + if (rRightHandSideVector.size() != OPT_NUM_DOFS) + rRightHandSideVector.resize(OPT_NUM_DOFS, false); + noalias(rRightHandSideVector) = ZeroVector(OPT_NUM_DOFS); + + // Initialize common calculation variables + CalculationData data(mpCoordinateTransformation, rCurrentProcessInfo); + data.CalculateLHS = LHSrequired; + data.CalculateRHS = RHSrequired; + InitializeCalculationData(data); + CalculateSectionResponse(data); + + // Calulate element stiffness + Matrix BTD = Matrix(18, 8, 0.0); + data.D *= data.TotalArea; + BTD = prod(trans(data.B), data.D); + noalias(rLeftHandSideMatrix) += prod(BTD, data.B); + if (data.specialDSGc3) + { + CalculateDSGc3Contribution(data, rLeftHandSideMatrix); + } + + //add in z_rot artificial stiffness + double z_rot_multiplier = 0.001; + double max_stiff = 0.0; //max diagonal stiffness + for (int i = 0; i < 18; i++) + { + if (rLeftHandSideMatrix(i, i) > max_stiff) + { + max_stiff = rLeftHandSideMatrix(i, i); + } + } + for (int i = 0; i < 3; i++) + { + rLeftHandSideMatrix(6 * i + 5, 6 * i + 5) = + z_rot_multiplier*max_stiff; + } + + // Add RHS term + rRightHandSideVector -= prod(rLeftHandSideMatrix, data.localDisplacements); + + // Let the CoordinateTransformation finalize the calculation. + // This will handle the transformation of the local matrices/vectors to + // the global coordinate system. + mpCoordinateTransformation->FinalizeCalculations(data.LCS, + data.globalDisplacements, + data.localDisplacements, + rLeftHandSideMatrix, + rRightHandSideVector, + RHSrequired, + LHSrequired); + + // Add body forces contributions. This doesn't depend on the coordinate system + AddBodyForces(data, rRightHandSideVector); + KRATOS_CATCH("") + } + + bool ShellThickElement3D3N::TryGetValueOnIntegrationPoints_MaterialOrientation(const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + // Check the required output + + int ijob = 0; + if (rVariable == MATERIAL_ORIENTATION_DX) + ijob = 1; + else if (rVariable == MATERIAL_ORIENTATION_DY) + ijob = 2; + else if (rVariable == MATERIAL_ORIENTATION_DZ) + ijob = 3; + + // quick return + + if (ijob == 0) return false; + + // resize output + + if (rValues.size() != OPT_NUM_GP) + rValues.resize(OPT_NUM_GP); + + // Compute the local coordinate system. + + ShellT3_LocalCoordinateSystem localCoordinateSystem( + mpCoordinateTransformation->CreateLocalCoordinateSystem()); + + Vector3Type eZ = localCoordinateSystem.Vz(); + + // Gauss Loop + + if (ijob == 1) + { + Vector3Type eX = localCoordinateSystem.Vx(); + for (int i = 0; i < OPT_NUM_GP; i++) + { + QuaternionType q = QuaternionType::FromAxisAngle(eZ(0), eZ(1), eZ(2), mSections[i]->GetOrientationAngle()); + q.RotateVector3(eX, rValues[i]); + } + } + else if (ijob == 2) + { + Vector3Type eY = localCoordinateSystem.Vy(); + for (int i = 0; i < OPT_NUM_GP; i++) + { + QuaternionType q = QuaternionType::FromAxisAngle(eZ(0), eZ(1), eZ(2), mSections[i]->GetOrientationAngle()); + q.RotateVector3(eY, rValues[i]); + } + } + else if (ijob == 3) + { + for (int i = 0; i < OPT_NUM_GP; i++) + { + noalias(rValues[i]) = eZ; + } + } + + return true; + } + + bool ShellThickElement3D3N::TryGetValueOnIntegrationPoints_GeneralizedStrainsOrStresses(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + // Check the required output + int ijob = 0; + bool bGlobal = false; + CheckGeneralizedStressOrStrainOutput(rVariable, ijob, bGlobal); + + // quick return + if (ijob == 0) return false; + + // resize output + if (rValues.size() != OPT_NUM_GP) + rValues.resize(OPT_NUM_GP); + + // Just to store the rotation matrix for visualization purposes + Matrix R(8, 8); + Matrix aux33(3, 3); + + // Initialize common calculation variables + CalculationData data(mpCoordinateTransformation, rCurrentProcessInfo); + if (ijob > 2) + { + data.CalculateLHS = true; // calc constitutive mat for forces/moments + } + else + { + data.CalculateLHS = false; + } + data.CalculateRHS = true; + InitializeCalculationData(data); + + // Get the current displacements in global coordinate system and + // transform to reference local system + ShellT3_LocalCoordinateSystem referenceCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + MatrixType Rdisp(18, 18); + referenceCoordinateSystem.ComputeTotalRotationMatrix(Rdisp); + data.localDisplacements = prod(Rdisp, data.globalDisplacements); + + // set the current integration point index + data.gpIndex = 0; + ShellCrossSection::Pointer& section = mSections[0]; + + // compute strains + noalias(data.generalizedStrains) = prod(data.B, data.localDisplacements); + + //compute forces + if (ijob > 2) + { + if (ijob > 7) + { + //Calculate lamina stresses + CalculateLaminaStrains(data); + CalculateLaminaStresses(data); + } + else + { + CalculateSectionResponse(data); + noalias(data.generalizedStresses) = prod(data.D, data.generalizedStrains); + + if (ijob > 4) + { + // Compute stresses for isotropic materials + CalculateStressesFromForceResultants(data.generalizedStresses, + section->GetThickness()); + } + } + DecimalCorrection(data.generalizedStresses); + } + + // adjust output + DecimalCorrection(data.generalizedStrains); + + // store the results, but first rotate them back to the section + // coordinate system. we want to visualize the results in that system not + // in the element one! + if (section->GetOrientationAngle() != 0.0 && !bGlobal) + { + if (ijob > 7) + { + section->GetRotationMatrixForGeneralizedStresses(-(section->GetOrientationAngle()), R); + for (unsigned int i = 0; i < data.rlaminateStresses.size(); i++) + { + data.rlaminateStresses[i] = prod(R, data.rlaminateStresses[i]); + } + + section->GetRotationMatrixForGeneralizedStrains(-(section->GetOrientationAngle()), R); + for (unsigned int i = 0; i < data.rlaminateStrains.size(); i++) + { + data.rlaminateStrains[i] = prod(R, data.rlaminateStrains[i]); + } + } + else if (ijob > 2) + { + section->GetRotationMatrixForGeneralizedStresses(-(section->GetOrientationAngle()), R); + data.generalizedStresses = prod(R, data.generalizedStresses); + } + else + { + section->GetRotationMatrixForGeneralizedStrains(-(section->GetOrientationAngle()), R); + data.generalizedStrains = prod(R, data.generalizedStrains); + } + } + + // Gauss Loop. + + for (size_t i = 0; i < OPT_NUM_GP; i++) + { + // save results + Matrix & iValue = rValues[i]; + if (iValue.size1() != 3 || iValue.size2() != 3) + iValue.resize(3, 3, false); + + if (ijob == 1) // strains + { + iValue(0, 0) = data.generalizedStrains(0); + iValue(1, 1) = data.generalizedStrains(1); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = 0.5 * data.generalizedStrains(2); + iValue(0, 2) = iValue(2, 0) = 0.5 * data.generalizedStrains(7); + iValue(1, 2) = iValue(2, 1) = 0.5 * data.generalizedStrains(6); + } + else if (ijob == 2) // curvatures + { + iValue(0, 0) = data.generalizedStrains(3); + iValue(1, 1) = data.generalizedStrains(4); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = 0.5 * data.generalizedStrains(5); + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 3) // forces + { + iValue(0, 0) = data.generalizedStresses(0); + iValue(1, 1) = data.generalizedStresses(1); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses(2); + iValue(0, 2) = iValue(2, 0) = data.generalizedStresses(7); + iValue(1, 2) = iValue(2, 1) = data.generalizedStresses(6); + } + else if (ijob == 4) // moments + { + iValue(0, 0) = data.generalizedStresses(3); + iValue(1, 1) = data.generalizedStresses(4); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses(5); + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 5) // SHELL_STRESS_TOP_SURFACE + { + iValue(0, 0) = data.generalizedStresses(0) + + data.generalizedStresses(3); + iValue(1, 1) = data.generalizedStresses(1) + + data.generalizedStresses(4); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses[2] + + data.generalizedStresses[5]; + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 6) // SHELL_STRESS_MIDDLE_SURFACE + { + iValue(0, 0) = data.generalizedStresses(0); + iValue(1, 1) = data.generalizedStresses(1); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses[2]; + iValue(0, 2) = iValue(2, 0) = data.generalizedStresses[6]; + iValue(1, 2) = iValue(2, 1) = data.generalizedStresses[7]; + } + else if (ijob == 7) // SHELL_STRESS_BOTTOM_SURFACE + { + iValue(0, 0) = data.generalizedStresses(0) - + data.generalizedStresses(3); + iValue(1, 1) = data.generalizedStresses(1) - + data.generalizedStresses(4); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses[2] - + data.generalizedStresses[5]; + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 8) // SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE + { + iValue(0, 0) = + data.rlaminateStresses[data.rlaminateStresses.size() - 1][0]; + iValue(1, 1) = + data.rlaminateStresses[data.rlaminateStresses.size() - 1][1]; + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = + data.rlaminateStresses[data.rlaminateStresses.size() - 1][2]; + iValue(0, 2) = iValue(2, 0) = + data.rlaminateStresses[data.rlaminateStresses.size() - 1][6]; + iValue(1, 2) = iValue(2, 1) = + data.rlaminateStresses[data.rlaminateStresses.size() - 1][7]; + } + else if (ijob == 9) // SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE + { + iValue(0, 0) = data.rlaminateStresses[0][0]; + iValue(1, 1) = data.rlaminateStresses[0][1]; + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.rlaminateStresses[0][2]; + iValue(0, 2) = iValue(2, 0) = data.rlaminateStresses[0][6]; + iValue(1, 2) = iValue(2, 1) = data.rlaminateStresses[0][7]; + } + else if (ijob == 99) // SHELL_ORTHOTROPIC_4PLY_THROUGH_THICKNESS + { + // Testing variable to get lamina stress/strain values + // on each surface of a 4 ply laminate + + int surface = 0; // start from top ply top surface + // Output global results sequentially + for (size_t row = 0; row < 3; row++) + { + for (size_t col = 0; col < 3; col++) + { + if (surface > 7) + { + iValue(row, col) = 0.0; + } + else + { + iValue(row, col) = data.rlaminateStrains[surface][6]; + } + surface++; + } + } + + + bool tsai_wu_thru_output = false; + if (tsai_wu_thru_output) + { + std::vector Laminae_Strengths = + std::vector(section->NumberOfPlies()); + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + Laminae_Strengths[ply].resize(3, 3, 0.0); + Laminae_Strengths[ply].clear(); + } + PropertiesType & props = GetProperties(); + section->GetLaminaeStrengths(Laminae_Strengths, props); + Vector ply_orientation(section->NumberOfPlies()); + section->GetLaminaeOrientation(ply_orientation); + + CalculateLaminaStrains(data); + CalculateLaminaStresses(data); + + // Rotate lamina stress from section CS + // to lamina angle to lamina material principal directions + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + double total_rotation = -ply_orientation[ply] - (section->GetOrientationAngle()); // already rotated to section CS + section->GetRotationMatrixForGeneralizedStresses(total_rotation, R); + //top surface of current ply + data.rlaminateStresses[2 * ply] = prod(R, data.rlaminateStresses[2 * ply]); + //bottom surface of current ply + data.rlaminateStresses[2 * ply + 1] = prod(R, data.rlaminateStresses[2 * ply + 1]); + } + + // Calculate Tsai-Wu criterion for each ply + Vector tsai_output = Vector(9, 0.0); + tsai_output.clear(); + double temp_tsai_wu = 0.0; + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + Vector lamina_stress_top = Vector(data.rlaminateStresses[2 * ply]); + Vector lamina_stress_bottom = Vector(data.rlaminateStresses[2 * ply + 1]); + + // top surface + data.rlaminateStresses[2 * ply + 1] = Vector(lamina_stress_top); + temp_tsai_wu = CalculateTsaiWuPlaneStress(data, Laminae_Strengths[ply], ply); + tsai_output[2 * ply] = temp_tsai_wu; + + // bottom surface + data.rlaminateStresses[2 * ply] = Vector(lamina_stress_bottom); + data.rlaminateStresses[2 * ply + 1] = Vector(lamina_stress_bottom); + temp_tsai_wu = CalculateTsaiWuPlaneStress(data, Laminae_Strengths[ply], ply); + tsai_output[2 * ply + 1] = temp_tsai_wu; + } + + //dump into results + + int surface1 = 0; // start from top ply top surface + // Output global results sequentially + for (size_t row = 0; row < 3; row++) + { + for (size_t col = 0; col < 3; col++) + { + if (surface1 > 7) + { + iValue(row, col) = 0.0; + } + else + { + iValue(row, col) = tsai_output[surface1]; + } + surface1++; + } + } + + } // tsai wu output + } + + // if requested, rotate the results in the global coordinate system + if (bGlobal) + { + const Matrix& RG = data.LCS.Orientation(); + noalias(aux33) = prod(trans(RG), iValue); + noalias(iValue) = prod(aux33, RG); + } + } + + OPT_INTERPOLATE_RESULTS_TO_STANDARD_GAUSS_POINTS(rValues); + return true; + } + + void ShellThickElement3D3N::printMatrix(Matrix& matrixIn, std::string stringIn) + { + std::cout << "\n" << stringIn << std::endl; + for (unsigned i = 0; i < matrixIn.size1(); ++i) + { + std::cout << "| "; + for (unsigned j = 0; j < matrixIn.size2(); ++j) + { + std::cout << std::fixed << std::setprecision(2) << std::setw(8) << matrixIn(i, j) << " | "; + } + std::cout << std::endl; + } + std::cout << std::endl; + } + + // ===================================================================================== + // + // Class ShellThickElement3D3N - Serialization + // + // ===================================================================================== + + void ShellThickElement3D3N::save(Serializer& rSerializer) const + { + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Element); + rSerializer.save("CTr", mpCoordinateTransformation); + rSerializer.save("Sec", mSections); + rSerializer.save("IntM", (int)mThisIntegrationMethod); + } + + void ShellThickElement3D3N::load(Serializer& rSerializer) + { + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Element); + rSerializer.load("CTr", mpCoordinateTransformation); + rSerializer.load("Sec", mSections); + int temp; + rSerializer.load("IntM", temp); + mThisIntegrationMethod = (IntegrationMethod)temp; + } +} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D3N.hpp b/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D3N.hpp new file mode 100644 index 000000000000..0c748950ddbb --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D3N.hpp @@ -0,0 +1,432 @@ +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Peter Wilson +// contact: A.Winterstein@tum.de +// + +#if !defined(SHELL_THICK_ELEMENT_3D3N_H_INCLUDED ) +#define SHELL_THICK_ELEMENT_3D3N_H_INCLUDED + + +// System includes + +// External includes + +// Project includes +#include "includes/element.h" +#include "custom_utilities/shell_cross_section.hpp" +#include "custom_utilities/shellt3_local_coordinate_system.hpp" +#include "utilities/quaternion.h" + +namespace Kratos +{ + + + ///@name Kratos Globals + ///@{ + ///@} + + ///@name Type Definitions + ///@{ + ///@} + + class ShellT3_CoordinateTransformation; + + ///@name Enum's + ///@{ + ///@} + + ///@name Functions + ///@{ + ///@} + + ///@name Kratos Classes + ///@{ + + /** \brief ShellThickElement3D3N + * + * This element represents a 3-node Shell element + * based on the Discrete Shear Gap theory (DSG) by Bletzinger. + * This element is formulated for small strains, + * but can be used in Geometrically nonlinear problems + * involving large displacements and rotations + * using a Corotational Coordinate Transformation. + * Material nonlinearity is handled by means of the cross section object. + */ + + /* + Shell formulation reference: + 1. Bletzinger, K.U., Bischoff, M. and Ramm, E., 2000. A unified approach for + shear-locking-free triangular and rectangular shell finite elements. + Computers & Structures, 75(3), pp.321-334. + 2. Rama, G., Marinkovic, D., Zehn, M., 2016. Efficient co-rotational + 3-node shell element. + American Journal of Engineering and Applied Sciences, Volume 9, Issue 2, + Pages 420-431. + */ + + + class ShellThickElement3D3N : public Element + { + public: + + ///@name Type Definitions + ///@{ + + KRATOS_CLASS_POINTER_DEFINITION(ShellThickElement3D3N); + + typedef std::vector< ShellCrossSection::Pointer > CrossSectionContainerType; + + typedef ShellT3_CoordinateTransformation CoordinateTransformationBaseType; + + typedef boost::shared_ptr CoordinateTransformationBasePointerType; + + typedef array_1d Vector3Type; + + typedef Quaternion QuaternionType; + + ///@} + + ///@name Classes + ///@{ + + ///@} + + ///@name Life Cycle + ///@{ + + ShellThickElement3D3N(IndexType NewId, + GeometryType::Pointer pGeometry, + bool NLGeom = false); + + ShellThickElement3D3N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + bool NLGeom = false); + + ShellThickElement3D3N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + CoordinateTransformationBasePointerType pCoordinateTransformation); + + ~ShellThickElement3D3N() override; + + ///@} + + ///@name Operations + ///@{ + + // Basic + + Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override; + + IntegrationMethod GetIntegrationMethod() const override; + + void Initialize() override; + + void ResetConstitutiveLaw() override; + + void EquationIdVector(EquationIdVectorType& rResult, ProcessInfo& rCurrentProcessInfo) override; + + void GetDofList(DofsVectorType& ElementalDofList, ProcessInfo& CurrentProcessInfo) override; + + int Check(const ProcessInfo& rCurrentProcessInfo) override; + + void GetValuesVector(Vector& values, int Step = 0) override; + + void GetFirstDerivativesVector(Vector& values, int Step = 0) override; + + void GetSecondDerivativesVector(Vector& values, int Step = 0) override; + + void InitializeNonLinearIteration(ProcessInfo& CurrentProcessInfo) override; //corotational formulation + + void FinalizeNonLinearIteration(ProcessInfo& CurrentProcessInfo) override; //corotational formulation + + void InitializeSolutionStep(ProcessInfo& CurrentProcessInfo) override; //corotational formulation + + void FinalizeSolutionStep(ProcessInfo& CurrentProcessInfo) override; //corotational formulation + + void CalculateMassMatrix(MatrixType& rMassMatrix, ProcessInfo& rCurrentProcessInfo) override; + + void CalculateDampingMatrix(MatrixType& rDampingMatrix, ProcessInfo& rCurrentProcessInfo) override; + + + void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) override; + + + void CalculateRightHandSide(VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) override; + + // Results calculation on integration points + + + void GetValueOnIntegrationPoints(const Variable& rVariable, std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints(const Variable& rVariable, std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints(const Variable& rVariable, std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints(const Variable >& rVariable, std::vector >& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints(const Variable >& rVariable, std::vector >& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + // More results calculation on integration points to interface with python + void CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateOnIntegrationPoints(const Variable >& rVariable, std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateOnIntegrationPoints(const Variable >& rVariable, std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo); + + // Calculate functions + void Calculate(const Variable& rVariable, + Matrix& Output, + const ProcessInfo& rCurrentProcessInfo) override; + + void Calculate(const Variable& rVariable, + double& Output, + const ProcessInfo& rCurrentProcessInfo) override; + + ///@} + + ///@name Public specialized Access - Temporary + ///@{ + + void SetCrossSectionsOnIntegrationPoints(std::vector< ShellCrossSection::Pointer >& crossSections); + + ///@} + + protected: + + ///@name Protected Lyfe Cycle + ///@{ + + /** + * Protected empty constructor + */ + ShellThickElement3D3N() : Element() + { + } + + ///@} + + private: + + ///@name Private Classes + ///@{ + + class CalculationData + { + + public: + + // --------------------------------------- + // calculation-constant data + // ---------------------------------------- + // these data are allocated and constructed + // at the beginning of the calculation + + ShellT3_LocalCoordinateSystem LCS0; /*!< reference coordinate system */ + ShellT3_LocalCoordinateSystem LCS; /*!< current coordinate system */ + + double dA; + double hMean; + double TotalArea; + + std::vector< array_1d > gpLocations; + + MatrixType dNxy = ZeroMatrix(3, 2); /*!< shape function cartesian derivatives */ + VectorType N = ZeroVector(3); /*!< shape function vector at the current integration point */ + + VectorType globalDisplacements = ZeroVector(18); /*!< global displacement vector */ + VectorType localDisplacements = ZeroVector(18); /*!< local displacement vector */ + + bool CalculateRHS; /*!< flag for the calculation of the right-hand-side vector */ + bool CalculateLHS; /*!< flag for the calculation of the left-hand-side vector */ + + const bool parabolic_composite_transverse_shear_strains = false; + + // --------------------------------------- + // Testing flags + // --------------------------------------- + // These should all be FALSE unless you are testing, or + // investigating the effects of element enhancements! + + const bool basicTriCST = false; // bool to use basic CST + // displacement-based shear formulation. This should be FALSE unless + // you are testing + + const bool ignore_shear_stabilization = false; // bool to + // ignore stabilizing the transverse shear part of the material + // matrix. This should be false unless you are testing + + const bool smoothedDSG = false; // bool to use smoothed DSG + // formulation according to [Nguyen-Thoi et al., 2013]. + // This should be false unless you are testing + + const bool specialDSGc3 = false; // bool to use experimental + // DSGc3 formulation not yet complete. + // This should be false unless you are testing + + // --------------------------------------- + // calculation-variable data + // --------------------------------------- + // these data are updated during the + // calculations + + size_t gpIndex; + + // --------------------------------------- + // calculation-variable data + // --------------------------------------- + // these data are updated during the + // calculations, but they are allocated + // only once(the first time they are used) + // to avoid useless re-allocations + + MatrixType B = ZeroMatrix(8, 18); /*!< total strain-displacement matrix at the current integration point */ + + double h_e; /*!< longest edge of triangle */ + double alpha = 0.1; // modifier of shear material matrix stabilization parameter + // refer Lyly(1993) + double shearStabilisation; + + Matrix D = ZeroMatrix(8, 8); /*!< section constitutive matrix at the current integration point */ + + VectorType generalizedStrains = ZeroVector(8); /*!< generalized strain vector at the current integration point */ + + VectorType generalizedStresses = ZeroVector(8); /*!< generalized stress vector at the current integration point */ + + ShellCrossSection::SectionParameters SectionParameters; /*!< parameters for cross section calculations */ + + std::vector rlaminateStrains; + + std::vector rlaminateStresses; + + public: + + const ProcessInfo& CurrentProcessInfo; + + public: + + CalculationData(const CoordinateTransformationBasePointerType& pCoordinateTransformation, + const ProcessInfo& rCurrentProcessInfo); + + }; + + ///@} + + ///@name Private Operations + ///@{ + void CalculateStressesFromForceResultants + (VectorType& rstresses, + const double& rthickness); + + void CalculateLaminaStrains(CalculationData& data); + + void CalculateLaminaStresses(CalculationData& data); + + double CalculateTsaiWuPlaneStress(const CalculationData& data, const Matrix& rLamina_Strengths, const unsigned int& rCurrent_Ply); + + void CalculateVonMisesStress(const CalculationData& data, const Variable& rVariable, double& rVon_Mises_Result); + + void CalculateShellElementEnergy(const CalculationData& data, const Variable& rVariable, double& rEnergy_Result); + + void CheckGeneralizedStressOrStrainOutput(const Variable& rVariable, int& iJob, bool& bGlobal); + + void DecimalCorrection(Vector& a); + + void SetupOrientationAngles(); + + void CalculateSectionResponse(CalculationData& data); + + void InitializeCalculationData(CalculationData& data); + + void CalculateDSGc3Contribution(CalculationData& data, MatrixType& rLeftHandSideMatrix); + + void CalculateSmoothedDSGBMatrix(CalculationData& data); + + void CalculateDSGShearBMatrix(Matrix& shearBMatrix, const double& a, const double& b, const double& c, const double& d, const double& A); + + void AddBodyForces(CalculationData& data, VectorType& rRightHandSideVector); + + void CalculateAll(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo, + const bool LHSrequired, + const bool RHSrequired); + + bool TryGetValueOnIntegrationPoints_MaterialOrientation(const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo); + + bool TryGetValueOnIntegrationPoints_GeneralizedStrainsOrStresses(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo); + + ///@} + + ///@name Static Member Variables + ///@{ + ///@} + + ///@name Member Variables + ///@{ + + CoordinateTransformationBasePointerType mpCoordinateTransformation; /*!< The Coordinate Transformation */ + + CrossSectionContainerType mSections; /*!< Container for cross section associated to each integration point */ + + IntegrationMethod mThisIntegrationMethod; /*!< Currently selected integration method */ + + double mOrthotropicSectionRotation = 0.0; /*!< In-plane rotation angle for orthotropic section */ + + ///@} + + ///@name Serialization + ///@{ + void printMatrix(Matrix& matrixIn, std::string stringIn); + + + friend class Serializer; + + void save(Serializer& rSerializer) const override; + + void load(Serializer& rSerializer) override; + + ///@} + + ///@name Private Access + ///@{ + ///@} + + ///@name Private Inquiry + ///@{ + ///@} + + ///@name Un accessible methods + ///@{ + ///@} + + }; + +} +#endif // SHELL_THICK_ELEMENT_3D3N_H_INCLUDED \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D4N.cpp b/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D4N.cpp index c7a394a34ef1..e8ad92a6085e 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D4N.cpp +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_thick_element_3D4N.cpp @@ -1141,7 +1141,7 @@ void ShellThickElement3D4N::CalculateAll(MatrixType& rLeftHandSideMatrix, // Initialize parameters for the cross section calculation - ShellCrossSection::Parameters parameters(geom, props, rCurrentProcessInfo); + ShellCrossSection::SectionParameters parameters(geom, props, rCurrentProcessInfo); parameters.SetGeneralizedStrainVector( generalizedStrains ); parameters.SetGeneralizedStressVector( generalizedStresses ); parameters.SetConstitutiveMatrix( D ); @@ -1461,7 +1461,7 @@ bool ShellThickElement3D4N::TryGetValueOnIntegrationPoints_GeneralizedStrainsOrS // Initialize parameters for the cross section calculation - ShellCrossSection::Parameters parameters(geom, props, rCurrentProcessInfo); + ShellCrossSection::SectionParameters parameters(geom, props, rCurrentProcessInfo); parameters.SetGeneralizedStrainVector( generalizedStrains ); parameters.SetGeneralizedStressVector( generalizedStresses ); parameters.SetConstitutiveMatrix( D ); diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D3N.hpp b/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D3N.hpp index b099e4a3d8cf..7477c5135aa1 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D3N.hpp +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D3N.hpp @@ -266,7 +266,7 @@ class ShellThinElement3D3N : public Element VectorType H4; MatrixType Bb; - ShellCrossSection::Parameters SectionParameters; /*!< parameters for cross section calculations */ + ShellCrossSection::SectionParameters SectionParameters; /*!< parameters for cross section calculations */ array_1d< Vector3Type, 3 > Sig; diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D4N.cpp b/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D4N.cpp new file mode 100644 index 000000000000..c253f3961e8a --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D4N.cpp @@ -0,0 +1,3200 @@ +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Peter Wilson +// Contact: A.Winterstein@tum.de +// + +#include "shell_thin_element_3D4N.hpp" +#include "custom_utilities/shellq4_corotational_coordinate_transformation.hpp" +#include "structural_mechanics_application_variables.h" + +#include "custom_constitutive/linear_elastic_orthotropic_2D_law.hpp" + +#include "geometries/quadrilateral_3d_4.h" + +#include +#include + +/* +Element overview:--------------------------------------------------------------- +This element represents a 4-node Shell element. +The membrane part is Felippa's assumed Natural DEviatoric Strain (ANDES) +formulation, while the bending part is the Discrete Kirchhoff Quadrilateral. +This element is formulated for small strains, +but can be used in Geometrically nonlinear problems +involving large displacements and rotations +using a Corotational Coordinate Transformation. +Material nonlinearity is handled by means of the cross section object. + + + +Shell formulation references:--------------------------------------------------- +ANDES formulation: +Bjorn Haugen. "Buckling and Stability Problems for Thin Shell Structures +Using High Performance Finite Elements". Dissertation. Colorado: University +of Colorado, 1994. + +ANDES filter matrix H modification as per: +Carlos A Felippa. "Supernatural QUAD4: a template formulation". In: Computer +methods in applied mechanics and engineering 195.41 (2006), pp. 5316-5342. + +DKQ original formulation: +Jean-Louis Batoz and Mabrouk Ben Tahar. "Evaluation of a new quadrilateral +thin plate bending element". In: International Journal for Numerical Methods +in Engineering 18.11 (1982), pp. 1655-1677. + +Clearly presented DKQ formulation: +Fabian Rojas Barrales. "Development of a nonlinear quadrilateral layered +membrane element with drilling degrees of freedom and a nonlinear +quadrilateral thin flat layered shell element for the modeling of reinforced +concrete walls". Dissertation. Los Angeles, California: University of +Southern California, 2012. +*/ + +namespace Kratos +{ + namespace Utilities + { + template + inline void ShapeFunc(double xi, double eta, TVec & N) + { + N(0) = 0.25 * (1.0 - xi) * (1.0 - eta); // node 1 + N(1) = 0.25 * (1.0 + xi) * (1.0 - eta); // node 2 + N(2) = 0.25 * (1.0 + xi) * (1.0 + eta); // node 3 + N(3) = 0.25 * (1.0 - xi) * (1.0 + eta); // node 4 + } + + template + inline void ShapeFunc_NaturalDerivatives(double xi, double eta, + TMat & dN) + { + dN(0, 0) = -(1.0 - eta) * 0.25; + dN(1, 0) = (1.0 - eta) * 0.25; + dN(2, 0) = (1.0 + eta) * 0.25; + dN(3, 0) = -(1.0 + eta) * 0.25; + + dN(0, 1) = -(1.0 - xi) * 0.25; + dN(1, 1) = -(1.0 + xi) * 0.25; + dN(2, 1) = (1.0 + xi) * 0.25; + dN(3, 1) = (1.0 - xi) * 0.25; + } + + inline double dN_seren_dxi(const int actualNodeNumber,const double xi, + const double eta) + { + // Natural derivatives of 8-node serendipity shape functions + + double returnValue; + switch (actualNodeNumber) + { + case 1: + returnValue = -(-eta + 1.0)*(-0.25*xi + 0.25) - + 0.25*(-eta + 1.0)*(-eta - xi - 1.0); + break; + case 2: + returnValue = (-eta + 1.0)*(0.25*xi + 0.25) + + 0.25*(-eta + 1.0)*(-eta + xi - 1.0); + break; + case 3: + returnValue = (eta + 1.0)*(0.25*xi + 0.25) + + 0.25*(eta + 1.0)*(eta + xi - 1.0); + break; + case 4: + returnValue = -(eta + 1.0)*(-0.25*xi + 0.25) - + 0.25*(eta + 1.0)*(eta - xi - 1.0); + break; + case 5: + returnValue = -1.0*xi*(-eta + 1.0); + break; + case 6: + returnValue = -0.5*eta*eta + 0.5; + break; + case 7: + returnValue = -1.0*xi*(eta + 1.0); + break; + case 8: + returnValue = 0.5*eta*eta - 0.5; + break; + default: + KRATOS_ERROR << + "Error: ELEMENT ShellThinElement3D4N, METHOD dN_seren_dxi" + << std::endl; + } + + return returnValue; + } + + inline double dN_seren_deta(const int actualNodeNumber,const double xi, + const double eta) + { + // Natural derivatives of 8-node serendipity shape functions + + double returnValue; + switch (actualNodeNumber) + { + case 1: + returnValue = -(-eta + 1.0)*(-0.25*xi + 0.25) - + (-0.25*xi + 0.25)*(-eta - xi - 1.0); + break; + case 2: + returnValue = -(-eta + 1.0)*(0.25*xi + 0.25) - + (0.25*xi + 0.25)*(-eta + xi - 1.0); + break; + case 3: + returnValue = (eta + 1.0)*(0.25*xi + 0.25) + + (0.25*xi + 0.25)*(eta + xi - 1.0); + break; + case 4: + returnValue = (eta + 1.0)*(-0.25*xi + 0.25) + + (-0.25*xi + 0.25)*(eta - xi - 1.0); + break; + case 5: + returnValue = 0.5*xi*xi - 0.5; + break; + case 6: + returnValue = -1.0*eta*(xi + 1.0); + break; + case 7: + returnValue = -0.5*xi*xi + 0.5; + break; + case 8: + returnValue = -1.0*eta*(-xi + 1.0); + break; + default: + KRATOS_ERROR << + "Error: ELEMENT ShellThinElement3D4N, METHOD dN_seren_dxi" + << std::endl; + } + + return returnValue; + } + } + + // ========================================================================= + // + // Definitions + // + // ========================================================================= + + #define OPT_NUM_NODES 4 + #define OPT_STRAIN_SIZE 6 + #define OPT_NUM_DOFS 24 + #define OPT_NUM_GP 4 + + // ========================================================================= + // + // Class JacobianOperator + // + // ========================================================================= + + ShellThinElement3D4N::JacobianOperator::JacobianOperator() + : mJac(2, 2, 0.0) + , mInv(2, 2, 0.0) + , mXYDeriv(4, 2, 0.0) + , mDet(0.0) + { + } + + void ShellThinElement3D4N::JacobianOperator::Calculate + (const ShellQ4_LocalCoordinateSystem & CS, const Matrix & dN) + { + mJac(0, 0) = dN(0, 0) * CS.X1() + dN(1, 0) * CS.X2() + + dN(2, 0) * CS.X3() + dN(3, 0) * CS.X4(); + mJac(0, 1) = dN(0, 0) * CS.Y1() + dN(1, 0) * CS.Y2() + + dN(2, 0) * CS.Y3() + dN(3, 0) * CS.Y4(); + mJac(1, 0) = dN(0, 1) * CS.X1() + dN(1, 1) * CS.X2() + + dN(2, 1) * CS.X3() + dN(3, 1) * CS.X4(); + mJac(1, 1) = dN(0, 1) * CS.Y1() + dN(1, 1) * CS.Y2() + + dN(2, 1) * CS.Y3() + dN(3, 1) * CS.Y4(); + + mDet = mJac(0, 0) * mJac(1, 1) - mJac(1, 0) * mJac(0, 1); + double mult = 1.0 / mDet; + + mInv(0, 0) = mJac(1, 1) * mult; + mInv(0, 1) = -mJac(0, 1) * mult; + mInv(1, 0) = -mJac(1, 0) * mult; + mInv(1, 1) = mJac(0, 0) * mult; + + noalias(mXYDeriv) = prod(dN, trans(mInv)); + } + + // ========================================================================= + // + // Class ShellThinElement3D4N + // + // ========================================================================= + + ShellThinElement3D4N::ShellThinElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry, + bool NLGeom) + : Element(NewId, pGeometry) + , mpCoordinateTransformation(NLGeom ? + new ShellQ4_CorotationalCoordinateTransformation(pGeometry) : + new ShellQ4_CoordinateTransformation(pGeometry)) + { + mThisIntegrationMethod = GetGeometry().GetDefaultIntegrationMethod(); + } + + ShellThinElement3D4N::ShellThinElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + bool NLGeom) + : Element(NewId, pGeometry, pProperties) + , mpCoordinateTransformation(NLGeom ? + new ShellQ4_CorotationalCoordinateTransformation(pGeometry) : + new ShellQ4_CoordinateTransformation(pGeometry)) + { + mThisIntegrationMethod = GetGeometry().GetDefaultIntegrationMethod(); + } + + ShellThinElement3D4N::ShellThinElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + CoordinateTransformationBasePointerType pCoordinateTransformation) + : Element(NewId, pGeometry, pProperties) + , mpCoordinateTransformation(pCoordinateTransformation) + { + mThisIntegrationMethod = GetGeometry().GetDefaultIntegrationMethod(); + } + + ShellThinElement3D4N::~ShellThinElement3D4N() + { + } + + //Basic methods + + Element::Pointer ShellThinElement3D4N::Create(IndexType NewId, + NodesArrayType const& ThisNodes, + PropertiesType::Pointer pProperties) const + { + GeometryType::Pointer newGeom(GetGeometry().Create(ThisNodes)); + return boost::make_shared< ShellThinElement3D4N >(NewId, newGeom, + pProperties, mpCoordinateTransformation->Create(newGeom)); + } + + ShellThinElement3D4N::IntegrationMethod + ShellThinElement3D4N::GetIntegrationMethod() const + { + return mThisIntegrationMethod; + } + + void ShellThinElement3D4N::Initialize() + { + KRATOS_TRY + + const GeometryType & geom = GetGeometry(); + PropertiesType & props = GetProperties(); + + if (geom.PointsNumber() != OPT_NUM_NODES) + KRATOS_THROW_ERROR(std::logic_error, + "ShellThinElement3D4N Element - Wrong number of nodes", + geom.PointsNumber()); + + const GeometryType::IntegrationPointsArrayType & integrationPoints = + geom.IntegrationPoints(GetIntegrationMethod()); + if (integrationPoints.size() != OPT_NUM_GP) + KRATOS_THROW_ERROR(std::logic_error, + "ShellThinElement3D4N Element - Wrong integration scheme", + integrationPoints.size()); + + if (mSections.size() != OPT_NUM_GP) + { + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + + ShellCrossSection::Pointer theSection; + + if (props.Has(SHELL_CROSS_SECTION)) + { + theSection = props[SHELL_CROSS_SECTION]; + } + else if (theSection->CheckIsOrthotropic(props)) + { + // make new instance of shell cross section + theSection = + ShellCrossSection::Pointer(new ShellCrossSection()); + + // Assign orthotropic material law for entire element + LinearElasticOrthotropic2DLaw OrthoLaw; + props.SetValue(CONSTITUTIVE_LAW, OrthoLaw.Clone()); + + // Parse material properties for each layer + Element* thisElement = this; + theSection->ParseOrthotropicPropertyMatrix(props, thisElement); + } + else + { + theSection = + ShellCrossSection::Pointer(new ShellCrossSection()); + theSection->BeginStack(); + theSection->AddPly(props[THICKNESS], 0.0, 5, + this->pGetProperties()); + theSection->EndStack(); + } + + mSections.clear(); + for (int i = 0; i < OPT_NUM_GP; i++) + { + ShellCrossSection::Pointer sectionClone = theSection->Clone(); + sectionClone->SetSectionBehavior(ShellCrossSection::Thin); + sectionClone->InitializeCrossSection(props, geom, + row(shapeFunctionsValues, i)); + mSections.push_back(sectionClone); + } + } + + mpCoordinateTransformation->Initialize(); + + this->SetupOrientationAngles(); + + KRATOS_CATCH("") + } + + void ShellThinElement3D4N::EquationIdVector(EquationIdVectorType& rResult, + ProcessInfo& rCurrentProcessInfo) + { + if (rResult.size() != OPT_NUM_DOFS) + rResult.resize(OPT_NUM_DOFS, false); + + GeometryType & geom = this->GetGeometry(); + + for (SizeType i = 0; i < geom.size(); i++) + { + int index = i * 6; + NodeType & iNode = geom[i]; + + rResult[index] = iNode.GetDof(DISPLACEMENT_X).EquationId(); + rResult[index + 1] = iNode.GetDof(DISPLACEMENT_Y).EquationId(); + rResult[index + 2] = iNode.GetDof(DISPLACEMENT_Z).EquationId(); + + rResult[index + 3] = iNode.GetDof(ROTATION_X).EquationId(); + rResult[index + 4] = iNode.GetDof(ROTATION_Y).EquationId(); + rResult[index + 5] = iNode.GetDof(ROTATION_Z).EquationId(); + } + } + + void ShellThinElement3D4N::GetDofList(DofsVectorType& ElementalDofList, + ProcessInfo& CurrentProcessInfo) + { + ElementalDofList.resize(0); + ElementalDofList.reserve(OPT_NUM_DOFS); + + GeometryType & geom = this->GetGeometry(); + + for (SizeType i = 0; i < geom.size(); i++) + { + NodeType & iNode = geom[i]; + + ElementalDofList.push_back(iNode.pGetDof(DISPLACEMENT_X)); + ElementalDofList.push_back(iNode.pGetDof(DISPLACEMENT_Y)); + ElementalDofList.push_back(iNode.pGetDof(DISPLACEMENT_Z)); + + ElementalDofList.push_back(iNode.pGetDof(ROTATION_X)); + ElementalDofList.push_back(iNode.pGetDof(ROTATION_Y)); + ElementalDofList.push_back(iNode.pGetDof(ROTATION_Z)); + } + } + + int ShellThinElement3D4N::Check(const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY + + GeometryType& geom = GetGeometry(); + + // verify that the variables are correctly initialized + if (DISPLACEMENT.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "DISPLACEMENT has Key zero! (check if the application is correctly registered", ""); + + if (ROTATION.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "ROTATION has Key zero! (check if the application is correctly registered", ""); + + if (VELOCITY.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "VELOCITY has Key zero! (check if the application is correctly registered", ""); + + if (ACCELERATION.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "ACCELERATION has Key zero! (check if the application is correctly registered", ""); + + if (DENSITY.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "DENSITY has Key zero! (check if the application is correctly registered", ""); + + if (SHELL_CROSS_SECTION.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "SHELL_CROSS_SECTION has Key zero! (check if the application is correctly registered", ""); + + if (THICKNESS.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "THICKNESS has Key zero! (check if the application is correctly registered", ""); + + if (CONSTITUTIVE_LAW.Key() == 0) + KRATOS_THROW_ERROR(std::invalid_argument, + "CONSTITUTIVE_LAW has Key zero! (check if the application is correctly registered", ""); + + // verify that the dofs exist + for (unsigned int i = 0; i < geom.size(); i++) + { + if (geom[i].SolutionStepsDataHas(DISPLACEMENT) == false) + KRATOS_THROW_ERROR(std::invalid_argument, + "missing variable DISPLACEMENT on node ", geom[i].Id()); + + if (geom[i].HasDofFor(DISPLACEMENT_X) == false || + geom[i].HasDofFor(DISPLACEMENT_Y) == false || + geom[i].HasDofFor(DISPLACEMENT_Z) == false) + KRATOS_THROW_ERROR(std::invalid_argument, + "missing one of the dofs for the variable DISPLACEMENT on node ", + GetGeometry()[i].Id()); + + if (geom[i].SolutionStepsDataHas(ROTATION) == false) + KRATOS_THROW_ERROR(std::invalid_argument, + "missing variable ROTATION on node ", geom[i].Id()); + + if (geom[i].HasDofFor(ROTATION_X) == false || + geom[i].HasDofFor(ROTATION_Y) == false || + geom[i].HasDofFor(ROTATION_Z) == false) + KRATOS_THROW_ERROR(std::invalid_argument, + "missing one of the dofs for the variable ROTATION on node ", + geom[i].Id()); + + if (geom[i].GetBufferSize() < 2) + KRATOS_THROW_ERROR(std::logic_error, + "This Element needs at least a buffer size = 2", ""); + } + + // check properties + if (this->pGetProperties() == NULL) + KRATOS_THROW_ERROR(std::logic_error, + "Properties not provided for element ", this->Id()); + + const PropertiesType & props = this->GetProperties(); + + if (props.Has(SHELL_CROSS_SECTION)) + { + // if the user specified a cross section... + + const ShellCrossSection::Pointer & section = + props[SHELL_CROSS_SECTION]; + if (section == NULL) + KRATOS_THROW_ERROR(std::logic_error, + "SHELL_CROSS_SECTION not provided for element ", + this->Id()); + + section->Check(props, geom, rCurrentProcessInfo); + } + else if (props.Has(SHELL_ORTHOTROPIC_LAYERS)) + { + // perform orthotropic check later in shell_cross_section + } + else + { + // ... allow the automatic creation of a homogeneous section from a + // material and a thickness + + if (!props.Has(CONSTITUTIVE_LAW)) + KRATOS_THROW_ERROR(std::logic_error, + "CONSTITUTIVE_LAW not provided for element ", this->Id()); + + const ConstitutiveLaw::Pointer& claw = props[CONSTITUTIVE_LAW]; + + if (claw == NULL) + KRATOS_THROW_ERROR(std::logic_error, + "CONSTITUTIVE_LAW not provided for element ", this->Id()); + + if (!props.Has(THICKNESS)) + KRATOS_THROW_ERROR(std::logic_error, + "THICKNESS not provided for element ", this->Id()); + + if (props[THICKNESS] <= 0.0) + KRATOS_THROW_ERROR(std::logic_error, + "wrong THICKNESS value provided for element ", this->Id()); + + ShellCrossSection::Pointer dummySection = + ShellCrossSection::Pointer(new ShellCrossSection()); + dummySection->BeginStack(); + dummySection->AddPly(props[THICKNESS], 0.0, 5, + this->pGetProperties()); + dummySection->EndStack(); + dummySection->SetSectionBehavior(ShellCrossSection::Thin); + dummySection->Check(props, geom, rCurrentProcessInfo); + } + + return 0; + + KRATOS_CATCH("") + } + + void ShellThinElement3D4N::CleanMemory() + { + } + + void ShellThinElement3D4N::GetFirstDerivativesVector(Vector& values, + int Step) + { + if (values.size() != 24) + values.resize(24, false); + + const GeometryType & geom = GetGeometry(); + + for (int i = 0; i < 4; i++) + { + const NodeType & iNode = geom[i]; + const array_1d& vel = + iNode.FastGetSolutionStepValue(VELOCITY, Step); + + int index = i * 6; + values[index] = vel[0]; + values[index + 1] = vel[1]; + values[index + 2] = vel[2]; + values[index + 3] = 0.0; + values[index + 4] = 0.0; + values[index + 5] = 0.0; + } + } + + void ShellThinElement3D4N::GetSecondDerivativesVector(Vector& values, + int Step) + { + if (values.size() != 24) + values.resize(24, false); + + const GeometryType & geom = GetGeometry(); + + for (int i = 0; i < 4; i++) + { + const NodeType & iNode = geom[i]; + const array_1d& acc = + iNode.FastGetSolutionStepValue(ACCELERATION, Step); + + int index = i * 6; + values[index] = acc[0]; + values[index + 1] = acc[1]; + values[index + 2] = acc[2]; + values[index + 3] = 0.0; + values[index + 4] = 0.0; + values[index + 5] = 0.0; + } + } + + void ShellThinElement3D4N::GetValuesVector(Vector& values, int Step) + { + if (values.size() != 24) + values.resize(24, false); + + const GeometryType & geom = GetGeometry(); + + for (int i = 0; i < 4; i++) + { + const NodeType & iNode = geom[i]; + const array_1d& disp = + iNode.FastGetSolutionStepValue(DISPLACEMENT, Step); + const array_1d& rot = + iNode.FastGetSolutionStepValue(ROTATION, Step); + + int index = i * 6; + values[index] = disp[0]; + values[index + 1] = disp[1]; + values[index + 2] = disp[2]; + + values[index + 3] = rot[0]; + values[index + 4] = rot[1]; + values[index + 5] = rot[2]; + } + } + + void ShellThinElement3D4N::InitializeNonLinearIteration + (ProcessInfo& CurrentProcessInfo) + { + mpCoordinateTransformation-> + InitializeNonLinearIteration(CurrentProcessInfo); + + const GeometryType & geom = this->GetGeometry(); + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + for (int i = 0; i < 4; i++) + mSections[i]->InitializeNonLinearIteration(GetProperties(), geom, + row(shapeFunctionsValues, i), CurrentProcessInfo); + } + + void ShellThinElement3D4N::FinalizeNonLinearIteration + (ProcessInfo& CurrentProcessInfo) + { + mpCoordinateTransformation-> + FinalizeNonLinearIteration(CurrentProcessInfo); + + const GeometryType & geom = this->GetGeometry(); + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + for (int i = 0; i < 4; i++) + mSections[i]->FinalizeNonLinearIteration(GetProperties(), geom, + row(shapeFunctionsValues, i), CurrentProcessInfo); + } + + void ShellThinElement3D4N::InitializeSolutionStep + (ProcessInfo& CurrentProcessInfo) + { + PropertiesType& props = GetProperties(); + const GeometryType & geom = GetGeometry(); + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + + for (int i = 0; i < 4; i++) + mSections[i]->InitializeSolutionStep(props, geom, + row(shapeFunctionsValues, i), CurrentProcessInfo); + + mpCoordinateTransformation->InitializeSolutionStep(CurrentProcessInfo); + } + + void ShellThinElement3D4N::FinalizeSolutionStep + (ProcessInfo& CurrentProcessInfo) + { + const PropertiesType& props = GetProperties(); + const GeometryType& geom = GetGeometry(); + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + + for (int i = 0; i < 4; i++) + mSections[i]->FinalizeSolutionStep(props, geom, + row(shapeFunctionsValues, i), CurrentProcessInfo); + + mpCoordinateTransformation->FinalizeSolutionStep(CurrentProcessInfo); + } + + void ShellThinElement3D4N::CalculateMassMatrix(MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo) + { + if ((rMassMatrix.size1() != 24) || (rMassMatrix.size2() != 24)) + rMassMatrix.resize(24, 24, false); + noalias(rMassMatrix) = ZeroMatrix(24, 24); + + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Average mass per unit area over the whole element + double av_mass_per_unit_area = 0.0; + + // Flag for consistent or lumped mass matrix + bool bconsistent_matrix = false; + + // Consistent mass matrix + if (bconsistent_matrix) + { + // Get shape function values and setup jacobian + GeometryType & geom = GetGeometry(); + const Matrix & shapeFunctions = geom.ShapeFunctionsValues(); + JacobianOperator jacOp; + + // Get integration points + const GeometryType::IntegrationPointsArrayType& integration_points = + GetGeometry().IntegrationPoints(mThisIntegrationMethod); + + // Setup matrix of shape functions + Matrix N = Matrix(6, 24, 0.0); + + // Other variables + double dA = 0.0; + double thickness = 0.0; + double drilling_factor = 1.0; // sqrt of the actual factor applied, + // 1.0 is no reduction. + + // Gauss loop + for (size_t gauss_point = 0; gauss_point < 4; gauss_point++) + { + // Calculate average mass per unit area and thickness at the + // current GP + av_mass_per_unit_area = + mSections[gauss_point]->CalculateMassPerUnitArea(); + thickness = mSections[gauss_point]->GetThickness(); + + // Calc jacobian and weighted dA at current GP + jacOp.Calculate(referenceCoordinateSystem, + geom.ShapeFunctionLocalGradient(gauss_point)); + dA = integration_points[gauss_point].Weight() * + jacOp.Determinant(); + + // Assemble shape function matrix over nodes + for (size_t node = 0; node < 4; node++) + { + // translational entries - dofs 1, 2, 3 + for (size_t dof = 0; dof < 3; dof++) + { + N(dof, 6 * node + dof) = + shapeFunctions(gauss_point, node); + } + + // rotational inertia entries - dofs 4, 5 + for (size_t dof = 0; dof < 2; dof++) + { + N(dof + 3, 6 * node + dof + 3) = + thickness / std::sqrt(12.0) * + shapeFunctions(gauss_point, node); + } + + // drilling rotational entry - artifical factor included + N(5, 6 * node + 5) = thickness / std::sqrt(12.0) * + shapeFunctions(gauss_point, node) / + drilling_factor; + } + + // Add contribution to total mass matrix + rMassMatrix += prod(trans(N), N)*dA*av_mass_per_unit_area; + } + + }// Consistent mass matrix + else + { + // Lumped mass matrix + + // Calculate average mass per unit area over the whole element + for (size_t i = 0; i < 4; i++) + av_mass_per_unit_area += mSections[i]->CalculateMassPerUnitArea(); + av_mass_per_unit_area /= 4.0; + + // lumped area + double lump_area = referenceCoordinateSystem.Area() / 4.0; + + // Gauss Loop + for (size_t i = 0; i < 4; i++) + { + size_t index = i * 6; + + double nodal_mass = av_mass_per_unit_area * lump_area; + + // translational mass + rMassMatrix(index, index) = nodal_mass; + rMassMatrix(index + 1, index + 1) = nodal_mass; + rMassMatrix(index + 2, index + 2) = nodal_mass; + + // rotational mass - neglected for the moment... + } + }// Lumped mass matrix + } + + void ShellThinElement3D4N::CalculateDampingMatrix + (MatrixType& rDampingMatrix, ProcessInfo& rCurrentProcessInfo) + { + if ((rDampingMatrix.size1() != 24) || (rDampingMatrix.size2() != 24)) + rDampingMatrix.resize(24, 24, false); + + noalias(rDampingMatrix) = ZeroMatrix(24, 24); + } + + void ShellThinElement3D4N::AddBodyForces(CalculationData& data, + VectorType& rRightHandSideVector) + { + const GeometryType& geom = GetGeometry(); + + // Get shape functions + const Matrix & N = geom.ShapeFunctionsValues(); + + // auxiliary + array_1d bf; + + // gauss loop to integrate the external force vector + for (unsigned int igauss = 0; igauss < 4; igauss++) + { + // get mass per unit area + double mass_per_unit_area = + mSections[igauss]->CalculateMassPerUnitArea(); + + // interpolate nodal volume accelerations to this gauss point + // and obtain the body force vector + bf.clear(); + for (unsigned int inode = 0; inode < 4; inode++) + { + if (geom[inode].SolutionStepsDataHas(VOLUME_ACCELERATION)) + //temporary, will be checked once at the beginning only + bf += N(igauss, inode) * + geom[inode].FastGetSolutionStepValue(VOLUME_ACCELERATION); + } + bf *= (mass_per_unit_area * data.dA[igauss]); + + // add it to the RHS vector + for (unsigned int inode = 0; inode < 4; inode++) + { + unsigned int index = inode * 6; + double iN = N(igauss, inode); + rRightHandSideVector[index + 0] += iN * bf[0]; + rRightHandSideVector[index + 1] += iN * bf[1]; + rRightHandSideVector[index + 2] += iN * bf[2]; + } + } + } + + void ShellThinElement3D4N::CalculateLocalSystem + (MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) + { + CalculateAll(rLeftHandSideMatrix, rRightHandSideVector, + rCurrentProcessInfo, true, true); + } + + void ShellThinElement3D4N::CalculateRightHandSide + (VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) + { + Matrix dummy; + CalculateAll(dummy, rRightHandSideVector, rCurrentProcessInfo, true, + true); + } + + void ShellThinElement3D4N::CalculateGeometricStiffnessMatrix(MatrixType & rGeometricStiffnessMatrix, ProcessInfo & rCurrentProcessInfo) + { + // Placeholders for extension into stability analysis + } + + // ========================================================================= + // + // Class ShellThinElement3D4N - Results on Gauss Points + // + // ========================================================================= + + void ShellThinElement3D4N::GetValueOnIntegrationPoints + (const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + + int caseId = -1; + if (rVariable == TSAI_WU_RESERVE_FACTOR) + { + caseId = 10; + } + else if (rVariable == VON_MISES_STRESS || + rVariable == VON_MISES_STRESS_TOP_SURFACE || + rVariable == VON_MISES_STRESS_MIDDLE_SURFACE || + rVariable == VON_MISES_STRESS_BOTTOM_SURFACE) + { + caseId = 20; + } + else if (rVariable == SHELL_ELEMENT_MEMBRANE_ENERGY || + SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION || + SHELL_ELEMENT_BENDING_ENERGY || + SHELL_ELEMENT_BENDING_ENERGY_FRACTION || + SHELL_ELEMENT_SHEAR_ENERGY || + SHELL_ELEMENT_SHEAR_ENERGY_FRACTION) + { + caseId = 30; + } + + + + if (caseId > 19) + { + // resize output + size_t size = 4; + if (rValues.size() != size) + rValues.resize(size); + + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + mpCoordinateTransformation->CreateLocalCoordinateSystem()); + ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Initialize common calculation variables + CalculationData data(localCoordinateSystem, + referenceCoordinateSystem, rCurrentProcessInfo); + data.CalculateLHS = false; + data.CalculateRHS = true; + InitializeCalculationData(data); + + // Get the current displacements in global coordinate system and + // transform to reference local system + MatrixType Rdisp(24, 24); + referenceCoordinateSystem.ComputeTotalRotationMatrix(Rdisp); + if (referenceCoordinateSystem.IsWarped()) { + MatrixType W(24, 24); + referenceCoordinateSystem.ComputeTotalWarpageMatrix(W); + Rdisp = prod(W, Rdisp); + } + data.localDisplacements = prod(Rdisp, data.globalDisplacements); + + + // loop over gauss points + for (unsigned int gauss_point = 0; gauss_point < size; ++gauss_point) + { + // Compute all strain-displacement matrices + data.gpIndex = gauss_point; + CalculateBMatrix(data); + + // Calculate strain vectors in local coordinate system + noalias(data.generalizedStrains) = + prod(data.B, data.localDisplacements); + + // Calculate the response of the Cross Section + ShellCrossSection::Pointer & section = mSections[gauss_point]; + CalculateSectionResponse(data); + + double resultDouble = 0.0; + + if (caseId == 30) + { + // Energy calcs - these haven't been verified or tested yet. + CalculateShellElementEnergy(data, rVariable, resultDouble); + } + else if (caseId == 20) + { + //Von mises calcs + + // recover stresses + CalculateStressesFromForceResultants(data.generalizedStresses, + section->GetThickness()); + + // account for orientation + if (section->GetOrientationAngle() != 0.0) + { + Matrix R(6, 6); + section->GetRotationMatrixForGeneralizedStresses + (-(section->GetOrientationAngle()), R); + data.generalizedStresses = prod(R, data.generalizedStresses); + } + + CalculateVonMisesStress(data, rVariable, resultDouble); + } + else + { + KRATOS_ERROR << + "Error: ELEMENT ShellThinElement3D4N, METHOD GetValueOnIntegrationPoints(double)" + << std::endl; + } + + // store the result calculated + rValues[gauss_point] = resultDouble; + } + } + else if (rVariable == TSAI_WU_RESERVE_FACTOR) + { + // resize output + size_t size = 4; + if (rValues.size() != size) + rValues.resize(size); + + //CalculationData data = SetupStressOrStrainCalculation(rCurrentProcessInfo); + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + mpCoordinateTransformation->CreateLocalCoordinateSystem()); + ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Initialize common calculation variables + CalculationData data(localCoordinateSystem, + referenceCoordinateSystem, rCurrentProcessInfo); + data.CalculateLHS = true; + data.CalculateRHS = true; + InitializeCalculationData(data); + + // Get the current displacements in global coordinate system and + // transform to reference local system + MatrixType Rdisp(24, 24); + referenceCoordinateSystem.ComputeTotalRotationMatrix(Rdisp); + if (referenceCoordinateSystem.IsWarped()) { + MatrixType W(24, 24); + referenceCoordinateSystem.ComputeTotalWarpageMatrix(W); + Rdisp = prod(W, Rdisp); + } + data.localDisplacements = prod(Rdisp, data.globalDisplacements); + + + // Get all laminae strengths + PropertiesType & props = GetProperties(); + ShellCrossSection::Pointer & section = mSections[0]; + std::vector Laminae_Strengths = + std::vector(section->NumberOfPlies()); + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + Laminae_Strengths[ply].resize(3, 3, 0.0); + Laminae_Strengths[ply].clear(); + } + section->GetLaminaeStrengths(Laminae_Strengths,props); + + // Define variables + Matrix R(6, 6); + double total_rotation = 0.0; + + // Gauss Loop + for (unsigned int gauss_point = 0; gauss_point < size; gauss_point++) + { + // Compute all strain-displacement matrices + data.gpIndex = gauss_point; + CalculateBMatrix(data); + + // Calculate strain vectors in local coordinate system + noalias(data.generalizedStrains) = prod(data.B, data.localDisplacements); + + // Retrieve ply orientations + section = mSections[gauss_point]; + Vector ply_orientation(section->NumberOfPlies()); + section->GetLaminaeOrientation(ply_orientation); + + //Calculate lamina stresses + CalculateLaminaStrains(data); + CalculateLaminaStresses(data); + + // Rotate lamina stress from element CS to section CS, and then + // to lamina angle to lamina material principal directions + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + total_rotation = -ply_orientation[ply] - (section->GetOrientationAngle()); + section->GetRotationMatrixForGeneralizedStresses(total_rotation, R); + //top surface of current ply + data.rlaminateStresses[2*ply] = prod(R, data.rlaminateStresses[2*ply]); + //bottom surface of current ply + data.rlaminateStresses[2 * ply +1] = prod(R, data.rlaminateStresses[2 * ply +1]); + } + + // Calculate Tsai-Wu criterion for each ply, take min of all plies + double min_tsai_wu = 0.0; + double temp_tsai_wu = 0.0; + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + temp_tsai_wu = CalculateTsaiWuPlaneStress(data, Laminae_Strengths[ply],ply); + if (ply == 0) + { + min_tsai_wu = temp_tsai_wu; + } + else if (temp_tsai_wu < min_tsai_wu) + { + min_tsai_wu = temp_tsai_wu; + } + } + + // Output min Tsai-Wu result + rValues[gauss_point] = min_tsai_wu; + + }// Gauss loop + } + else + { + SizeType size = GetGeometry().size(); + if (rValues.size() != size) + rValues.resize(size); + + std::vector temp(size); + + for (SizeType i = 0; i < size; i++) + mSections[i]->GetValue(rVariable, temp[i]); + + const Matrix & shapeFunctions = GetGeometry().ShapeFunctionsValues(); + Vector N(size); + + for (SizeType i = 0; i < size; i++) + { + noalias(N) = row(shapeFunctions, i); + double& ival = rValues[i]; + ival = 0.0; + for (SizeType j = 0; j < size; j++) + { + ival += N(j) * temp[j]; + } + } + } + + KRATOS_CATCH(""); + } + + void ShellThinElement3D4N::GetValueOnIntegrationPoints + (const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + if (rVariable == LOCAL_AXIS_VECTOR_1) + { + // LOCAL_AXIS_VECTOR_1 output DOES NOT include the effect of section + // orientation, which rotates the entrire element section in-plane + // and is used in element stiffness calculation. + + if (rValues.size() != 4) + rValues.resize(4); + + for (int i = 0; i < 4; ++i) rValues[i] = ZeroVector(3); + // Initialize common calculation variables + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + for (size_t GP = 0; GP < 4; GP++) + { + rValues[GP] = localCoordinateSystem.Vx(); + } + } + else if (rVariable == ORTHOTROPIC_FIBER_ORIENTATION_1) + { + // ORTHOTROPIC_FIBER_ORIENTATION_1 output DOES include the effect of + // section orientation, which rotates the entrire element section + // in-plane and is used in element stiffness calculation. + + // Resize output + if (rValues.size() != 4) + rValues.resize(4); + + for (int i = 0; i < 4; ++i) rValues[i] = ZeroVector(3); + + + // Initialize common calculation variables + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Get local axis 1 in flattened LCS space + Vector3 localAxis1 = localCoordinateSystem.P2() - localCoordinateSystem.P1(); + + // Perform rotation of local axis 1 to fiber1 in flattened LCS space + Matrix localToFiberRotation = Matrix(3, 3, 0.0); + double fiberSectionRotation = mSections[0]->GetOrientationAngle(); + double c = std::cos(fiberSectionRotation); + double s = std::sin(fiberSectionRotation); + + localToFiberRotation(0, 0) = c; + localToFiberRotation(0, 1) = -s; + localToFiberRotation(1, 0) = s; + localToFiberRotation(1, 1) = c; + localToFiberRotation(2, 2) = 1.0; + + Vector3 temp = prod(localToFiberRotation, localAxis1); + + // Transform result back to global cartesian coords + // Includes warpage correction + /* + Matrix localToGlobalLarge; + localCoordinateSystem.ComputeLocalToGlobalTransformationMatrix(localToGlobalLarge); + Matrix localToGlobalSmall = Matrix(3, 3, 0.0); + for (size_t i = 0; i < 3; i++) + { + for (size_t j = 0; j < 3; j++) + { + localToGlobalSmall(i, j) = localToGlobalLarge(i, j); + } + } + */ + // Basic rotation without warpage correction + Matrix localToGlobalSmall = localCoordinateSystem.Orientation(); + + Vector3 fiberAxis1 = prod(trans(localToGlobalSmall), temp); + fiberAxis1 /= std::sqrt(inner_prod(fiberAxis1, fiberAxis1)); + + //write results + for (size_t dir = 0; dir < 1; dir++) + { + rValues[dir] = fiberAxis1; + } + } + } + + void ShellThinElement3D4N::GetValueOnIntegrationPoints + (const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + if (TryGetValueOnIntegrationPoints_GeneralizedStrainsOrStresses + (rVariable, rValues, rCurrentProcessInfo)) return; + } + + void ShellThinElement3D4N::GetValueOnIntegrationPoints + (const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + if (TryGetValueOnIntegrationPoints_MaterialOrientation(rVariable, + rValues, rCurrentProcessInfo)) return; + } + + void ShellThinElement3D4N::GetValueOnIntegrationPoints + (const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + } + + void ShellThinElement3D4N::CalculateOnIntegrationPoints(const Variable& rVariable, std::vector& rValues, const ProcessInfo & rCurrentProcessInfo) + { + GetValueOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + } + + void ShellThinElement3D4N::CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + GetValueOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + } + + void ShellThinElement3D4N::CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + GetValueOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + } + + void ShellThinElement3D4N::CalculateOnIntegrationPoints(const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + GetValueOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + } + + void ShellThinElement3D4N::CalculateOnIntegrationPoints(const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + GetValueOnIntegrationPoints(rVariable, rValues, rCurrentProcessInfo); + } + + void ShellThinElement3D4N::Calculate(const Variable& rVariable, Matrix & Output, const ProcessInfo & rCurrentProcessInfo) + { + if (rVariable == LOCAL_ELEMENT_ORIENTATION) + { + Output.resize(3, 3, false); + + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + Output = localCoordinateSystem.Orientation(); + } + } + + void ShellThinElement3D4N::Calculate(const Variable& rVariable, double & rotationAngle, const ProcessInfo & rCurrentProcessInfo) + { + if (rVariable == ORTHOTROPIC_ORIENTATION_ASSIGNMENT) + { + if (rotationAngle != 0.0) + { + mOrthotropicSectionRotation = rotationAngle; + } + } + } + + // ========================================================================= + // + // Class ShellThinElement3D4N - Private methods + // + // ========================================================================= + + void ShellThinElement3D4N::CalculateStressesFromForceResultants + (VectorType& rstresses, const double& rthickness) + { + // Refer http://www.colorado.edu/engineering/CAS/courses.d/AFEM.d/AFEM.Ch20.d/AFEM.Ch20.pdf + + // membrane forces -> in-plane stresses (av. across whole thickness) + rstresses[0] /= rthickness; + rstresses[1] /= rthickness; + rstresses[2] /= rthickness; + + // bending moments -> peak in-plane stresses (@ top and bottom surface) + rstresses[3] *= 6.0 / (rthickness*rthickness); + rstresses[4] *= 6.0 / (rthickness*rthickness); + rstresses[5] *= 6.0 / (rthickness*rthickness); + } + + void ShellThinElement3D4N::CalculateLaminaStrains(CalculationData& data) + { + ShellCrossSection::Pointer& section = mSections[data.gpIndex]; + + // Get laminate properties + double thickness = section->GetThickness(); + double z_current = thickness / -2.0; // start from the top of the 1st layer + + // Establish current strains at the midplane + // (element coordinate system) + double e_x = data.generalizedStrains[0]; + double e_y = data.generalizedStrains[1]; + double e_xy = data.generalizedStrains[2]; //this is still engineering + //strain (2xtensorial shear) + double kap_x = data.generalizedStrains[3]; + double kap_y = data.generalizedStrains[4]; + double kap_xy = data.generalizedStrains[5]; //this is still engineering + + // Get ply thicknesses + Vector ply_thicknesses = Vector(section->NumberOfPlies(), 0.0); + section->GetPlyThicknesses(ply_thicknesses); + + // Resize output vector. 2 Surfaces for each ply + data.rlaminateStrains.resize(2 * section->NumberOfPlies()); + for (unsigned int i = 0; i < 2 * section->NumberOfPlies(); i++) + { + data.rlaminateStrains[i].resize(6, false); + data.rlaminateStrains[i].clear(); + } + + // Loop over all plies - start from bottom ply, bottom surface + for (unsigned int plyNumber = 0; + plyNumber < section->NumberOfPlies(); ++plyNumber) + { + // Calculate strains at top surface, arranged in columns. + // (element coordinate system) + data.rlaminateStrains[2 * plyNumber][0] = e_x + z_current*kap_x; + data.rlaminateStrains[2 * plyNumber][1] = e_y + z_current*kap_y; + data.rlaminateStrains[2 * plyNumber][2] = e_xy + z_current*kap_xy; + + // Move to bottom surface of current layer + z_current += ply_thicknesses[plyNumber]; + + // Calculate strains at bottom surface, arranged in columns + // (element coordinate system) + data.rlaminateStrains[2 * plyNumber + 1][0] = e_x + z_current*kap_x; + data.rlaminateStrains[2 * plyNumber + 1][1] = e_y + z_current*kap_y; + data.rlaminateStrains[2 * plyNumber + 1][2] = e_xy + z_current*kap_xy; + } + } + + void ShellThinElement3D4N::CalculateLaminaStresses(CalculationData& data) + { + ShellCrossSection::Pointer& section = mSections[data.gpIndex]; + + // Setup flag to compute ply constitutive matrices + // (units [Pa] and rotated to element orientation) + section->SetupGetPlyConstitutiveMatrices(); + CalculateSectionResponse(data); + + // Resize output vector. 2 Surfaces for each ply + data.rlaminateStresses.resize(2 * section->NumberOfPlies()); + for (unsigned int i = 0; i < 2 * section->NumberOfPlies(); i++) + { + data.rlaminateStresses[i].resize(6, false); + data.rlaminateStresses[i].clear(); + } + + // Loop over all plies - start from top ply, top surface + for (unsigned int plyNumber = 0; + plyNumber < section->NumberOfPlies(); ++plyNumber) + { + // determine stresses at currrent ply, top surface + // (element coordinate system) + data.rlaminateStresses[2 * plyNumber] = prod( + section->GetPlyConstitutiveMatrix(plyNumber), + data.rlaminateStrains[2 * plyNumber]); + + // determine stresses at currrent ply, bottom surface + // (element coordinate system) + data.rlaminateStresses[2 * plyNumber + 1] = prod( + section->GetPlyConstitutiveMatrix(plyNumber), + data.rlaminateStrains[2 * plyNumber + 1]); + } + } + + double ShellThinElement3D4N::CalculateTsaiWuPlaneStress(const CalculationData & data, const Matrix& rLamina_Strengths, const unsigned int& rPly) + { + // Incoming lamina strengths are organized as follows: + // Refer to 'shell_cross_section.cpp' for details. + // + // | T1, C1, T2 | + // | C2, S12, S13 | + // | S23 0 0 | + + // Convert raw lamina strengths into tsai strengths F_i and F_ij. + // Refer Reddy (2003) Section 10.9.4 (re-ordered for kratos DOFs). + // All F_i3 components ignored - thin shell theory. + // + + // Should be FALSE unless testing against other programs that ignore it. + bool disable_in_plane_interaction = false; + + // First, F_i + Vector F_i = Vector(3, 0.0); + F_i[0] = 1.0 / rLamina_Strengths(0, 0) - 1.0 / rLamina_Strengths(0, 1); + F_i[1] = 1.0 / rLamina_Strengths(0, 2) - 1.0 / rLamina_Strengths(1, 0); + F_i[2] = 0.0; + + // Second, F_ij + Matrix F_ij = Matrix(3, 3, 0.0); + F_ij.clear(); + F_ij(0, 0) = 1.0 / rLamina_Strengths(0, 0) / rLamina_Strengths(0, 1); // 11 + F_ij(1,1) = 1.0 / rLamina_Strengths(0, 2) / rLamina_Strengths(1, 0); // 22 + F_ij(2, 2) = 1.0 / rLamina_Strengths(1, 1) / rLamina_Strengths(1, 1); // 12 + F_ij(0, 1) = F_ij(1, 0) = -0.5 / std::sqrt(rLamina_Strengths(0, 0)*rLamina_Strengths(0, 1)*rLamina_Strengths(0, 2)*rLamina_Strengths(1, 0)); + + if (disable_in_plane_interaction) + { + F_ij(0, 1) = F_ij(1, 0) = 0.0; + } + + + // Evaluate Tsai-Wu @ top surface of current layer + double var_a = 0.0; + double var_b = 0.0; + for (size_t i = 0; i < 3; i++) + { + var_b += F_i[i] * data.rlaminateStresses[2 * rPly][i]; + for (size_t j = 0; j < 3; j++) + { + var_a += F_ij(i, j)*data.rlaminateStresses[2 * rPly][i] * data.rlaminateStresses[2 * rPly][j]; + } + } + double tsai_reserve_factor_top = (-1.0*var_b + std::sqrt(var_b*var_b + 4.0 * var_a)) / 2.0 / var_a; + + // Evaluate Tsai-Wu @ bottom surface of current layer + var_a = 0.0; + var_b = 0.0; + for (size_t i = 0; i < 3; i++) + { + var_b += F_i[i] * data.rlaminateStresses[2 * rPly + 1][i]; + for (size_t j = 0; j < 3; j++) + { + var_a += F_ij(i, j)*data.rlaminateStresses[2 * rPly + 1][i] * data.rlaminateStresses[2 * rPly + 1][j]; + } + } + double tsai_reserve_factor_bottom = (-1.0*var_b + std::sqrt(var_b*var_b + 4.0 * var_a)) / 2.0 / var_a; + + // Return min of both surfaces as the result for the whole ply + return std::min(tsai_reserve_factor_bottom, tsai_reserve_factor_top); + } + + void ShellThinElement3D4N::CalculateVonMisesStress(const CalculationData & data, const Variable& rVariable, double & rVon_Mises_Result) + { + // calc von mises stresses at top mid and bottom surfaces for + // thin shell + double von_mises_top, von_mises_mid, von_mises_bottom; + double sxx, syy, sxy; + + // top surface: membrane and +bending contributions + // (no transverse shear) + sxx = data.generalizedStresses[0] + data.generalizedStresses[3]; + syy = data.generalizedStresses[1] + data.generalizedStresses[4]; + sxy = data.generalizedStresses[2] + data.generalizedStresses[5]; + von_mises_top = sxx*sxx - sxx*syy + syy*syy + 3.0*sxy*sxy; + + // mid surface: membrane only contributions + // (no bending or transverse shear) + sxx = data.generalizedStresses[0]; + syy = data.generalizedStresses[1]; + sxy = data.generalizedStresses[2]; + von_mises_mid = sxx*sxx - sxx*syy + syy*syy + + 3.0*(sxy*sxy); + + // bottom surface: membrane and bending contributions + // (no transverse shear) + sxx = data.generalizedStresses[0] - data.generalizedStresses[3]; + syy = data.generalizedStresses[1] - data.generalizedStresses[4]; + sxy = data.generalizedStresses[2] - data.generalizedStresses[5]; + von_mises_bottom = sxx*sxx - sxx*syy + syy*syy + 3.0*sxy*sxy; + + // Output requested quantity + if (rVariable == VON_MISES_STRESS_TOP_SURFACE) + { + rVon_Mises_Result = sqrt(von_mises_top); + } + else if (rVariable == VON_MISES_STRESS_MIDDLE_SURFACE) + { + rVon_Mises_Result = sqrt(von_mises_mid); + } + else if (rVariable == VON_MISES_STRESS_BOTTOM_SURFACE) + { + rVon_Mises_Result = sqrt(von_mises_bottom); + } + else if (rVariable == VON_MISES_STRESS) + { + // take the greatest value and output + rVon_Mises_Result = + sqrt(std::max(von_mises_top, + std::max(von_mises_mid, von_mises_bottom))); + } + } + + void ShellThinElement3D4N::CalculateShellElementEnergy(const CalculationData & data, const Variable& rVariable, double & rEnergy_Result) + { + // Energy calcs - these haven't been verified or tested yet. + + // At each Gauss Point the energy of that Gauss Point's weighted area + // dA*w_i is output. This means that the total energy of the element is + // the sum of the Gauss Point energies. Accordingly, the total energy of + // the system is the sum of Gauss Point energies over all elements. + + bool is_fraction_calc = false; + double totalEnergy = 1.0; + + if (rVariable == SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION || + rVariable == SHELL_ELEMENT_BENDING_ENERGY_FRACTION || + rVariable == SHELL_ELEMENT_SHEAR_ENERGY_FRACTION) + { + // need to calculate total energy over current dA first + totalEnergy = inner_prod(data.generalizedStresses, data.generalizedStrains)*data.dA[data.gpIndex]; + is_fraction_calc = true; + } + + if (rVariable == SHELL_ELEMENT_MEMBRANE_ENERGY || rVariable == SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION) + { + for (size_t i = 0; i < 3; i++) + { + rEnergy_Result += data.generalizedStresses[i] * data.generalizedStrains[i]* data.dA[data.gpIndex]; + } + + if (is_fraction_calc) + { + rEnergy_Result /= totalEnergy; + } + } + else if (rVariable == SHELL_ELEMENT_BENDING_ENERGY || rVariable == SHELL_ELEMENT_BENDING_ENERGY_FRACTION) + { + for (size_t i = 3; i < 6; i++) + { + rEnergy_Result += data.generalizedStresses[i] * data.generalizedStrains[i]* data.dA[data.gpIndex]; + } + + if (is_fraction_calc) + { + rEnergy_Result /= totalEnergy; + } + } + else if (rVariable == SHELL_ELEMENT_SHEAR_ENERGY || rVariable == SHELL_ELEMENT_SHEAR_ENERGY_FRACTION) + { + rEnergy_Result = 0.0; + } + } + + void ShellThinElement3D4N::CheckGeneralizedStressOrStrainOutput(const Variable& rVariable, int & ijob, bool & bGlobal) + { + if (rVariable == SHELL_STRAIN) + { + ijob = 1; + } + else if (rVariable == SHELL_STRAIN_GLOBAL) + { + ijob = 1; + bGlobal = true; + } + else if (rVariable == SHELL_CURVATURE) + { + ijob = 2; + } + else if (rVariable == SHELL_CURVATURE_GLOBAL) + { + ijob = 2; + bGlobal = true; + } + else if (rVariable == SHELL_FORCE) + { + ijob = 3; + } + else if (rVariable == SHELL_FORCE_GLOBAL) + { + ijob = 3; + bGlobal = true; + } + else if (rVariable == SHELL_MOMENT) + { + ijob = 4; + } + else if (rVariable == SHELL_MOMENT_GLOBAL) + { + ijob = 4; + bGlobal = true; + } + else if (rVariable == SHELL_STRESS_TOP_SURFACE) + { + ijob = 5; + } + else if (rVariable == SHELL_STRESS_TOP_SURFACE_GLOBAL) + { + ijob = 5; + bGlobal = true; + } + else if (rVariable == SHELL_STRESS_MIDDLE_SURFACE) + { + ijob = 6; + } + else if (rVariable == SHELL_STRESS_MIDDLE_SURFACE_GLOBAL) + { + ijob = 6; + bGlobal = true; + } + else if (rVariable == SHELL_STRESS_BOTTOM_SURFACE) + { + ijob = 7; + } + else if (rVariable == SHELL_STRESS_BOTTOM_SURFACE_GLOBAL) + { + ijob = 7; + bGlobal = true; + } + else if (rVariable == SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE) + { + ijob = 8; + } + else if (rVariable == SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE_GLOBAL) + { + ijob = 8; + bGlobal = true; + } + else if (rVariable == SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE) + { + ijob = 9; + } + else if (rVariable == SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE_GLOBAL) + { + ijob = 9; + bGlobal = true; + } + else if (rVariable == SHELL_ORTHOTROPIC_4PLY_THROUGH_THICKNESS) + { + // TESTING VARIABLE + ijob = 99; + } + } + + void ShellThinElement3D4N::DecimalCorrection(Vector& a) + { + double norm = norm_2(a); + double tolerance = std::max(norm * 1.0E-12, 1.0E-12); + for (SizeType i = 0; i < a.size(); i++) + if (std::abs(a(i)) < tolerance) + a(i) = 0.0; + } + + void ShellThinElement3D4N::SetupOrientationAngles() + { + ShellQ4_LocalCoordinateSystem lcs(mpCoordinateTransformation-> + CreateReferenceCoordinateSystem()); + + Vector3Type normal; + noalias(normal) = lcs.Vz(); + + Vector3Type dZ; + dZ(0) = 0.0; + dZ(1) = 0.0; + dZ(2) = 1.0; + + Vector3Type dirX; + MathUtils::CrossProduct(dirX, dZ, normal); + + // try to normalize the x vector. if it is near zero it means that we + // need to choose a default one. + double dirX_norm = dirX(0)*dirX(0) + dirX(1)*dirX(1) + dirX(2)*dirX(2); + if (dirX_norm < 1.0E-12) + { + dirX(0) = 1.0; + dirX(1) = 0.0; + dirX(2) = 0.0; + } + else if (dirX_norm != 1.0) + { + dirX_norm = std::sqrt(dirX_norm); + dirX /= dirX_norm; + } + + Vector3Type elem_dirX = lcs.Vx(); + + // now calculate the angle between the element x direction and the + // material x direction. + Vector3Type& a = elem_dirX; + Vector3Type& b = dirX; + double a_dot_b = a(0)*b(0) + a(1)*b(1) + a(2)*b(2); + if (a_dot_b < -1.0) a_dot_b = -1.0; + if (a_dot_b > 1.0) a_dot_b = 1.0; + double angle = std::acos(a_dot_b); + + // if they are not counter-clock-wise, + // let's change the sign of the angle + if (angle != 0.0) + { + const MatrixType& R = lcs.Orientation(); + if (dirX(0)*R(1, 0) + dirX(1)*R(1, 1) + dirX(2)*R(1, 2) < 0.0) + angle = -angle; + } + + Properties props = GetProperties(); + if (props.Has(ORTHOTROPIC_ORIENTATION_ASSIGNMENT)) + { + for (CrossSectionContainerType::iterator it = mSections.begin(); it != mSections.end(); ++it) + (*it)->SetOrientationAngle(mOrthotropicSectionRotation); + } + else + { + for (CrossSectionContainerType::iterator it = mSections.begin(); it != mSections.end(); ++it) + (*it)->SetOrientationAngle(angle); + } + } + + void ShellThinElement3D4N::InitializeCalculationData(CalculationData& data) + { + KRATOS_TRY + //------------------------------------- + // Computation of all stuff that remain + // constant throughout the calculations + + //------------------------------------- + // geometry data + const double x12 = data.LCS0.X1() - data.LCS0.X2(); + const double x13 = data.LCS0.X1() - data.LCS0.X3(); + const double x23 = data.LCS0.X2() - data.LCS0.X3(); + const double x24 = data.LCS0.X2() - data.LCS0.X4(); + const double x34 = data.LCS0.X3() - data.LCS0.X4(); + const double x41 = data.LCS0.X4() - data.LCS0.X1(); + + const double x21 = -x12; + const double x31 = -x13; + const double x32 = -x23; + const double x42 = -x24; + const double x43 = -x34; + const double x14 = -x41; + + const double y12 = data.LCS0.Y1() - data.LCS0.Y2(); + const double y13 = data.LCS0.Y1() - data.LCS0.Y3(); + const double y23 = data.LCS0.Y2() - data.LCS0.Y3(); + const double y24 = data.LCS0.Y2() - data.LCS0.Y4(); + const double y34 = data.LCS0.Y3() - data.LCS0.Y4(); + const double y41 = data.LCS0.Y4() - data.LCS0.Y1(); + + const double y21 = -y12; + const double y31 = -y13; + const double y32 = -y23; + const double y42 = -y24; + const double y43 = -y34; + const double y14 = -y41; + + const double A = data.LCS0.Area(); + + for (int i = 0; i < 4; i++) + { + data.r_cartesian[i] = Vector(3, 0.0); + } + data.r_cartesian[0] = data.LCS0.P1(); + data.r_cartesian[1] = data.LCS0.P2(); + data.r_cartesian[2] = data.LCS0.P3(); + data.r_cartesian[3] = data.LCS0.P4(); + + //Precalculate dA to be multiplied with material matrix + GeometryType & geom = GetGeometry(); + const GeometryType::IntegrationPointsArrayType& integration_points = + geom.IntegrationPoints(mThisIntegrationMethod); + data.dA.clear(); + for (int gp = 0; gp < 4; gp++) + { + //getting informations for integration + double IntegrationWeight = integration_points[gp].Weight(); + + // Compute Jacobian, Inverse of Jacobian, Determinant of Jacobian + // and Shape functions derivatives in the local coordinate system + data.jacOp.Calculate(data.LCS0, + geom.ShapeFunctionLocalGradient(gp)); + + // compute the 'area' of the current integration point + data.dA[gp] = IntegrationWeight * data.jacOp.Determinant(); + } + + + + + if (data.basicQuad == false) + { + // --------------------------------------------------------------------- + // + // ANDES MEMBRANE FORMULATION + // + // --------------------------------------------------------------------- + + + // Unit vectors s_xi and s_eta (eqn 5.2.25) + // eqns 5.2.29 -> 5.2.31 + data.s_xi.clear(); + data.s_eta.clear(); + + //set values of SFs to xi = 1 and eta = 0 + Utilities::ShapeFunc(1, 0, data.N); + for (int i = 0; i < 4; i++) + { + data.s_xi(0) += data.r_cartesian[i][0] * data.N(i); + data.s_xi(1) += data.r_cartesian[i][1] * data.N(i); + } + double s_xi_mag = std::sqrt(inner_prod(data.s_xi, data.s_xi)); + data.s_xi = data.s_xi / s_xi_mag; + + //set values of SFs to xi = 0 and eta = 1 + data.N.clear(); + Utilities::ShapeFunc(0, 1, data.N); + for (int i = 0; i < 4; i++) + { + data.s_eta(0) += data.r_cartesian[i][0] * data.N(i); + data.s_eta(1) += data.r_cartesian[i][1] * data.N(i); + } + double s_eta_mag = std::sqrt(inner_prod(data.s_eta, data.s_eta)); + data.s_eta = data.s_eta / s_eta_mag; + + // calculate L - Lumping matrix (ref eqn 5.2.4) + // for the construction of the basic + // stiffness. Transpose from the presented version + // to allow combination of B matrices later + + //Template constants + double L_mult = 0.5 / A; + const double alpha_6 = data.alpha / 6.0; + const double alpha_3 = data.alpha / 3.0; + data.L_mem.clear(); + + //j = 1, i=4, k=2 + //ki = 24, ij = 41 + data.L_mem(0, 0) = L_mult * y24; + data.L_mem(1, 0) = 0.00; + data.L_mem(2, 0) = L_mult * x42; + data.L_mem(0, 1) = 0.00; + data.L_mem(1, 1) = L_mult * x42; + data.L_mem(2, 1) = L_mult * y24; + data.L_mem(0, 2) = L_mult * alpha_6*(y41*y41 - y21*y21); + data.L_mem(1, 2) = L_mult * alpha_6*(x41*x41 - x21*x21); + data.L_mem(2, 2) = L_mult * alpha_3*(x21*y21 - x41*y41); + + //j = 2, i=1, k=3 + //ki = 31, ij = 12 + data.L_mem(0, 3) = L_mult * y31; + data.L_mem(1, 3) = 0.00; + data.L_mem(2, 3) = L_mult * x13; + data.L_mem(0, 4) = 0.00; + data.L_mem(1, 4) = L_mult * x13; + data.L_mem(2, 4) = L_mult * y31; + data.L_mem(0, 5) = L_mult * alpha_6*(y12*y12 - y32*y32); + data.L_mem(1, 5) = L_mult * alpha_6*(x12*x12 - x32*x32); + data.L_mem(2, 5) = L_mult * alpha_3*(x32*y32 - x12*y12); + + //j = 3, i=2, k=4 + //ki = 42, ij = 23 + data.L_mem(0, 6) = L_mult * y42; + data.L_mem(1, 6) = 0.00; + data.L_mem(2, 6) = L_mult * x24; + data.L_mem(0, 7) = 0.00; + data.L_mem(1, 7) = L_mult * x24; + data.L_mem(2, 7) = L_mult * y42; + data.L_mem(0, 8) = L_mult * alpha_6*(y23*y23 - y43*y43); + data.L_mem(1, 8) = L_mult * alpha_6*(x23*x23 - x43*x43); + data.L_mem(2, 8) = L_mult * alpha_3*(x43*y43 - x23*y23); + + //j = 4, i=3, k=1 + //ki = 13, ij = 34 + data.L_mem(0, 9) = L_mult * y13; + data.L_mem(1, 9) = 0.00; + data.L_mem(2, 9) = L_mult * x31; + data.L_mem(0, 10) = 0.00; + data.L_mem(1, 10) = L_mult * x31; + data.L_mem(2, 10) = L_mult * y13; + data.L_mem(0, 11) = L_mult * alpha_6*(y34*y34 - y14*y14); + data.L_mem(1, 11) = L_mult * alpha_6*(x34*x34 - x14*x14); + data.L_mem(2, 11) = L_mult * alpha_3*(x14*y14 - x34*y34); + + //-------------------------------------- + // calculate H - matrix + // for the construction of the + // higher order stiffness + + //H_mem_mod transformation matrix 'H' (ref eqn 5.2.26) + + //eqn 5.2.12 + double detJ = 0.0; + for (int i = 0; i < 4; i++) + { + int j = i + 1; + if (j == 4) { j = 0; } + detJ += (data.r_cartesian[i][0] * data.r_cartesian[j][1] - + data.r_cartesian[j][0] * data.r_cartesian[i][1]); + } + detJ /= 8.0; + const double f = 16.0 * detJ; + + //filter matrix for higher order rotation strain field + //eqn 5.2.14 + Matrix H_theta = Matrix(5, 12, 0.0); + H_theta(4, 0) = x42 / f; + H_theta(4, 1) = x13 / f; + H_theta(4, 2) = x24 / f; + H_theta(4, 3) = x31 / f; + H_theta(4, 4) = y42 / f; + H_theta(4, 5) = y13 / f; + H_theta(4, 6) = y24 / f; + H_theta(4, 7) = y31 / f; + + H_theta(4, 8) = 0.25; + H_theta(4, 9) = 0.25; + H_theta(4, 10) = 0.25; + H_theta(4, 11) = 0.25; + + for (int row = 0; row < 4; row++) + { + for (int col = 0; col < 4; col++) + { + if (row == col) { H_theta(row, col + 8) = 0.75; } + else { H_theta(row, col + 8) = -0.25; } + } + } + + //xi and eta unit vectors + Vector s_xi = Vector(data.r_cartesian[1] + data.r_cartesian[2]); + s_xi /= std::sqrt(inner_prod(s_xi, s_xi)); + + Vector s_eta = Vector(data.r_cartesian[2] + data.r_cartesian[3]); + s_eta /= std::sqrt(inner_prod(s_eta, s_eta)); + + //eqn 5.2.21 - modified as per Felippa supernatural quad paper + //eqns 63, 65 + array_1d v_h; + double A_0 = data.LCS0.Area(); //element area + double A_1 = 0.5*(x34*y12 - x12*y34); + double A_2 = 0.5*(x23*y14 - x14*y23); + v_h[0] = (A_0 + A_1 + A_2) / 2.0 / A_0; + v_h[1] = (-1.0*A_0 + A_1 - A_2) / 2.0 / A_0; + v_h[2] = (A_0 - A_1 - A_2) / 2.0 / A_0; + v_h[3] = (-1.0*A_0 - A_1 + A_2) / 2.0 / A_0; + + //filter matrix for higher order translations strain field + Matrix H_tv = Matrix(2, 12, 0.0); + for (int i = 0; i < 4; i++) + { + // x-components + H_tv(0, i) = v_h[i] * s_xi[0]; + H_tv(1, i) = v_h[i] * s_eta[0]; + + //y components + H_tv(0, 4 + i) = v_h[i] * s_xi[1]; + H_tv(1, 4 + i) = v_h[i] * s_eta[1]; + } + + //eqn 5.2.26 + Matrix H = Matrix(7, 12, 0.0); + for (int col = 0; col < 12; col++) + { + for (int row = 0; row < 5; row++) + { + H(row, col) = H_theta(row, col); + } + for (int row = 0; row < 2; row++) + { + H(row + 5, col) = H_tv(row, col); + } + } + + //Q matrices + array_1d d_xi_i; + array_1d d_eta_i; + array_1d chi_xi_i; + array_1d chi_eta_i; + + Vector r_xi = Vector(data.r_cartesian[1] + data.r_cartesian[2] - + data.r_cartesian[0] - data.r_cartesian[3]); + r_xi /= 2.0; + Vector r_eta = Vector(data.r_cartesian[2] + data.r_cartesian[3] - + data.r_cartesian[0] - data.r_cartesian[1]); + r_eta /= 2.0; + double l_xi = std::sqrt(inner_prod(r_xi, r_xi)); + double l_eta = std::sqrt(inner_prod(r_eta, r_eta)); + + for (int i = 0; i < 4; i++) + { + //eqn 5.2.29 + Vector vec1 = Vector(MathUtils::CrossProduct + (data.r_cartesian[i], s_xi)); + d_xi_i[i] = std::sqrt(inner_prod(vec1, vec1)); + chi_xi_i[i] = d_xi_i[i] / l_xi; + + Vector vec2 = Vector(MathUtils::CrossProduct + (data.r_cartesian[i], s_eta)); + d_eta_i[i] = std::sqrt(inner_prod(vec2, vec2)); + chi_eta_i[i] = d_eta_i[i] / l_eta; + } + + Vector r_24 = Vector(data.r_cartesian[1] - data.r_cartesian[3]); + Vector r_13 = Vector(data.r_cartesian[0] - data.r_cartesian[2]); + double l_24 = std::sqrt(inner_prod(r_24, r_24)); + double l_13 = std::sqrt(inner_prod(r_13, r_13)); + + Vector e_24 = Vector(r_24 / l_24); + Vector vec1 = Vector(MathUtils::CrossProduct(r_13*-1.0, e_24)); + Vector vec2 = Vector(MathUtils::CrossProduct(r_13, e_24)); + double d_24 = std::sqrt(inner_prod(vec1, vec2)); + double d_13 = std::sqrt(inner_prod(vec1, vec2)); + double chi_24 = d_24 / 2.0 / l_24; + double chi_13 = d_13 / 2.0 / l_13; + + double chi_xi_t = l_eta / l_xi; + double chi_eta_t = l_xi / l_eta; + + double chi_xi_hat = 0.0; + double chi_eta_hat = 0.0; + for (int i = 0; i < 4; i++) + { + chi_xi_hat += chi_xi_i[i]; + chi_eta_hat += chi_eta_i[i]; + } + chi_xi_hat /= 4.0; + chi_eta_hat /= 4.0; + + // Template constants defined in eqn 5.2.41 + const double rho1 = 0.1; + const double rho2 = -0.1; + const double rho3 = -0.1; + const double rho4 = 0.1; + const double rho5 = 0.0; + const double rho6 = 0.5; + const double rho7 = 0.0; + const double rho8 = -0.5; + const double beta1 = 0.6; + //double beta2 = 0.0; - entries disabled to save effort + + //s_13 and s_24 unit vectors + Vector s_13 = Vector(data.r_cartesian[2] - data.r_cartesian[0]); + s_13 /= std::sqrt(inner_prod(s_13, s_13)); + Vector s_24 = Vector(data.r_cartesian[3] - data.r_cartesian[1]); + s_24 /= std::sqrt(inner_prod(s_24, s_24)); + + Matrix Q1 = Matrix(3, 7, 0.0); + Matrix Q2 = Matrix(3, 7, 0.0); + Matrix Q3 = Matrix(3, 7, 0.0); + Matrix Q4 = Matrix(3, 7, 0.0); + + Q1(0, 0) = rho1*chi_xi_i[0]; + Q1(0, 1) = rho2*chi_xi_i[0]; + Q1(0, 2) = rho3*chi_xi_i[0]; + Q1(0, 3) = rho4*chi_xi_i[0]; + + Q1(0, 4) = data.alpha*chi_xi_t; + Q1(0, 5) = -1.0 * beta1 * chi_xi_i[0] / chi_xi_hat / l_xi; + + Q1(1, 0) = -1.0* rho1*chi_eta_i[0]; + Q1(1, 1) = -1.0* rho4*chi_eta_i[0]; + Q1(1, 2) = -1.0* rho3*chi_eta_i[0]; + Q1(1, 3) = -1.0* rho2*chi_eta_i[0]; + + Q1(1, 4) = -1.0 * data.alpha*chi_eta_t; + Q1(1, 6) = -1.0 * beta1 * chi_eta_i[0] / chi_eta_hat / l_eta; + + Q1(2, 0) = rho5*chi_24; + Q1(2, 1) = rho6*chi_24; + Q1(2, 2) = rho7*chi_24; + Q1(2, 3) = rho8*chi_24; + + //Q1(2, 5) = beta2 * c_24_xi / l_24; - beta2 = 0!!! + //Q1(2, 6) = -1.0 * beta2 * c_24_eta / l_24; - beta2 = 0!!! + + Q2(0, 0) = -1.0*rho2*chi_xi_i[1]; + Q2(0, 1) = -1.0*rho1*chi_xi_i[1]; + Q2(0, 2) = -1.0*rho4*chi_xi_i[1]; + Q2(0, 3) = -1.0*rho3*chi_xi_i[1]; + + Q2(0, 4) = -1.0*data.alpha*chi_xi_t; + Q2(0, 5) = -1.0 * beta1 * chi_xi_i[1] / chi_xi_hat / l_xi; + + Q2(1, 0) = rho4*chi_eta_i[1]; + Q2(1, 1) = rho1*chi_eta_i[1]; + Q2(1, 2) = rho2*chi_eta_i[1]; + Q2(1, 3) = rho3*chi_eta_i[1]; + + Q2(1, 4) = data.alpha*chi_eta_t; + Q2(1, 6) = beta1 * chi_eta_i[1] / chi_eta_hat / l_eta; + + Q2(2, 0) = rho8*chi_13; + Q2(2, 1) = rho5*chi_13; + Q2(2, 2) = rho6*chi_13; + Q2(2, 3) = rho7*chi_13; + + //Q2(2, 5) = -1.0* beta2 * c_13_xi / l_13; beta2 = 0!!! + //Q2(2, 6) = beta2 * c_13_eta / l_13; beta2=0!!! + + + Q3(0, 0) = rho3*chi_xi_i[2]; + Q3(0, 1) = rho4*chi_xi_i[2]; + Q3(0, 2) = rho1*chi_xi_i[2]; + Q3(0, 3) = rho2*chi_xi_i[2]; + + Q3(0, 4) = data.alpha*chi_xi_t; + Q3(0, 5) = beta1 * chi_xi_i[2] / chi_xi_hat / l_xi; + + Q3(1, 0) = -1.0* rho3*chi_eta_i[2]; + Q3(1, 1) = -1.0* rho2*chi_eta_i[2]; + Q3(1, 2) = -1.0* rho1*chi_eta_i[2]; + Q3(1, 3) = -1.0* rho4*chi_eta_i[2]; + + Q3(1, 4) = -1.0 * data.alpha*chi_eta_t; + Q3(1, 6) = beta1 * chi_eta_i[2] / chi_eta_hat / l_eta; + + Q3(2, 0) = rho7*chi_13; + Q3(2, 1) = rho8*chi_13; + Q3(2, 2) = rho5*chi_13; + Q3(2, 3) = rho6*chi_13; + + //Q3(2, 5) = -1.0*beta2 * c_13_xi / l_13; beta2 = 0!!! + //Q3(2, 6) = beta2 * c_13_eta / l_13; beta2 = 0!!! + + + Q4(0, 0) = -1.0*rho4*chi_xi_i[3]; + Q4(0, 1) = -1.0*rho3*chi_xi_i[3]; + Q4(0, 2) = -1.0*rho2*chi_xi_i[3]; + Q4(0, 3) = -1.0*rho1*chi_xi_i[3]; + + Q4(0, 4) = -1.0*data.alpha*chi_xi_t; + Q4(0, 5) = beta1 * chi_xi_i[3] / chi_xi_hat / l_xi; + + Q4(1, 0) = rho2*chi_eta_i[3]; + Q4(1, 1) = rho3*chi_eta_i[3]; + Q4(1, 2) = rho4*chi_eta_i[3]; + Q4(1, 3) = rho1*chi_eta_i[3]; + + Q4(1, 4) = data.alpha*chi_eta_t; + Q4(1, 6) = -1.0* beta1 * chi_eta_i[3] / chi_eta_hat / l_eta; + + Q4(2, 0) = rho6*chi_13; + Q4(2, 1) = rho7*chi_13; + Q4(2, 2) = rho8*chi_13; + Q4(2, 3) = rho5*chi_13; + + //Q4(2, 5) = beta2 * c_13_xi / l_13; beta2 = 0 + //Q4(2, 6) = -1.0*beta2 * c_13_eta / l_13; beta2 = 0 + + Matrix T_13_inv = Matrix(3, 3, 0.0); + T_13_inv(0, 0) = s_xi[0] * s_xi[0]; + T_13_inv(0, 1) = s_xi[1] * s_xi[1]; + T_13_inv(0, 2) = s_xi[0] * s_xi[1]; + T_13_inv(1, 0) = s_eta[0] * s_eta[0]; + T_13_inv(1, 1) = s_eta[1] * s_eta[1]; + T_13_inv(1, 2) = s_eta[0] * s_eta[1]; + T_13_inv(2, 0) = s_24[0] * s_24[0]; + T_13_inv(2, 1) = s_24[1] * s_24[1]; + T_13_inv(2, 2) = s_24[0] * s_24[1]; + + Matrix T_24_inv = Matrix(3, 3, 0.0); + T_24_inv(0, 0) = s_xi[0] * s_xi[0]; + T_24_inv(0, 1) = s_xi[1] * s_xi[1]; + T_24_inv(0, 2) = s_xi[0] * s_xi[1]; + T_24_inv(1, 0) = s_eta[0] * s_eta[0]; + T_24_inv(1, 1) = s_eta[1] * s_eta[1]; + T_24_inv(1, 2) = s_eta[0] * s_eta[1]; + T_24_inv(2, 0) = s_13[0] * s_13[0]; + T_24_inv(2, 1) = s_13[1] * s_13[1]; + T_24_inv(2, 2) = s_13[0] * s_13[1]; + + Matrix T_13 = Matrix(3, 3, 0.0); + Matrix T_24 = Matrix(3, 3, 0.0); + double t13invdet = MathUtils::Det(T_13_inv); + MathUtils::InvertMatrix(T_13_inv, T_13, t13invdet); + double t24invdet = MathUtils::Det(T_24_inv); + MathUtils::InvertMatrix(T_24_inv, T_24, t24invdet); + + data.B_h_1 = prod(T_13, Q1); + data.B_h_2 = prod(T_24, Q2); + data.B_h_3 = prod(T_13, Q3); + data.B_h_4 = prod(T_24, Q4); + + //transform DOFs from Haugen to Kratos + data.Z.clear(); + for (int i = 0; i < 3; i++) + { + data.Z(4 * i, i) = 1.0; + data.Z(4 * i + 1, i + 3) = 1.0; + data.Z(4 * i + 2, i + 6) = 1.0; + data.Z(4 * i + 3, i + 9) = 1.0; + } + + data.H_mem_mod.clear(); + data.H_mem_mod = prod(H, data.Z); + + //calculate Bh bar + data.B_h_bar.clear(); + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + for (int i = 0; i < 4; i++) + { + data.B_h_bar += shapeFunctionsValues(i, 0) * data.B_h_1; + data.B_h_bar += shapeFunctionsValues(i, 1) * data.B_h_2; + data.B_h_bar += shapeFunctionsValues(i, 2) * data.B_h_3; + data.B_h_bar += shapeFunctionsValues(i, 3) * data.B_h_4; + } + } + + + + // --------------------------------------------------------------------- + // + // DKQ BENDING FORMULATION + // + // --------------------------------------------------------------------- + + //Calculate edge normal vectors for eqn 5.3.15 + //ref eqn 5.1.9 for calc of normal vector from edge vec + Vector s_12 = Vector(data.LCS0.P1() - data.LCS0.P2()); + const double l_12 = std::sqrt(inner_prod(s_12, s_12)); + + Vector s_23 = Vector(data.LCS0.P2() - data.LCS0.P3()); + const double l_23 = std::sqrt(inner_prod(s_23, s_23)); + + Vector s_34 = Vector(data.LCS0.P3() - data.LCS0.P4()); + const double l_34 = std::sqrt(inner_prod(s_34, s_34)); + + Vector s_41 = Vector(data.LCS0.P4() - data.LCS0.P1()); + const double l_41 = std::sqrt(inner_prod(s_41, s_41)); + + Vector s_13 = Vector(data.LCS0.P1() - data.LCS0.P3()); + + Vector s_24 = Vector(data.LCS0.P2() - data.LCS0.P4()); + + //-------------------------------------- + // calculate DKQ bending stiffness + + data.DKQ_a.clear(); + data.DKQ_b.clear(); + data.DKQ_c.clear(); + data.DKQ_d.clear(); + data.DKQ_e.clear(); + + //assemble a_k - eqn 3.86a : a[0] = a_5 + data.DKQ_a[0] = -1.0 * x12 / l_12 / l_12; + data.DKQ_a[1] = -1.0 * x23 / l_23 / l_23; + data.DKQ_a[2] = -1.0 * x34 / l_34 / l_34; + data.DKQ_a[3] = -1.0 * x41 / l_41 / l_41; + + //assemble b_k - eqn 3.86b : b[0] = b_5 + data.DKQ_b[0] = 3.0 / 4.0 * x12 * y12 / l_12 / l_12; + data.DKQ_b[1] = 3.0 / 4.0 * x23 * y23 / l_23 / l_23; + data.DKQ_b[2] = 3.0 / 4.0 * x34 * y34 / l_34 / l_34; + data.DKQ_b[3] = 3.0 / 4.0 * x41 * y41 / l_41 / l_41; + + //assemble c_k - eqn 3.86c : c[0] = c_5 + data.DKQ_c[0] = (x12 * x12 / 4.0 - y12 * y12 / 2.0) / l_12 / l_12; + data.DKQ_c[1] = (x23 * x23 / 4.0 - y23 * y23 / 2.0) / l_23 / l_23; + data.DKQ_c[2] = (x34 * x34 / 4.0 - y34 * y34 / 2.0) / l_34 / l_34; + data.DKQ_c[3] = (x41 * x41 / 4.0 - y41 * y41 / 2.0) / l_41 / l_41; + + //assemble d_k - eqn 3.86d : d[0] = d_5 + data.DKQ_d[0] = -1.0 * y12 / l_12 / l_12; + data.DKQ_d[1] = -1.0 * y23 / l_23 / l_23; + data.DKQ_d[2] = -1.0 * y34 / l_34 / l_34; + data.DKQ_d[3] = -1.0 * y41 / l_41 / l_41; + + //assemble e_k - eqn 3.86e : e[0] = e_5 + data.DKQ_e[0] = (-1.0 * x12 * x12 / 2.0 + y12 * y12 / 4.0) / l_12 / + l_12; + data.DKQ_e[1] = (-1.0 * x23 * x23 / 2.0 + y23 * y23 / 4.0) / l_23 / + l_23; + data.DKQ_e[2] = (-1.0 * x34 * x34 / 2.0 + y34 * y34 / 4.0) / l_34 / + l_34; + data.DKQ_e[3] = (-1.0 * x41 * x41 / 2.0 + y41 * y41 / 4.0) / l_41 / + l_41; + + //prepare DKT assembly indices - for eqn 3.92 a->f + data.DKQ_indices.clear(); + // 1st col = r, 2nd col = s + data.DKQ_indices(0, 0) = 5; //actual node number, not index! + data.DKQ_indices(0, 1) = 8; + data.DKQ_indices(1, 0) = 6; + data.DKQ_indices(1, 1) = 5; + data.DKQ_indices(2, 0) = 7; + data.DKQ_indices(2, 1) = 6; + data.DKQ_indices(3, 0) = 8; + data.DKQ_indices(3, 1) = 7; + + //custom jacobian as per eqn 14 + const GeometryType::IntegrationPointsArrayType & integrationPoints = + geom.IntegrationPoints(GetIntegrationMethod()); + + for (int i = 0; i < 4; i++) + { + //set to current parametric integration location + double xi = integrationPoints[i].Coordinate(1); + double eta = integrationPoints[i].Coordinate(2); + + Matrix DKQ_temp = Matrix(2, 2, 0.0); + DKQ_temp(0, 0) = x21 + x34 + eta*(x12 + x34); + DKQ_temp(0, 1) = y21 + y34 + eta*(y12 + y34); + DKQ_temp(1, 0) = x32 + x41 + xi*(x12 + x34); + DKQ_temp(1, 1) = y32 + y41 + xi*(y12 + y34); + DKQ_temp = DKQ_temp / 4; + double det = MathUtils::Det(DKQ_temp); + Matrix DKQ_temp_inv = Matrix(2, 2, 0.0); + DKQ_temp_inv(0, 0) = DKQ_temp(1, 1); + DKQ_temp_inv(1, 1) = DKQ_temp(0, 0); + DKQ_temp_inv(0, 1) = -1.0 * DKQ_temp(0, 1); + DKQ_temp_inv(1, 0) = -1.0 *DKQ_temp(1, 0); + DKQ_temp_inv = DKQ_temp_inv / det; + data.DKQ_invJac[i] = Matrix(DKQ_temp_inv); + } + + //-------------------------------------- + // calculate the displacement vector + // in global and local coordinate systems + + GetValuesVector(data.globalDisplacements); + data.localDisplacements = + mpCoordinateTransformation->CalculateLocalDisplacements( + data.LCS, data.globalDisplacements); + + //-------------------------------------- + // Clear all auxiliary + // matrices to be used later on + // during the element integration. + + data.B.clear(); + data.D.clear(); + data.BTD.clear(); + data.generalizedStrains.clear(); + data.generalizedStresses.clear(); + + + //-------------------------------------- + // Initialize the section parameters + + data.SectionParameters.SetElementGeometry(GetGeometry()); + data.SectionParameters.SetMaterialProperties(GetProperties()); + data.SectionParameters.SetProcessInfo(data.CurrentProcessInfo); + + data.SectionParameters.SetGeneralizedStrainVector + (data.generalizedStrains); + data.SectionParameters.SetGeneralizedStressVector + (data.generalizedStresses); + data.SectionParameters.SetConstitutiveMatrix(data.D); + + Flags& options = data.SectionParameters.GetOptions(); + options.Set(ConstitutiveLaw::COMPUTE_STRESS, data.CalculateRHS); + options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, + data.CalculateLHS); + + KRATOS_CATCH("") + } + + void ShellThinElement3D4N::CalculateBMatrix(CalculationData& data) + { + //--------------------------------------------- + // geom data + GeometryType & geom = GetGeometry(); + + //--------------------------------------------- + // set to zero the total B matrix + data.B.clear(); + Matrix B_mem = Matrix(3, 12, 0.0); + + // -------------------------------------------- + // ANDES MEMBRANE FORMULATION + //--------------------------------------------- + + if (data.basicQuad == true) + { + // This section replaces the ANDES membrane B mat + // with a basic unenhanced pure displacement-based + // B-matrix. Only for comparison purposes! + // + // ref: ToP-1516-tutorial1.pdf + + std::cout << "Using basic membrane formulation!" << std::endl; + + const GeometryType::IntegrationPointsArrayType & integrationPoints = + geom.IntegrationPoints(GetIntegrationMethod()); + + //set to current parametric integration location + double xi = integrationPoints[data.gpIndex].Coordinate(1); + double eta = integrationPoints[data.gpIndex].Coordinate(2); + + Matrix dN(4, 2, 0.0); + + // dN/dxi and dN/deta + Utilities::ShapeFunc_NaturalDerivatives(xi, eta, dN); + Matrix temp = Matrix(prod(data.DKQ_invJac[data.gpIndex], trans(dN))); + + // dN/dx and dN/dy + dN = trans(temp); + for (int node = 0; node < 4; node++) + { + B_mem(0, 3 * node) = dN(node, 0); //dx + B_mem(1, 3 * node + 1) = dN(node, 1); //dy + B_mem(2, 3 * node) = B_mem(1, 3 * node + 1); + B_mem(2, 3 * node + 1) = B_mem(0, 3 * node); + } + } + else + { + //--------------------------------------------- + // membrane basic part L + // already computed.it is constant over the + // element + + //--------------------------------------------- + // membrane higher order part B_h + // already calculated in calculate B_h_mats func + Matrix B_h = Matrix(3, 7, 0.0); + const Matrix & shapeFunctionsValues = + geom.ShapeFunctionsValues(GetIntegrationMethod()); + B_h += shapeFunctionsValues(data.gpIndex, 0) * data.B_h_1; + B_h += shapeFunctionsValues(data.gpIndex, 1) * data.B_h_2; + B_h += shapeFunctionsValues(data.gpIndex, 2) * data.B_h_3; + B_h += shapeFunctionsValues(data.gpIndex, 3) * data.B_h_4; + B_h -= data.B_h_bar; + + //--------------------------------------------- + // combine membrane entries by transforming + // B_h + + Matrix B_hH_mem = Matrix(prod(B_h, data.H_mem_mod)); + B_mem += data.L_mem + B_hH_mem; + } + + + + + + // -------------------------------------------- + // DKQ BENDING FORMULATION + //--------------------------------------------- + Matrix B_bend_total = Matrix(3, 12, 0.0); + + Vector dpsiX_dxi = Vector(12, 0.0); + Vector dpsiX_deta = Vector(12, 0.0); + Vector dpsiY_dxi = Vector(12, 0.0); + Vector dpsiY_deta = Vector(12, 0.0); + const GeometryType::IntegrationPointsArrayType & integrationPoints = + geom.IntegrationPoints(GetIntegrationMethod()); + + //set to current parametric integration location + double xi = integrationPoints[data.gpIndex].Coordinate(1); + double eta = integrationPoints[data.gpIndex].Coordinate(2); + + double ar, br, cr, dr, er; + double as, bs, cs, ds, es; + int r, s; + for (int node = 0; node < 4; node++) + { + r = data.DKQ_indices(node, 0); //actual node number r retrieved + s = data.DKQ_indices(node, 1); //actual node number s retrieved + + ar = data.DKQ_a[r - 5]; //converted to index, where node 5 = index 0 + br = data.DKQ_b[r - 5]; + cr = data.DKQ_c[r - 5]; + dr = data.DKQ_d[r - 5]; + er = data.DKQ_e[r - 5]; + + as = data.DKQ_a[s - 5]; + bs = data.DKQ_b[s - 5]; + cs = data.DKQ_c[s - 5]; + ds = data.DKQ_d[s - 5]; + es = data.DKQ_e[s - 5]; + + //eqn 3.92 a->f + // d( ) / dxi + // Compute vector of dPsi_x/dxi + dpsiX_dxi[3 * node] = 1.5 * + (ar*Utilities::dN_seren_dxi(r, xi, eta) - + as*Utilities::dN_seren_dxi(s, xi, eta)); + + dpsiX_dxi[3 * node + 1] = br*Utilities::dN_seren_dxi(r, xi, eta) + + bs*Utilities::dN_seren_dxi(s, xi, eta); + + dpsiX_dxi[3 * node + 2] = + Utilities::dN_seren_dxi(node + 1, xi, eta) - + cr*Utilities::dN_seren_dxi(r, xi, eta) - + cs*Utilities::dN_seren_dxi(s, xi, eta); + + // Compute vector of dPsi_y/dxi + dpsiY_dxi[3 * node] = 1.5 * + (dr*Utilities::dN_seren_dxi(r, xi, eta) - + ds*Utilities::dN_seren_dxi(s, xi, eta)); + + dpsiY_dxi[3 * node + 1] = -1.0 * + Utilities::dN_seren_dxi(node + 1, xi, eta) + + er*Utilities::dN_seren_dxi(r, xi, eta) + + es*Utilities::dN_seren_dxi(s, xi, eta); + + dpsiY_dxi[3 * node + 2] = -1.0 * br* + Utilities::dN_seren_dxi(r, xi, eta) - + bs*Utilities::dN_seren_dxi(s, xi, eta); + + // d( ) / deta + // Compute vector of dPsi_x/deta + dpsiX_deta[3 * node] = 1.5 * + (ar*Utilities::dN_seren_deta(r, xi, eta) - + as*Utilities::dN_seren_deta(s, xi, eta)); + + dpsiX_deta[3 * node + 1] = br* + Utilities::dN_seren_deta(r, xi, eta) + + bs*Utilities::dN_seren_deta(s, xi, eta); + + dpsiX_deta[3 * node + 2] = + Utilities::dN_seren_deta(node + 1, xi, eta) - + cr*Utilities::dN_seren_deta(r, xi, eta) - + cs*Utilities::dN_seren_deta(s, xi, eta); + + // Compute vector of dPsi_y/deta + dpsiY_deta[3 * node] = 1.5 * + (dr*Utilities::dN_seren_deta(r, xi, eta) - + ds*Utilities::dN_seren_deta(s, xi, eta)); + + dpsiY_deta[3 * node + 1] = -1.0 * + Utilities::dN_seren_deta(node + 1, xi, eta) + + er*Utilities::dN_seren_deta(r, xi, eta) + + es*Utilities::dN_seren_deta(s, xi, eta); + + dpsiY_deta[3 * node + 2] = -1.0 * br* + Utilities::dN_seren_deta(r, xi, eta) - + bs*Utilities::dN_seren_deta(s, xi, eta); + } + + double j11, j12, j21, j22; + j11 = data.DKQ_invJac[data.gpIndex](0, 0); + j12 = data.DKQ_invJac[data.gpIndex](0, 1); + j21 = data.DKQ_invJac[data.gpIndex](1, 0); + j22 = data.DKQ_invJac[data.gpIndex](1, 1); + + //Assemble into B matrix + Matrix B_bend_DKQ = Matrix(3, 12, 0.0); + for (int col = 0; col < 12; col++) + { + B_bend_DKQ(0, col) += j11*dpsiX_dxi(col) + j12*dpsiX_deta(col); + + B_bend_DKQ(1, col) += j21*dpsiY_dxi(col) + j22*dpsiY_deta(col); + + B_bend_DKQ(2, col) += j11*dpsiY_dxi(col) + j12*dpsiY_deta(col) + + j21*dpsiX_dxi(col) + j22*dpsiX_deta(col); + } + + B_bend_total.clear(); + B_bend_total += B_bend_DKQ; + + + //--------------------------------------------- + // assemble the membrane contribution + // and the bending contribution + // into the combined B matrix + + for (int nodeid = 0; nodeid < 4; nodeid++) + { + int i = nodeid * 3; + int j = nodeid * 6; + + // membrane map: [0,1,5] <- [0,1,2] + + data.B(0, j) = B_mem(0, i); + data.B(0, j + 1) = B_mem(0, i + 1); + data.B(0, j + 5) = B_mem(0, i + 2); + + data.B(1, j) = B_mem(1, i); + data.B(1, j + 1) = B_mem(1, i + 1); + data.B(1, j + 5) = B_mem(1, i + 2); + + data.B(2, j) = B_mem(2, i); + data.B(2, j + 1) = B_mem(2, i + 1); + data.B(2, j + 5) = B_mem(2, i + 2); + + // bending map: [2,3,4] <- [0,1,2] + + data.B(3, j + 2) = B_bend_total(0, i); + data.B(3, j + 3) = B_bend_total(0, i + 1); + data.B(3, j + 4) = B_bend_total(0, i + 2); + + data.B(4, j + 2) = B_bend_total(1, i); + data.B(4, j + 3) = B_bend_total(1, i + 1); + data.B(4, j + 4) = B_bend_total(1, i + 2); + + data.B(5, j + 2) = B_bend_total(2, i); + data.B(5, j + 3) = B_bend_total(2, i + 1); + data.B(5, j + 4) = B_bend_total(2, i + 2); + } + } + + void ShellThinElement3D4N::CalculateSectionResponse(CalculationData& data) + { + GeometryType & geom = GetGeometry(); + const Matrix & shapeFunctions = geom.ShapeFunctionsValues(); + Vector iN(shapeFunctions.size2()); + noalias(iN) = row(shapeFunctions, data.gpIndex); + + data.jacOp.Calculate(data.LCS0, + geom.ShapeFunctionLocalGradient(data.gpIndex)); + data.SectionParameters.SetShapeFunctionsDerivatives + (data.jacOp.XYDerivatives()); + + ShellCrossSection::Pointer& section = mSections[data.gpIndex]; + data.SectionParameters.SetShapeFunctionsValues(iN); + data.D.clear(); + section->CalculateSectionResponse(data.SectionParameters, + ConstitutiveLaw::StressMeasure_PK2); + } + + void ShellThinElement3D4N::CalculateGaussPointContribution + (CalculationData& data, MatrixType& LHS, VectorType& RHS) + { + // calculate the total strain displ. matrix + CalculateBMatrix(data); + + // calculate section response + CalculateSectionResponse(data); + + // multiply the section tangent matrices and stress resultants by 'dA' + data.D *= data.dA[data.gpIndex]; + + // Add all contributions to the Stiffness Matrix + data.BTD.clear(); + noalias(data.BTD) = prod(trans(data.B), data.D); + noalias(LHS) += prod(data.BTD, data.B); + } + + void ShellThinElement3D4N::CalculateAll(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo, + const bool LHSrequired, + const bool RHSrequired) + { + // Resize the Left Hand Side if necessary, + // and initialize it to Zero + + if ((rLeftHandSideMatrix.size1() != OPT_NUM_DOFS) || + (rLeftHandSideMatrix.size2() != OPT_NUM_DOFS)) + rLeftHandSideMatrix.resize(OPT_NUM_DOFS, OPT_NUM_DOFS, false); + noalias(rLeftHandSideMatrix) = ZeroMatrix(OPT_NUM_DOFS, OPT_NUM_DOFS); + + // Resize the Right Hand Side if necessary, + // and initialize it to Zero + + if (rRightHandSideVector.size() != OPT_NUM_DOFS) + rRightHandSideVector.resize(OPT_NUM_DOFS, false); + noalias(rRightHandSideVector) = ZeroVector(OPT_NUM_DOFS); + + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + mpCoordinateTransformation->CreateLocalCoordinateSystem()); + + ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Initialize common calculation variables + CalculationData data(localCoordinateSystem, referenceCoordinateSystem, + rCurrentProcessInfo); + data.CalculateLHS = LHSrequired; + data.CalculateRHS = RHSrequired; + InitializeCalculationData(data); + + // Gauss Loop. + for (size_t i = 0; i < OPT_NUM_GP; i++) + { + data.gpIndex = i; + CalculateGaussPointContribution(data, rLeftHandSideMatrix, + rRightHandSideVector); + } + + // If basic membrane formulation is enabled - add drilling stiffness + if (data.basicQuad == true) + { + double max_stiff = 0.0; + for (int dof = 0; dof < 24; dof++) + { + if (rLeftHandSideMatrix(dof, dof) > max_stiff) + { + max_stiff = rLeftHandSideMatrix(dof, dof); + } + } + for (int node = 0; node < 4; node++) + { + rLeftHandSideMatrix(6 * node + 5, 6 * node + 5) = + max_stiff / 1000.0; + } + } + + // Add all contributions to the residual vector + rRightHandSideVector -= prod(rLeftHandSideMatrix, + data.localDisplacements); + + // Placeholders for extension into stability analysis + //bool extractKm = false; + //bool extractKg = false; + + // Let the CoordinateTransformation finalize the calculation. + // This will handle the transformation of the local matrices/vectors to + // the global coordinate system. + + mpCoordinateTransformation->FinalizeCalculations(data.LCS, + data.globalDisplacements, + data.localDisplacements, + rLeftHandSideMatrix, + rRightHandSideVector, + RHSrequired, + LHSrequired); + + // Add body forces contributions. This doesn't depend on the coordinate + // system + AddBodyForces(data, rRightHandSideVector); + } + + bool ShellThinElement3D4N::TryGetValueOnIntegrationPoints_MaterialOrientation + (const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + // Check the required output + + int ijob = 0; + if (rVariable == MATERIAL_ORIENTATION_DX) + ijob = 1; + else if (rVariable == MATERIAL_ORIENTATION_DY) + ijob = 2; + else if (rVariable == MATERIAL_ORIENTATION_DZ) + ijob = 3; + + // quick return + + if (ijob == 0) return false; + + // resize output + + size_t size = 4; + if (rValues.size() != size) + rValues.resize(size); + + // Compute the local coordinate system. + + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + mpCoordinateTransformation->CreateLocalCoordinateSystem()); + + Vector3Type eZ = localCoordinateSystem.Vz(); + + // Gauss Loop + + if (ijob == 1) + { + Vector3Type eX = localCoordinateSystem.Vx(); + for (int i = 0; i < 4; i++) + { + QuaternionType q = QuaternionType::FromAxisAngle(eZ(0), eZ(1), + eZ(2), mSections[i]->GetOrientationAngle()); + q.RotateVector3(eX, rValues[i]); + } + } + else if (ijob == 2) + { + Vector3Type eY = localCoordinateSystem.Vy(); + for (int i = 0; i < 4; i++) + { + QuaternionType q = QuaternionType::FromAxisAngle(eZ(0), eZ(1), + eZ(2), mSections[i]->GetOrientationAngle()); + q.RotateVector3(eY, rValues[i]); + } + } + else if (ijob == 3) + { + for (int i = 0; i < 4; i++) + { + noalias(rValues[i]) = eZ; + } + } + + return true; + } + + bool ShellThinElement3D4N:: + TryGetValueOnIntegrationPoints_GeneralizedStrainsOrStresses + (const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) + { + // Check the required output + int ijob = 0; + bool bGlobal = false; + CheckGeneralizedStressOrStrainOutput(rVariable, ijob, bGlobal); + + // quick return + if (ijob == 0) return false; + + // resize output + size_t size = 4; + if (rValues.size() != size) + rValues.resize(size); + + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + mpCoordinateTransformation->CreateLocalCoordinateSystem()); + ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( + mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Just to store the rotation matrix for visualization purposes + Matrix R(6, 6); + Matrix aux33(3, 3); + + // Initialize common calculation variables + CalculationData data(localCoordinateSystem, referenceCoordinateSystem, + rCurrentProcessInfo); + if (ijob > 2) + { + data.CalculateLHS = true; // calc constitutive mat for composites + } + else + { + data.CalculateLHS = false; + } + data.CalculateRHS = true; + InitializeCalculationData(data); + + // Get the current displacements in global coordinate system and + // transform to reference local system + MatrixType Rdisp(24, 24); + referenceCoordinateSystem.ComputeTotalRotationMatrix(Rdisp); + if (referenceCoordinateSystem.IsWarped()) { + MatrixType W(24, 24); + referenceCoordinateSystem.ComputeTotalWarpageMatrix(W); + Rdisp = prod(W, Rdisp); + } + data.localDisplacements = prod(Rdisp, data.globalDisplacements); + + // Gauss Loop + for (unsigned int i = 0; i < size; i++) + { + // Compute all strain-displacement matrices + data.gpIndex = i; + CalculateBMatrix(data); + + // Calculate strain vectors in local coordinate system + noalias(data.generalizedStrains) = prod(data.B, data.localDisplacements); + + // Calculate the response of the Cross Section + ShellCrossSection::Pointer & section = mSections[i]; + if (ijob > 2) + { + if (ijob > 7) + { + //Calculate lamina stresses + CalculateLaminaStrains(data); + CalculateLaminaStresses(data); + } + else + { + // calculate force resultants + CalculateSectionResponse(data); + + if (ijob > 4) + { + // Compute stresses + CalculateStressesFromForceResultants(data.generalizedStresses, + section->GetThickness()); + } + } + DecimalCorrection(data.generalizedStresses); + } + + // save the results + DecimalCorrection(data.generalizedStrains); + + // now the results are in the element coordinate system. + // if necessary, rotate the results in the section (local) + // coordinate system + if (section->GetOrientationAngle() != 0.0 && !bGlobal) + { + if (ijob > 7) + { + section->GetRotationMatrixForGeneralizedStresses(-(section->GetOrientationAngle()), R); + for (unsigned int i = 0; i < data.rlaminateStresses.size(); i++) + { + data.rlaminateStresses[i] = prod(R, data.rlaminateStresses[i]); + } + + section->GetRotationMatrixForGeneralizedStrains(-(section->GetOrientationAngle()), R); + for (unsigned int i = 0; i < data.rlaminateStrains.size(); i++) + { + data.rlaminateStrains[i] = prod(R, data.rlaminateStrains[i]); + } + } + else if (ijob > 2) + { + section->GetRotationMatrixForGeneralizedStresses + (-(section->GetOrientationAngle()), R); + data.generalizedStresses = prod(R, data.generalizedStresses); + } + else + { + section->GetRotationMatrixForGeneralizedStrains + (-(section->GetOrientationAngle()), R); + data.generalizedStrains = prod(R, data.generalizedStrains); + } + } + + Matrix & iValue = rValues[i]; + if (iValue.size1() != 3 || iValue.size2() != 3) + iValue.resize(3, 3, false); + + if (ijob == 1) // strains + { + iValue(0, 0) = data.generalizedStrains(0); + iValue(1, 1) = data.generalizedStrains(1); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = 0.5 * data.generalizedStrains(2); + iValue(0, 2) = iValue(2, 0) = 0; + iValue(1, 2) = iValue(2, 1) = 0; + } + else if (ijob == 2) // curvatures + { + iValue(0, 0) = data.generalizedStrains(3); + iValue(1, 1) = data.generalizedStrains(4); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = 0.5 * data.generalizedStrains(5); + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 3) // forces + { + iValue(0, 0) = data.generalizedStresses(0); + iValue(1, 1) = data.generalizedStresses(1); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses(2); + iValue(0, 2) = iValue(2, 0) = 0; + iValue(1, 2) = iValue(2, 1) = 0; + } + else if (ijob == 4) // moments + { + iValue(0, 0) = data.generalizedStresses(3); + iValue(1, 1) = data.generalizedStresses(4); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses(5); + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 5) // SHELL_STRESS_TOP_SURFACE + { + iValue(0, 0) = data.generalizedStresses(0) + + data.generalizedStresses(3); + iValue(1, 1) = data.generalizedStresses(1) + + data.generalizedStresses(4); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses[2] + data.generalizedStresses[5]; + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 6) // SHELL_STRESS_MIDDLE_SURFACE + { + iValue(0, 0) = data.generalizedStresses(0); + iValue(1, 1) = data.generalizedStresses(1); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses[2]; + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 7) // SHELL_STRESS_BOTTOM_SURFACE + { + iValue(0, 0) = data.generalizedStresses(0) - + data.generalizedStresses(3); + iValue(1, 1) = data.generalizedStresses(1) - + data.generalizedStresses(4); + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.generalizedStresses[2] - data.generalizedStresses[5]; + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 8) // SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE + { + iValue(0, 0) = + data.rlaminateStresses[data.rlaminateStresses.size() - 1][0]; + iValue(1, 1) = + data.rlaminateStresses[data.rlaminateStresses.size() - 1][1]; + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = + data.rlaminateStresses[data.rlaminateStresses.size() - 1][2]; + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 9) // SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE + { + iValue(0, 0) = data.rlaminateStresses[0][0]; + iValue(1, 1) = data.rlaminateStresses[0][1]; + iValue(2, 2) = 0.0; + iValue(0, 1) = iValue(1, 0) = data.rlaminateStresses[0][2]; + iValue(0, 2) = iValue(2, 0) = 0.0; + iValue(1, 2) = iValue(2, 1) = 0.0; + } + else if (ijob == 99) // SHELL_ORTHOTROPIC_4PLY_THROUGH_THICKNESS + { + // Testing variable to get lamina stress/strain values + // on the 8 surfaces of a 4 ply laminate + + int surface = 0; // start from top ply top surface + // Output global results sequentially + for (size_t row = 0; row < 3; row++) + { + for (size_t col = 0; col < 3; col++) + { + if (surface > 7) + { + iValue(row, col) = 0.0; + } + else + { + iValue(row, col) = data.rlaminateStresses[surface][2]; + } + surface++; + } + } + + bool tsai_wu_thru_output = true; + if (tsai_wu_thru_output) + { + // Must use non-global stresses for this!!! + std::vector Laminae_Strengths = + std::vector(section->NumberOfPlies()); + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + Laminae_Strengths[ply].resize(3, 3, 0.0); + Laminae_Strengths[ply].clear(); + } + PropertiesType & props = GetProperties(); + section->GetLaminaeStrengths(Laminae_Strengths, props); + Vector ply_orientation(section->NumberOfPlies()); + section->GetLaminaeOrientation(ply_orientation); + + // Rotate lamina stress from section CS + // to lamina angle to lamina material principal directions + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + double total_rotation = -ply_orientation[ply]; // already rotated to section CS + section->GetRotationMatrixForGeneralizedStresses(total_rotation, R); + //top surface of current ply + data.rlaminateStresses[2 * ply] = prod(R, data.rlaminateStresses[2 * ply]); + //bottom surface of current ply + data.rlaminateStresses[2 * ply + 1] = prod(R, data.rlaminateStresses[2 * ply + 1]); + } + + // Calculate Tsai-Wu criterion for each ply + Vector tsai_output = Vector(9, 0.0); + tsai_output.clear(); + double temp_tsai_wu = 0.0; + for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) + { + Vector lamina_stress_top = Vector(data.rlaminateStresses[2 * ply]); + Vector lamina_stress_bottom = Vector(data.rlaminateStresses[2 * ply + 1]); + // for testing, we want both top and bottom results, so trick the function + + // top surface + data.rlaminateStresses[2 * ply + 1] = Vector(lamina_stress_top); + temp_tsai_wu = CalculateTsaiWuPlaneStress(data, Laminae_Strengths[ply], ply); + tsai_output[2 * ply] = temp_tsai_wu; + + // bottom surface + data.rlaminateStresses[2 * ply] = Vector(lamina_stress_bottom); + data.rlaminateStresses[2 * ply + 1] = Vector(lamina_stress_bottom); + temp_tsai_wu = CalculateTsaiWuPlaneStress(data, Laminae_Strengths[ply], ply); + tsai_output[2 * ply+1] = temp_tsai_wu; + } + + //dump into results + + int surface = 0; // start from top ply top surface + // Output global results sequentially + for (size_t row = 0; row < 3; row++) + { + for (size_t col = 0; col < 3; col++) + { + if (surface > 7) + { + iValue(row, col) = 0.0; + } + else + { + iValue(row, col) = tsai_output[surface]; + } + surface++; + } + } + } + + } + + // if requested, rotate the results in the global coordinate system + if (bGlobal) + { + const Matrix& RG = referenceCoordinateSystem.Orientation(); + noalias(aux33) = prod(trans(RG), iValue); + noalias(iValue) = prod(aux33, RG); + } + } // Gauss Loop + + return true; + } + + void ShellThinElement3D4N::printMatrix(Matrix& matrixIn, + std::string stringIn) + { + std::cout << "\n" << stringIn << std::endl; + for (unsigned i = 0; i < matrixIn.size1(); ++i) + { + std::cout << "| "; + for (unsigned j = 0; j < matrixIn.size2(); ++j) + { + std::cout << std::fixed << std::setprecision(4) << std::setw(10) + << matrixIn(i, j) << " | "; + } + std::cout << std::endl; + } + std::cout << std::endl; + } + + void ShellThinElement3D4N::printVector(Vector& matrixIn, + std::string stringIn) + { + std::cout << "\n" << stringIn << std::endl; + for (unsigned i = 0; i < matrixIn.size(); ++i) + { + std::cout << "| "; + + std::cout << std::fixed << std::setprecision(6) << std::setw(12) + << matrixIn(i) << " | "; + + std::cout << std::endl; + } + std::cout << std::endl; + } + + void ShellThinElement3D4N::printMatrix(const Matrix& matrixIn, + std::string stringIn) + { + std::cout << "\n" << stringIn << std::endl; + for (unsigned i = 0; i < matrixIn.size1(); ++i) + { + std::cout << "| "; + for (unsigned j = 0; j < matrixIn.size2(); ++j) + { + std::cout << std::setprecision(2) << std::setw(10) << + matrixIn(i, j) << " | "; + } + std::cout << std::endl; + } + std::cout << std::endl; + } + + void ShellThinElement3D4N::printDouble(std::string stringIn, + double doubleIn) + { + std::cout << stringIn << doubleIn << std::endl; + } + + // ========================================================================= + // + // CalculationData + // + // ========================================================================= + + ShellThinElement3D4N::CalculationData::CalculationData + (const ShellQ4_LocalCoordinateSystem& localcoordsys, + const ShellQ4_LocalCoordinateSystem& refcoordsys, + const ProcessInfo& rCurrentProcessInfo) + : LCS(localcoordsys) + , LCS0(refcoordsys) + , CurrentProcessInfo(rCurrentProcessInfo) + { + } + + // ========================================================================= + // + // Class ShellThinElement3D4N - Serialization + // + // ========================================================================= + + void ShellThinElement3D4N::save(Serializer& rSerializer) const + { + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Element); + rSerializer.save("CTr", mpCoordinateTransformation); + rSerializer.save("Sec", mSections); + rSerializer.save("IntM", (int)mThisIntegrationMethod); + } + + void ShellThinElement3D4N::load(Serializer& rSerializer) + { + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Element); + rSerializer.load("CTr", mpCoordinateTransformation); + rSerializer.load("Sec", mSections); + int temp; + rSerializer.load("IntM", temp); + mThisIntegrationMethod = (IntegrationMethod)temp; + } +} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D4N.hpp b/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D4N.hpp new file mode 100644 index 000000000000..fc23acde4d72 --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_thin_element_3D4N.hpp @@ -0,0 +1,512 @@ +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Peter Wilson +// Contact: A.Winterstein@tum.de +// + +#if !defined(SHELL_THIN_ELEMENT_3D4N_H_INCLUDED ) +#define SHELL_THIN_ELEMENT_3D4N_H_INCLUDED + +// System includes + +// External includes + +// Project includes +#include "includes/element.h" +#include "custom_utilities/shell_cross_section.hpp" +#include "utilities/quaternion.h" +#include "custom_utilities/shellq4_local_coordinate_system.hpp" + +namespace Kratos +{ + ///@name Kratos Globals + ///@{ + ///@} + + ///@name Type Definitions + ///@{ + ///@} + + class ShellQ4_CoordinateTransformation; + + class ShellQ4_LocalCoordinateSystem; + + ///@name Enum's + ///@{ + ///@} + + ///@name Functions + ///@{ + ///@} + + ///@name Kratos Classes + ///@{ + /** \brief ShellThinElement3D4N + * + * This element represents a 4-node Shell element. + * The membrane part is Felippa's assumed Natural DEviatoric Strain (ANDES) + * formulation, while the bending part is the Discrete Kirchhoff + * Quadrilateral. + * This element is formulated for small strains, + * but can be used in Geometrically nonlinear problems + * involving large displacements and rotations + * using a Corotational Coordinate Transformation. + * Material nonlinearity is handled by means of the cross section object. + */ + + /* + Shell formulation references: + + ANDES formulation: +Bjorn Haugen. "Buckling and Stability Problems for Thin Shell Structures +Using High Performance Finite Elements". Dissertation. Colorado: University +of Colorado, 1994. + +ANDES filter matrix H modification as per: +Carlos A Felippa. "Supernatural QUAD4: a template formulation". In: Computer +methods in applied mechanics and engineering 195.41 (2006), pp. 5316-5342. + +DKQ original formulation: +Jean-Louis Batoz and Mabrouk Ben Tahar. "Evaluation of a new quadrilateral +thin plate bending element". In: International Journal for Numerical Methods +in Engineering 18.11 (1982), pp. 1655-1677. + +Clearly presented DKQ formulation: +Fabian Rojas Barrales. "Development of a nonlinear quadrilateral layered +membrane element with drilling degrees of freedom and a nonlinear +quadrilateral thin flat layered shell element for the modeling of reinforced +concrete walls". Dissertation. Los Angeles, California: University of +Southern California, 2012. + */ + + + + class ShellThinElement3D4N : public Element + { + public: + + ///@name Type Definitions + ///@{ + KRATOS_CLASS_POINTER_DEFINITION(ShellThinElement3D4N); + + typedef std::vector< ShellCrossSection::Pointer > CrossSectionContainerType; + + typedef ShellQ4_CoordinateTransformation CoordinateTransformationBaseType; + + typedef boost::shared_ptr CoordinateTransformationBasePointerType; + + typedef array_1d Vector3Type; + + typedef Quaternion QuaternionType; + + ///@} + + ///@name Classes + ///@{ + /** \brief JacobianOperator + * + * This class is a utility to compute at a given integration point, + * the Jacobian, its inverse, its determinant + * and the derivatives of the shape functions in the local + * cartesian coordinate system. + */ + + class JacobianOperator + { + public: + + JacobianOperator(); + + void Calculate(const ShellQ4_LocalCoordinateSystem & CS, const Matrix & dN); + + inline const Matrix & Jacobian()const + { + return mJac; + } + + inline const Matrix & Inverse()const + { + return mInv; + } + + inline const Matrix & XYDerivatives()const + { + return mXYDeriv; + } + + inline const double Determinant()const + { + return mDet; + } + + private: + + Matrix mJac; //!< Jacobian matrix + Matrix mInv; //!< Inverse of the Jacobian matrix + Matrix mXYDeriv; //*!< Shape function derivatives in cartesian coordinates + double mDet; //*!< Determinant of the Jacobian matrix + }; + + ///@} + + ///@name Life Cycle + ///@{ + ShellThinElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry, + bool NLGeom = false); + + ShellThinElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + bool NLGeom = false); + + ShellThinElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + CoordinateTransformationBasePointerType pCoordinateTransformation); + + ~ShellThinElement3D4N() override; + + ///@} + + ///@name Operations + ///@{ + // Basic + + Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override; + + IntegrationMethod GetIntegrationMethod() const override; + + void Initialize() override; + + //void ResetConstitutiveLaw(); + + void EquationIdVector(EquationIdVectorType& rResult, ProcessInfo& rCurrentProcessInfo) override; + + void GetDofList(DofsVectorType& ElementalDofList, ProcessInfo& CurrentProcessInfo) override; + + int Check(const ProcessInfo& rCurrentProcessInfo) override; + + void CleanMemory() override; + + void GetValuesVector(Vector& values, int Step = 0) override; + // needed for dyn + + void GetFirstDerivativesVector(Vector& values, int Step = 0) override; + //needed for dyn + + void GetSecondDerivativesVector(Vector& values, int Step = 0) override; + //needed for dyn + + void InitializeNonLinearIteration(ProcessInfo& CurrentProcessInfo) override; + //needed for corotational + + void FinalizeNonLinearIteration(ProcessInfo& CurrentProcessInfo) override; + //needed for corotational + + void InitializeSolutionStep(ProcessInfo& CurrentProcessInfo) override; + //needed for corotational + + void FinalizeSolutionStep(ProcessInfo& CurrentProcessInfo) override; + //needed for corotational + + void CalculateMassMatrix(MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo) override; + // needed for dyn + + void CalculateDampingMatrix(MatrixType& rDampingMatrix, + ProcessInfo& rCurrentProcessInfo) override; + // needed for dyn + + void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) override; + + void CalculateRightHandSide(VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) override; + + void CalculateGeometricStiffnessMatrix(MatrixType& rGeometricStiffnessMatrix, + ProcessInfo& rCurrentProcessInfo); + // needed for dyn + + // Results calculation on integration points + void GetValueOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints(const Variable >& rVariable, std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints(const Variable >& rVariable, std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) override; + + // More results calculation on integration points to interface with python + void CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateOnIntegrationPoints(const Variable& rVariable, + std::vector& rValues, const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateOnIntegrationPoints(const Variable >& rVariable, std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateOnIntegrationPoints(const Variable >& rVariable, std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo); + + // Calculate functions + void Calculate(const Variable& rVariable, + Matrix& Output, + const ProcessInfo& rCurrentProcessInfo) override; + + void Calculate(const Variable& rVariable, + double& Output, + const ProcessInfo& rCurrentProcessInfo) override; + + ///@} + + + + ///@name Public specialized Access - Temporary + ///@{ + ///@} + + protected: + + ///@name Protected Lyfe Cycle + ///@{ + /** + * Protected empty constructor + */ + ShellThinElement3D4N() : Element() + { + } + + ///@} + + private: + + ///@name Private Classes + ///@{ + class CalculationData + { + public: + + // --------------------------------------- + // calculation-constant data + // ---------------------------------------- + // these data are allocated and constructed + // at the beginning of the calculation + + ShellQ4_LocalCoordinateSystem LCS; /*!< current coordinate system */ + ShellQ4_LocalCoordinateSystem LCS0; /*!< reference coordinate system */ + + // Unit vectors (in cartesian coords) + Vector s_xi = ZeroVector(3); /*!< xi unit vector in cartesian coords */ + Vector s_eta = ZeroVector(3); /*!< xi unit vector in cartesian coords */ + + // Geometry data + array_1d r_cartesian; /*!< array of cartesian point positions */ + array_1d dA; /*!< array of integration areas (incl. weight) */ + + // Displacements + VectorType globalDisplacements = ZeroVector(24); /*!< global displacement vector */ + VectorType localDisplacements = ZeroVector(24); /*!< local displacement vector */ + + // Element flags + bool CalculateRHS; /*!< flag for the calculation of the right-hand-side vector */ + bool CalculateLHS; /*!< flag for the calculation of the left-hand-side vector */ + + // --------------------------------------- + // Testing flags + // --------------------------------------- + // These should both be FALSE unless you are testing, or + // investigating the effects of element enhancements! + + const bool basicQuad = false; /*!< flag for using basic membrane + formulation - should be FALSE unless + you are testing */ + + // --------------------------------------- + // calculation-variable data + // --------------------------------------- + // these data are updated during the + // calculations + + array_1d N; /*!< SF values at parametric point */ + size_t gpIndex; /*!< Index of current Gauss Point (zero based) */ + + // --------------------------------------- + // calculation-variable data + // --------------------------------------- + // these data are updated during the + // calculations, but they are allocated + // only once(the first time they are used) + // to avoid useless re-allocations + + // ANDES membrane data + const double alpha = 1.5; + MatrixType L_mem = ZeroMatrix(3, 12); /*!< basic membrane lumping matrix */ + MatrixType H_mem_mod = ZeroMatrix(7, 12); /*!< higher order membrane filter matrix */ + MatrixType Z = ZeroMatrix(12, 12); /*!< transformation from Haugen to Kratos DOFs */ + MatrixType B_h_1 = ZeroMatrix(3, 7); /*!< higher order membrane B1 matrix */ + MatrixType B_h_2 = ZeroMatrix(3, 7); /*!< higher order membrane B2 matrix */ + MatrixType B_h_3 = ZeroMatrix(3, 7); /*!< higher order membrane B3 matrix */ + MatrixType B_h_4 = ZeroMatrix(3, 7); /*!< higher order membrane B4 matrix */ + MatrixType B_h_bar = ZeroMatrix(3, 7); /*!< higher order membrane B_bar matrix */ + MatrixType T_13 = ZeroMatrix(3, 3); + MatrixType T_24 = ZeroMatrix(3, 3); + + // DKQ bending data + array_1d DKQ_a; + array_1d DKQ_b; + array_1d DKQ_c; + array_1d DKQ_d; + array_1d DKQ_e; + MatrixType DKQ_indices = ZeroMatrix(4, 2); + array_1d DKQ_invJac; + array_1d DKQ_jac; + array_1d DKQ_jac_det; + + + // General total element data + MatrixType B = ZeroMatrix(6, 24); /*!< total strain-displacement matrix at the current integration point */ + MatrixType D = ZeroMatrix(6, 6); /*!< section constitutive matrix at the current integration point */ + MatrixType BTD = ZeroMatrix(24, 6); /*!< auxiliary matrix to store the product B'*D */ + + VectorType generalizedStrains = ZeroVector(6); /*!< generalized strain vector at the current integration point */ + VectorType generalizedStresses = ZeroVector(6); /*!< generalized stress vector at the current integration point */ + std::vector rlaminateStrains; /*!< laminate strain vector at all surfaces at the current integration point */ + std::vector rlaminateStresses; /*!< laminate stress vector at all surfaces at the current integration point */ + + JacobianOperator jacOp; + ShellCrossSection::SectionParameters SectionParameters; /*!< parameters for cross section calculations */ + + public: + + const ProcessInfo& CurrentProcessInfo; + + public: + + CalculationData(const ShellQ4_LocalCoordinateSystem& localcoordsys, + const ShellQ4_LocalCoordinateSystem& refcoordsys, + const ProcessInfo& rCurrentProcessInfo); + }; + + ///@} + + ///@name Private Operations + ///@{ + void CalculateStressesFromForceResultants + (VectorType& rstresses, + const double& rthickness); + + void CalculateLaminaStrains(CalculationData& data); + + void CalculateLaminaStresses(CalculationData& data); + + double CalculateTsaiWuPlaneStress(const CalculationData& data, const Matrix& rLamina_Strengths, const unsigned int& rCurrent_Ply); + + void CalculateVonMisesStress(const CalculationData& data, const Variable& rVariable, double& rVon_Mises_Result); + + void CalculateShellElementEnergy(const CalculationData& data, const Variable& rVariable, double& rEnergy_Result); + + void CheckGeneralizedStressOrStrainOutput(const Variable& rVariable, int& iJob, bool& bGlobal); + + void DecimalCorrection(Vector& a); + + void SetupOrientationAngles(); + + void InitializeCalculationData(CalculationData& data); + + void CalculateBMatrix(CalculationData& data); + + void CalculateSectionResponse(CalculationData& data); + + void CalculateGaussPointContribution(CalculationData& data, + MatrixType& LHS, VectorType& RHS); + + void AddBodyForces(CalculationData& data, + VectorType& rRightHandSideVector); //not required for dyn + + void CalculateAll(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo, + const bool LHSrequired, + const bool RHSrequired); + + bool TryGetValueOnIntegrationPoints_MaterialOrientation(const Variable >& rVariable, + std::vector >& rValues, + const ProcessInfo& rCurrentProcessInfo); + + bool TryGetValueOnIntegrationPoints_GeneralizedStrainsOrStresses(const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo); + + void printMatrix(Matrix& matrixIn, std::string stringIn); + + void printVector(Vector& matrixIn, std::string stringIn); + + void printMatrix(const Matrix& matrixIn, std::string stringIn); + + void printDouble(std::string stringIn, double doubleIn); + + ///@} + + ///@name Static Member Variables + ///@{ + ///@} + + ///@name Member Variables + ///@{ + CoordinateTransformationBasePointerType mpCoordinateTransformation; /*!< The Coordinate Transformation */ + + CrossSectionContainerType mSections; /*!< Container for cross section associated to each integration point */ + + IntegrationMethod mThisIntegrationMethod; /*!< Currently selected integration method */ + + double mOrthotropicSectionRotation = 0.0; /*!< In-plane rotation angle for orthotropic section */ + + ///@} + + ///@name Serialization + ///@{ + friend class Serializer; + + void save(Serializer& rSerializer) const override; + + void load(Serializer& rSerializer) override; + + ///@} + + ///@name Private Access + ///@{ + ///@} + + ///@name Private Inquiry + ///@{ + ///@} + + ///@name Un accessible methods + ///@{ + ///@} + }; +} +#endif // SHELL_THIN_ELEMENT_3D4N_H_INCLUDED \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.cpp b/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.cpp index 66633533100c..27d4e4bb915a 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.cpp +++ b/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.cpp @@ -1,817 +1,857 @@ -// KRATOS ___| | | | -// \___ \ __| __| | | __| __| | | __| _` | | -// | | | | | ( | | | | ( | | -// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS -// -// License: BSD License -// license: structural_mechanics_application/license.txt -// -// Main authors: Klaus B. Sautter -// -// -// -#include "custom_elements/truss_element_3D2N.hpp" -#include "structural_mechanics_application_variables.h" -#include "includes/define.h" - - -namespace Kratos -{ - TrussElement3D2N::TrussElement3D2N(IndexType NewId, - GeometryType::Pointer pGeometry, - bool rLinear) - : Element(NewId, pGeometry) - { - this->mIsLinearElement = rLinear; - } - - TrussElement3D2N::TrussElement3D2N(IndexType NewId, - GeometryType::Pointer pGeometry, - PropertiesType::Pointer pProperties, - bool rLinear) - : Element(NewId, pGeometry, pProperties) - { - this->mIsLinearElement = rLinear; - } - - Element::Pointer TrussElement3D2N::Create(IndexType NewId, - NodesArrayType const& rThisNodes, - PropertiesType::Pointer pProperties) const - { - const GeometryType& rGeom = this->GetGeometry(); - return BaseType::Pointer(new TrussElement3D2N( - NewId, rGeom.Create(rThisNodes),pProperties, this->mIsLinearElement)); - } - - TrussElement3D2N::~TrussElement3D2N(){} - - void TrussElement3D2N::EquationIdVector(EquationIdVectorType& rResult, - ProcessInfo& rCurrentProcessInfo){ - - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension; - - if (rResult.size() != local_size) rResult.resize(local_size); - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * 3; - rResult[index] = this->GetGeometry()[i].GetDof(DISPLACEMENT_X) - .EquationId(); - rResult[index + 1] = this->GetGeometry()[i].GetDof(DISPLACEMENT_Y) - .EquationId(); - rResult[index + 2] = this->GetGeometry()[i].GetDof(DISPLACEMENT_Z) - .EquationId(); - } - - } - void TrussElement3D2N::GetDofList(DofsVectorType& rElementalDofList, - ProcessInfo& rCurrentProcessInfo){ - - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension; - - if (rElementalDofList.size() != local_size) { - rElementalDofList.resize(local_size); - } - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * 3; - rElementalDofList[index] = this->GetGeometry()[i] - .pGetDof(DISPLACEMENT_X); - rElementalDofList[index + 1] = this->GetGeometry()[i] - .pGetDof(DISPLACEMENT_Y); - rElementalDofList[index + 2] = this->GetGeometry()[i] - .pGetDof(DISPLACEMENT_Z); - } - } - - void TrussElement3D2N::Initialize() { - - KRATOS_TRY - KRATOS_CATCH("") - } - - TrussElement3D2N::MatrixType TrussElement3D2N::CreateElementStiffnessMatrix(){ - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension; - - const double E = this->GetProperties()[YOUNG_MODULUS]; - double A = this->GetProperties()[CROSS_AREA]; - - double S_pre = 0.00; - if (this->GetProperties().Has(TRUSS_PRESTRESS_PK2) == true) { - S_pre = this->GetProperties()[TRUSS_PRESTRESS_PK2]; - } - - MatrixType LocalStiffnessMatrix = ZeroMatrix(local_size, local_size); - - // du... delta displacement in x-direction - // dv... delta displacement in y-direction - // dw... delta displacement in z-direction - // L... inital member length - // l... deformed member length - // e_gl... green_lagrange strain - - double du = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_X) - - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_X); - double dv = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Y) - - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Y); - double dw = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Z) - - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Z); - const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); - const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); - const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); - const double L = this->CalculateReferenceLength(); - const double l = this->CalculateCurrentLength(); - double e_gL = (l*l - L*L) / (2.00 * L*L); - const double L2 = L*L; - const double L4 = L2*L2; - - - if (this->mIsLinearElement == true) - { - du = 0.00; - dv = 0.00; - dw = 0.00; - e_gL = 0.00; - } - - - const double K_1 = e_gL*E + S_pre; - - //if cable + compressed -> no contribution to global K - if (this->ReturnIfIsCable() == true && this->mIsCompressed == true) A = 0; - - LocalStiffnessMatrix(0, 0) = A*L*(K_1 / L2 + E*(dx + du)*(dx + du) / L4); - LocalStiffnessMatrix(3, 3) = LocalStiffnessMatrix(0, 0); - - LocalStiffnessMatrix(1, 1) = A*L*(K_1 / L2 + E*(dy + dv)*(dy + dv) / L4); - LocalStiffnessMatrix(4, 4) = LocalStiffnessMatrix(1, 1); - - LocalStiffnessMatrix(2, 2) = A*L*(K_1 / L2 + E*(dz + dw)*(dz + dw) / L4); - LocalStiffnessMatrix(5, 5) = LocalStiffnessMatrix(2, 2); - - LocalStiffnessMatrix(0, 1) = A*L*((dx + du)*(dy + dv)*E / L4); - LocalStiffnessMatrix(1, 0) = LocalStiffnessMatrix(0, 1); - - LocalStiffnessMatrix(0, 2) = A*L*((dx + du)*(dz + dw)*E / L4); - LocalStiffnessMatrix(2, 0) = LocalStiffnessMatrix(0, 2); - - LocalStiffnessMatrix(0, 3) = A*L*(-K_1 / L2 - E*(dx + du)*(dx + du) / L4); - LocalStiffnessMatrix(3, 0) = LocalStiffnessMatrix(0, 3); - - LocalStiffnessMatrix(0, 4) = A*L*((-1.00)*(dx + du)*(dy + dv)*E / L4); - LocalStiffnessMatrix(4, 0) = LocalStiffnessMatrix(0, 4); - - LocalStiffnessMatrix(0, 5) = A*L*((-1.00)*(dx + du)*(dz + dw)*E / L4); - LocalStiffnessMatrix(5, 0) = LocalStiffnessMatrix(0, 5); - - LocalStiffnessMatrix(1, 2) = A*L*((dy + dv)*(dz + dw)*E / L4); - LocalStiffnessMatrix(2, 1) = LocalStiffnessMatrix(1, 2); - - LocalStiffnessMatrix(1, 3) = A*L*((-1.00)*(dy + dv)*(dx + du)*E / L4); - LocalStiffnessMatrix(3, 1) = LocalStiffnessMatrix(1, 3); - - LocalStiffnessMatrix(1, 4) = A*L*(-K_1 / L2 - E*(dy + dv)*(dy + dv) / L4); - LocalStiffnessMatrix(4, 1) = LocalStiffnessMatrix(1, 4); - - LocalStiffnessMatrix(1, 5) = A*L*((-1.00)*(dy + dv)*(dz + dw)*E / L4); - LocalStiffnessMatrix(5, 1) = LocalStiffnessMatrix(1, 5); - - LocalStiffnessMatrix(2, 3) = A*L*((-1.00)*(dw + dz)*(dx + du)*E / L4); - LocalStiffnessMatrix(3, 2) = LocalStiffnessMatrix(2, 3); - - LocalStiffnessMatrix(2, 4) = A*L*((-1.00)*(dw + dz)*(dy + dv)*E / L4); - LocalStiffnessMatrix(4, 2) = LocalStiffnessMatrix(2, 4); - - LocalStiffnessMatrix(2, 5) = A*L*(-K_1 / L2 - E*(dz + dw)*(dz + dw) / L4); - LocalStiffnessMatrix(5, 2) = LocalStiffnessMatrix(2, 5); - - LocalStiffnessMatrix(3, 4) = A*L*((dx + du)*(dy + dv)*E / L4); - LocalStiffnessMatrix(4, 3) = LocalStiffnessMatrix(3, 4); - - LocalStiffnessMatrix(3, 5) = A*L*((dx + du)*(dz + dw)*E / L4); - LocalStiffnessMatrix(5, 3) = LocalStiffnessMatrix(3, 5); - - LocalStiffnessMatrix(4, 5) = A*L*((dy + dv)*(dz + dw)*E / L4); - LocalStiffnessMatrix(5, 4) = LocalStiffnessMatrix(4, 5); - - return LocalStiffnessMatrix; - KRATOS_CATCH("") - } - - void TrussElement3D2N::CalculateDampingMatrix(MatrixType& rDampingMatrix, - ProcessInfo& rCurrentProcessInfo){ - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int MatSize = number_of_nodes * dimension; - - if (rDampingMatrix.size1() != MatSize) - { - rDampingMatrix.resize(MatSize, MatSize, false); - } - - noalias(rDampingMatrix) = ZeroMatrix(MatSize, MatSize); - - MatrixType StiffnessMatrix = ZeroMatrix(MatSize, MatSize); - - this->CalculateLeftHandSide(StiffnessMatrix, rCurrentProcessInfo); - - MatrixType MassMatrix = ZeroMatrix(MatSize, MatSize); - - this->CalculateMassMatrix(MassMatrix, rCurrentProcessInfo); - - double alpha = 0.0; - if (this->GetProperties().Has(RAYLEIGH_ALPHA)) - { - alpha = this->GetProperties()[RAYLEIGH_ALPHA]; - } - else if (rCurrentProcessInfo.Has(RAYLEIGH_ALPHA)) - { - alpha = rCurrentProcessInfo[RAYLEIGH_ALPHA]; - } - - double beta = 0.0; - if (this->GetProperties().Has(RAYLEIGH_BETA)) - { - beta = this->GetProperties()[RAYLEIGH_BETA]; - } - else if (rCurrentProcessInfo.Has(RAYLEIGH_BETA)) - { - beta = rCurrentProcessInfo[RAYLEIGH_BETA]; - } - - rDampingMatrix += alpha * MassMatrix; - rDampingMatrix += beta * StiffnessMatrix; - - KRATOS_CATCH("") - } - - void TrussElement3D2N::CalculateMassMatrix(MatrixType& rMassMatrix, - ProcessInfo& rCurrentProcessInfo){ - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int MatSize = number_of_nodes * dimension; - - if (rMassMatrix.size1() != MatSize) { - rMassMatrix.resize(MatSize, MatSize, false); - } - - rMassMatrix = ZeroMatrix(MatSize, MatSize); - - const double A = this->GetProperties()[CROSS_AREA]; - const double L = this->CalculateReferenceLength(); - const double rho = this->GetProperties()[DENSITY]; - - const double TotalMass = A * L * rho; - - Vector LumpFact = ZeroVector(number_of_nodes); - - LumpFact = this->GetGeometry().LumpingFactors(LumpFact); - - for (int i = 0; i < number_of_nodes; ++i) - { - double temp = LumpFact[i] * TotalMass; - - for (int j = 0; j < dimension; ++j) - { - int index = i *dimension + j; - - rMassMatrix(index, index) = temp; - } - } - KRATOS_CATCH("") - } - - TrussElement3D2N::VectorType TrussElement3D2N::CalculateBodyForces(){ - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int MatSize = number_of_nodes * dimension; - - //getting shapefunctionvalues - const Matrix& Ncontainer = this->GetGeometry().ShapeFunctionsValues( - GeometryData::GI_GAUSS_1); - - //creating necessary values - const double A = this->GetProperties()[CROSS_AREA]; - const double L = this->CalculateReferenceLength(); - const double rho = this->GetProperties()[DENSITY]; - - double TotalMass = A * L * rho; - VectorType BodyForcesNode = ZeroVector(dimension); - VectorType BodyForcesGlobal = ZeroVector(MatSize); - - //assemble global Vector - for (int i = 0; i < number_of_nodes; ++i) { - BodyForcesNode = TotalMass*this->GetGeometry()[i] - .FastGetSolutionStepValue(VOLUME_ACCELERATION)*Ncontainer(0,i); - - for (int j = 0; j < dimension; ++j) { - BodyForcesGlobal[(i*dimension) + j] = BodyForcesNode[j]; - } - } - - return BodyForcesGlobal; - KRATOS_CATCH("") - } - - void TrussElement3D2N::GetValuesVector(Vector& rValues, int Step){ - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int element_size = number_of_nodes * dimension; - - if (rValues.size() != element_size) rValues.resize(element_size, false); - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * dimension; - rValues[index] = this->GetGeometry()[i] - .FastGetSolutionStepValue(DISPLACEMENT_X, Step); - rValues[index + 1] = this->GetGeometry()[i] - .FastGetSolutionStepValue(DISPLACEMENT_Y, Step); - rValues[index + 2] = this->GetGeometry()[i] - .FastGetSolutionStepValue(DISPLACEMENT_Z, Step); - } - KRATOS_CATCH("") - } - - void TrussElement3D2N::GetFirstDerivativesVector(Vector& rValues, int Step){ - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int element_size = number_of_nodes * dimension; - - if (rValues.size() != element_size) rValues.resize(element_size, false); - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * dimension; - rValues[index] = this->GetGeometry()[i] - .FastGetSolutionStepValue(VELOCITY_X, Step); - rValues[index + 1] = this->GetGeometry()[i] - .FastGetSolutionStepValue(VELOCITY_Y, Step); - rValues[index + 2] = this->GetGeometry()[i] - .FastGetSolutionStepValue(VELOCITY_Z, Step); - } - KRATOS_CATCH("") - } - - void TrussElement3D2N::GetSecondDerivativesVector(Vector& rValues,int Step){ - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int element_size = number_of_nodes * dimension; - - if (rValues.size() != element_size) rValues.resize(element_size, false); - - for (int i = 0; i < number_of_nodes; ++i) - { - int index = i * dimension; - rValues[index] = this->GetGeometry()[i] - .FastGetSolutionStepValue(ACCELERATION_X, Step); - rValues[index + 1] = this->GetGeometry()[i] - .FastGetSolutionStepValue(ACCELERATION_Y, Step); - rValues[index + 2] = this->GetGeometry()[i] - .FastGetSolutionStepValue(ACCELERATION_Z, Step); - } - - KRATOS_CATCH("") - } - - void TrussElement3D2N::CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, - VectorType& rRightHandSideVector, - ProcessInfo& rCurrentProcessInfo){ - - KRATOS_TRY - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int LocalSize = NumNodes * dimension; - - //calculate internal forces - VectorType InternalForces = ZeroVector(LocalSize); - this->UpdateInternalForces(InternalForces); - //resizing the matrices + create memory for LHS - rLeftHandSideMatrix = ZeroMatrix(LocalSize, LocalSize); - //creating LHS - noalias(rLeftHandSideMatrix) = this->CreateElementStiffnessMatrix(); - - //create+compute RHS - rRightHandSideVector = ZeroVector(LocalSize); - //update Residual - rRightHandSideVector -= InternalForces; - //add bodyforces - rRightHandSideVector += this->CalculateBodyForces(); - - - if (this->mIsLinearElement == true) - { - Vector NodalDeformation = ZeroVector(LocalSize); - this->GetValuesVector(NodalDeformation, 0); - rRightHandSideVector = ZeroVector(LocalSize); - rRightHandSideVector -= prod(rLeftHandSideMatrix, NodalDeformation); - rRightHandSideVector += this->CalculateBodyForces(); - } - - if (this->ReturnIfIsCable() == true && this->mIsCompressed == true) { - rRightHandSideVector = ZeroVector(LocalSize); - } - KRATOS_CATCH("") - } - - void TrussElement3D2N::CalculateRightHandSide(VectorType& rRightHandSideVector, - ProcessInfo& rCurrentProcessInfo){ - - KRATOS_TRY - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int LocalSize = NumNodes * dimension; - - rRightHandSideVector = ZeroVector(LocalSize); - - VectorType InternalForces = ZeroVector(LocalSize); - this->UpdateInternalForces(InternalForces); - rRightHandSideVector -= InternalForces; - - - if (this->mIsLinearElement == true) - { - Matrix LeftHandSideMatrix = ZeroMatrix(LocalSize, LocalSize); - this->CalculateLeftHandSide(LeftHandSideMatrix, rCurrentProcessInfo); - Vector NodalDeformation = ZeroVector(LocalSize); - this->GetValuesVector(NodalDeformation); - rRightHandSideVector = ZeroVector(LocalSize); - rRightHandSideVector -= prod(LeftHandSideMatrix, NodalDeformation); - } - - //add bodyforces - rRightHandSideVector += this->CalculateBodyForces(); - - if (this->ReturnIfIsCable() == true && this->mIsCompressed == true) { - rRightHandSideVector = ZeroVector(LocalSize); - } - - KRATOS_CATCH("") - } - - void TrussElement3D2N::CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, - ProcessInfo& rCurrentProcessInfo){ - - KRATOS_TRY - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int LocalSize = NumNodes * dimension; - - //resizing the matrices + create memory for LHS - rLeftHandSideMatrix = ZeroMatrix(LocalSize, LocalSize); - //creating LHS - noalias(rLeftHandSideMatrix) = this->CreateElementStiffnessMatrix(); - KRATOS_CATCH("") - } - - void TrussElement3D2N::CalculateOnIntegrationPoints( - const Variable& rVariable, - std::vector& rOutput, - const ProcessInfo& rCurrentProcessInfo){ - KRATOS_TRY - const GeometryType::IntegrationPointsArrayType& integration_points = - GetGeometry().IntegrationPoints(); - - if (rOutput.size() != integration_points.size()) { - rOutput.resize(integration_points.size()); - } - if (rVariable == TRUSS_PRESTRESS_PK2) { - rOutput[0] = 0.00; - if (this->GetProperties().Has(TRUSS_PRESTRESS_PK2) == true) { - rOutput[0] = this->GetProperties()[TRUSS_PRESTRESS_PK2]; - } - } - KRATOS_CATCH("") - } - - void TrussElement3D2N::CalculateOnIntegrationPoints( - const Variable& rVariable, - std::vector& rOutput, - const ProcessInfo& rCurrentProcessInfo){ - KRATOS_TRY - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const GeometryType::IntegrationPointsArrayType& integration_points = - GetGeometry().IntegrationPoints(); - if (rOutput.size() != integration_points.size()) { - rOutput.resize(integration_points.size()); - } - if (rVariable == GREEN_LAGRANGE_STRAIN_VECTOR) - { - Vector Strain = ZeroVector(dimension); - Strain[0] = this->CalculateGreenLagrangeStrain(); - Strain[1] = 0.00; - Strain[2] = 0.00; - rOutput[0] = Strain; - } - KRATOS_CATCH("") - } - - void TrussElement3D2N::GetValueOnIntegrationPoints( - const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo){ - KRATOS_TRY - this->CalculateOnIntegrationPoints(rVariable, rValues, - rCurrentProcessInfo); - KRATOS_CATCH("") - } - void TrussElement3D2N::GetValueOnIntegrationPoints( - const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo){ - KRATOS_TRY - this->CalculateOnIntegrationPoints(rVariable, rValues, - rCurrentProcessInfo); - KRATOS_CATCH("") - } - - - bool TrussElement3D2N::ReturnIfIsCable() - { - KRATOS_TRY; - bool IsCable = false; - if (this->GetProperties().Has(TRUSS_IS_CABLE) == true) { - IsCable = this->GetProperties()[TRUSS_IS_CABLE]; - } - return IsCable; - KRATOS_CATCH("") - } - - int TrussElement3D2N::Check(const ProcessInfo& rCurrentProcessInfo){ - KRATOS_TRY - - if (this->GetGeometry().WorkingSpaceDimension() != 3 || this->GetGeometry().PointsNumber() != 2) - { - KRATOS_THROW_ERROR(std::invalid_argument, - "The truss element works only in 3D and with 2 noded elements", "") - } - //verify that the variables are correctly initialized - if (VELOCITY.Key() == 0) - KRATOS_ERROR << "VELOCITY has Key zero! (check if the application is correctly registered" << "" << std::endl; - if (DISPLACEMENT.Key() == 0) - KRATOS_ERROR << "DISPLACEMENT has Key zero! (check if the application is correctly registered" << "" << std::endl; - if (ACCELERATION.Key() == 0) - KRATOS_ERROR << "ACCELERATION has Key zero! (check if the application is correctly registered" << "" << std::endl; - if (DENSITY.Key() == 0) - KRATOS_ERROR << "DENSITY has Key zero! (check if the application is correctly registered" << "" << std::endl; - if (CROSS_AREA.Key() == 0) - KRATOS_ERROR << "CROSS_AREA has Key zero! (check if the application is correctly registered" << "" << std::endl; - //verify that the dofs exist - for (unsigned int i = 0; iGetGeometry().PointsNumber(); ++i) - { - if (this->GetGeometry()[i].SolutionStepsDataHas(DISPLACEMENT) == false) - KRATOS_ERROR << "missing variable DISPLACEMENT on node " << this->GetGeometry()[i].Id() << std::endl; - if (this->GetGeometry()[i].HasDofFor(DISPLACEMENT_X) == false || this->GetGeometry()[i].HasDofFor(DISPLACEMENT_Y) == false || this->GetGeometry()[i].HasDofFor(DISPLACEMENT_Z) == false) - KRATOS_ERROR << "missing one of the dofs for the variable DISPLACEMENT on node " << GetGeometry()[i].Id() << std::endl; - } - - - - if (this->GetProperties().Has(CROSS_AREA) == false || - this->GetProperties()[CROSS_AREA] == 0) - { - KRATOS_ERROR << "CROSS_AREA not provided for this element" << this->Id() << std::endl; - } - - if (this->GetProperties().Has(YOUNG_MODULUS) == false || - this->GetProperties()[YOUNG_MODULUS] == 0) - { - KRATOS_ERROR << "YOUNG_MODULUS not provided for this element" << this->Id() << std::endl; - } - if (this->GetProperties().Has(DENSITY) == false) - { - KRATOS_ERROR << "DENSITY not provided for this element" << this->Id() << std::endl; - } - - - return 0; - - KRATOS_CATCH("") - } - double TrussElement3D2N::CalculateGreenLagrangeStrain(){ - - KRATOS_TRY - const double l = this->CalculateCurrentLength(); - const double L = this->CalculateReferenceLength(); - const double e = ((l * l - L * L) / (2.00 * L * L)); - return e; - KRATOS_CATCH("") - } - - double TrussElement3D2N::CalculateReferenceLength(){ - - KRATOS_TRY - const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); - const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); - const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); - const double L = sqrt(dx*dx + dy*dy + dz*dz); - return L; - KRATOS_CATCH("") - } - double TrussElement3D2N::CalculateCurrentLength(){ - - KRATOS_TRY - const double du = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_X) - - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_X); - const double dv = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Y) - - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Y); - const double dw = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Z) - - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Z); - const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); - const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); - const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); - const double l = sqrt((du + dx)*(du + dx) + (dv + dy)*(dv + dy) - + (dw + dz)*(dw + dz)); - return l; - KRATOS_CATCH("") - } - void TrussElement3D2N::UpdateInternalForces(VectorType& rinternalForces){ - - KRATOS_TRY - const int NumNodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const int LocalSize = NumNodes * dimension; - - MatrixType TransformationMatrix = ZeroMatrix(LocalSize, LocalSize); - this->CreateTransformationMatrix(TransformationMatrix); - const double InternalStrainGL = this->CalculateGreenLagrangeStrain(); - const double l = this->CalculateCurrentLength(); - const double L0 = this->CalculateReferenceLength(); - const double E = this->GetProperties()[YOUNG_MODULUS]; - const double A = this->GetProperties()[CROSS_AREA]; - - double S_pre = 0.00; - if (this->GetProperties().Has(TRUSS_PRESTRESS_PK2) == true) { - S_pre = this->GetProperties()[TRUSS_PRESTRESS_PK2]; - } - - const double N = ((E*InternalStrainGL + S_pre) * l * A) / L0; - - if (N < 0.00) this->mIsCompressed = true; - else this->mIsCompressed = false; - - //internal force vectors - VectorType f_local = ZeroVector(LocalSize); - f_local[0] = -1.00 * N; - f_local[3] = 1.00 * N; - - rinternalForces = ZeroVector(LocalSize); - noalias(rinternalForces) = prod(TransformationMatrix, f_local); - KRATOS_CATCH(""); - } - - void TrussElement3D2N::CreateTransformationMatrix(Matrix& rRotationMatrix){ - - KRATOS_TRY - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - const unsigned int local_size = number_of_nodes * dimension; - - //1st calculate transformation matrix - Vector DirectionVectorX = ZeroVector(dimension); - Vector DirectionVectorY = ZeroVector(dimension); - Vector DirectionVectorZ = ZeroVector(dimension); - Vector ReferenceCoordinates = ZeroVector(local_size); - Vector GlobalZ = ZeroVector(dimension); - GlobalZ[2] = 1.0; - - ReferenceCoordinates[0] = this->GetGeometry()[0].X(); - ReferenceCoordinates[1] = this->GetGeometry()[0].Y(); - ReferenceCoordinates[2] = this->GetGeometry()[0].Z(); - ReferenceCoordinates[3] = this->GetGeometry()[1].X(); - ReferenceCoordinates[4] = this->GetGeometry()[1].Y(); - ReferenceCoordinates[5] = this->GetGeometry()[1].Z(); - - for (int i = 0; i < dimension; ++i) - { - DirectionVectorX[i] = (ReferenceCoordinates[i + dimension] - - ReferenceCoordinates[i]); - } - // local x-axis (e1_local) is the beam axis (in GID is e3_local) - double VectorNorm; - VectorNorm = MathUtils::Norm(DirectionVectorX); - if (VectorNorm != 0) DirectionVectorX /= VectorNorm; - - if (DirectionVectorX[2] == 1.00) { - DirectionVectorY[1] = 1.0; - DirectionVectorZ[0] = -1.0; - } - - if (DirectionVectorX[2] == -1.00) { - DirectionVectorY[1] = 1.0; - DirectionVectorZ[0] = 1.0; - } - - if (fabs(DirectionVectorX[2]) != 1.00) { - - DirectionVectorY = MathUtils::CrossProduct(GlobalZ, - DirectionVectorX); - VectorNorm = MathUtils::Norm(DirectionVectorY); - if (VectorNorm != 0) DirectionVectorY /= VectorNorm; - - DirectionVectorZ = MathUtils::CrossProduct(DirectionVectorX, - DirectionVectorY); - VectorNorm = MathUtils::Norm(DirectionVectorZ); - if (VectorNorm != 0) DirectionVectorZ /= VectorNorm; - } - - //2nd fill big rotation matrix - MatrixType CurrentCS = ZeroMatrix(dimension, dimension); - for (int i = 0; i < dimension; ++i) { - CurrentCS(i, 0) = DirectionVectorX[i]; - CurrentCS(i, 1) = DirectionVectorY[i]; - CurrentCS(i, 2) = DirectionVectorZ[i]; - } - - rRotationMatrix = ZeroMatrix(local_size, local_size); - if (rRotationMatrix.size1() != local_size) { - rRotationMatrix.resize(local_size, local_size, false); - } - //Building the rotation matrix for the local element matrix - for (unsigned int kk = 0; kk < local_size; kk += dimension) - { - for (int i = 0; i& rRHSVariable, - Variable >& rDestinationVariable, - const ProcessInfo& rCurrentProcessInfo) - { - KRATOS_TRY; - const int number_of_nodes = this->GetGeometry().PointsNumber(); - const int dimension = this->GetGeometry().WorkingSpaceDimension(); - - if (rRHSVariable == RESIDUAL_VECTOR && rDestinationVariable == FORCE_RESIDUAL) - { - - for (int i = 0; i< number_of_nodes; ++i) - { - int index = dimension * i; - - GetGeometry()[i].SetLock(); - - array_1d &ForceResidual = - GetGeometry()[i].FastGetSolutionStepValue(FORCE_RESIDUAL); - - for (int j = 0; jmIsCompressed); - rSerializer.save("LinerEle", this->mIsLinearElement); - - } - void TrussElement3D2N::load(Serializer& rSerializer) - { - KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element); - rSerializer.load("mIscompressed", this->mIsCompressed); - rSerializer.load("LinerEle", this->mIsLinearElement); - } -} // namespace Kratos. - - +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Klaus B. Sautter +// +// +// + +// System includes + +// External includes + +// Project includes +#include "custom_elements/truss_element_3D2N.hpp" +#include "structural_mechanics_application_variables.h" +#include "includes/define.h" + + +namespace Kratos +{ + TrussElement3D2N::TrussElement3D2N(IndexType NewId, + GeometryType::Pointer pGeometry, + bool rLinear) + : Element(NewId, pGeometry) + { + this->mIsLinearElement = rLinear; + } + + TrussElement3D2N::TrussElement3D2N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + bool rLinear) + : Element(NewId, pGeometry, pProperties) + { + this->mIsLinearElement = rLinear; + } + + Element::Pointer TrussElement3D2N::Create(IndexType NewId, + NodesArrayType const& rThisNodes, + PropertiesType::Pointer pProperties) const + { + const GeometryType& rGeom = this->GetGeometry(); + return BaseType::Pointer(new TrussElement3D2N( + NewId, rGeom.Create(rThisNodes),pProperties, this->mIsLinearElement)); + } + + TrussElement3D2N::~TrussElement3D2N(){} + + void TrussElement3D2N::EquationIdVector(EquationIdVectorType& rResult, + ProcessInfo& rCurrentProcessInfo){ + + if (rResult.size() != msLocalSize) rResult.resize(msLocalSize); + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * 3; + rResult[index] = this->GetGeometry()[i].GetDof(DISPLACEMENT_X) + .EquationId(); + rResult[index + 1] = this->GetGeometry()[i].GetDof(DISPLACEMENT_Y) + .EquationId(); + rResult[index + 2] = this->GetGeometry()[i].GetDof(DISPLACEMENT_Z) + .EquationId(); + } + + } + void TrussElement3D2N::GetDofList(DofsVectorType& rElementalDofList, + ProcessInfo& rCurrentProcessInfo){ + + if (rElementalDofList.size() != msLocalSize) { + rElementalDofList.resize(msLocalSize); + } + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * 3; + rElementalDofList[index] = this->GetGeometry()[i] + .pGetDof(DISPLACEMENT_X); + rElementalDofList[index + 1] = this->GetGeometry()[i] + .pGetDof(DISPLACEMENT_Y); + rElementalDofList[index + 2] = this->GetGeometry()[i] + .pGetDof(DISPLACEMENT_Z); + } + } + + void TrussElement3D2N::Initialize() { + + KRATOS_TRY + KRATOS_CATCH("") + } + + + + bounded_matrix TrussElement3D2N::CreateElementStiffnessMatrix( + ProcessInfo& rCurrentProcessInfo){ + + KRATOS_TRY + bounded_matrix LocalStiffnessMatrix = ZeroMatrix(msLocalSize, msLocalSize); + + if (this->ReturnIfIsCable() == true && this->mIsCompressed == true) + { + LocalStiffnessMatrix = ZeroMatrix(msLocalSize, msLocalSize); + } + + else + { + this->CalculateElasticStiffnessMatrix(LocalStiffnessMatrix, + rCurrentProcessInfo); + if (this->mIsLinearElement == false) + { + bounded_matrix K_geo = ZeroMatrix(msLocalSize, msLocalSize); + this->CalculateGeometricStiffnessMatrix(K_geo, rCurrentProcessInfo); + + LocalStiffnessMatrix += K_geo; + } + } + + return LocalStiffnessMatrix; + KRATOS_CATCH("") + } + + void TrussElement3D2N::CalculateDampingMatrix(MatrixType& rDampingMatrix, + ProcessInfo& rCurrentProcessInfo){ + + KRATOS_TRY + if (rDampingMatrix.size1() != msLocalSize) + { + rDampingMatrix.resize(msLocalSize, msLocalSize, false); + } + + noalias(rDampingMatrix) = ZeroMatrix(msLocalSize, msLocalSize); + + MatrixType StiffnessMatrix = ZeroMatrix(msLocalSize, msLocalSize); + + this->CalculateLeftHandSide(StiffnessMatrix, rCurrentProcessInfo); + + MatrixType MassMatrix = ZeroMatrix(msLocalSize, msLocalSize); + + this->CalculateMassMatrix(MassMatrix, rCurrentProcessInfo); + + double alpha = 0.0; + if (this->GetProperties().Has(RAYLEIGH_ALPHA)) + { + alpha = this->GetProperties()[RAYLEIGH_ALPHA]; + } + else if (rCurrentProcessInfo.Has(RAYLEIGH_ALPHA)) + { + alpha = rCurrentProcessInfo[RAYLEIGH_ALPHA]; + } + + double beta = 0.0; + if (this->GetProperties().Has(RAYLEIGH_BETA)) + { + beta = this->GetProperties()[RAYLEIGH_BETA]; + } + else if (rCurrentProcessInfo.Has(RAYLEIGH_BETA)) + { + beta = rCurrentProcessInfo[RAYLEIGH_BETA]; + } + + rDampingMatrix += alpha * MassMatrix; + rDampingMatrix += beta * StiffnessMatrix; + + KRATOS_CATCH("") + } + + void TrussElement3D2N::CalculateMassMatrix(MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo){ + + KRATOS_TRY + if (rMassMatrix.size1() != msLocalSize) { + rMassMatrix.resize(msLocalSize, msLocalSize, false); + } + + rMassMatrix = ZeroMatrix(msLocalSize, msLocalSize); + + const double A = this->GetProperties()[CROSS_AREA]; + const double L = this->CalculateReferenceLength(); + const double rho = this->GetProperties()[DENSITY]; + + const double TotalMass = A * L * rho; + + Vector LumpFact = ZeroVector(msNumberOfNodes); + + LumpFact = this->GetGeometry().LumpingFactors(LumpFact); + + for (int i = 0; i < msNumberOfNodes; ++i) + { + double temp = LumpFact[i] * TotalMass; + + for (int j = 0; j < msDimension; ++j) + { + int index = i *msDimension + j; + + rMassMatrix(index, index) = temp; + } + } + KRATOS_CATCH("") + } + + bounded_vector TrussElement3D2N::CalculateBodyForces(){ + + KRATOS_TRY + //getting shapefunctionvalues + const Matrix& Ncontainer = this->GetGeometry().ShapeFunctionsValues( + GeometryData::GI_GAUSS_1); + + //creating necessary values + const double A = this->GetProperties()[CROSS_AREA]; + const double L = this->CalculateReferenceLength(); + const double rho = this->GetProperties()[DENSITY]; + + double TotalMass = A * L * rho; + bounded_vector BodyForcesNode = ZeroVector(msDimension); + bounded_vector BodyForcesGlobal = ZeroVector(msLocalSize); + + //assemble global Vector + for (int i = 0; i < msNumberOfNodes; ++i) { + BodyForcesNode = TotalMass*this->GetGeometry()[i] + .FastGetSolutionStepValue(VOLUME_ACCELERATION)*Ncontainer(0,i); + + for (unsigned int j = 0; j < msDimension; ++j) { + BodyForcesGlobal[(i*msDimension) + j] = BodyForcesNode[j]; + } + } + + return BodyForcesGlobal; + KRATOS_CATCH("") + } + + void TrussElement3D2N::GetValuesVector(Vector& rValues, int Step){ + + KRATOS_TRY + if (rValues.size() != msLocalSize) rValues.resize(msLocalSize, false); + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * msDimension; + rValues[index] = this->GetGeometry()[i] + .FastGetSolutionStepValue(DISPLACEMENT_X, Step); + rValues[index + 1] = this->GetGeometry()[i] + .FastGetSolutionStepValue(DISPLACEMENT_Y, Step); + rValues[index + 2] = this->GetGeometry()[i] + .FastGetSolutionStepValue(DISPLACEMENT_Z, Step); + } + KRATOS_CATCH("") + } + + void TrussElement3D2N::GetFirstDerivativesVector(Vector& rValues, int Step){ + + KRATOS_TRY + if (rValues.size() != msLocalSize) rValues.resize(msLocalSize, false); + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * msDimension; + rValues[index] = this->GetGeometry()[i] + .FastGetSolutionStepValue(VELOCITY_X, Step); + rValues[index + 1] = this->GetGeometry()[i] + .FastGetSolutionStepValue(VELOCITY_Y, Step); + rValues[index + 2] = this->GetGeometry()[i] + .FastGetSolutionStepValue(VELOCITY_Z, Step); + } + KRATOS_CATCH("") + } + + void TrussElement3D2N::GetSecondDerivativesVector(Vector& rValues,int Step){ + + KRATOS_TRY + if (rValues.size() != msLocalSize) rValues.resize(msLocalSize, false); + + for (int i = 0; i < msNumberOfNodes; ++i) + { + int index = i * msDimension; + rValues[index] = this->GetGeometry()[i] + .FastGetSolutionStepValue(ACCELERATION_X, Step); + rValues[index + 1] = this->GetGeometry()[i] + .FastGetSolutionStepValue(ACCELERATION_Y, Step); + rValues[index + 2] = this->GetGeometry()[i] + .FastGetSolutionStepValue(ACCELERATION_Z, Step); + } + + KRATOS_CATCH("") + } + + void TrussElement3D2N::CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo){ + + KRATOS_TRY + //calculate internal forces + bounded_vector InternalForces = ZeroVector(msLocalSize); + this->UpdateInternalForces(InternalForces); + //resizing the matrices + create memory for LHS + rLeftHandSideMatrix = ZeroMatrix(msLocalSize, msLocalSize); + //creating LHS + noalias(rLeftHandSideMatrix) = this->CreateElementStiffnessMatrix( + rCurrentProcessInfo); + + //create+compute RHS + rRightHandSideVector = ZeroVector(msLocalSize); + //update Residual + rRightHandSideVector -= InternalForces; + //add bodyforces + rRightHandSideVector += this->CalculateBodyForces(); + + + if (this->mIsLinearElement) + { + Vector NodalDeformation = ZeroVector(msLocalSize); + this->GetValuesVector(NodalDeformation, 0); + rRightHandSideVector = ZeroVector(msLocalSize); + rRightHandSideVector -= prod(rLeftHandSideMatrix, NodalDeformation); + rRightHandSideVector += this->CalculateBodyForces(); + } + + if (this->ReturnIfIsCable() == true && this->mIsCompressed == true) { + rRightHandSideVector = ZeroVector(msLocalSize); + } + KRATOS_CATCH("") + } + + void TrussElement3D2N::CalculateRightHandSide(VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo){ + + KRATOS_TRY + rRightHandSideVector = ZeroVector(msLocalSize); + + bounded_vector InternalForces = ZeroVector(msLocalSize); + this->UpdateInternalForces(InternalForces); + rRightHandSideVector -= InternalForces; + + + if (this->mIsLinearElement) + { + Matrix LeftHandSideMatrix = ZeroMatrix(msLocalSize, msLocalSize); + this->CalculateLeftHandSide(LeftHandSideMatrix, rCurrentProcessInfo); + Vector NodalDeformation = ZeroVector(msLocalSize); + this->GetValuesVector(NodalDeformation); + rRightHandSideVector = ZeroVector(msLocalSize); + rRightHandSideVector -= prod(LeftHandSideMatrix, NodalDeformation); + } + + //add bodyforces + rRightHandSideVector += this->CalculateBodyForces(); + + if (this->ReturnIfIsCable() == true && this->mIsCompressed == true) { + rRightHandSideVector = ZeroVector(msLocalSize); + } + KRATOS_CATCH("") + } + + void TrussElement3D2N::CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, + ProcessInfo& rCurrentProcessInfo){ + + KRATOS_TRY + //resizing the matrices + create memory for LHS + rLeftHandSideMatrix = ZeroMatrix(msLocalSize, msLocalSize); + //creating LHS + noalias(rLeftHandSideMatrix) = this->CreateElementStiffnessMatrix( + rCurrentProcessInfo); + KRATOS_CATCH("") + } + + void TrussElement3D2N::CalculateOnIntegrationPoints( + const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo){ + KRATOS_TRY + const GeometryType::IntegrationPointsArrayType& integration_points = + GetGeometry().IntegrationPoints(); + + if (rOutput.size() != integration_points.size()) { + rOutput.resize(integration_points.size()); + } + if (rVariable == TRUSS_PRESTRESS_PK2) { + rOutput[0] = 0.00; + if (this->GetProperties().Has(TRUSS_PRESTRESS_PK2)) { + rOutput[0] = this->GetProperties()[TRUSS_PRESTRESS_PK2]; + } + } + KRATOS_CATCH("") + } + + void TrussElement3D2N::CalculateOnIntegrationPoints( + const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo){ + KRATOS_TRY + const GeometryType::IntegrationPointsArrayType& integration_points = + GetGeometry().IntegrationPoints(); + if (rOutput.size() != integration_points.size()) { + rOutput.resize(integration_points.size()); + } + if (rVariable == GREEN_LAGRANGE_STRAIN_VECTOR) + { + Vector Strain = ZeroVector(msDimension); + Strain[0] = this->CalculateGreenLagrangeStrain(); + Strain[1] = 0.00; + Strain[2] = 0.00; + rOutput[0] = Strain; + } + KRATOS_CATCH("") + } + + void TrussElement3D2N::GetValueOnIntegrationPoints( + const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo){ + KRATOS_TRY + this->CalculateOnIntegrationPoints(rVariable, rValues, + rCurrentProcessInfo); + KRATOS_CATCH("") + } + void TrussElement3D2N::GetValueOnIntegrationPoints( + const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo){ + KRATOS_TRY + this->CalculateOnIntegrationPoints(rVariable, rValues, + rCurrentProcessInfo); + KRATOS_CATCH("") + } + + + bool TrussElement3D2N::ReturnIfIsCable() + { + KRATOS_TRY; + bool IsCable = false; + if (this->GetProperties().Has(TRUSS_IS_CABLE)) { + IsCable = this->GetProperties()[TRUSS_IS_CABLE]; + } + return IsCable; + KRATOS_CATCH("") + } + + int TrussElement3D2N::Check(const ProcessInfo& rCurrentProcessInfo){ + KRATOS_TRY + + if (this->GetGeometry().WorkingSpaceDimension() != msDimension || this->GetGeometry().PointsNumber() != msNumberOfNodes) + { + KRATOS_THROW_ERROR(std::invalid_argument, + "The truss element works only in 3D and with 2 noded elements", "") + } + //verify that the variables are correctly initialized + if (VELOCITY.Key() == 0) + KRATOS_ERROR << "VELOCITY has Key zero! (check if the application is correctly registered" << "" << std::endl; + if (DISPLACEMENT.Key() == 0) + KRATOS_ERROR << "DISPLACEMENT has Key zero! (check if the application is correctly registered" << "" << std::endl; + if (ACCELERATION.Key() == 0) + KRATOS_ERROR << "ACCELERATION has Key zero! (check if the application is correctly registered" << "" << std::endl; + if (DENSITY.Key() == 0) + KRATOS_ERROR << "DENSITY has Key zero! (check if the application is correctly registered" << "" << std::endl; + if (CROSS_AREA.Key() == 0) + KRATOS_ERROR << "CROSS_AREA has Key zero! (check if the application is correctly registered" << "" << std::endl; + //verify that the dofs exist + for (unsigned int i = 0; iGetGeometry().PointsNumber(); ++i) + { + if (this->GetGeometry()[i].SolutionStepsDataHas(DISPLACEMENT) == false) + KRATOS_ERROR << "missing variable DISPLACEMENT on node " << this->GetGeometry()[i].Id() << std::endl; + if (this->GetGeometry()[i].HasDofFor(DISPLACEMENT_X) == false || this->GetGeometry()[i].HasDofFor(DISPLACEMENT_Y) == false || this->GetGeometry()[i].HasDofFor(DISPLACEMENT_Z) == false) + KRATOS_ERROR << "missing one of the dofs for the variable DISPLACEMENT on node " << GetGeometry()[i].Id() << std::endl; + } + + + + if (this->GetProperties().Has(CROSS_AREA) == false || + this->GetProperties()[CROSS_AREA] == 0) + { + KRATOS_ERROR << "CROSS_AREA not provided for this element" << this->Id() << std::endl; + } + + if (this->GetProperties().Has(YOUNG_MODULUS) == false || + this->GetProperties()[YOUNG_MODULUS] == 0) + { + KRATOS_ERROR << "YOUNG_MODULUS not provided for this element" << this->Id() << std::endl; + } + if (this->GetProperties().Has(DENSITY) == false) + { + KRATOS_ERROR << "DENSITY not provided for this element" << this->Id() << std::endl; + } + + + return 0; + + KRATOS_CATCH("") + } + double TrussElement3D2N::CalculateGreenLagrangeStrain(){ + + KRATOS_TRY + const double l = this->CalculateCurrentLength(); + const double L = this->CalculateReferenceLength(); + const double e = ((l * l - L * L) / (2.00 * L * L)); + return e; + KRATOS_CATCH("") + } + + double TrussElement3D2N::CalculateReferenceLength(){ + + KRATOS_TRY + const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); + const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); + const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); + const double L = sqrt(dx*dx + dy*dy + dz*dz); + return L; + KRATOS_CATCH("") + } + double TrussElement3D2N::CalculateCurrentLength(){ + + KRATOS_TRY + const double du = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_X) + - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_X); + const double dv = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Y) + - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Y); + const double dw = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Z) + - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Z); + const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); + const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); + const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); + const double l = sqrt((du + dx)*(du + dx) + (dv + dy)*(dv + dy) + + (dw + dz)*(dw + dz)); + return l; + KRATOS_CATCH("") + } + void TrussElement3D2N::UpdateInternalForces(bounded_vector& rinternalForces){ + + KRATOS_TRY + bounded_matrix + TransformationMatrix = ZeroMatrix(msLocalSize, msLocalSize); + + this->CreateTransformationMatrix(TransformationMatrix); + const double InternalStrainGL = this->CalculateGreenLagrangeStrain(); + const double l = this->CalculateCurrentLength(); + const double L0 = this->CalculateReferenceLength(); + const double E = this->GetProperties()[YOUNG_MODULUS]; + const double A = this->GetProperties()[CROSS_AREA]; + + double S_pre = 0.00; + if (this->GetProperties().Has(TRUSS_PRESTRESS_PK2)) { + S_pre = this->GetProperties()[TRUSS_PRESTRESS_PK2]; + } + + const double N = ((E*InternalStrainGL + S_pre) * l * A) / L0; + + if (N < 0.00) this->mIsCompressed = true; + else this->mIsCompressed = false; + + //internal force vectors + bounded_vector f_local = ZeroVector(msLocalSize); + f_local[0] = -1.00 * N; + f_local[3] = 1.00 * N; + rinternalForces = ZeroVector(msLocalSize); + noalias(rinternalForces) = prod(TransformationMatrix, f_local); + KRATOS_CATCH(""); + } + + void TrussElement3D2N::CreateTransformationMatrix(bounded_matrix& rRotationMatrix){ + + KRATOS_TRY + //1st calculate transformation matrix + bounded_vector DirectionVectorX = ZeroVector(msDimension); + bounded_vector DirectionVectorY = ZeroVector(msDimension); + bounded_vector DirectionVectorZ = ZeroVector(msDimension); + bounded_vector ReferenceCoordinates = ZeroVector(msLocalSize); + bounded_vector GlobalZ = ZeroVector(msDimension); + GlobalZ[2] = 1.0; + + ReferenceCoordinates[0] = this->GetGeometry()[0].X(); + ReferenceCoordinates[1] = this->GetGeometry()[0].Y(); + ReferenceCoordinates[2] = this->GetGeometry()[0].Z(); + ReferenceCoordinates[3] = this->GetGeometry()[1].X(); + ReferenceCoordinates[4] = this->GetGeometry()[1].Y(); + ReferenceCoordinates[5] = this->GetGeometry()[1].Z(); + + for (unsigned int i = 0; i < msDimension; ++i) + { + DirectionVectorX[i] = (ReferenceCoordinates[i + msDimension] - + ReferenceCoordinates[i]); + } + // local x-axis (e1_local) is the beam axis (in GID is e3_local) + double VectorNorm; + VectorNorm = MathUtils::Norm(DirectionVectorX); + if (VectorNorm != 0) DirectionVectorX /= VectorNorm; + + if (DirectionVectorX[2] == 1.00) { + DirectionVectorY[1] = 1.0; + DirectionVectorZ[0] = -1.0; + } + + if (DirectionVectorX[2] == -1.00) { + DirectionVectorY[1] = 1.0; + DirectionVectorZ[0] = 1.0; + } + + if (fabs(DirectionVectorX[2]) != 1.00) { + + DirectionVectorY = MathUtils::CrossProduct(GlobalZ, + DirectionVectorX); + VectorNorm = MathUtils::Norm(DirectionVectorY); + if (VectorNorm != 0) DirectionVectorY /= VectorNorm; + + DirectionVectorZ = MathUtils::CrossProduct(DirectionVectorX, + DirectionVectorY); + VectorNorm = MathUtils::Norm(DirectionVectorZ); + if (VectorNorm != 0) DirectionVectorZ /= VectorNorm; + } + + //2nd fill big rotation matrix + bounded_matrix CurrentCS = ZeroMatrix(msDimension, msDimension); + for (unsigned int i = 0; i < msDimension; ++i) { + CurrentCS(i, 0) = DirectionVectorX[i]; + CurrentCS(i, 1) = DirectionVectorY[i]; + CurrentCS(i, 2) = DirectionVectorZ[i]; + } + + rRotationMatrix = ZeroMatrix(msLocalSize, msLocalSize); + //Building the rotation matrix for the local element matrix + for (unsigned int kk = 0; kk < msLocalSize; kk += msDimension) + { + for (unsigned int i = 0; i& rRHSVariable, + Variable >& rDestinationVariable, + const ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + if (rRHSVariable == RESIDUAL_VECTOR && rDestinationVariable == FORCE_RESIDUAL) + { + + for (int i = 0; i< msNumberOfNodes; ++i) + { + int index = msDimension * i; + + GetGeometry()[i].SetLock(); + + array_1d &ForceResidual = + GetGeometry()[i].FastGetSolutionStepValue(FORCE_RESIDUAL); + + for (int j = 0; j& rGeometricStiffnessMatrix, + ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + const double E = this->GetProperties()[YOUNG_MODULUS]; + double A = this->GetProperties()[CROSS_AREA]; + + double S_pre = 0.00; + if (this->GetProperties().Has(TRUSS_PRESTRESS_PK2)) { + S_pre = this->GetProperties()[TRUSS_PRESTRESS_PK2]; + } + + rGeometricStiffnessMatrix = ZeroMatrix(msLocalSize,msLocalSize); + + // du... delta displacement in x-direction + // dv... delta displacement in y-direction + // dw... delta displacement in z-direction + // L... inital member length + // l... deformed member length + // e_gl... green_lagrange strain + + double du = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_X) + - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_X); + double dv = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Y) + - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Y); + double dw = this->GetGeometry()[1].FastGetSolutionStepValue(DISPLACEMENT_Z) + - this->GetGeometry()[0].FastGetSolutionStepValue(DISPLACEMENT_Z); + const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); + const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); + const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); + const double L = this->CalculateReferenceLength(); + const double l = this->CalculateCurrentLength(); + double e_gL = (l*l - L*L) / (2.00 * L*L); + const double L3 = L * L * L; + + + const double K_sigma = ((E*A*e_gL) / L) + ((S_pre*A) / L); + const double K_uij = (E*A) / L3; + + rGeometricStiffnessMatrix(0, 0) = K_sigma + K_uij * (2 * du*dx + du*du); + rGeometricStiffnessMatrix(3, 3) = rGeometricStiffnessMatrix(0, 0); + + rGeometricStiffnessMatrix(1, 1) = K_sigma + K_uij * (2 * dv*dy + dv*dv); + rGeometricStiffnessMatrix(4, 4) = rGeometricStiffnessMatrix(1, 1); + + rGeometricStiffnessMatrix(2, 2) = K_sigma + K_uij * (2 * dw*dz + dw*dw); + rGeometricStiffnessMatrix(5, 5) = rGeometricStiffnessMatrix(2, 2); + + rGeometricStiffnessMatrix(0, 1) = K_uij * (dx*dv + dy*du + du*dv); + rGeometricStiffnessMatrix(1, 0) = rGeometricStiffnessMatrix(0, 1); + + rGeometricStiffnessMatrix(0, 2) = K_uij * (dx*dw + dz*du + du*dw); + rGeometricStiffnessMatrix(2, 0) = rGeometricStiffnessMatrix(0, 2); + + rGeometricStiffnessMatrix(0, 3) = -rGeometricStiffnessMatrix(0, 0); + rGeometricStiffnessMatrix(3, 0) = rGeometricStiffnessMatrix(0, 3); + + rGeometricStiffnessMatrix(0, 4) = -rGeometricStiffnessMatrix(0, 1); + rGeometricStiffnessMatrix(4, 0) = rGeometricStiffnessMatrix(0, 4); + + rGeometricStiffnessMatrix(0, 5) = -rGeometricStiffnessMatrix(0, 2); + rGeometricStiffnessMatrix(5, 0) = rGeometricStiffnessMatrix(0, 5); + + rGeometricStiffnessMatrix(1, 2) = K_uij * (dy*dw + dz*dv + dv*dw); + rGeometricStiffnessMatrix(2, 1) = rGeometricStiffnessMatrix(1, 2); + + rGeometricStiffnessMatrix(1, 3) = rGeometricStiffnessMatrix(0, 4); + rGeometricStiffnessMatrix(3, 1) = rGeometricStiffnessMatrix(1, 3); + + rGeometricStiffnessMatrix(1, 4) = -rGeometricStiffnessMatrix(1, 1); + rGeometricStiffnessMatrix(4, 1) = rGeometricStiffnessMatrix(1, 4); + + rGeometricStiffnessMatrix(1, 5) = -rGeometricStiffnessMatrix(1, 2); + rGeometricStiffnessMatrix(5, 1) = rGeometricStiffnessMatrix(1, 5); + + rGeometricStiffnessMatrix(2, 3) = -rGeometricStiffnessMatrix(0, 2); + rGeometricStiffnessMatrix(3, 2) = rGeometricStiffnessMatrix(2, 3); + + rGeometricStiffnessMatrix(2, 4) = -rGeometricStiffnessMatrix(1, 2); + rGeometricStiffnessMatrix(4, 2) = rGeometricStiffnessMatrix(2, 4); + + rGeometricStiffnessMatrix(2, 5) = -rGeometricStiffnessMatrix(2, 2); + rGeometricStiffnessMatrix(5, 2) = rGeometricStiffnessMatrix(2, 5); + + rGeometricStiffnessMatrix(3, 4) = rGeometricStiffnessMatrix(0, 1); + rGeometricStiffnessMatrix(4, 3) = rGeometricStiffnessMatrix(3, 4); + + rGeometricStiffnessMatrix(3, 5) = rGeometricStiffnessMatrix(0, 2); + rGeometricStiffnessMatrix(5, 3) = rGeometricStiffnessMatrix(3, 5); + + rGeometricStiffnessMatrix(4, 5) = rGeometricStiffnessMatrix(1, 2); + rGeometricStiffnessMatrix(5, 4) = rGeometricStiffnessMatrix(4, 5); + KRATOS_CATCH("") + } + + void TrussElement3D2N::CalculateElasticStiffnessMatrix(bounded_matrix& rElasticStiffnessMatrix, + ProcessInfo& rCurrentProcessInfo) + { + KRATOS_TRY; + const double E = this->GetProperties()[YOUNG_MODULUS]; + double A = this->GetProperties()[CROSS_AREA]; + + rElasticStiffnessMatrix = ZeroMatrix(msLocalSize, msLocalSize); + + const double dx = this->GetGeometry()[1].X0() - this->GetGeometry()[0].X0(); + const double dy = this->GetGeometry()[1].Y0() - this->GetGeometry()[0].Y0(); + const double dz = this->GetGeometry()[1].Z0() - this->GetGeometry()[0].Z0(); + const double L = this->CalculateReferenceLength(); + const double L3 = L*L*L; + + const double EA = E*A; + + rElasticStiffnessMatrix(0, 0) = (EA*dx*dx) / L3; + rElasticStiffnessMatrix(3, 3) = rElasticStiffnessMatrix(0, 0); + + rElasticStiffnessMatrix(1, 1) = (EA*dy*dy) / L3; + rElasticStiffnessMatrix(4, 4) = rElasticStiffnessMatrix(1, 1); + + rElasticStiffnessMatrix(2, 2) = (EA*dz*dz) / L3; + rElasticStiffnessMatrix(5, 5) = rElasticStiffnessMatrix(2, 2); + + rElasticStiffnessMatrix(0, 1) = (EA*dx*dy) / L3; + rElasticStiffnessMatrix(1, 0) = rElasticStiffnessMatrix(0, 1); + + rElasticStiffnessMatrix(0, 2) = (EA*dx*dz) / L3; + rElasticStiffnessMatrix(2, 0) = rElasticStiffnessMatrix(0, 2); + + rElasticStiffnessMatrix(0, 3) = -rElasticStiffnessMatrix(0, 0); + rElasticStiffnessMatrix(3, 0) = rElasticStiffnessMatrix(0, 3); + + rElasticStiffnessMatrix(0, 4) = -rElasticStiffnessMatrix(0, 1); + rElasticStiffnessMatrix(4, 0) = rElasticStiffnessMatrix(0, 4); + + rElasticStiffnessMatrix(0, 5) = -rElasticStiffnessMatrix(0, 2); + rElasticStiffnessMatrix(5, 0) = rElasticStiffnessMatrix(0, 5); + + rElasticStiffnessMatrix(1, 2) = (EA*dy*dz) / L3; + rElasticStiffnessMatrix(2, 1) = rElasticStiffnessMatrix(1, 2); + + rElasticStiffnessMatrix(1, 3) = rElasticStiffnessMatrix(0, 4); + rElasticStiffnessMatrix(3, 1) = rElasticStiffnessMatrix(1, 3); + + rElasticStiffnessMatrix(1, 4) = -rElasticStiffnessMatrix(1, 1); + rElasticStiffnessMatrix(4, 1) = rElasticStiffnessMatrix(1, 4); + + rElasticStiffnessMatrix(1, 5) = -rElasticStiffnessMatrix(1, 2); + rElasticStiffnessMatrix(5, 1) = rElasticStiffnessMatrix(1, 5); + + rElasticStiffnessMatrix(2, 3) = -rElasticStiffnessMatrix(0, 2); + rElasticStiffnessMatrix(3, 2) = rElasticStiffnessMatrix(2, 3); + + rElasticStiffnessMatrix(2, 4) = -rElasticStiffnessMatrix(1, 2); + rElasticStiffnessMatrix(4, 2) = rElasticStiffnessMatrix(2, 4); + + rElasticStiffnessMatrix(2, 5) = -rElasticStiffnessMatrix(2, 2); + rElasticStiffnessMatrix(5, 2) = rElasticStiffnessMatrix(2, 5); + + rElasticStiffnessMatrix(3, 4) = rElasticStiffnessMatrix(0, 1); + rElasticStiffnessMatrix(4, 3) = rElasticStiffnessMatrix(3, 4); + + rElasticStiffnessMatrix(3, 5) = rElasticStiffnessMatrix(0, 2); + rElasticStiffnessMatrix(5, 3) = rElasticStiffnessMatrix(3, 5); + + rElasticStiffnessMatrix(4, 5) = rElasticStiffnessMatrix(1, 2); + rElasticStiffnessMatrix(5, 4) = rElasticStiffnessMatrix(4, 5); + KRATOS_CATCH("") + } + + + void TrussElement3D2N::save(Serializer& rSerializer) const + { + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Element); + rSerializer.save("mIscompressed", this->mIsCompressed); + rSerializer.save("LinerEle", this->mIsLinearElement); + + } + void TrussElement3D2N::load(Serializer& rSerializer) + { + KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element); + rSerializer.load("mIscompressed", this->mIsCompressed); + rSerializer.load("LinerEle", this->mIsLinearElement); + } +} // namespace Kratos. + + diff --git a/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.hpp b/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.hpp index 001b0ead7073..c9aa3ca19581 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.hpp +++ b/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.hpp @@ -1,191 +1,177 @@ -// ============================================================================== -/* -TRUSS_ELEMENT_3D2N -Main author: Klaus B. Sautter -klaus.sautter@tum.de - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following condition: - -Distribution of this code for any commercial purpose is permissible -ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNERS. - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ -//============================================================================== - -/* **************************************************************************** -* Projectname: $TRUSS_ELEMENT_3D2N -* Last Modified by: $Author: klaus.sautter@tum.de $ -* Date: $Date: April 2017 $ -* Revision: $Revision: 1.0 $ -* ***************************************************************************/ - -#if !defined(KRATOS_TRUSS_ELEMENT_3D2N_H_INCLUDED ) -#define KRATOS_TRUSS_ELEMENT_3D2N_H_INCLUDED - - -#include "includes/element.h" -#include "includes/define.h" -#include "includes/variables.h" - -namespace Kratos -{ - - class TrussElement3D2N : public Element - { - public: - KRATOS_CLASS_POINTER_DEFINITION(TrussElement3D2N); - - - typedef Element BaseType; - typedef BaseType::GeometryType GeometryType; - typedef BaseType::NodesArrayType NodesArrayType; - typedef BaseType::PropertiesType PropertiesType; - typedef BaseType::IndexType IndexType; - typedef BaseType::SizeType SizeType; - typedef BaseType::MatrixType MatrixType; - typedef BaseType::VectorType VectorType; - typedef BaseType::EquationIdVectorType EquationIdVectorType; - typedef BaseType::DofsVectorType DofsVectorType; - - - TrussElement3D2N(IndexType NewId, - GeometryType::Pointer pGeometry, - bool rLinear = false); - TrussElement3D2N(IndexType NewId, - GeometryType::Pointer pGeometry, - PropertiesType::Pointer pProperties, - bool rLinear = false); - - - ~TrussElement3D2N() override; - - - BaseType::Pointer Create( - IndexType NewId, - NodesArrayType const& rThisNodes, - PropertiesType::Pointer pProperties) const override; - - void EquationIdVector( - EquationIdVectorType& rResult, - ProcessInfo& rCurrentProcessInfo) override; - - void GetDofList( - DofsVectorType& rElementalDofList, - ProcessInfo& rCurrentProcessInfo) override; - - void Initialize() override; - - MatrixType CreateElementStiffnessMatrix(); - - void CalculateOnIntegrationPoints( - const Variable& rVariable, - std::vector& rOutput, - const ProcessInfo& rCurrentProcessInfo) override; - - void GetValueOnIntegrationPoints( - const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo) override; - - void UpdateInternalForces( - VectorType& rinternalForces); - void CreateTransformationMatrix( - Matrix& rRotationMatrix); - double CalculateCurrentLength(); - - void CalculateOnIntegrationPoints( - const Variable& rVariable, - std::vector& rOutput, - const ProcessInfo& rCurrentProcessInfo) override; - - void GetValueOnIntegrationPoints( - const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo) override; - - void CalculateLocalSystem( - MatrixType& rLeftHandSideMatrix, - VectorType& rRightHandSideVector, - ProcessInfo& rCurrentProcessInfo) override; - - - void CalculateRightHandSide( - VectorType& rRightHandSideVector, - ProcessInfo& rCurrentProcessInfo) override; - - void CalculateLeftHandSide( - MatrixType& rLeftHandSideMatrix, - ProcessInfo& rCurrentProcessInfo) override; - - void CalculateMassMatrix( - MatrixType& rMassMatrix, - ProcessInfo& rCurrentProcessInfo) override; - - void CalculateDampingMatrix( - MatrixType& rDampingMatrix, - ProcessInfo& rCurrentProcessInfo) override; - - - void AddExplicitContribution(const VectorType& rRHSVector, - const Variable& rRHSVariable, - Variable >& rDestinationVariable, - const ProcessInfo& rCurrentProcessInfo) override; - - - void GetValuesVector( - Vector& rValues, - int Step = 0) override; - - void GetSecondDerivativesVector( - Vector& rValues, - int Step = 0) override; - - void GetFirstDerivativesVector( - Vector& rValues, - int Step = 0) override; - - int Check( - const ProcessInfo& rCurrentProcessInfo) override; - - - double CalculateGreenLagrangeStrain(); - double CalculateReferenceLength(); - - VectorType CalculateBodyForces(); - - bool ReturnIfIsCable(); - - - - private: - bool mIsCompressed; - bool mIsLinearElement = false; - - TrussElement3D2N() {}; - - friend class Serializer; - void save(Serializer& rSerializer) const override; - void load(Serializer& rSerializer) override; - }; - - -} - - -#endif +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Klaus B. Sautter +// +// +// + +#if !defined(KRATOS_TRUSS_ELEMENT_3D2N_H_INCLUDED ) +#define KRATOS_TRUSS_ELEMENT_3D2N_H_INCLUDED + +// System includes + +// External includes + +// Project includes +#include "includes/element.h" +#include "includes/define.h" +#include "includes/variables.h" + +namespace Kratos +{ + class TrussElement3D2N : public Element + { + private: + //const values + static constexpr int msNumberOfNodes = 2; + static constexpr int msDimension = 3; + static constexpr unsigned int msLocalSize = msNumberOfNodes * msDimension; + public: + KRATOS_CLASS_POINTER_DEFINITION(TrussElement3D2N); + + + typedef Element BaseType; + typedef BaseType::GeometryType GeometryType; + typedef BaseType::NodesArrayType NodesArrayType; + typedef BaseType::PropertiesType PropertiesType; + typedef BaseType::IndexType IndexType; + typedef BaseType::SizeType SizeType; + typedef BaseType::MatrixType MatrixType; + typedef BaseType::VectorType VectorType; + typedef BaseType::EquationIdVectorType EquationIdVectorType; + typedef BaseType::DofsVectorType DofsVectorType; + + + TrussElement3D2N(IndexType NewId, + GeometryType::Pointer pGeometry, + bool rLinear = false); + TrussElement3D2N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties, + bool rLinear = false); + + + ~TrussElement3D2N() override; + + + BaseType::Pointer Create( + IndexType NewId, + NodesArrayType const& rThisNodes, + PropertiesType::Pointer pProperties) const override; + + void EquationIdVector( + EquationIdVectorType& rResult, + ProcessInfo& rCurrentProcessInfo) override; + + void GetDofList( + DofsVectorType& rElementalDofList, + ProcessInfo& rCurrentProcessInfo) override; + + void Initialize() override; + + bounded_matrix CreateElementStiffnessMatrix(ProcessInfo& rCurrentProcessInfo); + + void CalculateOnIntegrationPoints( + const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints( + const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) override; + + void UpdateInternalForces(bounded_vector& rinternalForces); + void CreateTransformationMatrix(bounded_matrix& rRotationMatrix); + double CalculateCurrentLength(); + + void CalculateOnIntegrationPoints( + const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo) override; + + void GetValueOnIntegrationPoints( + const Variable& rVariable, + std::vector& rValues, + const ProcessInfo& rCurrentProcessInfo) override; + + void CalculateLocalSystem( + MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) override; + + + void CalculateRightHandSide( + VectorType& rRightHandSideVector, + ProcessInfo& rCurrentProcessInfo) override; + + void CalculateLeftHandSide( + MatrixType& rLeftHandSideMatrix, + ProcessInfo& rCurrentProcessInfo) override; + + void CalculateMassMatrix( + MatrixType& rMassMatrix, + ProcessInfo& rCurrentProcessInfo) override; + + void CalculateDampingMatrix( + MatrixType& rDampingMatrix, + ProcessInfo& rCurrentProcessInfo) override; + + + void AddExplicitContribution(const VectorType& rRHSVector, + const Variable& rRHSVariable, + Variable >& rDestinationVariable, + const ProcessInfo& rCurrentProcessInfo) override; + + + void GetValuesVector( + Vector& rValues, + int Step = 0) override; + + void GetSecondDerivativesVector( + Vector& rValues, + int Step = 0) override; + + void GetFirstDerivativesVector( + Vector& rValues, + int Step = 0) override; + + int Check( + const ProcessInfo& rCurrentProcessInfo) override; + + + double CalculateGreenLagrangeStrain(); + double CalculateReferenceLength(); + + bounded_vector CalculateBodyForces(); + + bool ReturnIfIsCable(); + + void CalculateGeometricStiffnessMatrix(bounded_matrix& rGeometricStiffnessMatrix, + ProcessInfo& rCurrentProcessInfo); + + void CalculateElasticStiffnessMatrix(bounded_matrix& rElasticStiffnessMatrix, + ProcessInfo& rCurrentProcessInfo); + + + private: + bool mIsCompressed; + bool mIsLinearElement = false; + TrussElement3D2N() {}; + + friend class Serializer; + void save(Serializer& rSerializer) const override; + void load(Serializer& rSerializer) override; + }; + + +} + + +#endif diff --git a/applications/StructuralMechanicsApplication/custom_processes/apply_multi_point_constraints_process.h b/applications/StructuralMechanicsApplication/custom_processes/apply_multi_point_constraints_process.h new file mode 100644 index 000000000000..597446c944eb --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_processes/apply_multi_point_constraints_process.h @@ -0,0 +1,320 @@ +// | / | +// ' / __| _` | __| _ \ __| +// . \ | ( | | ( |\__ ` +// _|\_\_| \__,_|\__|\___/ ____/ +// Multi-Physics +// +// License: BSD License +// Kratos default license: kratos/license.txt +// +// Main authors: Aditya Ghantasala +// +// + +#ifndef APPLY_MULTI_POINT_CONSTRAINTS_PROCESS_H +#define APPLY_MULTI_POINT_CONSTRAINTS_PROCESS_H + +// System includes +#include +#include + +// External includes + +// Project includes +#include "includes/define.h" +#include "processes/process.h" +#include "utilities/math_utils.h" +#include "includes/kratos_parameters.h" +#include "utilities/binbased_fast_point_locator.h" + +// Application includes +#include "custom_utilities/multipoint_constraint_data.hpp" + +namespace Kratos +{ + +class ApplyMultipointConstraintsProcess : public Process +{ + public: + /// Pointer definition of MoveRotorProcess + KRATOS_CLASS_POINTER_DEFINITION(ApplyMultipointConstraintsProcess); + + typedef MpcData::Pointer MpcDataPointerType; + typedef Dof *DofPointerType; + typedef Dof DofType; + typedef std::map MpcDataMapType; + typedef MpcData::VariableComponentType VariableComponentType; + typedef ProcessInfo ProcessInfoType; + typedef ProcessInfo::Pointer ProcessInfoPointerType; + typedef unsigned int IndexType; + typedef std::vector *MpcDataPointerVectorType; + typedef MpcData::VariableType VariableType; + typedef ModelPart::NodeIterator NodeIterator; + + /// Constructor. + ApplyMultipointConstraintsProcess(ModelPart &model_part, + Parameters rParameters) : Process(Flags()), mr_model_part(model_part), m_parameters(rParameters) + { + + Parameters default_parameters(R"( + { + "constraint_set_name":"default", + "master_sub_model_part_name":"default_master", + "slave_sub_model_part_name":"default_slave", + "variable_names":[""], + "reform_every_step":false + } )"); + + ProcessInfoPointerType info = mr_model_part.pGetProcessInfo(); + if (info->GetValue(MPC_DATA_CONTAINER) == NULL) + info->SetValue(MPC_DATA_CONTAINER, new std::vector()); + + pMpc = MpcDataPointerType(new MpcData()); + std::string name = rParameters["constraint_set_name"].GetString(); + pMpc->SetName(name); + pMpc->SetActive(true); + + MpcDataPointerVectorType mpcDataVector = info->GetValue(MPC_DATA_CONTAINER); + (*mpcDataVector).push_back(pMpc); + + if (! m_parameters["reform_every_step"].GetBool()) + // Adding the master slave relation between the master and slave sub model parts + AddMasterSlaveRelation(); + } + + ApplyMultipointConstraintsProcess(ModelPart &model_part, std::string name = "default") : Process(Flags()), mr_model_part(model_part), m_parameters("{}") + { + + // IMPORTANT : This constructor is not to be used when using this process in the normal KRATOS process_list of python script + ProcessInfoPointerType info = mr_model_part.pGetProcessInfo(); + if (info->GetValue(MPC_DATA_CONTAINER) == NULL) + info->SetValue(MPC_DATA_CONTAINER, new std::vector()); + + pMpc = MpcDataPointerType(new MpcData()); + pMpc->SetName(name); + pMpc->SetActive(true); + + MpcDataPointerVectorType mpcDataVector = info->GetValue(MPC_DATA_CONTAINER); + (*mpcDataVector).push_back(pMpc); + } + + /** + Applies the MPC condition using two model parts, one as master and other as slave. + Here a nearest element interpolation is used by default to get the relation between master and slave + */ + void AddMasterSlaveRelation() + { + ModelPart &master_model_part = mr_model_part.GetSubModelPart(m_parameters["master_sub_model_part_name"].GetString()); + ModelPart &slave_model_part = mr_model_part.GetSubModelPart(m_parameters["slave_sub_model_part_name"].GetString()); + + ProcessInfoPointerType info = mr_model_part.pGetProcessInfo(); + int &dim = info->GetValue(DOMAIN_SIZE); + + std::string interpolationType = m_parameters["interpolation_type"].GetString(); + Parameters mapper_parameters = m_parameters["interpolation_settings"]; + + if (dim == 2) + { + ApplyConstraints<2>(master_model_part, slave_model_part); + } + else if (dim == 3) + { + ApplyConstraints<3>(master_model_part, slave_model_part); + } + } + + // Functions which use two variable components + template + void ApplyConstraints(ModelPart &master_model_part, ModelPart &slave_model_part) + { + BinBasedFastPointLocator *p_point_locator = new BinBasedFastPointLocator(master_model_part); + int numVars = m_parameters["variable_names"].size(); + // iterating over slave nodes to find the corresponding masters + const int n_slave_nodes = slave_model_part.Nodes().size(); + array_1d N; // This is only for triangular meshes + const int max_results = 100; + typename BinBasedFastPointLocator::ResultContainerType results(max_results); + + for (int i = 0; i < n_slave_nodes; i++) + { + ModelPart::NodesContainerType::iterator iparticle = slave_model_part.NodesBegin() + i; + Node<3>::Pointer p_slave_node = *(iparticle.base()); + typename BinBasedFastPointLocator::ResultIteratorType result_begin = results.begin(); + Element::Pointer pMasterElement; + bool is_found = false; + is_found = p_point_locator->FindPointOnMesh(p_slave_node->Coordinates(), N, pMasterElement, result_begin, max_results); + if (is_found == true) + { + for (int i = 0; i < numVars; i++) + { + std::string varName = m_parameters["variable_names"][i].GetString(); + Geometry> &geom = pMasterElement->GetGeometry(); + for (unsigned int i = 0; i < geom.size(); i++) + { + if (KratosComponents>::Has(varName)) + { //case of double variable + VariableType rVar = KratosComponents>::Get(m_parameters["variable_names"][i].GetString()); + this->AddMasterSlaveRelationWithNodesAndVariable(geom[i], rVar, *p_slave_node, rVar, N[i], 0.0); + } + else if (KratosComponents>>>::Has(varName)) + { + VariableComponentType rVar = KratosComponents::Get(m_parameters["variable_names"][i].GetString()); + this->AddMasterSlaveRelationWithNodesAndVariableComponents(geom[i], rVar, *p_slave_node, rVar, N[i], 0.0); + } + } + } + } + } + delete p_point_locator; + } + + /** + Applies the MPC condition using two nodes, one as master and other as slave, and with the given weight + @arg MasterNode + @arg MasterVariable + @arg SlaveNode + @arg SlaveVariable + @arg weight + */ + void AddMasterSlaveRelationWithNodesAndVariableComponents(Node<3> &MasterNode, VariableComponentType &MasterVariable, Node<3> &SlaveNode, VariableComponentType &SlaveVariable, double weight, double constant = 0.0) + { + SlaveNode.Set(SLAVE); + DofType &pointerSlaveDOF = SlaveNode.GetDof(SlaveVariable); + DofType &pointerMasterDOF = MasterNode.GetDof(MasterVariable); + AddMasterSlaveRelationWithDofs(pointerSlaveDOF, pointerMasterDOF, weight, constant); + } + + void AddMasterSlaveRelationWithNodeIdsAndVariableComponents(IndexType MasterNodeId, VariableComponentType &MasterVariable, IndexType SlaveNodeId, VariableComponentType &SlaveVariable, double weight, double constant = 0.0) + { + Node<3> &SlaveNode = mr_model_part.Nodes()[SlaveNodeId]; + Node<3> &MasterNode = mr_model_part.Nodes()[MasterNodeId]; + SlaveNode.Set(SLAVE); + DofType &pointerSlaveDOF = SlaveNode.GetDof(SlaveVariable); + DofType &pointerMasterDOF = MasterNode.GetDof(MasterVariable); + AddMasterSlaveRelationWithDofs(pointerSlaveDOF, pointerMasterDOF, weight, constant); + } + + // Functions with use two variables + void AddMasterSlaveRelationWithNodesAndVariable(Node<3> &MasterNode, VariableType &MasterVariable, Node<3> &SlaveNode, VariableType &SlaveVariable, double weight, double constant = 0.0) + { + SlaveNode.Set(SLAVE); + DofType &pointerSlaveDOF = SlaveNode.GetDof(SlaveVariable); + DofType &pointerMasterDOF = MasterNode.GetDof(MasterVariable); + AddMasterSlaveRelationWithDofs(pointerSlaveDOF, pointerMasterDOF, weight, constant); + } + + void AddMasterSlaveRelationWithNodeIdsAndVariable(IndexType MasterNodeId, VariableType &MasterVariable, IndexType SlaveNodeId, VariableType &SlaveVariable, double weight, double constant = 0.0) + { + Node<3> &SlaveNode = mr_model_part.Nodes()[SlaveNodeId]; + Node<3> &MasterNode = mr_model_part.Nodes()[MasterNodeId]; + SlaveNode.Set(SLAVE); + DofType &pointerSlaveDOF = SlaveNode.GetDof(SlaveVariable); + DofType &pointerMasterDOF = MasterNode.GetDof(MasterVariable); + AddMasterSlaveRelationWithDofs(pointerSlaveDOF, pointerMasterDOF, weight, constant); + } + + // Default functions + /** + Applies the MPC condition using DOFs, one as master and other as slave, and with the given weight + @arg slaveDOF + @arg masterDOF + @arg weight + */ + void AddMasterSlaveRelationWithDofs(DofType slaveDOF, DofType masterDOF, double masterWeight, double constant = 0.0) + { + pMpc->AddConstraint(slaveDOF, masterDOF, masterWeight, constant); + } + + /** + Activates the constraint set or deactivates + @arg isActive true/false + */ + void SetActive(bool isActive = true) + { + pMpc->SetActive(isActive); + } + + /** + Sets the name of the constraint set + @arg isActive true/false + */ + void SetName(std::string name) + { + pMpc->SetName(name); + } + + /// Destructor. + ~ApplyMultipointConstraintsProcess() override + { + } + + void ExecuteBeforeSolutionLoop() override + { + KRATOS_TRY; + //// Use the master and slave sub model parts to formulate the constraints. + //// Parallel implementation can be taken care here as we can define the partition id from the mapper here. + + KRATOS_CATCH(""); + } + + void ExecuteInitializeSolutionStep() override + { + KRATOS_TRY; + + if (m_parameters["reform_every_step"].GetBool()) + // Adding the master slave relation between the master and slave sub model parts + AddMasterSlaveRelation(); + + KRATOS_CATCH(""); + } + + void ExecuteAfterOutputStep() override + { + Clear(); + } + + /// Turn back information as a string. + std::string Info() const override + { + std::stringstream buffer; + buffer << "ApplyMultipointConstraintsProcess"; + return buffer.str(); + } + + /// Print information about this object. + void PrintInfo(std::ostream &rOStream) const override { rOStream << "ApplyMultipointConstraintsProcess"; } + + /// Print object's data. + void PrintData() + { + std::cout << "Number of slave nodes :: " << std::endl; + pMpc->GetInfo(); + } + + /// Print object's data. + void Clear() + { + pMpc->Clear(); + } + + protected: + ///@name Protected static Member Variables + ///@{ + + ///@} + ///@name Protected member Variables + ///@{ + ModelPart &mr_model_part; + MpcDataPointerType pMpc; + Parameters m_parameters; + + private: + /// Assignment operator. + ApplyMultipointConstraintsProcess &operator=(ApplyMultipointConstraintsProcess const &rOther) { return *this; } + + +}; // Class MoveRotorProcess + +}; // namespace Kratos. + +#endif // KRATOS_MOVE_ROTOR_PROCESS_H diff --git a/applications/StructuralMechanicsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp b/applications/StructuralMechanicsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp index 0e763e0766e0..9638c43b583f 100644 --- a/applications/StructuralMechanicsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp +++ b/applications/StructuralMechanicsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp @@ -26,6 +26,7 @@ #include "custom_constitutive/axisym_elastic_isotropic.h" #include "custom_constitutive/hyper_elastic_isotropic_neo_hookean_3d.h" #include "custom_constitutive/hyper_elastic_isotropic_neo_hookean_plane_strain_2d.h" +#include "custom_constitutive/linear_elastic_orthotropic_2D_law.hpp" namespace Kratos { @@ -68,6 +69,10 @@ void AddCustomConstitutiveLawsToPython() init<>() ) ; + class_< LinearElasticOrthotropic2DLaw, bases< ConstitutiveLaw >, boost::noncopyable > + ("LinearElasticOrthotropic2DLaw", + init<>()) + ; } } // namespace Python. diff --git a/applications/StructuralMechanicsApplication/custom_python/add_custom_strategies_to_python.cpp b/applications/StructuralMechanicsApplication/custom_python/add_custom_strategies_to_python.cpp index db8b96af4912..72d5dc96b610 100644 --- a/applications/StructuralMechanicsApplication/custom_python/add_custom_strategies_to_python.cpp +++ b/applications/StructuralMechanicsApplication/custom_python/add_custom_strategies_to_python.cpp @@ -23,6 +23,7 @@ #include "includes/define.h" #include "custom_python/add_custom_strategies_to_python.h" + #include "spaces/ublas_space.h" // Strategies @@ -36,6 +37,10 @@ #include "custom_strategies/custom_schemes/residual_based_relaxation_scheme.hpp" #include "custom_strategies/custom_schemes/eigensolver_dynamic_scheme.hpp" +// Builder and solvers +#include "solving_strategies/builder_and_solvers/residualbased_block_builder_and_solver.h" +#include "custom_strategies/custom_builder_and_solver/residualbased_block_builder_and_solver_with_mpc.h" + // Convergence criterias #include "solving_strategies/convergencecriterias/convergence_criteria.h" #include "custom_strategies/custom_convergencecriterias/displacement_and_other_dof_criteria.h" @@ -46,6 +51,7 @@ // Linear solvers #include "linear_solvers/linear_solver.h" + namespace Kratos { @@ -157,8 +163,10 @@ void AddCustomStrategiesToPython() //******************************************************************** //*************************BUILDER AND SOLVER************************* //******************************************************************** - - + class_< ResidualBasedBlockBuilderAndSolverWithMpc< SparseSpaceType, LocalSpaceType, LinearSolverType >, + bases< ResidualBasedBlockBuilderAndSolver< SparseSpaceType, LocalSpaceType, LinearSolverType > >, + boost::noncopyable > + ("ResidualBasedBlockBuilderAndSolverWithMpc", init()); } } // namespace Python. diff --git a/applications/StructuralMechanicsApplication/custom_python/add_custom_utilities_to_python.cpp b/applications/StructuralMechanicsApplication/custom_python/add_custom_utilities_to_python.cpp index f5f81090f634..ffb34e0a3d23 100644 --- a/applications/StructuralMechanicsApplication/custom_python/add_custom_utilities_to_python.cpp +++ b/applications/StructuralMechanicsApplication/custom_python/add_custom_utilities_to_python.cpp @@ -27,6 +27,10 @@ #include "custom_utilities/sprism_neighbours.hpp" #include "custom_utilities/eigenvector_to_solution_step_variable_transfer_utility.hpp" +//Processes +#include "custom_processes/apply_multi_point_constraints_process.h" + + namespace Kratos { namespace Python @@ -70,9 +74,19 @@ void AddCustomUtilitiesToPython() .def("Transfer",TransferEigenvector2) ; + /// Processes + class_>("ApplyMultipointConstraintsProcess", init()) + .def(init< ModelPart&, Parameters& >()) + .def("AddMasterSlaveRelation", &ApplyMultipointConstraintsProcess::AddMasterSlaveRelationWithNodesAndVariableComponents) + .def("AddMasterSlaveRelation", &ApplyMultipointConstraintsProcess::AddMasterSlaveRelationWithNodeIdsAndVariableComponents) + .def("AddMasterSlaveRelation", &ApplyMultipointConstraintsProcess::AddMasterSlaveRelationWithNodesAndVariable) + .def("AddMasterSlaveRelation", &ApplyMultipointConstraintsProcess::AddMasterSlaveRelationWithNodeIdsAndVariable) + .def("SetActive", &ApplyMultipointConstraintsProcess::SetActive) + .def("PrintData", &ApplyMultipointConstraintsProcess::PrintData); + } -} // namespace Python. +} // namespace Python. } // Namespace Kratos diff --git a/applications/StructuralMechanicsApplication/custom_python/structural_mechanics_python_application.cpp b/applications/StructuralMechanicsApplication/custom_python/structural_mechanics_python_application.cpp index 650fd6e91ac3..e8dd613711b9 100644 --- a/applications/StructuralMechanicsApplication/custom_python/structural_mechanics_python_application.cpp +++ b/applications/StructuralMechanicsApplication/custom_python/structural_mechanics_python_application.cpp @@ -57,6 +57,13 @@ BOOST_PYTHON_MODULE(KratosStructuralMechanicsApplication) KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_CROSS_SECTION ) KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_CROSS_SECTION_OUTPUT_PLY_ID ) KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_CROSS_SECTION_OUTPUT_PLY_LOCATION ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ORTHOTROPIC_LAYERS) + + // Geometrical + KRATOS_REGISTER_IN_PYTHON_VARIABLE(LOCAL_AXIS_VECTOR_1) + KRATOS_REGISTER_IN_PYTHON_VARIABLE(LOCAL_ELEMENT_ORIENTATION) + KRATOS_REGISTER_IN_PYTHON_VARIABLE(ORTHOTROPIC_ORIENTATION_ASSIGNMENT) + KRATOS_REGISTER_IN_PYTHON_VARIABLE(ORTHOTROPIC_FIBER_ORIENTATION_1) // Truss generalized variables KRATOS_REGISTER_IN_PYTHON_VARIABLE(TRUSS_PRESTRESS_PK2) @@ -84,6 +91,30 @@ BOOST_PYTHON_MODULE(KratosStructuralMechanicsApplication) KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_FORCE_GLOBAL ) KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_MOMENT ) KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_MOMENT_GLOBAL ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_STRESS_TOP_SURFACE ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_STRESS_TOP_SURFACE_GLOBAL ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_STRESS_MIDDLE_SURFACE ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_STRESS_MIDDLE_SURFACE_GLOBAL ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_STRESS_BOTTOM_SURFACE ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_STRESS_BOTTOM_SURFACE_GLOBAL ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( VON_MISES_STRESS_TOP_SURFACE ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( VON_MISES_STRESS_MIDDLE_SURFACE ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( VON_MISES_STRESS_BOTTOM_SURFACE ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE_GLOBAL ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE_GLOBAL ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ORTHOTROPIC_4PLY_THROUGH_THICKNESS ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( TSAI_WU_RESERVE_FACTOR ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ORTHOTROPIC_LAMINA_STRENGTHS ) + + // Shell energies + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ELEMENT_MEMBRANE_ENERGY ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ELEMENT_BENDING_ENERGY ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ELEMENT_SHEAR_ENERGY ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ELEMENT_BENDING_ENERGY_FRACTION ) + KRATOS_REGISTER_IN_PYTHON_VARIABLE( SHELL_ELEMENT_SHEAR_ENERGY_FRACTION ) // Membrane variables KRATOS_REGISTER_IN_PYTHON_VARIABLE( MEMBRANE_PRESTRESS ) diff --git a/applications/StructuralMechanicsApplication/custom_strategies/custom_builder_and_solver/residualbased_block_builder_and_solver_with_mpc.h b/applications/StructuralMechanicsApplication/custom_strategies/custom_builder_and_solver/residualbased_block_builder_and_solver_with_mpc.h new file mode 100644 index 000000000000..63ab003490d6 --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_strategies/custom_builder_and_solver/residualbased_block_builder_and_solver_with_mpc.h @@ -0,0 +1,1044 @@ +// | / | +// ' / __| _` | __| _ \ __| +// . \ | ( | | ( |\__ ` +// _|\_\_| \__,_|\__|\___/ ____/ +// Multi-Physics +// +// License: BSD License +// Kratos default license: kratos/license.txt +// +// Main authors: Aditya Ghantasala / Navaneeth K Narayanan +// +// + +#ifndef KRATOS_SOLVING_STRATEGIES_BUILDER_AND_SOLVERS_RESIDUALBASED_BLOCK_BUILDER_AND_SOLVER_WITH_MPC_H_ +#define KRATOS_SOLVING_STRATEGIES_BUILDER_AND_SOLVERS_RESIDUALBASED_BLOCK_BUILDER_AND_SOLVER_WITH_MPC_H_ + +/* System includes */ + +#include "utilities/openmp_utils.h" +#include +#include +/* External includes */ +#include "boost/smart_ptr.hpp" + +#include "utilities/timer.h" + +/* Project includes */ +#include "includes/define.h" +#include "solving_strategies/builder_and_solvers/residualbased_block_builder_and_solver.h" +#include "includes/model_part.h" +#include "custom_utilities/multipoint_constraint_data.hpp" + +// #define USE_GOOGLE_HASH +#ifdef USE_GOOGLE_HASH +#include "sparsehash/dense_hash_set" //included in external libraries +#endif +// #define USE_LOCKS_IN_ASSEMBLY +// #include +// #include + +namespace Kratos +{ + +/**@name Kratos Globals */ +/*@{ */ + +/*@} */ +/**@name Type Definitions */ +/*@{ */ + +/*@} */ + +/**@name Enum's */ +/*@{ */ + +/*@} */ +/**@name Functions */ +/*@{ */ + +/*@} */ +/**@name Kratos Classes */ +/*@{ */ + +/** Short class definition. + +Detail class definition. + +Current class provides an implementation for standard builder and solving operations. + +the RHS is constituted by the unbalanced loads (residual) + +Degrees of freedom are reordered putting the restrained degrees of freedom at +the end of the system ordered in reverse order with respect to the DofSet. + +Imposition of the dirichlet conditions is naturally dealt with as the residual already contains +this information. + +Calculation of the reactions involves a cost very similiar to the calculation of the total residual + +\URL[Example of use html]{ extended_documentation/no_ex_of_use.html} + +\URL[Example of use pdf]{ extended_documentation/no_ex_of_use.pdf} + +\URL[Example of use doc]{ extended_documentation/no_ex_of_use.doc} + +\URL[Example of use ps]{ extended_documentation/no_ex_of_use.ps} + + +\URL[Extended documentation html]{ extended_documentation/no_ext_doc.html} + +\URL[Extended documentation pdf]{ extended_documentation/no_ext_doc.pdf} + +\URL[Extended documentation doc]{ extended_documentation/no_ext_doc.doc} + +\URL[Extended documentation ps]{ extended_documentation/no_ext_doc.ps} + + + */ +template , + class TLinearSolver //= LinearSolver + > +class ResidualBasedBlockBuilderAndSolverWithMpc + : public ResidualBasedBlockBuilderAndSolver +{ + public: + /**@name Type Definitions */ + /*@{ */ + KRATOS_CLASS_POINTER_DEFINITION(ResidualBasedBlockBuilderAndSolverWithMpc); + + typedef ResidualBasedBlockBuilderAndSolver BaseType; + + typedef typename BaseType::TSchemeType TSchemeType; + + typedef typename BaseType::TDataType TDataType; + + typedef typename BaseType::DofsArrayType DofsArrayType; + + typedef std::vector< Dof::Pointer > DofsVectorType; + + typedef typename BaseType::TSystemMatrixType TSystemMatrixType; + + typedef typename BaseType::TSystemVectorType TSystemVectorType; + + typedef typename BaseType::LocalSystemVectorType LocalSystemVectorType; + + typedef typename BaseType::LocalSystemMatrixType LocalSystemMatrixType; + + typedef typename BaseType::TSystemMatrixPointerType TSystemMatrixPointerType; + typedef typename BaseType::TSystemVectorPointerType TSystemVectorPointerType; + + typedef typename BaseType::NodesArrayType NodesArrayType; + typedef typename BaseType::ElementsArrayType ElementsArrayType; + typedef typename BaseType::ConditionsArrayType ConditionsArrayType; + + typedef typename BaseType::ElementsContainerType ElementsContainerType; + typedef Dof *DofPointerType; + typedef Dof DofType; + + typedef Kratos::MpcData::MasterIdWeightMapType MasterIdWeightMapType; + typedef Kratos::MpcData::SlavePairType SlavePairType; + typedef Kratos::MpcData::VariableDataType VariableDataType; + typedef Kratos::MpcData::MasterDofWeightMapType MasterDofWeightMapType; + typedef Node<3> NodeType; + typedef MpcData::Pointer MpcDataPointerType; + typedef std::vector *MpcDataPointerVectorType; + + typedef ProcessInfo ProcessInfoType; + + /*@} */ + /**@name Life Cycle + */ + /*@{ */ + + /** Constructor. + */ + ResidualBasedBlockBuilderAndSolverWithMpc( + typename TLinearSolver::Pointer pNewLinearSystemSolver) + : ResidualBasedBlockBuilderAndSolver(pNewLinearSystemSolver) + { + } + + /** Destructor. + */ + ~ResidualBasedBlockBuilderAndSolverWithMpc() override + { + } + + void SetUpSystem( + ModelPart &r_model_part) override + { + BaseType::SetUpSystem(r_model_part); + FormulateEquationIdRelationMap(r_model_part); + } + + void BuildAndSolve( + typename TSchemeType::Pointer pScheme, + ModelPart &r_model_part, + TSystemMatrixType &A, + TSystemVectorType &Dx, + TSystemVectorType &b) override + { + KRATOS_TRY + + Timer::Start("Build"); + + UpdateConstraintEquationsAfterIteration(r_model_part, A, Dx, b); + + Build(pScheme, r_model_part, A, b); + + Timer::Stop("Build"); + + this->ApplyDirichletConditions(pScheme, r_model_part, A, Dx, b); + + if (this->GetEchoLevel() == 3) + { + std::cout << "before the solution of the system" << std::endl; + std::cout << "System Matrix = " << A << std::endl; + std::cout << "unknowns vector = " << Dx << std::endl; + std::cout << "RHS vector = " << b << std::endl; + } + + double start_solve = OpenMPUtils::GetCurrentTime(); + Timer::Start("Solve"); + + this->SystemSolveWithPhysics(A, Dx, b, r_model_part); + + Timer::Stop("Solve"); + double stop_solve = OpenMPUtils::GetCurrentTime(); + if (this->GetEchoLevel() >= 1 && r_model_part.GetCommunicator().MyPID() == 0) + std::cout << "system solve time: " << stop_solve - start_solve << std::endl; + + if (this->GetEchoLevel() == 3) + { + std::cout << "after the solution of the system" << std::endl; + std::cout << "System Matrix = " << A << std::endl; + std::cout << "unknowns vector = " << Dx << std::endl; + std::cout << "RHS vector = " << b << std::endl; + } + + ReconstructSlaveDofForIterationStep(r_model_part, A, Dx, b); // Reconstructing the slave dofs from master solutions + + KRATOS_CATCH("") + } + + //************************************************************************** + //************************************************************************** + // This is modified to include the MPC information. + // + void Build( + typename TSchemeType::Pointer pScheme, + ModelPart &r_model_part, + TSystemMatrixType &A, + TSystemVectorType &b) override + { + KRATOS_TRY + if (!pScheme) + KRATOS_THROW_ERROR(std::runtime_error, "No scheme provided!", ""); + + //getting the elements from the model + const int nelements = static_cast(r_model_part.Elements().size()); + + //getting the array of the conditions + const int nconditions = static_cast(r_model_part.Conditions().size()); + + ProcessInfo &CurrentProcessInfo = r_model_part.GetProcessInfo(); + ModelPart::ElementsContainerType::iterator el_begin = r_model_part.ElementsBegin(); + ModelPart::ConditionsContainerType::iterator cond_begin = r_model_part.ConditionsBegin(); + + //contributions to the system + LocalSystemMatrixType LHS_Contribution = LocalSystemMatrixType(0, 0); + LocalSystemVectorType RHS_Contribution = LocalSystemVectorType(0); + + //vector containing the localization in the system of the different + //terms + Element::EquationIdVectorType EquationId; + + // assemble all elements + double start_build = OpenMPUtils::GetCurrentTime(); + +#pragma omp parallel firstprivate(nelements, nconditions, LHS_Contribution, RHS_Contribution, EquationId) + { +#pragma omp for schedule(guided, 512) nowait + for (int k = 0; k < nelements; k++) + { + ModelPart::ElementsContainerType::iterator it = el_begin + k; + + //detect if the element is active or not. If the user did not make any choice the element + //is active by default + bool element_is_active = true; + if ((it)->IsDefined(ACTIVE)) + element_is_active = (it)->Is(ACTIVE); + + if (element_is_active) + { + //calculate elemental contribution + pScheme->CalculateSystemContributions(*(it.base()), LHS_Contribution, RHS_Contribution, EquationId, CurrentProcessInfo); + // Modifying the local contributions for MPC + this->Element_ApplyMultipointConstraints(*(it.base()), LHS_Contribution, RHS_Contribution, EquationId, CurrentProcessInfo); +//assemble the elemental contribution +#ifdef USE_LOCKS_IN_ASSEMBLY + this->Assemble(A, b, LHS_Contribution, RHS_Contribution, EquationId, BaseType::mlock_array); +#else + this->Assemble(A, b, LHS_Contribution, RHS_Contribution, EquationId); +#endif + // clean local elemental memory + pScheme->CleanMemory(*(it.base())); + } + } + +//#pragma omp parallel for firstprivate(nconditions, LHS_Contribution, RHS_Contribution, EquationId ) schedule(dynamic, 1024) +#pragma omp for schedule(guided, 512) + for (int k = 0; k < nconditions; k++) + { + ModelPart::ConditionsContainerType::iterator it = cond_begin + k; + + //detect if the element is active or not. If the user did not make any choice the element + //is active by default + bool condition_is_active = true; + if ((it)->IsDefined(ACTIVE)) + condition_is_active = (it)->Is(ACTIVE); + + if (condition_is_active) + { + //calculate elemental contribution + pScheme->Condition_CalculateSystemContributions(*(it.base()), LHS_Contribution, RHS_Contribution, EquationId, CurrentProcessInfo); + + // Modifying the local contributions for MPC + this->Condition_ApplyMultipointConstraints(*(it.base()), LHS_Contribution, RHS_Contribution, EquationId, CurrentProcessInfo); + +//assemble the elemental contribution +#ifdef USE_LOCKS_IN_ASSEMBLY + this->Assemble(A, b, LHS_Contribution, RHS_Contribution, EquationId, BaseType::mlock_array); +#else + this->Assemble(A, b, LHS_Contribution, RHS_Contribution, EquationId); +#endif + + // clean local elemental memory + pScheme->CleanMemory(*(it.base())); + } + } + } + + // equation_ids.close(); + // KRATOS_THROW_ERROR(std::logic_error,"i want to stop here :-D","") + + double stop_build = OpenMPUtils::GetCurrentTime(); + if (this->GetEchoLevel() >= 1 && r_model_part.GetCommunicator().MyPID() == 0) + std::cout << "build time: " << stop_build - start_build << std::endl; + + //for (int i = 0; i < A_size; i++) + // omp_destroy_lock(&lock_array[i]); + if (this->GetEchoLevel() > 2 && r_model_part.GetCommunicator().MyPID() == 0) + { + KRATOS_WATCH("finished parallel building"); + } + + KRATOS_CATCH("") + } + + protected: + void ConstructMatrixStructure( + typename TSchemeType::Pointer pScheme, + TSystemMatrixType &A, + ElementsContainerType &rElements, + ConditionsArrayType &rConditions, + ProcessInfo &CurrentProcessInfo) override + { + //filling with zero the matrix (creating the structure) + Timer::Start("MatrixStructure"); + + const std::size_t equation_size = BaseType::mDofSet.size(); + +#ifdef USE_GOOGLE_HASH + std::vector> indices(equation_size); + const std::size_t empty_key = 2 * equation_size + 10; +#else + std::vector> indices(equation_size); +#endif + +#pragma omp parallel for firstprivate(equation_size) + for (int iii = 0; iii < static_cast(equation_size); iii++) + { +#ifdef USE_GOOGLE_HASH + indices[iii].set_empty_key(empty_key); +#else + indices[iii].reserve(40); +#endif + } + Element::EquationIdVectorType ids(3, 0); + + const int nelements = static_cast(rElements.size()); +#pragma omp parallel for firstprivate(nelements, ids) + for (int iii = 0; iii < nelements; iii++) + { + typename ElementsContainerType::iterator i_element = rElements.begin() + iii; + (i_element)->EquationIdVector(ids, CurrentProcessInfo); + + // Modifying the equation IDs of this element to suit MPCs + this->Element_ModifyEquationIdsForMPC(*(i_element.base()), ids, CurrentProcessInfo); + + for (std::size_t i = 0; i < ids.size(); i++) + { +#ifdef _OPENMP + omp_set_lock(&(BaseType::mlock_array[ids[i]])); +#endif + auto &row_indices = indices[ids[i]]; + row_indices.insert(ids.begin(), ids.end()); + +#ifdef _OPENMP + omp_unset_lock(&(BaseType::mlock_array[ids[i]])); +#endif + } + } + const int nconditions = static_cast(rConditions.size()); +#pragma omp parallel for firstprivate(nconditions, ids) + for (int iii = 0; iii < nconditions; iii++) + { + typename ConditionsArrayType::iterator i_condition = rConditions.begin() + iii; + (i_condition)->EquationIdVector(ids, CurrentProcessInfo); + // Modifying the equation IDs of this element to suit MPCs + this->Condition_ModifyEquationIdsForMPC(*(i_condition.base()), ids, CurrentProcessInfo); + + for (std::size_t i = 0; i < ids.size(); i++) + { +#ifdef _OPENMP + omp_set_lock(&(BaseType::mlock_array[ids[i]])); +#endif + auto &row_indices = indices[ids[i]]; + row_indices.insert(ids.begin(), ids.end()); +#ifdef _OPENMP + omp_unset_lock(&(BaseType::mlock_array[ids[i]])); +#endif + } + } + //count the row sizes + unsigned int nnz = 0; + for (unsigned int i = 0; i < indices.size(); i++) + nnz += indices[i].size(); + + A = boost::numeric::ublas::compressed_matrix(indices.size(), indices.size(), nnz); + + double *Avalues = A.value_data().begin(); + std::size_t *Arow_indices = A.index1_data().begin(); + std::size_t *Acol_indices = A.index2_data().begin(); + + //filling the index1 vector - DO NOT MAKE PARALLEL THE FOLLOWING LOOP! + Arow_indices[0] = 0; + for (int i = 0; i < static_cast(A.size1()); i++) + Arow_indices[i + 1] = Arow_indices[i] + indices[i].size(); + +#pragma omp parallel for + for (int i = 0; i < static_cast(A.size1()); i++) + { + const unsigned int row_begin = Arow_indices[i]; + const unsigned int row_end = Arow_indices[i + 1]; + unsigned int k = row_begin; + for (auto it = indices[i].begin(); it != indices[i].end(); it++) + { + Acol_indices[k] = *it; + Avalues[k] = 0.0; + k++; + } + + indices[i].clear(); //deallocating the memory + + std::sort(&Acol_indices[row_begin], &Acol_indices[row_end]); + } + + A.set_filled(indices.size() + 1, nnz); + Timer::Stop("MatrixStructure"); + } + + protected: + /*@} */ + /**@name Protected member Variables */ + /*@{ */ + + /* + * This function modifies the provided equation ID vector to accommodate MPC constraints + */ + void Element_ModifyEquationIdsForMPC(Element::Pointer rCurrentElement, + Element::EquationIdVectorType &EquationId, + ProcessInfo &CurrentProcessInfo) + { + const unsigned int number_of_nodes = rCurrentElement->GetGeometry().PointsNumber(); + MpcDataPointerVectorType mpcDataVector = CurrentProcessInfo.GetValue(MPC_DATA_CONTAINER); + + for (auto mpcData : (*mpcDataVector)) + { + if (mpcData->IsActive()) + { + // For each node check if it is a slave or not If it is .. we change the Transformation matrix + for (unsigned int j = 0; j < number_of_nodes; j++) + { + DofsVectorType elementDofs; + rCurrentElement->GetDofList(elementDofs, CurrentProcessInfo); + int numDofsPerNode = elementDofs.size() / number_of_nodes; + if (rCurrentElement->GetGeometry()[j].Is(SLAVE)) + { //temporary, will be checked once at the beginning only + // Necessary data for iterating and modifying the matrix + unsigned int slaveEquationId; + int startPositionNodeDofs = numDofsPerNode*(j); + for (int i=0; i EquationId(); + if (mpcData->mEquationIdToWeightsMap.count(slaveEquationId) > 0) + { + MasterIdWeightMapType masterWeightsMap = mpcData->mEquationIdToWeightsMap[slaveEquationId]; + for (auto master : masterWeightsMap) + { + EquationId.push_back(master.first); + } + } + } + } + } + } + } + } + + /* + * This function modifies the provided equation ID vector to accommodate MPC constraints + */ + void Condition_ModifyEquationIdsForMPC(Condition::Pointer rCurrentCondition, + Element::EquationIdVectorType &EquationId, + ProcessInfo &CurrentProcessInfo) + { + + const unsigned int number_of_nodes = rCurrentCondition->GetGeometry().PointsNumber(); + MpcDataPointerVectorType mpcDataVector = CurrentProcessInfo.GetValue(MPC_DATA_CONTAINER); + for (auto mpcData : (*mpcDataVector)) + { + if (mpcData->IsActive()) + { + // For each node check if it is a slave or not If it is .. we change the Transformation matrix + for (unsigned int j = 0; j < number_of_nodes; j++) + { + DofsVectorType conditionDofs; + rCurrentCondition->GetDofList(conditionDofs, CurrentProcessInfo); + int numDofsPerNode = conditionDofs.size() / number_of_nodes; + if (rCurrentCondition->GetGeometry()[j].Is(SLAVE)) + { //temporary, will be checked once at the beginning only + // Necessary data for iterating and modifying the matrix + unsigned int slaveEquationId; + int startPositionNodeDofs = numDofsPerNode*(j); + for (int i=0; i EquationId(); + if (mpcData->mEquationIdToWeightsMap.count(slaveEquationId) > 0) + { + MasterIdWeightMapType masterWeightsMap = mpcData->mEquationIdToWeightsMap[slaveEquationId]; + for (auto master : masterWeightsMap) + { + EquationId.push_back(master.first); + } + } + } + } + } + } + } + } + + /* + * This function changes/extends the element LHS and RHS to apply MPC + */ + + void Element_ApplyMultipointConstraints(Element::Pointer rCurrentElement, + LocalSystemMatrixType &LHS_Contribution, + LocalSystemVectorType &RHS_Contribution, + Element::EquationIdVectorType &EquationId, + ProcessInfo &CurrentProcessInfo) + { + + KRATOS_TRY + bool slaveFound = false; + Element::NodesArrayType nodesArray = rCurrentElement->GetGeometry(); + const unsigned int number_of_nodes = rCurrentElement->GetGeometry().PointsNumber(); + for (unsigned int j = 0; j < number_of_nodes; j++) + { + if (rCurrentElement->GetGeometry()[j].Is(SLAVE)) + { //temporary, will be checked once at the beginning only + slaveFound = true; + break; + } + } + // If no slave is found no need of going on + if (!slaveFound) + { + return; + } + MpcDataPointerVectorType mpcDataVector = CurrentProcessInfo.GetValue(MPC_DATA_CONTAINER); + for (auto mpcData : (*mpcDataVector)) + { + if (mpcData->IsActive()) + { + std::vector localEquationIds; + std::vector localSlaveEquationIds; + std::vector localInternEquationIds; + std::vector localMasterEquationIds; + std::vector WeightsCorrespondingToMasters; + std::vector SlavesCorrespondingToMasters; + // Formulating the local slave equationId vector + for (unsigned int i = 0; i < EquationId.size(); ++i) + { + localEquationIds.push_back(i); + if (mpcData->mEquationIdToWeightsMap.count(EquationId[i]) > 0) + { + localSlaveEquationIds.push_back(i); + } + } + std::sort(localEquationIds.begin(), localEquationIds.end()); + std::sort(localSlaveEquationIds.begin(), localSlaveEquationIds.end()); + std::set_difference(localEquationIds.begin(), localEquationIds.end(), localSlaveEquationIds.begin(), localSlaveEquationIds.end(), std::back_inserter(localInternEquationIds)); + for (unsigned int j = 0; j < number_of_nodes; ++j) + { // Loop over the nodes + std::vector slaveEquationIds; + int totalNumberOfSlaves = 0; + int totalNumberOfMasters = 0; + DofsVectorType elementDofs; + rCurrentElement->GetDofList(elementDofs, CurrentProcessInfo); + int numDofsPerNode = elementDofs.size() / number_of_nodes; + + if (rCurrentElement->GetGeometry()[j].Is(SLAVE)) + { // If the node has a slave DOF + int startPositionNodeDofs = numDofsPerNode*(j); + unsigned int slaveEquationId; + for (int i=0; i EquationId(); + if (mpcData->mEquationIdToWeightsMap.count(slaveEquationId) > 0) + { + totalNumberOfSlaves++; + slaveEquationIds.push_back(slaveEquationId); + MasterIdWeightMapType &masterWeightsMap = mpcData->mEquationIdToWeightsMap[slaveEquationId]; + + totalNumberOfMasters += masterWeightsMap.size(); + } + } + + std::vector::iterator it; + std::vector localNodalSlaveEquationIds; + // We resize the LHS and RHS contribution with the master sizes + int currentSysSize = LHS_Contribution.size1(); + int lhsSize1 = currentSysSize + totalNumberOfMasters; + int lhsSize2 = currentSysSize + totalNumberOfMasters; + LHS_Contribution.resize(lhsSize1, lhsSize2, true); //true for Preserving the data and resizing the matrix + RHS_Contribution.resize(lhsSize1, true); + // Making the extra part of matrx + for (int m = currentSysSize; m < lhsSize1; m++) + { + for (int n = 0; n < lhsSize1; n++) + { + LHS_Contribution(m, n) = 0.0; + LHS_Contribution(n, m) = 0.0; + } + RHS_Contribution(m) = 0.0; + } + // Formulating the local slave equationId vector + for (int slaveI = 0; slaveI < totalNumberOfSlaves; ++slaveI) + { // For each of the Slave DOF + // Obtaining the local dof number for the slave. + int localSlaveEqId = -1; + int slaveEqId = slaveEquationIds[slaveI]; + it = std::find(EquationId.begin(), EquationId.end(), slaveEqId); + if (it != EquationId.end()) + { + std::size_t pos = std::distance(EquationId.begin(), it); + localSlaveEqId = pos; + } + localNodalSlaveEquationIds.push_back(localSlaveEqId); + } + + int currentNumberOfMastersProcessed = 0; + for (auto localSlaveEqId : localNodalSlaveEquationIds) + { // Loop over all the slaves for this node + it = std::find(localNodalSlaveEquationIds.begin(), localNodalSlaveEquationIds.end(), localSlaveEqId); + int slaveIndex = std::distance(localNodalSlaveEquationIds.begin(), it); + MasterIdWeightMapType &masterWeightsMap = mpcData->mEquationIdToWeightsMap[slaveEquationIds[slaveIndex]]; + for (auto masterI : masterWeightsMap) + { // Loop over all the masters the slave has + + int localMasterEqId = currentNumberOfMastersProcessed + currentSysSize; + ++currentNumberOfMastersProcessed; + double weight = masterI.second; + double constant = mpcData->mSlaveEquationIdConstantsUpdate[slaveEquationIds[slaveIndex]]; + for (auto localInternEqId : localInternEquationIds) + { + RHS_Contribution(localInternEqId) += -LHS_Contribution(localInternEqId, localSlaveEqId) * constant; + } + + // For K(m,u) and K(u,m) + for (auto localInternEqId : localInternEquationIds) + { // Loop over all the local equation ids + LHS_Contribution(localInternEqId, localMasterEqId) += LHS_Contribution(localInternEqId, localSlaveEqId) * weight; + LHS_Contribution(localMasterEqId, localInternEqId) += LHS_Contribution(localSlaveEqId, localInternEqId) * weight; + } // Loop over all the local equation ids + + // For RHS(m) += A'*LHS(s,s)*B + for (auto localSlaveEqIdOther : localNodalSlaveEquationIds) + { + std::vector::iterator itOther = std::find(localNodalSlaveEquationIds.begin(), localNodalSlaveEquationIds.end(), localSlaveEqIdOther); + int slaveIndexOther = std::distance(localNodalSlaveEquationIds.begin(), it); + double constantOther = mpcData->mSlaveEquationIdConstantsUpdate[slaveEquationIds[slaveIndexOther]]; + RHS_Contribution(localMasterEqId) += LHS_Contribution(localSlaveEqId, localSlaveEqIdOther) * weight * constantOther; + } + + EquationId.push_back(masterI.first); + // Changing the RHS side of the equation + RHS_Contribution(localMasterEqId) += weight * RHS_Contribution(localSlaveEqId); + + localMasterEquationIds.push_back(localMasterEqId); + WeightsCorrespondingToMasters.push_back(weight); + SlavesCorrespondingToMasters.push_back(localSlaveEqId); + + } // Loop over all the masters the slave has + + RHS_Contribution(localSlaveEqId) = 0.0; + } // Loop over all the slaves for this node + + //Adding contribution from slave to Kmm + for (unsigned int localMasterIndex = 0; localMasterIndex < localMasterEquationIds.size(); localMasterIndex++) + { + for (unsigned int localMasterIndexOther = 0; localMasterIndexOther < localMasterEquationIds.size(); localMasterIndexOther++) + { + LHS_Contribution(localMasterEquationIds[localMasterIndex], localMasterEquationIds[localMasterIndexOther]) += WeightsCorrespondingToMasters[localMasterIndex] * + LHS_Contribution(SlavesCorrespondingToMasters[localMasterIndex], SlavesCorrespondingToMasters[localMasterIndexOther]) * WeightsCorrespondingToMasters[localMasterIndexOther]; + } + } + } // If the node has a slave DOF + } // Loop over the nodes + + // For K(u,s) and K(s,u) + for (auto localSlaveEqId : localSlaveEquationIds) + { // Loop over all the slaves for this node + for (auto localInternEqId : localInternEquationIds) + { // Loop over all the local equation ids + LHS_Contribution(localSlaveEqId, localInternEqId) = 0.0; + LHS_Contribution(localInternEqId, localSlaveEqId) = 0.0; + } + } // Loop over all the slaves for this node + } + } + KRATOS_CATCH("Applying Multipoint constraints failed .."); + } // End of function + + void Condition_ApplyMultipointConstraints(Condition::Pointer rCurrentElement, + LocalSystemMatrixType &LHS_Contribution, + LocalSystemVectorType &RHS_Contribution, + Element::EquationIdVectorType &EquationId, + ProcessInfo &CurrentProcessInfo) + { + + KRATOS_TRY + bool slaveFound = false; + Element::NodesArrayType nodesArray = rCurrentElement->GetGeometry(); + const unsigned int number_of_nodes = rCurrentElement->GetGeometry().PointsNumber(); + for (unsigned int j = 0; j < number_of_nodes; j++) + { + if (rCurrentElement->GetGeometry()[j].Is(SLAVE)) + { //temporary, will be checked once at the beginning only + slaveFound = true; + break; + } + } + // If no slave is found no need of going on + if (!slaveFound) + { + return; + } + MpcDataPointerVectorType mpcDataVector = CurrentProcessInfo.GetValue(MPC_DATA_CONTAINER); + for (auto mpcData : (*mpcDataVector)) + { + if (mpcData->IsActive()) + { + std::vector localEquationIds; + std::vector localSlaveEquationIds; + std::vector localInternEquationIds; + std::vector localMasterEquationIds; + std::vector WeightsCorrespondingToMasters; + std::vector SlavesCorrespondingToMasters; + // Formulating the local slave equationId vector + for (unsigned int i = 0; i < EquationId.size(); ++i) + { + localEquationIds.push_back(i); + if (mpcData->mEquationIdToWeightsMap.count(EquationId[i]) > 0) + { + localSlaveEquationIds.push_back(i); + } + } + std::sort(localEquationIds.begin(), localEquationIds.end()); + std::sort(localSlaveEquationIds.begin(), localSlaveEquationIds.end()); + std::set_difference(localEquationIds.begin(), localEquationIds.end(), localSlaveEquationIds.begin(), localSlaveEquationIds.end(), std::back_inserter(localInternEquationIds)); + for (unsigned int j = 0; j < number_of_nodes; ++j) + { // Loop over the nodes + std::vector slaveEquationIds; + int totalNumberOfSlaves = 0; + int totalNumberOfMasters = 0; + DofsVectorType elementDofs; + rCurrentElement->GetDofList(elementDofs, CurrentProcessInfo); + int numDofsPerNode = elementDofs.size() / number_of_nodes; + + if (rCurrentElement->GetGeometry()[j].Is(SLAVE)) + { // If the node has a slave DOF + int startPositionNodeDofs = numDofsPerNode*(j); + unsigned int slaveEquationId; + for (int i=0; i EquationId(); + if (mpcData->mEquationIdToWeightsMap.count(slaveEquationId) > 0) + if (mpcData->mEquationIdToWeightsMap.count(slaveEquationId) > 0) + { + totalNumberOfSlaves++; + slaveEquationIds.push_back(slaveEquationId); + MasterIdWeightMapType &masterWeightsMap = mpcData->mEquationIdToWeightsMap[slaveEquationId]; + + totalNumberOfMasters += masterWeightsMap.size(); + } + } + + std::vector::iterator it; + std::vector localNodalSlaveEquationIds; + // We resize the LHS and RHS contribution with the master sizes + int currentSysSize = LHS_Contribution.size1(); + int lhsSize1 = currentSysSize + totalNumberOfMasters; + int lhsSize2 = currentSysSize + totalNumberOfMasters; + LHS_Contribution.resize(lhsSize1, lhsSize2, true); //true for Preserving the data and resizing the matrix + RHS_Contribution.resize(lhsSize1, true); + // Making the extra part of matrx + for (int m = currentSysSize; m < lhsSize1; m++) + { + for (int n = 0; n < lhsSize1; n++) + { + LHS_Contribution(m, n) = 0.0; + LHS_Contribution(n, m) = 0.0; + } + RHS_Contribution(m) = 0.0; + } + // Formulating the local slave equationId vector + for (int slaveI = 0; slaveI < totalNumberOfSlaves; ++slaveI) + { // For each of the Slave DOF + // Obtaining the local dof number for the slave. + int localSlaveEqId = -1; + int slaveEqId = slaveEquationIds[slaveI]; + it = std::find(EquationId.begin(), EquationId.end(), slaveEqId); + if (it != EquationId.end()) + { + std::size_t pos = std::distance(EquationId.begin(), it); + localSlaveEqId = pos; + } + localNodalSlaveEquationIds.push_back(localSlaveEqId); + } + + int currentNumberOfMastersProcessed = 0; + for (auto localSlaveEqId : localNodalSlaveEquationIds) + { // Loop over all the slaves for this node + it = std::find(localNodalSlaveEquationIds.begin(), localNodalSlaveEquationIds.end(), localSlaveEqId); + int slaveIndex = std::distance(localNodalSlaveEquationIds.begin(), it); + MasterIdWeightMapType &masterWeightsMap = mpcData->mEquationIdToWeightsMap[slaveEquationIds[slaveIndex]]; + for (auto masterI : masterWeightsMap) + { // Loop over all the masters the slave has + + int localMasterEqId = currentNumberOfMastersProcessed + currentSysSize; + ++currentNumberOfMastersProcessed; + double weight = masterI.second; + double constant = mpcData->mSlaveEquationIdConstantsUpdate[slaveEquationIds[slaveIndex]]; + for (auto localInternEqId : localInternEquationIds) + { + RHS_Contribution(localInternEqId) += -LHS_Contribution(localInternEqId, localSlaveEqId) * constant; + } + + // For K(m,u) and K(u,m) + for (auto localInternEqId : localInternEquationIds) + { // Loop over all the local equation ids + LHS_Contribution(localInternEqId, localMasterEqId) += LHS_Contribution(localInternEqId, localSlaveEqId) * weight; + LHS_Contribution(localMasterEqId, localInternEqId) += LHS_Contribution(localSlaveEqId, localInternEqId) * weight; + } // Loop over all the local equation ids + + // For RHS(m) += A'*LHS(s,s)*B + for (auto localSlaveEqIdOther : localNodalSlaveEquationIds) + { + std::vector::iterator itOther = std::find(localNodalSlaveEquationIds.begin(), localNodalSlaveEquationIds.end(), localSlaveEqIdOther); + int slaveIndexOther = std::distance(localNodalSlaveEquationIds.begin(), it); + double constantOther = mpcData->mSlaveEquationIdConstantsUpdate[slaveEquationIds[slaveIndexOther]]; + RHS_Contribution(localMasterEqId) += LHS_Contribution(localSlaveEqId, localSlaveEqIdOther) * weight * constantOther; + } + + EquationId.push_back(masterI.first); + // Changing the RHS side of the equation + RHS_Contribution(localMasterEqId) = RHS_Contribution(localMasterEqId) + weight * RHS_Contribution(localSlaveEqId); + + localMasterEquationIds.push_back(localMasterEqId); + WeightsCorrespondingToMasters.push_back(weight); + SlavesCorrespondingToMasters.push_back(localSlaveEqId); + + } // Loop over all the masters the slave has + + RHS_Contribution(localSlaveEqId) = 0.0; + } // Loop over all the slaves for this node + + //Adding contribution from slave to Kmm + for (unsigned int localMasterIndex = 0; localMasterIndex < localMasterEquationIds.size(); localMasterIndex++) + { + for (unsigned int localMasterIndexOther = 0; localMasterIndexOther < localMasterEquationIds.size(); localMasterIndexOther++) + { + LHS_Contribution(localMasterEquationIds[localMasterIndex], localMasterEquationIds[localMasterIndexOther]) += WeightsCorrespondingToMasters[localMasterIndex] * + LHS_Contribution(SlavesCorrespondingToMasters[localMasterIndex], SlavesCorrespondingToMasters[localMasterIndexOther]) * WeightsCorrespondingToMasters[localMasterIndexOther]; + } + } + } // If the node has a slave DOF + } // Loop over the nodes + + // For K(u,s) and K(s,u) + for (auto localSlaveEqId : localSlaveEquationIds) + { // Loop over all the slaves for this node + for (auto localInternEqId : localInternEquationIds) + { // Loop over all the local equation ids + LHS_Contribution(localSlaveEqId, localInternEqId) = 0.0; + LHS_Contribution(localInternEqId, localSlaveEqId) = 0.0; + } + } // Loop over all the slaves for this node + } + } + KRATOS_CATCH("Applying Multipoint constraints failed .."); + } // End of the function + + /* + * This function Formulates the MPC data in equation ID terms + */ + void FormulateEquationIdRelationMap(ModelPart &r_model_part) + { + + ProcessInfoType info = r_model_part.GetProcessInfo(); + + if (info.Has(MPC_DATA_CONTAINER)) + { + MpcDataPointerVectorType mpcDataVector = info.GetValue(MPC_DATA_CONTAINER); + for (auto mpcData : (*mpcDataVector)) + { + if (mpcData->IsActive()) + { + for (auto slaveMasterDofMap : mpcData->mDofConstraints) + { + SlavePairType slaveDofMap = slaveMasterDofMap.first; + MasterDofWeightMapType &masterDofMap = slaveMasterDofMap.second; + unsigned int slaveNodeId = slaveDofMap.first; + unsigned int slaveDofKey = slaveDofMap.second; + NodeType &node = r_model_part.Nodes()[slaveNodeId]; + Node<3>::DofsContainerType::iterator it = node.GetDofs().find(slaveDofKey); + unsigned int slaveEquationId = it->EquationId(); + + for (auto masterDofMapElem : masterDofMap) + { + unsigned int masterNodeId; + double constant; + unsigned int masterEquationId; + unsigned int masterDofKey; + double weight = masterDofMapElem.second; + std::tie(masterNodeId, masterDofKey, constant) = masterDofMapElem.first; + NodeType &masterNode = r_model_part.Nodes()[masterNodeId]; + Node<3>::DofsContainerType::iterator itMaster = masterNode.GetDofs().find(masterDofKey); + masterEquationId = itMaster->EquationId(); + // + mpcData->AddConstraint(slaveEquationId, masterEquationId, weight, constant); + } + } + } + } + } + } + + void ReconstructSlaveDofForIterationStep( + ModelPart &r_model_part, + TSystemMatrixType &A, + TSystemVectorType &Dx, + TSystemVectorType &b) + { + ProcessInfo &CurrentProcessInfo = r_model_part.GetProcessInfo(); + MpcDataPointerVectorType mpcDataVector = CurrentProcessInfo.GetValue(MPC_DATA_CONTAINER); + + for (auto mpcData : (*mpcDataVector)) + { + if (mpcData->IsActive()) + { + for (auto slaveMasterDofMap : mpcData->mDofConstraints) + { + SlavePairType slaveDofMap = slaveMasterDofMap.first; + MasterDofWeightMapType &masterDofMap = slaveMasterDofMap.second; + unsigned int slaveNodeId = slaveDofMap.first; + unsigned int slaveDofKey = slaveDofMap.second; + NodeType &node = r_model_part.Nodes()[slaveNodeId]; + Node<3>::DofsContainerType::iterator it = node.GetDofs().find(slaveDofKey); + unsigned int slaveEquationId = it->EquationId(); + + for (auto masterDofMapElem : masterDofMap) + { + unsigned int masterNodeId; + double constant; + unsigned int masterEquationId; + unsigned int masterDofKey; + double weight = masterDofMapElem.second; + std::tie(masterNodeId, masterDofKey, constant) = masterDofMapElem.first; + NodeType &masterNode = r_model_part.Nodes()[masterNodeId]; + Node<3>::DofsContainerType::iterator it = masterNode.GetDofs().find(masterDofKey); + masterEquationId = it->EquationId(); + + Dx[slaveEquationId] = TSparseSpace::GetValue(Dx, slaveEquationId) + TSparseSpace::GetValue(Dx, masterEquationId) * weight; + } + + Dx[slaveEquationId] = TSparseSpace::GetValue(Dx, slaveEquationId) + mpcData->mSlaveEquationIdConstantsUpdate[slaveEquationId]; + mpcData->mSlaveEquationIdConstantsUpdate[slaveEquationId] = 0.0; + } + } + } + } + + void UpdateConstraintEquationsAfterIteration( + ModelPart &r_model_part, + TSystemMatrixType &A, + TSystemVectorType &Dx, + TSystemVectorType &b) + { + + ProcessInfo &CurrentProcessInfo = r_model_part.GetProcessInfo(); + MpcDataPointerVectorType mpcDataVector = CurrentProcessInfo.GetValue(MPC_DATA_CONTAINER); + + for (auto mpcData : (*mpcDataVector)) + { + if (mpcData->IsActive()) + { + for (auto slaveMasterDofMap : mpcData->mDofConstraints) + { + SlavePairType slaveDofMap = slaveMasterDofMap.first; + MasterDofWeightMapType &masterDofMap = slaveMasterDofMap.second; + unsigned int slaveNodeId = slaveDofMap.first; + unsigned int slaveDofKey = slaveDofMap.second; + NodeType &node = r_model_part.Nodes()[slaveNodeId]; + Node<3>::DofsContainerType::iterator it = node.GetDofs().find(slaveDofKey); + unsigned int slaveEquationId = it->EquationId(); + double slaveDofValue = it->GetSolutionStepValue(); + double slaveDofValueCalc = 0.0; + + for (auto masterDofMapElem : masterDofMap) + { + unsigned int masterNodeId; + double constant; + unsigned int masterDofKey; + double weight = masterDofMapElem.second; + std::tie(masterNodeId, masterDofKey, constant) = masterDofMapElem.first; + NodeType &masterNode = r_model_part.Nodes()[masterNodeId]; + Node<3>::DofsContainerType::iterator itMaster = masterNode.GetDofs().find(masterDofKey); + + slaveDofValueCalc += itMaster->GetSolutionStepValue() * weight; + } + + slaveDofValueCalc += mpcData->mSlaveEquationIdConstantsMap[slaveEquationId]; + + double dConstant = slaveDofValueCalc - slaveDofValue; + mpcData->mSlaveEquationIdConstantsUpdate[slaveEquationId] = dConstant; + } + } + } + } +}; +} + +#endif /* KRATOS_SOLVING_STRATEGIES_BUILDER_AND_SOLVERS_RESIDUALBASED_BLOCK_BUILDER_AND_SOLVER_WITH_MPC_H_ */ diff --git a/applications/StructuralMechanicsApplication/custom_utilities/multipoint_constraint_data.hpp b/applications/StructuralMechanicsApplication/custom_utilities/multipoint_constraint_data.hpp new file mode 100644 index 000000000000..b0d9c29a667e --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_utilities/multipoint_constraint_data.hpp @@ -0,0 +1,318 @@ +// | / | +// ' / __| _` | __| _ \ __| +// . \ | ( | | ( |\__ ` +// _|\_\_| \__,_|\__|\___/ ____/ +// Multi-Physics +// +// License: BSD License +// Kratos default license: kratos/license.txt +// +// Main authors: Aditya Ghantasala +// +// + +#if !defined(MULTIPOINT_CONSTRAINT_DATA_H) +#define MULTIPOINT_CONSTRAINT_DATA_H +// System includes +#include +#include +#include +#include +#include +#include + +// project includes +#include + +namespace Kratos +{ +/** \brief Quaternion + * A simple class that implements the main features of quaternion algebra + */ +class MpcData +{ + + public: + /// Pointer definition of DataValueContainer + KRATOS_CLASS_POINTER_DEFINITION(MpcData); + + typedef Dof DofType; + typedef VariableData VariableDataType; + typedef Kratos::VariableComponent>> VariableComponentType; + typedef unsigned int IndexType; + typedef std::vector::Pointer> DofsVectorType; + typedef std::unordered_map MasterIdWeightMapType; + typedef std::pair SlavePairType; + typedef std::tuple key_tupple; + typedef Kratos::Variable VariableType; + + struct key_hash_tuple : public std::unary_function + { + std::size_t operator()(const key_tupple &k) const + { + + std::size_t seed = 0; + boost::hash_combine(seed, std::get<0>(k)); + boost::hash_combine(seed, std::get<1>(k)); + boost::hash_combine(seed, std::get<2>(k)); + return seed; + } + }; + + struct key_equal_tuple : public std::binary_function + { + bool operator()(const key_tupple &v0, const key_tupple &v1) const + { + + std::size_t seed0 = 0; + boost::hash_combine(seed0, std::get<0>(v0)); + boost::hash_combine(seed0, std::get<1>(v0)); + boost::hash_combine(seed0, std::get<2>(v0)); + + std::size_t seed1 = 0; + boost::hash_combine(seed1, std::get<0>(v1)); + boost::hash_combine(seed1, std::get<1>(v1)); + boost::hash_combine(seed1, std::get<2>(v1)); + + + return (seed0 == seed1); + } + }; + + struct pair_hash + { + template + std::size_t operator()(const std::pair &p) const + { + std::size_t seed0 = 0; + boost::hash_combine(seed0, p.first); + boost::hash_combine(seed0, p.second); + return seed0; + } + }; + + //friend bool operator == (MpcData &obj1, MpcData &obj2); + + typedef std::unordered_map MasterDofWeightMapType; + //typedef std::unordered_map, double> ; + + ///@name Life Cycle + ///@{ + + /** + Creates a MPC data object + */ + MpcData() : mDofConstraints(), mEquationIdToWeightsMap() + { + } + /// Destructor. + virtual ~MpcData(){}; + + ///@} + + public: + ///@name Operators + ///@{ + + ///@} + + public: + ///@name Access + ///@{ + + /** + Clears the maps contents + */ + void Clear(){ + mSlaveEquationIdConstantsMap.clear(); + mEquationIdToWeightsMap.clear(); + } + + /** + Get the MasterDOFs vector for this slave + @return MasterDOFs vector for this slave + */ + const MasterIdWeightMapType &GetMasterDataForSlave(DofType &SlaveDof) + { + return mEquationIdToWeightsMap[SlaveDof.EquationId()]; + } + + /** + Adds a constraints between the given slave and master with a weight. + */ + + // Takes in a slave dof equationId and a master dof equationId + void AddConstraint(unsigned int SlaveDofEquationId, unsigned int MasterDofEquationId, double weight, double constant = 0.0) + { + mEquationIdToWeightsMap[SlaveDofEquationId].insert( std::pair(MasterDofEquationId, weight) ); + mSlaveEquationIdConstantsMap.insert(std::pair(SlaveDofEquationId, constant)); + mSlaveEquationIdConstantsUpdate.insert(std::pair(SlaveDofEquationId, constant)); + } + + + // Takes in a slave dof and a master dof + void AddConstraint(DofType &SlaveDof, DofType &MasterDof, double weight, double constant = 0.0) + { + //here we can get the dof since we are sure that such dof exist + //auto &slave_dof = mp_model_part.Nodes(SlaveNodeId).GetDof(SlaveVariable); + IndexType MasterNodeId = MasterDof.Id(); + unsigned int MasterVariableKey = (MasterDof).GetVariable().Key(); + + unsigned int slaveVariableKey = SlaveDof.GetVariable().Key(); + + mDofConstraints[std::make_pair(SlaveDof.Id(), slaveVariableKey)][std::tie(MasterNodeId, MasterVariableKey, constant)] += weight; + } + + // Takes in a slave dof and a list of all the masters associated with it and corresponding weights, partitionIds + void AddConstraint(DofType &SlaveDof, DofsVectorType MasterDofsVector, std::vector weightsVector, std::vector ConstantVector = std::vector()) + { + //here we can get the dof since we are sure that such dof exist + //auto &slave_dof = mp_model_part.Nodes(SlaveNodeId).GetDof(SlaveVariable); + if (MasterDofsVector.size() != weightsVector.size()) + assert(false); + + unsigned int slaveNodeId = SlaveDof.Id(); + unsigned int slaveVariableKey = SlaveDof.GetVariable().Key(); + unsigned int index = 0; + for (auto MasterDof : MasterDofsVector) + { + IndexType MasterNodeId = (*MasterDof).Id(); + unsigned int MasterVariableKey = (*MasterDof).GetVariable().Key(); // TODO :: Check why do we need a mastervariable ... is a master key not enough ? + double constant=0.0; + if (ConstantVector.size() == 0) + constant = 0; + else + constant = ConstantVector[index]; + + mDofConstraints[std::make_pair(slaveNodeId, slaveVariableKey)] + [std::make_tuple(MasterNodeId, MasterVariableKey, constant)] += weightsVector[index]; + ++index; + } + } + + /** + Get the Total number of MasterDOFs for a given slave dof + @return Total number of MasterDOFs for a given slave dof + */ + unsigned int GetNumbeOfMasterDofsForSlave(const DofType &SlaveDof) + { + return mDofConstraints[std::make_pair(SlaveDof.Id(), SlaveDof.GetVariable().Key())].size(); + } + + /** + Set the name for the current set of constraints. + */ + void SetName(const std::string name) + { + mName = name; + } + /** + Get the name for the current set of constraints. + */ + std::string GetName() + { + return mName; + } + + /** + Set the activeness for current set of constraints. + */ + void SetActive(const bool isActive) + { + mActive = isActive; + } + + /** + Returns true if the constraint set is active + */ + bool IsActive() + { + return mActive; + } + + + ///@ + + ///@name Static Operations + /// + //@{ + /** + * Returns the string containing a detailed description of this object. + * @return the string with informations + */ + virtual void GetInfo() const + { + std::cout << std::endl; + std::cout << "===============================================================" << std::endl; + std::cout << "Number of Slave DOFs :: "<< mDofConstraints.size()< mDofConstraints; + + //this stores a much simpler "map of maps" of EquationIds vs EquationId & weight + // This is to be formulated inside the builder and solver before build() function ideally in initialize solution step + std::unordered_map> + mEquationIdToWeightsMap; + + std::unordered_map mSlaveEquationIdConstantsMap; + std::unordered_map mSlaveEquationIdConstantsUpdate; + + bool mActive; + std::string mName; + ///@} + + ///@name Serialization + ///@{ + friend class Serializer; + + virtual void save(Serializer &rSerializer) const + { + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, MpcData); + } + + virtual void load(Serializer &rSerializer) + { + KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, MpcData); + } + + ///@} +}; + +///@name Input/Output funcitons +///@{ + +/*bool operator== (MpcData &obj1, MpcData &obj2) +{ + return obj1.GetName() == obj2.GetName(); +} */ + +inline std::istream &operator>>(std::istream &rIStream, MpcData &rThis); + +inline std::ostream &operator<<(std::ostream &rOStream, const MpcData &rThis) +{ + return rOStream; +} + +///@} + +} // namespace Kratos + +#endif // CONSTRAINT_SLAVE_H_INCLUDED diff --git a/applications/StructuralMechanicsApplication/custom_utilities/shell_cross_section.cpp b/applications/StructuralMechanicsApplication/custom_utilities/shell_cross_section.cpp index 68ae08a2dd5f..0f79fd8b68db 100644 --- a/applications/StructuralMechanicsApplication/custom_utilities/shell_cross_section.cpp +++ b/applications/StructuralMechanicsApplication/custom_utilities/shell_cross_section.cpp @@ -341,7 +341,7 @@ void ShellCrossSection::FinalizeNonLinearIteration(const Properties& rMaterialPr { } -void ShellCrossSection::CalculateSectionResponse(Parameters& rValues, const ConstitutiveLaw::StressMeasure& rStressMeasure) +void ShellCrossSection::CalculateSectionResponse(SectionParameters& rValues, const ConstitutiveLaw::StressMeasure& rStressMeasure) { // parameters initialization ConstitutiveLaw::Parameters materialValues; @@ -436,12 +436,19 @@ void ShellCrossSection::CalculateSectionResponse(Parameters& rValues, const Cons noalias( L ) = ZeroMatrix( strain_size, condensed_strain_size ); noalias( LT ) = ZeroMatrix( condensed_strain_size, strain_size ); + unsigned int ply_number = 0; // BEGIN LOOP: integrate the response of each ply in this cross section for(PlyCollection::iterator ply_it = mStack.begin(); ply_it != mStack.end(); ++ply_it) { Ply& iPly = *ply_it; const Properties& iPlyProps = iPly.GetProperties(); - materialValues.SetMaterialProperties( iPlyProps ); + + if(CheckIsOrthotropic(iPlyProps)) + { + iPly.RecoverOrthotropicProperties(ply_number); + } + + materialValues.SetMaterialProperties(iPlyProps); double iPlyAngle = iPly.GetOrientationAngle(); if(iPlyAngle == 0.0) @@ -451,7 +458,7 @@ void ShellCrossSection::CalculateSectionResponse(Parameters& rValues, const Cons { IntegrationPoint& iPoint = *intp_it; UpdateIntegrationPointParameters(iPoint, materialValues, variables); - CalculateIntegrationPointResponse(iPoint, materialValues, rValues, variables, rStressMeasure); + CalculateIntegrationPointResponse(iPoint, materialValues, rValues, variables, rStressMeasure,ply_number); } // END LOOP: integrate the response of each integration point in this ply } else @@ -529,7 +536,7 @@ void ShellCrossSection::CalculateSectionResponse(Parameters& rValues, const Cons { IntegrationPoint& iPoint = *intp_it; UpdateIntegrationPointParameters(iPoint, materialValues, variables); - CalculateIntegrationPointResponse(iPoint, materialValues, rValues, variables, rStressMeasure); + CalculateIntegrationPointResponse(iPoint, materialValues, rValues, variables, rStressMeasure,ply_number); } // END LOOP: integrate the response of each integration point in this ply // restore the (working) generalized strain vector with the one in section coordinate system @@ -564,6 +571,12 @@ void ShellCrossSection::CalculateSectionResponse(Parameters& rValues, const Cons noalias( constitutiveMatrix_section ) += prod( R, DRT ); constitutiveMatrix.swap(constitutiveMatrix_section); + if(mStorePlyConstitutiveMatrices) + { + noalias(DRT) = prod(mPlyConstitutiveMatrices[ply_number], trans(R)); + mPlyConstitutiveMatrices[ply_number] = prod(R, DRT); + } + if(mNeedsOOPCondensation) { noalias( HRcT ) = prod( H, trans( Rc ) ); @@ -581,6 +594,8 @@ void ShellCrossSection::CalculateSectionResponse(Parameters& rValues, const Cons } } } + + ply_number++; } // END LOOP: integrate the response of each ply in this cross section // quick return if no static condensation is required @@ -657,12 +672,26 @@ void ShellCrossSection::CalculateSectionResponse(Parameters& rValues, const Cons } if(compute_constitutive_tensor) { - noalias( DRT ) = prod( constitutiveMatrix, trans( R ) ); - noalias( constitutiveMatrix ) = prod( R, DRT ); + noalias(DRT) = prod(constitutiveMatrix, trans(R)); + noalias(constitutiveMatrix) = prod(R, DRT); + + if(mStorePlyConstitutiveMatrices) + { + for(size_t ply = 0; ply < this->NumberOfPlies(); ply++) + { + noalias(DRT) = prod(mPlyConstitutiveMatrices[ply], trans(R)); + mPlyConstitutiveMatrices[ply] = prod(R, DRT); + } + } } } } + if(mStorePlyConstitutiveMatrices) + { + mStorePlyConstitutiveMatrices = false; + } + // restore the original strain vector in element coordinate system if(mOrientation != 0.0) noalias( generalizedStrainVector ) = generalizedStrainVector_element; @@ -675,7 +704,7 @@ void ShellCrossSection::CalculateSectionResponse(Parameters& rValues, const Cons } } -void ShellCrossSection::FinalizeSectionResponse(Parameters& rValues, const ConstitutiveLaw::StressMeasure& rStressMeasure) +void ShellCrossSection::FinalizeSectionResponse(SectionParameters& rValues, const ConstitutiveLaw::StressMeasure& rStressMeasure) { ConstitutiveLaw::Parameters materialValues; GeneralVariables variables; @@ -794,7 +823,150 @@ int ShellCrossSection::Check(const Properties& rMaterialProperties, KRATOS_CATCH("") } -void ShellCrossSection::InitializeParameters(Parameters& rValues, ConstitutiveLaw::Parameters& rMaterialValues, GeneralVariables& rVariables) +bool ShellCrossSection::CheckIsOrthotropic(const Properties& rProps) +{ + if(rProps.Has(SHELL_ORTHOTROPIC_LAYERS)) + { + return true; + } + else + { + return false; + } +} + +void ShellCrossSection::ParseOrthotropicPropertyMatrix(Properties& props, Element* myElement) +{ + // ascertain how many plies there are and begin stacking them + unsigned int plies = (props)[SHELL_ORTHOTROPIC_LAYERS].size1(); + this->BeginStack(); + + // figure out the format of material properties based on it's width + int myFormat = (props)[SHELL_ORTHOTROPIC_LAYERS].size2(); + if(myFormat == 16) + { + myFormat -= 7; + } + + double plyThickness, angleRz, elementThickness; + elementThickness = 0.0; + + // add ply for each orthotropic layer defined + for(unsigned int currentPly = 0; currentPly < plies; currentPly++) + { + switch (myFormat) + { + case 9: + // Composite mechanical properties material definition + // + // Arranged as: thickness, RZangle, density, E1, E2, Poisson_12, G12, G13, G23 + + // Assign the geometric properties of the current ply + plyThickness = (props)[SHELL_ORTHOTROPIC_LAYERS](currentPly, 0); + angleRz = (props)[SHELL_ORTHOTROPIC_LAYERS](currentPly, 1); + + // Mechanical properties of the plies are updated during the + // calculation in the following method: + // ShellCrossSection::Ply::RecoverOrthotropicProperties + + break; + + default: + KRATOS_THROW_ERROR(std::logic_error, "The Orthotropic Layer data has been defined incorrectly! It should be arranged as follows:\n\tthickness, RZangle, density, E1, E2, Poisson_12, G12, G13, G23", "") + } + + this->AddPly(plyThickness, angleRz, 5, myElement->pGetProperties()); + elementThickness += plyThickness; + } + + this->EndStack(); + props.SetValue(THICKNESS, elementThickness); +} + +void ShellCrossSection::GetLaminaeOrientation(Vector & rOrientation_Vector) +{ + if(mStack.size() != rOrientation_Vector.size()) + { + rOrientation_Vector.resize(mStack.size(), false); + } + unsigned int counter = 0; + for(PlyCollection::iterator ply_it = mStack.begin(); ply_it != mStack.end(); ++ply_it) + { + Ply& iPly = *ply_it; + rOrientation_Vector[counter] = iPly.GetOrientationAngle() / 180.0*KRATOS_M_PI; + counter++; + } +} + +void ShellCrossSection::GetLaminaeStrengths(std::vector & rLaminae_Strengths, Properties& rProps) +{ + // ascertain how many plies there are + unsigned int plies = (rProps)[SHELL_ORTHOTROPIC_LAYERS].size1(); + + // figure out the format of material properties based on it's width + int myFormat = (rProps)[SHELL_ORTHOTROPIC_LAYERS].size2(); + int offset = 0; + if(myFormat == 16) + { + offset = 9; + } + + // Loop over all plies + for(unsigned int currentPly = 0; currentPly < plies; currentPly++) + { + // Parse orthotropic lamina strengths + // + // Considers (T)ension, (C)ompression and (S)hear strengths along + // local (1,2,3) lamina material coordinates. + + // Plane stress assumption: T3 and C3 are neglected. + // Input arranged as: T1, C1, T2, C2, S12, S13, S23 + + + // Store results sequentially, row by row + // T1 + rLaminae_Strengths[currentPly](0, 0) = + (rProps)[SHELL_ORTHOTROPIC_LAYERS](currentPly, offset); + + // C1 + rLaminae_Strengths[currentPly](0, 1) = + (rProps)[SHELL_ORTHOTROPIC_LAYERS](currentPly, offset + 1); + + // T2 + rLaminae_Strengths[currentPly](0, 2) = + (rProps)[SHELL_ORTHOTROPIC_LAYERS](currentPly, offset + 2); + + // C2 + rLaminae_Strengths[currentPly](1, 0) = + (rProps)[SHELL_ORTHOTROPIC_LAYERS](currentPly, offset + 3); + + // S12 + rLaminae_Strengths[currentPly](1, 1) = + (rProps)[SHELL_ORTHOTROPIC_LAYERS](currentPly, offset + 4); + + // S13 + rLaminae_Strengths[currentPly](1, 2) = + (rProps)[SHELL_ORTHOTROPIC_LAYERS](currentPly, offset + 5); + + // S23 + rLaminae_Strengths[currentPly](2, 0) = + (rProps)[SHELL_ORTHOTROPIC_LAYERS](currentPly, offset + 6); + + // Check all values are positive + for(size_t i = 0; i < 3; i++) + { + for(size_t j = 0; j < 3; j++) + { + if(rLaminae_Strengths[currentPly](i, j) < 0.0) + { + KRATOS_THROW_ERROR(std::logic_error, "A negative lamina strength has been defined. All lamina strengths must be positive.", "") + } + } + } + } +} + +void ShellCrossSection::InitializeParameters(SectionParameters& rValues, ConstitutiveLaw::Parameters& rMaterialValues, GeneralVariables& rVariables) { // share common data between section and materials @@ -891,10 +1063,11 @@ void ShellCrossSection::UpdateIntegrationPointParameters(IntegrationPoint& rPoin } void ShellCrossSection::CalculateIntegrationPointResponse(IntegrationPoint& rPoint, - ConstitutiveLaw::Parameters& rMaterialValues, - Parameters& rValues, - GeneralVariables& rVariables, - const ConstitutiveLaw::StressMeasure& rStressMeasure) + ConstitutiveLaw::Parameters& rMaterialValues, + SectionParameters& rValues, + GeneralVariables& rVariables, + const ConstitutiveLaw::StressMeasure& rStressMeasure, + const unsigned int& plyNumber) { // get some data/references... @@ -1082,8 +1255,26 @@ void ShellCrossSection::CalculateIntegrationPointResponse(IntegrationPoint& rPoi if(mBehavior == Thick) { // here the transverse shear is treated elastically - D(6,6) += h * cs * ce * rVariables.GYZ; - D(7,7) += h * cs * ce * rVariables.GXZ; + D(6, 6) += h * cs * ce * rVariables.GYZ; + D(7, 7) += h * cs * ce * rVariables.GXZ; + } + + if(mStorePlyConstitutiveMatrices) + { + for(unsigned int i = 0; i < 3; i++) + { + for(unsigned int j = 0; j < 3; j++) + { + mPlyConstitutiveMatrices[plyNumber](i, j) = 1.0*C(i, j); + } + } + if(mBehavior == Thick) + { + //mDSG_shear_stabilization = 1.0; + // include transverse moduli and add in shear stabilization + mPlyConstitutiveMatrices[plyNumber](6, 6) = cs * ce * rVariables.GYZ *mDSG_shear_stabilization; + mPlyConstitutiveMatrices[plyNumber](7, 7) = cs * ce * rVariables.GXZ *mDSG_shear_stabilization; + } } } else // full 3D case @@ -1268,5 +1459,31 @@ void ShellCrossSection::PrivateCopy(const ShellCrossSection & other) mOOP_CondensedStrains_converged = other.mOOP_CondensedStrains_converged; } } +void ShellCrossSection::Ply::RecoverOrthotropicProperties(const unsigned int currentPly) +{ + // Composite mechanical properties material definition + // + // Arranged as: (thickness), (RZangle), density, E1, E2, Poisson_12, G12, G13, G23 + + mpProperties->SetValue(DENSITY, + (*mpProperties)[SHELL_ORTHOTROPIC_LAYERS](currentPly, 2)); //DENSITY + + mpProperties->SetValue(YOUNG_MODULUS_X, + (*mpProperties)[SHELL_ORTHOTROPIC_LAYERS](currentPly, 3)); //E1 + + mpProperties->SetValue(YOUNG_MODULUS_Y, + (*mpProperties)[SHELL_ORTHOTROPIC_LAYERS](currentPly, 4)); //E2 + + mpProperties->SetValue(POISSON_RATIO_XY, + (*mpProperties)[SHELL_ORTHOTROPIC_LAYERS](currentPly, 5)); //Nu_12 + + mpProperties->SetValue(SHEAR_MODULUS_XY, + (*mpProperties)[SHELL_ORTHOTROPIC_LAYERS](currentPly, 6)); //G12 + + mpProperties->SetValue(SHEAR_MODULUS_XZ, + (*mpProperties)[SHELL_ORTHOTROPIC_LAYERS](currentPly, 7)); //G13 + mpProperties->SetValue(SHEAR_MODULUS_YZ, + (*mpProperties)[SHELL_ORTHOTROPIC_LAYERS](currentPly, 8)); //G23 } +} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/custom_utilities/shell_cross_section.hpp b/applications/StructuralMechanicsApplication/custom_utilities/shell_cross_section.hpp index c1cc1c7673c4..55a1ee322e23 100644 --- a/applications/StructuralMechanicsApplication/custom_utilities/shell_cross_section.hpp +++ b/applications/StructuralMechanicsApplication/custom_utilities/shell_cross_section.hpp @@ -82,7 +82,26 @@ class ShellCrossSection : public Flags std::vector< ConstitutiveLaw::StrainMeasure > mStrainMeasures; }; - class Parameters + + /** \brief SectionParameters + * + * SectionParameters is an accessibility class for shells using the + * ShellCrossSection class. It allows one to set and get vectors and matrices + * associated with the shell cross section, such as strains, stresses and the + * constitutive matrix. + * + * An example application is taken from shell_thick_3D4N.cpp, before it's + * stiffness matrix gauss loop is entered: + * + * ShellCrossSection::SectionParameters parameters(geom, props, rCurrentProcessInfo); + * parameters.SetGeneralizedStrainVector( generalizedStrains ); + * parameters.SetGeneralizedStressVector( generalizedStresses ); + * parameters.SetConstitutiveMatrix( D ); + * Flags& options = parameters.GetOptions(); + * options.Set(ConstitutiveLaw::COMPUTE_STRESS, RHSrequired); + * options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, LHSrequired); + */ + class SectionParameters { private: @@ -101,7 +120,7 @@ class ShellCrossSection : public Flags public: - Parameters() + SectionParameters() : mpGeneralizedStrainVector(NULL) , mpGeneralizedStressVector(NULL) , mpConstitutiveMatrix(NULL) @@ -112,7 +131,7 @@ class ShellCrossSection : public Flags , mpElementGeometry(NULL) {} - Parameters (const GeometryType& rElementGeometry, + SectionParameters (const GeometryType& rElementGeometry, const Properties& rMaterialProperties, const ProcessInfo& rCurrentProcessInfo) : mpGeneralizedStrainVector(NULL) @@ -125,7 +144,7 @@ class ShellCrossSection : public Flags , mpElementGeometry(&rElementGeometry) {} - Parameters (const Parameters & rNewParameters) + SectionParameters (const SectionParameters & rNewParameters) : mOptions(rNewParameters.mOptions) , mpGeneralizedStrainVector(rNewParameters.mpGeneralizedStrainVector) , mpGeneralizedStressVector(rNewParameters.mpGeneralizedStressVector) @@ -467,6 +486,8 @@ class ShellCrossSection : public Flags mOrientationAngle += 360.0; } + void RecoverOrthotropicProperties(const unsigned int currentPly); + inline const IntegrationPointCollection& GetIntegrationPoints()const { return mIntegrationPoints; @@ -891,7 +912,7 @@ class ShellCrossSection : public Flags * @param rStressMeasure the required stress measure * @see Parameters */ - virtual void CalculateSectionResponse(Parameters& rValues, const ConstitutiveLaw::StressMeasure& rStressMeasure); + virtual void CalculateSectionResponse(SectionParameters& rValues, const ConstitutiveLaw::StressMeasure& rStressMeasure); /** * Updates the section response, called by the element in FinalizeSolutionStep. @@ -899,7 +920,7 @@ class ShellCrossSection : public Flags * @param rStressMeasure the required stress measure * @see Parameters */ - virtual void FinalizeSectionResponse(Parameters& rValues, const ConstitutiveLaw::StressMeasure& rStressMeasure); + virtual void FinalizeSectionResponse(SectionParameters& rValues, const ConstitutiveLaw::StressMeasure& rStressMeasure); /** * This can be used in order to reset all internal variables of the @@ -1094,12 +1115,58 @@ class ShellCrossSection : public Flags */ inline void SetOffset(double offset) { - if((mOffset != offset) && (!mEditingStack)) - { - for(PlyCollection::iterator it = mStack.begin(); it != mStack.end(); ++it) - (*it).SetLocation((*it).GetLocation() + offset - mOffset); - mOffset = offset; - } + if ((mOffset != offset) && (!mEditingStack)) + { + for (PlyCollection::iterator it = mStack.begin(); it != mStack.end(); ++it) + (*it).SetLocation((*it).GetLocation() + offset - mOffset); + mOffset = offset; + } + } + + /** + * Stores the thicknesses of plies of this cross section. + */ + void GetPlyThicknesses(Vector& rply_thicknesses) + { + int counter = 0; + for (PlyCollection::const_iterator it = mStack.begin(); it != mStack.end(); ++it) + { + const Ply& iPly = *it; + rply_thicknesses[counter] = iPly.GetThickness(); + ++counter; + } + } + + /** + * Setup to get the integrated constitutive matrices for each ply + */ + void SetupGetPlyConstitutiveMatrices(const double shear_stabilization = 1.0) + { + mStorePlyConstitutiveMatrices = true; + mPlyConstitutiveMatrices = std::vector(this->NumberOfPlies()); + + for (unsigned int ply = 0; ply < this->NumberOfPlies(); ++ply) + { + if (mBehavior == Thick) + { + mPlyConstitutiveMatrices[ply].resize(8, 8, false); + } + else + { + mPlyConstitutiveMatrices[ply].resize(6, 6, false); + } + + mPlyConstitutiveMatrices[ply].clear(); + } + mDSG_shear_stabilization = shear_stabilization; + } + + /** + * Get the integrated constitutive matrices for each ply + */ + Matrix GetPlyConstitutiveMatrix(const unsigned int ply_number) + { + return mPlyConstitutiveMatrices[ply_number]; } /** @@ -1221,7 +1288,27 @@ class ShellCrossSection : public Flags { return mDrillingPenalty; } - + + /** + * Checks if the shell is an orthotropic material + * @return the true/false + */ + bool CheckIsOrthotropic(const Properties& rProps); + + /** + * Parses the shell orthotropic material data from properties + */ + void ParseOrthotropicPropertyMatrix(Properties& rProps, Element* myElement); + + /** + * Get orientation of laminae + */ + void GetLaminaeOrientation(Vector& rOrientation_Vector); + + /** + * Get strengths of laminae + */ + void GetLaminaeStrengths(std::vector& rLamina_Strengths, Properties& rProps); ///@} private: @@ -1229,16 +1316,17 @@ class ShellCrossSection : public Flags ///@name Private Methods ///@{ - void InitializeParameters(Parameters& rValues, ConstitutiveLaw::Parameters& rMaterialValues, GeneralVariables& rVariables); + void InitializeParameters(SectionParameters& rValues, ConstitutiveLaw::Parameters& rMaterialValues, GeneralVariables& rVariables); void UpdateIntegrationPointParameters(IntegrationPoint& rPoint, ConstitutiveLaw::Parameters& rMaterialValues, GeneralVariables& rVariables); void CalculateIntegrationPointResponse(IntegrationPoint& rPoint, - ConstitutiveLaw::Parameters& rMaterialValues, - Parameters& rValues, - GeneralVariables& rVariables, - const ConstitutiveLaw::StressMeasure& rStressMeasure); - + ConstitutiveLaw::Parameters& rMaterialValues, + SectionParameters& rValues, + GeneralVariables& rVariables, + const ConstitutiveLaw::StressMeasure& rStressMeasure, + const unsigned int& plyNumber); + /** * Creates a deep copy of this cross section. * Note: all constitutive laws are properly cloned. @@ -1272,7 +1360,10 @@ class ShellCrossSection : public Flags bool mNeedsOOPCondensation; Vector mOOP_CondensedStrains; Vector mOOP_CondensedStrains_converged; - + bool mStorePlyConstitutiveMatrices = false; + std::vector mPlyConstitutiveMatrices; + double mDSG_shear_stabilization; + ///@} ///@name Serialization @@ -1342,4 +1433,4 @@ inline std::ostream & operator << (std::ostream & rOStream, const ShellCrossSect } -#endif // SHELL_CROSS_SECTION_H_INCLUDED +#endif // SHELL_CROSS_SECTION_H_INCLUDED \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_implicit_dynamic_solver.py b/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_implicit_dynamic_solver.py index fb1bdfc6e4f3..8b27b90c0efc 100644 --- a/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_implicit_dynamic_solver.py +++ b/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_implicit_dynamic_solver.py @@ -88,6 +88,14 @@ def _create_solution_scheme(self): else: raise Exception("Unsupported scheme_type: " + scheme_type) return mechanical_scheme + + def get_builder_and_solver(self): + if self.settings["multi_point_constraints_used"].GetBool(): + builder_and_solver = KratosMultiphysics.StructuralMechanicsApplication.ResidualBasedBlockBuilderAndSolverWithMpc(self.get_linear_solver()) + else: + builder_and_solver = super(ImplicitMechanicalSolver,self).get_builder_and_solver() + + return builder_and_solver def _create_mechanical_solver(self): computing_model_part = self.GetComputingModelPart() diff --git a/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_solver.py b/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_solver.py index a4f22adbd570..67fcb974ca56 100755 --- a/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_solver.py +++ b/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_solver.py @@ -65,6 +65,7 @@ def __init__(self, main_model_part, custom_settings): "block_builder": true, "clear_storage": false, "move_mesh_flag": true, + "multi_point_constraints_used": false, "convergence_criterion": "Residual_criterion", "displacement_relative_tolerance": 1.0e-4, "displacement_absolute_tolerance": 1.0e-9, diff --git a/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_static_solver.py b/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_static_solver.py index 6de8778605ec..b36feb372b37 100644 --- a/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_static_solver.py +++ b/applications/StructuralMechanicsApplication/python_scripts/structural_mechanics_static_solver.py @@ -96,6 +96,14 @@ def _update_arc_length_point_load(self, lambda_value): print("POINT_LOAD_Y: ", force_y) print("POINT_LOAD_Z: ", force_z) print("*********************** ") + + def get_builder_and_solver(self): + if self.settings["multi_point_constraints_used"].GetBool(): + builder_and_solver = KratosMultiphysics.StructuralMechanicsApplication.ResidualBasedBlockBuilderAndSolverWithMpc(self.get_linear_solver()) + else: + builder_and_solver = super(StaticMechanicalSolver,self).get_builder_and_solver() + + return builder_and_solver def _create_mechanical_solver(self): if(self.settings["line_search"].GetBool()): diff --git a/applications/StructuralMechanicsApplication/structural_mechanics_application.cpp b/applications/StructuralMechanicsApplication/structural_mechanics_application.cpp index 53d5e786e662..5eb0c4ddd502 100644 --- a/applications/StructuralMechanicsApplication/structural_mechanics_application.cpp +++ b/applications/StructuralMechanicsApplication/structural_mechanics_application.cpp @@ -64,8 +64,10 @@ KratosStructuralMechanicsApplication::KratosStructuralMechanicsApplication(): mIsotropicShellElement3D3N( 0, Element::GeometryType::Pointer( new Triangle3D3 >( Element::GeometryType::PointsArrayType( 3 ) ) ) ), mShellThickElement3D4N( 0, Element::GeometryType::Pointer( new Quadrilateral3D4 >( Element::GeometryType::PointsArrayType( 4 ) ) ), false ), mShellThickCorotationalElement3D4N( 0, Element::GeometryType::Pointer( new Quadrilateral3D4 >( Element::GeometryType::PointsArrayType( 4 ) ) ), true ), + mShellThinCorotationalElement3D4N(0, Element::GeometryType::Pointer(new Quadrilateral3D4 >(Element::GeometryType::PointsArrayType(4))), true), mShellThinElement3D3N( 0, Element::GeometryType::Pointer( new Triangle3D3 >( Element::GeometryType::PointsArrayType( 3 ) ) ), false ), mShellThinCorotationalElement3D3N( 0, Element::GeometryType::Pointer( new Triangle3D3 >( Element::GeometryType::PointsArrayType( 3 ) ) ), true ), + mShellThickCorotationalElement3D3N(0, Element::GeometryType::Pointer(new Triangle3D3 >(Element::GeometryType::PointsArrayType(3))), true), // Adding the membrane element mMembraneElement3D3N( 0, Element::GeometryType::Pointer( new Triangle3D3 >( Element::GeometryType::PointsArrayType( 3 ) ) ) ), mMembraneElement3D4N( 0, Element::GeometryType::Pointer( new Quadrilateral3D4 >( Element::GeometryType::PointsArrayType( 4 ) ) ) ), @@ -180,6 +182,10 @@ void KratosStructuralMechanicsApplication::Register() KRATOS_REGISTER_VARIABLE( MEAN_RADIUS ) KRATOS_REGISTER_VARIABLE( SECTION_SIDES ) KRATOS_REGISTER_VARIABLE( GEOMETRIC_STIFFNESS ) + KRATOS_REGISTER_VARIABLE(LOCAL_AXIS_VECTOR_1) + KRATOS_REGISTER_VARIABLE(LOCAL_ELEMENT_ORIENTATION) + KRATOS_REGISTER_VARIABLE(ORTHOTROPIC_ORIENTATION_ASSIGNMENT) + KRATOS_REGISTER_VARIABLE(ORTHOTROPIC_FIBER_ORIENTATION_1) // Truss generalized variables KRATOS_REGISTER_VARIABLE(TRUSS_PRESTRESS_PK2) @@ -204,6 +210,30 @@ void KratosStructuralMechanicsApplication::Register() KRATOS_REGISTER_VARIABLE(SHELL_CURVATURE_GLOBAL) KRATOS_REGISTER_VARIABLE( SHELL_MOMENT ) KRATOS_REGISTER_VARIABLE( SHELL_MOMENT_GLOBAL ) + KRATOS_REGISTER_VARIABLE( SHELL_STRESS_TOP_SURFACE) + KRATOS_REGISTER_VARIABLE( SHELL_STRESS_TOP_SURFACE_GLOBAL) + KRATOS_REGISTER_VARIABLE( SHELL_STRESS_MIDDLE_SURFACE) + KRATOS_REGISTER_VARIABLE( SHELL_STRESS_MIDDLE_SURFACE_GLOBAL) + KRATOS_REGISTER_VARIABLE( SHELL_STRESS_BOTTOM_SURFACE) + KRATOS_REGISTER_VARIABLE( SHELL_STRESS_BOTTOM_SURFACE_GLOBAL) + KRATOS_REGISTER_VARIABLE(VON_MISES_STRESS_TOP_SURFACE) + KRATOS_REGISTER_VARIABLE(VON_MISES_STRESS_MIDDLE_SURFACE) + KRATOS_REGISTER_VARIABLE(VON_MISES_STRESS_BOTTOM_SURFACE) + KRATOS_REGISTER_VARIABLE(SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE) + KRATOS_REGISTER_VARIABLE(SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE) + KRATOS_REGISTER_VARIABLE(SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE_GLOBAL) + KRATOS_REGISTER_VARIABLE(SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE_GLOBAL) + KRATOS_REGISTER_VARIABLE(SHELL_ORTHOTROPIC_4PLY_THROUGH_THICKNESS) + KRATOS_REGISTER_VARIABLE(TSAI_WU_RESERVE_FACTOR) + KRATOS_REGISTER_VARIABLE( SHELL_ORTHOTROPIC_LAMINA_STRENGTHS) + + // Shell energies + KRATOS_REGISTER_VARIABLE(SHELL_ELEMENT_MEMBRANE_ENERGY) + KRATOS_REGISTER_VARIABLE(SHELL_ELEMENT_BENDING_ENERGY) + KRATOS_REGISTER_VARIABLE(SHELL_ELEMENT_SHEAR_ENERGY) + KRATOS_REGISTER_VARIABLE(SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION) + KRATOS_REGISTER_VARIABLE(SHELL_ELEMENT_BENDING_ENERGY_FRACTION) + KRATOS_REGISTER_VARIABLE(SHELL_ELEMENT_SHEAR_ENERGY_FRACTION) // Prestresse membrane generalized vairiables KRATOS_REGISTER_VARIABLE( MEMBRANE_PRESTRESS ) @@ -212,6 +242,7 @@ void KratosStructuralMechanicsApplication::Register() KRATOS_REGISTER_VARIABLE( SHELL_CROSS_SECTION ) KRATOS_REGISTER_VARIABLE( SHELL_CROSS_SECTION_OUTPUT_PLY_ID ) KRATOS_REGISTER_VARIABLE( SHELL_CROSS_SECTION_OUTPUT_PLY_LOCATION ) + KRATOS_REGISTER_VARIABLE(SHELL_ORTHOTROPIC_LAYERS) // Nodal stiffness KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS( NODAL_STIFFNESS ) @@ -276,7 +307,9 @@ void KratosStructuralMechanicsApplication::Register() KRATOS_REGISTER_ELEMENT( "IsotropicShellElement3D3N", mIsotropicShellElement3D3N ) KRATOS_REGISTER_ELEMENT( "ShellThickElement3D4N", mShellThickElement3D4N ) KRATOS_REGISTER_ELEMENT( "ShellThickElementCorotational3D4N", mShellThickCorotationalElement3D4N ) + KRATOS_REGISTER_ELEMENT("ShellThinElementCorotational3D4N", mShellThinCorotationalElement3D4N) KRATOS_REGISTER_ELEMENT( "ShellThinElement3D3N", mShellThinElement3D3N ) + KRATOS_REGISTER_ELEMENT("ShellThickElementCorotational3D3N", mShellThickCorotationalElement3D3N) KRATOS_REGISTER_ELEMENT( "ShellThinElementCorotational3D3N", mShellThinCorotationalElement3D3N ) // Register the membrane element @@ -383,6 +416,8 @@ void KratosStructuralMechanicsApplication::Register() // Torque moment condition KRATOS_REGISTER_CONDITION( "PointTorqueCondition3D1N", mPointTorqueCondition3D1N ); + // For MPC implementations + KRATOS_REGISTER_VARIABLE(MPC_DATA_CONTAINER) // Register linear elastics laws Serializer::Register( "LinearElastic3DLaw", mElasticIsotropic3D ); Serializer::Register( "LinearElasticPlaneStrain2DLaw", mLinearPlaneStrain ); @@ -390,7 +425,7 @@ void KratosStructuralMechanicsApplication::Register() Serializer::Register( "LinearElasticAxisym2DLaw", mAxisymElasticIsotropic); Serializer::Register( "HyperElastic3DLaw", mHyperElasticIsotropicNeoHookean3D); Serializer::Register( "HyperElasticPlaneStrain2DLaw", mHyperElasticIsotropicNeoHookeanPlaneStrain2D); - + Serializer::Register("LinearElasticOrthotropic2DLaw", mLinearElasticOrthotropic2DLaw); } } // namespace Kratos. diff --git a/applications/StructuralMechanicsApplication/structural_mechanics_application.h b/applications/StructuralMechanicsApplication/structural_mechanics_application.h index 3e3efa59d9aa..4d605d20d203 100644 --- a/applications/StructuralMechanicsApplication/structural_mechanics_application.h +++ b/applications/StructuralMechanicsApplication/structural_mechanics_application.h @@ -40,7 +40,9 @@ #include "custom_elements/membrane_element.hpp" #include "custom_elements/prestress_membrane_element.hpp" #include "custom_elements/shell_thick_element_3D4N.hpp" +#include "custom_elements/shell_thin_element_3D4N.hpp" #include "custom_elements/shell_thin_element_3D3N.hpp" +#include "custom_elements/shell_thick_element_3D3N.hpp" #include "custom_elements/nodal_concentrated_element.hpp" /* Adding the spring damper element */ @@ -74,10 +76,12 @@ #include "custom_constitutive/linear_plane_stress.h" #include "custom_constitutive/hyper_elastic_isotropic_neo_hookean_3d.h" #include "custom_constitutive/hyper_elastic_isotropic_neo_hookean_plane_strain_2d.h" +#include "custom_constitutive/linear_elastic_orthotropic_2D_law.hpp" /* UTILITIES */ // Cross sections #include "custom_utilities/shell_cross_section.hpp" +#include "custom_utilities/multipoint_constraint_data.hpp" namespace Kratos { @@ -251,8 +255,10 @@ class KratosStructuralMechanicsApplication : public KratosApplication const IsotropicShellElement mIsotropicShellElement3D3N; const ShellThickElement3D4N mShellThickElement3D4N; const ShellThickElement3D4N mShellThickCorotationalElement3D4N; + const ShellThinElement3D4N mShellThinCorotationalElement3D4N; const ShellThinElement3D3N mShellThinElement3D3N; const ShellThinElement3D3N mShellThinCorotationalElement3D3N; + const ShellThickElement3D3N mShellThickCorotationalElement3D3N; // Adding the membrane element const MembraneElement mMembraneElement3D3N; @@ -366,6 +372,7 @@ class KratosStructuralMechanicsApplication : public KratosApplication const LinearPlaneStress mLinearPlaneStress; const HyperElasticIsotropicNeoHookean3D mHyperElasticIsotropicNeoHookean3D; const HyperElasticIsotropicNeoHookeanPlaneStrain2D mHyperElasticIsotropicNeoHookeanPlaneStrain2D; + const LinearElasticOrthotropic2DLaw mLinearElasticOrthotropic2DLaw; ///@} ///@name Private Operators diff --git a/applications/StructuralMechanicsApplication/structural_mechanics_application_variables.cpp b/applications/StructuralMechanicsApplication/structural_mechanics_application_variables.cpp index 111168113cf6..2bbcf0383421 100644 --- a/applications/StructuralMechanicsApplication/structural_mechanics_application_variables.cpp +++ b/applications/StructuralMechanicsApplication/structural_mechanics_application_variables.cpp @@ -12,7 +12,8 @@ namespace Kratos { -typedef array_1d Vector3; + typedef array_1d Vector3; + typedef MpcData::Pointer MpcDataPointerType; // Generalized eigenvalue problem KRATOS_CREATE_VARIABLE( int, BUILD_LEVEL ) @@ -28,10 +29,14 @@ typedef array_1d Vector3; KRATOS_CREATE_VARIABLE( double, MEAN_RADIUS ) KRATOS_CREATE_VARIABLE( int, SECTION_SIDES ) KRATOS_CREATE_VARIABLE( Matrix , GEOMETRIC_STIFFNESS ) + KRATOS_CREATE_VARIABLE(Vector, LOCAL_AXIS_VECTOR_1) + KRATOS_CREATE_VARIABLE(Matrix, LOCAL_ELEMENT_ORIENTATION) + KRATOS_CREATE_VARIABLE(double, ORTHOTROPIC_ORIENTATION_ASSIGNMENT) + KRATOS_CREATE_VARIABLE(Vector, ORTHOTROPIC_FIBER_ORIENTATION_1) // Truss generalized variables - KRATOS_CREATE_VARIABLE(double, TRUSS_PRESTRESS_PK2) - KRATOS_CREATE_VARIABLE(bool, TRUSS_IS_CABLE) + KRATOS_CREATE_VARIABLE( double, TRUSS_PRESTRESS_PK2 ) + KRATOS_CREATE_VARIABLE( bool, TRUSS_IS_CABLE ) // Beam generalized variables KRATOS_CREATE_VARIABLE(double, AREA_EFFECTIVE_Y) @@ -51,14 +56,39 @@ typedef array_1d Vector3; KRATOS_CREATE_VARIABLE( Matrix, SHELL_FORCE_GLOBAL ) KRATOS_CREATE_VARIABLE( Matrix, SHELL_MOMENT ) KRATOS_CREATE_VARIABLE( Matrix, SHELL_MOMENT_GLOBAL ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_STRESS_TOP_SURFACE ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_STRESS_TOP_SURFACE_GLOBAL ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_STRESS_MIDDLE_SURFACE ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_STRESS_MIDDLE_SURFACE_GLOBAL ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_STRESS_BOTTOM_SURFACE ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_STRESS_BOTTOM_SURFACE_GLOBAL ) + KRATOS_CREATE_VARIABLE( double, VON_MISES_STRESS_TOP_SURFACE ) + KRATOS_CREATE_VARIABLE( double, VON_MISES_STRESS_MIDDLE_SURFACE ) + KRATOS_CREATE_VARIABLE( double, VON_MISES_STRESS_BOTTOM_SURFACE ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE_GLOBAL ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE_GLOBAL ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_ORTHOTROPIC_4PLY_THROUGH_THICKNESS ) + KRATOS_CREATE_VARIABLE( double, TSAI_WU_RESERVE_FACTOR ) + KRATOS_CREATE_VARIABLE( Matrix, SHELL_ORTHOTROPIC_LAMINA_STRENGTHS ) + + // Shell energies + KRATOS_CREATE_VARIABLE( double, SHELL_ELEMENT_MEMBRANE_ENERGY ) + KRATOS_CREATE_VARIABLE( double, SHELL_ELEMENT_BENDING_ENERGY ) + KRATOS_CREATE_VARIABLE( double, SHELL_ELEMENT_SHEAR_ENERGY ) + KRATOS_CREATE_VARIABLE( double, SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION ) + KRATOS_CREATE_VARIABLE( double, SHELL_ELEMENT_BENDING_ENERGY_FRACTION ) + KRATOS_CREATE_VARIABLE( double, SHELL_ELEMENT_SHEAR_ENERGY_FRACTION ) // Membrane variables KRATOS_CREATE_VARIABLE(Vector, MEMBRANE_PRESTRESS) // Cross section KRATOS_CREATE_VARIABLE( ShellCrossSection::Pointer, SHELL_CROSS_SECTION ) - KRATOS_CREATE_VARIABLE( int, SHELL_CROSS_SECTION_OUTPUT_PLY_ID ) - KRATOS_CREATE_VARIABLE( double, SHELL_CROSS_SECTION_OUTPUT_PLY_LOCATION ) + KRATOS_CREATE_VARIABLE( int, SHELL_CROSS_SECTION_OUTPUT_PLY_ID ) + KRATOS_CREATE_VARIABLE( double, SHELL_CROSS_SECTION_OUTPUT_PLY_LOCATION ) + KRATOS_CREATE_VARIABLE(Matrix, SHELL_ORTHOTROPIC_LAYERS) // Nodal stiffness for the nodal concentrated element KRATOS_CREATE_3D_VARIABLE_WITH_COMPONENTS( NODAL_STIFFNESS ) @@ -109,4 +139,6 @@ typedef array_1d Vector3; KRATOS_CREATE_VARIABLE(Vector, SURFACE_LOADS_VECTOR ) KRATOS_CREATE_VARIABLE(Vector, POSITIVE_FACE_PRESSURES_VECTOR ) KRATOS_CREATE_VARIABLE(Vector, NEGATIVE_FACE_PRESSURES_VECTOR ) + + KRATOS_CREATE_VARIABLE(MpcDataPointerVectorType, MPC_DATA_CONTAINER) } diff --git a/applications/StructuralMechanicsApplication/structural_mechanics_application_variables.h b/applications/StructuralMechanicsApplication/structural_mechanics_application_variables.h index 4926eaf0e4ba..1103cf78e08c 100644 --- a/applications/StructuralMechanicsApplication/structural_mechanics_application_variables.h +++ b/applications/StructuralMechanicsApplication/structural_mechanics_application_variables.h @@ -9,10 +9,12 @@ // Main authors: Riccardo Rossi // -#if !defined(KRATOS_STRUCTURAL_MECHANICS_APPLICATION_VARIABLES_H_INCLUDED ) -#define KRATOS_STRUCTURAL_MECHANICS_APPLICATION_VARIABLES_H_INCLUDED +#if !defined(KRATOS_STRUCTURAL_MECHANICS_APPLICATION_VARIABLES_H_INCLUDED) +#define KRATOS_STRUCTURAL_MECHANICS_APPLICATION_VARIABLES_H_INCLUDED // System includes +#include +#include // External includes @@ -23,10 +25,14 @@ //#include "structural_mechanics_application.h" #include "includes/mat_variables.h" #include "custom_utilities/shell_cross_section.hpp" +#include "custom_utilities/multipoint_constraint_data.hpp" namespace Kratos { - typedef array_1d Vector3; + typedef array_1d Vector3; + typedef MpcData::Pointer MpcDataPointerType; + typedef std::vector* MpcDataPointerVectorType; + // Generalized eigenvalue problem KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, int, BUILD_LEVEL ) @@ -42,19 +48,24 @@ namespace Kratos KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, MEAN_RADIUS ) KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, int, SECTION_SIDES ) KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix , GEOMETRIC_STIFFNESS ) + KRATOS_DEFINE_APPLICATION_VARIABLE(STRUCTURAL_MECHANICS_APPLICATION,Vector, LOCAL_AXIS_VECTOR_1) + KRATOS_DEFINE_APPLICATION_VARIABLE(STRUCTURAL_MECHANICS_APPLICATION,Matrix, LOCAL_ELEMENT_ORIENTATION) + KRATOS_DEFINE_APPLICATION_VARIABLE(STRUCTURAL_MECHANICS_APPLICATION,double, ORTHOTROPIC_ORIENTATION_ASSIGNMENT) + KRATOS_DEFINE_APPLICATION_VARIABLE(STRUCTURAL_MECHANICS_APPLICATION,Vector, ORTHOTROPIC_FIBER_ORIENTATION_1) // Truss generalized variables - KRATOS_DEFINE_VARIABLE(double, TRUSS_PRESTRESS_PK2) - KRATOS_DEFINE_VARIABLE(bool, TRUSS_IS_CABLE) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION,double, TRUSS_PRESTRESS_PK2) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION,bool, TRUSS_IS_CABLE) + // Beam generalized variables - KRATOS_DEFINE_VARIABLE(double, AREA_EFFECTIVE_Y) - KRATOS_DEFINE_VARIABLE(double, AREA_EFFECTIVE_Z) - KRATOS_DEFINE_VARIABLE(double, INERTIA_ROT_Y) - KRATOS_DEFINE_VARIABLE(double, INERTIA_ROT_Z) - KRATOS_DEFINE_VARIABLE(Vector, LOCAL_AXES_VECTOR) - KRATOS_DEFINE_VARIABLE(bool, LUMPED_MASS_MATRIX) - KRATOS_DEFINE_VARIABLE(Vector, LOCAL_INERTIA_VECTOR) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION,double, AREA_EFFECTIVE_Y) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION,double, AREA_EFFECTIVE_Z) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION,double, INERTIA_ROT_Y) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION,double, INERTIA_ROT_Z) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION,Vector, LOCAL_AXES_VECTOR) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION,bool, LUMPED_MASS_MATRIX) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION,Vector, LOCAL_INERTIA_VECTOR) // Shell generalized variables KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_STRAIN ) @@ -65,14 +76,38 @@ namespace Kratos KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_FORCE_GLOBAL ) KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_MOMENT ) KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_MOMENT_GLOBAL ) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_STRESS_TOP_SURFACE) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_STRESS_TOP_SURFACE_GLOBAL) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_STRESS_MIDDLE_SURFACE) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_STRESS_MIDDLE_SURFACE_GLOBAL) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_STRESS_BOTTOM_SURFACE) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_STRESS_BOTTOM_SURFACE_GLOBAL) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, VON_MISES_STRESS_TOP_SURFACE) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, VON_MISES_STRESS_MIDDLE_SURFACE) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, VON_MISES_STRESS_BOTTOM_SURFACE) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE_GLOBAL) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE_GLOBAL) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_ORTHOTROPIC_4PLY_THROUGH_THICKNESS) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, TSAI_WU_RESERVE_FACTOR) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_ORTHOTROPIC_LAMINA_STRENGTHS) // Membrane generalized variables KRATOS_DEFINE_APPLICATION_VARIABLE(STRUCTURAL_MECHANICS_APPLICATION, Vector, MEMBRANE_PRESTRESS) + // Shell energies + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, SHELL_ELEMENT_MEMBRANE_ENERGY) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, SHELL_ELEMENT_BENDING_ENERGY) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, SHELL_ELEMENT_SHEAR_ENERGY) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, SHELL_ELEMENT_MEMBRANE_ENERGY_FRACTION) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, SHELL_ELEMENT_BENDING_ENERGY_FRACTION) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, SHELL_ELEMENT_SHEAR_ENERGY_FRACTION) // Cross section KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, ShellCrossSection::Pointer, SHELL_CROSS_SECTION ) - KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, int, SHELL_CROSS_SECTION_OUTPUT_PLY_ID ) - KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, SHELL_CROSS_SECTION_OUTPUT_PLY_LOCATION ) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, int, SHELL_CROSS_SECTION_OUTPUT_PLY_ID ) + KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, double, SHELL_CROSS_SECTION_OUTPUT_PLY_LOCATION ) + KRATOS_DEFINE_APPLICATION_VARIABLE(STRUCTURAL_MECHANICS_APPLICATION, Matrix, SHELL_ORTHOTROPIC_LAYERS) // Nodal stiffness for the nodal concentrated element KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(STRUCTURAL_MECHANICS_APPLICATION, NODAL_STIFFNESS ) @@ -123,6 +158,9 @@ namespace Kratos KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Vector, SURFACE_LOADS_VECTOR ) KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Vector, POSITIVE_FACE_PRESSURES_VECTOR ) KRATOS_DEFINE_APPLICATION_VARIABLE( STRUCTURAL_MECHANICS_APPLICATION, Vector, NEGATIVE_FACE_PRESSURES_VECTOR ) + + // For MPC implementations + KRATOS_DEFINE_VARIABLE(MpcDataPointerVectorType, MPC_DATA_CONTAINER) } -#endif /* KRATOS_STRUCTURAL_MECHANICS_APPLICATION_VARIABLES_H_INCLUDED */ +#endif /* KRATOS_STRUCTURAL_MECHANICS_APPLICATION_VARIABLES_H_INCLUDED */ diff --git a/applications/StructuralMechanicsApplication/tests/NightlyTests.py b/applications/StructuralMechanicsApplication/tests/NightlyTests.py index 121a1d3f3068..2a59403d540b 100644 --- a/applications/StructuralMechanicsApplication/tests/NightlyTests.py +++ b/applications/StructuralMechanicsApplication/tests/NightlyTests.py @@ -60,3 +60,27 @@ class ShellT3ThinDrillingRollUpTests(StructuralMechanichsTestFactory): class ShellT3IsotropicScordelisTests(StructuralMechanichsTestFactory): file_name = "shell_test/Shell_T3_Isotropic_Scordelis_test" + +class ShellT3ThickLinearStaticTests(StructuralMechanichsTestFactory): + file_name = "shell_test/Shell_T3_Thick_linear_static_test" + +class ShellT3ThickNonLinearStaticTests(StructuralMechanichsTestFactory): + file_name = "shell_test/Shell_T3_Thick_nonlinear_static_test" + +class ShellT3ThickLinearDynamicTests(StructuralMechanichsTestFactory): + file_name = "shell_test/Shell_T3_Thick_linear_dynamic_test" + +class ShellT3ThickNonLinearDynamicTests(StructuralMechanichsTestFactory): + file_name = "shell_test/Shell_T3_Thick_nonlinear_dynamic_test" + +class ShellQ4ThinLinearStaticTests(StructuralMechanichsTestFactory): + file_name = "shell_test/Shell_Q4_Thin_linear_static_test" + +class ShellQ4ThinNonLinearStaticTests(StructuralMechanichsTestFactory): + file_name = "shell_test/Shell_Q4_Thin_nonlinear_static_test" + +class ShellQ4ThinLinearDynamicTests(StructuralMechanichsTestFactory): + file_name = "shell_test/Shell_Q4_Thin_linear_dynamic_test" + +class ShellQ4ThinNonLinearDynamicTests(StructuralMechanichsTestFactory): + file_name = "shell_test/Shell_Q4_Thin_nonlinear_dynamic_test" diff --git a/applications/StructuralMechanicsApplication/tests/SmallTests.py b/applications/StructuralMechanicsApplication/tests/SmallTests.py index 7ed946594de7..7d78917d24cc 100644 --- a/applications/StructuralMechanicsApplication/tests/SmallTests.py +++ b/applications/StructuralMechanicsApplication/tests/SmallTests.py @@ -148,4 +148,23 @@ class MembraneQ4PointLoadTests(StructuralMechanichsTestFactory): file_name = "membrane_test/Membrane_Q4_PointLoad_test" class MembraneQ4TrussPointLoadTests(StructuralMechanichsTestFactory): - file_name = "membrane_test/Membrane_Q4_Truss_PointLoad_test" + file_name = "membrane_test/Membrane_Q4_Truss_PointLoad_test" + +class Simple3D2NTrussTest(StructuralMechanichsTestFactory): + file_name = "truss_test/nonlinear_3D2NTruss_test" + +class Simple3D2NTrussLinearTest(StructuralMechanichsTestFactory): + file_name = "truss_test/linear_3D2NTruss_test" + +class Simple3D2NTrussDynamicTest(StructuralMechanichsTestFactory): + file_name = "truss_test/dynamic_3D2NTruss_test" + +class Simple3D2NBeamCrTest(StructuralMechanichsTestFactory): + file_name = "beam_test/nonlinear_3D2NBeamCr_test" + +class Simple3D2NBeamCrLinearTest(StructuralMechanichsTestFactory): + file_name = "beam_test/linear_3D2NBeamCr_test" + +class Simple3D2NBeamCrDynamicTest(StructuralMechanichsTestFactory): + file_name = "beam_test/dynamic_3D2NBeamCr_test" + diff --git a/applications/StructuralMechanicsApplication/tests/beam_test/dynamic_3D2NBeamCr_test.mdpa b/applications/StructuralMechanicsApplication/tests/beam_test/dynamic_3D2NBeamCr_test.mdpa new file mode 100644 index 000000000000..4af409117176 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/beam_test/dynamic_3D2NBeamCr_test.mdpa @@ -0,0 +1,122 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Properties 1 + CROSS_AREA 0.01 + DENSITY 7850 + YOUNG_MODULUS 210000000000 + POISSON_RATIO 0.30000 + LUMPED_MASS_MATRIX false + LOCAL_INERTIA_VECTOR [3] (0.00001,0.00001,0.00001) + RAYLEIGH_ALPHA 49.67 + RAYLEIGH_BETA 2.4e-5 +End Properties + +Begin Nodes + 1 0.00000 0.00000 0.00000 + 2 0.1000 0.00000 0.00000 + 3 0.2000 0.00000 0.00000 + 4 0.30000 0.00000 0.00000 + 5 0.4000 0.00000 0.00000 + 6 0.5000 0.00000 0.00000 + 7 0.60000 0.00000 0.00000 + 8 0.7000 0.00000 0.00000 + 9 0.8000 0.00000 0.00000 + 10 0.9000 0.00000 0.00000 + 11 1.0000 0.00000 0.00000 +End Nodes + + +Begin Elements CrBeamElement3D2N// GUI group identifier: structure + 1 1 1 2 + 2 1 2 3 + 3 1 3 4 + 4 1 4 5 + 5 1 5 6 + 6 1 6 7 + 7 1 7 8 + 8 1 8 9 + 9 1 9 10 + 10 1 10 11 +End Elements + +Begin Conditions PointLoadCondition3D1N// GUI group identifier: neumann +1 0 11 +End Conditions + +Begin SubModelPart Parts_structure // Group structure // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletXYZ // Group dirichletXYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_dirrot // Group dirrot // Subtree ROTATION + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_dirrotX // Group dirrot // Subtree ROTATION + Begin SubModelPartNodes + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletYZ // Group dirichletYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart PointLoad3D_neumann // Group neumann // Subtree PointLoad3D + Begin SubModelPartNodes + 11 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/beam_test/dynamic_3D2NBeamCr_test_parameters.json b/applications/StructuralMechanicsApplication/tests/beam_test/dynamic_3D2NBeamCr_test_parameters.json new file mode 100644 index 000000000000..ed4a8e5979e1 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/beam_test/dynamic_3D2NBeamCr_test_parameters.json @@ -0,0 +1,147 @@ +{ + "problem_data" : { + "problem_name" : "testnew", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 0.0004, + "start_time" : 0.0, + "end_time" : 0.04, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_implicit_dynamic_solver", + "echo_level" : 0, + "solution_type" : "Dynamic", + "time_integration_method" : "Implicit", + "scheme_type" : "Newmark", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "beam_test/dynamic_3D2NBeamCr_test" + }, + "line_search" : false, + "compute_reactions" : true, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 0.0001, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 100, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_structure"], + "processes_sub_model_part_list" : ["DISPLACEMENT_dirichletXYZ","DISPLACEMENT_dirichletYZ","ROTATION_dirrot","ROTATION_dirrotX","PointLoad3D_neumann"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletXYZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletYZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_dirrot", + "variable_name" : "ROTATION", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_dirrotX", + "variable_name" : "ROTATION", + "is_fixed_x" : false, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "process_factory", + "kratos_module" : "KratosMultiphysics", + "check" : "DirectorVectorNonZero direction", + "help" : "This process ", + "process_name" : "ApplyConstantVectorValueProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "PointLoad3D_neumann", + "variable_name" : "POINT_LOAD", + "modulus" : 100000, + "direction" : [0,-1,0] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Y"], + "input_file_name" : "beam_test/dynamic_3D2NBeamCr_test_results.json", + "model_part_name" : "PointLoad3D_neumann", + "time_frequency" : 0.0002 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Y"], + "output_file_name" : "beam_test/dynamic_3D2NBeamCr_test_results.json", + "model_part_name" : "PointLoad3D_neumann", + "time_frequency" : 0.0002 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/beam_test/dynamic_3D2NBeamCr_test_results.json b/applications/StructuralMechanicsApplication/tests/beam_test/dynamic_3D2NBeamCr_test_results.json new file mode 100644 index 000000000000..1bb2797e4d91 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/beam_test/dynamic_3D2NBeamCr_test_results.json @@ -0,0 +1,2 @@ +{"NODE_11": {"DISPLACEMENT_Y": [-0.00037161026415665177,-0.0015122417083899041,-0.0031943314105222294,-0.005173174894894688,-0.00752945898579751,-0.010467087665585207,-0.013920343926131158,-0.017343454546437095,-0.02031196749356486,-0.02287946775964935,-0.025196452330460313,-0.02719351379587654,-0.028571464250837963,-0.029038143927842704,-0.028691018217814557,-0.02783057064538904,-0.026547384238487095,-0.02475357620861635,-0.022387630221900455,-0.01961888217493166,-0.01680612164389495,-0.014162879961407021,-0.011679662480846278,-0.009346957505768463,-0.007305981960574806,-0.005798165331427257,-0.004967121270143025,-0.004742047943286894,-0.004996462405175594,-0.0057242251162315985,-0.0069869106501429905,-0.008772088134173985,-0.010915632977606034,-0.013194549103388561,-0.015488492323458497,-0.017769834593231237,-0.019976122263450233,-0.021953466364757996,-0.023525654447704564,-0.024608514410448885,-0.025226587994112405,-0.025409747524453342,-0.025127594349325603,-0.024342410400754223,-0.023090797103730656,-0.021496653721052857,-0.019695360198140145,-0.017765231901726002,-0.015756647106848695,-0.01375937623191128,-0.011911664867387322,-0.010342917423461412,-0.009118055589095158,-0.008251030200732564,-0.007762226376211888,-0.007695172873601058,-0.00807489335727633,-0.008867744678000956,-0.00999224570979339,-0.011367093963774751,-0.0129353233449145,-0.01463809264838585,-0.016383928035118275,-0.018058200415585715,-0.019561933289983024,-0.020834738785158572,-0.02183800362010172,-0.022527656519759784,-0.02285684717962388,-0.02280395684971109,-0.022388865576760487,-0.021658302650508048,-0.0206598162808171,-0.019436667651766187,-0.018045417355739585,-0.016566847552837088,-0.015092566726412572,-0.013701837815466023,-0.012453876847423453,-0.011399777542608663,-0.01059265652045202,-0.010079324781084384,-0.009883367897646192,-0.01000021667853827,-0.010408592887525433,-0.011082673532308303,-0.011990461917429293,-0.013083874209825467,-0.014297186690123392,-0.015558566724756522,-0.01680277380382126,-0.01797294953890864,-0.01901426893503615,-0.019872362535355206,-0.020501670909335443,-0.020874952598078603,-0.020983870328691756,-0.020832039667853453,-0.020430529994065413,-0.019800972408697062,-0.01898029555042362]}, +"TIME": [0.0004,0.0008,0.0012000000000000001,0.0016,0.002,0.0024000000000000002,0.0028000000000000004,0.0032000000000000006,0.0036000000000000008,0.004000000000000001,0.004400000000000001,0.004800000000000001,0.0052000000000000015,0.005600000000000002,0.006000000000000002,0.006400000000000002,0.006800000000000002,0.007200000000000002,0.007600000000000003,0.008000000000000002,0.008400000000000001,0.0088,0.0092,0.0096,0.009999999999999998,0.010399999999999998,0.010799999999999997,0.011199999999999996,0.011599999999999996,0.011999999999999995,0.012399999999999994,0.012799999999999994,0.013199999999999993,0.013599999999999992,0.013999999999999992,0.014399999999999991,0.01479999999999999,0.01519999999999999,0.015599999999999989,0.01599999999999999,0.01639999999999999,0.016799999999999992,0.017199999999999993,0.017599999999999994,0.017999999999999995,0.018399999999999996,0.018799999999999997,0.0192,0.0196,0.02,0.0204,0.020800000000000003,0.021200000000000004,0.021600000000000005,0.022000000000000006,0.022400000000000007,0.022800000000000008,0.02320000000000001,0.02360000000000001,0.02400000000000001,0.024400000000000012,0.024800000000000013,0.025200000000000014,0.025600000000000015,0.026000000000000016,0.026400000000000017,0.026800000000000018,0.02720000000000002,0.02760000000000002,0.02800000000000002,0.028400000000000022,0.028800000000000023,0.029200000000000025,0.029600000000000026,0.030000000000000027,0.030400000000000028,0.03080000000000003,0.03120000000000003,0.03160000000000003,0.03200000000000003,0.032400000000000026,0.032800000000000024,0.03320000000000002,0.03360000000000002,0.034000000000000016,0.034400000000000014,0.03480000000000001,0.03520000000000001,0.03560000000000001,0.036000000000000004,0.0364,0.0368,0.0372,0.037599999999999995,0.03799999999999999,0.03839999999999999,0.03879999999999999,0.039199999999999985,0.03959999999999998,0.03999999999999998,0.04039999999999998]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test.mdpa b/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test.mdpa new file mode 100644 index 000000000000..b509df59c305 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test.mdpa @@ -0,0 +1,138 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Properties 1 + CROSS_AREA 0.01 + DENSITY 7850 + YOUNG_MODULUS 210000000000 + POISSON_RATIO 0.30000 + LOCAL_INERTIA_VECTOR [3] (0.00001,0.00001,0.00001) +End Properties + +Begin Nodes + 1 0.00000 0.00000 0.00000 + 2 0.1000 0.00000 0.00000 + 3 0.200 0.00000 0.00000 + 4 0.30000 0.00000 0.00000 + 5 0.4000 0.00000 0.00000 + 6 0.500 0.00000 0.00000 + 7 0.60000 0.00000 0.00000 + 8 0.7000 0.00000 0.00000 + 9 0.800 0.00000 0.00000 + 10 0.900 0.00000 0.00000 + 11 1.000 0.00000 0.00000 +End Nodes + + +Begin Elements CrLinearBeamElement3D2N// GUI group identifier: structure + 1 1 1 2 + 2 1 2 3 + 3 1 3 4 + 4 1 4 5 + 5 1 5 6 + 6 1 6 7 + 7 1 7 8 + 8 1 8 9 + 9 1 9 10 + 10 1 10 11 +End Elements + +Begin Conditions PointLoadCondition3D1N// GUI group identifier: neumann +1 0 11 +End Conditions + +Begin SubModelPart Parts_structure // Group structure // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletXYZ // Group dirichletXYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_dirrot // Group dirrot // Subtree ROTATION + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_dirrotX // Group dirrot // Subtree ROTATION + Begin SubModelPartNodes + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletYZ // Group dirichletYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_allnodes // Group allnodes // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart PointLoad3D_neumann // Group neumann // Subtree PointLoad3D + Begin SubModelPartNodes + 11 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test_parameters.json b/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test_parameters.json new file mode 100644 index 000000000000..a2a916478367 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test_parameters.json @@ -0,0 +1,132 @@ +{ + "problem_data" : { + "problem_name" : "linear_3D2NBeamCr_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 1.1, + "start_time" : 0.0, + "end_time" : 1.0, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_static_solver", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "beam_test/linear_3D2NBeamCr_test" + }, + "line_search" : false, + "compute_reactions" : true, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-12, + "displacement_absolute_tolerance" : 1e-12, + "residual_relative_tolerance" : 1e-12, + "residual_absolute_tolerance" : 1e-12, + "max_iteration" : 100, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_structure"], + "processes_sub_model_part_list" : ["DISPLACEMENT_dirichletXYZ","DISPLACEMENT_dirichletYZ","ROTATION_dirrot","PointLoad3D_neumann","DISPLACEMENT_allnodes"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletXYZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletYZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_dirrot", + "variable_name" : "ROTATION", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "process_factory", + "kratos_module" : "KratosMultiphysics", + "check" : "DirectorVectorNonZero direction", + "help" : "This process ", + "process_name" : "ApplyConstantVectorValueProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "PointLoad3D_neumann", + "variable_name" : "POINT_LOAD", + "modulus" : 400000, + "direction" : [0,-1,0] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_X","DISPLACEMENT_Y","REACTION_Y","REACTION_X"], + "input_file_name" : "beam_test/linear_3D2NBeamCr_test_results.json", + "model_part_name" : "Structure", + "time_frequency" : 0.9 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_X","DISPLACEMENT_Y","REACTION_Y","REACTION_X"], + "output_file_name" : "beam_test/linear_3D2NBeamCr_test_results.json", + "model_part_name" : "Structure", + "time_frequency" : 0.9 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test_results.json b/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test_results.json new file mode 100644 index 000000000000..a71f27380b5e --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test_results.json @@ -0,0 +1,12 @@ +{"NODE_1": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [0], "REACTION_Y": [400000], "REACTION_X": [0]}, + "NODE_2": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.0009206349206354289], "REACTION_Y": [0], "REACTION_X": [0]}, + "NODE_3": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.0035555555555575043], "REACTION_Y": [0], "REACTION_X": [0]}, + "NODE_4": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.0077142857142899045], "REACTION_Y": [0], "REACTION_X": [0]}, + "NODE_5": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.01320634920635631], "REACTION_Y": [0], "REACTION_X": [0]}, + "NODE_6": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.01984126984128039], "REACTION_Y": [0], "REACTION_X": [0]}, + "NODE_7": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.027428571428585832], "REACTION_Y": [0], "REACTION_X": [0]}, + "NODE_8": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.035777777777796324], "REACTION_Y": [0], "REACTION_X": [0]}, + "NODE_9": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.044698412698435594], "REACTION_Y": [0], "REACTION_X": [0]}, + "NODE_10": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.054000000000027325], "REACTION_Y": [0], "REACTION_X": [0]}, + "NODE_11": {"DISPLACEMENT_X": [0],"DISPLACEMENT_Y": [-0.06349206349209527], "REACTION_Y": [0], "REACTION_X": [0]}, + "TIME": [1.1]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/beam_test/nonlinear_3D2NBeamCr_test.mdpa b/applications/StructuralMechanicsApplication/tests/beam_test/nonlinear_3D2NBeamCr_test.mdpa new file mode 100644 index 000000000000..ccf6b242b7b8 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/beam_test/nonlinear_3D2NBeamCr_test.mdpa @@ -0,0 +1,159 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Properties 1 + CROSS_AREA 0.01 + DENSITY 7850 + YOUNG_MODULUS 210000000000 + POISSON_RATIO 0.30000 + LOCAL_INERTIA_VECTOR [3] (0.00001,0.00001,0.00001) +End Properties + +Begin Nodes +1 0.0 0 0 +2 0.05 0 0 +3 0.1 0 0 +4 0.15000000000000002 0 0 +5 0.2 0 0 +6 0.25 0 0 +7 0.30000000000000004 0 0 +8 0.35000000000000003 0 0 +9 0.4 0 0 +10 0.45 0 0 +11 0.5 0 0 +12 0.55 0 0 +13 0.6000000000000001 0 0 +14 0.65 0 0 +15 0.7000000000000001 0 0 +16 0.75 0 0 +17 0.8 0 0 +18 0.8500000000000001 0 0 +19 0.9 0 0 +20 0.9500000000000001 0 0 +21 1.0 0 0 +End Nodes + + +Begin Elements CrBeamElement3D2N// GUI group identifier: structure +1 1 1 2 +2 1 2 3 +3 1 3 4 +4 1 4 5 +5 1 5 6 +6 1 6 7 +7 1 7 8 +8 1 8 9 +9 1 9 10 +10 1 10 11 +11 1 11 12 +12 1 12 13 +13 1 13 14 +14 1 14 15 +15 1 15 16 +16 1 16 17 +17 1 17 18 +18 1 18 19 +19 1 19 20 +20 1 20 21 +End Elements + +Begin Conditions PointMomentCondition3D1N// GUI group identifier: neumann PointMomentCondition3D1N PointLoadCondition3D1N +1 0 21 +End Conditions + +Begin SubModelPart Parts_structure // Group structure // Subtree Parts + Begin SubModelPartNodes +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 + End SubModelPartNodes + Begin SubModelPartElements +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletXYZ // Group dirichletXYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_dirrot // Group dirrot // Subtree ROTATION + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_dirrotX // Group dirrot // Subtree ROTATION + Begin SubModelPartNodes + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletYZ // Group dirichletYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart PointLoad3D_neumann // Group neumann // Subtree PointLoad3D + Begin SubModelPartNodes + 21 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/beam_test/nonlinear_3D2NBeamCr_test_parameters.json b/applications/StructuralMechanicsApplication/tests/beam_test/nonlinear_3D2NBeamCr_test_parameters.json new file mode 100644 index 000000000000..07d71258841c --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/beam_test/nonlinear_3D2NBeamCr_test_parameters.json @@ -0,0 +1,130 @@ +{ + "problem_data" : { + "problem_name" : "testnew", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 10, + "start_time" : 0.0, + "end_time" : 2500, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_static_solver", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Non-Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "beam_test/nonlinear_3D2NBeamCr_test" + }, + "line_search" : false, + "compute_reactions" : true, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-12, + "displacement_absolute_tolerance" : 1e-12, + "residual_relative_tolerance" : 1e-12, + "residual_absolute_tolerance" : 1e-12, + "max_iteration" : 100, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : true, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_structure"], + "processes_sub_model_part_list" : ["DISPLACEMENT_dirichletXYZ","DISPLACEMENT_dirichletYZ","ROTATION_dirrot","PointLoad3D_neumann"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletXYZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletYZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : false, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_dirrot", + "variable_name" : "ROTATION", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "PointLoad3D_neumann", + "variable_name" : "POINT_MOMENT", + "value" : [0.0,0.0,"10000*t"] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_X","DISPLACEMENT_Y","POINT_MOMENT_Z"], + "input_file_name" : "beam_test/nonlinear_3D2NBeamCr_test_results.json", + "model_part_name" : "PointLoad3D_neumann", + "time_frequency" : 9 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_X","DISPLACEMENT_Y","POINT_MOMENT_Z"], + "output_file_name" : "beam_test/nonlinear_3D2NBeamCr_test_results.json", + "model_part_name" : "PointLoad3D_neumann", + "time_frequency" : 9 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/beam_test/nonlinear_3D2NBeamCr_test_results.json b/applications/StructuralMechanicsApplication/tests/beam_test/nonlinear_3D2NBeamCr_test_results.json new file mode 100644 index 000000000000..a9514f4ef047 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/beam_test/nonlinear_3D2NBeamCr_test_results.json @@ -0,0 +1,5 @@ +{"NODE_21": +{"DISPLACEMENT_X": [-0.00037765003080647574,-0.001510087677790949,-0.0033957764298465113,-0.0060321581843480005,-0.009415657365942295,-0.013541686682852999,-0.018404654510302394,-0.023997973888927018,-0.030314073121587005,-0.037344407950682064,-0.04507947529451411,-0.05350882851877343,-0.06262109421652037,-0.07240399046741443,-0.08284434654436976,-0.093928124033311,-0.10564043932925084,-0.11796558746952983,-0.1308870672627539,-0.1443876076697212,-0.15844919539049138,-0.1730531036096571,-0.18817992184991772,-0.20380958688214387,-0.21992141463832943,-0.23649413307213368,-0.2535059159100982,-0.2709344172351467,-0.28875680684256294,-0.3069498063073816,-0.325489725700937,-0.3443525008932632,-0.3635137313770965,-0.38294871854839707,-0.40263250437760617,-0.4225399104052497,-0.44264557699504137,-0.46292400277728557,-0.4833495842151367,-0.5038966552261881,-0.5245395267918573,-0.5452525264871743,-0.5660100378638511,-0.586786539619852,-0.6075566444892367,-0.6282951377865922,-0.6489770155411757,-0.6695775221566755,-0.6900721875335103,-0.710436863591621,-0.7306477601329292,-0.7506814799838942,-0.770515053360046,-0.7901259713958055,-0.809492218784585,-0.8285923054757808,-0.8474052973771181,-0.8659108460126629,-0.8840892170887835,-0.9019213179223939,-0.9193887236879638,-0.9364737024419285,-0.9531592388854816,-0.9694290568289838,-0.9852676403237206,-1.0006602534291074,-1.0155929585860202,-1.0300526335694524,-1.0440269869963215,-1.05750457236687,-1.0704748006207978,-1.082927951191958,-1.0948551815481646,-1.106248535205425,-1.1171009482086398,-1.127406254073611,-1.1371591871879227,-1.1463553846710746,-1.154991386696956,-1.163064635284537,-1.1705734715653406,-1.1775171315390014,-1.1838957403308614,-1.1897103049682223,-1.194962705694462,-1.1996556858428016,-1.2037928402940146,-1.2073786025448536,-1.2104182304163564,-1.2129177904335653,-1.2148841409104667,-1.2163249137761818,-1.2172484951805747,-1.217664004919522,-1.2175812747220711,-1.217010825443613,-1.2159638432110236,-1.214452154567448,-1.2124882006660287,-1.2100850105634313,-1.2072561736654464,-1.2040158113782908,-1.200378548020463,-1.1963594810511338,-1.1919741506720805,-1.1872385088610784,-1.182168887895466,-1.1767819684252978,-1.17109474715606,-1.1651245042014082,-1.158888770166718,-1.152405293024485,-1.1456920048427273,-1.1387669884275549,-1.1316484439409489,-1.1243546555545978,-1.1169039582002658,-1.1093147044767635,-1.1016052317730003,-1.09379382966595,-1.0858987076515751,-1.0779379632658854,-1.0699295506523152,-1.0618912496305066,-1.053840635320427,-1.0457950483744318,-1.0377715658685285,-1.0297869729026192,-1.0218577349579463,-1.013999971058308,-1.0062294277799078,-0.9985614541528757,-0.9910109774956419,-0.9835924802213741,-0.9763199776536875,-0.969206996886758,-0.9622665567228187,-0.95551114871785,-0.9489527193640033,-0.9426026534350421,-0.936471758518728,-0.9305702507577341,-0.9249077418182622,-0.9194932271031173,-0.914335075223547,-0.9094410187416969,-0.9048181461930394,-0.9004728953956721,-0.8964110480508712,-0.8926377256368172,-0.8891573865949202,-0.8859738248057101,-0.8830901693487979,-0.8805088855389902,-0.8782317772282248,-0.8762599903606297,-0.8745940177656487,-0.8732337051718909,-0.8721782584220916,-0.8714262518673597,-0.8709756379167247,-0.8708237577158994,-0.8709673529271116,-0.8714025785798922,-0.8721250169607776,-0.8731296925080467,-0.8744110876758365,-0.8759631597302879,-0.8777793584387548,-0.8798526446115805,-0.8821755094545003,-0.8847399946883654,-0.8875377133916172,-0.8905598715197771,-0.893797290055112,-0.897240427738684,-0.9008794043360712,-0.904704024387302,-0.9087038013908119,-0.9128679823706922,-0.9171855727759924,-0.9216453616604655,-0.9262359470908773,-0.9309457617318199,-0.9357630985549058,-0.9406761366202685,-0.9456729668784045,-0.9507416179406657,-0.9558700817670297,-0.9610463392202322,-0.9662583854358882,-0.9714942549588537,-0.9767420465968408,-0.9819899479431059,-0.9872262595209781,-0.9924394185039742,-0.9976180219663953,-1.0027508496204371,-1.0078268859971566,-1.0128353420299565,-1.0177656760007012,-1.0226076138100477,-1.0273511685351873,-1.0319866592397762,-1.0365047290025937,-1.0408963621331808,-1.0451529005445581,-1.0492660592549667,-1.0532279409925267,-1.0570310498786388,-1.0606683041679696,-1.0641330480249045,-1.0674190623184143,-1.0705205744193853,-1.0734322669865781,-1.0761492857295207,-1.07866724613881,-1.0809822391764274,-1.0830908359208848,-1.084990091164155,-1.086677545959526,-1.0881512291216668,-1.0894096576823589,-1.0904518363074525,-1.0912772556827406,-1.0918858898785186,-1.0922781927046552,-1.0924550930700263,-1.092417989362149,-1.0921687428647975,-1.0917096702332854,-1.0910435350489478,-1.0901735384761604,-1.0891033090469702,-1.0878368916001058,-1.0863787354027492,-1.0847336814850124,-1.0829069492185484,-1.0809041221721456,-1.0787311332784955,-1.0763942493475835,-1.0739000549633615,-1.0712554358014317,-1.0684675614065375,-1.0655438674695552,-1.0624920376445617,-1.0593199849473003,-1.0560358327770523,-1.0526478956044978,-1.0491646593686441,-1.0455947616263113], +"DISPLACEMENT_Y": [0.023805032023492816,0.04758312144631713,0.07130736623071904,0.09495094539633032,0.11848715937787402,0.14188947017829184,0.16513154124815582,0.188187277027383,0.21103086207870145,0.23363679974968785,0.25597995029733933,0.27803556841125476,0.2997793400724215,0.32118741868579626,0.3422364604261598,0.3629036587381407,0.38316677793281145,0.4030041858248699,0.4223948853561438,0.44131854515295266,0.4597555289667834,0.47768692394970225,0.49509456771803184,0.5119610741599642,0.528269857945021,0.5440051576955972,0.5591520577831847,0.5736965087143403,0.5876253460739521,0.6009263079959352,0.6135880511340949,0.6256001651085547,0.6369531854058559,0.6476386047135683,0.6576488826730267,0.6669774540365971,0.6756187352187061,0.6835681292326907,0.690822029008375,0.6973778190881326,0.7032338757020429,0.7083895652255918,0.7128452410262146,0.7166022387077836,0.7196628697649641,0.722030413662115,0.7237091083541762,0.7247041392696782,0.7250216267786874,0.7246686121711193,0.7236530421734281,0.7219837520341967,0.7196704472116136,0.7167236836982163,0.7131548470206092,0.7089761299541181,0.7042005089945274,0.6988417196311335,0.6929142304673789,0.6864332162372422,0.6794145297674069,0.6718746729369728,0.663830766688107,0.6553005201426009,0.646302198880708,0.6368545924400075,0.6269769810932445,0.6166891019652262,0.6060111145498607,0.5949635656893177,0.5835673540780743,0.5718436943552634,0.5598140808493043,0.5475002510392081,0.5349241487972753,0.5221078874780802,0.509073712918733,0.49584396641533135,0.4824410477403897,0.468887378265712,0.4552053642548138,0.44141736038844764,0.42754563358619035,0.4136123271862767,0.39963942554503157,0.3856487191162779,0.3716617700700189,0.3576998785085243,0.3437840493366581,0.329934959841917,0.31617292803813796,0.3025178818252888,0.2889893290160733,0.27560632827831066,0.2623874610402389,0.24935080440394225,0.23651390511010129,0.2238937545952211,0.21150676518028735,0.19936874742767693,0.18749488870077669,0.17589973295852468,0.1645971618146622,0.15360037688904693,0.1429218834759566,0.13257347555174337,0.12256622214170089,0.11291045506341306,0.10361575806125602,0.0946909573441375,0.08614411353588626,0.07798251504511435,0.0702126728586959,0.06284031676039561,0.05587039297352779,0.04930706322392087,0.043153705216835064,0.037412914518927254,0.03208650783376627,0.02717552765689394,0.022680248293923847,0.01860018322272347,0.014934093778313208,0.011679999136748944,0.008835187571961499,0.006396228957266356,0.004358988481069439,0.0027186415441784774,0.0014696898040701522,0.0006059783294852926,0.00012071382682154,6.483897965720235e-06,0.0002552772874757256,0.0008585050753550531,0.0018070227701120535,0.003091153255312808,0.004700710541463372,0.0066250242737728076,0.008852964945168199,0.011372969762848814,0.014173069115689732,0.017240913588926775,0.02056380147179127,0.024128706703095353,0.027922307199216848,0.031931013508483305,0.036140997735624396,0.04053822267972155,0.04510847112898255,0.04983737525563687,0.05471044605437072,0.05971310276790512,0.0648307022436594,0.070048568165839,0.07535202010783768,0.08072640235045439,0.08615711241217973,0.09162962923862056,0.09712954099908067,0.10264257243933698,0.10815461174078261,0.11365173683731099,0.11912024114263838,0.12454665864213771,0.12991778830474454,0.1352207177720379,0.1404428462832468,0.14557190679662396,0.15059598726941179,0.15550355106046315,0.16028345642149142,0.16492497504487028,0.16941780963793446,0.17375211049579933,0.1779184910468127,0.1819080423469326,0.1857123465014844,0.18932348899501555,0.19273406991216552,0.19593721403479974,0.19892657980291376,0.20169636712913594,0.20424132405898476,0.20655675227134304,0.2086385114159579,0.2104830222870887,0.21208726883473128,0.2134487990171635,0.21456572450082684,0.2154367192158286,0.21606101677757977,0.21643840678728887,0.21656923002620204,0.21645437256061076,0.21609525877673003,0.21549384336659794,0.2146526022881257,0.21357452272437005,0.21226309206896515,0.21072228596647344,0.20895655543815,0.20697081312530508,0.20477041868404297,0.2023611633666989,0.19974925382673536,0.1969412951852441,0.19394427339847875,0.19076553696706094,0.187412778028605,0.18389401287654092,0.18021756194886224,0.17639202933134981,0.17242628182059047,0.16832942759275504,0.1641107945246599,0.15977990821411528,0.1553464697468861,0.15082033325792374,0.1462114833346232,0.14153001230998913,0.13678609749353063,0.13198997838761148,0.127151933936716,0.12228225985682592,0.11739124609165001,0.11248915444196657,0.10758619641372286,0.1026925113298521,0.09781814475000253,0.09297302724147297,0.08816695354373644,0.08340956216786688,0.07871031547109063,0.07407848024546772,0.06952310885846745,0.06505302098182507,0.06067678594370041,0.05640270573762663,0.052238798720254644,0.04819278402825105,0.044272066743072734,0.040483723830642825,0.03683449088115846,0.03333074967250478,0.029978516578862118,0.026783431844242665,0.02375074973876042,0.020885329613506025,0.018191627867919866,0.015673690841569953,0.013335148640246083], +"POINT_MOMENT_Z": [100000.0,200000.0,300000.0,400000.0,500000.0,600000.0,700000.0,800000.0,900000.0,1000000.0,1100000.0,1200000.0,1300000.0,1400000.0,1500000.0,1600000.0,1700000.0,1800000.0,1900000.0,2000000.0,2100000.0,2200000.0,2300000.0,2400000.0,2500000.0,2600000.0,2700000.0,2800000.0,2900000.0,3000000.0,3100000.0,3200000.0,3300000.0,3400000.0,3500000.0,3600000.0,3700000.0,3800000.0,3900000.0,4000000.0,4100000.0,4200000.0,4300000.0,4400000.0,4500000.0,4600000.0,4700000.0,4800000.0,4900000.0,5000000.0,5100000.0,5200000.0,5300000.0,5400000.0,5500000.0,5600000.0,5700000.0,5800000.0,5900000.0,6000000.0,6100000.0,6200000.0,6300000.0,6400000.0,6500000.0,6600000.0,6700000.0,6800000.0,6900000.0,7000000.0,7100000.0,7200000.0,7300000.0,7400000.0,7500000.0,7600000.0,7700000.0,7800000.0,7900000.0,8000000.0,8100000.0,8200000.0,8300000.0,8400000.0,8500000.0,8600000.0,8700000.0,8800000.0,8900000.0,9000000.0,9100000.0,9200000.0,9300000.0,9400000.0,9500000.0,9600000.0,9700000.0,9800000.0,9900000.0,10000000.0,10100000.0,10200000.0,10300000.0,10400000.0,10500000.0,10600000.0,10700000.0,10800000.0,10900000.0,11000000.0,11100000.0,11200000.0,11300000.0,11400000.0,11500000.0,11600000.0,11700000.0,11800000.0,11900000.0,12000000.0,12100000.0,12200000.0,12300000.0,12400000.0,12500000.0,12600000.0,12700000.0,12800000.0,12900000.0,13000000.0,13100000.0,13200000.0,13300000.0,13400000.0,13500000.0,13600000.0,13700000.0,13800000.0,13900000.0,14000000.0,14100000.0,14200000.0,14300000.0,14400000.0,14500000.0,14600000.0,14700000.0,14800000.0,14900000.0,15000000.0,15100000.0,15200000.0,15300000.0,15400000.0,15500000.0,15600000.0,15700000.0,15800000.0,15900000.0,16000000.0,16100000.0,16200000.0,16300000.0,16400000.0,16500000.0,16600000.0,16700000.0,16800000.0,16900000.0,17000000.0,17100000.0,17200000.0,17300000.0,17400000.0,17500000.0,17600000.0,17700000.0,17800000.0,17900000.0,18000000.0,18100000.0,18200000.0,18300000.0,18400000.0,18500000.0,18600000.0,18700000.0,18800000.0,18900000.0,19000000.0,19100000.0,19200000.0,19300000.0,19400000.0,19500000.0,19600000.0,19700000.0,19800000.0,19900000.0,20000000.0,20100000.0,20200000.0,20300000.0,20400000.0,20500000.0,20600000.0,20700000.0,20800000.0,20900000.0,21000000.0,21100000.0,21200000.0,21300000.0,21400000.0,21500000.0,21600000.0,21700000.0,21800000.0,21900000.0,22000000.0,22100000.0,22200000.0,22300000.0,22400000.0,22500000.0,22600000.0,22700000.0,22800000.0,22900000.0,23000000.0,23100000.0,23200000.0,23300000.0,23400000.0,23500000.0,23600000.0,23700000.0,23800000.0,23900000.0,24000000.0,24100000.0,24200000.0,24300000.0,24400000.0,24500000.0,24600000.0,24700000.0,24800000.0,24900000.0,25000000.0,25100000.0]}, +"TIME": [10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0,100.0,110.0,120.0,130.0,140.0,150.0,160.0,170.0,180.0,190.0,200.0,210.0,220.0,230.0,240.0,250.0,260.0,270.0,280.0,290.0,300.0,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0,410.0,420.0,430.0,440.0,450.0,460.0,470.0,480.0,490.0,500.0,510.0,520.0,530.0,540.0,550.0,560.0,570.0,580.0,590.0,600.0,610.0,620.0,630.0,640.0,650.0,660.0,670.0,680.0,690.0,700.0,710.0,720.0,730.0,740.0,750.0,760.0,770.0,780.0,790.0,800.0,810.0,820.0,830.0,840.0,850.0,860.0,870.0,880.0,890.0,900.0,910.0,920.0,930.0,940.0,950.0,960.0,970.0,980.0,990.0,1000.0,1010.0,1020.0,1030.0,1040.0,1050.0,1060.0,1070.0,1080.0,1090.0,1100.0,1110.0,1120.0,1130.0,1140.0,1150.0,1160.0,1170.0,1180.0,1190.0,1200.0,1210.0,1220.0,1230.0,1240.0,1250.0,1260.0,1270.0,1280.0,1290.0,1300.0,1310.0,1320.0,1330.0,1340.0,1350.0,1360.0,1370.0,1380.0,1390.0,1400.0,1410.0,1420.0,1430.0,1440.0,1450.0,1460.0,1470.0,1480.0,1490.0,1500.0,1510.0,1520.0,1530.0,1540.0,1550.0,1560.0,1570.0,1580.0,1590.0,1600.0,1610.0,1620.0,1630.0,1640.0,1650.0,1660.0,1670.0,1680.0,1690.0,1700.0,1710.0,1720.0,1730.0,1740.0,1750.0,1760.0,1770.0,1780.0,1790.0,1800.0,1810.0,1820.0,1830.0,1840.0,1850.0,1860.0,1870.0,1880.0,1890.0,1900.0,1910.0,1920.0,1930.0,1940.0,1950.0,1960.0,1970.0,1980.0,1990.0,2000.0,2010.0,2020.0,2030.0,2040.0,2050.0,2060.0,2070.0,2080.0,2090.0,2100.0,2110.0,2120.0,2130.0,2140.0,2150.0,2160.0,2170.0,2180.0,2190.0,2200.0,2210.0,2220.0,2230.0,2240.0,2250.0,2260.0,2270.0,2280.0,2290.0,2300.0,2310.0,2320.0,2330.0,2340.0,2350.0,2360.0,2370.0,2380.0,2390.0,2400.0,2410.0,2420.0,2430.0,2440.0,2450.0,2460.0,2470.0,2480.0,2490.0,2500.0,2510.0]} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test.mdpa new file mode 100644 index 000000000000..ad34f8ddd124 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test.mdpa @@ -0,0 +1,462 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties + +Begin Nodes + 1 2.00000 0.00000 0.00000 + 2 2.00000 0.28571 0.00000 + 3 1.71429 0.00000 0.00000 + 4 1.71429 0.28571 0.00000 + 5 1.42857 0.00000 0.00000 + 6 2.00000 0.57143 0.00000 + 7 1.42857 0.28571 0.00000 + 8 1.71429 0.57143 0.00000 + 9 1.42857 0.57143 0.00000 + 10 2.00000 0.85714 0.00000 + 11 1.14286 0.00000 0.00000 + 12 1.14286 0.28571 0.00000 + 13 1.71429 0.85714 0.00000 + 14 1.14286 0.57143 0.00000 + 15 1.42857 0.85714 0.00000 + 16 0.85714 0.00000 0.00000 + 17 2.00000 1.14286 0.00000 + 18 0.85714 0.28571 0.00000 + 19 1.71429 1.14286 0.00000 + 20 1.14286 0.85714 0.00000 + 21 1.42857 1.14286 0.00000 + 22 0.85714 0.57143 0.00000 + 23 1.14286 1.14286 0.00000 + 24 0.85714 0.85714 0.00000 + 25 2.00000 1.42857 0.00000 + 26 0.57143 0.00000 0.00000 + 27 0.57143 0.28571 0.00000 + 28 1.71429 1.42857 0.00000 + 29 0.57143 0.57143 0.00000 + 30 1.42857 1.42857 0.00000 + 31 0.85714 1.14286 0.00000 + 32 1.14286 1.42857 0.00000 + 33 0.57143 0.85714 0.00000 + 34 2.00000 1.71429 0.00000 + 35 0.28571 0.00000 0.00000 + 36 1.71429 1.71429 0.00000 + 37 0.28571 0.28571 0.00000 + 38 1.42857 1.71429 0.00000 + 39 0.28571 0.57143 0.00000 + 40 0.85714 1.42857 0.00000 + 41 0.57143 1.14286 0.00000 + 42 1.14286 1.71429 0.00000 + 43 0.28571 0.85714 0.00000 + 44 0.00000 0.00000 0.00000 + 45 2.00000 2.00000 0.00000 + 46 0.57143 1.42857 0.00000 + 47 0.00000 0.28571 0.00000 + 48 1.71429 2.00000 0.00000 + 49 0.85714 1.71429 0.00000 + 50 0.28571 1.14286 0.00000 + 51 0.00000 0.57143 0.00000 + 52 1.42857 2.00000 0.00000 + 53 1.14286 2.00000 0.00000 + 54 0.00000 0.85714 0.00000 + 55 0.57143 1.71429 0.00000 + 56 0.28571 1.42857 0.00000 + 57 0.85714 2.00000 0.00000 + 58 0.00000 1.14286 0.00000 + 59 0.28571 1.71429 0.00000 + 60 0.00000 1.42857 0.00000 + 61 0.57143 2.00000 0.00000 + 62 0.28571 2.00000 0.00000 + 63 0.00000 1.71429 0.00000 + 64 0.00000 2.00000 0.00000 +End Nodes + + +Begin Elements ShellThinElementCorotational3D4N// GUI group identifier: surface + 1 0 35 37 47 44 + 2 0 26 27 37 35 + 3 0 16 18 27 26 + 4 0 11 12 18 16 + 5 0 5 7 12 11 + 6 0 3 4 7 5 + 7 0 1 2 4 3 + 8 0 37 39 51 47 + 9 0 27 29 39 37 + 10 0 18 22 29 27 + 11 0 12 14 22 18 + 12 0 7 9 14 12 + 13 0 4 8 9 7 + 14 0 2 6 8 4 + 15 0 39 43 54 51 + 16 0 29 33 43 39 + 17 0 22 24 33 29 + 18 0 14 20 24 22 + 19 0 9 15 20 14 + 20 0 8 13 15 9 + 21 0 6 10 13 8 + 22 0 43 50 58 54 + 23 0 33 41 50 43 + 24 0 24 31 41 33 + 25 0 20 23 31 24 + 26 0 15 21 23 20 + 27 0 13 19 21 15 + 28 0 10 17 19 13 + 29 0 50 56 60 58 + 30 0 41 46 56 50 + 31 0 31 40 46 41 + 32 0 23 32 40 31 + 33 0 21 30 32 23 + 34 0 19 28 30 21 + 35 0 17 25 28 19 + 36 0 56 59 63 60 + 37 0 46 55 59 56 + 38 0 40 49 55 46 + 39 0 32 42 49 40 + 40 0 30 38 42 32 + 41 0 28 36 38 30 + 42 0 25 34 36 28 + 43 0 59 62 64 63 + 44 0 55 61 62 59 + 45 0 49 57 61 55 + 46 0 42 53 57 49 + 47 0 38 52 53 42 + 48 0 36 48 52 38 + 49 0 34 45 48 36 +End Elements + +Begin Conditions SurfaceLoadCondition3D4N// GUI group identifier: surface +1 0 35 37 47 44 +2 0 26 27 37 35 +3 0 16 18 27 26 +4 0 11 12 18 16 +5 0 5 7 12 11 +6 0 3 4 7 5 +7 0 1 2 4 3 +8 0 37 39 51 47 +9 0 27 29 39 37 +10 0 18 22 29 27 +11 0 12 14 22 18 +12 0 7 9 14 12 +13 0 4 8 9 7 +14 0 2 6 8 4 +15 0 39 43 54 51 +16 0 29 33 43 39 +17 0 22 24 33 29 +18 0 14 20 24 22 +19 0 9 15 20 14 +20 0 8 13 15 9 +21 0 6 10 13 8 +22 0 43 50 58 54 +23 0 33 41 50 43 +24 0 24 31 41 33 +25 0 20 23 31 24 +26 0 15 21 23 20 +27 0 13 19 21 15 +28 0 10 17 19 13 +29 0 50 56 60 58 +30 0 41 46 56 50 +31 0 31 40 46 41 +32 0 23 32 40 31 +33 0 21 30 32 23 +34 0 19 28 30 21 +35 0 17 25 28 19 +36 0 56 59 63 60 +37 0 46 55 59 56 +38 0 40 49 55 46 +39 0 32 42 49 40 +40 0 30 38 42 32 +41 0 28 36 38 30 +42 0 25 34 36 28 +43 0 59 62 64 63 +44 0 55 61 62 59 +45 0 49 57 61 55 +46 0 42 53 57 49 +47 0 38 52 53 42 +48 0 36 48 52 38 +49 0 34 45 48 36 +End Conditions + +Begin SubModelPart Parts_surface // Group surface // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_edge // Group edge // Subtree DISPLACEMENT + Begin SubModelPartNodes + 44 + 47 + 51 + 54 + 58 + 60 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_sample // Group sample // Subtree DISPLACEMENT + Begin SubModelPartNodes + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_edge // Group edge // Subtree ROTATION + Begin SubModelPartNodes + 44 + 47 + 51 + 54 + 58 + 60 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart SurfaceLoad3D_surface // Group surface // Subtree SurfaceLoad3D + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test_materials.json new file mode 100644 index 000000000000..0e5edc8e71a6 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test_materials.json @@ -0,0 +1,19 @@ +{ + "properties": [{ + "model_part_name": "Parts_surface", + "properties_id": 1, + "Material": { + "name": "Material", + "constitutive_law": { + "name": "KratosMultiphysics.StructuralMechanicsApplication.LinearElasticPlaneStress2DLaw" + }, + "Variables": { + "KratosMultiphysics.YOUNG_MODULUS": 1e6, + "KratosMultiphysics.POISSON_RATIO": 0.0, + "KratosMultiphysics.THICKNESS": 0.1, + "KratosMultiphysics.DENSITY": 7.85e3 + }, + "Tables": {} + } + }] +} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test_parameters.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test_parameters.json new file mode 100644 index 000000000000..dd059c18d9e6 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test_parameters.json @@ -0,0 +1,139 @@ +{ + "problem_data" : { + "problem_name" : "Shell_Q4_Thin_linear_dynamic_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 1.125, + "start_time" : 0.0, + "end_time" : 25, + "echo_level" : 0 + }, + "material_import_settings" :{ + "materials_filename": "shell_test/Shell_Q4_Thin_linear_dynamic_test_materials.json" + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_implicit_dynamic_solver", + "echo_level" : 0, + "solution_type" : "Dynamic", + "time_integration_method" : "Implicit", + "scheme_type" : "Newmark", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "shell_test/Shell_Q4_Thin_linear_dynamic_test" + }, + "material_import_settings" :{ + "materials_filename": "shell_test/Shell_Q4_Thin_linear_dynamic_test_materials.json" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-9, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 1e-9, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 500, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_surface"], + "processes_sub_model_part_list" : ["DISPLACEMENT_edge","DISPLACEMENT_sample","ROTATION_edge","SurfaceLoad3D_surface"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_edge", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_sample", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_edge", + "variable_name" : "ROTATION", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "assign_vector_by_direction_to_condition_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process sets a vector variable value over a condition", + "check" : "DirectorVectorNonZero direction", + "process_name" : "AssignModulusAndDirectionToConditionsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "SurfaceLoad3D_surface", + "variable_name" : "SURFACE_LOAD", + "modulus" : 0.25, + "direction" : [0.0,0.0,-1.0], + "interval" : [0.0,"End"] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Z"], + "input_file_name" : "shell_test/Shell_Q4_Thin_linear_dynamic_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.001 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Z"], + "output_file_name" : "shell_test/Shell_Q4_Thin_linear_dynamic_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.001 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test_results.json new file mode 100644 index 000000000000..e2326f362b85 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_dynamic_test_results.json @@ -0,0 +1,2 @@ +{"NODE_45": {"DISPLACEMENT_Z": [-0.00011440148598402173,-0.0006237097037133469,-0.0017435721259393714,-0.0033823933154953907,-0.0052071229250010105,-0.007024824769851101,-0.008820890541799088,-0.010425054027223497,-0.011533048035632706,-0.01199904218187944,-0.011931418297643154,-0.011383445749213131,-0.010239252143671801,-0.008581907034652086,-0.00672633666914589,-0.004899897286180898,-0.0031450130383616154,-0.0015678132564117592,-0.00048022454762310595,-5.551831391854743e-05,-0.00017978746830409878,-0.0007835482796433135,-0.0019423617118669966]}, + "TIME": [1.125,2.25,3.375,4.5,5.625,6.75,7.875,9.0,10.125,11.25,12.375,13.5,14.625,15.75,16.875,18.0,19.125,20.25,21.375,22.5,23.625,24.75,25.875]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test.mdpa new file mode 100644 index 000000000000..f9c3f633be23 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test.mdpa @@ -0,0 +1,378 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties + +Begin Nodes + 1 0.00000 25.00000 25.00000 + 2 0.00000 21.87500 25.00000 + 3 4.34120 25.00000 24.62019 + 4 4.34120 21.87500 24.62019 + 5 0.00000 18.75000 25.00000 + 6 4.34120 18.75000 24.62019 + 7 8.55050 25.00000 23.49232 + 8 8.55050 21.87500 23.49232 + 9 0.00000 15.62500 25.00000 + 10 4.34120 15.62500 24.62019 + 11 8.55050 18.75000 23.49232 + 12 0.00000 12.50000 25.00000 + 13 8.55050 15.62500 23.49232 + 14 12.50000 25.00000 21.65064 + 15 4.34120 12.50000 24.62019 + 16 12.50000 21.87500 21.65064 + 17 12.50000 18.75000 21.65064 + 18 8.55050 12.50000 23.49232 + 19 0.00000 9.37500 25.00000 + 20 12.50000 15.62500 21.65064 + 21 4.34120 9.37500 24.62019 + 22 16.06969 25.00000 19.15111 + 23 16.06969 21.87500 19.15111 + 24 8.55050 9.37500 23.49232 + 25 12.50000 12.50000 21.65064 + 26 16.06969 18.75000 19.15111 + 27 0.00000 6.25000 25.00000 + 28 4.34120 6.25000 24.62019 + 29 16.06969 15.62500 19.15111 + 30 12.50000 9.37500 21.65064 + 31 8.55050 6.25000 23.49232 + 32 16.06969 12.50000 19.15111 + 33 0.00000 3.12500 25.00000 + 34 4.34120 3.12500 24.62019 + 35 12.50000 6.25000 21.65064 + 36 16.06969 9.37500 19.15111 + 37 8.55050 3.12500 23.49232 + 38 0.00000 0.00000 25.00000 + 39 4.34120 0.00000 24.62019 + 40 16.06969 6.25000 19.15111 + 41 12.50000 3.12500 21.65064 + 42 8.55050 0.00000 23.49232 + 43 16.06969 3.12500 19.15111 + 44 12.50000 0.00000 21.65064 + 45 16.06969 0.00000 19.15111 +End Nodes + + +Begin Elements ShellThinElementCorotational3D4N// GUI group identifier: Surface + 1 0 33 34 39 38 + 2 0 27 28 34 33 + 3 0 19 21 28 27 + 4 0 12 15 21 19 + 5 0 9 10 15 12 + 6 0 5 6 10 9 + 7 0 2 4 6 5 + 8 0 1 3 4 2 + 9 0 34 37 42 39 + 10 0 28 31 37 34 + 11 0 21 24 31 28 + 12 0 15 18 24 21 + 13 0 10 13 18 15 + 14 0 6 11 13 10 + 15 0 4 8 11 6 + 16 0 3 7 8 4 + 17 0 37 41 44 42 + 18 0 31 35 41 37 + 19 0 24 30 35 31 + 20 0 18 25 30 24 + 21 0 13 20 25 18 + 22 0 11 17 20 13 + 23 0 8 16 17 11 + 24 0 7 14 16 8 + 25 0 41 43 45 44 + 26 0 35 40 43 41 + 27 0 30 36 40 35 + 28 0 25 32 36 30 + 29 0 20 29 32 25 + 30 0 17 26 29 20 + 31 0 16 23 26 17 + 32 0 14 22 23 16 +End Elements + +Begin Conditions SurfaceLoadCondition3D4N// GUI group identifier: Surface +1 0 33 34 39 38 +2 0 27 28 34 33 +3 0 19 21 28 27 +4 0 12 15 21 19 +5 0 9 10 15 12 +6 0 5 6 10 9 +7 0 2 4 6 5 +8 0 1 3 4 2 +9 0 34 37 42 39 +10 0 28 31 37 34 +11 0 21 24 31 28 +12 0 15 18 24 21 +13 0 10 13 18 15 +14 0 6 11 13 10 +15 0 4 8 11 6 +16 0 3 7 8 4 +17 0 37 41 44 42 +18 0 31 35 41 37 +19 0 24 30 35 31 +20 0 18 25 30 24 +21 0 13 20 25 18 +22 0 11 17 20 13 +23 0 8 16 17 11 +24 0 7 14 16 8 +25 0 41 43 45 44 +26 0 35 40 43 41 +27 0 30 36 40 35 +28 0 25 32 36 30 +29 0 20 29 32 25 +30 0 17 26 29 20 +31 0 16 23 26 17 +32 0 14 22 23 16 +End Conditions + +Begin SubModelPart Parts_surface // Group Surface // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Dirichlet // Group Dirichlet // Subtree DISPLACEMENT + Begin SubModelPartNodes + 38 + 39 + 42 + 44 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_YZ_sym // Group YZ sym // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 5 + 9 + 12 + 19 + 27 + 33 + 38 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_XZ_sym // Group XZ sym // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 3 + 7 + 14 + 22 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_sample // Group sample // Subtree DISPLACEMENT + Begin SubModelPartNodes + 22 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_YZ_sym // Group YZ sym // Subtree ROTATION + Begin SubModelPartNodes + 1 + 2 + 5 + 9 + 12 + 19 + 27 + 33 + 38 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_XZ_sym // Group XZ sym // Subtree ROTATION + Begin SubModelPartNodes + 1 + 3 + 7 + 14 + 22 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart SurfaceLoad3D_Surface // Group Surface // Subtree SurfaceLoad3D + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test_materials.json new file mode 100644 index 000000000000..bb32f1679455 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test_materials.json @@ -0,0 +1,19 @@ +{ + "properties": [{ + "model_part_name": "Parts_surface", + "properties_id": 1, + "Material": { + "name": "Material", + "constitutive_law": { + "name": "KratosMultiphysics.StructuralMechanicsApplication.LinearElasticPlaneStress2DLaw" + }, + "Variables": { + "KratosMultiphysics.YOUNG_MODULUS": 4.32e8, + "KratosMultiphysics.POISSON_RATIO": 0.0, + "KratosMultiphysics.THICKNESS": 0.25, + "KratosMultiphysics.DENSITY": 3.6e2 + }, + "Tables": {} + } + }] +} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test_parameters.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test_parameters.json new file mode 100644 index 000000000000..647db5f011c4 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test_parameters.json @@ -0,0 +1,177 @@ +{ + "problem_data" : { + "problem_name" : "Shell_Q4_Thin_linear_static_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 1.1, + "start_time" : 0.0, + "end_time" : 1.0, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_static_solver", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "shell_test/Shell_Q4_Thin_linear_static_test" + }, + "material_import_settings" :{ + "materials_filename": "shell_test/Shell_Q4_Thin_linear_static_test_materials.json" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-9, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 1e-9, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 10, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_surface"], + "processes_sub_model_part_list" : ["DISPLACEMENT_Dirichlet","DISPLACEMENT_YZ_sym","DISPLACEMENT_XZ_sym","DISPLACEMENT_sample","ROTATION_YZ_sym","ROTATION_XZ_sym","SurfaceLoad3D_Surface"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_Dirichlet", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_YZ_sym", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_XZ_sym", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : true, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_sample", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_YZ_sym", + "variable_name" : "ROTATION", + "is_fixed_x" : false, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_XZ_sym", + "variable_name" : "ROTATION", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "assign_vector_by_direction_to_condition_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process sets a vector variable value over a condition", + "check" : "DirectorVectorNonZero direction", + "process_name" : "AssignModulusAndDirectionToConditionsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "SurfaceLoad3D_Surface", + "variable_name" : "SURFACE_LOAD", + "modulus" : 90, + "direction" : [0.0,0.0,-1], + "interval" : [0.0,"End"] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Z"], + "input_file_name" : "shell_test/Shell_Q4_Thin_linear_static_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.9 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Z"], + "output_file_name" : "shell_test/Shell_Q4_Thin_linear_static_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.9 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test_results.json new file mode 100644 index 000000000000..d4b8faf92052 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_linear_static_test_results.json @@ -0,0 +1,2 @@ +{"NODE_22": {"DISPLACEMENT_Z": [-0.34739578834717005]}, + "TIME": [1.1]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test.mdpa new file mode 100644 index 000000000000..9cc4fdbf3b2c --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test.mdpa @@ -0,0 +1,361 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties + +Begin Nodes + 1 1.00000 0.00000 0.00000 + 2 1.00000 0.14286 0.00000 + 3 0.85714 0.00000 0.00000 + 4 0.85714 0.14286 0.00000 + 5 0.71429 0.00000 0.00000 + 6 1.00000 0.28571 0.00000 + 7 0.71429 0.14286 0.00000 + 8 0.85714 0.28571 0.00000 + 9 0.71429 0.28571 0.00000 + 10 1.00000 0.42857 0.00000 + 11 0.57143 0.00000 0.00000 + 12 0.57143 0.14286 0.00000 + 13 0.85714 0.42857 0.00000 + 14 0.57143 0.28571 0.00000 + 15 0.71429 0.42857 0.00000 + 16 0.42857 0.00000 0.00000 + 17 1.00000 0.57143 0.00000 + 18 0.42857 0.14286 0.00000 + 19 0.85714 0.57143 0.00000 + 20 0.57143 0.42857 0.00000 + 21 0.71429 0.57143 0.00000 + 22 0.42857 0.28571 0.00000 + 23 0.57143 0.57143 0.00000 + 24 0.42857 0.42857 0.00000 + 25 1.00000 0.71429 0.00000 + 26 0.28571 0.00000 0.00000 + 27 0.28571 0.14286 0.00000 + 28 0.85714 0.71429 0.00000 + 29 0.28571 0.28571 0.00000 + 30 0.71429 0.71429 0.00000 + 31 0.42857 0.57143 0.00000 + 32 0.57143 0.71429 0.00000 + 33 0.28571 0.42857 0.00000 + 34 1.00000 0.85714 0.00000 + 35 0.14286 0.00000 0.00000 + 36 0.85714 0.85714 0.00000 + 37 0.14286 0.14286 0.00000 + 38 0.71429 0.85714 0.00000 + 39 0.14286 0.28571 0.00000 + 40 0.42857 0.71429 0.00000 + 41 0.28571 0.57143 0.00000 + 42 0.57143 0.85714 0.00000 + 43 0.14286 0.42857 0.00000 + 44 0.00000 0.00000 0.00000 + 45 1.00000 1.00000 0.00000 + 46 0.28571 0.71429 0.00000 + 47 0.00000 0.14286 0.00000 + 48 0.85714 1.00000 0.00000 + 49 0.42857 0.85714 0.00000 + 50 0.14286 0.57143 0.00000 + 51 0.00000 0.28571 0.00000 + 52 0.71429 1.00000 0.00000 + 53 0.57143 1.00000 0.00000 + 54 0.00000 0.42857 0.00000 + 55 0.28571 0.85714 0.00000 + 56 0.14286 0.71429 0.00000 + 57 0.42857 1.00000 0.00000 + 58 0.00000 0.57143 0.00000 + 59 0.14286 0.85714 0.00000 + 60 0.00000 0.71429 0.00000 + 61 0.28571 1.00000 0.00000 + 62 0.14286 1.00000 0.00000 + 63 0.00000 0.85714 0.00000 + 64 0.00000 1.00000 0.00000 +End Nodes + + +Begin Elements ShellThinElementCorotational3D4N// GUI group identifier: surface + 1 0 35 37 47 44 + 2 0 26 27 37 35 + 3 0 16 18 27 26 + 4 0 11 12 18 16 + 5 0 5 7 12 11 + 6 0 3 4 7 5 + 7 0 1 2 4 3 + 8 0 37 39 51 47 + 9 0 27 29 39 37 + 10 0 18 22 29 27 + 11 0 12 14 22 18 + 12 0 7 9 14 12 + 13 0 4 8 9 7 + 14 0 2 6 8 4 + 15 0 39 43 54 51 + 16 0 29 33 43 39 + 17 0 22 24 33 29 + 18 0 14 20 24 22 + 19 0 9 15 20 14 + 20 0 8 13 15 9 + 21 0 6 10 13 8 + 22 0 43 50 58 54 + 23 0 33 41 50 43 + 24 0 24 31 41 33 + 25 0 20 23 31 24 + 26 0 15 21 23 20 + 27 0 13 19 21 15 + 28 0 10 17 19 13 + 29 0 50 56 60 58 + 30 0 41 46 56 50 + 31 0 31 40 46 41 + 32 0 23 32 40 31 + 33 0 21 30 32 23 + 34 0 19 28 30 21 + 35 0 17 25 28 19 + 36 0 56 59 63 60 + 37 0 46 55 59 56 + 38 0 40 49 55 46 + 39 0 32 42 49 40 + 40 0 30 38 42 32 + 41 0 28 36 38 30 + 42 0 25 34 36 28 + 43 0 59 62 64 63 + 44 0 55 61 62 59 + 45 0 49 57 61 55 + 46 0 42 53 57 49 + 47 0 38 52 53 42 + 48 0 36 48 52 38 + 49 0 34 45 48 36 +End Elements + +Begin SubModelPart Parts_surface // Group surface // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_edge // Group edge // Subtree DISPLACEMENT + Begin SubModelPartNodes + 44 + 47 + 51 + 54 + 58 + 60 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_sample // Group sample // Subtree DISPLACEMENT + Begin SubModelPartNodes + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_edge // Group edge // Subtree ROTATION + Begin SubModelPartNodes + 44 + 47 + 51 + 54 + 58 + 60 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart SelfWeight3D_surface // Group surface // Subtree SelfWeight3D + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_materials.json new file mode 100644 index 000000000000..4d0e668cffd1 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_materials.json @@ -0,0 +1,19 @@ +{ + "properties": [{ + "model_part_name": "Parts_surface", + "properties_id": 1, + "Material": { + "name": "Material", + "constitutive_law": { + "name": "KratosMultiphysics.StructuralMechanicsApplication.LinearElasticPlaneStress2DLaw" + }, + "Variables": { + "KratosMultiphysics.YOUNG_MODULUS": 1e9, + "KratosMultiphysics.POISSON_RATIO": 0.3, + "KratosMultiphysics.THICKNESS": 0.1, + "KratosMultiphysics.DENSITY": 7.85e3 + }, + "Tables": {} + } + }] +} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_parameters.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_parameters.json new file mode 100644 index 000000000000..2c9a9c6993f2 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_parameters.json @@ -0,0 +1,135 @@ +{ + "problem_data" : { + "problem_name" : "Shell_Q4_Thin_nonlinear_dynamic_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 0.04, + "start_time" : 0.0, + "end_time" : 1.0, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_implicit_dynamic_solver", + "echo_level" : 0, + "solution_type" : "Dynamic", + "time_integration_method" : "Implicit", + "scheme_type" : "Newmark", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "shell_test/Shell_Q4_Thin_nonlinear_dynamic_test" + }, + "material_import_settings" :{ + "materials_filename": "shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_materials.json" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-9, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 1e-9, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 100, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_surface"], + "processes_sub_model_part_list" : ["DISPLACEMENT_edge","DISPLACEMENT_sample","ROTATION_edge","SelfWeight3D_surface"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_edge", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_sample", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_edge", + "variable_name" : "ROTATION", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "process_factory", + "kratos_module" : "KratosMultiphysics", + "check" : "DirectorVectorNonZero direction", + "help" : "This process ", + "process_name" : "ApplyConstantVectorValueProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "SelfWeight3D_surface", + "variable_name" : "VOLUME_ACCELERATION", + "modulus" : 9.8, + "direction" : [0.0,0.0,-1.0] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Z"], + "input_file_name" : "shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.001 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Z"], + "output_file_name" : "shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.001 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_results.json new file mode 100644 index 000000000000..494d0cb78cf6 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_dynamic_test_results.json @@ -0,0 +1,2 @@ +{"NODE_45": {"DISPLACEMENT_Z": [-0.00560535034754877,-0.028799684015480408,-0.07536282766842738,-0.1444135054664001,-0.23521860247163018,-0.34494213934162127,-0.46906607654235727,-0.6007532892788591,-0.7300333511356358,-0.8455961093965378,-0.9352036819884548,-0.9883428080896334,-0.9983985092071386,-0.9640354664491947,-0.8896475085155249,-0.7842508805311148,-0.6596465498726766,-0.5276581984115108,-0.39914163953930504,-0.28228006698476454,-0.18250803075562813,-0.10359408006091123,-0.046776490209492524,-0.013127698891988691,-0.0027553307627791058]}, + "TIME": [0.04,0.08,0.12,0.16,0.2,0.24000000000000002,0.28,0.32,0.36,0.39999999999999997,0.43999999999999995,0.4799999999999999,0.5199999999999999,0.5599999999999999,0.6,0.64,0.68,0.7200000000000001,0.7600000000000001,0.8000000000000002,0.8400000000000002,0.8800000000000002,0.9200000000000003,0.9600000000000003,1.0000000000000002]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test.mdpa new file mode 100644 index 000000000000..c84dc91d0dde --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test.mdpa @@ -0,0 +1,336 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Nodes + 1 0.0000000000 2.5400000000 -0.2540000000 + 2 0.0362844801 2.5397408207 -0.2540000000 + 3 0.0000000000 2.5400000000 -0.2177142857 + 4 0.0362844801 2.5397408207 -0.2177142857 + 5 0.0725615553 2.5389633358 -0.2540000000 + 6 0.0000000000 2.5400000000 -0.1814285714 + 7 0.0725615553 2.5389633358 -0.2177142857 + 8 0.0362844801 2.5397408207 -0.1814285714 + 9 0.0725615553 2.5389633358 -0.1814285714 + 10 0.1088238223 2.5376677040 -0.2540000000 + 11 0.0000000000 2.5400000000 -0.1451428571 + 12 0.1088238223 2.5376677040 -0.2177142857 + 13 0.0362844801 2.5397408207 -0.1451428571 + 14 0.1088238223 2.5376677040 -0.1814285714 + 15 0.0725615553 2.5389633358 -0.1451428571 + 16 0.1450638807 2.5358541895 -0.2540000000 + 17 0.0000000000 2.5400000000 -0.1088571429 + 18 0.1450638807 2.5358541895 -0.2177142857 + 19 0.0362844801 2.5397408207 -0.1088571429 + 20 0.1088238223 2.5376677040 -0.1451428571 + 21 0.1450638807 2.5358541895 -0.1814285714 + 22 0.0725615553 2.5389633358 -0.1088571429 + 23 0.1812743348 2.5335231626 -0.2540000000 + 24 0.1450638807 2.5358541895 -0.1451428571 + 25 0.1088238223 2.5376677040 -0.1088571429 + 26 0.0000000000 2.5400000000 -0.0725714286 + 27 0.1812743348 2.5335231626 -0.2177142857 + 28 0.0362844801 2.5397408207 -0.0725714286 + 29 0.1812743348 2.5335231626 -0.1814285714 + 30 0.0725615553 2.5389633358 -0.0725714286 + 31 0.1450638807 2.5358541895 -0.1088571429 + 32 0.1812743348 2.5335231626 -0.1451428571 + 33 0.1088238223 2.5376677040 -0.0725714286 + 34 0.2174477947 2.5306750990 -0.2540000000 + 35 0.0000000000 2.5400000000 -0.0362857143 + 36 0.2174477947 2.5306750990 -0.2177142857 + 37 0.0362844801 2.5397408207 -0.0362857143 + 38 0.2174477947 2.5306750990 -0.1814285714 + 39 0.0725615553 2.5389633358 -0.0362857143 + 40 0.1812743348 2.5335231626 -0.1088571429 + 41 0.1450638807 2.5358541895 -0.0725714286 + 42 0.2174477947 2.5306750990 -0.1451428571 + 43 0.1088238223 2.5376677040 -0.0362857143 + 44 0.2535768783 2.5273105798 -0.2540000000 + 45 0.0000000000 2.5400000000 0.0000000000 + 46 0.2535768783 2.5273105798 -0.2177142857 + 47 0.1812743348 2.5335231626 -0.0725714286 + 48 0.0362844801 2.5397408207 0.0000000000 + 49 0.2174477947 2.5306750990 -0.1088571429 + 50 0.1450638807 2.5358541895 -0.0362857143 + 51 0.2535768783 2.5273105798 -0.1814285714 + 52 0.0725615553 2.5389633358 0.0000000000 + 53 0.2535768783 2.5273105798 -0.1451428571 + 54 0.1088238223 2.5376677040 0.0000000000 + 55 0.2174477947 2.5306750990 -0.0725714286 + 56 0.1812743348 2.5335231626 -0.0362857143 + 57 0.2535768783 2.5273105798 -0.1088571429 + 58 0.1450638807 2.5358541895 0.0000000000 + 59 0.2174477947 2.5306750990 -0.0362857143 + 60 0.2535768783 2.5273105798 -0.0725714286 + 61 0.1812743348 2.5335231626 0.0000000000 + 62 0.2535768783 2.5273105798 -0.0362857143 + 63 0.2174477947 2.5306750990 0.0000000000 + 64 0.2535768783 2.5273105798 0.0000000000 +End Nodes + + +Begin Elements ShellThinElementCorotational3D4N// GUI group identifier: surface + 1 0 63 59 62 64 + 2 0 61 56 59 63 + 3 0 58 50 56 61 + 4 0 54 43 50 58 + 5 0 52 39 43 54 + 6 0 48 37 39 52 + 7 0 45 35 37 48 + 8 0 59 55 60 62 + 9 0 56 47 55 59 + 10 0 50 41 47 56 + 11 0 43 33 41 50 + 12 0 39 30 33 43 + 13 0 37 28 30 39 + 14 0 35 26 28 37 + 15 0 55 49 57 60 + 16 0 47 40 49 55 + 17 0 41 31 40 47 + 18 0 33 25 31 41 + 19 0 30 22 25 33 + 20 0 28 19 22 30 + 21 0 26 17 19 28 + 22 0 49 42 53 57 + 23 0 40 32 42 49 + 24 0 31 24 32 40 + 25 0 25 20 24 31 + 26 0 22 15 20 25 + 27 0 19 13 15 22 + 28 0 17 11 13 19 + 29 0 42 38 51 53 + 30 0 32 29 38 42 + 31 0 24 21 29 32 + 32 0 20 14 21 24 + 33 0 15 9 14 20 + 34 0 13 8 9 15 + 35 0 11 6 8 13 + 36 0 38 36 46 51 + 37 0 29 27 36 38 + 38 0 21 18 27 29 + 39 0 14 12 18 21 + 40 0 9 7 12 14 + 41 0 8 4 7 9 + 42 0 6 3 4 8 + 43 0 36 34 44 46 + 44 0 27 23 34 36 + 45 0 18 16 23 27 + 46 0 12 10 16 18 + 47 0 7 5 10 12 + 48 0 4 2 5 7 + 49 0 3 1 2 4 +End Elements + +Begin SubModelPart Parts_surface // Group surface // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_hinged_edges // Group hinged_edges // Subtree DISPLACEMENT + Begin SubModelPartNodes + 44 + 46 + 51 + 53 + 57 + 60 + 62 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_XY_sym // Group XY sym // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 5 + 10 + 16 + 23 + 34 + 44 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_YZ_sym // Group YZ sym // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 3 + 6 + 11 + 17 + 26 + 35 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_point_load // Group point_load // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_XY_sym // Group XY sym // Subtree ROTATION + Begin SubModelPartNodes + 1 + 2 + 5 + 10 + 16 + 23 + 34 + 44 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_YZ_sym // Group YZ sym // Subtree ROTATION + Begin SubModelPartNodes + 1 + 3 + 6 + 11 + 17 + 26 + 35 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test_materials.json new file mode 100644 index 000000000000..9da4e4d176a0 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test_materials.json @@ -0,0 +1,18 @@ +{ + "properties" : [{ + "model_part_name" : "Parts_surface", + "properties_id" : 1, + "Material" : { + "constitutive_law" : { + "name" : "KratosMultiphysics.StructuralMechanicsApplication.LinearElasticPlaneStress2DLaw" + }, + "Variables" : { + "THICKNESS" : 0.0127, + "DENSITY" : 7850.0, + "YOUNG_MODULUS" : 3102750000.0, + "POISSON_RATIO" : 0.3 + }, + "Tables" : {} + } + }] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test_parameters.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test_parameters.json new file mode 100644 index 000000000000..91898d91aa06 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test_parameters.json @@ -0,0 +1,151 @@ +{ + "problem_data" : { + "problem_name" : "Shell_Q4_Thin_nonlinear_static_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "parallel_type" : "OpenMP", + "time_step" : 0.05, + "start_time" : 0.0, + "end_time" : 1.0, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_static_solver", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Non-Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "shell_test/Shell_Q4_Thin_nonlinear_static_test", + "input_file_label" : 0 + }, + "material_import_settings" : { + "materials_filename" : "shell_test/Shell_Q4_Thin_nonlinear_static_test_materials.json" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 0.0001, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 20, + "problem_domain_sub_model_part_list" : ["Parts_surface"], + "processes_sub_model_part_list" : ["DISPLACEMENT_hinged_edges","DISPLACEMENT_XY_sym","DISPLACEMENT_YZ_sym","DISPLACEMENT_point_load","ROTATION_XY_sym","ROTATION_YZ_sym"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_hinged_edges", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,0.0,0.0], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_XY_sym", + "variable_name" : "DISPLACEMENT", + "value" : [null,null,0.0], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_YZ_sym", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,null,null], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_point_load", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,"-0.03*t",0.0], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_XY_sym", + "variable_name" : "ROTATION", + "value" : [0.0,0.0,null], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_YZ_sym", + "variable_name" : "ROTATION", + "value" : [null,0.0,0.0], + "interval" : [0.0,"End"] + } + }], + "loads_process_list" : [], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "material_import_settings" : { + "materials_filename" : "shell_test/Shell_Q4_Thin_nonlinear_static_test_materials.json.json" + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["REACTION_Y"], + "input_file_name" : "shell_test/Shell_Q4_Thin_nonlinear_static_test_results.json", + "model_part_name" : "DISPLACEMENT_point_load", + "time_frequency" : 0.01 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["REACTION_Y"], + "output_file_name" : "shell_test/Shell_Q4_Thin_nonlinear_static_test_results.json", + "model_part_name" : "DISPLACEMENT_point_load", + "time_frequency" : 0.01 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test_results.json new file mode 100644 index 000000000000..85eda8793fd6 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thin_nonlinear_static_test_results.json @@ -0,0 +1,2 @@ +{"NODE_1": {"REACTION_Y": [-138.12940869527307,-256.2134951290818,-355.104957538783,-435.21200515207545,-496.2981204284461,-537.1534005186636,-554.9924492583546,-544.2512113864643,-494.2889737551172,-389.4738514062867,-249.2437275658608,-158.27751999387846,-131.7757532160401,-151.010924835122,-205.257531799311,-289.64855297761216,-402.1039028899198,-541.9467526385534,-709.2707443711126,-904.6222017543705]}, + "TIME": [0.05,0.1,0.15000000000000002,0.2,0.25,0.3,0.35,0.39999999999999997,0.44999999999999996,0.49999999999999994,0.5499999999999999,0.6,0.65,0.7000000000000001,0.7500000000000001,0.8000000000000002,0.8500000000000002,0.9000000000000002,0.9500000000000003,1.0000000000000002]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test.mdpa new file mode 100644 index 000000000000..3a92a48f9c89 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test.mdpa @@ -0,0 +1,658 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties + +Begin Nodes + 1 2.00000 0.00000 0.00000 + 2 2.00000 0.28571 0.00000 + 3 1.71429 0.00000 0.00000 + 4 1.71429 0.28571 0.00000 + 5 1.42857 0.00000 0.00000 + 6 2.00000 0.57143 0.00000 + 7 1.42857 0.28571 0.00000 + 8 1.71429 0.57143 0.00000 + 9 1.42857 0.57143 0.00000 + 10 2.00000 0.85714 0.00000 + 11 1.14286 0.00000 0.00000 + 12 1.14286 0.28571 0.00000 + 13 1.71429 0.85714 0.00000 + 14 1.14286 0.57143 0.00000 + 15 1.42857 0.85714 0.00000 + 16 0.85714 0.00000 0.00000 + 17 2.00000 1.14286 0.00000 + 18 0.85714 0.28571 0.00000 + 19 1.71429 1.14286 0.00000 + 20 1.14286 0.85714 0.00000 + 21 1.42857 1.14286 0.00000 + 22 0.85714 0.57143 0.00000 + 23 1.14286 1.14286 0.00000 + 24 0.85714 0.85714 0.00000 + 25 2.00000 1.42857 0.00000 + 26 0.57143 0.00000 0.00000 + 27 0.57143 0.28571 0.00000 + 28 1.71429 1.42857 0.00000 + 29 0.57143 0.57143 0.00000 + 30 1.42857 1.42857 0.00000 + 31 0.85714 1.14286 0.00000 + 32 1.14286 1.42857 0.00000 + 33 0.57143 0.85714 0.00000 + 34 2.00000 1.71429 0.00000 + 35 0.28571 0.00000 0.00000 + 36 1.71429 1.71429 0.00000 + 37 0.28571 0.28571 0.00000 + 38 1.42857 1.71429 0.00000 + 39 0.28571 0.57143 0.00000 + 40 0.85714 1.42857 0.00000 + 41 0.57143 1.14286 0.00000 + 42 1.14286 1.71429 0.00000 + 43 0.28571 0.85714 0.00000 + 44 0.00000 0.00000 0.00000 + 45 2.00000 2.00000 0.00000 + 46 0.57143 1.42857 0.00000 + 47 0.00000 0.28571 0.00000 + 48 1.71429 2.00000 0.00000 + 49 0.85714 1.71429 0.00000 + 50 0.28571 1.14286 0.00000 + 51 0.00000 0.57143 0.00000 + 52 1.42857 2.00000 0.00000 + 53 1.14286 2.00000 0.00000 + 54 0.00000 0.85714 0.00000 + 55 0.57143 1.71429 0.00000 + 56 0.28571 1.42857 0.00000 + 57 0.85714 2.00000 0.00000 + 58 0.00000 1.14286 0.00000 + 59 0.28571 1.71429 0.00000 + 60 0.00000 1.42857 0.00000 + 61 0.57143 2.00000 0.00000 + 62 0.28571 2.00000 0.00000 + 63 0.00000 1.71429 0.00000 + 64 0.00000 2.00000 0.00000 +End Nodes + + +Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: surface + 1 0 35 37 44 + 2 0 37 47 44 + 3 0 26 27 35 + 4 0 27 37 35 + 5 0 16 18 26 + 6 0 18 27 26 + 7 0 11 12 16 + 8 0 12 18 16 + 9 0 5 7 11 + 10 0 7 12 11 + 11 0 3 4 5 + 12 0 4 7 5 + 13 0 1 2 3 + 14 0 2 4 3 + 15 0 37 39 47 + 16 0 39 51 47 + 17 0 27 29 37 + 18 0 29 39 37 + 19 0 18 22 27 + 20 0 22 29 27 + 21 0 12 14 18 + 22 0 14 22 18 + 23 0 7 9 12 + 24 0 9 14 12 + 25 0 4 8 7 + 26 0 8 9 7 + 27 0 2 6 4 + 28 0 6 8 4 + 29 0 39 43 51 + 30 0 43 54 51 + 31 0 29 33 39 + 32 0 33 43 39 + 33 0 22 24 29 + 34 0 24 33 29 + 35 0 14 20 22 + 36 0 20 24 22 + 37 0 9 15 14 + 38 0 15 20 14 + 39 0 8 13 9 + 40 0 13 15 9 + 41 0 6 10 8 + 42 0 10 13 8 + 43 0 43 50 54 + 44 0 50 58 54 + 45 0 33 41 43 + 46 0 41 50 43 + 47 0 24 31 33 + 48 0 31 41 33 + 49 0 20 23 24 + 50 0 23 31 24 + 51 0 15 21 20 + 52 0 21 23 20 + 53 0 13 19 15 + 54 0 19 21 15 + 55 0 10 17 13 + 56 0 17 19 13 + 57 0 50 56 58 + 58 0 56 60 58 + 59 0 41 46 50 + 60 0 46 56 50 + 61 0 31 40 41 + 62 0 40 46 41 + 63 0 23 32 31 + 64 0 32 40 31 + 65 0 21 30 23 + 66 0 30 32 23 + 67 0 19 28 21 + 68 0 28 30 21 + 69 0 17 25 19 + 70 0 25 28 19 + 71 0 56 59 60 + 72 0 59 63 60 + 73 0 46 55 56 + 74 0 55 59 56 + 75 0 40 49 46 + 76 0 49 55 46 + 77 0 32 42 40 + 78 0 42 49 40 + 79 0 30 38 32 + 80 0 38 42 32 + 81 0 28 36 30 + 82 0 36 38 30 + 83 0 25 34 28 + 84 0 34 36 28 + 85 0 59 62 63 + 86 0 62 64 63 + 87 0 55 61 59 + 88 0 61 62 59 + 89 0 49 57 55 + 90 0 57 61 55 + 91 0 42 53 49 + 92 0 53 57 49 + 93 0 38 52 42 + 94 0 52 53 42 + 95 0 36 48 38 + 96 0 48 52 38 + 97 0 34 45 36 + 98 0 45 48 36 +End Elements + +Begin Conditions SurfaceLoadCondition3D3N// GUI group identifier: surface +1 0 35 37 44 +2 0 37 47 44 +3 0 26 27 35 +4 0 27 37 35 +5 0 16 18 26 +6 0 18 27 26 +7 0 11 12 16 +8 0 12 18 16 +9 0 5 7 11 +10 0 7 12 11 +11 0 3 4 5 +12 0 4 7 5 +13 0 1 2 3 +14 0 2 4 3 +15 0 37 39 47 +16 0 39 51 47 +17 0 27 29 37 +18 0 29 39 37 +19 0 18 22 27 +20 0 22 29 27 +21 0 12 14 18 +22 0 14 22 18 +23 0 7 9 12 +24 0 9 14 12 +25 0 4 8 7 +26 0 8 9 7 +27 0 2 6 4 +28 0 6 8 4 +29 0 39 43 51 +30 0 43 54 51 +31 0 29 33 39 +32 0 33 43 39 +33 0 22 24 29 +34 0 24 33 29 +35 0 14 20 22 +36 0 20 24 22 +37 0 9 15 14 +38 0 15 20 14 +39 0 8 13 9 +40 0 13 15 9 +41 0 6 10 8 +42 0 10 13 8 +43 0 43 50 54 +44 0 50 58 54 +45 0 33 41 43 +46 0 41 50 43 +47 0 24 31 33 +48 0 31 41 33 +49 0 20 23 24 +50 0 23 31 24 +51 0 15 21 20 +52 0 21 23 20 +53 0 13 19 15 +54 0 19 21 15 +55 0 10 17 13 +56 0 17 19 13 +57 0 50 56 58 +58 0 56 60 58 +59 0 41 46 50 +60 0 46 56 50 +61 0 31 40 41 +62 0 40 46 41 +63 0 23 32 31 +64 0 32 40 31 +65 0 21 30 23 +66 0 30 32 23 +67 0 19 28 21 +68 0 28 30 21 +69 0 17 25 19 +70 0 25 28 19 +71 0 56 59 60 +72 0 59 63 60 +73 0 46 55 56 +74 0 55 59 56 +75 0 40 49 46 +76 0 49 55 46 +77 0 32 42 40 +78 0 42 49 40 +79 0 30 38 32 +80 0 38 42 32 +81 0 28 36 30 +82 0 36 38 30 +83 0 25 34 28 +84 0 34 36 28 +85 0 59 62 63 +86 0 62 64 63 +87 0 55 61 59 +88 0 61 62 59 +89 0 49 57 55 +90 0 57 61 55 +91 0 42 53 49 +92 0 53 57 49 +93 0 38 52 42 +94 0 52 53 42 +95 0 36 48 38 +96 0 48 52 38 +97 0 34 45 36 +98 0 45 48 36 +End Conditions + +Begin SubModelPart Parts_surface // Group surface // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_edge // Group edge // Subtree DISPLACEMENT + Begin SubModelPartNodes + 44 + 47 + 51 + 54 + 58 + 60 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_sample // Group sample // Subtree DISPLACEMENT + Begin SubModelPartNodes + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_edge // Group edge // Subtree ROTATION + Begin SubModelPartNodes + 44 + 47 + 51 + 54 + 58 + 60 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart SurfaceLoad3D_surface // Group surface // Subtree SurfaceLoad3D + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test_materials.json new file mode 100644 index 000000000000..0e5edc8e71a6 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test_materials.json @@ -0,0 +1,19 @@ +{ + "properties": [{ + "model_part_name": "Parts_surface", + "properties_id": 1, + "Material": { + "name": "Material", + "constitutive_law": { + "name": "KratosMultiphysics.StructuralMechanicsApplication.LinearElasticPlaneStress2DLaw" + }, + "Variables": { + "KratosMultiphysics.YOUNG_MODULUS": 1e6, + "KratosMultiphysics.POISSON_RATIO": 0.0, + "KratosMultiphysics.THICKNESS": 0.1, + "KratosMultiphysics.DENSITY": 7.85e3 + }, + "Tables": {} + } + }] +} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test_parameters.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test_parameters.json new file mode 100644 index 000000000000..2d49826f8401 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test_parameters.json @@ -0,0 +1,139 @@ +{ + "problem_data" : { + "problem_name" : "Shell_T3_Thick_linear_dynamic_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 1.125, + "start_time" : 0.0, + "end_time" : 25, + "echo_level" : 0 + }, + "material_import_settings" :{ + "materials_filename": "shell_test/Shell_T3_Thick_linear_dynamic_test_materials.json" + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_implicit_dynamic_solver", + "echo_level" : 0, + "solution_type" : "Dynamic", + "time_integration_method" : "Implicit", + "scheme_type" : "Newmark", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "shell_test/Shell_T3_Thick_linear_dynamic_test" + }, + "material_import_settings" :{ + "materials_filename": "shell_test/Shell_T3_Thick_linear_dynamic_test_materials.json" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-9, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 1e-9, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 500, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_surface"], + "processes_sub_model_part_list" : ["DISPLACEMENT_edge","DISPLACEMENT_sample","ROTATION_edge","SurfaceLoad3D_surface"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_edge", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_sample", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_edge", + "variable_name" : "ROTATION", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "assign_vector_by_direction_to_condition_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process sets a vector variable value over a condition", + "check" : "DirectorVectorNonZero direction", + "process_name" : "AssignModulusAndDirectionToConditionsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "SurfaceLoad3D_surface", + "variable_name" : "SURFACE_LOAD", + "modulus" : 0.25, + "direction" : [0.0,0.0,-1.0], + "interval" : [0.0,"End"] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Z"], + "input_file_name" : "shell_test/Shell_T3_Thick_linear_dynamic_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.001 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Z"], + "output_file_name" : "shell_test/Shell_T3_Thick_linear_dynamic_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.001 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test_results.json new file mode 100644 index 000000000000..511450aebaf0 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_dynamic_test_results.json @@ -0,0 +1,2 @@ +{"NODE_45": {"DISPLACEMENT_Z": [-0.00011400665819437383,-0.0006209392801146479,-0.0017362312347907894,-0.003373953675107737,-0.00520699895979988,-0.007040886939436091,-0.008854888394494644,-0.010468075577747999,-0.011569237394907025,-0.012023091957064386,-0.011947323438452697,-0.011388768782256444,-0.010232667571377986,-0.008575401532434761,-0.0067273787974905935,-0.004895532401220666,-0.0031224572337839895,-0.0015338908852690295,-0.000450802980269822,-3.581817059111277e-05,-0.00016854305179380048,-0.0007911876092695813,-0.0019795351049932595]}, + "TIME": [1.125,2.25,3.375,4.5,5.625,6.75,7.875,9.0,10.125,11.25,12.375,13.5,14.625,15.75,16.875,18.0,19.125,20.25,21.375,22.5,23.625,24.75,25.875]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test.mdpa new file mode 100644 index 000000000000..10f0f1a0d572 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test.mdpa @@ -0,0 +1,506 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties + +Begin Nodes + 1 0.00000 25.00000 25.00000 + 2 0.00000 21.87500 25.00000 + 3 4.34120 25.00000 24.62019 + 4 4.34120 21.87500 24.62019 + 5 0.00000 18.75000 25.00000 + 6 4.34120 18.75000 24.62019 + 7 8.55050 25.00000 23.49232 + 8 8.55050 21.87500 23.49232 + 9 0.00000 15.62500 25.00000 + 10 4.34120 15.62500 24.62019 + 11 8.55050 18.75000 23.49232 + 12 0.00000 12.50000 25.00000 + 13 8.55050 15.62500 23.49232 + 14 12.50000 25.00000 21.65064 + 15 4.34120 12.50000 24.62019 + 16 12.50000 21.87500 21.65064 + 17 12.50000 18.75000 21.65064 + 18 8.55050 12.50000 23.49232 + 19 0.00000 9.37500 25.00000 + 20 12.50000 15.62500 21.65064 + 21 4.34120 9.37500 24.62019 + 22 16.06969 25.00000 19.15111 + 23 16.06969 21.87500 19.15111 + 24 8.55050 9.37500 23.49232 + 25 12.50000 12.50000 21.65064 + 26 16.06969 18.75000 19.15111 + 27 0.00000 6.25000 25.00000 + 28 4.34120 6.25000 24.62019 + 29 16.06969 15.62500 19.15111 + 30 12.50000 9.37500 21.65064 + 31 8.55050 6.25000 23.49232 + 32 16.06969 12.50000 19.15111 + 33 0.00000 3.12500 25.00000 + 34 4.34120 3.12500 24.62019 + 35 12.50000 6.25000 21.65064 + 36 16.06969 9.37500 19.15111 + 37 8.55050 3.12500 23.49232 + 38 0.00000 0.00000 25.00000 + 39 4.34120 0.00000 24.62019 + 40 16.06969 6.25000 19.15111 + 41 12.50000 3.12500 21.65064 + 42 8.55050 0.00000 23.49232 + 43 16.06969 3.12500 19.15111 + 44 12.50000 0.00000 21.65064 + 45 16.06969 0.00000 19.15111 +End Nodes + + +Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface + 1 0 33 34 38 + 2 0 34 39 38 + 3 0 27 28 33 + 4 0 28 34 33 + 5 0 19 21 27 + 6 0 21 28 27 + 7 0 12 15 19 + 8 0 15 21 19 + 9 0 9 10 12 + 10 0 10 15 12 + 11 0 5 6 9 + 12 0 6 10 9 + 13 0 2 4 5 + 14 0 4 6 5 + 15 0 1 3 2 + 16 0 3 4 2 + 17 0 34 37 39 + 18 0 37 42 39 + 19 0 28 31 34 + 20 0 31 37 34 + 21 0 21 24 28 + 22 0 24 31 28 + 23 0 15 18 21 + 24 0 18 24 21 + 25 0 10 13 15 + 26 0 13 18 15 + 27 0 6 11 10 + 28 0 11 13 10 + 29 0 4 8 6 + 30 0 8 11 6 + 31 0 3 7 4 + 32 0 7 8 4 + 33 0 37 41 42 + 34 0 41 44 42 + 35 0 31 35 37 + 36 0 35 41 37 + 37 0 24 30 31 + 38 0 30 35 31 + 39 0 18 25 24 + 40 0 25 30 24 + 41 0 13 20 18 + 42 0 20 25 18 + 43 0 11 17 13 + 44 0 17 20 13 + 45 0 8 16 11 + 46 0 16 17 11 + 47 0 7 14 8 + 48 0 14 16 8 + 49 0 41 43 44 + 50 0 43 45 44 + 51 0 35 40 41 + 52 0 40 43 41 + 53 0 30 36 35 + 54 0 36 40 35 + 55 0 25 32 30 + 56 0 32 36 30 + 57 0 20 29 25 + 58 0 29 32 25 + 59 0 17 26 20 + 60 0 26 29 20 + 61 0 16 23 17 + 62 0 23 26 17 + 63 0 14 22 16 + 64 0 22 23 16 +End Elements + +Begin Conditions SurfaceLoadCondition3D3N// GUI group identifier: Surface +1 0 33 34 38 +2 0 34 39 38 +3 0 27 28 33 +4 0 28 34 33 +5 0 19 21 27 +6 0 21 28 27 +7 0 12 15 19 +8 0 15 21 19 +9 0 9 10 12 +10 0 10 15 12 +11 0 5 6 9 +12 0 6 10 9 +13 0 2 4 5 +14 0 4 6 5 +15 0 1 3 2 +16 0 3 4 2 +17 0 34 37 39 +18 0 37 42 39 +19 0 28 31 34 +20 0 31 37 34 +21 0 21 24 28 +22 0 24 31 28 +23 0 15 18 21 +24 0 18 24 21 +25 0 10 13 15 +26 0 13 18 15 +27 0 6 11 10 +28 0 11 13 10 +29 0 4 8 6 +30 0 8 11 6 +31 0 3 7 4 +32 0 7 8 4 +33 0 37 41 42 +34 0 41 44 42 +35 0 31 35 37 +36 0 35 41 37 +37 0 24 30 31 +38 0 30 35 31 +39 0 18 25 24 +40 0 25 30 24 +41 0 13 20 18 +42 0 20 25 18 +43 0 11 17 13 +44 0 17 20 13 +45 0 8 16 11 +46 0 16 17 11 +47 0 7 14 8 +48 0 14 16 8 +49 0 41 43 44 +50 0 43 45 44 +51 0 35 40 41 +52 0 40 43 41 +53 0 30 36 35 +54 0 36 40 35 +55 0 25 32 30 +56 0 32 36 30 +57 0 20 29 25 +58 0 29 32 25 +59 0 17 26 20 +60 0 26 29 20 +61 0 16 23 17 +62 0 23 26 17 +63 0 14 22 16 +64 0 22 23 16 +End Conditions + +Begin SubModelPart Parts_surface // Group Surface // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_Dirichlet // Group Dirichlet // Subtree DISPLACEMENT + Begin SubModelPartNodes + 38 + 39 + 42 + 44 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_YZ_sym // Group YZ sym // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 5 + 9 + 12 + 19 + 27 + 33 + 38 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_XZ_sym // Group XZ sym // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 3 + 7 + 14 + 22 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_sample // Group sample // Subtree DISPLACEMENT + Begin SubModelPartNodes + 22 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_YZ_sym // Group YZ sym // Subtree ROTATION + Begin SubModelPartNodes + 1 + 2 + 5 + 9 + 12 + 19 + 27 + 33 + 38 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_XZ_sym // Group XZ sym // Subtree ROTATION + Begin SubModelPartNodes + 1 + 3 + 7 + 14 + 22 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart SurfaceLoad3D_Surface // Group Surface // Subtree SurfaceLoad3D + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test_materials.json new file mode 100644 index 000000000000..99fd07284f49 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test_materials.json @@ -0,0 +1,19 @@ +{ + "properties": [{ + "model_part_name": "Parts_surface", + "properties_id": 1, + "Material": { + "name": "Material", + "constitutive_law": { + "name": "KratosMultiphysics.StructuralMechanicsApplication.LinearElasticPlaneStress2DLaw" + }, + "Variables": { + "KratosMultiphysics.YOUNG_MODULUS": 4.32e8, + "KratosMultiphysics.POISSON_RATIO": 0.0, + "KratosMultiphysics.THICKNESS": 0.25, + "KratosMultiphysics.DENSITY": 3.6e2 + }, + "Tables": {} + } + }] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test_parameters.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test_parameters.json new file mode 100644 index 000000000000..7b3e4822e152 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test_parameters.json @@ -0,0 +1,177 @@ +{ + "problem_data" : { + "problem_name" : "Shell_T3_Thick_linear_static_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 1.1, + "start_time" : 0.0, + "end_time" : 1.0, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_static_solver", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "shell_test/Shell_T3_Thick_linear_static_test" + }, + "material_import_settings" :{ + "materials_filename": "shell_test/Shell_T3_Thick_linear_static_test_materials.json" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-9, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 1e-9, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 10, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_surface"], + "processes_sub_model_part_list" : ["DISPLACEMENT_Dirichlet","DISPLACEMENT_YZ_sym","DISPLACEMENT_XZ_sym","DISPLACEMENT_sample","ROTATION_YZ_sym","ROTATION_XZ_sym","SurfaceLoad3D_Surface"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_Dirichlet", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_YZ_sym", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_XZ_sym", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : true, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_sample", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_YZ_sym", + "variable_name" : "ROTATION", + "is_fixed_x" : false, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_XZ_sym", + "variable_name" : "ROTATION", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [ { + "python_module" : "assign_vector_by_direction_to_condition_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process sets a vector variable value over a condition", + "check" : "DirectorVectorNonZero direction", + "process_name" : "AssignModulusAndDirectionToConditionsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "SurfaceLoad3D_Surface", + "variable_name" : "SURFACE_LOAD", + "modulus" : 90, + "direction" : [0.0,0.0,-1], + "interval" : [0.0,"End"] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Z"], + "input_file_name" : "shell_test/Shell_T3_Thick_linear_static_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.9 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Z"], + "output_file_name" : "shell_test/Shell_T3_Thick_linear_static_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.9 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test_results.json new file mode 100644 index 000000000000..a6a1beef7d7d --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_linear_static_test_results.json @@ -0,0 +1,2 @@ +{"NODE_22": {"DISPLACEMENT_Z": [-0.2601644174767296]}, + "TIME": [1.1]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test.mdpa new file mode 100644 index 000000000000..2a2b19bf6343 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test.mdpa @@ -0,0 +1,459 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties + +Begin Nodes + 1 1.00000 0.00000 0.00000 + 2 1.00000 0.14286 0.00000 + 3 0.85714 0.00000 0.00000 + 4 0.85714 0.14286 0.00000 + 5 0.71429 0.00000 0.00000 + 6 1.00000 0.28571 0.00000 + 7 0.71429 0.14286 0.00000 + 8 0.85714 0.28571 0.00000 + 9 0.71429 0.28571 0.00000 + 10 1.00000 0.42857 0.00000 + 11 0.57143 0.00000 0.00000 + 12 0.57143 0.14286 0.00000 + 13 0.85714 0.42857 0.00000 + 14 0.57143 0.28571 0.00000 + 15 0.71429 0.42857 0.00000 + 16 0.42857 0.00000 0.00000 + 17 1.00000 0.57143 0.00000 + 18 0.42857 0.14286 0.00000 + 19 0.85714 0.57143 0.00000 + 20 0.57143 0.42857 0.00000 + 21 0.71429 0.57143 0.00000 + 22 0.42857 0.28571 0.00000 + 23 0.57143 0.57143 0.00000 + 24 0.42857 0.42857 0.00000 + 25 1.00000 0.71429 0.00000 + 26 0.28571 0.00000 0.00000 + 27 0.28571 0.14286 0.00000 + 28 0.85714 0.71429 0.00000 + 29 0.28571 0.28571 0.00000 + 30 0.71429 0.71429 0.00000 + 31 0.42857 0.57143 0.00000 + 32 0.57143 0.71429 0.00000 + 33 0.28571 0.42857 0.00000 + 34 1.00000 0.85714 0.00000 + 35 0.14286 0.00000 0.00000 + 36 0.85714 0.85714 0.00000 + 37 0.14286 0.14286 0.00000 + 38 0.71429 0.85714 0.00000 + 39 0.14286 0.28571 0.00000 + 40 0.42857 0.71429 0.00000 + 41 0.28571 0.57143 0.00000 + 42 0.57143 0.85714 0.00000 + 43 0.14286 0.42857 0.00000 + 44 0.00000 0.00000 0.00000 + 45 1.00000 1.00000 0.00000 + 46 0.28571 0.71429 0.00000 + 47 0.00000 0.14286 0.00000 + 48 0.85714 1.00000 0.00000 + 49 0.42857 0.85714 0.00000 + 50 0.14286 0.57143 0.00000 + 51 0.00000 0.28571 0.00000 + 52 0.71429 1.00000 0.00000 + 53 0.57143 1.00000 0.00000 + 54 0.00000 0.42857 0.00000 + 55 0.28571 0.85714 0.00000 + 56 0.14286 0.71429 0.00000 + 57 0.42857 1.00000 0.00000 + 58 0.00000 0.57143 0.00000 + 59 0.14286 0.85714 0.00000 + 60 0.00000 0.71429 0.00000 + 61 0.28571 1.00000 0.00000 + 62 0.14286 1.00000 0.00000 + 63 0.00000 0.85714 0.00000 + 64 0.00000 1.00000 0.00000 +End Nodes + + +Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: surface + 1 0 35 37 44 + 2 0 37 47 44 + 3 0 26 27 35 + 4 0 27 37 35 + 5 0 16 18 26 + 6 0 18 27 26 + 7 0 11 12 16 + 8 0 12 18 16 + 9 0 5 7 11 + 10 0 7 12 11 + 11 0 3 4 5 + 12 0 4 7 5 + 13 0 1 2 3 + 14 0 2 4 3 + 15 0 37 39 47 + 16 0 39 51 47 + 17 0 27 29 37 + 18 0 29 39 37 + 19 0 18 22 27 + 20 0 22 29 27 + 21 0 12 14 18 + 22 0 14 22 18 + 23 0 7 9 12 + 24 0 9 14 12 + 25 0 4 8 7 + 26 0 8 9 7 + 27 0 2 6 4 + 28 0 6 8 4 + 29 0 39 43 51 + 30 0 43 54 51 + 31 0 29 33 39 + 32 0 33 43 39 + 33 0 22 24 29 + 34 0 24 33 29 + 35 0 14 20 22 + 36 0 20 24 22 + 37 0 9 15 14 + 38 0 15 20 14 + 39 0 8 13 9 + 40 0 13 15 9 + 41 0 6 10 8 + 42 0 10 13 8 + 43 0 43 50 54 + 44 0 50 58 54 + 45 0 33 41 43 + 46 0 41 50 43 + 47 0 24 31 33 + 48 0 31 41 33 + 49 0 20 23 24 + 50 0 23 31 24 + 51 0 15 21 20 + 52 0 21 23 20 + 53 0 13 19 15 + 54 0 19 21 15 + 55 0 10 17 13 + 56 0 17 19 13 + 57 0 50 56 58 + 58 0 56 60 58 + 59 0 41 46 50 + 60 0 46 56 50 + 61 0 31 40 41 + 62 0 40 46 41 + 63 0 23 32 31 + 64 0 32 40 31 + 65 0 21 30 23 + 66 0 30 32 23 + 67 0 19 28 21 + 68 0 28 30 21 + 69 0 17 25 19 + 70 0 25 28 19 + 71 0 56 59 60 + 72 0 59 63 60 + 73 0 46 55 56 + 74 0 55 59 56 + 75 0 40 49 46 + 76 0 49 55 46 + 77 0 32 42 40 + 78 0 42 49 40 + 79 0 30 38 32 + 80 0 38 42 32 + 81 0 28 36 30 + 82 0 36 38 30 + 83 0 25 34 28 + 84 0 34 36 28 + 85 0 59 62 63 + 86 0 62 64 63 + 87 0 55 61 59 + 88 0 61 62 59 + 89 0 49 57 55 + 90 0 57 61 55 + 91 0 42 53 49 + 92 0 53 57 49 + 93 0 38 52 42 + 94 0 52 53 42 + 95 0 36 48 38 + 96 0 48 52 38 + 97 0 34 45 36 + 98 0 45 48 36 +End Elements + +Begin SubModelPart Parts_surface // Group surface // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_edge // Group edge // Subtree DISPLACEMENT + Begin SubModelPartNodes + 44 + 47 + 51 + 54 + 58 + 60 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_sample // Group sample // Subtree DISPLACEMENT + Begin SubModelPartNodes + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_edge // Group edge // Subtree ROTATION + Begin SubModelPartNodes + 44 + 47 + 51 + 54 + 58 + 60 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart SelfWeight3D_surface // Group surface // Subtree SelfWeight3D + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test_materials.json new file mode 100644 index 000000000000..4d0e668cffd1 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test_materials.json @@ -0,0 +1,19 @@ +{ + "properties": [{ + "model_part_name": "Parts_surface", + "properties_id": 1, + "Material": { + "name": "Material", + "constitutive_law": { + "name": "KratosMultiphysics.StructuralMechanicsApplication.LinearElasticPlaneStress2DLaw" + }, + "Variables": { + "KratosMultiphysics.YOUNG_MODULUS": 1e9, + "KratosMultiphysics.POISSON_RATIO": 0.3, + "KratosMultiphysics.THICKNESS": 0.1, + "KratosMultiphysics.DENSITY": 7.85e3 + }, + "Tables": {} + } + }] +} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test_parameters.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test_parameters.json new file mode 100644 index 000000000000..d92fbaf397b3 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test_parameters.json @@ -0,0 +1,135 @@ +{ + "problem_data" : { + "problem_name" : "Shell_T3_Thick_nonlinear_dynamic_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 0.05, + "start_time" : 0.0, + "end_time" : 1.0, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_implicit_dynamic_solver", + "echo_level" : 0, + "solution_type" : "Dynamic", + "time_integration_method" : "Implicit", + "scheme_type" : "Newmark", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "shell_test/Shell_T3_Thick_nonlinear_dynamic_test" + }, + "material_import_settings" :{ + "materials_filename": "shell_test/Shell_T3_Thick_nonlinear_dynamic_test_materials.json" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-9, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 1e-9, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 100, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_surface"], + "processes_sub_model_part_list" : ["DISPLACEMENT_edge","DISPLACEMENT_sample","ROTATION_edge","SelfWeight3D_surface"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_edge", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_sample", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : false, + "is_fixed_z" : false, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_edge", + "variable_name" : "ROTATION", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "process_factory", + "kratos_module" : "KratosMultiphysics", + "check" : "DirectorVectorNonZero direction", + "help" : "This process ", + "process_name" : "ApplyConstantVectorValueProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "SelfWeight3D_surface", + "variable_name" : "VOLUME_ACCELERATION", + "modulus" : 9.8, + "direction" : [0.0,0.0,-1.0] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Z"], + "input_file_name" : "shell_test/Shell_T3_Thick_nonlinear_dynamic_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.001 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Z"], + "output_file_name" : "shell_test/Shell_T3_Thick_nonlinear_dynamic_test_results.json", + "model_part_name" : "DISPLACEMENT_sample", + "time_frequency" : 0.001 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test_results.json new file mode 100644 index 000000000000..e4eb890feb41 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_dynamic_test_results.json @@ -0,0 +1,2 @@ +{"NODE_45": {"DISPLACEMENT_Z": [-0.008849734934875697,-0.04511157658072121,-0.11749624709869734,-0.22399948564112002,-0.36059591648383654,-0.5180617936953309,-0.6815362848918504,-0.8305890062647888,-0.9421970666064187,-0.9967607696248728,-0.983801074463143,-0.9058226189731515,-0.7774102782371469,-0.6203052490943718,-0.4568972230636574,-0.3059110669403679,-0.17993381318730978,-0.08594332020910972,-0.027161960236743925,-0.004530816628991271]}, + "TIME": [0.05,0.1,0.15000000000000002,0.2,0.25,0.3,0.35,0.39999999999999997,0.44999999999999996,0.49999999999999994,0.5499999999999999,0.6,0.65,0.7000000000000001,0.7500000000000001,0.8000000000000002,0.8500000000000002,0.9000000000000002,0.9500000000000003,1.0000000000000002]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test.mdpa new file mode 100644 index 000000000000..a1254901d164 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test.mdpa @@ -0,0 +1,434 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Nodes + 1 0.0000000000 2.5400000000 -0.2540000000 + 2 0.0362844801 2.5397408207 -0.2540000000 + 3 0.0000000000 2.5400000000 -0.2177142857 + 4 0.0362844801 2.5397408207 -0.2177142857 + 5 0.0725615553 2.5389633358 -0.2540000000 + 6 0.0000000000 2.5400000000 -0.1814285714 + 7 0.0725615553 2.5389633358 -0.2177142857 + 8 0.0362844801 2.5397408207 -0.1814285714 + 9 0.0725615553 2.5389633358 -0.1814285714 + 10 0.1088238223 2.5376677040 -0.2540000000 + 11 0.0000000000 2.5400000000 -0.1451428571 + 12 0.1088238223 2.5376677040 -0.2177142857 + 13 0.0362844801 2.5397408207 -0.1451428571 + 14 0.1088238223 2.5376677040 -0.1814285714 + 15 0.0725615553 2.5389633358 -0.1451428571 + 16 0.1450638807 2.5358541895 -0.2540000000 + 17 0.0000000000 2.5400000000 -0.1088571429 + 18 0.1450638807 2.5358541895 -0.2177142857 + 19 0.0362844801 2.5397408207 -0.1088571429 + 20 0.1088238223 2.5376677040 -0.1451428571 + 21 0.1450638807 2.5358541895 -0.1814285714 + 22 0.0725615553 2.5389633358 -0.1088571429 + 23 0.1812743348 2.5335231626 -0.2540000000 + 24 0.1450638807 2.5358541895 -0.1451428571 + 25 0.1088238223 2.5376677040 -0.1088571429 + 26 0.0000000000 2.5400000000 -0.0725714286 + 27 0.1812743348 2.5335231626 -0.2177142857 + 28 0.0362844801 2.5397408207 -0.0725714286 + 29 0.1812743348 2.5335231626 -0.1814285714 + 30 0.0725615553 2.5389633358 -0.0725714286 + 31 0.1450638807 2.5358541895 -0.1088571429 + 32 0.1812743348 2.5335231626 -0.1451428571 + 33 0.1088238223 2.5376677040 -0.0725714286 + 34 0.2174477947 2.5306750990 -0.2540000000 + 35 0.0000000000 2.5400000000 -0.0362857143 + 36 0.2174477947 2.5306750990 -0.2177142857 + 37 0.0362844801 2.5397408207 -0.0362857143 + 38 0.2174477947 2.5306750990 -0.1814285714 + 39 0.0725615553 2.5389633358 -0.0362857143 + 40 0.1812743348 2.5335231626 -0.1088571429 + 41 0.1450638807 2.5358541895 -0.0725714286 + 42 0.2174477947 2.5306750990 -0.1451428571 + 43 0.1088238223 2.5376677040 -0.0362857143 + 44 0.2535768783 2.5273105798 -0.2540000000 + 45 0.0000000000 2.5400000000 0.0000000000 + 46 0.2535768783 2.5273105798 -0.2177142857 + 47 0.1812743348 2.5335231626 -0.0725714286 + 48 0.0362844801 2.5397408207 0.0000000000 + 49 0.2174477947 2.5306750990 -0.1088571429 + 50 0.1450638807 2.5358541895 -0.0362857143 + 51 0.2535768783 2.5273105798 -0.1814285714 + 52 0.0725615553 2.5389633358 0.0000000000 + 53 0.2535768783 2.5273105798 -0.1451428571 + 54 0.1088238223 2.5376677040 0.0000000000 + 55 0.2174477947 2.5306750990 -0.0725714286 + 56 0.1812743348 2.5335231626 -0.0362857143 + 57 0.2535768783 2.5273105798 -0.1088571429 + 58 0.1450638807 2.5358541895 0.0000000000 + 59 0.2174477947 2.5306750990 -0.0362857143 + 60 0.2535768783 2.5273105798 -0.0725714286 + 61 0.1812743348 2.5335231626 0.0000000000 + 62 0.2535768783 2.5273105798 -0.0362857143 + 63 0.2174477947 2.5306750990 0.0000000000 + 64 0.2535768783 2.5273105798 0.0000000000 +End Nodes + + +Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: surface + 1 0 63 59 64 + 2 0 59 62 64 + 3 0 61 56 63 + 4 0 56 59 63 + 5 0 58 50 61 + 6 0 50 56 61 + 7 0 54 43 58 + 8 0 43 50 58 + 9 0 52 39 54 + 10 0 39 43 54 + 11 0 48 37 52 + 12 0 37 39 52 + 13 0 45 35 48 + 14 0 35 37 48 + 15 0 59 55 62 + 16 0 55 60 62 + 17 0 56 47 59 + 18 0 47 55 59 + 19 0 50 41 56 + 20 0 41 47 56 + 21 0 43 33 50 + 22 0 33 41 50 + 23 0 39 30 43 + 24 0 30 33 43 + 25 0 37 28 39 + 26 0 28 30 39 + 27 0 35 26 37 + 28 0 26 28 37 + 29 0 55 49 60 + 30 0 49 57 60 + 31 0 47 40 55 + 32 0 40 49 55 + 33 0 41 31 47 + 34 0 31 40 47 + 35 0 33 25 41 + 36 0 25 31 41 + 37 0 30 22 33 + 38 0 22 25 33 + 39 0 28 19 30 + 40 0 19 22 30 + 41 0 26 17 28 + 42 0 17 19 28 + 43 0 49 42 57 + 44 0 42 53 57 + 45 0 40 32 49 + 46 0 32 42 49 + 47 0 31 24 40 + 48 0 24 32 40 + 49 0 25 20 31 + 50 0 20 24 31 + 51 0 22 15 25 + 52 0 15 20 25 + 53 0 19 13 22 + 54 0 13 15 22 + 55 0 17 11 19 + 56 0 11 13 19 + 57 0 42 38 53 + 58 0 38 51 53 + 59 0 32 29 42 + 60 0 29 38 42 + 61 0 24 21 32 + 62 0 21 29 32 + 63 0 20 14 24 + 64 0 14 21 24 + 65 0 15 9 20 + 66 0 9 14 20 + 67 0 13 8 15 + 68 0 8 9 15 + 69 0 11 6 13 + 70 0 6 8 13 + 71 0 38 36 51 + 72 0 36 46 51 + 73 0 29 27 38 + 74 0 27 36 38 + 75 0 21 18 29 + 76 0 18 27 29 + 77 0 14 12 21 + 78 0 12 18 21 + 79 0 9 7 14 + 80 0 7 12 14 + 81 0 8 4 9 + 82 0 4 7 9 + 83 0 6 3 8 + 84 0 3 4 8 + 85 0 36 34 46 + 86 0 34 44 46 + 87 0 27 23 36 + 88 0 23 34 36 + 89 0 18 16 27 + 90 0 16 23 27 + 91 0 12 10 18 + 92 0 10 16 18 + 93 0 7 5 12 + 94 0 5 10 12 + 95 0 4 2 7 + 96 0 2 5 7 + 97 0 3 1 4 + 98 0 1 2 4 +End Elements + +Begin SubModelPart Parts_surface // Group surface // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_hinged_edges // Group hinged_edges // Subtree DISPLACEMENT + Begin SubModelPartNodes + 44 + 46 + 51 + 53 + 57 + 60 + 62 + 64 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_XY_sym // Group XY sym // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 5 + 10 + 16 + 23 + 34 + 44 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_YZ_sym // Group YZ sym // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 3 + 6 + 11 + 17 + 26 + 35 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_point_load // Group point_load // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_XY_sym // Group XY sym // Subtree ROTATION + Begin SubModelPartNodes + 1 + 2 + 5 + 10 + 16 + 23 + 34 + 44 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart ROTATION_YZ_sym // Group YZ sym // Subtree ROTATION + Begin SubModelPartNodes + 1 + 3 + 6 + 11 + 17 + 26 + 35 + 45 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test_materials.json new file mode 100644 index 000000000000..9da4e4d176a0 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test_materials.json @@ -0,0 +1,18 @@ +{ + "properties" : [{ + "model_part_name" : "Parts_surface", + "properties_id" : 1, + "Material" : { + "constitutive_law" : { + "name" : "KratosMultiphysics.StructuralMechanicsApplication.LinearElasticPlaneStress2DLaw" + }, + "Variables" : { + "THICKNESS" : 0.0127, + "DENSITY" : 7850.0, + "YOUNG_MODULUS" : 3102750000.0, + "POISSON_RATIO" : 0.3 + }, + "Tables" : {} + } + }] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test_parameters.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test_parameters.json new file mode 100644 index 000000000000..b17cf7ea3499 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test_parameters.json @@ -0,0 +1,151 @@ +{ + "problem_data" : { + "problem_name" : "Shell_T3_Thick_nonlinear_static_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "parallel_type" : "OpenMP", + "time_step" : 0.05, + "start_time" : 0.0, + "end_time" : 1.0, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_static_solver", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Non-Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "shell_test/Shell_T3_Thick_nonlinear_static_test", + "input_file_label" : 0 + }, + "material_import_settings" : { + "materials_filename" : "shell_test/Shell_T3_Thick_nonlinear_static_test_materials.json" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 0.0001, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 20, + "problem_domain_sub_model_part_list" : ["Parts_surface"], + "processes_sub_model_part_list" : ["DISPLACEMENT_hinged_edges","DISPLACEMENT_XY_sym","DISPLACEMENT_YZ_sym","DISPLACEMENT_point_load","ROTATION_XY_sym","ROTATION_YZ_sym"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_hinged_edges", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,0.0,0.0], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_XY_sym", + "variable_name" : "DISPLACEMENT", + "value" : [null,null,0.0], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_YZ_sym", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,null,null], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_point_load", + "variable_name" : "DISPLACEMENT", + "value" : [0.0,"-0.03*t",0.0], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_XY_sym", + "variable_name" : "ROTATION", + "value" : [0.0,0.0,null], + "interval" : [0.0,"End"] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "ROTATION_YZ_sym", + "variable_name" : "ROTATION", + "value" : [null,0.0,0.0], + "interval" : [0.0,"End"] + } + }], + "loads_process_list" : [], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "material_import_settings" : { + "materials_filename" : "shell_test/Shell_T3_Thick_nonlinear_static_test_materials.json" + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["REACTION_Y"], + "input_file_name" : "shell_test/Shell_T3_Thick_nonlinear_static_test_results.json", + "model_part_name" : "DISPLACEMENT_point_load", + "time_frequency" : 0.01 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["REACTION_Y"], + "output_file_name" : "shell_test/Shell_T3_Thick_nonlinear_static_test_results.json", + "model_part_name" : "DISPLACEMENT_point_load", + "time_frequency" : 0.01 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test_results.json new file mode 100644 index 000000000000..f73e6d1d1ea1 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3_Thick_nonlinear_static_test_results.json @@ -0,0 +1,2 @@ +{"NODE_1": {"REACTION_Y": [-140.6796004761226,-259.8739052099861,-358.72492691930915,-437.9222378687997,-497.5376757789361,-536.7572394721957,-553.3745754307955,-542.6989786737097,-495.0591874363887,-392.82801023576627,-247.4471461582008,-154.8652858148728,-129.2718518320624,-149.1163339142163,-204.1916690673401,-290.36819730678536,-406.1377660601811,-551.2772423830974,-726.2774892049855,-932.0645207076085]}, + "TIME": [0.05,0.1,0.15000000000000002,0.2,0.25,0.3,0.35,0.39999999999999997,0.44999999999999996,0.49999999999999994,0.5499999999999999,0.6,0.65,0.7000000000000001,0.7500000000000001,0.8000000000000002,0.8500000000000002,0.9000000000000002,0.9500000000000003,1.0000000000000002]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/test_StructuralMechanicsApplication.py b/applications/StructuralMechanicsApplication/tests/test_StructuralMechanicsApplication.py index dbb54ac4f5c6..300406fff95c 100644 --- a/applications/StructuralMechanicsApplication/tests/test_StructuralMechanicsApplication.py +++ b/applications/StructuralMechanicsApplication/tests/test_StructuralMechanicsApplication.py @@ -22,68 +22,95 @@ # Simple patch tests from test_patch_test_small_strain import TestPatchTestSmallStrain as TTestPatchTestSmallStrain from test_patch_test_large_strain import TestPatchTestLargeStrain as TTestPatchTestLargeStrain -from test_quadratic_elements import TestQuadraticElements as TTestQuadraticElements +from test_quadratic_elements import TestQuadraticElements as TTestQuadraticElements +from test_patch_test_shells import TestPatchTestShells as TTestPatchTestShells # Test loading conditions -from test_loading_conditions import TestLoadingConditions as TestLoadingConditions +from test_loading_conditions import TestLoadingConditions as TestLoadingConditions # Basic moving mesh test -from SmallTests import SimpleMeshMovingTest as TSimpleMeshMovingTest +from SmallTests import SimpleMeshMovingTest as TSimpleMeshMovingTest # Dynamic basic tests -from SmallTests import DynamicBossakTests as TDynamicBossakTests -from SmallTests import DynamicNewmarkTests as TDynamicNewmarkTests +from SmallTests import DynamicBossakTests as TDynamicBossakTests +from SmallTests import DynamicNewmarkTests as TDynamicNewmarkTests # Nodal damping test -from test_nodal_damping import NodalDampingTests as TNodalDampingTests +from test_nodal_damping import NodalDampingTests as TNodalDampingTests # Patch test Small Displacements -from SmallTests import SDTwoDShearQuaPatchTest as TSDTwoDShearQuaPatchTest -from SmallTests import SDTwoDShearTriPatchTest as TSDTwoDShearTriPatchTest -from SmallTests import SDTwoDTensionQuaPatchTest as TSDTwoDTensionQuaPatchTest -from SmallTests import SDTwoDTensionTriPatchTest as TSDTwoDTensionTriPatchTest -from SmallTests import SDThreeDShearHexaPatchTest as TSDThreeDShearHexaPatchTest -from SmallTests import SDThreeDShearTetraPatchTest as TSDThreeDShearTetraPatchTest -from SmallTests import SDThreeDTensionHexaPatchTest as TSDThreeDTensionHexaPatchTest -from SmallTests import SDThreeDTensionTetraPatchTest as TSDThreeDTensionTetraPatchTest +from SmallTests import SDTwoDShearQuaPatchTest as TSDTwoDShearQuaPatchTest +from SmallTests import SDTwoDShearTriPatchTest as TSDTwoDShearTriPatchTest +from SmallTests import SDTwoDTensionQuaPatchTest as TSDTwoDTensionQuaPatchTest +from SmallTests import SDTwoDTensionTriPatchTest as TSDTwoDTensionTriPatchTest +from SmallTests import SDThreeDShearHexaPatchTest as TSDThreeDShearHexaPatchTest +from SmallTests import SDThreeDShearTetraPatchTest as TSDThreeDShearTetraPatchTest +from SmallTests import SDThreeDTensionHexaPatchTest as TSDThreeDTensionHexaPatchTest +from SmallTests import SDThreeDTensionTetraPatchTest as TSDThreeDTensionTetraPatchTest # Patch test Total Lagrangian -from SmallTests import TLTwoDShearQuaPatchTest as TTLTwoDShearQuaPatchTest -from SmallTests import TLTwoDShearTriPatchTest as TTLTwoDShearTriPatchTest -from SmallTests import TLTwoDTensionQuaPatchTest as TTLTwoDTensionQuaPatchTest -from SmallTests import TLTwoDTensionTriPatchTest as TTLTwoDTensionTriPatchTest -from SmallTests import TLThreeDShearHexaPatchTest as TTLThreeDShearHexaPatchTest -from SmallTests import TLThreeDShearTetraPatchTest as TTLThreeDShearTetraPatchTest -from SmallTests import TLThreeDTensionHexaPatchTest as TTLThreeDTensionHexaPatchTest -from SmallTests import TLThreeDTensionTetraPatchTest as TTLThreeDTensionTetraPatchTest +from SmallTests import TLTwoDShearQuaPatchTest as TTLTwoDShearQuaPatchTest +from SmallTests import TLTwoDShearTriPatchTest as TTLTwoDShearTriPatchTest +from SmallTests import TLTwoDTensionQuaPatchTest as TTLTwoDTensionQuaPatchTest +from SmallTests import TLTwoDTensionTriPatchTest as TTLTwoDTensionTriPatchTest +from SmallTests import TLThreeDShearHexaPatchTest as TTLThreeDShearHexaPatchTest +from SmallTests import TLThreeDShearTetraPatchTest as TTLThreeDShearTetraPatchTest +from SmallTests import TLThreeDTensionHexaPatchTest as TTLThreeDTensionHexaPatchTest +from SmallTests import TLThreeDTensionTetraPatchTest as TTLThreeDTensionTetraPatchTest # Patch test Updated Lagrangian -from SmallTests import ULTwoDShearQuaPatchTest as TULTwoDShearQuaPatchTest -from SmallTests import ULTwoDShearTriPatchTest as TULTwoDShearTriPatchTest -from SmallTests import ULTwoDTensionQuaPatchTest as TULTwoDTensionQuaPatchTest -from SmallTests import ULTwoDTensionTriPatchTest as TULTwoDTensionTriPatchTest -from SmallTests import ULThreeDShearHexaPatchTest as TULThreeDShearHexaPatchTest -from SmallTests import ULThreeDShearTetraPatchTest as TULThreeDShearTetraPatchTest -from SmallTests import ULThreeDTensionHexaPatchTest as TULThreeDTensionHexaPatchTest -from SmallTests import ULThreeDTensionTetraPatchTest as TULThreeDTensionTetraPatchTest +from SmallTests import ULTwoDShearQuaPatchTest as TULTwoDShearQuaPatchTest +from SmallTests import ULTwoDShearTriPatchTest as TULTwoDShearTriPatchTest +from SmallTests import ULTwoDTensionQuaPatchTest as TULTwoDTensionQuaPatchTest +from SmallTests import ULTwoDTensionTriPatchTest as TULTwoDTensionTriPatchTest +from SmallTests import ULThreeDShearHexaPatchTest as TULThreeDShearHexaPatchTest +from SmallTests import ULThreeDShearTetraPatchTest as TULThreeDShearTetraPatchTest +from SmallTests import ULThreeDTensionHexaPatchTest as TULThreeDTensionHexaPatchTest +from SmallTests import ULThreeDTensionTetraPatchTest as TULThreeDTensionTetraPatchTest # SPRISM tests -from SmallTests import SprismMembranePatchTests as TSprismMembranePatchTests -from SmallTests import SprismBendingPatchTests as TSprismBendingPatchTests +from SmallTests import SprismMembranePatchTests as TSprismMembranePatchTests +from SmallTests import SprismBendingPatchTests as TSprismBendingPatchTests # Eigenvalues tests -from SmallTests import EigenQ4Thick2x2PlateTests as TEigenQ4Thick2x2PlateTests -from SmallTests import EigenTL3D8NCubeTests as TEigenTL3D8NCubeTests -from SmallTests import Eigen3D3NThinCircleTests as TEigen3D3NThinCircleTests +from SmallTests import EigenQ4Thick2x2PlateTests as TEigenQ4Thick2x2PlateTests +from SmallTests import EigenTL3D8NCubeTests as TEigenTL3D8NCubeTests +from SmallTests import Eigen3D3NThinCircleTests as TEigen3D3NThinCircleTests # Membrane tests from SmallTests import Fofi4PointTentnoCableTests as TFofi4PointTentnoCableTests from SmallTests import Fofi4PointTentCableTests as TFofi4PointTentCableTests from SmallTests import MembraneQ4PointLoadTests as TMembraneQ4PointLoadTests from SmallTests import MembraneQ4TrussPointLoadTests as TMembraneQ4TrussPointLoadTests +# 2Node Element tests +from SmallTests import Simple3D2NTrussTest as T3D2NTrussTest +from SmallTests import Simple3D2NTrussLinearTest as T3D2NTrussLinearTest +from SmallTests import Simple3D2NTrussDynamicTest as T3D2NTrussDynamicTest +from SmallTests import Simple3D2NBeamCrTest as T3D2NBeamCrTest +from SmallTests import Simple3D2NBeamCrLinearTest as T3D2NBeamCrLinearTest +from SmallTests import Simple3D2NBeamCrDynamicTest as T3D2NBeamCrDynamicTest +# Multipoint constraint tests +from test_multipoint_contstraints import TestMultipointConstraints as TTestMultipointConstraints +from test_multipoint_contstraints import TestMultipointConstraintsTwo as TTestMultipointConstraintsTwo + + + # Nodal damping test -from test_nodal_damping import NodalDampingTests as TNodalDampingTests -# Spring damper element tests +from test_nodal_damping import NodalDampingTests as TNodalDampingTests +# Spring damper element test from test_spring_damper_element import SpringDamperElementTests as TSpringDamperElementTests ## NIGTHLY TESTS # Shell test -from NightlyTests import ShellQ4ThickBendingRollUpTests as TShellQ4ThickBendingRollUpTests -from NightlyTests import ShellQ4ThickDrillingRollUpTests as TShellQ4ThickDrillingRollUpTests -from NightlyTests import ShellT3ThinBendingRollUpTests as TShellT3ThinBendingRollUpTests -from NightlyTests import ShellT3ThinDrillingRollUpTests as TShellT3ThinDrillingRollUpTests -from NightlyTests import ShellT3IsotropicScordelisTests as TShellT3IsotropicScordelisTests +from NightlyTests import ShellQ4ThickBendingRollUpTests as TShellQ4ThickBendingRollUpTests +from NightlyTests import ShellQ4ThickDrillingRollUpTests as TShellQ4ThickDrillingRollUpTests +from NightlyTests import ShellT3ThinBendingRollUpTests as TShellT3ThinBendingRollUpTests +from NightlyTests import ShellT3ThinDrillingRollUpTests as TShellT3ThinDrillingRollUpTests +from NightlyTests import ShellT3IsotropicScordelisTests as TShellT3IsotropicScordelisTests + +from NightlyTests import ShellT3ThickLinearStaticTests as TShellT3ThickLinearStaticTests +from NightlyTests import ShellT3ThickNonLinearStaticTests as TShellT3ThickNonLinearStaticTests +from NightlyTests import ShellT3ThickLinearDynamicTests as TShellT3ThickLinearDynamicTests +from NightlyTests import ShellT3ThickNonLinearDynamicTests as TShellT3ThickNonLinearDynamicTests + +from NightlyTests import ShellQ4ThinLinearStaticTests as TShellQ4ThinLinearStaticTests +from NightlyTests import ShellQ4ThinNonLinearStaticTests as TShellQ4ThinNonLinearStaticTests +from NightlyTests import ShellQ4ThinLinearDynamicTests as TShellQ4ThinLinearDynamicTests +from NightlyTests import ShellQ4ThinNonLinearDynamicTests as TShellQ4ThinNonLinearDynamicTests + + + # CL tests ##from NightlyTests import IsotropicDamageSimoJuPSTest as TIsotropicDamageSimoJuPSTest @@ -119,6 +146,10 @@ def AssambleTestSuites(): smallSuite.addTest(TTestPatchTestLargeStrain('test_UL_2D_quadrilateral')) smallSuite.addTest(TTestPatchTestLargeStrain('test_UL_3D_hexa')) smallSuite.addTest(TTestQuadraticElements('test_Quad8')) + smallSuite.addTest(TTestPatchTestShells('test_thin_shell_triangle')) + smallSuite.addTest(TTestPatchTestShells('test_thick_shell_triangle')) + smallSuite.addTest(TTestPatchTestShells('test_thin_shell_quadrilateral')) + smallSuite.addTest(TTestPatchTestShells('test_thick_shell_quadrilateral')) # Test loading conditions smallSuite.addTest(TestLoadingConditions('test_execution')) # Basic moving mesh test @@ -163,9 +194,18 @@ def AssambleTestSuites(): smallSuite.addTest(TFofi4PointTentCableTests('test_execution')) smallSuite.addTest(TMembraneQ4PointLoadTests('test_execution')) smallSuite.addTest(TMembraneQ4TrussPointLoadTests('test_execution')) + # 2Node Element tests + smallSuite.addTest(T3D2NTrussDynamicTest('test_execution')) + smallSuite.addTest(T3D2NTrussLinearTest('test_execution')) + smallSuite.addTest(T3D2NTrussTest('test_execution')) + smallSuite.addTest(T3D2NBeamCrTest('test_execution')) + smallSuite.addTest(T3D2NBeamCrLinearTest('test_execution')) + smallSuite.addTest(T3D2NBeamCrDynamicTest('test_execution')) # Nodal damping test smallSuite.addTest(TNodalDampingTests('test_execution')) + + if (missing_external_dependencies == False): if( hasattr(KratosMultiphysics.ExternalSolversApplication, "FEASTSolver") ): # Eigenvalues tests @@ -176,16 +216,30 @@ def AssambleTestSuites(): smallSuite.addTest(TSpringDamperElementTests('test_execution')) else: print("FEASTSolver solver is not included in the compilation of the External Solvers Application") + + # Multipoint tests + smallSuite.addTest(TTestMultipointConstraints('test_MPC_Constraints')) + smallSuite.addTest(TTestMultipointConstraintsTwo('test_MPC_Constraints')) # Create a test suit with the selected tests plus all small tests nightSuite = suites['nightly'] nightSuite.addTests(smallSuite) # Shell tests nightSuite.addTest(TShellQ4ThickBendingRollUpTests('test_execution')) - nightSuite.addTest(TShellQ4ThickDrillingRollUpTests('test_execution')) + # nightSuite.addTest(TShellQ4ThickDrillingRollUpTests('test_execution')) # FIXME: Needs get up to date nightSuite.addTest(TShellT3ThinBendingRollUpTests('test_execution')) nightSuite.addTest(TShellT3ThinDrillingRollUpTests('test_execution')) nightSuite.addTest(TShellT3IsotropicScordelisTests('test_execution')) + + nightSuite.addTest(TShellT3ThickLinearStaticTests('test_execution')) + nightSuite.addTest(TShellT3ThickNonLinearStaticTests('test_execution')) + nightSuite.addTest(TShellT3ThickLinearDynamicTests('test_execution')) + nightSuite.addTest(TShellT3ThickNonLinearDynamicTests('test_execution')) + + nightSuite.addTest(TShellQ4ThinLinearStaticTests('test_execution')) + nightSuite.addTest(TShellQ4ThinNonLinearStaticTests('test_execution')) + nightSuite.addTest(TShellQ4ThinLinearDynamicTests('test_execution')) + nightSuite.addTest(TShellQ4ThinNonLinearDynamicTests('test_execution')) # CL tests ##nightSuite.addTest(TIsotropicDamageSimoJuPSTest('test_execution')) @@ -202,6 +256,7 @@ def AssambleTestSuites(): TTestPatchTestSmallStrain, TTestPatchTestLargeStrain, TTestQuadraticElements, + TTestPatchTestShells, TestLoadingConditions, TSimpleMeshMovingTest, TDynamicBossakTests, @@ -238,12 +293,28 @@ def AssambleTestSuites(): TMembraneQ4PointLoadTests, TMembraneQ4TrussPointLoadTests, TShellQ4ThickBendingRollUpTests, - TShellQ4ThickDrillingRollUpTests, + # TShellQ4ThickDrillingRollUpTests, # FIXME: Needs get up to date TShellT3ThinBendingRollUpTests, TShellT3ThinDrillingRollUpTests, TShellT3IsotropicScordelisTests, - ###TIsotropicDamageSimoJuPSTest, # FIXME: Need CL correspondent - ###TSprismPanTests # FIXME: Needs get up to date + TTestMultipointConstraints, + TTestMultipointConstraintsTwo, + TShellT3ThickLinearStaticTests, + TShellT3ThickNonLinearStaticTests, + TShellT3ThickLinearDynamicTests, + TShellT3ThickNonLinearDynamicTests, + TShellQ4ThinLinearStaticTests, + TShellQ4ThinNonLinearStaticTests, + TShellQ4ThinLinearDynamicTests, + TShellQ4ThinNonLinearDynamicTests, + T3D2NTrussTest, + T3D2NTrussLinearTest, + T3D2NTrussDynamicTest, + T3D2NBeamCrTest, + T3D2NBeamCrLinearTest, + T3D2NBeamCrDynamicTest, + ####TIsotropicDamageSimoJuPSTest, # FIXME: Need CL correspondent + ####TSprismPanTests # FIXME: Needs get up to date ]) ) diff --git a/applications/StructuralMechanicsApplication/tests/test_multipoint_contstraints.py b/applications/StructuralMechanicsApplication/tests/test_multipoint_contstraints.py new file mode 100644 index 000000000000..d562997ccd14 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/test_multipoint_contstraints.py @@ -0,0 +1,337 @@ +from __future__ import print_function, absolute_import, division +import KratosMultiphysics + +import KratosMultiphysics.StructuralMechanicsApplication +import KratosMultiphysics.KratosUnittest as KratosUnittest + + + +class TestMultipointConstraints(KratosUnittest.TestCase): + def setUp(self): + pass + + def _add_variables(self, mp): + mp.AddNodalSolutionStepVariable(KratosMultiphysics.DISPLACEMENT) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.REACTION) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.VELOCITY) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.ACCELERATION) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.VOLUME_ACCELERATION) + for node in mp.Nodes: + node.AddDof(KratosMultiphysics.DISPLACEMENT_X) + node.AddDof(KratosMultiphysics.DISPLACEMENT_Y) + node.AddDof(KratosMultiphysics.DISPLACEMENT_Z) + + node.AddDof(KratosMultiphysics.VELOCITY_X) + node.AddDof(KratosMultiphysics.VELOCITY_Y) + node.AddDof(KratosMultiphysics.VELOCITY_Z) + + node.AddDof(KratosMultiphysics.ACCELERATION_X) + node.AddDof(KratosMultiphysics.ACCELERATION_Y) + node.AddDof(KratosMultiphysics.ACCELERATION_Z) + + node.AddDof(KratosMultiphysics.REACTION_X) + node.AddDof(KratosMultiphysics.REACTION_Y) + node.AddDof(KratosMultiphysics.REACTION_Z) + + return mp + + def _apply_material_properties(self, mp, dim): + #define properties + mp.GetProperties()[1].SetValue(KratosMultiphysics.YOUNG_MODULUS, 210e9) + mp.GetProperties()[1].SetValue(KratosMultiphysics.POISSON_RATIO, 0.3) + mp.GetProperties()[1].SetValue(KratosMultiphysics.THICKNESS, 1.0) + + g = [0, 0, 0] + mp.GetProperties()[1].SetValue(KratosMultiphysics.VOLUME_ACCELERATION, g) + + if dim == 2: + cl = KratosMultiphysics.StructuralMechanicsApplication.LinearElasticPlaneStrain2DLaw() + else: + cl = KratosMultiphysics.StructuralMechanicsApplication.LinearElastic3DLaw() + mp.GetProperties()[1].SetValue(KratosMultiphysics.CONSTITUTIVE_LAW, cl) + + return mp + + def _apply_BCs(self, mp): + bcs = mp.GetSubModelPart("FixedEdgeNodes") + for node in bcs.Nodes: + node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0, 0.00) + node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0, 0.00) + node.Fix(KratosMultiphysics.DISPLACEMENT_X) + node.Fix(KratosMultiphysics.DISPLACEMENT_Y) + + bcmn = mp.GetSubModelPart("MovingNodes") + for node in bcmn.Nodes: + node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0, 0.01) + node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0, 0.00) + node.Fix(KratosMultiphysics.DISPLACEMENT_X) + node.Fix(KratosMultiphysics.DISPLACEMENT_Y) + + return mp + + def _setup_solver(self, mp): + + #define a minimal newton raphson solver + self.linear_solver = KratosMultiphysics.SkylineLUFactorizationSolver() + #self.builder_and_solver = KratosMultiphysics.ResidualBasedBlockBuilderAndSolver(self.linear_solver) + self.builder_and_solver = KratosMultiphysics.StructuralMechanicsApplication.ResidualBasedBlockBuilderAndSolverWithMpc(self.linear_solver) + self.scheme = KratosMultiphysics.ResidualBasedBossakDisplacementScheme(-0.01) + self.convergence_criterion = KratosMultiphysics.ResidualCriteria(1e-8, 1e-10) + self.convergence_criterion.SetEchoLevel(0) + + max_iters = 10 + compute_reactions = False + reform_step_dofs = True + move_mesh_flag = True + self.strategy = KratosMultiphysics.ResidualBasedNewtonRaphsonStrategy(mp, + self.scheme, + self.linear_solver, + self.convergence_criterion, + self.builder_and_solver, + max_iters, + compute_reactions, + reform_step_dofs, + move_mesh_flag) + self.strategy.SetEchoLevel(0) + #self.strategy.Initialize() + + self.strategy.Check() + + def _reset(self): + del self.strategy + del self.linear_solver + del self.builder_and_solver + del self.scheme + del self.convergence_criterion + + def _solve(self): + self.strategy.Solve() + + def _check_results(self, mp): + disp1 = mp.Nodes[16].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + disp2 = mp.Nodes[6].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = mp.Nodes[16].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + disp2 = mp.Nodes[6].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = mp.Nodes[17].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + disp2 = mp.Nodes[7].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = mp.Nodes[17].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + disp2 = mp.Nodes[7].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = mp.Nodes[18].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + disp2 = mp.Nodes[9].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = mp.Nodes[18].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + disp2 = mp.Nodes[9].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + def _setup_model_part(self,mp): + #create nodes + mp.CreateNewNode(1, 0.00000, 1.00000, 0.00000) + mp.CreateNewNode(2, 0.00000, 0.50000, 0.00000) + mp.CreateNewNode(3, 0.50000, 1.00000, 0.00000) + mp.CreateNewNode(4, 0.50000, 0.50000, 0.00000) + mp.CreateNewNode(5, 0.00000, 0.00000, 0.00000) + mp.CreateNewNode(6, 1.00000, 1.00000, 0.00000) + mp.CreateNewNode(7, 1.00000, 0.50000, 0.00000) + mp.CreateNewNode(8, 0.50000, 0.00000, 0.00000) + mp.CreateNewNode(9, 1.00000, 0.00000, 0.00000) + mp.CreateNewNode(10, 1.50000, 1.00000, 0.00000) + mp.CreateNewNode(11, 1.50000, 0.50000, 0.00000) + mp.CreateNewNode(12, 1.50000, 0.00000, 0.00000) + mp.CreateNewNode(13, 2.00000, 1.00000, 0.00000) + mp.CreateNewNode(14, 2.00000, 0.50000, 0.00000) + mp.CreateNewNode(15, 2.00000, 0.00000, 0.00000) + mp.CreateNewNode(16, 1.00000, 1.00000, 0.00000) + mp.CreateNewNode(17, 1.00000, 0.50000, 0.00000) + mp.CreateNewNode(18, 1.00000, 0.00000, 0.00000) + + #create a submodelpart for boundary conditions + bcs = mp.CreateSubModelPart("FixedEdgeNodes") + bcs.AddNodes([1,2,5,13,14,15]) + + bcmn = mp.CreateSubModelPart("MovingNodes") + bcmn.AddNodes([10,11,12]) + + + #create Element + mp.CreateNewElement("SmallDisplacementElement2D4N", 1, [ 14, 11, 12, 15], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 2, [ 13, 10, 11, 14], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 3, [ 11, 17, 18, 12], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 4, [ 10, 16, 17, 11], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 5, [ 2 , 4 , 3 , 1], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 6, [ 5 , 8 , 4 , 2], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 7, [ 4 , 7 , 6 , 3], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 8, [ 8 , 9 , 7 , 4], mp.GetProperties()[1] ) + + return mp + + + def _apply_mpc_constraints(self,mp,cm): + cm.AddMasterSlaveRelation(mp.Nodes[16],KratosMultiphysics.DISPLACEMENT_Y, mp.Nodes[6], KratosMultiphysics.DISPLACEMENT_Y, 1.0,0) + cm.AddMasterSlaveRelation(mp.Nodes[16],KratosMultiphysics.DISPLACEMENT_X, mp.Nodes[6], KratosMultiphysics.DISPLACEMENT_X, 1.0,0) + + cm.AddMasterSlaveRelation(mp.Nodes[17],KratosMultiphysics.DISPLACEMENT_X, mp.Nodes[7], KratosMultiphysics.DISPLACEMENT_X, 1.00,0) + cm.AddMasterSlaveRelation(mp.Nodes[17],KratosMultiphysics.DISPLACEMENT_Y, mp.Nodes[7], KratosMultiphysics.DISPLACEMENT_Y, 1.00,0) + + cm.AddMasterSlaveRelation(mp.Nodes[18],KratosMultiphysics.DISPLACEMENT_X, mp.Nodes[9], KratosMultiphysics.DISPLACEMENT_X, 1.0,0) + cm.AddMasterSlaveRelation(mp.Nodes[18],KratosMultiphysics.DISPLACEMENT_Y, mp.Nodes[9], KratosMultiphysics.DISPLACEMENT_Y, 1.0,0) + + return mp, cm + + def _set_and_fill_buffer(self,mp,buffer_size,delta_time): + # Set buffer size + mp.SetBufferSize(buffer_size) + # Fill buffer + time = mp.ProcessInfo[KratosMultiphysics.TIME] + time = time - delta_time * (buffer_size) + mp.ProcessInfo.SetValue(KratosMultiphysics.TIME, time) + for size in range(0, buffer_size): + step = size - (buffer_size -1) + mp.ProcessInfo.SetValue(KratosMultiphysics.STEP, step) + time = time + delta_time + #delta_time is computed from previous time in process_info + mp.CloneTimeStep(time) + + mp.ProcessInfo[KratosMultiphysics.IS_RESTARTED] = False + + return mp + + def test_MPC_Constraints(self): + dim = 2 + mp = KratosMultiphysics.ModelPart("solid_part") + mp = self._apply_material_properties(mp,dim) + mp = self._setup_model_part(mp) + mp = self._add_variables(mp) + + #time integration parameters + dt = 0.005 + time = 0.0 + end_time = 0.01 + step = 0 + + mp = self._set_and_fill_buffer(mp,2,dt) + # Applying boundary conditions + mp = self._apply_BCs(mp) + # Applying constraints + cm = KratosMultiphysics.StructuralMechanicsApplication.ApplyMultipointConstraintsProcess(mp) + mp, cm = self._apply_mpc_constraints(mp,cm) + # Solving the system of equations + self._setup_solver(mp) + + while(time <= end_time): + time = time + dt + step = step + 1 + print('############ Time :: ', time, ' ### step ', step) + mp.CloneTimeStep(time) + + self._solve() + # Checking the results + self._check_results(mp) + self._reset() + + +class TestMultipointConstraintsTwo(TestMultipointConstraints): + def _check_results(self, mp): + disp1 = mp.Nodes[16].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + disp2 = mp.Nodes[6].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = mp.Nodes[16].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + disp2 = mp.Nodes[6].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = 0.5*( mp.Nodes[16].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + mp.Nodes[18].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) ) + disp2 = mp.Nodes[7].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = 0.5*( mp.Nodes[16].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + mp.Nodes[18].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) ) + disp2 = mp.Nodes[7].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = mp.Nodes[18].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + disp2 = mp.Nodes[9].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + disp1 = mp.Nodes[18].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + disp2 = mp.Nodes[9].GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0) + self.assertAlmostEqual(disp1, disp2, 5) + + def _setup_model_part(self,mp): + #create nodes + mp.CreateNewNode(1, 0.00000, 1.00000, 0.00000) + mp.CreateNewNode(2, 0.00000, 0.50000, 0.00000) + mp.CreateNewNode(3, 0.50000, 1.00000, 0.00000) + mp.CreateNewNode(4, 0.50000, 0.50000, 0.00000) + mp.CreateNewNode(5, 0.00000, 0.00000, 0.00000) + mp.CreateNewNode(6, 1.00000, 1.00000, 0.00000) + mp.CreateNewNode(7, 1.00000, 0.50000, 0.00000) + mp.CreateNewNode(8, 0.50000, 0.00000, 0.00000) + mp.CreateNewNode(9, 1.00000, 0.00000, 0.00000) + mp.CreateNewNode(10, 1.50000, 1.00000, 0.00000) + mp.CreateNewNode(12, 1.50000, 0.00000, 0.00000) + mp.CreateNewNode(13, 2.00000, 1.00000, 0.00000) + mp.CreateNewNode(15, 2.00000, 0.00000, 0.00000) + mp.CreateNewNode(16, 1.00000, 1.00000, 0.00000) + mp.CreateNewNode(18, 1.00000, 0.00000, 0.00000) + + #create a submodelpart for boundary conditions + bcs = mp.CreateSubModelPart("FixedEdgeNodes") + bcs.AddNodes([1,2,5,13,15]) + + bcmn = mp.CreateSubModelPart("MovingNodes") + bcmn.AddNodes([10,12]) + + + #create Element + mp.CreateNewElement("SmallDisplacementElement2D4N", 2, [ 13, 10, 12, 15], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 4, [ 10, 16, 18, 12], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 5, [ 2 , 4 , 3 , 1], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 6, [ 5 , 8 , 4 , 2], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 7, [ 4 , 7 , 6 , 3], mp.GetProperties()[1] ) + mp.CreateNewElement("SmallDisplacementElement2D4N", 8, [ 8 , 9 , 7 , 4], mp.GetProperties()[1] ) + + return mp + + + def _apply_mpc_constraints(self,mp,cm): + cm.AddMasterSlaveRelation(mp.Nodes[16],KratosMultiphysics.DISPLACEMENT_Y, mp.Nodes[6], KratosMultiphysics.DISPLACEMENT_Y, 1.0,0) + cm.AddMasterSlaveRelation(mp.Nodes[16],KratosMultiphysics.DISPLACEMENT_X, mp.Nodes[6], KratosMultiphysics.DISPLACEMENT_X, 1.0,0) + + cm.AddMasterSlaveRelation(mp.Nodes[16],KratosMultiphysics.DISPLACEMENT_X, mp.Nodes[7], KratosMultiphysics.DISPLACEMENT_X, 0.5,0) + cm.AddMasterSlaveRelation(mp.Nodes[18],KratosMultiphysics.DISPLACEMENT_X, mp.Nodes[7], KratosMultiphysics.DISPLACEMENT_X, 0.5,0) + cm.AddMasterSlaveRelation(mp.Nodes[16],KratosMultiphysics.DISPLACEMENT_Y, mp.Nodes[7], KratosMultiphysics.DISPLACEMENT_Y, 0.5,0) + cm.AddMasterSlaveRelation(mp.Nodes[18],KratosMultiphysics.DISPLACEMENT_Y, mp.Nodes[7], KratosMultiphysics.DISPLACEMENT_Y, 0.5,0) + + cm.AddMasterSlaveRelation(mp.Nodes[18],KratosMultiphysics.DISPLACEMENT_X, mp.Nodes[9], KratosMultiphysics.DISPLACEMENT_X, 1.0,0) + cm.AddMasterSlaveRelation(mp.Nodes[18],KratosMultiphysics.DISPLACEMENT_Y, mp.Nodes[9], KratosMultiphysics.DISPLACEMENT_Y, 1.0,0) + + return mp, cm + + def _apply_BCs(self, mp): + bcs = mp.GetSubModelPart("FixedEdgeNodes") + for node in bcs.Nodes: + node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0, 0.00) + node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0, 0.00) + node.Fix(KratosMultiphysics.DISPLACEMENT_X) + node.Fix(KratosMultiphysics.DISPLACEMENT_Y) + + bcmn = mp.GetSubModelPart("MovingNodes") + for node in bcmn.Nodes: + node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_X, 0, 0.01) + node.SetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y, 0, 0.00) + node.Fix(KratosMultiphysics.DISPLACEMENT_X) + node.Fix(KratosMultiphysics.DISPLACEMENT_Y) + + return mp + + +if __name__ == '__main__': + KratosUnittest.main() \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/test_patch_test_cr_beam.py b/applications/StructuralMechanicsApplication/tests/test_patch_test_cr_beam.py new file mode 100644 index 000000000000..0f6b14b9d555 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/test_patch_test_cr_beam.py @@ -0,0 +1,450 @@ +from __future__ import print_function, absolute_import, division +import KratosMultiphysics + +import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication +import KratosMultiphysics.KratosUnittest as KratosUnittest + + +from math import sqrt, sin, cos, pi, exp, atan + +class TestCrBeam3D2N(KratosUnittest.TestCase): + def setUp(self): + pass + + def _add_dofs(self,mp): + # Adding dofs AND their corresponding reactions + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_X, KratosMultiphysics.REACTION_X,mp) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_Y, KratosMultiphysics.REACTION_Y,mp) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_Z, KratosMultiphysics.REACTION_Z,mp) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.ROTATION_X, KratosMultiphysics.TORQUE_X,mp) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.ROTATION_Y, KratosMultiphysics.TORQUE_Y,mp) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.ROTATION_Z, KratosMultiphysics.TORQUE_Z,mp) + + def _add_variables(self,mp): + mp.AddNodalSolutionStepVariable(KratosMultiphysics.DISPLACEMENT) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.REACTION) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.ROTATION) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.TORQUE) + mp.AddNodalSolutionStepVariable(StructuralMechanicsApplication.POINT_LOAD) + mp.AddNodalSolutionStepVariable(StructuralMechanicsApplication.POINT_MOMENT) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.VOLUME_ACCELERATION) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.VELOCITY) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.ANGULAR_VELOCITY) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.ACCELERATION) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.ANGULAR_ACCELERATION) + + def _apply_material_properties(self,mp,dim): + #define properties + mp.GetProperties()[0].SetValue(KratosMultiphysics.YOUNG_MODULUS,210e9) + mp.GetProperties()[0].SetValue(KratosMultiphysics.DENSITY,7850) + mp.GetProperties()[0].SetValue(StructuralMechanicsApplication.CROSS_AREA,0.01) + mp.GetProperties()[0].SetValue(KratosMultiphysics.POISSON_RATIO,0.30) + + local_inertia_vector = KratosMultiphysics.Vector(3) + local_inertia_vector[0] = 0.00001 + local_inertia_vector[1] = 0.00001 + local_inertia_vector[2] = 0.00001 + + mp.GetProperties()[0].SetValue(StructuralMechanicsApplication.LOCAL_INERTIA_VECTOR,local_inertia_vector) + + g = [0,0,0] + mp.GetProperties()[0].SetValue(KratosMultiphysics.VOLUME_ACCELERATION,g) + + cl = StructuralMechanicsApplication.LinearElastic3DLaw() + mp.GetProperties()[0].SetValue(KratosMultiphysics.CONSTITUTIVE_LAW,cl) + + + def _apply_BCs(self,mp,which_dof): + + if (which_dof == 'xyz'): + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.DISPLACEMENT_X, True, mp.Nodes) + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.DISPLACEMENT_Y, True, mp.Nodes) + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.DISPLACEMENT_Z, True, mp.Nodes) + # for node in mp.Nodes: + # node.Fix(KratosMultiphysics.DISPLACEMENT_X) + # node.Fix(KratosMultiphysics.DISPLACEMENT_Y) + # node.Fix(KratosMultiphysics.DISPLACEMENT_Z) + if (which_dof == 'xz'): + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.DISPLACEMENT_X, True, mp.Nodes) + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.DISPLACEMENT_Z, True, mp.Nodes) + # for node in mp.Nodes: + # node.Fix(KratosMultiphysics.DISPLACEMENT_X) + # node.Fix(KratosMultiphysics.DISPLACEMENT_Z) + if (which_dof == 'yz'): + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.DISPLACEMENT_Y, True, mp.Nodes) + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.DISPLACEMENT_Z, True, mp.Nodes) + # for node in mp.Nodes: + # node.Fix(KratosMultiphysics.DISPLACEMENT_Y) + # node.Fix(KratosMultiphysics.DISPLACEMENT_Z) + if (which_dof == 'rotXYZ'): + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.ROTATION_X, True, mp.Nodes) + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.ROTATION_Y, True, mp.Nodes) + KratosMultiphysics.VariableUtils().ApplyFixity(KratosMultiphysics.ROTATION_Z, True, mp.Nodes) + # for node in mp.Nodes: + # node.Fix(KratosMultiphysics.ROTATION_X) + # node.Fix(KratosMultiphysics.ROTATION_Y) + # node.Fix(KratosMultiphysics.ROTATION_Z) + + def _apply_Neumann_BCs(self,mp,which_dof,load_size_dir): + + if(which_dof == 'y'): + KratosMultiphysics.VariableUtils().SetScalarVar(StructuralMechanicsApplication. + POINT_LOAD_Y, load_size_dir, mp.Nodes) + # for node in mp.Nodes: + # node.SetSolutionStepValue(StructuralMechanicsApplication. + # POINT_LOAD_Y,0,load_size_dir) + if(which_dof == 'x'): + KratosMultiphysics.VariableUtils().SetScalarVar(StructuralMechanicsApplication. + POINT_LOAD_X, load_size_dir, mp.Nodes) + # for node in mp.Nodes: + # node.SetSolutionStepValue(StructuralMechanicsApplication. + # POINT_LOAD_X,0,load_size_dir) + + + def _solve_linear(self,mp): + + linear_solver = KratosMultiphysics.SkylineLUFactorizationSolver() + builder_and_solver = KratosMultiphysics.ResidualBasedBlockBuilderAndSolver(linear_solver) + scheme = KratosMultiphysics.ResidualBasedIncrementalUpdateStaticScheme() + + compute_reactions = True #Now the rotation reactions (TORQUE) is added, so it works + reform_step_dofs = True + calculate_norm_dx = False + move_mesh_flag = True + strategy = KratosMultiphysics.ResidualBasedLinearStrategy(mp, + scheme, + linear_solver, + builder_and_solver, + compute_reactions, + reform_step_dofs, + calculate_norm_dx, + move_mesh_flag) + strategy.SetEchoLevel(0) + + strategy.Check() + strategy.Solve() + + def _solve_nonlinear(self,mp): + linear_solver = KratosMultiphysics.SkylineLUFactorizationSolver() + builder_and_solver = KratosMultiphysics.ResidualBasedBlockBuilderAndSolver(linear_solver) + scheme = KratosMultiphysics.ResidualBasedIncrementalUpdateStaticScheme() + convergence_criterion = StructuralMechanicsApplication.DisplacementAndOtherDoFCriteria(1e-15,1e-15) + convergence_criterion.SetEchoLevel(0) + + max_iters = 1000 + compute_reactions = True + reform_step_dofs = True + move_mesh_flag = True + strategy = KratosMultiphysics.ResidualBasedNewtonRaphsonStrategy(mp, + scheme, + linear_solver, + convergence_criterion, + builder_and_solver, + max_iters, + compute_reactions, + reform_step_dofs, + move_mesh_flag) + strategy.SetEchoLevel(0) + + strategy.Check() + strategy.Solve() + def _solve_dynamic(self,mp): + + #define a minimal newton raphson solver + linear_solver = KratosMultiphysics.SkylineLUFactorizationSolver() + builder_and_solver = KratosMultiphysics.ResidualBasedBlockBuilderAndSolver(linear_solver) + scheme = KratosMultiphysics.ResidualBasedBossakDisplacementScheme(0.00) + convergence_criterion = KratosMultiphysics.ResidualCriteria(1e-8,1e-8) + convergence_criterion.SetEchoLevel(0) + + + max_iters = 1000 + compute_reactions = True + reform_step_dofs = True + move_mesh_flag = True + strategy = KratosMultiphysics.ResidualBasedNewtonRaphsonStrategy(mp, + scheme, + linear_solver, + convergence_criterion, + builder_and_solver, + max_iters, + compute_reactions, + reform_step_dofs, + move_mesh_flag) + strategy.SetEchoLevel(0) + + strategy.Check() + strategy.Solve() + + + + def _check_results_linear(self,mp,endNode): + + #check displacement result + displacement_cantilever_tip = mp.Nodes[endNode].GetSolutionStepValue( + KratosMultiphysics.DISPLACEMENT) + + disp_y_analytical = -400000.00*(1.2**3)/(3*210e9*0.00001) + + self.assertAlmostEqual(0.00, displacement_cantilever_tip[0]) + self.assertAlmostEqual(disp_y_analytical, displacement_cantilever_tip[1]) + self.assertAlmostEqual(0.00, displacement_cantilever_tip[2]) + + def _check_results_nonlinear(self,mp,timestep,Moment_i,endNode): + ##node at cantilever tip + node_temp = mp.Nodes[endNode] + + displacement_x = node_temp.GetSolutionStepValue( + KratosMultiphysics.DISPLACEMENT_X) + displacement_y = node_temp.GetSolutionStepValue( + KratosMultiphysics.DISPLACEMENT_Y) + moment_z = node_temp.GetSolutionStepValue(StructuralMechanicsApplication. + POINT_MOMENT_Z) + + #check moment z + self.assertAlmostEqual(moment_z, Moment_i) + #check displacement as soon as a total circle is formed + #M = EI * 2 * pi / L ---> 13200000.0 reached at t_step = 527 + if (timestep == 527): + self.assertAlmostEqual(displacement_x, -1.00,2) + self.assertAlmostEqual(displacement_y, 0.00,5) + + def _check_results_dynamic(self,mp,time_i,nr_nodes): + + #check free vibration of cantilever tip + disp_y_analytical = ((1.541*(10**(-2)))*(1-cos(575.076*time_i)) + -(3.193*(10**(-4)))*(1-cos(3603.800*time_i)))*(-1) + disp_y_simulated = mp.Nodes[nr_nodes].GetSolutionStepValue( + KratosMultiphysics.DISPLACEMENT_Y) + + + self.assertAlmostEqual(disp_y_analytical, disp_y_simulated,2) + + + def _set_and_fill_buffer(self,mp,buffer_size,delta_time): + # Set buffer size + mp.SetBufferSize(buffer_size) + + # Fill buffer + time = mp.ProcessInfo[KratosMultiphysics.TIME] + time = time - delta_time * (buffer_size) + mp.ProcessInfo.SetValue(KratosMultiphysics.TIME, time) + for size in range(0, buffer_size): + step = size - (buffer_size -1) + mp.ProcessInfo.SetValue(KratosMultiphysics.STEP, step) + time = time + delta_time + #delta_time is computed from previous time in process_info + mp.CloneTimeStep(time) + + mp.ProcessInfo[KratosMultiphysics.IS_RESTARTED] = False + + def test_cr_beam_linear(self): + dim = 3 + nr_nodes = 11 + nr_elements = nr_nodes-1 + mp = KratosMultiphysics.ModelPart("solid_part") + self._add_variables(mp) + self._apply_material_properties(mp,dim) + + #create nodes + dx = 1.20 / nr_elements + for i in range(nr_nodes): + mp.CreateNewNode(i+1,i*dx,0.00,0.00) + #add dofs + self._add_dofs(mp) + #create condition + mp.CreateNewCondition("PointLoadCondition3D1N",1,[nr_nodes],mp.GetProperties()[0]) + #create submodelparts for dirichlet boundary conditions + bcs_xyz = mp.CreateSubModelPart("Dirichlet_XYZ") + bcs_xyz.AddNodes([1]) + bcs_rot = mp.CreateSubModelPart("Dirichlet_RotAll") + bcs_rot.AddNodes([1]) + #create a submodalpart for neumann boundary conditions + bcs_neumann = mp.CreateSubModelPart("PointLoad3D_neumann") + bcs_neumann.AddNodes([nr_nodes]) + bcs_neumann.AddConditions([1]) + #create Element + for i in range(nr_elements): + mp.CreateNewElement("CrLinearBeamElement3D2N", i+1, [i+1,i+2], + mp.GetProperties()[0]) + + #apply boundary conditions + Force_Y = -400000.00 + self._apply_BCs(bcs_xyz,'xyz') + self._apply_BCs(bcs_rot,'rotXYZ') + + self._apply_Neumann_BCs(bcs_neumann,'y',Force_Y) + + + #solve + compare + self._solve_linear(mp) + self._check_results_linear(mp,nr_nodes) + def test_cr_beam_nonlinear(self): + dim = 3 + nr_nodes = 21 + nr_elements = nr_nodes-1 + mp = KratosMultiphysics.ModelPart("solid_part") + self._add_variables(mp) + self._apply_material_properties(mp,dim) + + #create nodes + dx = 1.00 / nr_elements + for i in range(nr_nodes): + mp.CreateNewNode(i+1,i*dx,0.00,0.00) + #add dofs + self._add_dofs(mp) + #create condition + mp.CreateNewCondition("PointMomentCondition3D1N",1,[nr_nodes],mp.GetProperties()[0]) + #create submodelparts for dirichlet boundary conditions + bcs_xyz = mp.CreateSubModelPart("Dirichlet_XYZ") + bcs_xyz.AddNodes([1]) + bcs_rot = mp.CreateSubModelPart("Dirichlet_RotAll") + bcs_rot.AddNodes([1]) + #create Element + for i in range(nr_elements): + mp.CreateNewElement("CrBeamElement3D2N", i+1, [i+1,i+2], + mp.GetProperties()[0]) + + #apply constant boundary conditions + self._apply_BCs(bcs_xyz,'xyz') + self._apply_BCs(bcs_rot,'rotXYZ') + + + #incrementally increase load -> nonlinear case + Moment_Z = 25000.00 + time_start = 0.00 + time_end = 5 + time_delta = 1 + time_i = time_start + time_step = 0 + while (time_i <= time_end): + time_i += time_delta + #apply non-constant boundary conditions + Moment_i = Moment_Z*time_i + mp.Nodes[nr_nodes].SetSolutionStepValue(StructuralMechanicsApplication. + POINT_MOMENT_Z,0,Moment_i) + #solve + compare + self._solve_nonlinear(mp) + self._check_results_nonlinear(mp,time_step,Moment_i,nr_nodes) + time_step += 1 + def test_cr_beam_dynamic_lumped_mass_matrix(self): + dim = 3 + nr_nodes = 11 + nr_elements = nr_nodes-1 + mp = KratosMultiphysics.ModelPart("solid_part") + self._add_variables(mp) + self._apply_material_properties(mp,dim) + mp.GetProperties()[0].SetValue(StructuralMechanicsApplication.LUMPED_MASS_MATRIX,1) + + + #create nodes + dx = 1.00 / nr_elements + for i in range(nr_nodes): + mp.CreateNewNode(i+1,i*dx,0.00,0.00) + #add dofs + self._add_dofs(mp) + #create condition + mp.CreateNewCondition("PointLoadCondition3D1N",1,[nr_nodes],mp.GetProperties()[0]) + #create submodelparts for dirichlet boundary conditions + bcs_xyz = mp.CreateSubModelPart("Dirichlet_XYZ") + bcs_xyz.AddNodes([1]) + bcs_rot = mp.CreateSubModelPart("Dirichlet_RotAll") + bcs_rot.AddNodes([1]) + #create a submodalpart for neumann boundary conditions + bcs_neumann = mp.CreateSubModelPart("PointLoad3D_neumann") + bcs_neumann.AddNodes([nr_nodes]) + bcs_neumann.AddConditions([1]) + #create Element + for i in range(nr_elements): + mp.CreateNewElement("CrBeamElement3D2N", i+1, [i+1,i+2], + mp.GetProperties()[0]) + + #apply constant boundary conditions + self._apply_BCs(bcs_xyz,'xyz') + self._apply_BCs(bcs_rot,'rotXYZ') + Force_Y = -100000.000 + self._apply_Neumann_BCs(bcs_neumann,'y',Force_Y) + + #loop over time + time_start = 0.00 + time_end = 0.0004 + # time_delta = 0.001 + time_delta = 0.0001 + time_i = time_start + time_step = 0 + self._set_and_fill_buffer(mp,2,time_delta) + + x = [] + y = [] + y_1 = [] + while (time_i <= time_end): + + time_i += time_delta + mp.CloneTimeStep(time_i) + #solve + compare + self._solve_dynamic(mp) + self._check_results_dynamic(mp,time_i,nr_nodes) + time_step += 1 + def test_cr_beam_dynamic_consistent_mass_matrix(self): + dim = 3 + nr_nodes = 11 + nr_elements = nr_nodes-1 + mp = KratosMultiphysics.ModelPart("solid_part") + self._add_variables(mp) + self._apply_material_properties(mp,dim) + mp.GetProperties()[0].SetValue(StructuralMechanicsApplication.LUMPED_MASS_MATRIX,0) + + + #create nodes + dx = 1.00 / nr_elements + for i in range(nr_nodes): + mp.CreateNewNode(i+1,i*dx,0.00,0.00) + #add dofs + self._add_dofs(mp) + #create condition + mp.CreateNewCondition("PointLoadCondition3D1N",1,[nr_nodes],mp.GetProperties()[0]) + #create submodelparts for dirichlet boundary conditions + bcs_xyz = mp.CreateSubModelPart("Dirichlet_XYZ") + bcs_xyz.AddNodes([1]) + bcs_rot = mp.CreateSubModelPart("Dirichlet_RotAll") + bcs_rot.AddNodes([1]) + #create a submodalpart for neumann boundary conditions + bcs_neumann = mp.CreateSubModelPart("PointLoad3D_neumann") + bcs_neumann.AddNodes([nr_nodes]) + bcs_neumann.AddConditions([1]) + #create Element + for i in range(nr_elements): + mp.CreateNewElement("CrBeamElement3D2N", i+1, [i+1,i+2], + mp.GetProperties()[0]) + + #apply constant boundary conditions + self._apply_BCs(bcs_xyz,'xyz') + self._apply_BCs(bcs_rot,'rotXYZ') + Force_Y = -100000.000 + self._apply_Neumann_BCs(bcs_neumann,'y',Force_Y) + + #loop over time + time_start = 0.00 + time_end = 0.0004 + # time_delta = 0.001 + time_delta = 0.0001 + time_i = time_start + time_step = 0 + self._set_and_fill_buffer(mp,2,time_delta) + + x = [] + y = [] + y_1 = [] + while (time_i <= time_end): + + time_i += time_delta + mp.CloneTimeStep(time_i) + #solve + compare + self._solve_dynamic(mp) + self._check_results_dynamic(mp,time_i,nr_nodes) + time_step += 1 + + +if __name__ == '__main__': + KratosUnittest.main() + diff --git a/applications/StructuralMechanicsApplication/tests/test_patch_test_shells.py b/applications/StructuralMechanicsApplication/tests/test_patch_test_shells.py new file mode 100644 index 000000000000..123b8a802be4 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/test_patch_test_shells.py @@ -0,0 +1,230 @@ +from __future__ import print_function, absolute_import, division +import KratosMultiphysics + +import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication +import KratosMultiphysics.KratosUnittest as KratosUnittest + + +class TestPatchTestShells(KratosUnittest.TestCase): + def setUp(self): + pass + + + def _add_variables(self,mp): + mp.AddNodalSolutionStepVariable(KratosMultiphysics.DISPLACEMENT) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.ROTATION) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.REACTION) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.TORQUE) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.VOLUME_ACCELERATION) + mp.AddNodalSolutionStepVariable(StructuralMechanicsApplication.POINT_LOAD) + + + def _add_dofs(self,mp): + # Adding the dofs AND their corresponding reaction! + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_X, KratosMultiphysics.REACTION_X,mp) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_Y, KratosMultiphysics.REACTION_Y,mp) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.DISPLACEMENT_Z, KratosMultiphysics.REACTION_Z,mp) + + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.ROTATION_X, KratosMultiphysics.TORQUE_X,mp) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.ROTATION_Y, KratosMultiphysics.TORQUE_Y,mp) + KratosMultiphysics.VariableUtils().AddDof(KratosMultiphysics.ROTATION_Z, KratosMultiphysics.TORQUE_Z,mp) + + + def _create_nodes(self,mp,element_name): + mp.CreateNewNode(1, -0.5, - 0.45, 0.1) + mp.CreateNewNode(2, 0.7, -0.5, 0.2) + mp.CreateNewNode(3, 0.55, 0.6, 0.15) + mp.CreateNewNode(4, -0.48, 0.65, 0.0) + mp.CreateNewNode(5, 0.02, -0.01, -0.15) + + if element_name.endswith("4N"): # create aditional nodes needed for quad-setup + mp.CreateNewNode(6, -0.03, -0.5, 0.0) + mp.CreateNewNode(7, 0.51, 0.02, 0.03) + mp.CreateNewNode(8, -0.01, 0.52, -0.05) + mp.CreateNewNode(9, -0.49, -0.0, 0.0) + + + def _create_elements(self,mp,element_name): + if element_name.endswith("4N"): # Quadrilaterals + mp.CreateNewElement(element_name, 1, [1,6,5,9], mp.GetProperties()[1]) + mp.CreateNewElement(element_name, 2, [6,2,7,5], mp.GetProperties()[1]) + mp.CreateNewElement(element_name, 3, [5,7,3,8], mp.GetProperties()[1]) + mp.CreateNewElement(element_name, 4, [9,5,8,4], mp.GetProperties()[1]) + else: # Triangles + mp.CreateNewElement(element_name, 1, [1,2,5], mp.GetProperties()[1]) + mp.CreateNewElement(element_name, 2, [2,3,5], mp.GetProperties()[1]) + mp.CreateNewElement(element_name, 3, [3,4,5], mp.GetProperties()[1]) + mp.CreateNewElement(element_name, 4, [4,1,5], mp.GetProperties()[1]) + + + def _apply_dirichlet_BCs(self,mp): + for node in mp.Nodes: + node.Fix(KratosMultiphysics.DISPLACEMENT_X) + node.Fix(KratosMultiphysics.DISPLACEMENT_Y) + node.Fix(KratosMultiphysics.DISPLACEMENT_Z) + node.Fix(KratosMultiphysics.ROTATION_X) + node.Fix(KratosMultiphysics.ROTATION_Y) + node.Fix(KratosMultiphysics.ROTATION_Z) + + + def _apply_neumann_BCs(self,mp): + for node in mp.Nodes: + node.SetSolutionStepValue(StructuralMechanicsApplication.POINT_LOAD,0,[6.1,-5.5,8.9]) + mp.CreateNewCondition("PointLoadCondition3D1N",1,[node.Id],mp.GetProperties()[1]) + + + def _apply_material_properties(self,mp): + #define properties + mp.GetProperties()[1].SetValue(KratosMultiphysics.YOUNG_MODULUS,100e3) + mp.GetProperties()[1].SetValue(KratosMultiphysics.POISSON_RATIO,0.3) + mp.GetProperties()[1].SetValue(KratosMultiphysics.THICKNESS,1.0) + mp.GetProperties()[1].SetValue(KratosMultiphysics.DENSITY,1.0) + + g = [0,0,0] + mp.GetProperties()[1].SetValue(KratosMultiphysics.VOLUME_ACCELERATION,g) + + cl = StructuralMechanicsApplication.LinearElasticPlaneStress2DLaw() + + mp.GetProperties()[1].SetValue(KratosMultiphysics.CONSTITUTIVE_LAW,cl) + + + def _solve(self,mp): + #define a minimal newton raphson solver + linear_solver = KratosMultiphysics.SkylineLUFactorizationSolver() + builder_and_solver = KratosMultiphysics.ResidualBasedBlockBuilderAndSolver(linear_solver) + scheme = KratosMultiphysics.ResidualBasedIncrementalUpdateStaticScheme() + convergence_criterion = KratosMultiphysics.ResidualCriteria(1e-14,1e-20) + + max_iters = 20 + compute_reactions = True + reform_step_dofs = True + calculate_norm_dx = False + move_mesh_flag = True + strategy = KratosMultiphysics.ResidualBasedLinearStrategy(mp, + scheme, + linear_solver, + builder_and_solver, + compute_reactions, + reform_step_dofs, + calculate_norm_dx, + move_mesh_flag) + strategy.SetEchoLevel(0) + + strategy.Check() + strategy.Solve() + + + def _check_results(self,node,displacement_results, rotation_results): + #check that the results are exact on the node + disp = node.GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT) + self.assertAlmostEqual(disp[0], displacement_results[0], 10) + self.assertAlmostEqual(disp[1], displacement_results[1], 10) + self.assertAlmostEqual(disp[2], displacement_results[2], 10) + + rot = node.GetSolutionStepValue(KratosMultiphysics.ROTATION) + self.assertAlmostEqual(rot[0], rotation_results[0], 10) + self.assertAlmostEqual(rot[1], rotation_results[1], 10) + self.assertAlmostEqual(rot[2], rotation_results[2], 10) + + + def execute_shell_test(self, element_name, displacement_results, rotation_results, do_post_processing): + mp = KratosMultiphysics.ModelPart("solid_part") + mp.SetBufferSize(2) + + self._add_variables(mp) + self._apply_material_properties(mp) + self._create_nodes(mp,element_name) + self._add_dofs(mp) + self._create_elements(mp,element_name) + + #create a submodelpart for dirichlet boundary conditions + bcs_dirichlet = mp.CreateSubModelPart("BoundaryCondtionsDirichlet") + bcs_dirichlet.AddNodes([1,2,4]) + + #create a submodelpart for neumann boundary conditions + bcs_neumann = mp.CreateSubModelPart("BoundaryCondtionsNeumann") + bcs_neumann.AddNodes([3]) + + self._apply_dirichlet_BCs(bcs_dirichlet) + self._apply_neumann_BCs(bcs_neumann) + self._solve(mp) + + self._check_results(mp.Nodes[3],displacement_results, rotation_results) + + if do_post_processing: + self.__post_process(mp) + + + def test_thin_shell_triangle(self): + element_name = "ShellThinElementCorotational3D3N" + displacement_results = [0.0002324779832 , -0.0002233435997 , 0.0002567143455] + rotation_results = [0.0003627433341 , -0.0001926662603 , -0.0004682681704] + + self.execute_shell_test(element_name, + displacement_results, + rotation_results, + False) # Do PostProcessing for GiD? + + + def test_thick_shell_triangle(self): + element_name = "ShellThickElementCorotational3D3N" + displacement_results = [7.18997182e-05 , -0.0001572802804 , 0.0005263940488] + rotation_results = [0.0003316612014 , -0.0002798472414 , 5.141506e-07] + + self.execute_shell_test(element_name, + displacement_results, + rotation_results, + False) # Do PostProcessing for GiD? + + + def test_thin_shell_quadrilateral(self): + element_name = "ShellThinElementCorotational3D4N" + displacement_results = [0.0021909310921 , -0.0021683746759 , 0.0007191338749] + rotation_results = [0.0028191154606 , 0.0008171818407 , -0.0069146010725] + + self.execute_shell_test(element_name, + displacement_results, + rotation_results, + False) # Do PostProcessing for GiD? + + + def test_thick_shell_quadrilateral(self): + element_name = "ShellThickElementCorotational3D4N" + displacement_results = [0.0003605563407 , -0.0006304969456 , 0.0012549432749] + rotation_results = [0.0012002334629 , -0.0004107323793 , -0.0011652421744] + + self.execute_shell_test(element_name, + displacement_results, + rotation_results, + False) # Do PostProcessing for GiD? + + + def __post_process(self, main_model_part): + from gid_output_process import GiDOutputProcess + self.gid_output = GiDOutputProcess(main_model_part, + "gid_output", + KratosMultiphysics.Parameters(""" + { + "result_file_configuration" : { + "gidpost_flags": { + "GiDPostMode": "GiD_PostBinary", + "WriteDeformedMeshFlag": "WriteUndeformed", + "WriteConditionsFlag": "WriteConditions", + "MultiFileFlag": "SingleFile" + }, + "nodal_results" : ["DISPLACEMENT", "ROTATION", "POINT_LOAD"], + "gauss_point_results" : ["GREEN_LAGRANGE_STRAIN_TENSOR","CAUCHY_STRESS_TENSOR"] + } + } + """) + ) + + self.gid_output.ExecuteInitialize() + self.gid_output.ExecuteBeforeSolutionLoop() + self.gid_output.ExecuteInitializeSolutionStep() + self.gid_output.PrintOutput() + self.gid_output.ExecuteFinalizeSolutionStep() + self.gid_output.ExecuteFinalize() + +if __name__ == '__main__': + KratosUnittest.main() diff --git a/applications/StructuralMechanicsApplication/tests/test_patch_test_truss.py b/applications/StructuralMechanicsApplication/tests/test_patch_test_truss.py new file mode 100644 index 000000000000..b24c222ae63b --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/test_patch_test_truss.py @@ -0,0 +1,420 @@ +from __future__ import print_function, absolute_import, division +import KratosMultiphysics + +import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication +import KratosMultiphysics.KratosUnittest as KratosUnittest + +from math import sqrt, sin, cos, pi, exp, atan + +class TestTruss3D2N(KratosUnittest.TestCase): + def setUp(self): + pass + + def _add_dofs(self,mp): + for node in mp.Nodes: + node.AddDof(KratosMultiphysics.DISPLACEMENT_X, KratosMultiphysics.REACTION_X) + node.AddDof(KratosMultiphysics.DISPLACEMENT_Y, KratosMultiphysics.REACTION_Y) + node.AddDof(KratosMultiphysics.DISPLACEMENT_Z, KratosMultiphysics.REACTION_Z) + + + def _add_variables(self,mp): + mp.AddNodalSolutionStepVariable(KratosMultiphysics.DISPLACEMENT) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.REACTION) + mp.AddNodalSolutionStepVariable(StructuralMechanicsApplication.POINT_LOAD) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.VOLUME_ACCELERATION) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.VELOCITY) + mp.AddNodalSolutionStepVariable(KratosMultiphysics.ACCELERATION) + + + def _apply_material_properties(self,mp,dim): + #define properties + mp.GetProperties()[0].SetValue(KratosMultiphysics.YOUNG_MODULUS,210e9) + mp.GetProperties()[0].SetValue(KratosMultiphysics.DENSITY,7850) + mp.GetProperties()[0].SetValue(StructuralMechanicsApplication.CROSS_AREA,0.01) + mp.GetProperties()[0].SetValue(StructuralMechanicsApplication.TRUSS_PRESTRESS_PK2,0) + mp.GetProperties()[0].SetValue(StructuralMechanicsApplication.RAYLEIGH_ALPHA,0) + mp.GetProperties()[0].SetValue(StructuralMechanicsApplication.RAYLEIGH_BETA,0) + + g = [0,0,0] + mp.GetProperties()[0].SetValue(KratosMultiphysics.VOLUME_ACCELERATION,g) + + cl = StructuralMechanicsApplication.LinearElastic3DLaw() + mp.GetProperties()[0].SetValue(KratosMultiphysics.CONSTITUTIVE_LAW,cl) + + + def _apply_BCs(self,mp,which_dof): + + if (which_dof == 'xyz'): + for node in mp.Nodes: + node.Fix(KratosMultiphysics.DISPLACEMENT_X) + node.Fix(KratosMultiphysics.DISPLACEMENT_Y) + node.Fix(KratosMultiphysics.DISPLACEMENT_Z) + if (which_dof == 'xz'): + for node in mp.Nodes: + node.Fix(KratosMultiphysics.DISPLACEMENT_X) + node.Fix(KratosMultiphysics.DISPLACEMENT_Z) + if (which_dof == 'yz'): + for node in mp.Nodes: + node.Fix(KratosMultiphysics.DISPLACEMENT_Y) + node.Fix(KratosMultiphysics.DISPLACEMENT_Z) + + def _apply_Neumann_BCs(self,mp,which_dof,load_size_dir): + + if(which_dof == 'y'): + for node in mp.Nodes: + node.SetSolutionStepValue(StructuralMechanicsApplication. + POINT_LOAD_Y,0,load_size_dir) + if(which_dof == 'x'): + for node in mp.Nodes: + node.SetSolutionStepValue(StructuralMechanicsApplication. + POINT_LOAD_X,0,load_size_dir) + + + def _solve_linear(self,mp): + linear_solver = KratosMultiphysics.SkylineLUFactorizationSolver() + builder_and_solver = KratosMultiphysics.ResidualBasedBlockBuilderAndSolver(linear_solver) + scheme = KratosMultiphysics.ResidualBasedIncrementalUpdateStaticScheme() + + compute_reactions = True + reform_step_dofs = True + calculate_norm_dx = False + move_mesh_flag = True + strategy = KratosMultiphysics.ResidualBasedLinearStrategy(mp, + scheme, + linear_solver, + builder_and_solver, + compute_reactions, + reform_step_dofs, + calculate_norm_dx, + move_mesh_flag) + strategy.SetEchoLevel(0) + + strategy.Check() + strategy.Solve() + + def _solve_nonlinear(self,mp): + linear_solver = KratosMultiphysics.SkylineLUFactorizationSolver() + builder_and_solver = KratosMultiphysics.ResidualBasedBlockBuilderAndSolver(linear_solver) + scheme = KratosMultiphysics.ResidualBasedIncrementalUpdateStaticScheme() + convergence_criterion = KratosMultiphysics.ResidualCriteria(1e-8,1e-8) + convergence_criterion.SetEchoLevel(0) + + max_iters = 1000 + compute_reactions = True + reform_step_dofs = True + move_mesh_flag = True + strategy = KratosMultiphysics.ResidualBasedNewtonRaphsonStrategy(mp, + scheme, + linear_solver, + convergence_criterion, + builder_and_solver, + max_iters, + compute_reactions, + reform_step_dofs, + move_mesh_flag) + strategy.SetEchoLevel(0) + + strategy.Check() + strategy.Solve() + def _solve_dynamic(self,mp): + + #define a minimal newton raphson solver + linear_solver = KratosMultiphysics.SkylineLUFactorizationSolver() + builder_and_solver = KratosMultiphysics.ResidualBasedBlockBuilderAndSolver(linear_solver) + scheme = KratosMultiphysics.ResidualBasedBossakDisplacementScheme(0.00) + convergence_criterion = KratosMultiphysics.ResidualCriteria(1e-8,1e-8) + convergence_criterion.SetEchoLevel(0) + + + max_iters = 1000 + compute_reactions = True + reform_step_dofs = True + move_mesh_flag = True + strategy = KratosMultiphysics.ResidualBasedNewtonRaphsonStrategy(mp, + scheme, + linear_solver, + convergence_criterion, + builder_and_solver, + max_iters, + compute_reactions, + reform_step_dofs, + move_mesh_flag) + strategy.SetEchoLevel(0) + + strategy.Check() + strategy.Solve() + + + + def _check_results_linear(self,mp): + + #1.) check displacement result + displacement_nodes = [mp.Nodes[1].GetSolutionStepValue( + KratosMultiphysics.DISPLACEMENT),mp.Nodes[2].GetSolutionStepValue( + KratosMultiphysics.DISPLACEMENT),mp.Nodes[3].GetSolutionStepValue( + KratosMultiphysics.DISPLACEMENT)] + for i in range(3): + k = 0.00 + if (i == 1): k = -0.0026619856874997507 + self.assertAlmostEqual(displacement_nodes[1][i], k) + self.assertAlmostEqual(displacement_nodes[0][i], 0) + self.assertAlmostEqual(displacement_nodes[2][i], 0) + + #2.) check reactions + reaction_nodes = [mp.Nodes[1].GetSolutionStepValue( + KratosMultiphysics.REACTION),mp.Nodes[2].GetSolutionStepValue( + KratosMultiphysics.REACTION),mp.Nodes[3].GetSolutionStepValue( + KratosMultiphysics.REACTION)] + + Force_y = 1000000 + self.assertAlmostEqual(reaction_nodes[0][0], Force_y) + self.assertAlmostEqual(reaction_nodes[2][0], -Force_y) + self.assertAlmostEqual(reaction_nodes[0][1], Force_y/2) + self.assertAlmostEqual(reaction_nodes[2][1], Force_y/2) + def _check_results_nonlinear(self,mp,timestep,Force_i): + ##node1 + node_temp = mp.Nodes[1] + disp_temp = node_temp.GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT) + reac_temp = node_temp.GetSolutionStepValue(KratosMultiphysics.REACTION) + #disp_y + self.assertAlmostEqual(disp_temp[1], 0) + #reaction_y + reaction_y_node1 = Force_i*(-1) + self.assertAlmostEqual(reac_temp[1],reaction_y_node1,6) + #reaction_x + reaction_x_node1 = [741464.9276510741,1485888.977636112,2233316.9009164227, + 2983794.615716884,3737369.2509119534,4494089.191516033,5254004.126397622, + 6017165.0983619075,6783624.556737246,7553436.412628534,8326656.0969987875, + 9103340.621764094,9883548.644087134,10667340.53408764,11454778.446184492, + 12245926.394319195,13040850.331311818,13839618.232645638,14642300.18497437, + 15448968.47968232,16259697.711865114,17074564.885111626,17893649.522510014, + 18717033.784337185,19544802.592936598,20377043.765315644,21213848.154068694, + 22055309.79726978,22901526.07803619,23752597.894554257,24608629.841397412, + 25469730.40309285,26336012.160943132,27207592.014241144,28084591.41712631, + 28967136.632448073,29855359.004160944,30749395.24993747,31649387.775854316, + 32555485.015236698,33467841.79396308,34386619.72480394,35311987.633672595, + 36244122.02100001,37183207.5618443,38129437.64879564,39083014.9822317, + 40044152.21308944,41013072.64397469,41990010.99523344,42975214.24348978, + 43968942.54123137,44971470.22722923,45983086.93901924,47004098.840344116, + 48034829.97843962,49075623.78836585,50126844.76436112,51188880.321473464, + 52262142.87466787,53347072.16731208,54444137.88663925,55553842.61067612, + 56676725.13951358,57813364.2740804,58964383.118212394,60130453.99549516, + 61312304.09186774,62510721.95949238,63726565.048343465,64960768.47141639, + 66214355.26005781,67488448.43149039,68784285.27627705,70103234.38657254, + 71446816.09699601,72816727.21376368,74214871.18642414,75643395.26295514, + 77104736.71277626,78601680.98043492,80137435.76669273,81715726.72014935, + 83340922.98755075,85018204.87282823,86753792.28015186,88555263.27634439, + 90432010.47500862,92395916.01811945,94462388.67855237,96652033.38549507, + 98993500.26523624,101528726.98334643,104323616.16359182,107493197.43582612, + 111276440.23647068,116390127.39236663,-62782528.388332605,-63351316.30823133, + -63919034.598836,-64485690.945303164,-65051292.93836311,-65615848.075949684, + -66179363.76479947,-66741847.3220098,-67303305.9765681,-67863746.8708426, + -68423177.06204486,-68981603.5236578,-69539033.1468354,-70095472.74176757, + -70650929.0390236,-71205408.69085957,-71758918.27250087,-72311464.28340018, + -72863053.1484657,-73413691.21926463,-73963384.77520159,-74512140.02467461, + -75059963.10620539,] + self.assertAlmostEqual(reac_temp[0],reaction_x_node1[timestep]) + + ##node2 + node_temp = mp.Nodes[2] + disp_temp = node_temp.GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT_Y) + reac_temp = node_temp.GetSolutionStepValue(KratosMultiphysics.REACTION) + load_temp = node_temp.GetSolutionStepValue(StructuralMechanicsApplication.POINT_LOAD_Y) + #pointLoad + self.assertAlmostEqual(load_temp,Force_i) + #reaction_x + self.assertAlmostEqual(reac_temp[0],reaction_x_node1[timestep]*(-1)) + #displacement_y + EA = 210e9*0.01 + L = sqrt(4+1) + L3 = L*L*L + P_i = ((EA/(2*L3))*(disp_temp*disp_temp +2*1*disp_temp)*(disp_temp+1)) + self.assertAlmostEqual(P_i,Force_i,1) + + + def _check_results_dynamic(self,mp,time_i): + + #analaytical free-vibration node 3 + we1 = 7917.25 + we2 = 19113.94 + y1 = 1.4142*2.874e-5 + y2 = -1.4142*4.93107e-6 + test_disp_temp = y1*(1-cos(we1*time_i))-y2*(1-cos(we2*time_i)) + simulated_disp_temp = mp.Nodes[3].GetSolutionStepValue( + KratosMultiphysics.DISPLACEMENT_X) + + self.assertAlmostEqual(simulated_disp_temp, test_disp_temp,6) + + #analaytical free-vibration node 2 + we1 = 7917.25 + we2 = 19113.94 + y1 = 1.000*2.874e-5 + y2 = 1.000*4.93107e-6 + test_disp_temp = y1*(1-cos(we1*time_i))-y2*(1-cos(we2*time_i)) + simulated_disp_temp = mp.Nodes[2].GetSolutionStepValue( + KratosMultiphysics.DISPLACEMENT_X) + + self.assertAlmostEqual(simulated_disp_temp, test_disp_temp,6) + def _set_and_fill_buffer(self,mp,buffer_size,delta_time): + # Set buffer size + mp.SetBufferSize(buffer_size) + + # Fill buffer + time = mp.ProcessInfo[KratosMultiphysics.TIME] + time = time - delta_time * (buffer_size) + mp.ProcessInfo.SetValue(KratosMultiphysics.TIME, time) + for size in range(0, buffer_size): + step = size - (buffer_size -1) + mp.ProcessInfo.SetValue(KratosMultiphysics.STEP, step) + time = time + delta_time + #delta_time is computed from previous time in process_info + mp.CloneTimeStep(time) + + mp.ProcessInfo[KratosMultiphysics.IS_RESTARTED] = False + + def test_truss3D2N_linear(self): + dim = 3 + mp = KratosMultiphysics.ModelPart("solid_part") + self._add_variables(mp) + self._apply_material_properties(mp,dim) + + #create nodes + mp.CreateNewNode(1,0.0,0.0,0.0) + mp.CreateNewNode(2,2.0,1.0,0.0) + mp.CreateNewNode(3,4.0,0.0,0.0) + #add dofs + self._add_dofs(mp) + #create condition + mp.CreateNewCondition("PointLoadCondition3D1N",1,[2],mp.GetProperties()[0]) + + #create submodelparts for dirichlet boundary conditions + bcs_xyz = mp.CreateSubModelPart("Dirichlet_XYZ") + bcs_xyz.AddNodes([1,3]) + bcs_xz = mp.CreateSubModelPart("Dirichlet_XZ") + bcs_xz.AddNodes([2]) + + #create a submodalpart for neumann boundary conditions + bcs_neumann = mp.CreateSubModelPart("PointLoad3D_neumann") + bcs_neumann.AddNodes([2]) + bcs_neumann.AddConditions([1]) + + #create Element + mp.CreateNewElement("TrussLinearElement3D2N", 1, [1,2], mp.GetProperties()[0]) + mp.CreateNewElement("TrussLinearElement3D2N", 2, [2,3], mp.GetProperties()[0]) + + #apply boundary conditions + Force_Y = -1000000.00 + self._apply_BCs(bcs_xyz,'xyz') + self._apply_BCs(bcs_xz,'xz') + self._apply_Neumann_BCs(bcs_neumann,'y',Force_Y) + + #solve + compare + self._solve_linear(mp) + self._check_results_linear(mp) + + def test_truss3D2N_nonlinear(self): + dim = 3 + mp = KratosMultiphysics.ModelPart("solid_part") + self._add_variables(mp) + self._apply_material_properties(mp,dim) + + #create nodes + mp.CreateNewNode(1,0.0,0.0,0.0) + mp.CreateNewNode(2,2.0,1.0,0.0) + #add dofs + self._add_dofs(mp) + #create condition + mp.CreateNewCondition("PointLoadCondition3D1N",1,[2],mp.GetProperties()[0]) + + #create submodelparts for dirichlet boundary conditions + bcs_xyz = mp.CreateSubModelPart("Dirichlet_XYZ") + bcs_xyz.AddNodes([1]) + bcs_xz = mp.CreateSubModelPart("Dirichlet_XZ") + bcs_xz.AddNodes([2]) + + #create a submodalpart for neumann boundary conditions + bcs_neumann = mp.CreateSubModelPart("PointLoad3D_neumann") + bcs_neumann.AddNodes([2]) + bcs_neumann.AddConditions([1]) + + #create Element + mp.CreateNewElement("TrussElement3D2N", 1, [1,2], mp.GetProperties()[0]) + #apply constant boundary conditions + self._apply_BCs(bcs_xyz,'xyz') + self._apply_BCs(bcs_xz,'xz') + + + #incrementally increase load -> nonlinear case + Force_y = -37000000 + time_start = 0.00 + time_end = 0.05 + time_delta = 0.01 + time_i = time_start + time_step = 0 + while (time_i < time_end): + + time_i += time_delta + #apply non-constant boundary conditions + Force_i = Force_y*time_i + self._apply_Neumann_BCs(bcs_neumann,'y',Force_i) + #solve + compare + self._solve_nonlinear(mp) + self._check_results_nonlinear(mp,time_step,Force_i) + time_step += 1 + + def test_truss3D2N_dynamic(self): + dim = 3 + mp = KratosMultiphysics.ModelPart("solid_part") + self._add_variables(mp) + self._apply_material_properties(mp,dim) + + #create nodes + mp.CreateNewNode(1,0.0,0.0,0.0) + mp.CreateNewNode(2,0.5,0.0,0.0) + mp.CreateNewNode(3,1.0,0.0,0.0) + #add dofs + self._add_dofs(mp) + #create condition + mp.CreateNewCondition("PointLoadCondition3D1N",1,[3],mp.GetProperties()[0]) + #create submodelparts for dirichlet boundary conditions + bcs_xyz = mp.CreateSubModelPart("Dirichlet_XYZ") + bcs_xyz.AddNodes([1]) + bcs_yz = mp.CreateSubModelPart("Dirichlet_YZ") + bcs_yz.AddNodes([2,3]) + #create a submodalpart for neumann boundary conditions + bcs_neumann = mp.CreateSubModelPart("PointLoad3D_neumann") + bcs_neumann.AddNodes([3]) + bcs_neumann.AddConditions([1]) + #create Elements + mp.CreateNewElement("TrussElement3D2N", 1, [1,2], mp.GetProperties()[0]) + mp.CreateNewElement("TrussElement3D2N", 2, [2,3], mp.GetProperties()[0]) + #apply constant boundary conditions + Force_X = 100000 + self._apply_BCs(bcs_xyz,'xyz') + self._apply_BCs(bcs_yz,'yz') + self._apply_Neumann_BCs(bcs_neumann,'x',Force_X) + + #loop over time + time_start = 0.00 + time_end = 0.000002 + time_delta = 0.000001 + time_i = time_start + time_step = 0 + self._set_and_fill_buffer(mp,2,time_delta) + + x = [] + y = [] + y_1 = [] + while (time_i <= time_end): + + time_i += time_delta + mp.CloneTimeStep(time_i) + #solve + compare + self._solve_dynamic(mp) + self._check_results_dynamic(mp,time_i) + time_step += 1 + + +if __name__ == '__main__': + KratosUnittest.main() + diff --git a/applications/StructuralMechanicsApplication/tests/truss_test/dynamic_3D2NTruss_test.mdpa b/applications/StructuralMechanicsApplication/tests/truss_test/dynamic_3D2NTruss_test.mdpa new file mode 100644 index 000000000000..921bf27e4c8e --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/truss_test/dynamic_3D2NTruss_test.mdpa @@ -0,0 +1,73 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Properties 1 + TRUSS_PRESTRESS_PK2 0 + CROSS_AREA 0.01 + DENSITY 7850 + YOUNG_MODULUS 210000000000 + RAYLEIGH_ALPHA 471.88 + RAYLEIGH_BETA 5.1e-6 +End Properties + +Begin Nodes + 1 0.00000 0.00000 0.00000 + 2 0.50000 0.00000 0.00000 + 3 1.00000 0.00000 0.00000 +End Nodes + + +Begin Elements TrussElement3D2N// GUI group identifier: structure + 1 1 1 2 + 2 1 2 3 +End Elements + +Begin Conditions PointLoadCondition3D1N// GUI group identifier: neumann +1 0 3 +End Conditions + +Begin SubModelPart Parts_structure // Group structure // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletXYZ // Group dirichletXYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletXZ // Group dirichletXZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + 2 + 3 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart PointLoad3D_neumann // Group neumann // Subtree PointLoad3D + Begin SubModelPartNodes + 3 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/truss_test/dynamic_3D2NTruss_test_parameters.json b/applications/StructuralMechanicsApplication/tests/truss_test/dynamic_3D2NTruss_test_parameters.json new file mode 100644 index 000000000000..a691ff0f85ca --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/truss_test/dynamic_3D2NTruss_test_parameters.json @@ -0,0 +1,118 @@ +{ + "problem_data" : { + "problem_name" : "dyn", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 0.00003, + "start_time" : 0.0, + "end_time" : 0.004, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_implicit_dynamic_solver", + "echo_level" : 0, + "solution_type" : "Dynamic", + "time_integration_method" : "Implicit", + "scheme_type" : "Bossak", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "truss_test/dynamic_3D2NTruss_test" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 0.0001, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 100, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_structure"], + "processes_sub_model_part_list" : ["DISPLACEMENT_dirichletXYZ","DISPLACEMENT_dirichletXZ","PointLoad3D_neumann"], + "rotation_dofs" : false + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletXYZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletXZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : false, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "process_factory", + "kratos_module" : "KratosMultiphysics", + "check" : "DirectorVectorNonZero direction", + "help" : "This process ", + "process_name" : "ApplyConstantVectorValueProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "PointLoad3D_neumann", + "variable_name" : "POINT_LOAD", + "modulus" : 10000000, + "direction" : [1,0,0] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_X"], + "input_file_name" : "truss_test/dynamic_3D2NTruss_test_results.json", + "model_part_name" : "PointLoad3D_neumann", + "time_frequency" : 0.00002 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_X"], + "output_file_name" : "truss_test/dynamic_3D2NTruss_test_results.json", + "model_part_name" : "PointLoad3D_neumann", + "time_frequency" : 0.00002 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/truss_test/dynamic_3D2NTruss_test_results.json b/applications/StructuralMechanicsApplication/tests/truss_test/dynamic_3D2NTruss_test_results.json new file mode 100644 index 000000000000..966f20446bc8 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/truss_test/dynamic_3D2NTruss_test_results.json @@ -0,0 +1,2 @@ +{"NODE_3": {"DISPLACEMENT_X": [0.00010818426170662768,0.0005147742296731891,0.0012462374043973076,0.002176446797979151,0.0031680227744453485,0.004105482717535392,0.004917556596880044,0.005584024934082578,0.006126490857701354,0.006587542426420669,0.007006028600991124,0.007396708355469526,0.007740492422844197,0.007987814256602768,0.008073538298819847,0.007938365246872478,0.007549837350722944,0.006916326809207676,0.006089749675300044,0.0051564023076355004,0.004218981945514357,0.0033752837256371604,0.0026995906964549176,0.002231473346815365,0.001974226596938833,0.0019023300643217275,0.0019748917561504277,0.0021506126785213065,0.0023997254515576603,0.0027096095251435645,0.0030829684757816356,0.003529859010938857,0.004056711581643935,0.004656234923561837,0.005301613488411454,0.005946939862037098,0.006533870626722719,0.007002627964450936,0.0073042094217181325,0.007410366834625985,0.0073186549360907995,0.007051387535924973,0.0066491621371426645,0.006161122940523292,0.005634869690338771,0.0051087265590661,0.004608116186289002,0.004146405971601523,0.0037292422085030232,0.0033604431430710284,0.003047224185466173,0.002802924146222124,0.002646333411249128,0.0025978787430033378,0.002673926044360203,0.0028810235549691157,0.003211887617858524,0.0036443818078476667,0.00414385472998809,0.004668252697180961,0.005174679217598452,0.005625734814358849,0.0059941213155547,0.006264573597176663,0.0064329980830704885,0.006503490477419509,0.006484433313970616,0.006384994474422043,0.006213057308819703,0.005975034343849237,0.005677348390338191,0.005328815832793625,0.004942895560893067,0.004538839745470306,0.004141158249334802,0.003777354602102089,0.003474430202136819,0.00325502056430891,0.0031341238171828,0.0031171977018055997,0.003200010144130207,0.0033701555189906383,0.0036097319085372902,0.0038984265872093133,0.004216236610349985,0.004545250142501426,0.0048702600914097135,0.005178362329199223,0.005457989158642183,0.005697959511625575,0.00588706207143576,0.006014459176548355,0.006070888390314246,0.006050345593158006,0.005951748267462884,0.005780053415930448,0.005546443125466786,0.005267444000002283,0.004963133307550989,0.004654817549335267,0.004362682911946937,0.00410388685653455,0.0038914056314670463,0.00373372794167747,0.0036352599836533077,0.0035971453960735506,0.0036181459452382975,0.003695282506186462,0.0038240756154159605,0.003998401390411977,0.004210134999108806,0.004448842886296085,0.004701782646446555,0.004954380725437476,0.0051912136223891785,0.005397363660682886,0.00555990239653622,0.005669207330182206,0.0057198525956813845,0.005710918678358824,0.005645706901043908,0.005530979313742448,0.005375935868278717,0.005191166088342617,0.00498777082673088,0.004776759979835575,0.0045687256158492544,0.004373700434694851,0.0042010644089814754,0.00405936852488401,0.003955997442126995,0.0038966724420656206,0.0038848751990089446,0.003921326404617222]}, + "TIME": [3e-05,6e-05,9e-05,0.00012,0.00015000000000000001,0.00018,0.00021,0.00024,0.00027,0.00030000000000000003,0.00033000000000000005,0.0003600000000000001,0.0003900000000000001,0.0004200000000000001,0.00045000000000000015,0.0004800000000000002,0.0005100000000000001,0.0005400000000000001,0.0005700000000000001,0.0006000000000000001,0.00063,0.00066,0.00069,0.0007199999999999999,0.0007499999999999999,0.0007799999999999999,0.0008099999999999998,0.0008399999999999998,0.0008699999999999998,0.0008999999999999998,0.0009299999999999997,0.0009599999999999997,0.0009899999999999998,0.0010199999999999999,0.00105,0.00108,0.00111,0.0011400000000000002,0.0011700000000000002,0.0012000000000000003,0.0012300000000000004,0.0012600000000000005,0.0012900000000000006,0.0013200000000000006,0.0013500000000000007,0.0013800000000000008,0.0014100000000000009,0.001440000000000001,0.001470000000000001,0.0015000000000000011,0.0015300000000000012,0.0015600000000000013,0.0015900000000000014,0.0016200000000000014,0.0016500000000000015,0.0016800000000000016,0.0017100000000000017,0.0017400000000000017,0.0017700000000000018,0.001800000000000002,0.001830000000000002,0.001860000000000002,0.0018900000000000021,0.0019200000000000022,0.0019500000000000023,0.001980000000000002,0.0020100000000000022,0.0020400000000000023,0.0020700000000000024,0.0021000000000000025,0.0021300000000000026,0.0021600000000000026,0.0021900000000000027,0.002220000000000003,0.002250000000000003,0.002280000000000003,0.002310000000000003,0.002340000000000003,0.002370000000000003,0.0024000000000000033,0.0024300000000000033,0.0024600000000000034,0.0024900000000000035,0.0025200000000000036,0.0025500000000000037,0.0025800000000000037,0.002610000000000004,0.002640000000000004,0.002670000000000004,0.002700000000000004,0.002730000000000004,0.002760000000000004,0.0027900000000000043,0.0028200000000000044,0.0028500000000000044,0.0028800000000000045,0.0029100000000000046,0.0029400000000000047,0.0029700000000000048,0.003000000000000005,0.003030000000000005,0.003060000000000005,0.003090000000000005,0.003120000000000005,0.0031500000000000052,0.0031800000000000053,0.0032100000000000054,0.0032400000000000055,0.0032700000000000055,0.0033000000000000056,0.0033300000000000057,0.0033600000000000058,0.003390000000000006,0.003420000000000006,0.003450000000000006,0.003480000000000006,0.003510000000000006,0.0035400000000000062,0.0035700000000000063,0.0036000000000000064,0.0036300000000000065,0.0036600000000000066,0.0036900000000000066,0.0037200000000000067,0.003750000000000007,0.003780000000000007,0.003810000000000007,0.003840000000000007,0.003870000000000007,0.003900000000000007,0.003930000000000007,0.003960000000000007,0.0039900000000000066,0.004020000000000006]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/truss_test/linear_3D2NTruss_test.mdpa b/applications/StructuralMechanicsApplication/tests/truss_test/linear_3D2NTruss_test.mdpa new file mode 100644 index 000000000000..e61c3540c267 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/truss_test/linear_3D2NTruss_test.mdpa @@ -0,0 +1,82 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Properties 1 + TRUSS_PRESTRESS_PK2 0 + CROSS_AREA 0.01 + DENSITY 7850 + YOUNG_MODULUS 210000000000 +End Properties + +Begin Nodes + 1 0.00000 0.00000 0.00000 + 2 2.00000 1.00000 0.00000 + 3 4.00000 0.00000 0.00000 +End Nodes + + +Begin Elements TrussLinearElement3D2N// GUI group identifier: structure + 1 1 1 2 + 2 1 2 3 +End Elements + +Begin Conditions PointLoadCondition3D1N// GUI group identifier: neumann +1 0 2 +End Conditions + +Begin SubModelPart Parts_structure // Group structure // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + 3 + End SubModelPartNodes + Begin SubModelPartElements + 1 + 2 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletXYZ // Group dirichletXYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 3 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_allnodes // Group allnodes // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + 2 + 3 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletXZ // Group dirichletYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + 2 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart PointLoad3D_neumann // Group neumann // Subtree PointLoad3D + Begin SubModelPartNodes + 2 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/truss_test/linear_3D2NTruss_test_parameters.json b/applications/StructuralMechanicsApplication/tests/truss_test/linear_3D2NTruss_test_parameters.json new file mode 100644 index 000000000000..4f3ba0eda8ee --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/truss_test/linear_3D2NTruss_test_parameters.json @@ -0,0 +1,117 @@ +{ + "problem_data" : { + "problem_name" : "linear_3D2NTruss_test", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 1.1, + "start_time" : 0.0, + "end_time" : 1.0, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_static_solver", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "truss_test/linear_3D2NTruss_test" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-9, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 1e-9, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 100, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_structure"], + "processes_sub_model_part_list" : ["DISPLACEMENT_dirichletXYZ","DISPLACEMENT_dirichletXZ","PointLoad3D_neumann","DISPLACEMENT_allnodes"], + "rotation_dofs" : false + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletXYZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletXZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "process_factory", + "kratos_module" : "KratosMultiphysics", + "check" : "DirectorVectorNonZero direction", + "help" : "This process ", + "process_name" : "ApplyConstantVectorValueProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "PointLoad3D_neumann", + "variable_name" : "POINT_LOAD", + "modulus" : 1000000, + "direction" : [0,-1,0] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Y","REACTION_Y"], + "input_file_name" : "truss_test/linear_3D2NTruss_test_results.json", + "model_part_name" : "Structure", + "time_frequency" : 0.9 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Y"], + "output_file_name" : "truss_test/linear_3D2NTruss_test_results.json", + "model_part_name" : "Structure", + "time_frequency" : 0.9 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/truss_test/linear_3D2NTruss_test_results.json b/applications/StructuralMechanicsApplication/tests/truss_test/linear_3D2NTruss_test_results.json new file mode 100644 index 000000000000..95af10a00d00 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/truss_test/linear_3D2NTruss_test_results.json @@ -0,0 +1,4 @@ +{"NODE_1": {"DISPLACEMENT_Y": [0], "REACTION_Y": [500000]}, + "NODE_2": {"DISPLACEMENT_Y": [ -0.0026619856874997507], "REACTION_Y": [0]}, + "NODE_3": {"DISPLACEMENT_Y": [0], "REACTION_Y": [500000]}, + "TIME": [1.1]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/truss_test/nonlinear_3D2NTruss_test.mdpa b/applications/StructuralMechanicsApplication/tests/truss_test/nonlinear_3D2NTruss_test.mdpa new file mode 100644 index 000000000000..2f7831085195 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/truss_test/nonlinear_3D2NTruss_test.mdpa @@ -0,0 +1,66 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Properties 1 + TRUSS_PRESTRESS_PK2 1e5 + CROSS_AREA 0.01 + DENSITY 7.85000E+003 + YOUNG_MODULUS 210000000000 +End Properties + +Begin Nodes + 1 0.00000 0.00000 0.00000 + 2 2.00000 1.00000 0.00000 +End Nodes + + +Begin Elements TrussElement3D2N// GUI group identifier: structure + 1 1 1 2 +End Elements + +Begin Conditions PointLoadCondition3D1N// GUI group identifier: neumann +1 0 2 +End Conditions + +Begin SubModelPart Parts_structure // Group structure // Subtree Parts + Begin SubModelPartNodes + 1 + 2 + End SubModelPartNodes + Begin SubModelPartElements + 1 + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletXYZ // Group dirichletXYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + 1 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart DISPLACEMENT_dirichletXZ // Group dirichletYZ // Subtree DISPLACEMENT + Begin SubModelPartNodes + 2 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + End SubModelPartConditions +End SubModelPart +Begin SubModelPart PointLoad3D_neumann // Group neumann // Subtree PointLoad3D + Begin SubModelPartNodes + 2 + End SubModelPartNodes + Begin SubModelPartElements + End SubModelPartElements + Begin SubModelPartConditions + 1 + End SubModelPartConditions +End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/truss_test/nonlinear_3D2NTruss_test_parameters.json b/applications/StructuralMechanicsApplication/tests/truss_test/nonlinear_3D2NTruss_test_parameters.json new file mode 100644 index 000000000000..1a4e2fd6d687 --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/truss_test/nonlinear_3D2NTruss_test_parameters.json @@ -0,0 +1,115 @@ +{ + "problem_data" : { + "problem_name" : "testnew", + "model_part_name" : "Structure", + "domain_size" : 3, + "time_step" : 0.01, + "start_time" : 0.0, + "end_time" : 1.2, + "echo_level" : 0 + }, + "solver_settings" : { + "solver_type" : "structural_mechanics_static_solver", + "echo_level" : 0, + "solution_type" : "Static", + "analysis_type" : "Non-Linear", + "model_import_settings" : { + "input_type" : "mdpa", + "input_filename" : "truss_test/nonlinear_3D2NTruss_test" + }, + "line_search" : false, + "convergence_criterion" : "Residual_criterion", + "displacement_relative_tolerance" : 1e-9, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 1000, + "linear_solver_settings" : { + "solver_type" : "Super_LU", + "scaling" : false, + "verbosity" : 0 + }, + "problem_domain_sub_model_part_list" : ["Parts_structure"], + "processes_sub_model_part_list" : ["DISPLACEMENT_dirichletXYZ","DISPLACEMENT_dirichletXZ","PointLoad3D_neumann"], + "rotation_dofs" : true + }, + "constraints_process_list" : [{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletXYZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : true, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "impose_vector_value_by_components_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "DISPLACEMENT_dirichletXZ", + "variable_name" : "DISPLACEMENT", + "is_fixed_x" : true, + "is_fixed_y" : false, + "is_fixed_z" : true, + "value" : [0.0,0.0,0.0] + } + }], + "loads_process_list" : [{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "help" : "This process fixes the selected components of a given vector variable", + "process_name" : "ImposeVectorValueByComponentsProcess", + "Parameters" : { + "mesh_id" : 0, + "model_part_name" : "PointLoad3D_neumann", + "variable_name" : "POINT_LOAD", + "value" : [0.0,"-37000000*t",0.0] + } + }], + "restart_options" : { + "SaveRestart" : false, + "RestartFrequency" : 0, + "LoadRestart" : false, + "Restart_Step" : 0 + }, + "constraints_data" : { + "incremental_load" : false, + "incremental_displacement" : false + }, + "list_other_processes": [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["DISPLACEMENT_Y","REACTION_Y","REACTION_X","POINT_LOAD_Y"], + "input_file_name" : "truss_test/nonlinear_3D2NTruss_test_results.json", + "model_part_name" : "Structure", + "time_frequency" : 0.005 + } + } + ], + "print_output_process" : [ + { + "python_module" : "json_output_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "JsonOutputProcess", + "Parameters" : { + "output_variables" : ["DISPLACEMENT_Y","REACTION_Y","REACTION_X","POINT_LOAD_Y"], + "output_file_name" : "truss_test/nonlinear_3D2NTruss_test_results.json", + "model_part_name" : "Structure", + "time_frequency" : 0.005 + } + } + ] +} diff --git a/applications/StructuralMechanicsApplication/tests/truss_test/nonlinear_3D2NTruss_test_results.json b/applications/StructuralMechanicsApplication/tests/truss_test/nonlinear_3D2NTruss_test_results.json new file mode 100644 index 000000000000..f358846b5b9c --- /dev/null +++ b/applications/StructuralMechanicsApplication/tests/truss_test/nonlinear_3D2NTruss_test_results.json @@ -0,0 +1,11 @@ +{"NODE_1": +{"DISPLACEMENT_Y": [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0], +"REACTION_Y": [369999.9999999173,740000.0000001584,1109999.999999985,1480000.0000000522,1849999.9999999858,2220000.000000126,2590000.000000162,2959999.9999998314,3330000.0000000037,3700000.000000171,4069999.999999782,4439999.999999962,4810000.00000004,5179999.999999944,5549999.99999997,5919999.999999971,6290000.000000098,6660000.000000074,7029999.999999998,7400000.000000093,7770000.000000045,8139999.999999962,8510000.000000112,8880000.000000037,9250000.000000129,9620000.000000149,9989999.999999933,10360000.00000003,10730000.000000004,11100000.000000142,11469999.9999999,11839999.99999998,12210000.000000037,12579999.999999901,12949999.999999933,13319999.999999924,13689999.999999955,14060000.000000032,14429999.9999999,14800000.00000011,15170000.000000091,15539999.999999985,15910000.000000047,16280000.000000013,16649999.999999959,17019999.999999903,17390000.000000037,17760000.0,18129999.999999825,18500000.00000006,18870000.000000194,19240000.000000108,19610000.00000005,19980000.000000037,20349999.999999985,20720000.000000056,21090000.000000034,21460000.000000127,21830000.000000052,22200000.000000067,22570000.0,22940000.000000022,23309999.999999955,23680000.000000097,24049999.999999937,24419999.9999999,24789999.99999998,25160000.000000067,25530000.00000004,25899999.999999866,26270000.00000006,26640000.000000086,27009999.999999985,27379999.9999999,27749999.999999993,28120000.000000045,28489999.999999985,28860000.00000002,29229999.999999944,29600000.00000002,29969999.999999903,30339999.999999806,30709999.99999977,31079999.999999754,31449999.99999941,31819999.99999911,32189999.999998387,32559999.99999695,32929999.999994,33299999.999986853,33669999.999968246,34039999.99991255,34410000.00000008,34779999.99999997,35150000.00000015,35519999.99999997,35889999.99996039,36260000.00000017,36629999.999999955,37000000.0000001,37369999.99999991,37740000.00000008,38109999.99999991,38480000.000000186,38849999.99999983,39219999.999999925,39590000.00000009,39960000.000000075,40330000.00000007,40700000.00000012,41069999.99999978,41440000.00000029,41810000.000000335,42179999.99999991,42549999.99999992,42919999.99999995,43290000.00000008,43660000.00000002,44029999.99999991,44400000.00000004], +"REACTION_X": [741466.703566062,1485892.5579654947,2233322.314916695,2983801.893432626,3737378.423203861,4494100.29009228,5254017.183846725,6017180.148186257,6783641.633392477,7553455.551558229,8326677.334675008,9103363.995731601,9883574.193005584,10667368.29777864,11454808.465682304,12245958.711920287,13040884.990632927,13839655.27867965,14642339.664151046,15449010.43993536,16259742.202699386,17074611.957676068,17893699.22967522,18717086.18077713,19544857.735215075,20377101.711978853,21213908.965743955,22055373.536769878,22901592.810470924,23752667.687448073,24608702.76481769,25469806.529785857,26336091.566476673,27207674.777161554,28084677.619124576,28967226.358537216,29855452.34286951,30749492.29351321,31649488.620486617,32555589.76129744,33467950.546261854,34386732.59286908,35312104.73205185,36244243.46958612,37183333.48623227,38129568.18066645,39083150.25977327,40044292.381451815,41013217.85577239,41990161.41109117,42975370.03264047,43969103.882174976,44971637.30845746,45983259.959812425,47004278.01165445,48035015.52386772,49075815.94524465,50127043.784963004,51189086.474356584,52262356.44618386,53347293.463294744,54444367.23430788,55554080.36078215,56676971.66877566,57813619.98794698,58964648.45402058,60130729.42608442,61312590.12974097,62511019.16162215,63726874.02175633,64961089.87970945,66214689.83104548,67488796.96623819,68784648.6598288,70103613.60078976,71447212.23603164,72817141.50286429,74215305.00498457,75643850.17305079,77105214.49486889,78602183.67856607,80137965.74646278,81716286.74417071,83341516.31530009,85018835.39526612,86754464.70516321,88555983.39057453,90432785.5244711,92396755.2807941,94463304.36235125,96653042.11035702,98994625.67269658,101530004.7387767,104325104.71560685,107495005.49297565,111278819.87127148,116394058.48758975,-62782627.951846674,-63351416.47072054,-63919135.35558181,-64485792.29164699,-65051394.86970618,-65615950.58775118,-66179466.85257622,-66741950.98133378,-67303410.20306765,-67863851.66020021,-68423282.40999596,-68981709.42599085,-69539139.59938961,-70095579.74043348,-70651036.57974268,-71205516.76961999,-71759026.88533983,-72311573.42640342,-72863162.81776452,-73413801.41103639,-73963495.48566881,-74512251.25010426,-75060074.84290777], +"POINT_LOAD_Y": [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]}, + "NODE_2": +{"DISPLACEMENT_Y": [-0.0019781111669255527,-0.003965668939917075,-0.005965245064603095,-0.007977035434192049,-0.010001241236857972,-0.012038069157312365,-0.01408773158831002,-0.01615044685273162,-0.018226439436871772,-0.02031594023562243,-0.022419186810332895,-0.02453642366013368,-0.026667902507579777,-0.02881388259958707,-0.030974631024633992,-0.03315042304733422,-0.035341542461556706,-0.03754828196335545,-0.03977094354509447,-0.04200983891223842,-0.0442652899244495,-0.046537629062716086,-0.04882719992443147,-0.05113435774848358,-0.05345946997261787,-0.05580291682551218,-0.05816509195625368,-0.06054640310414756,-0.06294727281203798,-0.06536813918666867,-0.06780945670990758,-0.0702716971050721,-0.07275535026296766,-0.0752609252327802,-0.07778895128342246,-0.08033997904157252,-0.08291458171327354,-0.08551335639671195,-0.08813692549462517,-0.09078593823573933,-0.0934610723156768,-0.09616303566901961,-0.09889256838553909,-0.10165044478518846,-0.10443747566823768,-0.1072545107589299,-0.1101024413633888,-0.11298220326518822,-0.11589477988505971,-0.11884120573475482,-0.12182257019925007,-0.12484002168622854,-0.12789477218735146,-0.1309881023023693,-0.1341213667847716,-0.1372960006766453,-0.14051352611107795,-0.14377555987302618,-0.14708382182456436,-0.1504401443184031,-0.15384648274502846,-0.15730492738486712,-0.1608177167682746,-0.1643872527845088,-0.16801611782780962,-0.17170709432645526,-0.1754631870723259,-0.1792876488577612,-0.1831840100385418,-0.18715611278351366,-0.19120815095174465,-0.19534471676979362,-0.19957085578182837,-0.20389213193756697,-0.2083147052012345,-0.2128454247562983,-0.2174919418148453,-0.2222628473180383,-0.22716784158579084,-0.23221794546801222,-0.23742576611971689,-0.24280583572614614,-0.24837504924462336,-0.2541532390071479,-0.26016394240680085,-0.26643544840856265,-0.27300225761087243,-0.27990717501041235,-0.2872044066932957,-0.2949643202771825,-0.30328111221736115,-0.3122858989848975,-0.3221708185962865,-0.33323814829016996,-0.3460161271902617,-0.36160358204571397,-0.3833018546425704,-2.1550965986263284,-2.15640666114954,-2.1577127817568025,-2.1590149914259653,-2.160313320739422,-2.1616077998910854,-2.1628984586932267,-2.164185326583135,-2.165468432629653,-2.1667478055395506,-2.168023473663763,-2.169295465003498,-2.170563807216199,-2.171828527621385,-2.1730896532063655,-2.1743472106318222,-2.1756012262372852,-2.1768517260464826,-2.178098735772578,-2.1793422808232963,-2.180582386305947,-2.181819077032337,-2.1830523775235826], +"REACTION_Y": [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0], +"REACTION_X": [-741466.703566062,-1485892.5579654947,-2233322.314916695,-2983801.893432626,-3737378.423203861,-4494100.29009228,-5254017.183846725,-6017180.148186257,-6783641.633392477,-7553455.551558229,-8326677.334675008,-9103363.995731601,-9883574.193005584,-10667368.29777864,-11454808.465682304,-12245958.711920287,-13040884.990632927,-13839655.27867965,-14642339.664151046,-15449010.43993536,-16259742.202699386,-17074611.957676068,-17893699.22967522,-18717086.18077713,-19544857.735215075,-20377101.711978853,-21213908.965743955,-22055373.536769878,-22901592.810470924,-23752667.687448073,-24608702.76481769,-25469806.529785857,-26336091.566476673,-27207674.777161554,-28084677.619124576,-28967226.358537216,-29855452.34286951,-30749492.29351321,-31649488.620486617,-32555589.76129744,-33467950.546261854,-34386732.59286908,-35312104.73205185,-36244243.46958612,-37183333.48623227,-38129568.18066645,-39083150.25977327,-40044292.381451815,-41013217.85577239,-41990161.41109117,-42975370.03264047,-43969103.882174976,-44971637.30845746,-45983259.959812425,-47004278.01165445,-48035015.52386772,-49075815.94524465,-50127043.784963004,-51189086.474356584,-52262356.44618386,-53347293.463294744,-54444367.23430788,-55554080.36078215,-56676971.66877566,-57813619.98794698,-58964648.45402058,-60130729.42608442,-61312590.12974097,-62511019.16162215,-63726874.02175633,-64961089.87970945,-66214689.83104548,-67488796.96623819,-68784648.6598288,-70103613.60078976,-71447212.23603164,-72817141.50286429,-74215305.00498457,-75643850.17305079,-77105214.49486889,-78602183.67856607,-80137965.74646278,-81716286.74417071,-83341516.31530009,-85018835.39526612,-86754464.70516321,-88555983.39057453,-90432785.5244711,-92396755.2807941,-94463304.36235125,-96653042.11035702,-98994625.67269658,-101530004.7387767,-104325104.71560685,-107495005.49297565,-111278819.87127148,-116394058.48758975,62782627.951846674,63351416.47072054,63919135.35558181,64485792.29164699,65051394.86970618,65615950.58775118,66179466.85257622,66741950.98133378,67303410.20306765,67863851.66020021,68423282.40999596,68981709.42599085,69539139.59938961,70095579.74043348,70651036.57974268,71205516.76961999,71759026.88533983,72311573.42640342,72863162.81776452,73413801.41103639,73963495.48566881,74512251.25010426,75060074.84290777], +"POINT_LOAD_Y": [-370000.0,-740000.0,-1110000.0,-1480000.0,-1850000.0,-2220000.0,-2590000.0000000005,-2960000.0,-3330000.0,-3699999.9999999995,-4069999.9999999995,-4439999.999999999,-4809999.999999999,-5179999.999999999,-5550000.0,-5920000.0,-6290000.0,-6660000.000000001,-7030000.000000001,-7400000.000000002,-7770000.000000002,-8140000.000000002,-8510000.000000002,-8880000.000000002,-9250000.000000002,-9620000.000000002,-9990000.000000002,-10360000.000000004,-10730000.000000004,-11100000.000000004,-11470000.000000004,-11840000.000000004,-12210000.000000006,-12580000.000000006,-12950000.000000006,-13320000.000000006,-13690000.000000006,-14060000.000000006,-14430000.000000007,-14800000.000000007,-15170000.000000007,-15540000.000000007,-15910000.000000007,-16280000.000000007,-16650000.00000001,-17020000.000000007,-17390000.000000007,-17760000.00000001,-18130000.00000001,-18500000.000000007,-18870000.000000007,-19240000.000000007,-19610000.000000007,-19980000.00000001,-20350000.00000001,-20720000.00000001,-21090000.00000001,-21460000.00000001,-21830000.00000001,-22200000.00000001,-22570000.00000001,-22940000.00000001,-23310000.00000001,-23680000.00000001,-24050000.000000015,-24420000.000000015,-24790000.000000015,-25160000.000000015,-25530000.000000015,-25900000.000000015,-26270000.000000015,-26640000.000000015,-27010000.000000015,-27380000.000000015,-27750000.000000015,-28120000.000000015,-28490000.00000002,-28860000.00000002,-29230000.00000002,-29600000.00000002,-29970000.00000002,-30340000.00000002,-30710000.00000002,-31080000.00000002,-31450000.00000002,-31820000.00000002,-32190000.00000002,-32560000.000000022,-32930000.000000022,-33300000.000000022,-33670000.00000002,-34040000.00000002,-34410000.00000002,-34780000.00000002,-35150000.00000002,-35520000.00000002,-35890000.00000002,-36260000.00000002,-36630000.00000002,-37000000.00000002,-37370000.00000002,-37740000.00000002,-38110000.00000002,-38480000.00000002,-38850000.00000003,-39220000.00000003,-39590000.00000003,-39960000.00000003,-40330000.00000003,-40700000.00000003,-41070000.00000003,-41440000.00000003,-41810000.00000003,-42180000.00000003,-42550000.00000003,-42920000.00000003,-43290000.00000003,-43660000.00000003,-44030000.00000003,-44400000.00000003]}, + "TIME": [0.01,0.02,0.03,0.04,0.05,0.060000000000000005,0.07,0.08,0.09,0.09999999999999999,0.10999999999999999,0.11999999999999998,0.12999999999999998,0.13999999999999999,0.15,0.16,0.17,0.18000000000000002,0.19000000000000003,0.20000000000000004,0.21000000000000005,0.22000000000000006,0.23000000000000007,0.24000000000000007,0.25000000000000006,0.26000000000000006,0.2700000000000001,0.2800000000000001,0.2900000000000001,0.3000000000000001,0.3100000000000001,0.3200000000000001,0.3300000000000001,0.34000000000000014,0.35000000000000014,0.36000000000000015,0.37000000000000016,0.38000000000000017,0.3900000000000002,0.4000000000000002,0.4100000000000002,0.4200000000000002,0.4300000000000002,0.4400000000000002,0.45000000000000023,0.46000000000000024,0.47000000000000025,0.48000000000000026,0.49000000000000027,0.5000000000000002,0.5100000000000002,0.5200000000000002,0.5300000000000002,0.5400000000000003,0.5500000000000003,0.5600000000000003,0.5700000000000003,0.5800000000000003,0.5900000000000003,0.6000000000000003,0.6100000000000003,0.6200000000000003,0.6300000000000003,0.6400000000000003,0.6500000000000004,0.6600000000000004,0.6700000000000004,0.6800000000000004,0.6900000000000004,0.7000000000000004,0.7100000000000004,0.7200000000000004,0.7300000000000004,0.7400000000000004,0.7500000000000004,0.7600000000000005,0.7700000000000005,0.7800000000000005,0.7900000000000005,0.8000000000000005,0.8100000000000005,0.8200000000000005,0.8300000000000005,0.8400000000000005,0.8500000000000005,0.8600000000000005,0.8700000000000006,0.8800000000000006,0.8900000000000006,0.9000000000000006,0.9100000000000006,0.9200000000000006,0.9300000000000006,0.9400000000000006,0.9500000000000006,0.9600000000000006,0.9700000000000006,0.9800000000000006,0.9900000000000007,1.0000000000000007,1.0100000000000007,1.0200000000000007,1.0300000000000007,1.0400000000000007,1.0500000000000007,1.0600000000000007,1.0700000000000007,1.0800000000000007,1.0900000000000007,1.1000000000000008,1.1100000000000008,1.1200000000000008,1.1300000000000008,1.1400000000000008,1.1500000000000008,1.1600000000000008,1.1700000000000008,1.1800000000000008,1.1900000000000008,1.2000000000000008]} \ No newline at end of file diff --git a/applications/TopologyOptimizationApplication/custom_utilities/topology_filtering_utilities.h b/applications/TopologyOptimizationApplication/custom_utilities/topology_filtering_utilities.h index 04b1e1eb8cb5..82da571aae70 100644 --- a/applications/TopologyOptimizationApplication/custom_utilities/topology_filtering_utilities.h +++ b/applications/TopologyOptimizationApplication/custom_utilities/topology_filtering_utilities.h @@ -74,20 +74,20 @@ class TopologyFilteringUtilities // Define an auxiliary structure to hold a pointer to the element of interest and a position in space to be searched for. // This is needed to know the neighbours and where the element is for the filter. - class ElementPositionItem: public Point<3> + class ElementPositionItem: public Point { public: KRATOS_CLASS_POINTER_DEFINITION( ElementPositionItem ); ElementPositionItem(): // This Constructor is used by the tree - Point<3>(), + Point(), mpElement() { } ElementPositionItem(array_1d Coords, Element::Pointer pElement): - Point<3>(Coords), + Point(Coords), mpElement(pElement) {} diff --git a/applications/convection_diffusion_application/custom_utilities/convection_particle.h b/applications/convection_diffusion_application/custom_utilities/convection_particle.h index 9484a0d443c3..98868099b8c2 100644 --- a/applications/convection_diffusion_application/custom_utilities/convection_particle.h +++ b/applications/convection_diffusion_application/custom_utilities/convection_particle.h @@ -99,7 +99,7 @@ namespace Kratos @see IntegrationPoint */ //template //always size 3! -class Convection_Particle : public Point<3> +class Convection_Particle : public Point { public: ///@name Type Definitions @@ -112,7 +112,7 @@ class Convection_Particle : public Point<3> typedef array_1d BaseType; - typedef Point<3, double> Type; + typedef Point Type; typedef BaseType CoordinatesArrayType; @@ -129,13 +129,13 @@ class Convection_Particle : public Point<3> ///@{ /// Default constructor. - Convection_Particle(TDataType const& NewX, TDataType const& NewY, TDataType const& NewZ) : Point<3>(NewX, NewY, NewZ) + Convection_Particle(TDataType const& NewX, TDataType const& NewY, TDataType const& NewZ) : Point(NewX, NewY, NewZ) { this->ERASE_FLAG=true; //initializing as useless particle this->SCALAR1=0.0; } - Convection_Particle() : Point<3>(0.0, 0.0, 0.0) + Convection_Particle() : Point(0.0, 0.0, 0.0) { this->ERASE_FLAG=true; this->SCALAR1=0.0; diff --git a/applications/meshless_application/custom_utilities/SPH_particle_configure.h b/applications/meshless_application/custom_utilities/SPH_particle_configure.h index 3b4704166756..899574a0c519 100644 --- a/applications/meshless_application/custom_utilities/SPH_particle_configure.h +++ b/applications/meshless_application/custom_utilities/SPH_particle_configure.h @@ -49,7 +49,7 @@ class SPHParticleConfigure{ MIN_LEVEL = 2 }; - typedef Point PointType; + typedef Point PointType; typedef std::vector::iterator DistanceIteratorType; typedef std::vector ContainerType; // ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; diff --git a/applications/meshless_application/custom_utilities/SPH_particle_configure1.h b/applications/meshless_application/custom_utilities/SPH_particle_configure1.h index 4b63833c76c2..071b89a8fdd0 100644 --- a/applications/meshless_application/custom_utilities/SPH_particle_configure1.h +++ b/applications/meshless_application/custom_utilities/SPH_particle_configure1.h @@ -50,7 +50,7 @@ class SPHParticleConfigure{ MIN_LEVEL = 2 }; - typedef Point PointType; + typedef Point PointType; typedef std::vector::iterator DistanceIteratorType; typedef std::vector ContainerType; // ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; diff --git a/applications/mpi_search_application/custom_utilities/bins_dynamic_object_configuration.h b/applications/mpi_search_application/custom_utilities/bins_dynamic_object_configuration.h index fe4b7f1dbd91..53f900e4ae86 100644 --- a/applications/mpi_search_application/custom_utilities/bins_dynamic_object_configuration.h +++ b/applications/mpi_search_application/custom_utilities/bins_dynamic_object_configuration.h @@ -66,7 +66,7 @@ class DiscreteParticleConfigure MIN_LEVEL = 2 }; - typedef Point PointType; + typedef Point PointType; typedef std::vector::iterator DistanceIteratorType; typedef ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; diff --git a/applications/mpi_search_application/custom_utilities/bins_dynamic_particle_configuration.h b/applications/mpi_search_application/custom_utilities/bins_dynamic_particle_configuration.h index 12f846e587f8..6f8b8c3f42c0 100644 --- a/applications/mpi_search_application/custom_utilities/bins_dynamic_particle_configuration.h +++ b/applications/mpi_search_application/custom_utilities/bins_dynamic_particle_configuration.h @@ -52,7 +52,7 @@ class ParticleSpatialConfigure typedef std::size_t SizeType; typedef std::size_t IndexType; - typedef Kratos::Point PointType; + typedef Kratos::Point PointType; typedef Kratos::Tetrahedra3D4 ObjectType; typedef PointType* PtrPointType; diff --git a/applications/mpi_search_application/custom_utilities/octree_binary.h b/applications/mpi_search_application/custom_utilities/octree_binary.h index 20ece54d53f9..9768b4dcaf7e 100644 --- a/applications/mpi_search_application/custom_utilities/octree_binary.h +++ b/applications/mpi_search_application/custom_utilities/octree_binary.h @@ -828,8 +828,8 @@ namespace Kratos { inline bool IsIntersected(const Element::Pointer rObject, double Tolerance, const double* rLowPoint, const double* rHighPoint) { - Point<3,double> low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); - Point<3,double> high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); + Point low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); + Point high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); return HasIntersection(rObject->GetGeometry(), low_point, high_point); @@ -839,12 +839,12 @@ namespace Kratos { /// detect if triangle and box are intersected - virtual bool HasIntersection(Element::GeometryType& geom_1, const Point<3, double>& rLowPoint, const Point<3, double>& rHighPoint ) + virtual bool HasIntersection(Element::GeometryType& geom_1, const Point& rLowPoint, const Point& rHighPoint ) { // const BaseType& geom_1 = rGeometry; - Point<3, double> boxcenter; - Point<3, double> boxhalfsize; + Point boxcenter; + Point boxhalfsize; boxcenter[0] = 0.50 * ( rLowPoint[0] + rHighPoint[0] ); boxcenter[1] = 0.50 * ( rLowPoint[1] + rHighPoint[1] ); @@ -857,7 +857,7 @@ namespace Kratos { std::size_t size = geom_1.size(); - std::vector > triverts; + std::vector triverts; triverts.resize( size ); @@ -872,7 +872,7 @@ namespace Kratos { } - inline bool TriBoxOverlap( Point<3, double>& boxcenter, Point<3, double>& boxhalfsize, std::vector< Point<3, double> >& triverts ) + inline bool TriBoxOverlap( Point& boxcenter, Point& boxhalfsize, std::vector< Point >& triverts ) { /* use separating axis theorem to test overlap between triangle and box */ @@ -1032,7 +1032,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v2, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { p0 = a * v0[1] - b * v0[2]; @@ -1061,7 +1061,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v1, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { p0 = a * v0[1] - b * v0[2]; @@ -1091,7 +1091,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v2, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { @@ -1121,7 +1121,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v1, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { @@ -1153,7 +1153,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v1, array_1d& v2, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { p1 = a * v1[0] - b * v1[1]; @@ -1182,7 +1182,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v1, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { p0 = a * v0[0] - b * v0[1]; diff --git a/applications/pfem_2_application/custom_utilities/pfem_particle.h b/applications/pfem_2_application/custom_utilities/pfem_particle.h index f7120833ee14..28f916af9a3d 100644 --- a/applications/pfem_2_application/custom_utilities/pfem_particle.h +++ b/applications/pfem_2_application/custom_utilities/pfem_particle.h @@ -99,7 +99,7 @@ namespace Kratos @see IntegrationPoint */ //template //always size 3! -class PFEM_Particle : public Point<3> +class PFEM_Particle : public Point { public: ///@name Type Definitions @@ -112,7 +112,7 @@ class PFEM_Particle : public Point<3> typedef array_1d BaseType; - typedef Point<3, double> Type; + typedef Point Type; typedef BaseType CoordinatesArrayType; @@ -129,7 +129,7 @@ class PFEM_Particle : public Point<3> ///@{ /// Default constructor. - PFEM_Particle(TDataType const& NewX, TDataType const& NewY, TDataType const& NewZ) : Point<3>(NewX, NewY, NewZ) + PFEM_Particle(TDataType const& NewX, TDataType const& NewY, TDataType const& NewZ) : Point(NewX, NewY, NewZ) { this->ERASE_FLAG=true; //initializing as useless particle this->VELOCITY=ZeroVector(3); @@ -152,7 +152,7 @@ class PFEM_Particle : public Point<3> this->PLASTICIZED=false; } - PFEM_Particle() : Point<3>(0.0, 0.0, 0.0) + PFEM_Particle() : Point(0.0, 0.0, 0.0) { this->ERASE_FLAG=true; this->VELOCITY=ZeroVector(3); @@ -333,7 +333,7 @@ class PFEM_Particle : public Point<3> //of given particle. //PFEM_Particle(PFEM_Particle const& rOtherParticle) - // : Point<3>(rOtherParticle) {} + // : Point(rOtherParticle) {} private: diff --git a/applications/pfem_2_application/custom_utilities/pfem_particle_fluidonly.h b/applications/pfem_2_application/custom_utilities/pfem_particle_fluidonly.h index 3d59778f6f99..10363ff7be13 100644 --- a/applications/pfem_2_application/custom_utilities/pfem_particle_fluidonly.h +++ b/applications/pfem_2_application/custom_utilities/pfem_particle_fluidonly.h @@ -99,7 +99,7 @@ namespace Kratos @see IntegrationPoint */ //template //always size 3! -class PFEM_Particle_Fluid : public Point<3> +class PFEM_Particle_Fluid : public Point { public: ///@name Type Definitions @@ -113,7 +113,7 @@ class PFEM_Particle_Fluid : public Point<3> typedef array_1d BaseType; - typedef Point<3, double> Type; + typedef Point Type; typedef BaseType CoordinatesArrayType; @@ -130,14 +130,14 @@ class PFEM_Particle_Fluid : public Point<3> ///@{ /// Default constructor. - PFEM_Particle_Fluid(TDataType const& NewX, TDataType const& NewY, TDataType const& NewZ) : Point<3>(NewX, NewY, NewZ) + PFEM_Particle_Fluid(TDataType const& NewX, TDataType const& NewY, TDataType const& NewZ) : Point(NewX, NewY, NewZ) { this->ERASE_FLAG=true; //initializing as useless particle this->VELOCITY=ZeroVector(3); this->DISTANCE=0.0; } - PFEM_Particle_Fluid() : Point<3>(0.0, 0.0, 0.0) + PFEM_Particle_Fluid() : Point(0.0, 0.0, 0.0) { this->ERASE_FLAG=true; this->VELOCITY=ZeroVector(3); @@ -201,7 +201,7 @@ class PFEM_Particle_Fluid : public Point<3> //of given particle. //PFEM_Particle(PFEM_Particle const& rOtherParticle) - // : Point<3>(rOtherParticle) {} + // : Point(rOtherParticle) {} private: diff --git a/applications/structural_application/custom_conditions/contact_link_3D.cpp b/applications/structural_application/custom_conditions/contact_link_3D.cpp index bab0ac9c3306..a2a7bdeec6d2 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D.cpp +++ b/applications/structural_application/custom_conditions/contact_link_3D.cpp @@ -95,8 +95,8 @@ ContactLink3D::ContactLink3D( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ) : Condition( NewId, pGeometry, pProperties ) @@ -2566,7 +2566,7 @@ void ContactLink3D::GetDofList( DofsVectorType& ConditionalDofList, //new functions includes -Point<3>& ContactLink3D::GlobalCoordinates( Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates ) +Point& ContactLink3D::GlobalCoordinates( Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates ) { noalias( rResult ) = ZeroVector( 3 ); diff --git a/applications/structural_application/custom_conditions/contact_link_3D.h b/applications/structural_application/custom_conditions/contact_link_3D.h index ef907683f0dc..8f5fc6309f54 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D.h +++ b/applications/structural_application/custom_conditions/contact_link_3D.h @@ -97,8 +97,8 @@ class ContactLink3D : public Condition PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ); /** @@ -202,7 +202,7 @@ class ContactLink3D : public Condition Matrix TangentialVectors_inOrigin( Condition::Pointer Surface, const GeometryType::CoordinatesArrayType& rPoint ); - Point<3>& GlobalCoordinates(Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates); + Point& GlobalCoordinates(Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates); Vector GetRelativTangentialVelocity(Matrix& T); @@ -227,10 +227,10 @@ class ContactLink3D : public Condition // Condition::Pointer mpSlave; // Condition::Pointer mpMaster; -// Point<3> mMasterContactLocalPoint; -// Point<3> mSlaveContactLocalPoint; -// Point<3> mMasterContactGlobalPoint; -// Point<3> mSlaveContactGlobalPoint; +// Point mMasterContactLocalPoint; +// Point mSlaveContactLocalPoint; +// Point mMasterContactGlobalPoint; +// Point mSlaveContactGlobalPoint; }; // Class ContactLink3D } // namespace Kratos. diff --git a/applications/structural_application/custom_conditions/contact_link_3D_explicit.cpp b/applications/structural_application/custom_conditions/contact_link_3D_explicit.cpp index 239c81922ea0..77682ce2967d 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D_explicit.cpp +++ b/applications/structural_application/custom_conditions/contact_link_3D_explicit.cpp @@ -85,8 +85,8 @@ ContactLink3DExplicit::ContactLink3DExplicit( IndexType NewId, GeometryType::Poi PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ) : Condition( NewId, pGeometry, pProperties ) @@ -439,7 +439,7 @@ void ContactLink3DExplicit::GetDofList( DofsVectorType& ConditionalDofList, //new functions includes -Point<3>& ContactLink3DExplicit::GlobalCoordinates(Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates) +Point& ContactLink3DExplicit::GlobalCoordinates(Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates) { noalias(rResult)= ZeroVector(3); diff --git a/applications/structural_application/custom_conditions/contact_link_3D_explicit.h b/applications/structural_application/custom_conditions/contact_link_3D_explicit.h index 36a822da718f..bc9fe048a184 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D_explicit.h +++ b/applications/structural_application/custom_conditions/contact_link_3D_explicit.h @@ -94,8 +94,8 @@ class ContactLink3DExplicit : public Condition PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ); /** @@ -215,7 +215,7 @@ class ContactLink3DExplicit : public Condition void CalculateOnIntegrationPoints(const Variable >& rVariable, std::vector< array_1d >& Output, const ProcessInfo& rCurrentProcessInfo); - Point<3>& GlobalCoordinates(Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates); + Point& GlobalCoordinates(Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates); Vector GetRelativTangentialVelocity(Matrix& T); @@ -258,10 +258,10 @@ class ContactLink3DExplicit : public Condition // Condition::Pointer mpSlave; // Condition::Pointer mpMaster; -// Point<3> mMasterContactLocalPoint; -// Point<3> mSlaveContactLocalPoint; -// Point<3> mMasterContactGlobalPoint; -// Point<3> mSlaveContactGlobalPoint; +// Point mMasterContactLocalPoint; +// Point mSlaveContactLocalPoint; +// Point mMasterContactGlobalPoint; +// Point mSlaveContactGlobalPoint; }; // Class ContactLink3DExplicit } // namespace Kratos. diff --git a/applications/structural_application/custom_conditions/contact_link_3D_kinematic_linear.cpp b/applications/structural_application/custom_conditions/contact_link_3D_kinematic_linear.cpp index 919f39783fe8..cd5c32ecb1ec 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D_kinematic_linear.cpp +++ b/applications/structural_application/custom_conditions/contact_link_3D_kinematic_linear.cpp @@ -95,8 +95,8 @@ ContactLink3D_Kinematic_Linear::ContactLink3D_Kinematic_Linear( IndexType NewId, PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ) : Condition( NewId, pGeometry, pProperties ) @@ -1630,7 +1630,7 @@ void ContactLink3D_Kinematic_Linear::GetDofList( DofsVectorType& ConditionalDofL //new functions includes -Point<3>& ContactLink3D_Kinematic_Linear::GlobalCoordinates( Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates ) +Point& ContactLink3D_Kinematic_Linear::GlobalCoordinates( Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates ) { noalias( rResult ) = ZeroVector( 3 ); diff --git a/applications/structural_application/custom_conditions/contact_link_3D_kinematic_linear.h b/applications/structural_application/custom_conditions/contact_link_3D_kinematic_linear.h index 324818160074..50a73a9e2c2b 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D_kinematic_linear.h +++ b/applications/structural_application/custom_conditions/contact_link_3D_kinematic_linear.h @@ -98,8 +98,8 @@ class ContactLink3D_Kinematic_Linear : public Condition PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ); /** @@ -208,7 +208,7 @@ class ContactLink3D_Kinematic_Linear : public Condition Matrix TangentialVectors_inOrigin( Condition::Pointer Surface, const GeometryType::CoordinatesArrayType& rPoint ); - Point<3>& GlobalCoordinates(Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates); + Point& GlobalCoordinates(Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates); Vector GetRelativTangentialVelocity(Matrix& T); @@ -253,10 +253,10 @@ class ContactLink3D_Kinematic_Linear : public Condition Matrix mTMaster; // Condition::Pointer mpSlave; // Condition::Pointer mpMaster; -// Point<3> mMasterContactLocalPoint; -// Point<3> mSlaveContactLocalPoint; -// Point<3> mMasterContactGlobalPoint; -// Point<3> mSlaveContactGlobalPoint; +// Point mMasterContactLocalPoint; +// Point mSlaveContactLocalPoint; +// Point mMasterContactGlobalPoint; +// Point mSlaveContactGlobalPoint; }; // Class ContactLink3D_Kinematic_Linear } // namespace Kratos. diff --git a/applications/structural_application/custom_conditions/contact_link_3D_lagrange_tying.cpp b/applications/structural_application/custom_conditions/contact_link_3D_lagrange_tying.cpp index ece9082464b3..5f5c3c1bec52 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D_lagrange_tying.cpp +++ b/applications/structural_application/custom_conditions/contact_link_3D_lagrange_tying.cpp @@ -95,8 +95,8 @@ namespace Kratos PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ) : Condition( NewId, pGeometry, pProperties ) @@ -789,7 +789,7 @@ namespace Kratos //new functions includes - Point<3>& Contact_Link_3D_Lagrange_Tying::GlobalCoordinates( Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates ) + Point& Contact_Link_3D_Lagrange_Tying::GlobalCoordinates( Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates ) { noalias( rResult ) = ZeroVector( 3 ); diff --git a/applications/structural_application/custom_conditions/contact_link_3D_lagrange_tying.h b/applications/structural_application/custom_conditions/contact_link_3D_lagrange_tying.h index e979a906c317..c898432b058c 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D_lagrange_tying.h +++ b/applications/structural_application/custom_conditions/contact_link_3D_lagrange_tying.h @@ -98,8 +98,8 @@ namespace Kratos PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ); /** @@ -208,7 +208,7 @@ namespace Kratos Matrix TangentialVectors_inOrigin( Condition::Pointer Surface, const GeometryType::CoordinatesArrayType& rPoint ); - Point<3>& GlobalCoordinates(Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates); + Point& GlobalCoordinates(Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates); Vector GetRelativTangentialVelocity(Matrix& T); @@ -253,10 +253,10 @@ namespace Kratos Matrix mTMaster; // Condition::Pointer mpSlave; // Condition::Pointer mpMaster; - // Point<3> mMasterContactLocalPoint; - // Point<3> mSlaveContactLocalPoint; - // Point<3> mMasterContactGlobalPoint; - // Point<3> mSlaveContactGlobalPoint; + // Point mMasterContactLocalPoint; + // Point mSlaveContactLocalPoint; + // Point mMasterContactGlobalPoint; + // Point mSlaveContactGlobalPoint; }; // Class Contact_Link_3D_Lagrange_Tying } // namespace Kratos. diff --git a/applications/structural_application/custom_conditions/contact_link_3D_newmark.cpp b/applications/structural_application/custom_conditions/contact_link_3D_newmark.cpp index 4d694b275c29..3e2965b802c6 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D_newmark.cpp +++ b/applications/structural_application/custom_conditions/contact_link_3D_newmark.cpp @@ -84,8 +84,8 @@ ContactLink3DNewmark::ContactLink3DNewmark( IndexType NewId, GeometryType::Point PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ) : Condition( NewId, pGeometry, pProperties ) @@ -2441,7 +2441,7 @@ void ContactLink3DNewmark::GetDofList( DofsVectorType& ConditionalDofList, //new functions includes -Point<3>& ContactLink3DNewmark::GlobalCoordinates(Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates) +Point& ContactLink3DNewmark::GlobalCoordinates(Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates) { noalias(rResult)= ZeroVector(3); diff --git a/applications/structural_application/custom_conditions/contact_link_3D_newmark.h b/applications/structural_application/custom_conditions/contact_link_3D_newmark.h index 7739c0c1b3d3..e2966c651178 100644 --- a/applications/structural_application/custom_conditions/contact_link_3D_newmark.h +++ b/applications/structural_application/custom_conditions/contact_link_3D_newmark.h @@ -98,8 +98,8 @@ class ContactLink3DNewmark : public Condition PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, int SlaveIntegrationPointIndex ); /** @@ -210,7 +210,7 @@ class ContactLink3DNewmark : public Condition Matrix TangentialVectors_inOrigin( Condition::Pointer Surface, const GeometryType::CoordinatesArrayType& rPoint ); - Point<3>& GlobalCoordinates(Condition::Pointer Surface, Point<3>& rResult, Point<3> const& LocalCoordinates); + Point& GlobalCoordinates(Condition::Pointer Surface,Point& rResult,Point const& LocalCoordinates); Vector GetRelativTangentialVelocity(Matrix& T); @@ -254,10 +254,10 @@ class ContactLink3DNewmark : public Condition // Condition::Pointer mpSlave; // Condition::Pointer mpMaster; -// Point<3> mMasterContactLocalPoint; -// Point<3> mSlaveContactLocalPoint; -// Point<3> mMasterContactGlobalPoint; -// Point<3> mSlaveContactGlobalPoint; +// Point mMasterContactLocalPoint; +// Point mSlaveContactLocalPoint; +// Point mMasterContactGlobalPoint; +// Point mSlaveContactGlobalPoint; }; // Class ContactLink3DNewmark } // namespace Kratos. diff --git a/applications/structural_application/custom_conditions/point_point_contact_link.cpp b/applications/structural_application/custom_conditions/point_point_contact_link.cpp index a5c65cd5d7d0..4f90b41c829e 100644 --- a/applications/structural_application/custom_conditions/point_point_contact_link.cpp +++ b/applications/structural_application/custom_conditions/point_point_contact_link.cpp @@ -105,8 +105,8 @@ PointPointContactLink::PointPointContactLink( PropertiesType::Pointer pProperties, Condition::Pointer Slave, Condition::Pointer Master - //Point<3>& MasterContactLocalPoint, - //Point<3>& SlaveContactLocalPoint, + //Point& MasterContactLocalPoint, + //Point& SlaveContactLocalPoint, //int SlaveIntegrationPointIndex ) : Condition( NewId, pGeometry, pProperties ) { diff --git a/applications/structural_application/custom_conditions/point_point_contact_link.h b/applications/structural_application/custom_conditions/point_point_contact_link.h index 655f9221b075..eac53ea3e19b 100644 --- a/applications/structural_application/custom_conditions/point_point_contact_link.h +++ b/applications/structural_application/custom_conditions/point_point_contact_link.h @@ -123,8 +123,8 @@ class PointPointContactLink : public Condition PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave - //Point<3>& MasterContactLocalPoint, - //Point<3>& SlaveContactLocalPoint, + //Point& MasterContactLocalPoint, + //Point& SlaveContactLocalPoint, //int SlaveIntegrationPointIndex ); diff --git a/applications/structural_application/custom_conditions/point_segment_contact_link.cpp b/applications/structural_application/custom_conditions/point_segment_contact_link.cpp index 7540fc988dc8..7e369f26d2ab 100644 --- a/applications/structural_application/custom_conditions/point_segment_contact_link.cpp +++ b/applications/structural_application/custom_conditions/point_segment_contact_link.cpp @@ -105,8 +105,8 @@ namespace Kratos PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave - //Point<3>& MasterContactLocalPoint, - //Point<3>& SlaveContactLocalPoint, + //Point& MasterContactLocalPoint, + //Point& SlaveContactLocalPoint, //int SlaveIntegrationPointIndex ) : Condition( NewId, pGeometry, pProperties ) { @@ -289,7 +289,7 @@ namespace Kratos double segmentlength = GetValue( CONTACT_LINK_MASTER )->GetGeometry().Length(); double shi = inner_prod(r,Tangential)/segmentlength; - Point<3> rPoint; + Point rPoint; rPoint[0] = shi; rPoint[1] = shi; rPoint[2] = shi; @@ -308,7 +308,7 @@ namespace Kratos /// contact position on the target facet Condition::GeometryType& segmentgeom = GetValue( CONTACT_LINK_MASTER )->GetGeometry(); - Point<3> Xts; + Point Xts; noalias(Xts) = MasterShapeFunctionValues[0]*segmentgeom[0] + MasterShapeFunctionValues[1]*segmentgeom[1]; double penalty = 1.00; //200e9 * 50.0; diff --git a/applications/structural_application/custom_conditions/point_segment_contact_link.h b/applications/structural_application/custom_conditions/point_segment_contact_link.h index 1ef9be9a6939..2c42ab580714 100644 --- a/applications/structural_application/custom_conditions/point_segment_contact_link.h +++ b/applications/structural_application/custom_conditions/point_segment_contact_link.h @@ -123,8 +123,8 @@ class PointSegmentContactLink : public Condition PropertiesType::Pointer pProperties, Condition::Pointer Master, Condition::Pointer Slave - //Point<3>& MasterContactLocalPoint, - //Point<3>& SlaveContactLocalPoint, + //Point& MasterContactLocalPoint, + //Point& SlaveContactLocalPoint, //int SlaveIntegrationPointIndex ); diff --git a/applications/structural_application/custom_conditions/slave_contact_face_3D.h b/applications/structural_application/custom_conditions/slave_contact_face_3D.h index 3575a5823774..92030deb299a 100644 --- a/applications/structural_application/custom_conditions/slave_contact_face_3D.h +++ b/applications/structural_application/custom_conditions/slave_contact_face_3D.h @@ -141,8 +141,8 @@ class SlaveContactFace3D : public Condition */ bool SearchPartner( ContactMasterContainerType& AllMasterElements, IndexType IntegrationPointIndex, - Point<3> MasterContactLocalPoint, - Point<3> SlaveContactLocalPoint, + Point MasterContactLocalPoint, + Point SlaveContactLocalPoint, Condition::Pointer CurrentMaster, double CurrentLambda ); diff --git a/applications/structural_application/custom_conditions/slave_contact_face_3D_newmark.h b/applications/structural_application/custom_conditions/slave_contact_face_3D_newmark.h index 1edc6759f24e..4cf0109014ad 100644 --- a/applications/structural_application/custom_conditions/slave_contact_face_3D_newmark.h +++ b/applications/structural_application/custom_conditions/slave_contact_face_3D_newmark.h @@ -141,8 +141,8 @@ class SlaveContactFace3DNewmark : public Condition */ bool SearchPartner( ContactMasterContainerType& AllMasterElements, IndexType IntegrationPointIndex, - Point<3> MasterContactLocalPoint, - Point<3> SlaveContactLocalPoint, + Point MasterContactLocalPoint, + Point SlaveContactLocalPoint, Condition::Pointer CurrentMaster, double CurrentLambda ); diff --git a/applications/structural_application/custom_elements/crisfield_truss_element.h b/applications/structural_application/custom_elements/crisfield_truss_element.h index d68f24ffd29f..5fe6e8b7481d 100644 --- a/applications/structural_application/custom_elements/crisfield_truss_element.h +++ b/applications/structural_application/custom_elements/crisfield_truss_element.h @@ -326,7 +326,7 @@ class CrisfieldTrussElement ///@name Member Variables ///@{ -// Geometry< Point<3,double> >::Pointer mpReferenceGeometry; +// Geometry< Point >::Pointer mpReferenceGeometry; //double mTotalDomainInitialSize; diff --git a/applications/structural_application/custom_elements/membrane_element.h b/applications/structural_application/custom_elements/membrane_element.h index 3af518f3f4ca..7ed5f4dff02d 100644 --- a/applications/structural_application/custom_elements/membrane_element.h +++ b/applications/structural_application/custom_elements/membrane_element.h @@ -171,7 +171,7 @@ class MembraneElement /// privat variables std::vector mConstitutiveLawVector; - Geometry< Point<3,double> >::Pointer mpReferenceGeometry; + Geometry< Point >::Pointer mpReferenceGeometry; Vector mDetJ0; diff --git a/applications/structural_application/custom_strategies/strategies/residualbased_uzawa_newton_raphson_strategy.h b/applications/structural_application/custom_strategies/strategies/residualbased_uzawa_newton_raphson_strategy.h index 021306ebd5e4..784fc2995e0f 100644 --- a/applications/structural_application/custom_strategies/strategies/residualbased_uzawa_newton_raphson_strategy.h +++ b/applications/structural_application/custom_strategies/strategies/residualbased_uzawa_newton_raphson_strategy.h @@ -733,8 +733,8 @@ class ResidualBasedUzawaNewtonRaphsonStrategy for( IndexType i = 0; i < (*it)->GetGeometry().IntegrationPoints().size(); i++ ) { - Point<3> MasterContactLocalPoint; - Point<3> SlaveContactLocalPoint; + Point MasterContactLocalPoint; + Point SlaveContactLocalPoint; (*it)->GetValue(PENALTY)[i]=BaseType::GetModelPart().GetProperties(1)[INITIAL_PENALTY]; (*it)->GetValue(PENALTY_T)[i]=BaseType::GetModelPart().GetProperties(1)[INITIAL_PENALTY_T]; Condition::Pointer CurrentMaster ; @@ -802,8 +802,8 @@ class ResidualBasedUzawaNewtonRaphsonStrategy for( IndexType i = 0; i < (*it)->GetGeometry().IntegrationPoints().size(); i++ ) { - Point<3> MasterContactLocalPoint; - Point<3> SlaveContactLocalPoint; + Point MasterContactLocalPoint; + Point SlaveContactLocalPoint; Condition::Pointer CurrentMaster ; if( SearchPartner( (**it), @@ -852,8 +852,8 @@ class ResidualBasedUzawaNewtonRaphsonStrategy Condition& Slave, ConditionsArrayType& AllMasterElements, const IndexType& IntegrationPointIndex, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, Condition::Pointer& CurrentMaster ) { @@ -870,12 +870,12 @@ class ResidualBasedUzawaNewtonRaphsonStrategy = Slave.GetGeometry().IntegrationPoints()[IntegrationPointIndex]; // KRATOS_WATCH(SlaveContactLocalPoint); //calculating global coordinates of current integration point - Point<3> SlaveContactGlobalPoint; + Point SlaveContactGlobalPoint; SlaveContactGlobalPoint = Slave.GetGeometry().GlobalCoordinates( SlaveContactGlobalPoint, SlaveContactLocalPoint ); // KRATOS_WATCH(SlaveContactGlobalPoint); - Point<3> GlobalCandidate; + Point GlobalCandidate; // KRATOS_WATCH( GlobalCandidate ); //defining set of possible master surface elements @@ -920,7 +920,7 @@ class ResidualBasedUzawaNewtonRaphsonStrategy } // std::cout << "number of checked master elements: " << MasterSet->size() << std::endl; //searching contact partner (local search) - Point<3> MasterContactGlobalPoint; + Point MasterContactGlobalPoint; bool LocalPartnerExists = false; // KRATOS_WATCH( GlobalCandidate ); for( ConditionsArrayType::ptr_iterator it = MasterSet->ptr_begin(); it != MasterSet->ptr_end(); ++it ) diff --git a/applications/structural_application/custom_utilities/boundary_conditions_and_contact_utilities.h b/applications/structural_application/custom_utilities/boundary_conditions_and_contact_utilities.h index 0eedafc1f67a..1dadeff8f929 100644 --- a/applications/structural_application/custom_utilities/boundary_conditions_and_contact_utilities.h +++ b/applications/structural_application/custom_utilities/boundary_conditions_and_contact_utilities.h @@ -2397,8 +2397,8 @@ class BoundaryConditionsAndContactUtilities //bool is_repited = bool(Ids[slave]->GetValue(IS_CONTACT_SLAVE)==0) //if(is_repited==true) { - Point<3> MasterContactLocalPoint; - Point<3> SlaveContactLocalPoint; + Point MasterContactLocalPoint; + Point SlaveContactLocalPoint; int SlaveIntegrationPointIndex = 0; Condition::Pointer MasterFace = (Ids[slave])->GetValue(CONTACT_LINK_MASTER); Point3D >::Pointer point_geom = Point3D >::Pointer( new Point3D >(Ids[slave])); diff --git a/applications/structural_application/custom_utilities/circle_3d.h b/applications/structural_application/custom_utilities/circle_3d.h index cc5e30ec6694..95dd75c4792e 100644 --- a/applications/structural_application/custom_utilities/circle_3d.h +++ b/applications/structural_application/custom_utilities/circle_3d.h @@ -80,7 +80,7 @@ class Circle3D /** * Constructor. */ - Circle3D( Point<3> M, Point<3> e1, Point<3> e2 ) + Circle3D(Point M,Point e1,Point e2 ) :mM(M),mE1(e1),mE2(e2) { r1 = mE1-M; @@ -99,7 +99,7 @@ class Circle3D /** * */ - Point<3>& GetCenter() + Point& GetCenter() { return mM; } @@ -107,7 +107,7 @@ class Circle3D /** * */ - Point<3>& GetPoint( Point<3>& result, double s ) + Point& GetPoint(Point& result, double s ) { result = cos( s/radius )*r1 + sin( s/radius )*r2 + mM; return result; @@ -173,9 +173,9 @@ class Circle3D private: - Point<3> mM; - Point<3> mE1; - Point<3> mE2; + Point mM; + Point mE1; + Point mE2; array_1d r1; array_1d r2; double radius; diff --git a/applications/structural_application/custom_utilities/closed_cylinder_3d.h b/applications/structural_application/custom_utilities/closed_cylinder_3d.h index bf88437bc6b8..5f868ca79c61 100644 --- a/applications/structural_application/custom_utilities/closed_cylinder_3d.h +++ b/applications/structural_application/custom_utilities/closed_cylinder_3d.h @@ -85,7 +85,7 @@ class ClosedCylinder3D * @param e3 point on the direction vector of the cylinder * e1, e2, e3 form a othogonal basis */ - ClosedCylinder3D( Point<3> M, Point<3> e1, Point<3> e2, Point<3> e3) + ClosedCylinder3D(Point M,Point e1,Point e2, Point e3) :mM(M),mE1(e1),mE2(e2),mE3(e3) { r1 = mE1-M; @@ -112,7 +112,7 @@ class ClosedCylinder3D * Returns the starting point of the cylinder, is the midpoint of the circle * @return mM */ - Point<3>& GetCenter() + Point& GetCenter() { return mM; } @@ -178,7 +178,7 @@ class ClosedCylinder3D * @param result a Point in 3D result(s,t) on the cylinder * @return result */ - Point<3>& GetPoint( Point<3>& result, double s , double t) + Point& GetPoint(Point& result, double s , double t) { result = cos( s/radius )*r1 + sin( s/radius )*r2 + (mM+t*r3); return result; @@ -213,7 +213,7 @@ class ClosedCylinder3D * @param result a Point in 3D result(s,t) on the cylinder cap * @return result */ - Point<3>& GetPointOnCap( Point<3>& result, double s, double t) + Point& GetPointOnCap(Point& result, double s, double t) { result = r1*s + r2*t + (mM+r3); return result; @@ -265,7 +265,7 @@ class ClosedCylinder3D * @retval false if the point is not in or on the cylinder * @retval true if the point is in or on the cylinder */ - bool IsInorOn(Point<3>& point) + bool IsInorOn(Point& point) { Vector distance= point-mM; double t= MathUtils::Dot3(distance, @@ -287,7 +287,7 @@ class ClosedCylinder3D * @retval false if the point is on or outside the cylinder * @retval true if the point is inside the cylinder */ - bool IsIn(Point<3>& point) + bool IsIn(Point& point) { Vector distance= point-mM; double t= MathUtils::Dot3(distance, @@ -309,7 +309,7 @@ class ClosedCylinder3D * @retval false if the point is on or outside the cylinder * @retval true if the point is inside a bigger cylinder */ - bool IsInBigger(Point<3>& point) + bool IsInBigger(Point& point) { Vector distance= point-mM; double t= MathUtils::Dot3(distance, @@ -331,7 +331,7 @@ class ClosedCylinder3D * @retval false if the point is inside or outside the cylinder * @retval true if the point is on the cylinder */ - bool IsOn(Point<3>& point) + bool IsOn(Point& point) { Vector distance= point-mM; double t= MathUtils::Dot3(distance, @@ -357,7 +357,7 @@ class ClosedCylinder3D * @retval false if the point is not on the cylinder wall * @retval true if the point is on the cylinder wall */ - bool IsOnWall(Point<3>& point) + bool IsOnWall(Point& point) { Vector distance= point-mM; double t= MathUtils::Dot3(distance, @@ -383,7 +383,7 @@ class ClosedCylinder3D * @retval false if the point is not on the cylinder cap * @retval true if the point is on the cylinder cap */ - bool IsOnCap(Point<3>& point) + bool IsOnCap(Point& point) { Vector distance= point-mM; double t= MathUtils::Dot3(distance, @@ -408,13 +408,13 @@ class ClosedCylinder3D * @param point for which the closest point on the cap is searched * @return closestpoint */ - Point<3> ClosestPointOnCap(Point<3>& point) + Point ClosestPointOnCap(Point& point) { Vector distance= point-mM; double t= MathUtils::Dot3(distance, r3_normalized); - Point<3> closestpoint; + Point closestpoint; closestpoint = point + (mLength-t)*r3_normalized; @@ -426,7 +426,7 @@ class ClosedCylinder3D * @param point for which the closest point on the wall is searched * @return closestpoint */ - Point<3> ClosestPointOnWall(Point<3>& point) + Point ClosestPointOnWall(Point& point) { Vector distance= point-mM; double t= MathUtils::Dot3(distance, @@ -436,7 +436,7 @@ class ClosedCylinder3D double s2= MathUtils::Dot3(distance, r2_normalized); - Point<3> closestpoint; + Point closestpoint; if (t <= mLength + 0.000001 && t >= -0.000001) { @@ -456,7 +456,7 @@ class ClosedCylinder3D * @param point for which the closest point is searched * @return closestpoint */ - Point<3> ClosestPoint(Point<3>& point) + Point ClosestPoint(Point& point) { Vector distance= point-mM; double t= MathUtils::Dot3(distance, @@ -466,7 +466,7 @@ class ClosedCylinder3D double s2= MathUtils::Dot3(distance, r2_normalized); - Point<3> closestpoint; + Point closestpoint; double rad = sqrt(s1*s1+s2*s2); if (mLength < t) @@ -511,10 +511,10 @@ class ClosedCylinder3D private: - Point<3> mM; - Point<3> mE1; - Point<3> mE2; - Point<3> mE3; + Point mM; + Point mE1; + Point mE2; + Point mE3; array_1d r1; array_1d r2; array_1d r3; diff --git a/applications/structural_application/custom_utilities/contact_utility.h b/applications/structural_application/custom_utilities/contact_utility.h index 47cc24941800..a7b1e4ef4d8a 100644 --- a/applications/structural_application/custom_utilities/contact_utility.h +++ b/applications/structural_application/custom_utilities/contact_utility.h @@ -171,8 +171,8 @@ class ContactUtility { for( IndexType i = 0; i < (*it)->GetGeometry().IntegrationPoints().size(); i++ ) { - Point<3> MasterContactLocalPoint; - Point<3> SlaveContactLocalPoint; + Point MasterContactLocalPoint; + Point SlaveContactLocalPoint; Condition::Pointer CurrentMaster ; if( SearchPartner( mr_model_part, @@ -184,7 +184,7 @@ class ContactUtility { IndexType newId = (mr_model_part.Conditions().end()-1)->Id()+LinkingConditions.size()+1; //creating contact link element -// Point<3> contact_point_global; +// Point contact_point_global; // GlobalCoordinates( **it, contact_point_global, (GeometryType::CoordinatesArrayType)SlaveContactLocalPoint ); // NodeType::Pointer p_node(new NodeType(*i_node)); // last_id++; @@ -306,8 +306,8 @@ class ContactUtility { for( IndexType i = 0; i < (*it)->GetGeometry().IntegrationPoints().size(); i++ ) { - Point<3> MasterContactLocalPoint; - Point<3> SlaveContactLocalPoint; + Point MasterContactLocalPoint; + Point SlaveContactLocalPoint; (*it)->GetValue(PENALTY)[i]= initial_penalty; (*it)->GetValue(PENALTY_T)[i]= initial_penalty_t; Condition::Pointer CurrentMaster ; @@ -332,7 +332,7 @@ class ContactUtility *it, MasterContactLocalPoint, SlaveContactLocalPoint, i) ); -// Point<3> contact_point_global; +// Point contact_point_global; // GlobalCoordinates( **it, contact_point_global, (GeometryType::CoordinatesArrayType)SlaveContactLocalPoint ); // Node<3>::Pointer contact_node_global( new Node<3>( mr_model_part.NodesEnd()->Id(), contact_point_global ) ); // mr_model_part.AddNode( contact_node_global ); @@ -397,8 +397,8 @@ class ContactUtility i < (*it)->GetGeometry().IntegrationPoints().size(); i++ ) { - Point<3> MasterContactLocalPoint; - Point<3> SlaveContactLocalPoint; + Point MasterContactLocalPoint; + Point SlaveContactLocalPoint; Condition::Pointer CurrentMaster; if( SearchPartner( mr_model_part, @@ -1034,8 +1034,8 @@ class ContactUtility Condition& Slave, ConditionsArrayType& AllMasterElements, const IndexType& IntegrationPointIndex, - Point<3>& MasterContactLocalPoint, - Point<3>& SlaveContactLocalPoint, + Point& MasterContactLocalPoint, + Point& SlaveContactLocalPoint, Condition::Pointer& CurrentMaster ) { @@ -1051,11 +1051,11 @@ class ContactUtility = Slave.GetGeometry().IntegrationPoints()[IntegrationPointIndex]; // KRATOS_WATCH(SlaveContactLocalPoint); //calculating global coordinates of current integration point - Point<3> SlaveContactGlobalPoint; + Point SlaveContactGlobalPoint; SlaveContactGlobalPoint = GlobalCoordinates( Slave, SlaveContactGlobalPoint, SlaveContactLocalPoint); - Point<3> GlobalCandidate; + Point GlobalCandidate; //defining set of possible master surface elements ConditionsArrayType::Pointer MasterSet( new ConditionsArrayType() ); double minDist = static_cast(INT_MAX); @@ -1111,7 +1111,7 @@ class ContactUtility } } //searching contact partner (local search) - Point<3> MasterContactGlobalPoint; + Point MasterContactGlobalPoint; bool LocalPartnerExists = false; // KRATOS_WATCH( GlobalCandidate ); for( ConditionsArrayType::ptr_iterator it = MasterSet->ptr_begin(); it != MasterSet->ptr_end(); ++it ) @@ -1363,7 +1363,7 @@ class ContactUtility * and the point on the slave surface */ - Vector GetRelativTangentialVelocity(Condition::Pointer Master, Condition::Pointer Slave, Point<3> const& SlaveLocalCoordinates, Point<3> const& MasterLocalCoordinates) + Vector GetRelativTangentialVelocity(Condition::Pointer Master, Condition::Pointer Slave,Point const& SlaveLocalCoordinates,Point const& MasterLocalCoordinates) { Matrix T= TangentialVectors( Master, MasterLocalCoordinates ); diff --git a/applications/structural_application/custom_utilities/cylinder_3d.h b/applications/structural_application/custom_utilities/cylinder_3d.h index 94ce39872556..37a938be7919 100644 --- a/applications/structural_application/custom_utilities/cylinder_3d.h +++ b/applications/structural_application/custom_utilities/cylinder_3d.h @@ -85,7 +85,7 @@ class Cylinder3D *@param e3 point on the dirction vector of the cylinder * e1, e2, e3 form a othogonal basis */ - Cylinder3D( Point<3> M, Point<3> e1, Point<3> e2, Point<3> e3) + Cylinder3D(Point M,Point e1,Point e2, Point e3) :mM(M),mE1(e1),mE2(e2),mE3(e3) { r1 = mE1-M; @@ -107,7 +107,7 @@ class Cylinder3D /** * */ - Point<3>& GetCenter() + Point& GetCenter() { return mM; } @@ -119,7 +119,7 @@ class Cylinder3D *@param result a Point in 3D result(s,t) on the cylinder *@return result */ - Point<3>& GetPoint( Point<3>& result, double s , double t) + Point& GetPoint(Point& result, double s , double t) { result = cos( s/radius )*r1 + sin( s/radius )*r2 + (mM+t*r3); return result; @@ -219,10 +219,10 @@ class Cylinder3D private: - Point<3> mM; - Point<3> mE1; - Point<3> mE2; - Point<3> mE3; + Point mM; + Point mE1; + Point mE2; + Point mE3; array_1d r1; array_1d r2; array_1d r3; diff --git a/applications/structural_application/custom_utilities/node_snapping_utility.h b/applications/structural_application/custom_utilities/node_snapping_utility.h index f64d907fbb4a..e1ccdae17139 100644 --- a/applications/structural_application/custom_utilities/node_snapping_utility.h +++ b/applications/structural_application/custom_utilities/node_snapping_utility.h @@ -115,8 +115,8 @@ class NodeSnappingUtility /** * */ - void AdjustToCylinder( ModelPart& model_part, Point<3> center, Point<3> e1, - Point<3> e2, Point<3> e3) + void AdjustToCylinder( ModelPart& model_part,Point center,Point e1, + Point e2,Point e3) { }//AdjustToCylinder @@ -129,7 +129,7 @@ class NodeSnappingUtility * @param e2 point on the circle above the midpoint and orthogonal to e2 * @param e3 point on the direction vector of the cylinder */ - void AdjustToClosedCylinder( ModelPart& model_part, Point<3> center, Point<3> e1, Point<3> e2, Point<3> e3) + void AdjustToClosedCylinder( ModelPart& model_part,Point center,Point e1,Point e2,Point e3) { std::cout<<"####################### AdjustToClosedCylinder - START"< center = (*it)->GetGeometry().Center(); + Point center = (*it)->GetGeometry().Center(); if (cylinder.IsInBigger(center)) vicinityelements.push_back((*it)->Id()); } @@ -219,17 +219,17 @@ class NodeSnappingUtility * @param cylinder closed cylinder * @return intersection */ - Point<3> Intersection(Point<3> k0, Point<3> k1, ClosedCylinder3D cylinder) + Point Intersection(Point k0,Point k1, ClosedCylinder3D cylinder) { - Point<3> b(0,0,0); - Point<3> m = cylinder.GetCenter(); - Point<3> e1 = cylinder.GetR1(); - Point<3> e2 = cylinder.GetR2(); - Point<3> e3 = cylinder.GetR3(); + Point b(0,0,0); + Point m = cylinder.GetCenter(); + Point e1 = cylinder.GetR1(); + Point e2 = cylinder.GetR2(); + Point e3 = cylinder.GetR3(); Matrix A = ZeroMatrix(3,3); Matrix invA = ZeroMatrix(3,3); double detA = 0; - Point<3> solution(0,0,0); + Point solution(0,0,0); b = k0 - m - e3; for (int i=0; i<3; ++i) { @@ -249,9 +249,9 @@ class NodeSnappingUtility * @param b vector * @return x */ - Point<3> InvAb(Matrix &invA, Point<3> &b) + Point InvAb(Matrix &invA,Point &b) { - Point<3> x(0,0,0); + Point x(0,0,0); for( unsigned int i=0; i center, Point<3> e1, Point<3> e2 ) + void AdjustToCircle( ModelPart& model_part,Point center,Point e1,Point e2 ) { } - void AdjustNodes( ModelPart& model_part, Point<3>& newPosition ) + void AdjustNodes( ModelPart& model_part,Point& newPosition ) { } @@ -284,7 +284,7 @@ class NodeSnappingUtility //loop over all elements for( std::vector::iterator it=vicinityelements.begin(); it != vicinityelements.end(); ++it) { - Point<3> center = model_part.GetElement(*it).GetGeometry().Center(); + Point center = model_part.GetElement(*it).GetGeometry().Center(); if( cylinder.IsInorOn( center ) ) { // bool allnodesinside = true; @@ -310,7 +310,7 @@ class NodeSnappingUtility * @retval true if an element could be found which contains the point */ bool FindElement( WeakPointerVector& elements_set, CoordinatesArrayType& point, - int& elem_id, Point<3>& rResult ) + int& elem_id,Point& rResult ) { for( WeakPointerVector::iterator it = elements_set.begin(); it != elements_set.end(); ++it ) { @@ -340,9 +340,9 @@ class NodeSnappingUtility //loop over all nodes of the current surface for (unsigned int inode=0; inode < (*it)->GetGeometry().size(); ++inode) { - Point<3> old_position = (*it)->GetGeometry()[inode].GetInitialPosition(); - Point<3> new_position = cylinder.ClosestPointOnWall(old_position); - Point<3> distance = new_position - old_position; + Point old_position = (*it)->GetGeometry()[inode].GetInitialPosition(); + Point new_position = cylinder.ClosestPointOnWall(old_position); + Point distance = new_position - old_position; double dist = pow(distance[0],2.0)+pow(distance[1],2.0)+pow(distance[2],2.0); if ( dist > 0.000001) { @@ -376,21 +376,21 @@ class NodeSnappingUtility //loop over all nodes for (std::vector::iterator it=cap_nodes.begin(); it != cap_nodes.end(); ++it) { - Point<3> old_position = model_part.GetNode(*it).GetInitialPosition(); - Point<3> new_position = cylinder.ClosestPointOnCap(old_position); - Point<3> distance = new_position - old_position; + Point old_position = model_part.GetNode(*it).GetInitialPosition(); + Point new_position = cylinder.ClosestPointOnCap(old_position); + Point distance = new_position - old_position; double dist = pow(distance[0],2.0)+pow(distance[1],2.0)+pow(distance[2],2.0); if ( dist > 0.000001) { //the new node position is different from the old one - Point<3> step = (new_position - old_position) / 10; + Point step = (new_position - old_position) / 10; //neighbour elements of the node WeakPointerVector& rneigh_el = model_part.GetNode(*it).GetValue(NEIGHBOUR_ELEMENTS); for (int i=0; i<10; ++i) { - Point<3> spstep = old_position + step*(i+1); + Point spstep = old_position + step*(i+1); //move the node if (!MoveNode( model_part, rneigh_el, model_part.GetNode(*it), spstep)) std::cout << "node " << model_part.GetNode(*it).Id() << " could not be moved from " << model_part.GetNode(*it).GetInitialPosition() << " to " << spstep << std::endl; else @@ -450,8 +450,8 @@ class NodeSnappingUtility { //element runs through cylinder std::cout << "element is running through cylinder with nodes " << edge->pGetPoint(node0)->Id() << " and " << edge->pGetPoint(node1)->Id() << std::endl; - Point<3> old_position = edge->pGetPoint(node0)->GetInitialPosition(); - Point<3> new_position = cylinder.ClosestPointOnCap(old_position); + Point old_position = edge->pGetPoint(node0)->GetInitialPosition(); + Point new_position = cylinder.ClosestPointOnCap(old_position); //check if there is already a node at the new_position WeakPointerVector< Node<3> >& rneigh_nodes = edge->pGetPoint(node0)->GetValue(NEIGHBOUR_NODES); @@ -461,8 +461,8 @@ class NodeSnappingUtility if(new_position == rneigh_nodes[i].GetInitialPosition()) { //the current node is on the new_position - Point<3> old_position2 = rneigh_nodes[i].GetInitialPosition(); - Point<3> new_position2 = old_position2 + 0.5*(old_position2 - old_position); + Point old_position2 = rneigh_nodes[i].GetInitialPosition(); + Point new_position2 = old_position2 + 0.5*(old_position2 - old_position); WeakPointerVector& rneigh_el2 = rneigh_nodes[i].GetValue(NEIGHBOUR_ELEMENTS); //move the node if (!MoveNode( model_part, rneigh_el2, rneigh_nodes[i], new_position2)) std::cout << "node " << rneigh_nodes[i].Id() << " could not be moved from " << rneigh_nodes[i].GetInitialPosition() << " to " << new_position2 << std::endl; @@ -475,7 +475,7 @@ class NodeSnappingUtility } } - Point<3> step = (new_position - old_position) / 10; + Point step = (new_position - old_position) / 10; WeakPointerVector& rneigh_el = edge->pGetPoint(node0)->GetValue(NEIGHBOUR_ELEMENTS); @@ -483,7 +483,7 @@ class NodeSnappingUtility for (int i=0; i<10; ++i) { //calculate new node position - Point<3> spstep = old_position + step*(i+1); + Point spstep = old_position + step*(i+1); //move the node onto the cap if (!MoveNode( model_part, rneigh_el, *(edge->pGetPoint(node0)), spstep)) std::cout << "node " << edge->pGetPoint(node0)->Id() << " could not be moved from " << edge->pGetPoint(node0)->GetInitialPosition() << " to " << spstep << std::endl; @@ -526,8 +526,8 @@ class NodeSnappingUtility iedd->pGetPoint(2)->FastGetSolutionStepValue( IS_VISITED ) == 3 ) ) { //one of the edge's nodes is visited - Point<3> new_position = 0.5 * (iedd->pGetPoint(0)->GetInitialPosition() + iedd->pGetPoint(2)->GetInitialPosition()); - Point<3> point = new_position - iedd->pGetPoint(1)->GetInitialPosition(); + Point new_position = 0.5 * (iedd->pGetPoint(0)->GetInitialPosition() + iedd->pGetPoint(2)->GetInitialPosition()); + Point point = new_position - iedd->pGetPoint(1)->GetInitialPosition(); double distance = pow(point[0],2.0)+pow(point[1],2.0)+pow(point[2],2.0); if ( distance > 0.000001 ) @@ -557,11 +557,11 @@ class NodeSnappingUtility * finite element deformation in interactive surgery simulation * UU-CS-2001-16 (2001) */ - bool MoveNode( ModelPart& model_part, WeakPointerVector& adjacent_elems, Node<3>& rNode, Point<3>& newPosition ) + bool MoveNode( ModelPart& model_part, WeakPointerVector& adjacent_elems, Node<3>& rNode,Point& newPosition ) { int elem_id = 0; - Point<3> newLocalPoint; + Point newLocalPoint; //find element, the new point lies within if( FindElement( adjacent_elems, newPosition, elem_id, newLocalPoint ) ) { @@ -569,7 +569,7 @@ class NodeSnappingUtility //map all variables to the new position MapNodalValues( rNode, elem, newLocalPoint ); //determine current deformation state in newLocalPoint - Point<3> undeformed_point( 0.0, 0.0, 0.0 ); + Point undeformed_point( 0.0, 0.0, 0.0 ); undeformed_point = newPosition - rNode.GetSolutionStepValue(DISPLACEMENT); //move node to new undeformed_point rNode.SetInitialPosition( undeformed_point ); @@ -587,7 +587,7 @@ class NodeSnappingUtility * @param elem element the local point lies inside * @param localPoint point from which all values are maped */ - void MapNodalValues( Node<3>& rNode, Element::Pointer& elem, Point<3> localPoint ) + void MapNodalValues( Node<3>& rNode, Element::Pointer& elem,Point localPoint ) { if(rNode.HasDofFor(DISPLACEMENT_X) || rNode.HasDofFor(DISPLACEMENT_Y) @@ -649,8 +649,8 @@ class NodeSnappingUtility * @param rThisVariable variabletype which should be calculated at the local point * @return newValue */ - //double MappedValue( Node<3>& node, Element::Pointer& elem, Point<3>& localPoint, - double MappedValue( Element::Pointer& elem, Point<3>& localPoint, + //double MappedValue( Node<3>& node, Element::Pointer& elem,Point& localPoint, + double MappedValue( Element::Pointer& elem,Point& localPoint, const Variable& rThisVariable ) { double newValue = 0.0; @@ -671,7 +671,7 @@ class NodeSnappingUtility * @param rThisVariable variabletype which should be calculated at the local point * @return newValue */ - Vector MappedValue( Element::Pointer& elem, Point<3>& localPoint, + Vector MappedValue( Element::Pointer& elem,Point& localPoint, const Variable >& rThisVariable) { Vector newValue = ZeroVector(3); @@ -692,7 +692,7 @@ class NodeSnappingUtility * @param rThisVariable variabletype which should be calculated at the local point * @return newValue */ - Vector MappedValue( Element::Pointer& elem, Point<3>& localPoint, const Variable& rThisVariable) + Vector MappedValue( Element::Pointer& elem,Point& localPoint, const Variable& rThisVariable) { Vector newValue = ZeroVector(6); @@ -1130,7 +1130,7 @@ class NodeSnappingUtility // for ( ElementsArrayType::ptr_iterator it=model_part.Elements().ptr_begin(); it!=model_part.Elements().ptr_end(); ++it){ // //get integration points // GeometryType::IntegrationPointsArrayType integration_points = (*it)->GetGeometry().IntegrationPoints( (*it)->GetIntegrationMethod() ); -// Point<3> coords; +// Point coords; // std::vector InsituStresses; // Vector InsituStress = ZeroVector(6); // for( unsigned int i=0; i< integration_points.size(); i++ ){ @@ -1158,7 +1158,7 @@ class NodeSnappingUtility GeometryType::IntegrationPointsArrayType integration_points = (*it)->GetGeometry().IntegrationPoints( (*it)->GetIntegrationMethod() ); std::vector ValuesOnIntPoint(integration_points.size()); (*it)->GetValueOnIntegrationPoints(INSITU_STRESS, ValuesOnIntPoint, model_part.GetProcessInfo()); - Point<3> coords; + Point coords; for( unsigned int i=0; iGetGeometry().GlobalCoordinates(coords, integration_points[i]); @@ -1178,7 +1178,7 @@ class NodeSnappingUtility for (std::map::iterator it=vicinitynodes.begin(); it != vicinitynodes.end(); ++it) { - Point<3> point = model_part.GetNode(it->first).GetInitialPosition(); + Point point = model_part.GetNode(it->first).GetInitialPosition(); for (int i=0; i<3; ++i) { error = model_part.GetNode(it->first).GetSolutionStepValue(INSITU_STRESS)[i] - point[i]; diff --git a/applications/structural_application/custom_utilities/parallel_variable_transfer_utility.h b/applications/structural_application/custom_utilities/parallel_variable_transfer_utility.h index 7a004119dd3c..e009aa61f53d 100644 --- a/applications/structural_application/custom_utilities/parallel_variable_transfer_utility.h +++ b/applications/structural_application/custom_utilities/parallel_variable_transfer_utility.h @@ -151,7 +151,7 @@ class ParallelVariableTransferUtility Element correspondingElement; // FixDataValueContainer newNodalValues; // FixDataValueContainer oldNodalValues; - Point<3> localPoint; + Point localPoint; for(ModelPart::NodeIterator it = rTarget.NodesBegin() ; it != rTarget.NodesEnd() ; it++) @@ -574,10 +574,10 @@ class ParallelVariableTransferUtility for(unsigned int point=0; point< integration_points.size(); point++) { - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint,targetLocalPoint); Element sourceElement; //Calculate Value of rVariable(firstvalue, secondvalue) in OldMesh @@ -638,10 +638,10 @@ class ParallelVariableTransferUtility for(unsigned int point=0; point< integration_points.size(); point++) { - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint,targetLocalPoint); Element sourceElement; //Calculate Value of rVariable(firstvalue, secondvalue) in OldMesh @@ -703,10 +703,10 @@ class ParallelVariableTransferUtility for(unsigned int point=0; point< integration_points.size(); point++) { - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint,targetLocalPoint); Element sourceElement; //Calculate Value of rVariable(firstvalue, secondvalue) in OldMesh @@ -1304,10 +1304,10 @@ class ParallelVariableTransferUtility { MathUtils::InvertMatrix(J[point],InvJ,DetJ); - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint, targetLocalPoint); Element sourceElement; @@ -1439,10 +1439,10 @@ class ParallelVariableTransferUtility { MathUtils::InvertMatrix(J[point],InvJ,DetJ); - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint, targetLocalPoint); Element sourceElement; @@ -1537,10 +1537,10 @@ class ParallelVariableTransferUtility { MathUtils::InvertMatrix(J[point],InvJ,DetJ); - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint, targetLocalPoint); Element sourceElement; @@ -1589,12 +1589,12 @@ class ParallelVariableTransferUtility * @param oldElement corresponding element in source mesh * @param localPoint given target point to map the variable to * @param rThisVariable given variable to be transferred - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) - * @see MappedValue( Element& sourceElement, Point<3>& targetPoint, + * @see MappedValue( Element& sourceElement,Point& targetPoint, const Variable& rThisVariable) */ - Matrix ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + Matrix ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) { Matrix newValue(3,3); @@ -1624,12 +1624,12 @@ class ParallelVariableTransferUtility * @param oldElement corresponding element in source mesh * @param localPoint given target point to map the variable to * @param rThisVariable given variable to be transferred - * @see ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) - * @see MappedValue( Element& sourceElement, Point<3>& targetPoint, + * @see MappedValue( Element& sourceElement,Point& targetPoint, const Variable& rThisVariable) */ - Vector ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + Vector ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) { Vector newValue(6); @@ -1654,12 +1654,12 @@ class ParallelVariableTransferUtility * @param sourceElement corresponding element in source mesh * @param targetPoint given target point to map the variable to * @param rThisVariable given variable to be transferred - * @see ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) */ - double MappedValuePressure( Element& sourceElement, Point<3>& targetPoint, + double MappedValuePressure( Element& sourceElement,Point& targetPoint, const Variable& rThisVariable) { double newValue = 0.0; @@ -1696,12 +1696,12 @@ class ParallelVariableTransferUtility * @param sourceElement corresponding element in source mesh * @param targetPoint given target point to map the variable to * @param rThisVariable given variable to be transferred - * @see ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) */ - double MappedValue( Element& sourceElement, Point<3>& targetPoint, + double MappedValue( Element& sourceElement,Point& targetPoint, const Variable& rThisVariable) { double newValue = 0.0; @@ -1725,7 +1725,7 @@ class ParallelVariableTransferUtility * @param targetPoint given target point to map the variable to * @param rThisVariable given variable to be transferred */ - Vector MappedValue( Element& sourceElement, Point<3>& targetPoint, + Vector MappedValue( Element& sourceElement,Point& targetPoint, const Variable >& rThisVariable) { Vector newValue = ZeroVector(3); @@ -1753,7 +1753,7 @@ class ParallelVariableTransferUtility */ bool FindPartnerElement( CoordinatesArrayType& newNode, const ElementsArrayType& OldMeshElementsArray, - Element& oldElement, Point<3>& rResult) + Element& oldElement,Point& rResult) { bool partner_found= false; //noalias(rResult)= ZeroVector(3); @@ -1844,10 +1844,10 @@ class ParallelVariableTransferUtility * @param rThisVariable given variable to be transferred * @param firstvalue row index * @param secondvalue column index - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable, unsigned int firstvalue) */ - double ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + double ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable, unsigned int firstvalue, unsigned int secondvalue ) { double newValue= 0.0; @@ -1871,10 +1871,10 @@ class ParallelVariableTransferUtility * @param targetPoint given target point to map the variable to * @param rThisVariable given variable to be transferred * @param firstvalue index - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable, unsigned int firstvalue) */ - double ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + double ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable, unsigned int firstvalue ) { double newValue= 0.0; diff --git a/applications/structural_application/custom_utilities/sd_math_utils.h b/applications/structural_application/custom_utilities/sd_math_utils.h index bd7c3c50d7ea..ebb90d6858fc 100644 --- a/applications/structural_application/custom_utilities/sd_math_utils.h +++ b/applications/structural_application/custom_utilities/sd_math_utils.h @@ -1328,12 +1328,12 @@ template class SD_MathUtils * @param result_points vertices of overlapping polygon * @return false= no overlapping polygon, true= overlapping polygon found */ - static bool Clipping(std::vector* >& clipping_points,std::vector* >& subjected_points, std::vector* >& result_points, double tolerance) + static bool Clipping(std::vector& clipping_points,std::vector& subjected_points, std::vector& result_points, double tolerance) { result_points= subjected_points; Vector actual_edge(3); Vector actual_normal(3); - std::vector* > temp_results; + std::vector temp_results; bool is_visible= false; for(unsigned int clipp_edge=0; clipp_edge class SD_MathUtils if(is_visible) temp_results.push_back(result_points[subj_edge]); - temp_results.push_back(new Point<3>((*(clipping_points[clipp_edge])+coeff(1)*(*(clipping_points[index_clipp_2])-*(clipping_points[clipp_edge]))))); + temp_results.push_back(new Point((*(clipping_points[clipp_edge])+coeff(1)*(*(clipping_points[index_clipp_2])-*(clipping_points[clipp_edge]))))); is_visible= !is_visible; diff --git a/applications/structural_application/custom_utilities/variable_transfer_utility.h b/applications/structural_application/custom_utilities/variable_transfer_utility.h index 9daada5ac492..84c811724678 100755 --- a/applications/structural_application/custom_utilities/variable_transfer_utility.h +++ b/applications/structural_application/custom_utilities/variable_transfer_utility.h @@ -175,7 +175,7 @@ class VariableTransferUtility Element::Pointer correspondingElement; // FixDataValueContainer newNodalValues; // FixDataValueContainer oldNodalValues; - Point<3> localPoint; + Point localPoint; for(ModelPart::NodeIterator it = rTarget.NodesBegin() ; it != rTarget.NodesEnd() ; it++) @@ -601,10 +601,10 @@ class VariableTransferUtility for(unsigned int point=0; point< integration_points.size(); point++) { - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint,targetLocalPoint); Element::Pointer sourceElement; //Calculate Value of rVariable(firstvalue, secondvalue) in OldMesh @@ -669,10 +669,10 @@ class VariableTransferUtility // KRATOS_WATCH(integration_points.size()) for(unsigned int point = 0; point< integration_points.size(); ++point) { - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint) = integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint,targetLocalPoint); // KRATOS_WATCH(targetGlobalPoint) Element::Pointer sourceElement; @@ -727,10 +727,10 @@ class VariableTransferUtility for(unsigned int point=0; point< integration_points.size(); point++) { - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint,targetLocalPoint); Element::Pointer sourceElement; //Calculate Value of rVariable(firstvalue, secondvalue) in OldMesh @@ -1489,10 +1489,10 @@ class VariableTransferUtility { MathUtils::InvertMatrix(J[point],InvJ,DetJ); - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint, targetLocalPoint); Element::Pointer sourceElement; @@ -1624,10 +1624,10 @@ class VariableTransferUtility { MathUtils::InvertMatrix(J[point],InvJ,DetJ); - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint, targetLocalPoint); Element::Pointer sourceElement; @@ -1722,10 +1722,10 @@ class VariableTransferUtility { MathUtils::InvertMatrix(J[point],InvJ,DetJ); - Point<3> sourceLocalPoint; - Point<3> targetLocalPoint; + Point sourceLocalPoint; + Point targetLocalPoint; noalias(targetLocalPoint)= integration_points[point]; - Point<3> targetGlobalPoint; + Point targetGlobalPoint; (*it)->GetGeometry().GlobalCoordinates(targetGlobalPoint, targetLocalPoint); Element::Pointer sourceElement; @@ -1775,12 +1775,12 @@ class VariableTransferUtility * @param oldElement corresponding element in source mesh * @param localPoint given target point to map the variable to * @param rThisVariable given variable to be transferred - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) - * @see MappedValue( Element& sourceElement, Point<3>& targetPoint, + * @see MappedValue( Element& sourceElement,Point& targetPoint, const Variable& rThisVariable) */ - Matrix ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + Matrix ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) { Matrix newValue(3,3); @@ -1811,12 +1811,12 @@ class VariableTransferUtility * @param oldElement corresponding element in source mesh * @param localPoint given target point to map the variable to * @param rThisVariable given variable to be transferred - * @see ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) - * @see MappedValue( Element& sourceElement, Point<3>& targetPoint, + * @see MappedValue( Element& sourceElement,Point& targetPoint, const Variable& rThisVariable) */ - Vector ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + Vector ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) { Vector newValue(6); @@ -1844,12 +1844,12 @@ class VariableTransferUtility * @param sourceElement corresponding element in source mesh * @param targetPoint given target point to map the variable to * @param rThisVariable given variable to be transferred - * @see ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) */ - double MappedValuePressure( Element& sourceElement, Point<3>& targetPoint, + double MappedValuePressure( Element& sourceElement,Point& targetPoint, const Variable& rThisVariable) { double newValue = 0.0; @@ -1887,12 +1887,12 @@ class VariableTransferUtility * @param sourceElement corresponding element in source mesh * @param targetPoint given target point to map the variable to * @param rThisVariable given variable to be transferred - * @see ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable ) */ - double MappedValue( Element& sourceElement, Point<3>& targetPoint, + double MappedValue( Element& sourceElement,Point& targetPoint, const Variable& rThisVariable) { double newValue = 0.0; @@ -1917,7 +1917,7 @@ class VariableTransferUtility * @param targetPoint given target point to map the variable to * @param rThisVariable given variable to be transferred */ - Vector MappedValue( Element& sourceElement, Point<3>& targetPoint, + Vector MappedValue( Element& sourceElement,Point& targetPoint, const Variable >& rThisVariable) { Vector newValue = ZeroVector(3); @@ -1946,7 +1946,7 @@ class VariableTransferUtility */ bool FindPartnerElement( CoordinatesArrayType& newNode, ElementsArrayType& OldMeshElementsArray, - Element::Pointer& oldElement, Point<3>& rResult) + Element::Pointer& oldElement,Point& rResult) { bool partner_found= false; //noalias(rResult)= ZeroVector(3); @@ -2038,10 +2038,10 @@ class VariableTransferUtility * @param rThisVariable given variable to be transferred * @param firstvalue row index * @param secondvalue column index - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable, unsigned int firstvalue) */ - double ValueMatrixInOldMesh(Element& oldElement, Point<3>& localPoint, + double ValueMatrixInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable, unsigned int firstvalue, unsigned int secondvalue ) { double newValue = 0.0; @@ -2065,10 +2065,10 @@ class VariableTransferUtility * @param targetPoint given target point to map the variable to * @param rThisVariable given variable to be transferred * @param firstvalue index - * @see ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + * @see ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable, unsigned int firstvalue) */ - double ValueVectorInOldMesh(Element& oldElement, Point<3>& localPoint, + double ValueVectorInOldMesh(Element& oldElement,Point& localPoint, const Variable& rThisVariable, unsigned int firstvalue ) { double newValue = 0.0; diff --git a/applications/structural_application/custom_utilities/volume_utility.h b/applications/structural_application/custom_utilities/volume_utility.h index b2b0ec318594..5315ed7bfb69 100644 --- a/applications/structural_application/custom_utilities/volume_utility.h +++ b/applications/structural_application/custom_utilities/volume_utility.h @@ -173,7 +173,7 @@ class VolumeUtility // CENTER // Element::GeometryType& geom = iel->GetGeometry(); // takes the element geometry // unsigned int number_of_nodes = geom.PointsNumber(); // gets the total number of nodes of a element -// std::vector< Point<3, double > > Puntos; /// vector of points for the element +// std::vector Puntos; /// vector of points for the element // Puntos.resize( number_of_nodes); for( ModelPart::ElementsContainerType::iterator iel = model_part.ElementsBegin(); // loop over elements @@ -184,7 +184,7 @@ class VolumeUtility //unsigned int number_of_total_element_in_the_model_part = model_part.ElementsEnd() - model_part.ElementsBegin(); // number of elements Element::GeometryType& geom = iel->GetGeometry(); // takes the element geometry unsigned int number_of_nodes = geom.PointsNumber(); // gets the total number of nodes of a element - std::vector< Point<3, double > > Puntos; /// vector of points for the element + std::vector Puntos; /// vector of points for the element Puntos.resize( number_of_nodes); for (unsigned int point = 0; point < number_of_nodes; point ++ ) @@ -225,7 +225,7 @@ class VolumeUtility //unsigned int number_of_total_element_in_the_model_part = model_part.ElementEnd() - model_part.ElementsBegin(); // number of elements Element::GeometryType& geom = iel->GetGeometry(); // takes the element geometry unsigned int number_of_nodes = geom.PointsNumber(); // gets the total number of nodes of a element - std::vector< Point<3, double > > Puntos; /// vector of points for the element + std::vector Puntos; /// vector of points for the element Puntos.resize( number_of_nodes); for (unsigned int point = 0; point < number_of_nodes; point ++ ) @@ -294,7 +294,7 @@ class VolumeUtility //unsigned int number_of_total_element_in_the_model_part = model_part.ElementsEnd() - model_part.ElementsBegin(); // number of elements Element::GeometryType& geom = iel->GetGeometry(); // takes the element geometry unsigned int number_of_nodes = geom.PointsNumber(); // gets the total number of nodes of a element - std::vector< Point<3, double > > Puntos; /// vector of points for the element + std::vector Puntos; /// vector of points for the element Puntos.resize( number_of_nodes); //KRATOS_WATCH(number_of_nodes); diff --git a/applications/structural_application/structural_application.cpp b/applications/structural_application/structural_application.cpp index 87194e5a027d..b4abef1900ab 100644 --- a/applications/structural_application/structural_application.cpp +++ b/applications/structural_application/structural_application.cpp @@ -140,13 +140,13 @@ KRATOS_CREATE_VARIABLE( Condition::Pointer, CONTACT_LINK_MASTER ) //CONTACT_LINK_SLAVE is defined in condition.h KRATOS_CREATE_VARIABLE( Condition::Pointer, CONTACT_LINK_SLAVE ) KRATOS_CREATE_VARIABLE( Node<3>::Pointer, NEAR_NODE ) -KRATOS_CREATE_VARIABLE( Point<3>, MASTER_CONTACT_LOCAL_POINT ) -KRATOS_CREATE_VARIABLE( Point<3>, MASTER_CONTACT_CURRENT_LOCAL_POINT ) -KRATOS_CREATE_VARIABLE( Point<3>, MASTER_CONTACT_LAST_CURRENT_LOCAL_POINT ) -KRATOS_CREATE_VARIABLE( Point<3>, SLAVE_CONTACT_LOCAL_POINT ) -KRATOS_CREATE_VARIABLE( Point<3>, MASTER_CONTACT_GLOBAL_POINT ) -KRATOS_CREATE_VARIABLE( Point<3>, MASTER_CONTACT_CURRENT_GLOBAL_POINT ) -KRATOS_CREATE_VARIABLE( Point<3>, SLAVE_CONTACT_GLOBAL_POINT ) +KRATOS_CREATE_VARIABLE(Point, MASTER_CONTACT_LOCAL_POINT ) +KRATOS_CREATE_VARIABLE(Point, MASTER_CONTACT_CURRENT_LOCAL_POINT ) +KRATOS_CREATE_VARIABLE(Point, MASTER_CONTACT_LAST_CURRENT_LOCAL_POINT ) +KRATOS_CREATE_VARIABLE(Point, SLAVE_CONTACT_LOCAL_POINT ) +KRATOS_CREATE_VARIABLE(Point, MASTER_CONTACT_GLOBAL_POINT ) +KRATOS_CREATE_VARIABLE(Point, MASTER_CONTACT_CURRENT_GLOBAL_POINT ) +KRATOS_CREATE_VARIABLE(Point, SLAVE_CONTACT_GLOBAL_POINT ) KRATOS_CREATE_VARIABLE( double, INSITU_STRESS_SCALE ) KRATOS_CREATE_VARIABLE( double, REFERENCE_WATER_PRESSURE ) KRATOS_CREATE_VARIABLE( double, OVERCONSOLIDATION_RATIO ) diff --git a/applications/structural_application/structural_application.h b/applications/structural_application/structural_application.h index d011ccb78cb0..02cdda2ace5d 100644 --- a/applications/structural_application/structural_application.h +++ b/applications/structural_application/structural_application.h @@ -165,13 +165,13 @@ KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Condition::P //CONTACT_LINK_SLAVE is defined in condition.h KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Condition::Pointer, CONTACT_LINK_SLAVE ) KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Node<3>::Pointer, NEAR_NODE) -KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point<3>, MASTER_CONTACT_LOCAL_POINT ) -KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point<3>, MASTER_CONTACT_CURRENT_LOCAL_POINT ) -KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point<3>, MASTER_CONTACT_LAST_CURRENT_LOCAL_POINT ) -KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point<3>, SLAVE_CONTACT_LOCAL_POINT ) -KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point<3>, MASTER_CONTACT_GLOBAL_POINT ) -KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point<3>, MASTER_CONTACT_CURRENT_GLOBAL_POINT ) -KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point<3>, SLAVE_CONTACT_GLOBAL_POINT ) +KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point, MASTER_CONTACT_LOCAL_POINT ) +KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point, MASTER_CONTACT_CURRENT_LOCAL_POINT ) +KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point, MASTER_CONTACT_LAST_CURRENT_LOCAL_POINT ) +KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point, SLAVE_CONTACT_LOCAL_POINT ) +KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point, MASTER_CONTACT_GLOBAL_POINT ) +KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point, MASTER_CONTACT_CURRENT_GLOBAL_POINT ) +KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, Point, SLAVE_CONTACT_GLOBAL_POINT ) KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, double , INSITU_STRESS_SCALE ) KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, double, REFERENCE_WATER_PRESSURE ) KRATOS_DEFINE_APPLICATION_VARIABLE( LEGACY_STRUCTURAL_APPLICATION, double , OVERCONSOLIDATION_RATIO ) diff --git a/applications/structural_application/z_legacy/custom_elements/linear_elastic_truss.h b/applications/structural_application/z_legacy/custom_elements/linear_elastic_truss.h index 53f7835d8598..b0daca294f2d 100644 --- a/applications/structural_application/z_legacy/custom_elements/linear_elastic_truss.h +++ b/applications/structural_application/z_legacy/custom_elements/linear_elastic_truss.h @@ -326,7 +326,7 @@ class LinearElasticTruss ///@name Member Variables ///@{ -// Geometry< Point<3,double> >::Pointer mpReferenceGeometry; +// Geometry< Point>::Pointer mpReferenceGeometry; //double mTotalDomainInitialSize; diff --git a/applications/swimming_DEM_application/custom_elements/calculate_gradient_Pouliot_2012_edge.cpp b/applications/swimming_DEM_application/custom_elements/calculate_gradient_Pouliot_2012_edge.cpp index 7d1ed9f65766..64ac550f35cf 100644 --- a/applications/swimming_DEM_application/custom_elements/calculate_gradient_Pouliot_2012_edge.cpp +++ b/applications/swimming_DEM_application/custom_elements/calculate_gradient_Pouliot_2012_edge.cpp @@ -119,7 +119,6 @@ void ComputeGradientPouliot2012Edge::AddPouliot2012RHS(VectorTy const GeometryType& rGeom = this->GetGeometry(); const array_1d le = rGeom[1].Coordinates() - rGeom[0].Coordinates(); // vector from node 0 to node 1 const double h_edge_inv_2 = 1.0 / SWIMMING_INNER_PRODUCT_3(le, le); - //le *= h_edge_inv; double vel_component_variation_along_edge; @@ -139,7 +138,6 @@ void ComputeGradientPouliot2012Edge::AddPouliot2012RHS(VectorTy for (unsigned int i = 0; i < TDim; ++i){ //F(TDim * node_e + i) += 2.0 * h_edge_inv * le[i] * vel_component_variation_along_edge; F(TDim * node_e + i) = 2.0 * h_edge_inv_2 * le[i] * vel_component_variation_along_edge; - KRATOS_WATCH(vel_component_variation_along_edge) } } KRATOS_CATCH(""); @@ -166,7 +164,13 @@ int ComputeGradientPouliot2012Edge::Check(const ProcessInfo& rC // Check that the element's nodes contain all required SolutionStepData and Degrees of freedom for(unsigned int i=0; iGetGeometry().size(); ++i) { - if(this->GetGeometry()[i].SolutionStepsDataHas(VELOCITY_Z_GRADIENT) == false) + Node<3> &rNode = this->GetGeometry()[i]; + KRATOS_CHECK_DOF_IN_NODE(VELOCITY_Z_GRADIENT_X,rNode); + KRATOS_CHECK_DOF_IN_NODE(VELOCITY_Z_GRADIENT_Y,rNode); + if (TDim == 3){ + KRATOS_CHECK_DOF_IN_NODE(VELOCITY_Z_GRADIENT_Z,rNode); + } + if(rNode.SolutionStepsDataHas(VELOCITY_Z_GRADIENT) == false) KRATOS_THROW_ERROR(std::invalid_argument,"missing VELOCITY_Z_GRADIENT variable on solution step data for node ",this->GetGeometry()[i].Id()); } diff --git a/applications/swimming_DEM_application/custom_elements/spheric_swimming_particle.cpp b/applications/swimming_DEM_application/custom_elements/spheric_swimming_particle.cpp index da2abe3f8457..d4409bd0beaf 100644 --- a/applications/swimming_DEM_application/custom_elements/spheric_swimming_particle.cpp +++ b/applications/swimming_DEM_application/custom_elements/spheric_swimming_particle.cpp @@ -1447,9 +1447,11 @@ void SphericSwimmingParticle::Initialize(const ProcessInfo& r_proc mHasVirtualMassForceNodalVar = node.SolutionStepsDataHas(VIRTUAL_MASS_FORCE); mHasBassetForceNodalVar = node.SolutionStepsDataHas(BASSET_FORCE); mHasLiftForceNodalVar = node.SolutionStepsDataHas(LIFT_FORCE); + - if (node.SolutionStepsDataHas(PARTICLE_SPHERICITY)){ - mSphericity = node.FastGetSolutionStepValue(PARTICLE_SPHERICITY); + if (node.SolutionStepsDataHas(PARTICLE_SPHERICITY)){ + node.FastGetSolutionStepValue(PARTICLE_SPHERICITY) = this->GetProperties()[PARTICLE_SPHERICITY]; + mSphericity = node.FastGetSolutionStepValue(PARTICLE_SPHERICITY); //TODO: remove member var mSphericity from everywhere. Care with the occasions when PARTICLE_SPHERICITY is not added to the nodes! } else { mSphericity = 1.0; diff --git a/applications/swimming_DEM_application/custom_python/add_custom_utilities_to_python.cpp b/applications/swimming_DEM_application/custom_python/add_custom_utilities_to_python.cpp index 5454cb73add2..fcaf161d94df 100755 --- a/applications/swimming_DEM_application/custom_python/add_custom_utilities_to_python.cpp +++ b/applications/swimming_DEM_application/custom_python/add_custom_utilities_to_python.cpp @@ -80,6 +80,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "custom_utilities/derivative_recovery_meshing_tools.h" #include "custom_utilities/inlets/bentonite_force_based_inlet.h" #include "custom_utilities/swimming_dem_in_pfem_utils.h" +#include "custom_utilities/AuxiliaryFunctions.h" namespace Kratos{ @@ -89,13 +90,6 @@ typedef ModelPart::NodesContainerType::iterator PointIterator; typedef std::vector > ComponentVectorType; typedef std::vector >::iterator ComponentIteratorType; -template - - void AddNodalSolutionStepVariable(ModelPart& rModelPart, Variable const& rThisVariable) - { - rModelPart.AddNodalSolutionStepVariable(rThisVariable); - } - template void AddDEMCouplingVariable(BinBasedDEMFluidCoupledMapping& rProjectionModule, const VariableData& rThisVariable) { @@ -108,9 +102,32 @@ void AddFluidCouplingVariable(BinBasedDEMFluidCoupledMapping + bool ModelPartHasNodalVariableOrNot(ModelPart& r_model_part, const Variable& rThisVariable) + { + return (r_model_part.GetNodalSolutionStepVariablesList()).Has(rThisVariable); + } +}; + +template +bool ModelPartHasNodalVariableOrNot(VariableChecker& rChecker, ModelPart& rModelPart, Variable const& rThisVariable) +{ + return rChecker.ModelPartHasNodalVariableOrNot(rModelPart, rThisVariable); +} + void AddCustomUtilitiesToPython(){ using namespace boost::python; + class_ ("VariableChecker", init<>()) + .def("ModelPartHasNodalVariableOrNot", ModelPartHasNodalVariableOrNot) + .def("ModelPartHasNodalVariableOrNot", ModelPartHasNodalVariableOrNot >) + ; + class_ ("RealFunction", init()) .def("Evaluate", &RealFunction::Evaluate) .def("CalculateDerivative", &RealFunction::CalculateDerivative) diff --git a/applications/swimming_DEM_application/custom_utilities/search/discrete_particle_configure.h b/applications/swimming_DEM_application/custom_utilities/search/discrete_particle_configure.h index f8904dab6494..aaeccc53af92 100644 --- a/applications/swimming_DEM_application/custom_utilities/search/discrete_particle_configure.h +++ b/applications/swimming_DEM_application/custom_utilities/search/discrete_particle_configure.h @@ -51,7 +51,7 @@ class DiscreteParticleConfigure{ MIN_LEVEL = 2 }; - typedef Point PointType; + typedef Point PointType; typedef std::vector::iterator DistanceIteratorType; typedef std::vector ContainerType; // ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; diff --git a/applications/swimming_DEM_application/custom_utilities/search/mpi_discrete_particle_configure.h b/applications/swimming_DEM_application/custom_utilities/search/mpi_discrete_particle_configure.h index ca17001bf431..b99a06a285d3 100644 --- a/applications/swimming_DEM_application/custom_utilities/search/mpi_discrete_particle_configure.h +++ b/applications/swimming_DEM_application/custom_utilities/search/mpi_discrete_particle_configure.h @@ -51,7 +51,7 @@ class MpiDiscreteParticleConfigure{ MIN_LEVEL = 2 }; - typedef Point PointType; + typedef Point PointType; typedef std::vector::iterator DistanceIteratorType; typedef std::vector ContainerType; // ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; diff --git a/applications/swimming_DEM_application/custom_utilities/search/point_configure.h b/applications/swimming_DEM_application/custom_utilities/search/point_configure.h index 784e54601149..d80473f2c658 100644 --- a/applications/swimming_DEM_application/custom_utilities/search/point_configure.h +++ b/applications/swimming_DEM_application/custom_utilities/search/point_configure.h @@ -57,14 +57,14 @@ enum {Dimension = TDimension, typedef SpatialSearch SearchType; typedef SearchType::PointType PointType; -typedef PointerVectorSet, IndexedObject>::ContainerType ContainerType; -typedef PointerVectorSet, IndexedObject> PointsContainerType; +typedef PointerVectorSet::ContainerType ContainerType; +typedef PointerVectorSet PointsContainerType; typedef SearchType::ElementType ElementType; typedef ContainerType::value_type PointerType; typedef ContainerType::iterator IteratorType; -typedef PointerVectorSet, IndexedObject>::ContainerType ResultContainerType; +typedef PointerVectorSet::ContainerType ResultContainerType; typedef ResultContainerType::iterator ResultIteratorType; diff --git a/applications/swimming_DEM_application/custom_utilities/search/point_point_search.h b/applications/swimming_DEM_application/custom_utilities/search/point_point_search.h index 4fd6fe368ea4..862295a3a660 100644 --- a/applications/swimming_DEM_application/custom_utilities/search/point_point_search.h +++ b/applications/swimming_DEM_application/custom_utilities/search/point_point_search.h @@ -84,7 +84,7 @@ typedef double* DistanceIterator; typedef PointConfigure<3> PointConfigureType; //Bin Types typedef BinsObjectDynamic PointBinsType; -typedef PointerVectorSet, IndexedObject> PointSetType; +typedef PointerVectorSet PointSetType; ///@} diff --git a/applications/swimming_DEM_application/python_scripts/KratosSwimmingDEM.py b/applications/swimming_DEM_application/python_scripts/KratosSwimmingDEM.py index 17bca6585137..72c397d6d5b7 100644 --- a/applications/swimming_DEM_application/python_scripts/KratosSwimmingDEM.py +++ b/applications/swimming_DEM_application/python_scripts/KratosSwimmingDEM.py @@ -16,7 +16,7 @@ from KratosMultiphysics.SwimmingDEMApplication import * class Solution: - def __init__(self, algorithm = None, varying_parameters = dict()): + def __init__(self, algorithm = None, varying_parameters = Parameters("{}")): self.alg = algorithm if self.alg == None: diff --git a/applications/swimming_DEM_application/python_scripts/cellular_flow/run_make_mesh_ethier_benchmark.py b/applications/swimming_DEM_application/python_scripts/cellular_flow/run_make_mesh_ethier_benchmark.py index 4ee3f1b5f3a7..4bafd63d87d1 100644 --- a/applications/swimming_DEM_application/python_scripts/cellular_flow/run_make_mesh_ethier_benchmark.py +++ b/applications/swimming_DEM_application/python_scripts/cellular_flow/run_make_mesh_ethier_benchmark.py @@ -10,21 +10,22 @@ varying_parameters = dict() irregular_mesh_sizes = set() #{0.1, 0.2, 0.4} -regular_mesh_n_points = {10} +regular_mesh_n_points = [10] derivatives_types = [6] combinations_that_failed = [] errors = [] + for size in irregular_mesh_sizes.union(regular_mesh_n_points): varying_parameters['size_parameter'] = size for derivatives_type in derivatives_types: varying_parameters['material_acceleration_calculation_type'] = derivatives_type varying_parameters['laplacian_calculation_type'] = derivatives_type - varying_parameters = Parameters(json.dumps(varying_parameters)) + parameters = Parameters(json.dumps(varying_parameters)) import make_mesh_ethier_benchmark_algorithm - with make_mesh_ethier_benchmark_algorithm.Algorithm(varying_parameters) as algorithm: + with make_mesh_ethier_benchmark_algorithm.Algorithm(parameters) as algorithm: try: - test = script.Solution(algorithm, varying_parameters) + test = script.Solution(algorithm, parameters) test.alg.Run() except: error = sys.exc_info() diff --git a/applications/swimming_DEM_application/python_scripts/derivative_recovery/derivative_recovery_strategy.py b/applications/swimming_DEM_application/python_scripts/derivative_recovery/derivative_recovery_strategy.py index a88041ca52f6..c4bb3eb636e8 100644 --- a/applications/swimming_DEM_application/python_scripts/derivative_recovery/derivative_recovery_strategy.py +++ b/applications/swimming_DEM_application/python_scripts/derivative_recovery/derivative_recovery_strategy.py @@ -29,8 +29,8 @@ def __init__(self, pp, fluid_model_part, derivative_recovery_tool = None, custom self.do_pre_recovery = False self.must_reconstruct_gradient = self.laplacian_type in {0, 3, 4, 5, 6} and self.mat_deriv_type in {3, 4} - if pp.CFD_DEM["fluid_already_calculated"].GetInt(): # the fluid has been calculated before, and the derivatives fed to the fluid_model_part - self.pre_computed_derivatives = pp.CFD_DEM.load_derivatives + if pp.CFD_DEM["fluid_already_calculated"].GetBool(): # the fluid has been calculated before, and the derivatives fed to the fluid_model_part + self.pre_computed_derivatives = pp.CFD_DEM["load_derivatives"].GetBool() else: self.pre_computed_derivatives = False diff --git a/applications/swimming_DEM_application/python_scripts/derivative_recovery/pouliot_2012_edge_recoverer.py b/applications/swimming_DEM_application/python_scripts/derivative_recovery/pouliot_2012_edge_recoverer.py index 2705a5cb2fbf..0f43d337bc28 100644 --- a/applications/swimming_DEM_application/python_scripts/derivative_recovery/pouliot_2012_edge_recoverer.py +++ b/applications/swimming_DEM_application/python_scripts/derivative_recovery/pouliot_2012_edge_recoverer.py @@ -37,11 +37,6 @@ def FillUpModelPart(self, element_type): edge = tuple(sorted((first_node.Id, second_node.Id))) set_of_all_edges.add(edge) - print('python number of edges: ', len(set_of_all_edges)) - print('c++ number of edges: ', number_of_elements) - print('c++ number of repeated edges: ', i_rep_edge) - print('c++ number of repeated edges over 6: ', i_rep_edge / 6) - print('number_of_elements: ', len(self.model_part.Elements)) def FillSetOfAllEdges(self, set_of_all_edges): for elem in self.model_part.Elements: @@ -75,11 +70,11 @@ def CreateCPluPlusStrategies(self, echo_level = 1): # linear_solver = SuperLUIterativeSolver() # linear_solver = CGSolver() # linear_solver = SkylineLUFactorizationSolver() - # linear_solver = SuperLUSolver() + linear_solver = SuperLUSolver() # linear_solver = ITSOL_ARMS_Solver() # linear_solver = MKLPardisoSolver() - linear_solver = AMGCLSolver(amgcl_smoother, amgcl_krylov_type, tolerance, max_iterations, verbosity,gmres_size) - self.recovery_strategy = ResidualBasedDerivativeRecoveryStrategy(self.recovery_model_part, scheme, linear_solver, False, True, False, False) + # linear_solver = AMGCLSolver(amgcl_smoother, amgcl_krylov_type, tolerance, max_iterations, verbosity,gmres_size) + self.recovery_strategy = ResidualBasedDerivativeRecoveryStrategy(self.recovery_model_part, scheme, linear_solver, False, False, False, False) self.recovery_strategy.SetEchoLevel(echo_level) @@ -87,6 +82,7 @@ def AddDofs(self, DOF_variables): for node in self.recovery_model_part.Nodes: for var in DOF_variables: node.AddDof(var) + print("DOFs for the derivative recovery solvers added correctly") def Solve(self): @@ -94,9 +90,9 @@ def Solve(self): def SetToZero(self, variable): if type(variable).__name__ == 'DoubleVariable': - self.custom_functions_tool.SetValueOfAllNotes(self.model_part, 0.0, variable) + self.custom_functions_tool.SetValueOfAllNotes(self.recovery_model_part, 0.0, variable) elif type(variable).__name__ == 'Array1DVariable3': - self.custom_functions_tool.SetValueOfAllNotes(self.model_part, ZeroVector(3), variable) + self.custom_functions_tool.SetValueOfAllNotes(self.recovery_model_part, ZeroVector(3), variable) class Pouliot2012EdgeGradientRecoverer(Pouliot2012EdgeDerivativesRecoverer, recoverer.VorticityRecoverer): def __init__(self, pp, model_part, cplusplus_recovery_tool): @@ -122,18 +118,15 @@ def RecoverGradientOfVelocity(self): print('***********************************************************************************************') print('***********************************************************************************************') - analytic_solution = [val for pair in zip([3 * node.X ** 2 for node in self.recovery_model_part.Nodes], [3 * node.Y ** 2 for node in self.recovery_model_part.Nodes]) for val in pair] - - for node in self.recovery_model_part.Nodes: - print(node.GetSolutionStepValue(VELOCITY_Z_GRADIENT)) - - print('analytic_solutio:\n', analytic_solution) + # analytic_solution = [val for pair in zip([3 * node.X ** 2 for node in self.recovery_model_part.Nodes], [3 * node.Y ** 2 for node in self.recovery_model_part.Nodes]) for val in pair] + # print('analytic_solutio:\n', analytic_solution) self.model_part.ProcessInfo[CURRENT_COMPONENT] = 1 self.Solve() self.custom_functions_tool.CopyValuesFromFirstToSecond(self.model_part, VELOCITY_Z_GRADIENT, VELOCITY_Y_GRADIENT) self.model_part.ProcessInfo[CURRENT_COMPONENT] = 2 self.Solve() # and there is no need to copy anything + if self.calculate_vorticity: self.cplusplus_recovery_tool.CalculateVorticityFromGradient(self.model_part, VELOCITY_X_GRADIENT, VELOCITY_Y_GRADIENT, VELOCITY_Z_GRADIENT, VORTICITY) diff --git a/applications/swimming_DEM_application/python_scripts/derivative_recovery/pouliot_2012_recoverer.py b/applications/swimming_DEM_application/python_scripts/derivative_recovery/pouliot_2012_recoverer.py index e60ac0fd5153..22768a09251c 100644 --- a/applications/swimming_DEM_application/python_scripts/derivative_recovery/pouliot_2012_recoverer.py +++ b/applications/swimming_DEM_application/python_scripts/derivative_recovery/pouliot_2012_recoverer.py @@ -26,7 +26,7 @@ def __init__(self, pp, model_part, cplusplus_recovery_tool, do_pre_recovery = Fa amgcl_krylov_type = AMGCLIterativeSolverType.BICGSTAB_WITH_GMRES_FALLBACK tolerance = 1e-12 max_iterations = 200 - verbosity = 2 #0->shows no information, 1->some information, 2->all the information + verbosity = 2 # 0->shows no information, 1->some information, 2->all the information gmres_size = 400 if self.use_lumped_mass_matrix: diff --git a/applications/swimming_DEM_application/python_scripts/derivative_recovery/recoverer.py b/applications/swimming_DEM_application/python_scripts/derivative_recovery/recoverer.py index 1d3278cb0465..479a133c5f45 100644 --- a/applications/swimming_DEM_application/python_scripts/derivative_recovery/recoverer.py +++ b/applications/swimming_DEM_application/python_scripts/derivative_recovery/recoverer.py @@ -4,6 +4,7 @@ from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # importing the Kratos Library from KratosMultiphysics import * +from KratosMultiphysics.FluidDynamicsApplication import * from KratosMultiphysics.SwimmingDEMApplication import * class DerivativesRecoverer: @@ -23,6 +24,8 @@ def RecoverGradientOfVelocity(self): pass def RecoverFluidFractionGradient(self): pass + def RecoverPressureGradient(self): + pass class EmptyMaterialAccelerationRecoverer(DerivativesRecoverer): def __init__(self, pp, model_part, cplusplus_recovery_tool): @@ -31,8 +34,6 @@ def RecoverMaterialAcceleration(self): pass def RecoverMaterialAccelerationFromGradient(self): pass - def RecoverPressureGradient(self): - pass class EmptyVorticityRecoverer(DerivativesRecoverer): def __init__(self, pp, model_part, cplusplus_recovery_tool): diff --git a/applications/swimming_DEM_application/python_scripts/derivative_recovery/standard_recoverer.py b/applications/swimming_DEM_application/python_scripts/derivative_recovery/standard_recoverer.py index d0ecb62518f1..a922f3ca66c5 100644 --- a/applications/swimming_DEM_application/python_scripts/derivative_recovery/standard_recoverer.py +++ b/applications/swimming_DEM_application/python_scripts/derivative_recovery/standard_recoverer.py @@ -1,6 +1,7 @@ from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # importing the Kratos Library from KratosMultiphysics import * +from KratosMultiphysics.FluidDynamicsApplication import * from KratosMultiphysics.SwimmingDEMApplication import * from . import recoverer @@ -13,6 +14,8 @@ def RecoverGradientOfVector(self, vector_variable, gradient_variable_x, gradient self.cplusplus_recovery_tool.CalculateGradient(self.model_part, vector_variable, gradient_variable_x, gradient_variable_y, gradient_variable_z) def RecoverGradientOfVelocity(self): self.RecoverGradientOfVector(VELOCITY, VELOCITY_X_GRADIENT, VELOCITY_Y_GRADIENT, VELOCITY_Z_GRADIENT) + def RecoverPressureGradient(self): + self.RecoverGradientOfScalar(PRESSURE, RECOVERED_PRESSURE_GRADIENT) class StandardMaterialAccelerationRecoverer(recoverer.MaterialAccelerationRecoverer): def __init__(self, pp, model_part, cplusplus_recovery_tool): diff --git a/applications/swimming_DEM_application/python_scripts/derivative_recovery/zhang_guo_recoverer.py b/applications/swimming_DEM_application/python_scripts/derivative_recovery/zhang_guo_recoverer.py index 261319562c3b..4f935fdb2ea4 100644 --- a/applications/swimming_DEM_application/python_scripts/derivative_recovery/zhang_guo_recoverer.py +++ b/applications/swimming_DEM_application/python_scripts/derivative_recovery/zhang_guo_recoverer.py @@ -1,6 +1,7 @@ from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # importing the Kratos Library from KratosMultiphysics import * +from KratosMultiphysics.FluidDynamicsApplication import * from KratosMultiphysics.SwimmingDEMApplication import * from . import recoverer @@ -13,6 +14,8 @@ def RecoverGradientOfVelocity(self): self.cplusplus_recovery_tool.RecoverSuperconvergentGradient(self.model_part, VELOCITY_X, VELOCITY_X_GRADIENT) self.cplusplus_recovery_tool.RecoverSuperconvergentGradient(self.model_part, VELOCITY_Y, VELOCITY_Y_GRADIENT) self.cplusplus_recovery_tool.RecoverSuperconvergentGradient(self.model_part, VELOCITY_Z, VELOCITY_Z_GRADIENT) + def RecoverPressureGradient(self): + self.cplusplus_recovery_tool.RecoverSuperconvergentGradient(self.model_part, PRESSURE, RECOVERED_PRESSURE_GRADIENT) class ZhangGuoMaterialAccelerationRecoverer(recoverer.MaterialAccelerationRecoverer, ZhangGuoGradientRecoverer): def __init__(self, pp, model_part, cplusplus_recovery_tool): diff --git a/applications/swimming_DEM_application/python_scripts/hdf5_io_tools.py b/applications/swimming_DEM_application/python_scripts/hdf5_io_tools.py index c9c5bcaefecb..0aafbaf2efdb 100644 --- a/applications/swimming_DEM_application/python_scripts/hdf5_io_tools.py +++ b/applications/swimming_DEM_application/python_scripts/hdf5_io_tools.py @@ -3,43 +3,19 @@ import h5py from KratosMultiphysics import * -def GetOldTimeIndicesAndWeights(current_time, times_array, fluid_dt): - print(current_time) - old_index = bi.bisect(times_array, current_time) - print(times_array[old_index]) - future_index = old_index + 1 - print('old_index',old_index) - print('future_index',future_index) - print(times_array[old_index]) - print(times_array[future_index]) - old_time = times_array[old_index] - - if future_index >= len(times_array): - alpha_old = 1 - future_index = old_index - alpha_future = 0 - else: - alpha_old = max(0, (current_time - old_time) / fluid_dt) - alpha_future = 1.0 - alpha_old - print('old_index',old_index) - print('future_index',future_index) - print('alpha_old',alpha_old) - print('alpha_future',alpha_future) - - return old_index, alpha_old, future_index, alpha_future - class FluidHDF5Loader: def __init__(self, fluid_model_part, pp, main_path): self.n_nodes = len(fluid_model_part.Nodes) self.shape = (self.n_nodes,) self.store_pressure = pp.CFD_DEM["store_fluid_pressure_option"].GetBool() self.store_gradient = pp.CFD_DEM["store_full_gradient_option"].GetBool() + self.there_are_more_steps_to_load = True number_of_variables = 3 if pp.CFD_DEM["store_fluid_pressure_option"].GetBool(): number_of_variables += 1 - if pp.CFD_DEM.load_derivatives: + if pp.CFD_DEM["load_derivatives"].GetBool(): number_of_variables += 9 self.extended_shape = self.shape + (number_of_variables,) @@ -47,7 +23,7 @@ def __init__(self, fluid_model_part, pp, main_path): self.file_name = main_path + '/box_32_history.hdf5' self.fluid_model_part = fluid_model_part - if pp.CFD_DEM.fluid_already_calculated: + if pp.CFD_DEM["fluid_already_calculated"].GetBool(): with h5py.File(self.file_name, 'r') as f: self.times_str = list([str(key) for key in f.keys() if key not in {'nodes'}]) @@ -85,14 +61,35 @@ def __init__(self, fluid_model_part, pp, main_path): f.attrs['linear system solver type'] = pp.FluidSolverConfiguration.linear_solver_config.solver_type f.attrs['use orthogonal subscales'] = bool(pp.FluidSolverConfiguration.oss_switch) self.dtype = np.float64 + nodes = np.array([(node.Id, node.X, node.Y, node.Z) for node in fluid_model_part.Nodes]) + f.create_dataset(name = 'nodes', compression = self.compression_type, data = nodes, dtype = np.float64) - if pp.CFD_DEM.store_fluid_in_single_precision: + if pp.CFD_DEM["store_fluid_in_single_precision"].GetBool(): self.dtype = np.float32 self.last_time = 0.0 self.current_data_array = np.zeros(self.extended_shape) + def GetOldTimeIndicesAndWeights(self, current_time, times_array, fluid_dt): + old_index = bi.bisect(times_array, current_time) + future_index = old_index + 1 + old_time = times_array[old_index] + + if future_index >= len(times_array): + alpha_old = 1 + future_index = old_index + alpha_future = 0 + self.there_are_more_steps_to_load = False + else: + alpha_old = max(0, (current_time - old_time) / fluid_dt) + alpha_future = 1.0 - alpha_old + + return old_index, alpha_old, future_index, alpha_future + + def CanLoadMoreSteps(self): + return self.there_are_more_steps_to_load + def Index(self): index = 0 while True: @@ -109,6 +106,9 @@ def FillUpSingleDataset(self, name, variable, variable_index_in_temp_array): def FillFluidDataStep(self): time = self.fluid_model_part.ProcessInfo[TIME] name = str(time) + with h5py.File(self.file_name) as f: + f.create_group(name = name) + f[name].attrs['time'] = time indices = self.Index() if not self.last_time == time: @@ -134,13 +134,13 @@ def FillFluidDataStep(self): def ConvertComponent(self, f, component_name): if '/vx' in component_name: - read_values = f[component_name][:, 0] + read_values = f[component_name][:,] elif '/vy' in component_name: - read_values = f[component_name][:, 0] + read_values = f[component_name][:,] elif '/vz' in component_name: - read_values = f[component_name][:, 0] + read_values = f[component_name][:,] else: - read_values = f[component_name][:, 0] + read_values = f[component_name][:,] return read_values[self.permutations] @@ -155,8 +155,9 @@ def UpdateFluidVariable(self, name, variable, variable_index_in_temp_array, must node.SetSolutionStepValue(variable, self.current_data_array[i_node, variable_index_in_temp_array]) def LoadFluid(self, DEM_time): + print('\nLoading fluid from hdf5 file...') # getting time indices and weights (identifyint the two fluid time steps surrounding the current DEM step and assigning correspnding weights) - old_time_index, alpha_old, future_time_index, alpha_future = GetOldTimeIndicesAndWeights(DEM_time, self.times, self.dt) + old_time_index, alpha_old, future_time_index, alpha_future = self.GetOldTimeIndicesAndWeights(DEM_time, self.times, self.dt) old_step_dataset_name = self.times_str[old_time_index] future_step_dataset_name = self.times_str[future_time_index] must_load_from_database = not self.old_time_index == old_time_index # old and future time steps must be updated @@ -183,3 +184,4 @@ def LoadFluid(self, DEM_time): self.UpdateFluidVariable(future_step_dataset_name + '/dvzx', VELOCITY_Z_GRADIENT_X, next(indices), must_load_from_database, alpha_old, alpha_future) self.UpdateFluidVariable(future_step_dataset_name + '/dvzy', VELOCITY_Z_GRADIENT_Y, next(indices), must_load_from_database, alpha_old, alpha_future) self.UpdateFluidVariable(future_step_dataset_name + '/dvzz', VELOCITY_Z_GRADIENT_Z, next(indices), must_load_from_database, alpha_old, alpha_future) + print('Finished loading fluid from hdf5 file.\n') diff --git a/applications/swimming_DEM_application/python_scripts/pre_calculated_fluid_algorithm.py b/applications/swimming_DEM_application/python_scripts/pre_calculated_fluid_algorithm.py index c547f27d854e..2c08fef2af1a 100644 --- a/applications/swimming_DEM_application/python_scripts/pre_calculated_fluid_algorithm.py +++ b/applications/swimming_DEM_application/python_scripts/pre_calculated_fluid_algorithm.py @@ -7,32 +7,50 @@ import h5py class Algorithm(BaseAlgorithm): - def __init__(self, varying_parameters = dict()): + def __init__(self, varying_parameters = Parameters("{}")): BaseAlgorithm.__init__(self, varying_parameters) - self.fluid_loader_counter = self.GetFluidLoaderCounter() + # self.fluid_loader_counter = self.GetFluidLoaderCounter() def SetBetaParameters(self): BaseAlgorithm.SetBetaParameters(self) - self.pp.CFD_DEM.alpha = 0.01 - self.pp.CFD_DEM.fluid_already_calculated = 1 - self.pp.CFD_DEM.load_derivatives = 0 - self.pp.CFD_DEM.DEM_steps_per_fluid_load_step = 1 - self.pp.CFD_DEM.store_fluid_in_single_precision = 1 - self.pp.CFD_DEM["store_fluid_pressure_option"].SetBool(1) + self.pp.CFD_DEM.AddEmptyValue("alpha").SetDouble(0.01) + self.pp.CFD_DEM.AddEmptyValue("fluid_already_calculated").SetBool(True) + self.pp.CFD_DEM.AddEmptyValue("load_derivatives").SetBool(False) + self.pp.CFD_DEM.AddEmptyValue("DEM_steps_per_fluid_load_step").SetInt(10) + self.pp.CFD_DEM.AddEmptyValue("store_fluid_in_single_precision").SetBool(True) + self.pp.CFD_DEM.AddEmptyValue("store_fluid_pressure_option").SetBool(True) def PerformZeroStepInitializations(self): import hdf5_io_tools self.fluid_loader = hdf5_io_tools.FluidHDF5Loader(self.all_model_parts.Get('FluidPart'), self.pp, self.main_path) def FluidSolve(self, time = 'None'): - if not self.pp.CFD_DEM.fluid_already_calculated: - self.fluid_solver.Solve() + if not self.pp.CFD_DEM["fluid_already_calculated"].GetBool(): + self.fluid_algorithm.fluid_solver.Solve() self.fluid_loader.FillFluidDataStep() + else: + self.fluid_loader.LoadFluid(time) def PerformInitialDEMStepOperations(self, time = None): - if self.fluid_loader_counter.Tick(): - if time > 0.07: - self.fluid_loader.LoadFluid(time) + pass def GetFluidLoaderCounter(self): - return SDP.Counter(self.pp.CFD_DEM.DEM_steps_per_fluid_load_step, 1, self.pp.CFD_DEM.fluid_already_calculated) + return SDP.Counter(steps_in_cycle = self.pp.CFD_DEM["DEM_steps_per_fluid_load_step"].GetInt(), + beginning_step = 1, + is_dead = not self.pp.CFD_DEM["fluid_already_calculated"].GetBool()) + + def GetRunCode(self): + code = SDP.CreateRunCode(self.pp) + + if self.pp.CFD_DEM["fluid_already_calculated"].GetBool(): + return code + '_precalculated_fluid' + else: + return code + + def TheSimulationMustGoON(self): + it_must_go_on = self.time <= self.final_time + + if self.pp.CFD_DEM["fluid_already_calculated"].GetBool(): + return it_must_go_on and self.fluid_loader.CanLoadMoreSteps() + else: + return it_must_go_on diff --git a/applications/swimming_DEM_application/python_scripts/swimming_DEM_algorithm.py b/applications/swimming_DEM_application/python_scripts/swimming_DEM_algorithm.py index b97ccbb6356c..23afbf37831a 100644 --- a/applications/swimming_DEM_application/python_scripts/swimming_DEM_algorithm.py +++ b/applications/swimming_DEM_application/python_scripts/swimming_DEM_algorithm.py @@ -131,10 +131,10 @@ def SetBetaParameters(self): # These are input parameters that have not yet been ############################################################################## #G - self.pp.CFD_DEM.AddEmptyValue("fluid_already_calculated").SetInt(0) - self.pp.CFD_DEM.recovery_echo_level = 1 - self.pp.CFD_DEM.gradient_calculation_type = 1 - self.pp.CFD_DEM.AddEmptyValue("pressure_grad_recovery_type").SetInt(1) + self.pp.CFD_DEM.AddEmptyValue("fluid_already_calculated").SetBool(False) + self.pp.CFD_DEM.AddEmptyValue("recovery_echo_level").SetInt(1) + self.pp.CFD_DEM.AddEmptyValue("gradient_calculation_type").SetInt(1) + self.pp.CFD_DEM.AddEmptyValue("pressure_grad_recovery_type").SetInt(0) self.pp.CFD_DEM.AddEmptyValue("fluid_fraction_grad_type").SetInt(0) self.pp.CFD_DEM.AddEmptyValue("store_full_gradient_option").SetBool(False) self.pp.CFD_DEM.AddEmptyValue("store_fluid_pressure_option").SetBool(False) @@ -146,18 +146,18 @@ def SetBetaParameters(self): # These are input parameters that have not yet been self.pp.CFD_DEM.AddEmptyValue("vorticity_calculation_type").SetInt(5) self.pp.CFD_DEM.AddEmptyValue("print_FLUID_VEL_PROJECTED_RATE_option").SetBool(False) self.pp.CFD_DEM.AddEmptyValue("print_MATERIAL_FLUID_ACCEL_PROJECTED_option").SetBool(True) - self.pp.CFD_DEM.AddEmptyValue("basset_force_type").SetInt(0) #TODO: not used?? - self.pp.CFD_DEM.AddEmptyValue("print_BASSET_FORCE_option").SetBool(True) #TODO: not used?? + self.pp.CFD_DEM.AddEmptyValue("basset_force_type").SetInt(0) + self.pp.CFD_DEM.AddEmptyValue("print_BASSET_FORCE_option").SetBool(True) self.pp.CFD_DEM.AddEmptyValue("basset_force_integration_type").SetInt(2) self.pp.CFD_DEM.AddEmptyValue("n_init_basset_steps").SetInt(0) self.pp.CFD_DEM.AddEmptyValue("time_steps_per_quadrature_step").SetInt(1) - self.pp.CFD_DEM.AddEmptyValue("delta_time_quadrature").SetDouble( self.pp.CFD_DEM["time_steps_per_quadrature_step"].GetInt() * self.pp.CFD_DEM["MaxTimeStep"].GetDouble() ) + self.pp.CFD_DEM.AddEmptyValue("delta_time_quadrature").SetDouble( + self.pp.CFD_DEM["time_steps_per_quadrature_step"].GetInt() * self.pp.CFD_DEM["MaxTimeStep"].GetDouble()) self.pp.CFD_DEM.AddEmptyValue("quadrature_order").SetInt(2) self.pp.CFD_DEM.AddEmptyValue("time_window").SetDouble(0.8) - self.pp.CFD_DEM.number_of_exponentials = 10 - self.pp.CFD_DEM.number_of_quadrature_steps_in_window = int(self.pp.CFD_DEM["time_window"].GetDouble() / self.pp.CFD_DEM["delta_time_quadrature"].GetDouble()) - self.pp.CFD_DEM.print_steps_per_plot_step = 1 - self.pp.CFD_DEM.PostCationConcentration = False + self.pp.CFD_DEM.AddEmptyValue("number_of_exponentials").SetInt(2) + self.pp.CFD_DEM.AddEmptyValue("number_of_quadrature_steps_in_window").SetInt( + int(self.pp.CFD_DEM["time_window"].GetDouble() / self.pp.CFD_DEM["delta_time_quadrature"].GetDouble())) self.pp.CFD_DEM.AddEmptyValue("do_impose_flow_from_field_option").SetBool(False) self.pp.CFD_DEM.AddEmptyValue("print_MATERIAL_ACCELERATION_option").SetBool(True) self.pp.CFD_DEM.AddEmptyValue("print_FLUID_ACCEL_FOLLOWING_PARTICLE_PROJECTED_option").SetBool(False) @@ -173,6 +173,8 @@ def SetBetaParameters(self): # These are input parameters that have not yet been self.pp.CFD_DEM.AddEmptyValue("print_PARTICLE_VEL_option").SetBool(False) self.pp.CFD_DEM.AddEmptyValue("apply_time_filter_to_fluid_fraction_option").SetBool(False) self.pp.CFD_DEM.print_DISPERSE_FRACTION_option = False + self.pp.CFD_DEM.print_steps_per_plot_step = 1 + self.pp.CFD_DEM.PostCationConcentration = False # Making the fluid step an exact multiple of the DEM step self.pp.Dt = int(self.pp.Dt / self.pp.CFD_DEM["MaxTimeStep"].GetDouble()) * self.pp.CFD_DEM["MaxTimeStep"].GetDouble() self.pp.viscosity_modification_type = 0.0 @@ -469,10 +471,12 @@ def SetEmbeddedTools(self): self.calculate_distance_process = CalculateSignedDistanceTo3DSkinProcess(self.disperse_phase_algorithm.rigid_face_model_part, self.fluid_model_part) self.calculate_distance_process.Execute() + def TheSimulationMustGoON(self): + return self.time <= self.final_time def RunMainTemporalLoop(self): - while self.time <= self.final_time: + while self.TheSimulationMustGoON(): self.time = self.time + self.Dt self.step += 1 @@ -536,6 +540,14 @@ def RunMainTemporalLoop(self): sys.stdout.flush() first_dem_iter = True + interaction_start_time = self.pp.CFD_DEM["interaction_start_time"].GetDouble() + coupling_level_type = self.pp.CFD_DEM["coupling_level_type"].GetInt() + project_at_every_substep_option = self.pp.CFD_DEM["project_at_every_substep_option"].GetBool() + coupling_scheme_type = self.pp.CFD_DEM["coupling_scheme_type"].GetString() + integration_scheme = self.pp.CFD_DEM["IntegrationScheme"].GetString() + basset_force_type = self.pp.CFD_DEM["basset_force_type"].GetInt() + dem_inlet_option = self.pp.CFD_DEM["dem_inlet_option"].GetBool() + for self.time_dem in self.yield_DEM_time(self.time_dem, time_final_DEM_substepping, self.Dt_DEM): self.DEM_step += 1 # this variable is necessary to get a good random insertion of particles self.disperse_phase_algorithm.spheres_model_part.ProcessInfo[TIME_STEPS] = self.DEM_step @@ -544,19 +556,19 @@ def RunMainTemporalLoop(self): self.PerformInitialDEMStepOperations(self.time_dem) - if self.time >= self.pp.CFD_DEM["interaction_start_time"].GetDouble() and self.pp.CFD_DEM["coupling_level_type"].GetInt() and (self.pp.CFD_DEM["project_at_every_substep_option"].GetBool() or first_dem_iter): + if self.time >= interaction_start_time and coupling_level_type and (project_at_every_substep_option or first_dem_iter): - if self.pp.CFD_DEM["coupling_scheme_type"].GetString() == "UpdatedDEM": + if coupling_scheme_type == "UpdatedDEM": self.ApplyForwardCoupling() else: self.ApplyForwardCoupling((time_final_DEM_substepping - self.time_dem) / self.Dt) - if self.pp.CFD_DEM["IntegrationScheme"].GetString() in {'Hybrid_Bashforth', 'TerminalVelocityScheme'}: + if integration_scheme in {'Hybrid_Bashforth', 'TerminalVelocityScheme'}: self.DEMSolve(self.time_dem) self.ApplyForwardCouplingOfVelocityOnly(self.time_dem) else: - if self.pp.CFD_DEM["basset_force_type"].GetInt() > 0: + if basset_force_type > 0: node.SetSolutionStepValue(SLIP_VELOCITY_X, vx) node.SetSolutionStepValue(SLIP_VELOCITY_Y, vy) @@ -577,12 +589,12 @@ def RunMainTemporalLoop(self): #### TIME CONTROL ################################## # adding DEM elements by the inlet: - if self.pp.CFD_DEM["dem_inlet_option"].GetBool(): + if dem_inlet_option: self.disperse_phase_algorithm.DEM_inlet.CreateElementsFromInletMesh(self.disperse_phase_algorithm.spheres_model_part, self.disperse_phase_algorithm.cluster_model_part, self.disperse_phase_algorithm.creator_destructor) # After solving, to make sure that neighbours are already set. - if self.output_time <= self.out and self.pp.CFD_DEM["coupling_scheme_type"].GetString() == "UpdatedFluid": + if self.output_time <= self.out and coupling_scheme_type == "UpdatedFluid": - if self.pp.CFD_DEM["coupling_level_type"].GetInt(): + if coupling_level_type: self.projection_module.ComputePostProcessResults(self.disperse_phase_algorithm.spheres_model_part.ProcessInfo) self.post_utils.Writeresults(self.time_dem) @@ -593,7 +605,7 @@ def RunMainTemporalLoop(self): # applying DEM-to-fluid coupling - if self.DEM_to_fluid_counter.Tick() and self.time >= self.pp.CFD_DEM["interaction_start_time"].GetDouble(): + if self.DEM_to_fluid_counter.Tick() and self.time >= interaction_start_time: self.projection_module.ProjectFromParticles() #### PRINTING GRAPHS #### @@ -616,7 +628,7 @@ def RunMainTemporalLoop(self): self.PrintDrag(self.drag_list, self.drag_file_output_list, self.fluid_model_part, self.time) - + def GetFirstStepForFluidComputation(self): return 3; @@ -703,7 +715,7 @@ def GetRecoveryCounter(self): return SDP.Counter(1, 1, self.pp.CFD_DEM["coupling_level_type"].GetInt() or self.pp.CFD_DEM["print_PRESSURE_GRADIENT_option"].GetBool()) def GetStationarityCounter(self): - return SDP.Counter(self.pp.CFD_DEM.time_steps_per_stationarity_step, 1, self.pp.CFD_DEM.stationary_problem_option) + return SDP.Counter(self.pp.CFD_DEM.time_steps_per_stationarity_step, 1, self.pp.CFD_DEM["stationary_problem_option"].GetBool()) def GetPrintCounter(self): return SDP.Counter(1, 1, 10) # still unused @@ -730,7 +742,7 @@ def FillHistoryForcePrecalculatedVectors(self): if self.pp.CFD_DEM["basset_force_type"].GetInt() > 0: self.basset_force_tool.FillDaitcheVectors(N_steps, self.pp.CFD_DEM["quadrature_order"].GetInt(), self.pp.CFD_DEM["time_steps_per_quadrature_step"].GetInt()) if self.pp.CFD_DEM["basset_force_type"].GetInt() >= 3 or self.pp.CFD_DEM["basset_force_type"].GetInt() == 1: - self.basset_force_tool.FillHinsbergVectors(spheres_model_part, self.pp.CFD_DEM.number_of_exponentials, self.pp.CFD_DEM.number_of_quadrature_steps_in_window) + self.basset_force_tool.FillHinsbergVectors(spheres_model_part, self.pp.CFD_DEM["number_of_exponentials"].GetInt(), self.pp.CFD_DEM["number_of_quadrature_steps_in_window"].GetInt()) def AppendValuesForTheHistoryForce(self): spheres_model_part = self.all_model_parts.Get('SpheresPart') diff --git a/applications/swimming_DEM_application/python_scripts/swimming_DEM_procedures.py b/applications/swimming_DEM_application/python_scripts/swimming_DEM_procedures.py index 45b2b7ee42fc..2559ba501031 100644 --- a/applications/swimming_DEM_application/python_scripts/swimming_DEM_procedures.py +++ b/applications/swimming_DEM_application/python_scripts/swimming_DEM_procedures.py @@ -65,8 +65,11 @@ def SetModelPartSolutionStepValue(model_part, var, value): node.SetSolutionStepValue(var, 0, value) def InitializeVariablesWithNonZeroValues(fluid_model_part, balls_model_part, pp): - if pp.CFD_DEM["coupling_level_type"].GetInt(): + checker = VariableChecker() + + if checker.ModelPartHasNodalVariableOrNot(fluid_model_part, FLUID_FRACTION): SetModelPartSolutionStepValue(fluid_model_part, FLUID_FRACTION, 1.0) + if checker.ModelPartHasNodalVariableOrNot(balls_model_part, FLUID_FRACTION_PROJECTED): SetModelPartSolutionStepValue(balls_model_part, FLUID_FRACTION_PROJECTED, 1.0) def FixModelPart(model_part): @@ -338,7 +341,11 @@ def UpdateDataAndPrint(self, domain_volume, is_time_to_print = True): class Counter: - def __init__(self, steps_in_cycle = 1, beginning_step = 1, is_active = True, is_dead = False): + def __init__(self, + steps_in_cycle = 1, + beginning_step = 1, + is_active = True, + is_dead = False): if steps_in_cycle <= 0 or not isinstance(steps_in_cycle , int): raise ValueError("Error: The input steps_in_cycle must be a strictly positive integer") diff --git a/applications/swimming_DEM_application/python_scripts/t_junction/__init__.py b/applications/swimming_DEM_application/python_scripts/t_junction/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/applications/swimming_DEM_application/python_scripts/t_junction/run_t_junction_algorithm.py b/applications/swimming_DEM_application/python_scripts/t_junction/run_t_junction_algorithm.py new file mode 100644 index 000000000000..88e1b5734aa9 --- /dev/null +++ b/applications/swimming_DEM_application/python_scripts/t_junction/run_t_junction_algorithm.py @@ -0,0 +1,38 @@ +import os +import sys +sys.path.append(os.getcwd()) +from KratosMultiphysics import * +import KratosSwimmingDEM as script +import sys +import ProjectParameters as pp +import DEM_explicit_solver_var as DEM_parameters +import json +varying_parameters = dict() +combinations_that_failed = [] +errors = [] +varying_parameters["fluid_already_calculated"] = False + +parameters = Parameters(json.dumps(varying_parameters)) + +import pre_calculated_fluid_algorithm +with pre_calculated_fluid_algorithm.Algorithm(parameters) as algorithm: + try: + test = script.Solution(algorithm, parameters) + test.alg.Run() + except: + error = sys.exc_info() + errors.append(error) + combinations_that_failed.append('Combination: fluid_already_calculated = False') + +print() +print('****************************************') + +if len(combinations_that_failed): + print('The following combinations produced an error:') + print() + for combination, error in zip(combinations_that_failed, errors): + print(combination) + print(error) +else: + print('All combinations run without errors') +print('****************************************') diff --git a/applications/swimming_DEM_application/python_scripts/turbulent_cube/__init__.py b/applications/swimming_DEM_application/python_scripts/turbulent_cube/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/applications/swimming_DEM_application/python_scripts/variables_management.py b/applications/swimming_DEM_application/python_scripts/variables_management.py index 811bee7efc46..d3a868590f69 100644 --- a/applications/swimming_DEM_application/python_scripts/variables_management.py +++ b/applications/swimming_DEM_application/python_scripts/variables_management.py @@ -24,7 +24,6 @@ def AddingExtraProcessInfoVariables(pp, fluid_model_part, dem_model_part): #DEPR # Note that additional variables may be added as well by the fluid and/or DEM strategies. def AddExtraProcessInfoVariablesToFluidModelPart(pp, fluid_model_part): - fluid_model_part.ProcessInfo.SetValue(FRACTIONAL_STEP, 1) gravity = Vector(3) if pp.CFD_DEM["body_force_on_fluid_option"].GetBool(): @@ -88,10 +87,11 @@ def ConstructListsOfVariables(pp): pp.fluid_vars += [TORQUE] pp.fluid_vars += pp.fluid_printing_vars pp.fluid_vars += pp.coupling_fluid_vars - pp.fluid_vars += [PRESSURE_GRADIENT] - pp.fluid_vars += [RECOVERED_PRESSURE_GRADIENT] - if pp.CFD_DEM["gradient_calculation_type"].GetInt(): + if pp.CFD_DEM["pressure_grad_recovery_type"].GetInt() > 0: + pp.fluid_vars += [RECOVERED_PRESSURE_GRADIENT] + + if pp.CFD_DEM["gradient_calculation_type"].GetInt() > 1 or pp.CFD_DEM["pressure_grad_recovery_type"].GetInt() > 1 or pp.CFD_DEM["material_acceleration_calculation_type"].GetInt() == 7: pp.fluid_vars += [NODAL_WEIGHTS] if pp.CFD_DEM["material_acceleration_calculation_type"].GetInt(): @@ -301,15 +301,12 @@ def ConstructListsOfVariablesForCoupling(pp): pp.coupling_fluid_vars = [] pp.coupling_fluid_vars += [MATERIAL_ACCELERATION] - if pp.CFD_DEM["embedded_option"].GetBool(): - pp.coupling_fluid_vars += [DISTANCE] - pp.coupling_fluid_vars += [BODY_FORCE] if pp.CFD_DEM["fluid_model_type"].GetInt() == 0: pp.coupling_fluid_vars += [AVERAGED_FLUID_VELOCITY] - if pp.CFD_DEM["fluid_model_type"].GetInt() == 0 or pp.CFD_DEM["coupling_level_type"].GetInt() >= 1 or pp.CFD_DEM["drag_force_type"].GetInt() == 4: + if pp.CFD_DEM["fluid_model_type"].GetInt() == 0 or pp.CFD_DEM["coupling_level_type"].GetInt() > 1 or pp.CFD_DEM["drag_force_type"].GetInt() == 4: pp.coupling_fluid_vars += [FLUID_FRACTION] if pp.CFD_DEM["print_DISPERSE_FRACTION_option"].GetBool(): @@ -320,7 +317,7 @@ def ConstructListsOfVariablesForCoupling(pp): pp.coupling_fluid_vars += [TIME_AVERAGED_ARRAY_3] pp.coupling_fluid_vars += [PHASE_FRACTION] - if pp.CFD_DEM["fluid_model_type"].GetInt() >= 1: + if pp.CFD_DEM["fluid_model_type"].GetInt() > 1: pp.coupling_fluid_vars += [FLUID_FRACTION_GRADIENT] pp.coupling_fluid_vars += [FLUID_FRACTION_RATE] @@ -330,12 +327,14 @@ def ConstructListsOfVariablesForCoupling(pp): if pp.CFD_DEM["coupling_level_type"].GetInt() >= 1 and pp.CFD_DEM["time_averaging_type"].GetInt() > 0: pp.coupling_fluid_vars += [MEAN_HYDRODYNAMIC_REACTION] - if pp.CFD_DEM["drag_force_type"].GetInt() >= 2: + if pp.CFD_DEM["drag_force_type"].GetInt() == 2 or pp.CFD_DEM["lift_force_type"].GetInt() == 1: pp.coupling_fluid_vars += [POWER_LAW_N] pp.coupling_fluid_vars += [POWER_LAW_K] - pp.coupling_fluid_vars += [GEL_STRENGTH] pp.coupling_fluid_vars += [YIELD_STRESS] + if pp.CFD_DEM["drag_force_type"].GetInt() == 2: + pp.coupling_fluid_vars += [GEL_STRENGTH] + if pp.viscosity_modification_type: pp.coupling_fluid_vars += [VISCOSITY] @@ -345,7 +344,6 @@ def ConstructListsOfVariablesForCoupling(pp): if pp.CFD_DEM["coupling_level_type"].GetInt() > 0: pp.coupling_dem_vars += [FLUID_VEL_PROJECTED] pp.coupling_dem_vars += [FLUID_DENSITY_PROJECTED] - pp.coupling_dem_vars += [PRESSURE_GRAD_PROJECTED] pp.coupling_dem_vars += [FLUID_VISCOSITY_PROJECTED] pp.coupling_dem_vars += [HYDRODYNAMIC_FORCE] pp.coupling_dem_vars += [HYDRODYNAMIC_MOMENT] @@ -354,6 +352,9 @@ def ConstructListsOfVariablesForCoupling(pp): pp.coupling_dem_vars += [FLUID_ACCEL_FOLLOWING_PARTICLE_PROJECTED] pp.coupling_dem_vars += [ADDITIONAL_FORCE] # Here for safety for the moment + if pp.CFD_DEM["buoyancy_force_type"].GetInt() != 2 and pp.CFD_DEM["drag_force_type"].GetInt() != 2: + pp.coupling_dem_vars += [PRESSURE_GRAD_PROJECTED] + if pp.CFD_DEM["include_faxen_terms_option"].GetBool(): pp.coupling_dem_vars += [FLUID_VEL_LAPL_PROJECTED] pp.coupling_dem_vars += [FLUID_VEL_LAPL_RATE_PROJECTED] @@ -377,12 +378,6 @@ def ConstructListsOfVariablesForCoupling(pp): if pp.CFD_DEM["embedded_option"].GetBool(): pp.coupling_dem_vars += [DISTANCE] - if pp.CFD_DEM["drag_force_type"].GetInt() >= 2: - pp.coupling_dem_vars += [POWER_LAW_N] - pp.coupling_dem_vars += [POWER_LAW_K] - #pp.coupling_dem_vars += [GEL_STRENGTH] - pp.coupling_dem_vars += [YIELD_STRESS] - if pp.CFD_DEM["print_REYNOLDS_NUMBER_option"].GetBool(): pp.coupling_dem_vars += [REYNOLDS_NUMBER] @@ -394,7 +389,7 @@ def ConstructListsOfVariablesForCoupling(pp): def ChangeListOfFluidNodalResultsToPrint(pp): - pp.nodal_results += ["TORQUE"] + if pp.CFD_DEM["store_full_gradient_option"].GetBool() and pp.CFD_DEM["print_VELOCITY_GRADIENT_option"].GetBool(): pp.nodal_results += ["VELOCITY_X_GRADIENT"] pp.nodal_results += ["VELOCITY_Y_GRADIENT"] diff --git a/kratos/geometries/geometry.h b/kratos/geometries/geometry.h index 1f4c8a0d16d4..655551a2d96a 100644 --- a/kratos/geometries/geometry.h +++ b/kratos/geometries/geometry.h @@ -390,26 +390,26 @@ class Geometry : public PointerVector *i = typename PointType::Pointer( new PointType( **i ) ); } - virtual boost::shared_ptr< Geometry< Point<3> > > Clone() const - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // virtual boost::shared_ptr< Geometry< Point > > Clone() const + // { + // Geometry< Point >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) + // //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); - } + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point >((*this)[i])); + // } - //NewPoints[i] = typename Point<3>::Pointer(new Point<3>(*mPoints[i])); + // //NewPoints[i] = typename Point::Pointer(new Point(*mPoints[i])); - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Geometry< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point >::Pointer p_clone( new Geometry< Point >( NewPoints ) ); - p_clone->ClonePoints(); + // p_clone->ClonePoints(); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix virtual Vector& LumpingFactors( Vector& rResult ) const @@ -617,7 +617,7 @@ class Geometry : public PointerVector * @param rHighPoint Higher point of the box to test the intersection * @return True if the geometry intersects the box, False in any other case. */ - virtual bool HasIntersection(const Point<3, double>& rLowPoint, const Point<3, double>& rHighPoint) { + virtual bool HasIntersection(const Point& rLowPoint, const Point& rHighPoint) { KRATOS_ERROR << "Calling base class 'HasIntersection' method instead of derived class one. Please check the definition of derived class. " << *this << std::endl; return false; } @@ -662,7 +662,7 @@ class Geometry : public PointerVector @return PointType which is the calculated center of this geometry. */ - virtual Point<3> Center() const + virtual Point Center() const { const SizeType points_number = this->size(); @@ -672,7 +672,7 @@ class Geometry : public PointerVector // return PointType(); } - Point<3> result = ( *this )[0]; + Point result = ( *this )[0]; for ( IndexType i = 1 ; i < points_number ; i++ ) { diff --git a/kratos/geometries/hexahedra_3d_20.h b/kratos/geometries/hexahedra_3d_20.h index f4647168eabd..d7bf4a3deb49 100644 --- a/kratos/geometries/hexahedra_3d_20.h +++ b/kratos/geometries/hexahedra_3d_20.h @@ -342,22 +342,22 @@ template class Hexahedra3D20 : public Geometry } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Hexahedra3D20< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Hexahedra3D20< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** diff --git a/kratos/geometries/hexahedra_3d_27.h b/kratos/geometries/hexahedra_3d_27.h index 4db782d51d1d..35ddf8b7757d 100644 --- a/kratos/geometries/hexahedra_3d_27.h +++ b/kratos/geometries/hexahedra_3d_27.h @@ -362,21 +362,21 @@ template class Hexahedra3D27 : public Geometry return typename BaseType::Pointer( new Hexahedra3D27( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Hexahedra3D27< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Hexahedra3D27< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix diff --git a/kratos/geometries/hexahedra_3d_8.h b/kratos/geometries/hexahedra_3d_8.h index 535d037d003e..9e77d53ffc27 100644 --- a/kratos/geometries/hexahedra_3d_8.h +++ b/kratos/geometries/hexahedra_3d_8.h @@ -304,21 +304,21 @@ template class Hexahedra3D8 : public Geometry return typename BaseType::Pointer( new Hexahedra3D8( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Hexahedra3D8< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Hexahedra3D8< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors( Vector& rResult ) const override diff --git a/kratos/geometries/hexahedra_interface_3d_8.h b/kratos/geometries/hexahedra_interface_3d_8.h index cfb029d18f44..8312c2336d81 100644 --- a/kratos/geometries/hexahedra_interface_3d_8.h +++ b/kratos/geometries/hexahedra_interface_3d_8.h @@ -479,21 +479,21 @@ template class HexahedraInterface3D8 : public Geometry >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new HexahedraInterface3D8< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new HexahedraInterface3D8< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors( Vector& rResult ) const override diff --git a/kratos/geometries/line_2d.h b/kratos/geometries/line_2d.h index 7ecc774ba4b1..df84af7238fe 100644 --- a/kratos/geometries/line_2d.h +++ b/kratos/geometries/line_2d.h @@ -260,21 +260,21 @@ class Line2D : public Geometry return typename BaseType::Pointer(new Line2D(ThisPoints)); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Line2D< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Line2D< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors(Vector& rResult) const override @@ -873,30 +873,7 @@ inline std::ostream& operator << (std::ostream& rOStream, } ///@} -// template -// const typename Line2D::IntegrationPointsContainerType Line2D::msIntegrationPoints = { -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints() -// }; - - -// template -// const typename Line2D::ShapeFunctionsValuesContainerType -// Line2D::msShapeFunctionsValues = { -// Line2D::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_1), -// Line2D::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_2), -// Line2D::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_3) -// }; - - -//template -//const typename GeometryData::ShapeFunctionsLocalGradientsContainerType -//Line2D::msShapeFunctionsLocalGradients = { -// Line2D::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_1), -// Line2D::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_2), -// Line2D::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_3) -//}; + template const GeometryData Line2D::msGeometryData(2, diff --git a/kratos/geometries/line_2d_2.h b/kratos/geometries/line_2d_2.h index 3bdb175113ec..c653240688a7 100644 --- a/kratos/geometries/line_2d_2.h +++ b/kratos/geometries/line_2d_2.h @@ -266,21 +266,21 @@ class Line2D2 : public Geometry return typename BaseType::Pointer( new Line2D2( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Line2D2< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Line2D2< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors( Vector& rResult ) const override @@ -1152,30 +1152,6 @@ inline std::ostream& operator << ( std::ostream& rOStream, ///@} -// template -// const typename Line2D2::IntegrationPointsContainerType Line2D2::msIntegrationPoints = { -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints() -// }; - - -// template -// const typename Line2D2::ShapeFunctionsValuesContainerType -// Line2D2::msShapeFunctionsValues = { -// Line2D2::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_1), -// Line2D2::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_2), -// Line2D2::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_3) -// }; - - -//template -//const typename GeometryData::ShapeFunctionsLocalGradientsContainerType -//Line2D2::msShapeFunctionsLocalGradients = { -// Line2D2::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_1), -// Line2D2::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_2), -// Line2D2::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_3) -//}; template const GeometryData Line2D2::msGeometryData( 2, diff --git a/kratos/geometries/line_2d_3.h b/kratos/geometries/line_2d_3.h index 4aab764d923a..3e77c70d3f31 100644 --- a/kratos/geometries/line_2d_3.h +++ b/kratos/geometries/line_2d_3.h @@ -259,21 +259,21 @@ class Line2D3 : public Geometry return typename BaseType::Pointer( new Line2D3( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Line2D3< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Line2D3< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors( Vector& rResult ) const override @@ -1026,31 +1026,6 @@ inline std::ostream& operator << ( std::ostream& rOStream, ///@} -// template -// const typename Line2D3::IntegrationPointsContainerType Line2D3::msIntegrationPoints = { -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints() -// }; - - -// template -// const typename Line2D3::ShapeFunctionsValuesContainerType -// Line2D3::msShapeFunctionsValues = { -// Line2D3::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_1), -// Line2D3::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_2), -// Line2D3::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_3) -// }; - - -//template -//const typename GeometryData::ShapeFunctionsLocalGradientsContainerType -//Line2D3::msShapeFunctionsLocalGradients = { -// Line2D3::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_1), -// Line2D3::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_2), -// Line2D3::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_3) -//}; - template const GeometryData Line2D3::msGeometryData( 2, 2, diff --git a/kratos/geometries/line_3d_2.h b/kratos/geometries/line_3d_2.h index f0791e4b85c6..1735e75ee270 100644 --- a/kratos/geometries/line_3d_2.h +++ b/kratos/geometries/line_3d_2.h @@ -265,21 +265,21 @@ class Line3D2 : public Geometry return typename BaseType::Pointer( new Line3D2( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Line3D2< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Line3D2< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors( Vector& rResult ) const override diff --git a/kratos/geometries/line_3d_3.h b/kratos/geometries/line_3d_3.h index 40126f2194b1..c6a93472d49a 100644 --- a/kratos/geometries/line_3d_3.h +++ b/kratos/geometries/line_3d_3.h @@ -259,21 +259,21 @@ class Line3D3 : public Geometry return typename BaseType::Pointer( new Line3D3( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Line3D3< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Line3D3< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors( Vector& rResult ) const override @@ -1042,30 +1042,6 @@ inline std::ostream& operator << ( std::ostream& rOStream, ///@} -// template -// const typename Line3D3::IntegrationPointsContainerType Line3D3::msIntegrationPoints = { -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, 2, IntegrationPoint<3> >::GenerateIntegrationPoints() -// }; - - -// template -// const typename Line3D3::ShapeFunctionsValuesContainerType -// Line3D3::msShapeFunctionsValues = { -// Line3D3::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_1), -// Line3D3::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_2), -// Line3D3::CalculateShapeFunctionsIntegrationPointsValues(GeometryData::GI_GAUSS_3) -// }; - - -//template -//const typename GeometryData::ShapeFunctionsLocalGradientsContainerType -//Line3D3::msShapeFunctionsLocalGradients = { -// Line3D3::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_1), -// Line3D3::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_2), -// Line3D3::CalculateShapeFunctionsIntegrationPointsLocalGradients(GeometryData::GI_GAUSS_3) -//}; template const GeometryData Line3D3::msGeometryData( 3, diff --git a/kratos/geometries/line_gl_3d_2.h b/kratos/geometries/line_gauss_lobatto_3d_2.h similarity index 89% rename from kratos/geometries/line_gl_3d_2.h rename to kratos/geometries/line_gauss_lobatto_3d_2.h index 8d311b3c981f..4bcabdf991b6 100644 --- a/kratos/geometries/line_gl_3d_2.h +++ b/kratos/geometries/line_gauss_lobatto_3d_2.h @@ -7,15 +7,15 @@ // License: BSD License // Kratos default license: kratos/license.txt // -// Main authors: Riccardo Rossi +// Main authors: Josep Maria Carbonell +// +// contributors: Hoang Giang Bui +// Riccardo Rossi // Janosch Stascheit // Felix Nagel -// contributors: Hoang Giang Bui -// Josep Maria Carbonell -// - -#if !defined(KRATOS_LINE_GL_3D_2_H_INCLUDED ) -#define KRATOS_LINE_GL_3D_2_H_INCLUDED + +#if !defined(KRATOS_LINE_GAUSS_LOBATTO_3D_2_H_INCLUDED ) +#define KRATOS_LINE_GAUSS_LOBATTO_3D_2_H_INCLUDED // System includes @@ -52,7 +52,7 @@ namespace Kratos */ template -class LineGL3D2 : public Geometry +class LineGaussLobatto3D2 : public Geometry { public: @@ -63,8 +63,8 @@ class LineGL3D2 : public Geometry /// Geometry as base class. typedef Geometry BaseType; - /// Pointer definition of LineGL3D2 - KRATOS_CLASS_POINTER_DEFINITION( LineGL3D2 ); + /// Pointer definition of LineGaussLobatto3D2 + KRATOS_CLASS_POINTER_DEFINITION( LineGaussLobatto3D2 ); /** Integration methods implemented in geometry. */ @@ -151,21 +151,21 @@ class LineGL3D2 : public Geometry ///@name Life Cycle ///@{ -// LineGL3D2( const PointType& FirstPoint, const PointType& SecondPoint ) +// LineGaussLobatto3D2( const PointType& FirstPoint, const PointType& SecondPoint ) // : BaseType( PointsArrayType(), &msGeometryData ) // { // BaseType::Points().push_back( typename PointType::Pointer( new PointType( FirstPoint ) ) ); // BaseType::Points().push_back( typename PointType::Pointer( new PointType( SecondPoint ) ) ); // } - LineGL3D2( typename PointType::Pointer pFirstPoint, typename PointType::Pointer pSecondPoint ) + LineGaussLobatto3D2( typename PointType::Pointer pFirstPoint, typename PointType::Pointer pSecondPoint ) : BaseType( PointsArrayType(), &msGeometryData ) { BaseType::Points().push_back( pFirstPoint ); BaseType::Points().push_back( pSecondPoint ); } - LineGL3D2( const PointsArrayType& ThisPoints ) + LineGaussLobatto3D2( const PointsArrayType& ThisPoints ) : BaseType( ThisPoints, &msGeometryData ) { if ( BaseType::PointsNumber() != 2 ) @@ -180,7 +180,7 @@ class LineGL3D2 : public Geometry obvious that any change to this new geometry's point affect source geometry's points too. */ - LineGL3D2( LineGL3D2 const& rOther ) + LineGaussLobatto3D2( LineGaussLobatto3D2 const& rOther ) : BaseType( rOther ) { } @@ -197,13 +197,13 @@ class LineGL3D2 : public Geometry obvious that any change to this new geometry's point affect source geometry's points too. */ - template LineGL3D2( LineGL3D2 const& rOther ) + template LineGaussLobatto3D2( LineGaussLobatto3D2 const& rOther ) : BaseType( rOther ) { } /// Destructor. Do nothing!!! - ~LineGL3D2() override {} + ~LineGaussLobatto3D2() override {} GeometryData::KratosGeometryFamily GetGeometryFamily() const override { @@ -229,7 +229,7 @@ class LineGL3D2 : public Geometry @see Clone @see ClonePoints */ - LineGL3D2& operator=( const LineGL3D2& rOther ) + LineGaussLobatto3D2& operator=( const LineGaussLobatto3D2& rOther ) { BaseType::operator=( rOther ); @@ -247,7 +247,7 @@ class LineGL3D2 : public Geometry @see ClonePoints */ template - LineGL3D2& operator=( LineGL3D2 const & rOther ) + LineGaussLobatto3D2& operator=( LineGaussLobatto3D2 const & rOther ) { BaseType::operator=( rOther ); @@ -260,20 +260,20 @@ class LineGL3D2 : public Geometry typename BaseType::Pointer Create( PointsArrayType const& ThisPoints ) const override { - return typename BaseType::Pointer( new LineGL3D2( ThisPoints ) ); + return typename BaseType::Pointer( new LineGaussLobatto3D2( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override + Geometry< Point >::Pointer Clone() const { - Geometry< Point<3> >::PointsArrayType NewPoints; + Geometry< Point >::PointsArrayType NewPoints; //making a copy of the nodes TO POINTS (not Nodes!!!) for ( IndexType i = 0 ; i < BaseType::Points().size() ; i++ ) - NewPoints.push_back(boost::make_shared< Point<3> >((*this)[i])); + NewPoints.push_back(boost::make_shared< Point >((*this)[i])); //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new LineGL3D2< Point<3> >( NewPoints ) ); + Geometry< Point >::Pointer p_clone( new LineGaussLobatto3D2< Point >( NewPoints ) ); p_clone->ClonePoints(); @@ -769,7 +769,7 @@ class LineGL3D2 : public Geometry KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, BaseType ); } - LineGL3D2(): BaseType( PointsArrayType(), &msGeometryData ) {} + LineGaussLobatto3D2(): BaseType( PointsArrayType(), &msGeometryData ) {} ///@} @@ -832,11 +832,11 @@ class LineGL3D2 : public Geometry static const ShapeFunctionsValuesContainerType AllShapeFunctionsValues() { ShapeFunctionsValuesContainerType shape_functions_values = {{ - LineGL3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_1 ), - LineGL3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_2 ), - LineGL3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_3 ), - LineGL3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_4 ), - LineGL3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_5 ) + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_1 ), + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_2 ), + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_3 ), + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_4 ), + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsValues( GeometryData::GI_GAUSS_5 ) } }; return shape_functions_values; @@ -845,11 +845,11 @@ class LineGL3D2 : public Geometry static const ShapeFunctionsLocalGradientsContainerType AllShapeFunctionsLocalGradients() { ShapeFunctionsLocalGradientsContainerType shape_functions_local_gradients = {{ - LineGL3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_1 ), - LineGL3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_2 ), - LineGL3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_3 ), - LineGL3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_4 ), - LineGL3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_5 ), + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_1 ), + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_2 ), + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_3 ), + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_4 ), + LineGaussLobatto3D2::CalculateShapeFunctionsIntegrationPointsLocalGradients( GeometryData::GI_GAUSS_5 ), } }; @@ -870,7 +870,7 @@ class LineGL3D2 : public Geometry ///@name Private Friends ///@{ - template friend class LineGL3D2; + template friend class LineGaussLobatto3D2; ///@} ///@name Un accessible methods @@ -894,12 +894,12 @@ class LineGL3D2 : public Geometry /// input stream function template inline std::istream& operator >> ( std::istream& rIStream, - LineGL3D2& rThis ); + LineGaussLobatto3D2& rThis ); /// output stream function template inline std::ostream& operator << ( std::ostream& rOStream, - const LineGL3D2& rThis ) + const LineGaussLobatto3D2& rThis ) { rThis.PrintInfo( rOStream ); rOStream << std::endl; @@ -912,12 +912,12 @@ inline std::ostream& operator << ( std::ostream& rOStream, template -const GeometryData LineGL3D2::msGeometryData( 3, +const GeometryData LineGaussLobatto3D2::msGeometryData( 3, 3, 1, GeometryData::GI_GAUSS_1, - LineGL3D2::AllIntegrationPoints(), - LineGL3D2::AllShapeFunctionsValues(), + LineGaussLobatto3D2::AllIntegrationPoints(), + LineGaussLobatto3D2::AllShapeFunctionsValues(), AllShapeFunctionsLocalGradients() ); } // namespace Kratos. diff --git a/kratos/geometries/nurbs_2d.h b/kratos/geometries/nurbs_2d.h index a251e303ddb1..5ad39680fe01 100644 --- a/kratos/geometries/nurbs_2d.h +++ b/kratos/geometries/nurbs_2d.h @@ -425,9 +425,9 @@ template class NurbsPatchGeometry2D //modified by Matthias - typename BaseType::Pointer Create( PointerVector< Point<3> > ,Vector const &weights, Vector const& KnotsXi, Vector const& KnotsEta ) const + typename BaseType::Pointer Create( PointerVector< Point > ,Vector const &weights, Vector const& KnotsXi, Vector const& KnotsEta ) const { - return typename BaseType::Pointer( new NurbsPatchGeometry2D(PointerVector< Point<3> >(),KnotsXi, KnotsEta) ); + return typename BaseType::Pointer( new NurbsPatchGeometry2D(PointerVector< Point >(),KnotsXi, KnotsEta) ); } diff --git a/kratos/geometries/nurbs_3d.h b/kratos/geometries/nurbs_3d.h index 93f82d7de928..1b7e14f468c0 100644 --- a/kratos/geometries/nurbs_3d.h +++ b/kratos/geometries/nurbs_3d.h @@ -433,9 +433,9 @@ template class NurbsPatchGeometry3D //modified by Matthias - typename BaseType::Pointer Create( PointerVector< Point<3> > ,Vector const &weights, Vector const& KnotsXi, Vector const& KnotsEta ) const + typename BaseType::Pointer Create( PointerVector< Point > ,Vector const &weights, Vector const& KnotsXi, Vector const& KnotsEta ) const { - return typename BaseType::Pointer( new NurbsPatchGeometry3D(PointerVector< Point<3> >(),KnotsXi, KnotsEta) ); + return typename BaseType::Pointer( new NurbsPatchGeometry3D(PointerVector< Point >(),KnotsXi, KnotsEta) ); } diff --git a/kratos/geometries/point.h b/kratos/geometries/point.h index 0e40595bcda5..d10215c21cbc 100644 --- a/kratos/geometries/point.h +++ b/kratos/geometries/point.h @@ -14,9 +14,8 @@ // Josep Maria Carbonell // -#if !defined(KRATOS_POINT_H_INCLUDED ) -#define KRATOS_POINT_H_INCLUDED - +#if !defined(KRATOS_POINT_H_INCLUDED) +#define KRATOS_POINT_H_INCLUDED // System includes #include @@ -32,7 +31,6 @@ #include "includes/serializer.h" #include "includes/kratos_components.h" - namespace Kratos { @@ -57,29 +55,28 @@ namespace Kratos /// Point class. /** Point class. Stores coordinates of a point and have some basic - operations defined. Point class has two template parameter: - - - TDimension which define the dimension of the point. TDataType - - which specifies the point coordinate value type. This type by - default is double. + operations defined. @see Geometry @see Node @see IntegrationPoint */ -template -class Point : public array_1d +class Point : public array_1d { + static constexpr int mDimension = 3; + public: + ///@name Constants + ///@{ + + ///@} ///@name Type Definitions ///@{ /// Pointer definition of Point KRATOS_CLASS_POINTER_DEFINITION(Point); - typedef array_1d BaseType; - - typedef Point Type; + typedef array_1d BaseType; typedef BaseType CoordinatesArrayType; @@ -87,239 +84,147 @@ class Point : public array_1d typedef typename std::size_t IndexType; - ///@} - ///@name Constants - ///@{ - ///@} ///@name Life Cycle ///@{ /// Default constructor. - Point() : BaseType(TDimension) + Point() : BaseType(mDimension) { - KRATOS_TRY_LEVEL_4 SetAllCoordinates(); - KRATOS_CATCH_LEVEL_4(*this) - } - - /// 1d constructor. - Point(TDataType const& NewX) : BaseType(TDimension) - { - KRATOS_TRY_LEVEL_4 - SetAllCoordinates(); - this->operator()(0) = NewX; - KRATOS_CATCH_LEVEL_4(*this) - } - - /// 2d constructor. - Point(TDataType const& NewX, TDataType const& NewY) : BaseType(TDimension) - { - KRATOS_TRY_LEVEL_4 - SetAllCoordinates(); - this->operator()(0) = NewX; - this->operator()(1) = NewY; - KRATOS_CATCH_LEVEL_4(*this) } /// 3d constructor. - Point(TDataType const& NewX, TDataType const& NewY, TDataType const& NewZ) : BaseType(TDimension) + Point(double NewX, double NewY = 0, double NewZ = 0) : BaseType(mDimension) { - KRATOS_TRY_LEVEL_4 - SetAllCoordinates(); this->operator()(0) = NewX; this->operator()(1) = NewY; this->operator()(2) = NewZ; - KRATOS_CATCH_LEVEL_4(*this) } /** Copy constructor. Initialize this point with the coordinates of given point.*/ - Point(Point const& rOtherPoint) + Point(Point const &rOtherPoint) : BaseType(rOtherPoint) {} - /** Copy constructor from a point with different dimension. Initialize this point with the coordinates - of given point.*/ - template - Point(Point const& rOtherPoint) : BaseType(TDimension) - { - KRATOS_TRY_LEVEL_4 - IndexType size = (TDimension < TOtherDimension) ? TDimension : TOtherDimension; - IndexType i; - - for(i = 0 ; i < size ; i++) - this->operator[](i)=rOtherPoint[i]; - - for(i = size ; i < TDimension ; i++) - this->operator[](i)= TDataType(); - - KRATOS_CATCH_LEVEL_4(*this) - } - /** Constructor using coordinates stored in given array. Initialize this point with the coordinates in the array. */ - Point(CoordinatesArrayType const& rOtherCoordinates) + Point(CoordinatesArrayType const &rOtherCoordinates) : BaseType(rOtherCoordinates) {} /** Constructor using coordinates stored in given array. Initialize this point with the coordinates in the array. */ - template - Point(vector_expression const& rOtherCoordinates) + template + Point(vector_expression const &rOtherCoordinates) : BaseType(rOtherCoordinates) {} /** Constructor using coordinates stored in given std::vector. Initialize this point with the coordinates in the array. */ - Point(std::vector const& rOtherCoordinates) : BaseType(TDimension) + Point(std::vector const &rOtherCoordinates) : BaseType(mDimension) { - KRATOS_TRY_LEVEL_4 SizeType size = rOtherCoordinates.size(); - size = (TDimension < size) ? TDimension : size; - for(IndexType i = 0 ; i < size ; i++) - this->operator[](i)=rOtherCoordinates[i]; - KRATOS_CATCH_LEVEL_4(*this) + size = (mDimension < size) ? mDimension : size; + for (IndexType i = 0; i < size; i++) + this->operator[](i) = rOtherCoordinates[i]; } /// Destructor. virtual ~Point() {} - ///@} ///@name Operators ///@{ /// Assignment operator. - Point& operator=(const Point& rOther) + Point &operator=(const Point &rOther) { CoordinatesArrayType::operator=(rOther); return *this; } - bool operator==(const Point& rOther) + bool operator==(const Point &rOther) { return std::equal(this->begin(), this->end(), rOther.begin()); } - /// Assignment operator. - template - Point& operator=(const Point& rOther) - { - KRATOS_TRY_LEVEL_4 - IndexType size = (TDimension < TOtherDimension) ? TDimension : TOtherDimension; - IndexType i; - - for(i = 0 ; i < size ; i++) - this->operator[](i)=rOther[i]; - - for(i = size ; i < TDimension ; i++) - this->operator[](i)= TDataType(); - - return *this; - - KRATOS_CATCH_LEVEL_4(*this) - } - - ///@} ///@name Operations ///@{ - ///@} ///@name Access ///@{ - static IndexType Dimension() + static constexpr IndexType Dimension() { - return TDimension; + return 3; } /** Returns X coordinate */ - TDataType X() const + double X() const { - KRATOS_TRY_LEVEL_4 return this->operator[](0); - KRATOS_CATCH_LEVEL_4(*this) } /** Returns Y coordinate */ - TDataType Y() const + double Y() const { - KRATOS_TRY_LEVEL_4 return this->operator[](1); - KRATOS_CATCH_LEVEL_4(*this) } /** Returns Z coordinate */ - TDataType Z() const + double Z() const { - KRATOS_TRY_LEVEL_4 return this->operator[](2); - KRATOS_CATCH_LEVEL_4(*this) } - TDataType& X() + double &X() { - KRATOS_TRY_LEVEL_4 return this->operator[](0); - KRATOS_CATCH_LEVEL_4(*this) } /** Returns Y coordinate */ - TDataType& Y() + double &Y() { - KRATOS_TRY_LEVEL_4 return this->operator[](1); - KRATOS_CATCH_LEVEL_4(*this) } /** Returns Z coordinate */ - TDataType& Z() + double &Z() { - KRATOS_TRY_LEVEL_4 return this->operator[](2); - KRATOS_CATCH_LEVEL_4(*this) } - - /** This is an access method to point's coordinate by indices. For example this function return x, y and z coordinate whith 1, 2 and 3 as input respectively. */ - TDataType Coordinate(IndexType CoordinateIndex) const + double Coordinate(IndexType CoordinateIndex) const { - KRATOS_TRY_LEVEL_4 + KRATOS_DEBUG_ERROR_IF((CoordinateIndex > 3)||(CoordinateIndex == 0)) << "Coordinate index = " << CoordinateIndex << " is out of range [1..3]"; return this->operator[](CoordinateIndex - 1); - KRATOS_CATCH_LEVEL_4(*this) } /** This is an access method to get a reference to point's coordinate by indices. For example this function return references to x, y and z coordinate whith 1, 2 and 3 as input respectively. */ - TDataType& Coordinate(IndexType CoordinateIndex) + double &Coordinate(IndexType CoordinateIndex) { - KRATOS_TRY_LEVEL_4 + KRATOS_DEBUG_ERROR_IF((CoordinateIndex > 3)||(CoordinateIndex == 0)) << "Coordinate index = " << CoordinateIndex << " is out of range [1..3]"; return this->operator[](CoordinateIndex - 1); - KRATOS_CATCH_LEVEL_4(*this) } - CoordinatesArrayType const& Coordinates() const + CoordinatesArrayType const &Coordinates() const { return *this; } - CoordinatesArrayType& Coordinates() + CoordinatesArrayType &Coordinates() { return *this; } - - ///@} - ///@name Inquiry - ///@{ - - ///@} ///@name Input and output ///@{ @@ -327,100 +232,34 @@ class Point : public array_1d /// Turn back information as a string. virtual std::string Info() const { - std::stringstream buffer; - buffer << TDimension << " dimensional point"; - return buffer.str(); + return "Point"; } /// Print information about this object. - virtual void PrintInfo(std::ostream& rOStream) const + virtual void PrintInfo(std::ostream &rOStream) const { - rOStream << TDimension << " dimensional point"; + rOStream << this->Info(); } /// Print object's data. - virtual void PrintData(std::ostream& rOStream) const + virtual void PrintData(std::ostream &rOStream) const { - if(!TDimension) - return; - - rOStream << "(" << this->operator[](0); - - for(IndexType i = 1 ; i < TDimension ; i++) - rOStream << " , " << this->operator[](i); - rOStream << ")"; + rOStream << "(" << this->operator[](0) + << this->operator[](1) + << this->operator[](2) + << ")"; } - - ///@} - ///@name Friends - ///@{ - - ///@} -protected: - ///@name Protected static Member Variables - ///@{ - - - ///@} - ///@name Protected member Variables - ///@{ - - - ///@} - ///@name Protected Operators - ///@{ - - - ///@} - ///@name Protected Operations - ///@{ - - - ///@} - ///@name Protected Access - ///@{ - - - ///@} - ///@name Protected Inquiry - ///@{ - - - ///@} - ///@name Protected LifeCycle - ///@{ - - - ///@} - -private: - ///@name Static Member Variables - ///@{ - - - ///@} - ///@name Member Variables - ///@{ - - - ///@} - ///@name Private Operators - ///@{ - - - ///@} + private: ///@name Private Operations ///@{ - void SetAllCoordinates(TDataType const& Value = TDataType()) + void SetAllCoordinates(double const &Value = double()) { - KRATOS_TRY_LEVEL_4 - for(IndexType i = 0 ; i < TDimension ; i++) + for (IndexType i = 0; i < mDimension; i++) this->operator()(i) = Value; - KRATOS_CATCH_LEVEL_4(*this) } ///@} @@ -429,60 +268,40 @@ class Point : public array_1d friend class Serializer; - - virtual void save(Serializer& rSerializer) const + virtual void save(Serializer &rSerializer) const { - rSerializer.save_base("BaseClass",*static_cast *>(this)); - //rSerializer.save_base("BaseData",*dynamic_cast*>(this)); + rSerializer.save_base("BaseClass", *static_cast *>(this)); } - virtual void load(Serializer& rSerializer) + virtual void load(Serializer &rSerializer) { - rSerializer.load_base("BaseClass",*static_cast *>(this)); -// rSerializer.load_base("BaseData",*dynamic_cast*>(this)); + rSerializer.load_base("BaseClass", *static_cast *>(this)); } - ///@} - ///@name Private Access - ///@{ - - - ///@} - ///@name Private Inquiry - ///@{ - - - ///@} - ///@name Un accessible methods - ///@{ - - ///@} }; // Class Point ///@} -template class KRATOS_API(KRATOS_CORE) KratosComponents >; +template class KRATOS_API(KRATOS_CORE) KratosComponents; ///@name Type Definitions ///@{ - ///@} ///@name Input and output ///@{ - /// input stream function -template -inline std::istream& operator >> (std::istream& rIStream, - Point& rThis); +inline std::istream &operator>>(std::istream &rIStream, + Point &rThis){ + return rIStream; + } /// output stream function -template -inline std::ostream& operator << (std::ostream& rOStream, - const Point& rThis) +inline std::ostream &operator<<(std::ostream &rOStream, + const Point &rThis) { rThis.PrintInfo(rOStream); rThis.PrintData(rOStream); @@ -491,7 +310,6 @@ inline std::ostream& operator << (std::ostream& rOStream, } ///@} - -} // namespace Kratos. +} // namespace Kratos. #endif // KRATOS_POINT_H_INCLUDED defined diff --git a/kratos/geometries/point_2d.h b/kratos/geometries/point_2d.h index c6340b3c88a3..9826b9573431 100644 --- a/kratos/geometries/point_2d.h +++ b/kratos/geometries/point_2d.h @@ -256,21 +256,21 @@ class Point2D : public Geometry return typename BaseType::Pointer(new Point2D(ThisPoints)); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Point2D< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Point2D< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix // virtual Vector& LumpingFactors(Vector& rResult) const diff --git a/kratos/geometries/point_3d.h b/kratos/geometries/point_3d.h index f94a24f02a52..c6d11d812600 100644 --- a/kratos/geometries/point_3d.h +++ b/kratos/geometries/point_3d.h @@ -257,21 +257,21 @@ class Point3D : public Geometry } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Point3D< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Point3D< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix // virtual Vector& LumpingFactors(Vector& rResult) const diff --git a/kratos/geometries/prism_3d_15.h b/kratos/geometries/prism_3d_15.h index 7a1d4db6ed73..24528b67013a 100644 --- a/kratos/geometries/prism_3d_15.h +++ b/kratos/geometries/prism_3d_15.h @@ -325,21 +325,21 @@ template class Prism3D15 : public Geometry return typename BaseType::Pointer( new Prism3D15( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Prism3D15< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Prism3D15< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix diff --git a/kratos/geometries/prism_3d_6.h b/kratos/geometries/prism_3d_6.h index 0fd95ef4472f..0581b2b8899c 100644 --- a/kratos/geometries/prism_3d_6.h +++ b/kratos/geometries/prism_3d_6.h @@ -296,21 +296,21 @@ template class Prism3D6 : public Geometry } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Prism3D6< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Prism3D6< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix diff --git a/kratos/geometries/prism_interface_3d_6.h b/kratos/geometries/prism_interface_3d_6.h index 8ac69ef62e8c..225364af0d28 100644 --- a/kratos/geometries/prism_interface_3d_6.h +++ b/kratos/geometries/prism_interface_3d_6.h @@ -321,21 +321,21 @@ template class PrismInterface3D6 return typename BaseType::Pointer( new PrismInterface3D6( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new PrismInterface3D6< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new PrismInterface3D6< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** diff --git a/kratos/geometries/quadrilateral_2d_4.h b/kratos/geometries/quadrilateral_2d_4.h index 4dcdd327a217..a0208f346531 100644 --- a/kratos/geometries/quadrilateral_2d_4.h +++ b/kratos/geometries/quadrilateral_2d_4.h @@ -318,21 +318,21 @@ template class Quadrilateral2D4 } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; - - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; + + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Quadrilateral2D4< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Quadrilateral2D4< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** * returns the local coordinates of all nodes of the current geometry * @param rResult a Matrix object that will be overwritten by the result diff --git a/kratos/geometries/quadrilateral_2d_8.h b/kratos/geometries/quadrilateral_2d_8.h index b732e4b86dc8..c5108a7fbfde 100644 --- a/kratos/geometries/quadrilateral_2d_8.h +++ b/kratos/geometries/quadrilateral_2d_8.h @@ -316,21 +316,21 @@ template class Quadrilateral2D8 return typename BaseType::Pointer( new Quadrilateral2D8( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Quadrilateral2D8< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Quadrilateral2D8< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** diff --git a/kratos/geometries/quadrilateral_2d_9.h b/kratos/geometries/quadrilateral_2d_9.h index aa41e9f4e593..2388dc42612d 100644 --- a/kratos/geometries/quadrilateral_2d_9.h +++ b/kratos/geometries/quadrilateral_2d_9.h @@ -318,21 +318,21 @@ template class Quadrilateral2D9 : public Geometry return typename BaseType::Pointer( new Quadrilateral2D9( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Quadrilateral2D9< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Quadrilateral2D9< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** * lumping factors for the calculation of the lumped mass matrix diff --git a/kratos/geometries/quadrilateral_3d_4.h b/kratos/geometries/quadrilateral_3d_4.h index f5a531e930ac..c04725897495 100644 --- a/kratos/geometries/quadrilateral_3d_4.h +++ b/kratos/geometries/quadrilateral_3d_4.h @@ -318,21 +318,21 @@ template class Quadrilateral3D4 } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Quadrilateral3D4< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Quadrilateral3D4< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** * returns the local coordinates of all nodes of the current geometry @@ -357,8 +357,7 @@ template class Quadrilateral3D4 //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors( Vector& rResult ) const override { - if(rResult.size() != 4) - rResult.resize( 4, false ); + if(rResult.size() != 4) rResult.resize( 4, false ); std::fill( rResult.begin(), rResult.end(), 1.00 / 4.00 ); return rResult; } @@ -388,7 +387,7 @@ template class Quadrilateral3D4 */ double Length() const override { - return std::sqrt( Area() ); + return std::sqrt( Area() ); } /** This method calculates and returns area or surface area of @@ -408,65 +407,73 @@ template class Quadrilateral3D4 */ double Area() const override { - // Old - - /*Vector d = this->Points()[2] - this->Points()[0]; - return( sqrt( d[0]*d[0] + d[1]*d[1] + d[2]*d[2] ) );*/ - - // New - 24/01/2014 - Massimo Petracca - // the following procedure calculates the area of a general - // quadrilateral (flat or warped) using the parametric representation - // of ruled hyperbolic paraboloid surface. - // the integration of the normal is then performed with a 2x2 gauss quadrature - // in the U-V domain [0,1]. - // results explicitly written after symbolic calculation. - - const TPointType& p1 = this->Points()[0]; - const TPointType& p2 = this->Points()[1]; - const TPointType& p3 = this->Points()[2]; - const TPointType& p4 = this->Points()[3]; - - const double p1x = p1.X(); - const double p1y = p1.Y(); - const double p1z = p1.Z(); - - const double p2x = p2.X(); - const double p2y = p2.Y(); - const double p2z = p2.Z(); - - const double p3x = p3.X(); - const double p3y = p3.Y(); - const double p3z = p3.Z(); - - const double p4x = p4.X(); - const double p4y = p4.Y(); - const double p4z = p4.Z(); - - const double pos = 0.5 + 0.5 / std::sqrt(3.0); - const double w = 0.25; - - const double C1 = pos*(p1z - p2z + p3z - p4z); - const double C2 = pos*(p1y - p2y + p3y - p4y); - const double C3 = pos*(p1x - p2x + p3x - p4x); - const double C4 = C1 - p1z + p2z; - const double C5 = C1 + p1z - p2z; - const double C6 = C2 + p1y - p2y; - const double C7 = C2 - p1y + p2y; - const double C8 = C3 - p1x + p2x; - const double C9 = C3 + p1x - p2x; - const double C10 = C1 - p1z + p4z; - const double C11 = C2 - p1y + p4y; - const double C12 = C3 - p1x + p4x; - const double C13 = C1 + p1z - p4z; - const double C14 = C2 + p1y - p4y; - const double C15 = C3 + p1x - p4x; - - return w * ( - std::sqrt( std::pow(C4*C11 - C7*C10, 2) + std::pow(C4*C12 - C8*C10, 2) + std::pow(C7*C12 - C8*C11, 2)) + - std::sqrt( std::pow(C5*C11 - C6*C10, 2) + std::pow(C5*C12 - C9*C10, 2) + std::pow(C6*C12 - C9*C11, 2)) + - std::sqrt( std::pow(C4*C14 - C7*C13, 2) + std::pow(C4*C15 - C8*C13, 2) + std::pow(C7*C15 - C8*C14, 2)) + - std::sqrt( std::pow(C5*C14 - C6*C13, 2) + std::pow(C5*C15 - C9*C13, 2) + std::pow(C6*C15 - C9*C14, 2)) - ); + // Finite element way + Vector temp; + DeterminantOfJacobian( temp, GeometryData::GI_GAUSS_3 ); + const IntegrationPointsArrayType& integration_points = this->IntegrationPoints( GeometryData::GI_GAUSS_3 ); + double area = 0.0; + + for ( unsigned int i = 0; i < integration_points.size(); i++ ) + { + area += temp[i] * integration_points[i].Weight(); + } + + return area; + +// // 24/01/2014 - Massimo Petracca +// // the following procedure calculates the area of a general +// // quadrilateral (flat or warped) using the parametric representation +// // of ruled hyperbolic paraboloid surface. +// // the integration of the normal is then performed with a 2x2 gauss quadrature +// // in the U-V domain [0,1]. +// // results explicitly written after symbolic calculation. +// +// const TPointType& p1 = this->Points()[0]; +// const TPointType& p2 = this->Points()[1]; +// const TPointType& p3 = this->Points()[2]; +// const TPointType& p4 = this->Points()[3]; +// +// const double& p1x = p1.X(); +// const double& p1y = p1.Y(); +// const double& p1z = p1.Z(); +// +// const double& p2x = p2.X(); +// const double& p2y = p2.Y(); +// const double& p2z = p2.Z(); +// +// const double& p3x = p3.X(); +// const double& p3y = p3.Y(); +// const double& p3z = p3.Z(); +// +// const double& p4x = p4.X(); +// const double& p4y = p4.Y(); +// const double& p4z = p4.Z(); +// +// const double pos = 0.5 + 0.5 / std::sqrt(3.0); +// const double w = 0.25; +// +// const double C1 = pos*(p1z - p2z + p3z - p4z); +// const double C2 = pos*(p1y - p2y + p3y - p4y); +// const double C3 = pos*(p1x - p2x + p3x - p4x); +// const double C4 = C1 - p1z + p2z; +// const double C5 = C1 + p1z - p2z; +// const double C6 = C2 + p1y - p2y; +// const double C7 = C2 - p1y + p2y; +// const double C8 = C3 - p1x + p2x; +// const double C9 = C3 + p1x - p2x; +// const double C10 = C1 - p1z + p4z; +// const double C11 = C2 - p1y + p4y; +// const double C12 = C3 - p1x + p4x; +// const double C13 = C1 + p1z - p4z; +// const double C14 = C2 + p1y - p4y; +// const double C15 = C3 + p1x - p4x; +// +// return w * ( +// std::sqrt( std::pow(C4*C11 - C7*C10, 2) + std::pow(C4*C12 - C8*C10, 2) + std::pow(C7*C12 - C8*C11, 2)) + +// std::sqrt( std::pow(C5*C11 - C6*C10, 2) + std::pow(C5*C12 - C9*C10, 2) + std::pow(C6*C12 - C9*C11, 2)) + +// std::sqrt( std::pow(C4*C14 - C7*C13, 2) + std::pow(C4*C15 - C8*C13, 2) + std::pow(C7*C15 - C8*C14, 2)) + +// std::sqrt( std::pow(C5*C14 - C6*C13, 2) + std::pow(C5*C15 - C9*C13, 2) + std::pow(C6*C15 - C9*C14, 2)) +// ); } /** This method calculates and returns length, area or volume of @@ -485,35 +492,12 @@ template class Quadrilateral3D4 */ double DomainSize() const override { - // Old - - //return fabs( DeterminantOfJacobian( PointType() ) ) * 0.5; - - // New - 24/01/2014 - Massimo Petracca - - return Area(); + return Area(); } double Volume() const override { - // Old - - //Vector temp; - //DeterminantOfJacobian( temp, msGeometryData.DefaultIntegrationMethod() ); - //const IntegrationPointsArrayType& integration_points = this->IntegrationPoints( msGeometryData.DefaultIntegrationMethod() ); - //double Volume = 0.00; - - //for ( unsigned int i = 0; i < integration_points.size(); i++ ) - //{ - // Volume += temp[i] * integration_points[i].Weight(); - //} - - ////KRATOS_WATCH(temp) - //return Volume; - - // New - 24/01/2014 - Massimo Petracca - return Area(); } @@ -531,7 +515,7 @@ template class Quadrilateral3D4 const double Tolerance = std::numeric_limits::epsilon() ) override { - PointLocalCoordinates( rResult, rPoint ); + PrivatePointLocalCoordinates( rResult, rPoint, true ); if ( std::abs(rResult[0]) <= (1.0+Tolerance) ) { @@ -550,82 +534,12 @@ template class Quadrilateral3D4 * @param rPoint: The point in global coordinates * @return The vector containing the local coordinates of the point */ - virtual CoordinatesArrayType& PointLocalCoordinates( + CoordinatesArrayType& PointLocalCoordinates( CoordinatesArrayType& rResult, const CoordinatesArrayType& rPoint ) override { - boost::numeric::ublas::bounded_matrix X; - boost::numeric::ublas::bounded_matrix DN; - for(unsigned int i=0; isize();i++) - { - X(0,i ) = this->GetPoint( i ).X(); - X(1,i ) = this->GetPoint( i ).Y(); - X(2,i ) = this->GetPoint( i ).Z(); - } - - double tol = 1.0e-8; - int maxiter = 1000; - - Matrix J = ZeroMatrix( 2, 2 ); - Matrix invJ = ZeroMatrix( 2, 2 ); - - //starting with xi = 0 - rResult = ZeroVector( 3 ); - Vector DeltaXi = ZeroVector( 2 ); - array_1d CurrentGlobalCoords; - - - //Newton iteration: - for ( int k = 0; k < maxiter; k++ ) - { - noalias(CurrentGlobalCoords) = ZeroVector( 3 ); - this->GlobalCoordinates( CurrentGlobalCoords, rResult ); - - noalias( CurrentGlobalCoords ) = rPoint - CurrentGlobalCoords; - - - //derivatives of shape functions - Matrix shape_functions_gradients; - shape_functions_gradients = ShapeFunctionsLocalGradients(shape_functions_gradients, rResult ); - noalias(DN) = prod(X,shape_functions_gradients); - - noalias(J) = prod(trans(DN),DN); - Vector res = prod(trans(DN),CurrentGlobalCoords); - - //deteminant of Jacobian - const double det_j = J( 0, 0 ) * J( 1, 1 ) - J( 0, 1 ) * J( 1, 0 ); - - //filling matrix - invJ( 0, 0 ) = ( J( 1, 1 ) ) / ( det_j ); - invJ( 1, 0 ) = -( J( 1, 0 ) ) / ( det_j ); - invJ( 0, 1 ) = -( J( 0, 1 ) ) / ( det_j ); - invJ( 1, 1 ) = ( J( 0, 0 ) ) / ( det_j ); - - - DeltaXi( 0 ) = invJ( 0, 0 ) * res[0] + invJ( 0, 1 ) * res[1]; - DeltaXi( 1 ) = invJ( 1, 0 ) * res[0] + invJ( 1, 1 ) * res[1]; - - rResult[0] += DeltaXi[0]; - rResult[1] += DeltaXi[1]; - rResult[2] = 0.0; - - if ( norm_2( DeltaXi ) > 300 ) - { - res[0] = 0.0; - res[1] = 0.0; - std::cout << "detJ =" << det_j << "DeltaX = " << DeltaXi << " stopping calculation and assigning the baricenter" << std::endl; - break; - //KRATOS_ERROR << "Computation of local coordinates failed at iteration" << k << std:endl; - } - - if ( norm_2( DeltaXi ) < tol ) - { - break; - } - } - - return( rResult ); + return PrivatePointLocalCoordinates(rResult, rPoint); } ///@} @@ -649,16 +563,17 @@ template class Quadrilateral3D4 * @see DeterminantOfJacobian * @see InverseOfJacobian */ - JacobiansType& Jacobian( JacobiansType& rResult, - IntegrationMethod ThisMethod ) const override + JacobiansType& Jacobian( + JacobiansType& rResult, + IntegrationMethod ThisMethod + ) const override { - //getting derivatives of shape functions - ShapeFunctionsGradientsType shape_functions_gradients = - CalculateShapeFunctionsIntegrationPointsLocalGradients( ThisMethod ); - //getting values of shape functions + // Getting derivatives of shape functions + const ShapeFunctionsGradientsType& shape_functions_gradients = + msGeometryData.ShapeFunctionsLocalGradients( ThisMethod ); + // Getting values of shape functions Matrix shape_functions_values = - CalculateShapeFunctionsIntegrationPointsValues( ThisMethod ); - //workaround by riccardo... + CalculateShapeFunctionsIntegrationPointsValues( ThisMethod ); if ( rResult.size() != this->IntegrationPointsNumber( ThisMethod ) ) { @@ -668,13 +583,13 @@ template class Quadrilateral3D4 rResult.swap( temp ); } - //loop over all integration points + // Loop over all integration points for ( unsigned int pnt = 0; pnt < this->IntegrationPointsNumber( ThisMethod ); pnt++ ) { - //defining single jacobian matrix + // Defining single jacobian matrix Matrix jacobian = ZeroMatrix( 3, 2 ); - //loop over all nodes - + + // Loop over all nodes for ( unsigned int i = 0; i < this->PointsNumber(); i++ ) { jacobian( 0, 0 ) += @@ -692,7 +607,7 @@ template class Quadrilateral3D4 } rResult[pnt] = jacobian; - }//end of loop over all integration points + } //end of loop over all integration points return rResult; } @@ -715,17 +630,17 @@ template class Quadrilateral3D4 * @see DeterminantOfJacobian * @see InverseOfJacobian */ - JacobiansType& Jacobian( JacobiansType& rResult, - IntegrationMethod ThisMethod, - Matrix & DeltaPosition ) const override + JacobiansType& Jacobian( + JacobiansType& rResult, + IntegrationMethod ThisMethod, + Matrix & DeltaPosition + ) const override { - //getting derivatives of shape functions - ShapeFunctionsGradientsType shape_functions_gradients = - CalculateShapeFunctionsIntegrationPointsLocalGradients( ThisMethod ); - //getting values of shape functions - Matrix shape_functions_values = - CalculateShapeFunctionsIntegrationPointsValues( ThisMethod ); - //workaround by riccardo... + // Getting derivatives of shape functions + const ShapeFunctionsGradientsType& shape_functions_gradients = + msGeometryData.ShapeFunctionsLocalGradients( ThisMethod ); + // Getting values of shape functions + Matrix shape_functions_values = CalculateShapeFunctionsIntegrationPointsValues( ThisMethod ); if ( rResult.size() != this->IntegrationPointsNumber( ThisMethod ) ) { @@ -784,41 +699,33 @@ template class Quadrilateral3D4 * @see DeterminantOfJacobian * @see InverseOfJacobian */ - Matrix& Jacobian( Matrix& rResult, - IndexType IntegrationPointIndex, - IntegrationMethod ThisMethod ) const override + Matrix& Jacobian( + Matrix& rResult, + IndexType IntegrationPointIndex, + IntegrationMethod ThisMethod + ) const override { - //setting up size of jacobian matrix + // Setting up size of jacobian matrix rResult.resize( 3, 2, false ); - //derivatives of shape functions - ShapeFunctionsGradientsType shape_functions_gradients = - CalculateShapeFunctionsIntegrationPointsLocalGradients( ThisMethod ); - Matrix ShapeFunctionsGradientInIntegrationPoint = - shape_functions_gradients( IntegrationPointIndex ); - //values of shape functions in integration points -// Vector ShapeFunctionsValuesInIntegrationPoint = ZeroVector( 4 ); -// /*vector*/ -// ShapeFunctionsValuesInIntegrationPoint = row( -// CalculateShapeFunctionsIntegrationPointsValues( ThisMethod ), -// IntegrationPointIndex ); - + // Derivatives of shape functions + Matrix shape_functions_gradients = msGeometryData.ShapeFunctionLocalGradient(IntegrationPointIndex, ThisMethod ); + //Elements of jacobian matrix (e.g. J(1,1) = dX1/dXi1) //loop over all nodes - for ( unsigned int i = 0; i < this->PointsNumber(); i++ ) { rResult( 0, 0 ) += - ( this->GetPoint( i ).X() ) * ( ShapeFunctionsGradientInIntegrationPoint( i, 0 ) ); + ( this->GetPoint( i ).X() ) * ( shape_functions_gradients( i, 0 ) ); rResult( 0, 1 ) += - ( this->GetPoint( i ).X() ) * ( ShapeFunctionsGradientInIntegrationPoint( i, 1 ) ); + ( this->GetPoint( i ).X() ) * ( shape_functions_gradients( i, 1 ) ); rResult( 1, 0 ) += - ( this->GetPoint( i ).Y() ) * ( ShapeFunctionsGradientInIntegrationPoint( i, 0 ) ); + ( this->GetPoint( i ).Y() ) * ( shape_functions_gradients( i, 0 ) ); rResult( 1, 1 ) += - ( this->GetPoint( i ).Y() ) * ( ShapeFunctionsGradientInIntegrationPoint( i, 1 ) ); + ( this->GetPoint( i ).Y() ) * ( shape_functions_gradients( i, 1 ) ); rResult( 2, 0 ) += - ( this->GetPoint( i ).Z() ) * ( ShapeFunctionsGradientInIntegrationPoint( i, 0 ) ); + ( this->GetPoint( i ).Z() ) * ( shape_functions_gradients( i, 0 ) ); rResult( 2, 1 ) += - ( this->GetPoint( i ).Z() ) * ( ShapeFunctionsGradientInIntegrationPoint( i, 1 ) ); + ( this->GetPoint( i ).Z() ) * ( shape_functions_gradients( i, 1 ) ); } return rResult; @@ -828,10 +735,10 @@ template class Quadrilateral3D4 * TODO: implemented but not yet tested */ /** - * Jacobian in given point. This method calculate jacobian - * matrix in given point. - * - * @param rPoint point which jacobians has to + * Jacobian in given point. This method calculate jacobian + * matrix in given point. + * + * @param rPoint point which jacobians has to * be calculated in it. * * @return Matrix of double which is jacobian matrix \f$ J \f$ in given point. @@ -841,14 +748,13 @@ template class Quadrilateral3D4 */ Matrix& Jacobian( Matrix& rResult, const CoordinatesArrayType& rPoint ) const override { - //setting up size of jacobian matrix + // Setting up size of jacobian matrix rResult.resize( 3, 2, false ); noalias(rResult) = ZeroMatrix(3, 2); - //derivatives of shape functions + // Derivatives of shape functions Matrix shape_functions_gradients; - shape_functions_gradients = ShapeFunctionsLocalGradients( - shape_functions_gradients, rPoint ); + shape_functions_gradients = ShapeFunctionsLocalGradients(shape_functions_gradients, rPoint ); //Elements of jacobian matrix (e.g. J(1,1) = dX1/dXi1) //loop over all nodes @@ -880,8 +786,10 @@ template class Quadrilateral3D4 * @see Jacobian * @see InverseOfJacobian */ - Vector& DeterminantOfJacobian( Vector& rResult, - IntegrationMethod ThisMethod ) const override + Vector& DeterminantOfJacobian( + Vector& rResult, + IntegrationMethod ThisMethod + ) const override { const unsigned int integration_points_number = msGeometryData.IntegrationPointsNumber( ThisMethod ); if(rResult.size() != integration_points_number) @@ -889,13 +797,14 @@ template class Quadrilateral3D4 rResult.resize(integration_points_number,false); } - Matrix jacobian ( 3, 2 ); + JacobiansType jacobian; + this->Jacobian( jacobian, ThisMethod); for ( unsigned int pnt = 0; pnt < integration_points_number; pnt++ ) { - this->Jacobian( jacobian, pnt, ThisMethod); + const double detJ = std::pow(jacobian[pnt](0,1),2.0)*(std::pow(jacobian[pnt](1,0),2.0) + std::pow(jacobian[pnt](2,0),2.0)) + std::pow(jacobian[pnt](1,1)*jacobian[pnt](2,0) - jacobian[pnt](1,0)*jacobian[pnt](2,1),2.0) - 2.0*jacobian[pnt](0,0)*jacobian[pnt](0,1)*(jacobian[pnt](1,0)*jacobian[pnt](1,1) + jacobian[pnt](2,0)*jacobian[pnt](2,1)) + std::pow(jacobian[pnt](0,0),2.0)*(std::pow(jacobian[pnt](1,1),2.0) + std::pow(jacobian[pnt](2,1),2.0)); - 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)); + if (detJ < 0.0) KRATOS_ERROR << "WARNING::NEGATIVE VALUE: NOT POSSIBLE TO EVALUATE THE JACOBIAN DETERMINANT" << std::endl; rResult[pnt] = std::sqrt(detJ); } @@ -925,15 +834,19 @@ template class Quadrilateral3D4 * @see Jacobian * @see InverseOfJacobian */ - double DeterminantOfJacobian( IndexType IntegrationPointIndex, - IntegrationMethod ThisMethod ) const override + double DeterminantOfJacobian( + IndexType IntegrationPointIndex, + IntegrationMethod ThisMethod + ) const override { Matrix jacobian ( 3, 2 ); this->Jacobian( jacobian, IntegrationPointIndex, 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)); + const double detJ = std::pow(jacobian(0,1),2.0)*(std::pow(jacobian(1,0),2.0) + std::pow(jacobian(2,0),2.0)) + std::pow(jacobian(1,1)*jacobian(2,0) - jacobian(1,0)*jacobian(2,1),2.0) - 2.0*jacobian(0,0)*jacobian(0,1)*(jacobian(1,0)*jacobian(1,1) + jacobian(2,0)*jacobian(2,1)) + std::pow(jacobian(0,0),2.0)*(std::pow(jacobian(1,1),2.0) + std::pow(jacobian(2,1),2.0)); + if (detJ < 0.0) KRATOS_ERROR << "WARNING::NEGATIVE VALUE: NOT POSSIBLE TO EVALUATE THE JACOBIAN DETERMINANT" << std::endl; + return std::sqrt(detJ); } @@ -967,9 +880,11 @@ template class Quadrilateral3D4 Matrix jacobian ( 3, 2 ); this->Jacobian( jacobian, rPoint); - - 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)); + const double detJ = std::pow(jacobian(0,1),2.0)*(std::pow(jacobian(1,0),2.0) + std::pow(jacobian(2,0),2.0)) + std::pow(jacobian(1,1)*jacobian(2,0) - jacobian(1,0)*jacobian(2,1),2.0) - 2.0*jacobian(0,0)*jacobian(0,1)*(jacobian(1,0)*jacobian(1,1) + jacobian(2,0)*jacobian(2,1)) + std::pow(jacobian(0,0),2.0)*(std::pow(jacobian(1,1),2.0) + std::pow(jacobian(2,1),2.0)); + + if (detJ < 0.0) KRATOS_ERROR << "WARNING::NEGATIVE VALUE: NOT POSSIBLE TO EVALUATE THE JACOBIAN DETERMINANT" << std::endl; + return std::sqrt(detJ); } @@ -1076,7 +991,7 @@ template class Quadrilateral3D4 */ SizeType FacesNumber() const override { - return EdgesNumber(); + return EdgesNumber(); } /** This method gives you all edges of this geometry. This @@ -1199,12 +1114,12 @@ template class Quadrilateral3D4 */ Vector& ShapeFunctionsValues (Vector &rResult, const CoordinatesArrayType& rCoordinates) const override { - if(rResult.size() != 4) rResult.resize(4,false); - rResult[0] = 0.25*( 1.0 - rCoordinates[0] )*( 1.0 - rCoordinates[1] ); - rResult[1] = 0.25*( 1.0 + rCoordinates[0] )*( 1.0 - rCoordinates[1] ); - rResult[2] = 0.25*( 1.0 + rCoordinates[0] )*( 1.0 + rCoordinates[1] ); - rResult[3] = 0.25*( 1.0 - rCoordinates[0] )*( 1.0 + rCoordinates[1] ); - + if(rResult.size() != 4) rResult.resize(4,false); + rResult[0] = 0.25*( 1.0 - rCoordinates[0] )*( 1.0 - rCoordinates[1] ); + rResult[1] = 0.25*( 1.0 + rCoordinates[0] )*( 1.0 - rCoordinates[1] ); + rResult[2] = 0.25*( 1.0 + rCoordinates[0] )*( 1.0 + rCoordinates[1] ); + rResult[3] = 0.25*( 1.0 - rCoordinates[0] )*( 1.0 + rCoordinates[1] ); + return rResult; } @@ -1228,13 +1143,13 @@ template class Quadrilateral3D4 ShapeFunctionsGradientsType& rResult, IntegrationMethod ThisMethod ) const override { - const unsigned int integration_points_number = - msGeometryData.IntegrationPointsNumber( ThisMethod ); + const unsigned int integration_points_number = msGeometryData.IntegrationPointsNumber( ThisMethod ); if ( integration_points_number == 0 ) + { KRATOS_ERROR << "This integration method is not supported" << *this << std::endl; + } - //workaround by riccardo if ( rResult.size() != integration_points_number ) { // KLUDGE: While there is a bug in ublas @@ -1243,9 +1158,8 @@ template class Quadrilateral3D4 rResult.swap( temp ); } - //calculating the local gradients - ShapeFunctionsGradientsType locG = - CalculateShapeFunctionsIntegrationPointsLocalGradients( ThisMethod ); + // Calculating the local gradients + const ShapeFunctionsGradientsType& shape_functions_local_gradient = msGeometryData.ShapeFunctionsLocalGradients( ThisMethod ); //getting the inverse jacobian matrices JacobiansType temp( integration_points_number ); @@ -1262,8 +1176,8 @@ template class Quadrilateral3D4 for ( int j = 0; j < 2; j++ ) { rResult[pnt]( i, j ) = - ( locG[pnt]( i, 0 ) * invJ[pnt]( j, 0 ) ) - + ( locG[pnt]( i, 1 ) * invJ[pnt]( j, 1 ) ); + ( shape_functions_local_gradient[pnt]( i, 0 ) * invJ[pnt]( j, 0 ) ) + + ( shape_functions_local_gradient[pnt]( i, 1 ) * invJ[pnt]( j, 1 ) ); } } }//end of loop over integration points @@ -1328,15 +1242,15 @@ template class Quadrilateral3D4 virtual ShapeFunctionsGradientsType ShapeFunctionsLocalGradients( IntegrationMethod ThisMethod ) { - ShapeFunctionsGradientsType localGradients - = CalculateShapeFunctionsIntegrationPointsLocalGradients( ThisMethod ); - const int integration_points_number + const ShapeFunctionsGradientsType& shape_function_local_gradient + = msGeometryData.ShapeFunctionsLocalGradients( ThisMethod ); + const int& integration_points_number = msGeometryData.IntegrationPointsNumber( ThisMethod ); ShapeFunctionsGradientsType Result( integration_points_number ); for ( int pnt = 0; pnt < integration_points_number; pnt++ ) { - Result[pnt] = localGradients[pnt]; + Result[pnt] = shape_function_local_gradient[pnt]; } return Result; @@ -1349,15 +1263,15 @@ template class Quadrilateral3D4 virtual ShapeFunctionsGradientsType ShapeFunctionsLocalGradients() { IntegrationMethod ThisMethod = msGeometryData.DefaultIntegrationMethod(); - ShapeFunctionsGradientsType localGradients - = CalculateShapeFunctionsIntegrationPointsLocalGradients( ThisMethod ); + const ShapeFunctionsGradientsType& shape_function_local_gradient + = msGeometryData.ShapeFunctionsLocalGradients( ThisMethod ); const int integration_points_number = msGeometryData.IntegrationPointsNumber( ThisMethod ); ShapeFunctionsGradientsType Result( integration_points_number ); for ( int pnt = 0; pnt < integration_points_number; pnt++ ) { - Result[pnt] = localGradients[pnt]; + Result[pnt] = shape_function_local_gradient[pnt]; } return Result; @@ -1372,19 +1286,21 @@ template class Quadrilateral3D4 * @return the gradients of all shape functions * \f$ \frac{\partial N^i}{\partial \xi_j} \f$ */ - Matrix& ShapeFunctionsLocalGradients( Matrix& rResult, - const CoordinatesArrayType& rPoint ) const override + Matrix& ShapeFunctionsLocalGradients( + Matrix& rResult, + const CoordinatesArrayType& rPoint + ) const override { rResult.resize( 4, 2, false ); noalias( rResult ) = ZeroMatrix( 4, 2 ); rResult( 0, 0 ) = -0.25 * ( 1.0 - rPoint[1] ); rResult( 0, 1 ) = -0.25 * ( 1.0 - rPoint[0] ); - rResult( 1, 0 ) = 0.25 * ( 1.0 - rPoint[1] ); + rResult( 1, 0 ) = 0.25 * ( 1.0 - rPoint[1] ); rResult( 1, 1 ) = -0.25 * ( 1.0 + rPoint[0] ); - rResult( 2, 0 ) = 0.25 * ( 1.0 + rPoint[1] ); - rResult( 2, 1 ) = 0.25 * ( 1.0 + rPoint[0] ); + rResult( 2, 0 ) = 0.25 * ( 1.0 + rPoint[1] ); + rResult( 2, 1 ) = 0.25 * ( 1.0 + rPoint[0] ); rResult( 3, 0 ) = -0.25 * ( 1.0 + rPoint[1] ); - rResult( 3, 1 ) = 0.25 * ( 1.0 - rPoint[0] ); + rResult( 3, 1 ) = 0.25 * ( 1.0 - rPoint[0] ); return rResult; } @@ -1397,27 +1313,33 @@ template class Quadrilateral3D4 * shape functions in given point * @param rPoint the given point the gradients are calculated in */ - virtual Matrix& ShapeFunctionsGradients( Matrix& rResult, PointType& rPoint ) + virtual Matrix& ShapeFunctionsGradients( + Matrix& rResult, + PointType& rPoint + ) { rResult.resize( 4, 2, false ); rResult( 0, 0 ) = -0.25 * ( 1.0 - rPoint.Y() ); rResult( 0, 1 ) = -0.25 * ( 1.0 - rPoint.X() ); - rResult( 1, 0 ) = 0.25 * ( 1.0 - rPoint.Y() ); + rResult( 1, 0 ) = 0.25 * ( 1.0 - rPoint.Y() ); rResult( 1, 1 ) = -0.25 * ( 1.0 + rPoint.X() ); - rResult( 2, 0 ) = 0.25 * ( 1.0 + rPoint.Y() ); - rResult( 2, 1 ) = 0.25 * ( 1.0 + rPoint.X() ); + rResult( 2, 0 ) = 0.25 * ( 1.0 + rPoint.Y() ); + rResult( 2, 1 ) = 0.25 * ( 1.0 + rPoint.X() ); rResult( 3, 0 ) = -0.25 * ( 1.0 + rPoint.Y() ); - rResult( 3, 1 ) = 0.25 * ( 1.0 - rPoint.X() ); + rResult( 3, 1 ) = 0.25 * ( 1.0 - rPoint.X() ); return rResult; } /** - * returns the second order derivatives of all shape functions + * Returns the second order derivatives of all shape functions * in given arbitrary pointers * @param rResult a third order tensor which contains the second derivatives * @param rPoint the given point the second order derivatives are calculated in */ - ShapeFunctionsSecondDerivativesType& ShapeFunctionsSecondDerivatives( ShapeFunctionsSecondDerivativesType& rResult, const CoordinatesArrayType& rPoint ) const override + ShapeFunctionsSecondDerivativesType& ShapeFunctionsSecondDerivatives( + ShapeFunctionsSecondDerivativesType& rResult, + const CoordinatesArrayType& rPoint + ) const override { if ( rResult.size() != this->PointsNumber() ) { @@ -1457,13 +1379,15 @@ template class Quadrilateral3D4 * @param rResult a fourth order tensor which contains the third derivatives * @param rPoint the given point the third order derivatives are calculated in */ - ShapeFunctionsThirdDerivativesType& ShapeFunctionsThirdDerivatives( ShapeFunctionsThirdDerivativesType& rResult, const CoordinatesArrayType& rPoint ) const override + ShapeFunctionsThirdDerivativesType& ShapeFunctionsThirdDerivatives( + ShapeFunctionsThirdDerivativesType& rResult, + const CoordinatesArrayType& rPoint + ) const override { if ( rResult.size() != this->PointsNumber() ) { // KLUDGE: While there is a bug in // ublas vector resize, I have to put this beside resizing!! -// ShapeFunctionsGradientsType ShapeFunctionsThirdDerivativesType temp( this->PointsNumber() ); rResult.swap( temp ); } @@ -1548,6 +1472,88 @@ template class Quadrilateral3D4 ///@name Private Operations ///@{ + /** + * Returns the local coordinates of a given arbitrary point + * @param rResult: The vector containing the local coordinates of the point + * @param rPoint: The point in global coordinates + * @param IsInside: THe flag that checks if we are computing IsInside (is common for seach to have the nodes outside the geometry) + * @return The vector containing the local coordinates of the point + */ + CoordinatesArrayType& PrivatePointLocalCoordinates( + CoordinatesArrayType& rResult, + const CoordinatesArrayType& rPoint, + const bool IsInside = false + ) + { + boost::numeric::ublas::bounded_matrix X; + boost::numeric::ublas::bounded_matrix DN; + for(unsigned int i=0; isize();i++) + { + X(0,i ) = this->GetPoint( i ).X(); + X(1,i ) = this->GetPoint( i ).Y(); + X(2,i ) = this->GetPoint( i ).Z(); + } + + const double tol = 1.0e-8; + const int maxiter = 500; + + Matrix J = ZeroMatrix( 2, 2 ); + Matrix invJ = ZeroMatrix( 2, 2 ); + + // Starting with xi = 0 + rResult = ZeroVector( 3 ); + Vector DeltaXi = ZeroVector( 2 ); + array_1d CurrentGlobalCoords; + + //Newton iteration: + for ( int k = 0; k < maxiter; k++ ) + { + noalias(CurrentGlobalCoords) = ZeroVector( 3 ); + this->GlobalCoordinates( CurrentGlobalCoords, rResult ); + + noalias( CurrentGlobalCoords ) = rPoint - CurrentGlobalCoords; + + // Derivatives of shape functions + Matrix shape_functions_gradients; + shape_functions_gradients = ShapeFunctionsLocalGradients(shape_functions_gradients, rResult ); + noalias(DN) = prod(X,shape_functions_gradients); + + noalias(J) = prod(trans(DN),DN); + Vector res = prod(trans(DN),CurrentGlobalCoords); + + // Deteminant of Jacobian + const double det_j = J( 0, 0 ) * J( 1, 1 ) - J( 0, 1 ) * J( 1, 0 ); + + // Filling matrix + invJ( 0, 0 ) = ( J( 1, 1 ) ) / ( det_j ); + invJ( 1, 0 ) = -( J( 1, 0 ) ) / ( det_j ); + invJ( 0, 1 ) = -( J( 0, 1 ) ) / ( det_j ); + invJ( 1, 1 ) = ( J( 0, 0 ) ) / ( det_j ); + + DeltaXi( 0 ) = invJ( 0, 0 ) * res[0] + invJ( 0, 1 ) * res[1]; + DeltaXi( 1 ) = invJ( 1, 0 ) * res[0] + invJ( 1, 1 ) * res[1]; + + rResult[0] += DeltaXi[0]; + rResult[1] += DeltaXi[1]; + + if ( norm_2( DeltaXi ) > 300 ) + { + if (IsInside == false && k > 0) + { + std::cout << "detJ =\t" << det_j << " DeltaX =\t" << DeltaXi << " stopping calculation. Iteration:\t" << k << std::endl; + } + break; + } + + if ( norm_2( DeltaXi ) < tol ) + { + break; + } + } + + return( rResult ); + } + /** * TODO: implemented but not yet tested */ @@ -1604,14 +1610,10 @@ template class Quadrilateral3D4 * @return the vector of the gradients of all shape functions * in each integration point */ - static ShapeFunctionsGradientsType - CalculateShapeFunctionsIntegrationPointsLocalGradients( - typename BaseType::IntegrationMethod ThisMethod ) + static ShapeFunctionsGradientsType CalculateShapeFunctionsIntegrationPointsLocalGradients( typename BaseType::IntegrationMethod ThisMethod ) { - IntegrationPointsContainerType all_integration_points = - AllIntegrationPoints(); - IntegrationPointsArrayType integration_points = - all_integration_points[ThisMethod]; + IntegrationPointsContainerType all_integration_points = AllIntegrationPoints(); + IntegrationPointsArrayType integration_points = all_integration_points[ThisMethod]; //number of integration points const int integration_points_number = integration_points.size(); ShapeFunctionsGradientsType d_shape_f_values( integration_points_number ); @@ -1624,12 +1626,12 @@ template class Quadrilateral3D4 Matrix result( 4, 2 ); result( 0, 0 ) = -0.25 * ( 1.0 - integration_points[pnt].Y() ); result( 0, 1 ) = -0.25 * ( 1.0 - integration_points[pnt].X() ); - result( 1, 0 ) = 0.25 * ( 1.0 - integration_points[pnt].Y() ); + result( 1, 0 ) = 0.25 * ( 1.0 - integration_points[pnt].Y() ); result( 1, 1 ) = -0.25 * ( 1.0 + integration_points[pnt].X() ); - result( 2, 0 ) = 0.25 * ( 1.0 + integration_points[pnt].Y() ); - result( 2, 1 ) = 0.25 * ( 1.0 + integration_points[pnt].X() ); + result( 2, 0 ) = 0.25 * ( 1.0 + integration_points[pnt].Y() ); + result( 2, 1 ) = 0.25 * ( 1.0 + integration_points[pnt].X() ); result( 3, 0 ) = -0.25 * ( 1.0 + integration_points[pnt].Y() ); - result( 3, 1 ) = 0.25 * ( 1.0 - integration_points[pnt].X() ); + result( 3, 1 ) = 0.25 * ( 1.0 - integration_points[pnt].X() ); d_shape_f_values[pnt] = result; } diff --git a/kratos/geometries/quadrilateral_3d_8.h b/kratos/geometries/quadrilateral_3d_8.h index 79a204109b43..6dfb712af501 100644 --- a/kratos/geometries/quadrilateral_3d_8.h +++ b/kratos/geometries/quadrilateral_3d_8.h @@ -309,21 +309,21 @@ template class Quadrilateral3D8 return typename BaseType::Pointer( new Quadrilateral3D8( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Quadrilateral3D8< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Quadrilateral3D8< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** * :TODO: the lumpig factors need to be reviewed and @@ -542,7 +542,7 @@ template class Quadrilateral3D8 //loop over all nodes for ( unsigned int i = 0; i < this->PointsNumber(); i++ ) { - Point<3> dummyPoint = this->GetPoint( i ); + Point dummyPoint = this->GetPoint( i ); J( 0, 0 ) += ( dummyPoint[orientation[0]] ) * ( shape_functions_gradients( i, 0 ) ); J( 0, 1 ) += ( dummyPoint[orientation[0]] ) * ( shape_functions_gradients( i, 1 ) ); J( 1, 0 ) += ( dummyPoint[orientation[1]] ) * ( shape_functions_gradients( i, 0 ) ); diff --git a/kratos/geometries/quadrilateral_3d_9.h b/kratos/geometries/quadrilateral_3d_9.h index c9b1f0a8d093..a59f4a68a2e2 100644 --- a/kratos/geometries/quadrilateral_3d_9.h +++ b/kratos/geometries/quadrilateral_3d_9.h @@ -318,21 +318,21 @@ template class Quadrilateral3D9 : public Geometry return typename BaseType::Pointer( new Quadrilateral3D9( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Quadrilateral3D9< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Quadrilateral3D9< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** @@ -540,7 +540,7 @@ template class Quadrilateral3D9 : public Geometry //loop over all nodes for ( unsigned int i = 0; i < this->PointsNumber(); i++ ) { - Point<3> dummyPoint = this->GetPoint( i ); + Point dummyPoint = this->GetPoint( i ); J( 0, 0 ) += ( dummyPoint[orientation[0]] ) * ( shape_functions_gradients( i, 0 ) ); J( 0, 1 ) += ( dummyPoint[orientation[0]] ) * ( shape_functions_gradients( i, 1 ) ); J( 1, 0 ) += ( dummyPoint[orientation[1]] ) * ( shape_functions_gradients( i, 0 ) ); diff --git a/kratos/geometries/quadrilateral_interface_2d_4.h b/kratos/geometries/quadrilateral_interface_2d_4.h index 715b91052521..dea716c5972b 100644 --- a/kratos/geometries/quadrilateral_interface_2d_4.h +++ b/kratos/geometries/quadrilateral_interface_2d_4.h @@ -347,21 +347,21 @@ template class QuadrilateralInterface2D4 return typename BaseType::Pointer( new QuadrilateralInterface2D4( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new QuadrilateralInterface2D4< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new QuadrilateralInterface2D4< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** diff --git a/kratos/geometries/quadrilateral_interface_3d_4.h b/kratos/geometries/quadrilateral_interface_3d_4.h index 2350bb4c5bc8..87a703a95804 100644 --- a/kratos/geometries/quadrilateral_interface_3d_4.h +++ b/kratos/geometries/quadrilateral_interface_3d_4.h @@ -355,21 +355,21 @@ template class QuadrilateralInterface3D4 return typename BaseType::Pointer( new QuadrilateralInterface3D4( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new QuadrilateralInterface3D4< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new QuadrilateralInterface3D4< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** diff --git a/kratos/geometries/sphere_3d_1.h b/kratos/geometries/sphere_3d_1.h index 8604e3390807..bcf4fb57281f 100644 --- a/kratos/geometries/sphere_3d_1.h +++ b/kratos/geometries/sphere_3d_1.h @@ -261,21 +261,21 @@ class Sphere3D1 : public Geometry return typename BaseType::Pointer( new Sphere3D1( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Sphere3D1< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Sphere3D1< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors( Vector& rResult ) const override diff --git a/kratos/geometries/tetrahedra_3d_10.h b/kratos/geometries/tetrahedra_3d_10.h index 8c7d80497ecb..8937cf79dcd5 100644 --- a/kratos/geometries/tetrahedra_3d_10.h +++ b/kratos/geometries/tetrahedra_3d_10.h @@ -310,21 +310,21 @@ template class Tetrahedra3D10 : public Geometry return typename BaseType::Pointer( new Tetrahedra3D10( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Tetrahedra3D10< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Tetrahedra3D10< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix diff --git a/kratos/geometries/tetrahedra_3d_4.h b/kratos/geometries/tetrahedra_3d_4.h index 171898e010f4..d950034f7ac8 100644 --- a/kratos/geometries/tetrahedra_3d_4.h +++ b/kratos/geometries/tetrahedra_3d_4.h @@ -285,21 +285,21 @@ template class Tetrahedra3D4 : public Geometry return typename BaseType::Pointer(new Tetrahedra3D4(ThisPoints)); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Tetrahedra3D4< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Tetrahedra3D4< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } //lumping factors for the calculation of the lumped mass matrix Vector& LumpingFactors(Vector& rResult) const override @@ -1129,7 +1129,7 @@ template class Tetrahedra3D4 : public Geometry } - bool HasIntersection(const Point<3, double>& rLowPoint, const Point<3, double>& rHighPoint) override + bool HasIntersection(const Point& rLowPoint, const Point& rHighPoint) override { return true; } diff --git a/kratos/geometries/triangle_2d_3.h b/kratos/geometries/triangle_2d_3.h index 1d1b6af80a46..f9484afd391d 100644 --- a/kratos/geometries/triangle_2d_3.h +++ b/kratos/geometries/triangle_2d_3.h @@ -316,21 +316,21 @@ template class Triangle2D3 return typename BaseType::Pointer( new Triangle2D3( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Triangle2D3< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Triangle2D3< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** * returns the local coordinates of all nodes of the current geometry @@ -428,33 +428,31 @@ template class Triangle2D3 geom_2[0].Coordinates(), geom_2[1].Coordinates(), geom_2[2].Coordinates()); } - /// detect if triangle and box are intersected - bool HasIntersection( const Point<3, double>& rLowPoint, const Point<3, double>& rHighPoint ) override { - //return true; - const BaseType& geom_1 = *this; - //std::size_t dim = geom_1.WorkingSpaceDimension(); - - Point<3, double> boxcenter; - Point<3, double> boxhalfsize; + /** + * Check if an axis-aliged bounding box (AABB) intersects a triangle + * + * Based on code develop by Moller: http://fileadmin.cs.lth.se/cs/personal/tomas_akenine-moller/code/tribox3.txt + * and the article "A Fast Triangle-Triangle Intersection Test", SIGGRAPH '05 ACM, Art.8, 2005: + * http://fileadmin.cs.lth.se/cs/personal/tomas_akenine-moller/code/tribox_tam.pdf + * + * @return bool if the triangle overlaps a box + * @param rLowPoint first corner of the box + * @param rHighPoint second corner of the box + */ + bool HasIntersection( const Point& rLowPoint, const Point& rHighPoint ) override + { + Point boxcenter; + Point boxhalfsize; boxcenter[0] = 0.50 * (rLowPoint[0] + rHighPoint[0]); boxcenter[1] = 0.50 * (rLowPoint[1] + rHighPoint[1]); boxcenter[2] = 0.00; - boxhalfsize[0] = 0.50 * (rHighPoint[0] - rLowPoint[0]); boxhalfsize[1] = 0.50 * (rHighPoint[1] - rLowPoint[1]); boxhalfsize[2] = 0.00; - std::size_t size = geom_1.size(); - std::vector > triverts; - triverts.resize(size); - for(unsigned int i = 0; i< size; i++ ) - triverts[i] = geom_1.GetPoint(i); - - bool result = false; - result = TriBoxOverlap(boxcenter, boxhalfsize, triverts); - return result; + return TriBoxOverlap(boxcenter, boxhalfsize); } /** This method calculates and returns length, area or volume of @@ -1475,12 +1473,12 @@ template class Triangle2D3 * */ - bool NoDivTriTriIsect( const Point<3,double>& V0, - const Point<3,double>& V1, - const Point<3,double>& V2, - const Point<3,double>& U0, - const Point<3,double>& U1, - const Point<3,double>& U2) + bool NoDivTriTriIsect( const Point& V0, + const Point& V1, + const Point& V2, + const Point& U0, + const Point& U1, + const Point& U2) { short index; double d1,d2; @@ -1698,12 +1696,12 @@ template class Triangle2D3 //************************************************************************************* bool coplanar_tri_tri( const array_1d& N, - const Point<3,double>& V0, - const Point<3,double>& V1, - const Point<3,double>& V2, - const Point<3,double>& U0, - const Point<3,double>& U1, - const Point<3,double>& U2) + const Point& V0, + const Point& V1, + const Point& V2, + const Point& U0, + const Point& U1, + const Point& U2) { array_1d A; short i0,i1; @@ -1762,11 +1760,11 @@ template class Triangle2D3 bool Edge_Against_Tri_Edges(const short& i0, const short& i1, - const Point<3,double>& V0, - const Point<3,double>& V1, - const Point<3,double>&U0, - const Point<3,double>&U1, - const Point<3,double>&U2) + const Point& V0, + const Point& V1, + const Point&U0, + const Point&U1, + const Point&U2) { double Ax,Ay,Bx,By,Cx,Cy,e,d,f; @@ -1803,9 +1801,9 @@ template class Triangle2D3 double& f, const short& i0, const short& i1, - const Point<3,double>&V0, - const Point<3,double>&U0, - const Point<3,double>&U1) + const Point&V0, + const Point&U0, + const Point&U1) { Bx=U0[i0]-U1[i0]; By=U0[i1]-U1[i1]; @@ -1840,10 +1838,10 @@ template class Triangle2D3 bool Point_In_Tri(const short& i0, const short& i1, - const Point<3,double>& V0, - const Point<3,double>& U0, - const Point<3,double>& U1, - const Point<3,double>& U2) + const Point& V0, + const Point& U0, + const Point& U1, + const Point& U2) { double a,b,c,d0,d1,d2; // is T1 completly inside T2? // @@ -1873,252 +1871,98 @@ template class Triangle2D3 //************************************************************************************* //************************************************************************************* - - inline bool TriBoxOverlap(Point<3, double>& boxcenter, Point<3, double>& boxhalfsize, std::vector< Point<3, double> >& triverts) - { - - /* use separating axis theorem to test overlap between triangle and box */ - /* need to test for overlap in these directions: */ - /* 1) the {x,y,z}-directions (actually, since we use the AABB of the triangle */ - /* we do not even need to test these) */ - /* 2) normal of the triangle */ - /* 3) crossproduct(edge from tri, {x,y,z}-directin) */ - /* this gives 3x3=9 more tests */ - - double min,max,d,p0,p1,p2,rad,fex,fey,fez; - array_1d v0,v1,v2; - array_1d axis; - array_1d normal, e0, e1 ,e2; -// -// /* This is the fastest branch on Sun */ -// /* move everything so that the boxcenter is in (0,0,0) */ - noalias(v0) = triverts[0]- boxcenter; - noalias(v1) = triverts[1]- boxcenter; - noalias(v2) = triverts[2]- boxcenter; -// -// /* compute triangle edges */ - noalias(e0) = v1 - v0; /* tri edge 0 */ - noalias(e1) = v2 - v1; /* tri edge 1 */ - noalias(e2) = v0 - v2; /* tri edge 2 */ -// -// /* Bullet 3: */ -// /* test the 9 tests first (this was faster) */ - fex = fabs(e0[0]); - fey = fabs(e0[1]); - fez = fabs(e0[2]); - //AXISTEST_X01(e0[2], e0[1], fez, fey); - if (AxisTest_X01(e0[2], e0[1], fez, fey, p0, p2, min,max, rad, v0, v2, boxhalfsize)==0) return false; - //AXISTEST_Y02(e0[2], e0[0], fez, fex); - if(AxisTest_Y02( e0[2], e0[0], fez, fex, p0, p2, min,max, rad, v0, v2, boxhalfsize)==0) return false; - //AXISTEST_Z12(e0[1], e0[0], fey, fex); - //if(AxisTest_Z12(e0[1], e0[0], fey, fex, p1, p2, min, max, rad, v1,v2, boxhalfsize )==0) return false; - - - - fex = fabs(e1[0]); - fey = fabs(e1[1]); - fez = fabs(e1[2]); - //AXISTEST_X01(e1[2], e1[1], fez, fey); - if( AxisTest_X01(e1[2], e1[1], fez, fey, p0, p2, min,max, rad, v0, v2, boxhalfsize)==0) return false; - //AXISTEST_Y02(e1[2], e1[0], fez, fex); - if(AxisTest_Y02( e1[2], e1[0], fez, fex, p0, p2, min,max, rad, v0, v2, boxhalfsize)==0) return false; - //AXISTEST_Z0(e1[1], e1[0], fey, fex); - //if( AxisTest_Z0(e1[1], e1[0], fey, fex, p0, p1, min, max, rad, v0, v1,boxhalfsize)==0) return false; - - - fex = fabs(e2[0]); - fey = fabs(e2[1]); - fez = fabs(e2[2]); - //AXISTEST_X2(e2[2], e2[1], fez, fey); - if (AxisTest_X2(e2[2], e2[1], fez, fey, p0, p1, min, max, rad, v0, v1, boxhalfsize )==0) return false; - //AXISTEST_Y1(e2[2], e2[0], fez, fex); - if (AxisTest_Y1(e2[2], e2[0], fez, fex, p0, p1, min, max, rad, v0, v1, boxhalfsize )==0) return false; - //AXISTEST_Z12(e2[1], e2[0], fey, fex); - //if(AxisTest_Z12(e2[1], e2[0], fey, fex, p1, p2, min, max, rad, v1,v2, boxhalfsize ) ==0) return false; - - - /* Bullet 1: */ - /* first test overlap in the {x,y,z}-directions */ - /* find min, max of the triangle each direction, and test for overlap in */ - /* that direction -- this is equivalent to testing a minimal AABB around */ - /* the triangle against the AABB */ - - /* test in X-direction */ - FindMinMax(v0[0],v1[0],v2[0],min,max); - if(min>boxhalfsize[0] || max<-boxhalfsize[0]) return false; - - /* test in Y-direction */ - FindMinMax(v0[1],v1[1],v2[1],min,max); - if(min>boxhalfsize[1] || max<-boxhalfsize[1]) return false; - - /* test in Z-direction */ - FindMinMax(v0[2],v1[2],v2[2],min,max); - if(min>boxhalfsize[2] || max<-boxhalfsize[2]) return false; - - /* Bullet 2: */ - /* test if the box intersects the plane of the triangle */ - /* compute plane equation of triangle: normal*x+d=0 */ - MathUtils::CrossProduct(normal, e0, e1); - d=-inner_prod(normal,v0); /* plane eq: normal.x+d=0 */ - if(!planeBoxOverlap(normal,d,boxhalfsize)) return false; - - return true; /* box and triangle overlaps */ - } - - - -//************************************************************************************* -//************************************************************************************* - - void FindMinMax(const double& x0, - const double& x1, - const double& x2, - double& min, - double& max) - { - min = max = x0; - if(x1max) max=x1; - if(x2max) max=x2; - } - -//************************************************************************************* -//************************************************************************************* - - bool planeBoxOverlap(const array_1d& normal, const double& d, const array_1d& maxbox) - { - int q; - array_1d vmin,vmax; - for(q=0; q<=2; q++) - { - if(normal[q]>0.00) - { - vmin[q]=-maxbox[q]; - vmax[q]= maxbox[q]; - } - else - { - vmin[q]=maxbox[q]; - vmax[q]=-maxbox[q]; - } - } - if(inner_prod(normal,vmin)+d>0.00) return false; - if(inner_prod(normal,vmax)+d>=0.00) return true; - - return false; - } -//************************************************************************************* -//************************************************************************************* - - /*======================== X-tests ========================*/ - unsigned int AxisTest_X01(double& a, double& b, - double& fa, double& fb, - double& p0, double& p2, - double& min, double& max, double& rad, - array_1d& v0, - array_1d& v2, - Point<3, double>& boxhalfsize - ) + /** + * @see HasIntersection + * use separating axis theorem to test overlap between triangle and box + * need to test for overlap in these directions: + * 1) the {x,y,(z)}-directions + * 2) normal of the triangle + * 3) crossproduct (edge from tri, {x,y,z}-direction) gives 3x3=9 more tests + */ + inline bool TriBoxOverlap(Point& rBoxCenter, Point& rBoxHalfSize) { - p0 = a*v0[1] - b*v0[2]; - p2 = a*v2[1] - b*v2[2]; - if(p0rad || max<-rad) return 0; - else return 1; - } - - unsigned int AxisTest_X2(double& a, double& b, - double& fa, double& fb, - double& p0, double& p1, - double& min, double& max, double& rad, - array_1d& v0, - array_1d& v1, - Point<3, double>& boxhalfsize - ) + double abs_ex, abs_ey; + array_1d vert0, vert1, vert2; + array_1d edge0, edge1, edge2; + std::pair min_max; + + // move everything so that the boxcenter is in (0,0,0) + noalias(vert0) = this->GetPoint(0) - rBoxCenter; + noalias(vert1) = this->GetPoint(1) - rBoxCenter; + noalias(vert2) = this->GetPoint(2) - rBoxCenter; + + // compute triangle edges + noalias(edge0) = vert1 - vert0; + noalias(edge1) = vert2 - vert1; + noalias(edge2) = vert0 - vert2; + + // Bullet 3: + // test the 9 tests first (this was faster) + // We are only interested on z-axis test, which defines the {x,y} plane + // Note that projections onto crossproduct tri-{x,y} are always 0: + // that means there is no separating axis on X,Y-axis tests + abs_ex = std::abs(edge0[0]); + abs_ey = std::abs(edge0[1]); + if (!AxisTestZ(edge0[0],edge0[1],abs_ex,abs_ey,vert0,vert2,rBoxHalfSize)) return false; + + abs_ex = std::abs(edge1[0]); + abs_ey = std::abs(edge1[1]); + if (!AxisTestZ(edge1[0],edge1[1],abs_ex,abs_ey,vert1,vert0,rBoxHalfSize)) return false; + + abs_ex = std::abs(edge2[0]); + abs_ey = std::abs(edge2[1]); + if (!AxisTestZ(edge2[0],edge2[1],abs_ex,abs_ey,vert2,vert1,rBoxHalfSize)) return false; + + // Bullet 1: + // first test overlap in the {x,y,(z)}-directions + // find min, max of the triangle each direction, and test for overlap in + // that direction -- this is equivalent to testing a minimal AABB around + // the triangle against the AABB + + // test in X-direction + min_max = std::minmax({vert0[0],vert1[0],vert2[0]}); + if(min_max.first>rBoxHalfSize[0] || min_max.second<-rBoxHalfSize[0]) return false; + + // test in Y-direction + min_max = std::minmax({vert0[1],vert1[1],vert2[1]}); + if(min_max.first>rBoxHalfSize[1] || min_max.second<-rBoxHalfSize[1]) return false; + + // test in Z-direction + // we do not consider rBoxHalfSize[2] since we are working in 2D + + // Bullet 2: + // test if the box intersects the plane of the triangle + // compute plane equation of triangle: normal*x+d=0 + // Triangle and box are on the {x-y} plane, so this test won't return false + + return true; // box and triangle overlaps + } + + /** AxisTestZ + * This method return true if there is a separating axis + * + * @param rEdgeX, rEdgeY: i-edge corrdinates + * @param rAbsEdgeX, rAbsEdgeY: i-edge abs coordinates + * @param rVertA: i vertex + * @param rVertB: i+1 vertex (omitted, proj_a = proj_b) + * @param rVertC: i+2 vertex + * @param rBoxHalfSize + */ + bool AxisTestZ(double& rEdgeX, double& rEdgeY, + double& rAbsEdgeX, double& rAbsEdgeY, + array_1d& rVertA, + array_1d& rVertC, + Point& rBoxHalfSize) { - p0 = a*v0[1] - b*v0[2]; - p1 = a*v1[1] - b*v1[2]; - if(p0rad || max<-rad) return 0; - else return 1; - } -//************************************************************************************* -//************************************************************************************* + double proj_a, proj_c, rad; + proj_a = rEdgeX*rVertA[1] - rEdgeY*rVertA[0]; + proj_c = rEdgeX*rVertC[1] - rEdgeY*rVertC[0]; + std::pair min_max = std::minmax(proj_a, proj_c); - /*======================== Y-tests ========================*/ - unsigned int AxisTest_Y02(double& a, double& b, - double& fa, double& fb, - double& p0, double& p2, - double& min, double& max, double& rad, - array_1d& v0, - array_1d& v2, - Point<3, double>& boxhalfsize - ) - { + rad = rAbsEdgeY*rBoxHalfSize[0] + rAbsEdgeX*rBoxHalfSize[1]; - p0 = -a*v0[0] + b*v0[2]; - p2 = -a*v2[0] + b*v2[2]; - if(p0rad || max<-rad) return 0; - else return 1; - } - - unsigned int AxisTest_Y1(double& a, double& b, - double& fa, double& fb, - double& p0, double& p1, - double& min, double& max, double& rad, - array_1d& v0, - array_1d& v1, - Point<3, double>& boxhalfsize - ) - - { - p0 = -a*v0[0] + b*v0[2]; - p1 = -a*v1[0] + b*v1[2]; - if(p0rad || max<-rad) return 0; - else return 1; + if(min_max.first>rad || min_max.second<-rad) return false; + else return true; } /** Implements the calculus of the semiperimeter diff --git a/kratos/geometries/triangle_2d_6.h b/kratos/geometries/triangle_2d_6.h index 14e24f2d25fa..d146615e8f5e 100644 --- a/kratos/geometries/triangle_2d_6.h +++ b/kratos/geometries/triangle_2d_6.h @@ -328,21 +328,21 @@ template class Triangle2D6 return typename BaseType::Pointer( new Triangle2D6( ThisPoints ) ); } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Triangle2D6< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Triangle2D6< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** * returns the local coordinates of all nodes of the current geometry diff --git a/kratos/geometries/triangle_3d_3.h b/kratos/geometries/triangle_3d_3.h index ea8f905d49be..930b5c05694b 100644 --- a/kratos/geometries/triangle_3d_3.h +++ b/kratos/geometries/triangle_3d_3.h @@ -315,21 +315,21 @@ template class Triangle3D3 } - boost::shared_ptr< Geometry< Point<3> > > Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; + // boost::shared_ptr< Geometry< Point<3> > > Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); - } + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // NewPoints.push_back(boost::make_shared< Point<3> >(( *this )[i])); + // } - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Triangle3D3< Point<3> >( NewPoints ) ); + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Triangle3D3< Point<3> >( NewPoints ) ); - return p_clone; - } + // return p_clone; + // } /** * returns the local coordinates of all nodes of the current geometry @@ -628,6 +628,32 @@ template class Triangle3D3 } + /** + * Check if an axis-aliged bounding box (AABB) intersects a triangle + * + * Based on code develop by Moller: http://fileadmin.cs.lth.se/cs/personal/tomas_akenine-moller/code/tribox3.txt + * and the article "A Fast Triangle-Triangle Intersection Test", SIGGRAPH '05 ACM, Art.8, 2005: + * http://fileadmin.cs.lth.se/cs/personal/tomas_akenine-moller/code/tribox_tam.pdf + * + * @return bool if the triangle overlaps a box + * @param rLowPoint first corner of the box + * @param rHighPoint second corner of the box + */ + bool HasIntersection( const Point& rLowPoint, const Point& rHighPoint) override + { + Point boxcenter; + Point boxhalfsize; + + boxcenter[0] = 0.5 * (rLowPoint[0] + rHighPoint[0]); + boxcenter[1] = 0.5 * (rLowPoint[1] + rHighPoint[1]); + boxcenter[2] = 0.5 * (rLowPoint[2] + rHighPoint[2]); + + boxhalfsize[0] = 0.5 * (rHighPoint[0] - rLowPoint[0]); + boxhalfsize[1] = 0.5 * (rHighPoint[1] - rLowPoint[1]); + boxhalfsize[2] = 0.5 * (rHighPoint[2] - rLowPoint[2]); + + return TriBoxOverlap(boxcenter, boxhalfsize); + } /// Quality functions @@ -1783,15 +1809,6 @@ template class Triangle3D3 Quadrature >::GenerateIntegrationPoints() } }; -// IntegrationPointsContainerType integration_points = -// { -// Quadrature< TriangleGaussLegendreIntegrationPoints<1>, -// 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, -// 2, IntegrationPoint<3> >::GenerateIntegrationPoints(), -// Quadrature, -// 2, IntegrationPoint<3> >::GenerateIntegrationPoints() -// }; return integration_points; } @@ -2044,11 +2061,11 @@ template class Triangle3D3 bool EdgeToTriangleEdgesCheck(const short& i0, const short& i1, - const Point<3, double>& V0, - const Point<3, double>& V1, - const Point<3, double>&U0, - const Point<3, double>&U1, - const Point<3, double>&U2) + const Point& V0, + const Point& V1, + const Point&U0, + const Point&U1, + const Point&U2) { double Ax, Ay, Bx, By, Cx, Cy, e, d, f; @@ -2081,9 +2098,9 @@ template class Triangle3D3 double& f, const short& i0, const short& i1, - const Point<3, double>&V0, - const Point<3, double>&U0, - const Point<3, double>&U1) + const Point& V0, + const Point& U0, + const Point& U1) { Bx = U0[i0] - U1[i0]; By = U0[i1] - U1[i1]; @@ -2112,12 +2129,205 @@ template class Triangle3D3 return false; } +//************************************************************************************* +//************************************************************************************* + + /** + * @see HasIntersection + * use separating axis theorem to test overlap between triangle and box + * need to test for overlap in these directions: + * 1) the {x,y,(z)}-directions + * 2) normal of the triangle + * 3) crossproduct (edge from tri, {x,y,z}-direction) gives 3x3=9 more tests + */ + inline bool TriBoxOverlap(Point& rBoxCenter, Point& rBoxHalfSize) + { + double abs_ex, abs_ey, abs_ez, distance; + array_1d vert0, vert1, vert2; + array_1d edge0, edge1, edge2, normal; + std::pair min_max; + + // move everything so that the boxcenter is in (0,0,0) + noalias(vert0) = this->GetPoint(0) - rBoxCenter; + noalias(vert1) = this->GetPoint(1) - rBoxCenter; + noalias(vert2) = this->GetPoint(2) - rBoxCenter; + + // compute triangle edges + noalias(edge0) = vert1 - vert0; + noalias(edge1) = vert2 - vert1; + noalias(edge2) = vert0 - vert2; + + // Bullet 3: + // test the 12 tests first (this was faster) + abs_ex = std::abs(edge0[0]); + abs_ey = std::abs(edge0[1]); + abs_ez = std::abs(edge0[2]); + if (!AxisTestX(edge0[1],edge0[2],abs_ey,abs_ez,vert0,vert2,rBoxHalfSize)) return false; + if (!AxisTestY(edge0[0],edge0[2],abs_ex,abs_ez,vert0,vert2,rBoxHalfSize)) return false; + if (!AxisTestZ(edge0[0],edge0[1],abs_ex,abs_ey,vert0,vert2,rBoxHalfSize)) return false; + + abs_ex = std::abs(edge1[0]); + abs_ey = std::abs(edge1[1]); + abs_ez = std::abs(edge1[2]); + if (!AxisTestX(edge1[1],edge1[2],abs_ey,abs_ez,vert1,vert0,rBoxHalfSize)) return false; + if (!AxisTestY(edge1[0],edge1[2],abs_ex,abs_ez,vert1,vert0,rBoxHalfSize)) return false; + if (!AxisTestZ(edge1[0],edge1[1],abs_ex,abs_ey,vert1,vert0,rBoxHalfSize)) return false; + + abs_ex = std::abs(edge2[0]); + abs_ey = std::abs(edge2[1]); + abs_ez = std::abs(edge2[2]); + if (!AxisTestX(edge2[1],edge2[2],abs_ey,abs_ez,vert2,vert1,rBoxHalfSize)) return false; + if (!AxisTestY(edge2[0],edge2[2],abs_ex,abs_ez,vert2,vert1,rBoxHalfSize)) return false; + if (!AxisTestZ(edge2[0],edge2[1],abs_ex,abs_ey,vert2,vert1,rBoxHalfSize)) return false; + + // Bullet 1: + // first test overlap in the {x,y,z}-directions + // find min, max of the triangle for each direction, and test for + // overlap in that direction -- this is equivalent to testing a minimal + // AABB around the triangle against the AABB + + // test in X-direction + min_max = std::minmax({vert0[0], vert1[0], vert2[0]}); + if(min_max.first>rBoxHalfSize[0] || min_max.second<-rBoxHalfSize[0]) return false; + + // test in Y-direction + min_max = std::minmax({vert0[0], vert1[0], vert2[0]}); + if(min_max.first>rBoxHalfSize[1] || min_max.second<-rBoxHalfSize[1]) return false; + + // test in Z-direction + min_max = std::minmax({vert0[0], vert1[0], vert2[0]}); + if(min_max.first>rBoxHalfSize[2] || min_max.second<-rBoxHalfSize[2]) return false; + + // Bullet 2: + // test if the box intersects the plane of the triangle + // compute plane equation of triangle: normal*x+distance=0 + MathUtils::CrossProduct(normal, edge0, edge1); + distance = -inner_prod(normal, vert0); + if(!PlaneBoxOverlap(normal, distance, rBoxHalfSize)) return false; + + return true; // box and triangle overlaps + } + + /** + * Check if a plane intersects a box + * @see TriBoxOverlap + * + * @return bool intersection flagg + * @param rNormal the plane normal + * @param rDist distance to origin + * @param rMaxBox box corner from the origin + * + * plane equation: rNormal*x+rDist=0 + */ + bool PlaneBoxOverlap(const array_1d& rNormal, const double& rDist, const array_1d& rMaxBox) + { + array_1d vmin, vmax; + for(int q = 0; q < 3; q++) + { + if(rNormal[q] > 0.00) + { + vmin[q] = -rMaxBox[q]; + vmax[q] = rMaxBox[q]; + } + else + { + vmin[q] = rMaxBox[q]; + vmax[q] = -rMaxBox[q]; + } + } + if(inner_prod(rNormal, vmin) + rDist > 0.00) return false; + if(inner_prod(rNormal, vmax) + rDist >= 0.00) return true; + + return false; + } + + /** AxisTestX + * This method return true if there is a separating axis + * + * @param rEdgeY, rEdgeZ: i-edge corrdinates + * @param rAbsEdgeY, rAbsEdgeZ: i-edge abs coordinates + * @param rVertA: i vertex + * @param rVertB: i+1 vertex (omitted, proj_a = proj_b) + * @param rVertC: i+2 vertex + * @param rBoxHalfSize + */ + bool AxisTestX(double& rEdgeY, double& rEdgeZ, + double& rAbsEdgeY, double& rAbsEdgeZ, + array_1d& rVertA, + array_1d& rVertC, + Point& rBoxHalfSize) + { + double proj_a, proj_c, rad; + proj_a = rEdgeY*rVertA[2] - rEdgeZ*rVertA[1]; + proj_c = rEdgeY*rVertC[2] - rEdgeZ*rVertC[1]; + std::pair min_max = std::minmax(proj_a, proj_c); + + rad = rAbsEdgeZ*rBoxHalfSize[1] + rAbsEdgeY*rBoxHalfSize[2]; + + if(min_max.first>rad || min_max.second<-rad) return false; + else return true; + } + + /** AxisTestY + * This method return true if there is a separating axis + * + * @param rEdgeX, rEdgeZ: i-edge corrdinates + * @param rAbsEdgeX, rAbsEdgeZ: i-edge fabs coordinates + * @param rVertA: i vertex + * @param rVertB: i+1 vertex (omitted, proj_a = proj_b) + * @param rVertC: i+2 vertex + * @param rBoxHalfSize + */ + bool AxisTestY(double& rEdgeX, double& rEdgeZ, + double& rAbsEdgeX, double& rAbsEdgeZ, + array_1d& rVertA, + array_1d& rVertC, + Point& rBoxHalfSize) + { + double proj_a, proj_c, rad; + proj_a = rEdgeZ*rVertA[0] - rEdgeX*rVertA[2]; + proj_c = rEdgeZ*rVertC[0] - rEdgeX*rVertC[2]; + std::pair min_max = std::minmax(proj_a, proj_c); + + rad = rAbsEdgeZ*rBoxHalfSize[0] + rAbsEdgeX*rBoxHalfSize[2]; + + if(min_max.first>rad || min_max.second<-rad) return false; + else return true; + } + + /** AxisTestZ + * This method return true if there is a separating axis + * + * @param rEdgeX, rEdgeY: i-edge corrdinates + * @param rAbsEdgeX, rAbsEdgeY: i-edge fabs coordinates + * @param rVertA: i vertex + * @param rVertB: i+1 vertex (omitted, proj_a = proj_b) + * @param rVertC: i+2 vertex + * @param rBoxHalfSize + */ + bool AxisTestZ(double& rEdgeX, double& rEdgeY, + double& rAbsEdgeX, double& rAbsEdgeY, + array_1d& rVertA, + array_1d& rVertC, + Point& rBoxHalfSize) + { + double proj_a, proj_c, rad; + proj_a = rEdgeX*rVertA[1] - rEdgeY*rVertA[0]; + proj_c = rEdgeX*rVertC[1] - rEdgeY*rVertC[0]; + std::pair min_max = std::minmax(proj_a, proj_c); + + rad = rAbsEdgeY*rBoxHalfSize[0] + rAbsEdgeX*rBoxHalfSize[1]; + + if(min_max.first>rad || min_max.second<-rad) return false; + else return true; + } + // TODO: I should move this class to a separate file but is out of scope of this branch class Plane3D { public: using VectorType = array_1d; - using PointType = Point<3>; + using PointType = Point; Plane3D(VectorType const& TheNormal, double DistanceToOrigin) :mNormal(TheNormal), mD(DistanceToOrigin) {} Plane3D() = delete; diff --git a/kratos/geometries/triangle_3d_6.h b/kratos/geometries/triangle_3d_6.h index 4530c0d5d25a..ae8438a666c7 100644 --- a/kratos/geometries/triangle_3d_6.h +++ b/kratos/geometries/triangle_3d_6.h @@ -328,22 +328,22 @@ template class Triangle3D6 } - Geometry< Point<3> >::Pointer Clone() const override - { - Geometry< Point<3> >::PointsArrayType NewPoints; - - //making a copy of the nodes TO POINTS (not Nodes!!!) - for ( IndexType i = 0 ; i < this->size() ; i++ ) - { - Point<3>::Pointer pnew_point = boost::make_shared< Point<3> >(( *this )[i]); - NewPoints.push_back(pnew_point); - } - - //creating a geometry with the new points - Geometry< Point<3> >::Pointer p_clone( new Triangle3D6< Point<3> >( NewPoints ) ); - - return p_clone; - } + // Geometry< Point<3> >::Pointer Clone() const override + // { + // Geometry< Point<3> >::PointsArrayType NewPoints; + + // //making a copy of the nodes TO POINTS (not Nodes!!!) + // for ( IndexType i = 0 ; i < this->size() ; i++ ) + // { + // Point<3>::Pointer pnew_point = boost::make_shared< Point<3> >(( *this )[i]); + // NewPoints.push_back(pnew_point); + // } + + // //creating a geometry with the new points + // Geometry< Point<3> >::Pointer p_clone( new Triangle3D6< Point<3> >( NewPoints ) ); + + // return p_clone; + // } /** * returns the local coordinates of all nodes of the current geometry diff --git a/kratos/includes/define.h b/kratos/includes/define.h index 9149d6b3a33c..3cb445bb9459 100644 --- a/kratos/includes/define.h +++ b/kratos/includes/define.h @@ -330,10 +330,6 @@ catch(...) { Block KRATOS_THROW_ERROR(std::runtime_error, "Unknown error", MoreI KratosComponents::Add(name, reference); \ Serializer::Register(name, reference); - - - - #ifdef KRATOS_REGISTER_IN_PYTHON_VARIABLE #undef KRATOS_REGISTER_IN_PYTHON_VARIABLE #endif @@ -349,7 +345,18 @@ catch(...) { Block KRATOS_THROW_ERROR(std::runtime_error, "Unknown error", MoreI KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Y) \ KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Z) - +#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION +#undef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION +#endif +#define KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag) \ + scope().attr(#flag) = boost::ref(flag) \ + +#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG +#undef KRATOS_REGISTER_IN_PYTHON_FLAG +#endif +#define KRATOS_REGISTER_IN_PYTHON_FLAG(flag) \ + KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag); \ + KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(NOT_##flag) namespace Kratos diff --git a/kratos/includes/enums.h b/kratos/includes/enums.h new file mode 100644 index 000000000000..d35e5a38ba99 --- /dev/null +++ b/kratos/includes/enums.h @@ -0,0 +1,59 @@ +// | / | +// ' / __| _` | __| _ \ __| +// . \ | ( | | ( |\__ \. +// _|\_\_| \__,_|\__|\___/ ____/ +// Multi-Physics +// +// License: BSD License +// Kratos default license: kratos/license.txt +// +// Main authors: Vicente Mataix Ferrandiz +// + +#if !defined(KRATOS_ENUMS_INCLUDED ) +#define KRATOS_ENUMS_INCLUDED + +// System includes + +// External includes + +// Project includes + +namespace Kratos +{ + +///@name Kratos Globals +///@{ + +///@} +///@name Type Definitions +///@{ + +///@} +///@name Enum's +///@{ + +enum HistoricalValues {Historical = 0, NonHistorical = 1}; + +///@} +///@name Functions +///@{ + +///@} +///@name Kratos Classes +///@{ + +///@} +///@name Type Definitions +///@{ + +///@} +///@name Input and output +///@{ + +} // namespace Kratos. + +#endif // KRATOS_ENUMS_INCLUDED defined + + + diff --git a/kratos/includes/gid_gauss_point_container.h b/kratos/includes/gid_gauss_point_container.h index aff2e9e8cbf5..84a1aac34ada 100644 --- a/kratos/includes/gid_gauss_point_container.h +++ b/kratos/includes/gid_gauss_point_container.h @@ -366,6 +366,10 @@ class GidGaussPointsContainer } } + + // Resize first matrix to (0,0) for test below + ValuesOnIntPoint[0].resize(0, 0, false); + } if( mMeshConditions.size() != 0 ) { @@ -374,6 +378,13 @@ class GidGaussPointsContainer { it->GetValueOnIntegrationPoints( rVariable, ValuesOnIntPoint, r_model_part.GetProcessInfo() ); + + if (ValuesOnIntPoint[0].size1() == 0 && ValuesOnIntPoint[0].size2() == 0) + { + // If we aren't getting any results, break + break; + } + for(unsigned int i=0; iWriteJsonString(); - KRATOS_THROW_ERROR(std::invalid_argument, "error found in parsing the json_string, the value of the json string was: \n", msg.str()); + KRATOS_ERROR << "error found in parsing the json_string, the value of the json string was: \n" << msg.str() << std::endl; } return Parameters(pnew_cloned_doc.get(),pnew_cloned_doc); } @@ -182,7 +183,7 @@ class Parameters //******************************************************************************************************* Parameters GetValue(const std::string entry) { - if(this->Has(entry) == false) KRATOS_THROW_ERROR(std::invalid_argument,"--------- ERROR : --------- getting a value that does not exist. entry string : ",entry); + KRATOS_ERROR_IF_NOT(this->Has(entry)) << "--------- ERROR : --------- getting a value that does not exist. entry string : " << entry << std::endl; rapidjson::Value* pvalue = &((*mpvalue)[entry.c_str()]); return Parameters(pvalue, mpdoc); @@ -193,7 +194,7 @@ class Parameters } void SetValue(const std::string entry, const Parameters& other_value) { - if(this->Has(entry) == false) KRATOS_THROW_ERROR(std::invalid_argument,"value must exist to be set. Use AddValue instead",""); + KRATOS_ERROR_IF_NOT(this->Has(entry)) << "value must exist to be set. Use AddValue instead" << std::endl; Parameters tmp(&(*mpvalue)[entry.c_str()],mpdoc); tmp.InternalSetValue(other_value); } @@ -258,6 +259,68 @@ class Parameters { return mpvalue->IsArray(); } + bool IsVector() const + { + if(mpvalue->IsArray()) + { + if (mpvalue->Size() > 0) // check size first before accessing to avoid segfault + { + if((*mpvalue)[0].IsArray()) // mpvalue is a matrix + { + return false; + } + else + { + return true; + } + } + else + { + return true; + } + } + else + { + return false; + } + } + bool IsMatrix() const + { + if(mpvalue->IsArray()) + { + unsigned int nrows = mpvalue->Size(); + if (nrows > 0) + { + if((*mpvalue)[0].IsArray()) // mpvalue is a matrix + { + unsigned int ncols = 0; + if(nrows != 0) + ncols = (*mpvalue)[0].Size(); + + for (unsigned int i=1; iIsObject(); @@ -265,28 +328,66 @@ class Parameters double GetDouble() const { - if(mpvalue->IsNumber() == false) KRATOS_THROW_ERROR(std::invalid_argument,"argument must be a number",""); + KRATOS_ERROR_IF_NOT(mpvalue->IsNumber()) << "argument must be a number" << std::endl; return mpvalue->GetDouble(); } int GetInt() const { - if(mpvalue->IsNumber() == false) KRATOS_THROW_ERROR(std::invalid_argument,"argument must be a number",""); + KRATOS_ERROR_IF_NOT(mpvalue->IsNumber()) << "argument must be a number" << std::endl; return mpvalue->GetInt(); } bool GetBool() const { - if (mpvalue->IsBool() == false) - { - RecursivelyFindValue(*mpdoc, *mpvalue); - KRATOS_THROW_ERROR(std::invalid_argument, "argument must be a bool", ""); - } + KRATOS_ERROR_IF_NOT(mpvalue->IsBool()) << "argument must be a bool" << std::endl; return mpvalue->GetBool(); } std::string GetString() const { - if(mpvalue->IsString() == false) KRATOS_THROW_ERROR(std::invalid_argument,"argument must be a string",""); + KRATOS_ERROR_IF_NOT(mpvalue->IsString()) << "argument must be a string" << std::endl; return mpvalue->GetString(); } + Vector GetVector() const + { + KRATOS_ERROR_IF_NOT(mpvalue->IsArray()) << "argument must be a Vector (a json list)" << std::endl; + + const unsigned int size = mpvalue->Size(); + if (size > 0) + KRATOS_ERROR_IF((*mpvalue)[0].IsArray()) << "argument must be a Vector (a json list), it might be a matrix" << std::endl; + + Vector V(size); + + for(unsigned int i=0; iIsArray()) << "argument must be a Matrix (a json list of lists)" << std::endl; + + const unsigned int nrows = mpvalue->Size(); + unsigned int ncols = 0; + if(nrows != 0) + if((*mpvalue)[0].IsArray()) + ncols = (*mpvalue)[0].Size(); + + Matrix A(nrows,ncols); + + for(unsigned int i=0; iSetString(rapidjson::StringRef(value.c_str())); // mpvalue->SetString(value.c_str(), value.length()); } + void SetVector(const Vector& vec) + { + const unsigned int size = vec.size(); + + mpvalue->SetArray(); + mpvalue->Reserve(size, mpdoc->GetAllocator()); + + for (unsigned int i=0; iPushBack(vec[i], mpdoc->GetAllocator()); + } + } + void SetMatrix(const Matrix& mat) + { + const unsigned int nrows = mat.size1(); + const unsigned int ncols = mat.size2(); + + mpvalue->SetArray(); + mpvalue->Reserve(nrows, mpdoc->GetAllocator()); + + for (unsigned int i=0; iPushBack(0, mpdoc->GetAllocator()); // Pushing back a default element to allocate memory + (*mpvalue)[i].SetArray(); // change that default element to an array + (*mpvalue)[i].Reserve(ncols, mpdoc->GetAllocator()); + + for (unsigned int j=0; jGetAllocator()); + } + } + } iterator begin() { return iterator(this->mpvalue->MemberBegin(), mpdoc);} @@ -321,37 +454,27 @@ class Parameters //methods for array unsigned int size() const { - if(mpvalue->IsArray() == false) - KRATOS_THROW_ERROR(std::invalid_argument,"size can only be queried if the value if of Array type",""); + KRATOS_ERROR_IF_NOT(mpvalue->IsArray()) << "size can only be queried if the value if of Array type" << std::endl; return mpvalue->Size(); } Parameters GetArrayItem(unsigned int index) { - if(mpvalue->IsArray() == false) - KRATOS_THROW_ERROR(std::invalid_argument,"GetArrayItem only makes sense if the value if of Array type","") - else - { - if(index >= mpvalue->Size()) - KRATOS_THROW_ERROR(std::invalid_argument,"index exceeds array size. Index value is : ",index) - return Parameters(&(*mpvalue)[index],mpdoc); - } + KRATOS_ERROR_IF_NOT(mpvalue->IsArray()) << "GetArrayItem only makes sense if the value if of Array type" << std::endl; + KRATOS_ERROR_IF(index >= mpvalue->Size()) << "index exceeds array size. Index value is : " << index << std::endl; + return Parameters(&(*mpvalue)[index],mpdoc); } void SetArrayItem(unsigned int index, const Parameters& other_array_item) { - if(mpvalue->IsArray() == false) - KRATOS_THROW_ERROR(std::invalid_argument,"SetArrayItem only makes sense if the value if of Array type","") - else - { - if(index >= mpdoc->Size()) - KRATOS_THROW_ERROR(std::invalid_argument,"index exceeds array size. Index value is : ",index) + KRATOS_ERROR_IF_NOT(mpvalue->IsArray()) << "SetArrayItem only makes sense if the value if of Array type" << std::endl; + KRATOS_ERROR_IF(index >= mpdoc->Size()) << "index exceeds array size. Index value is : " << index << std::endl; + #if RAPIDJSON_HAS_CXX11_RVALUE_REFS - (*mpvalue)[index] = rapidjson::Value(*other_array_item.GetUnderlyingStorage(), mpdoc->GetAllocator()); + (*mpvalue)[index] = rapidjson::Value(*other_array_item.GetUnderlyingStorage(), mpdoc->GetAllocator()); #else - (*mpvalue)[index].CopyFrom(*other_array_item.GetUnderlyingStorage(), mpdoc->GetAllocator()); + (*mpvalue)[index].CopyFrom(*other_array_item.GetUnderlyingStorage(), mpdoc->GetAllocator()); #endif - } } Parameters operator[](unsigned int index) { @@ -389,7 +512,7 @@ class Parameters msg << this->PrettyPrintJsonString() << std::endl; msg << "defaults against which the current parameters are validated are :" << std::endl; msg << defaults.PrettyPrintJsonString() << std::endl; - KRATOS_THROW_ERROR(std::invalid_argument,"",msg.str()); + KRATOS_ERROR << msg.str() << std::endl; } bool type_coincides = false; @@ -411,7 +534,7 @@ class Parameters msg << this->PrettyPrintJsonString() << std::endl; msg << "defaults against which the current parameters are validated are :" << std::endl; msg << defaults.PrettyPrintJsonString() << std::endl; - KRATOS_THROW_ERROR(std::invalid_argument,"",msg.str()); + KRATOS_ERROR << msg.str() << std::endl; } } @@ -467,7 +590,7 @@ class Parameters msg << this->PrettyPrintJsonString() << std::endl; msg << "defaults against which the current parameters are validated are :" << std::endl; msg << defaults.PrettyPrintJsonString() << std::endl; - KRATOS_THROW_ERROR(std::invalid_argument,"",msg.str()); + KRATOS_ERROR << msg.str() << std::endl; } bool type_coincides = false; @@ -487,14 +610,14 @@ class Parameters msg << this->PrettyPrintJsonString() << std::endl; msg << "defaults against which the current parameters are validated are :" << std::endl; msg << defaults.PrettyPrintJsonString() << std::endl; - KRATOS_THROW_ERROR(std::invalid_argument,"",msg.str()); + KRATOS_ERROR << msg.str() << std::endl; } //now walk the tree recursively if(itr->value.IsObject()) { Parameters subobject = (*this)[item_name]; Parameters defaults_subobject = defaults[item_name]; - subobject.ValidateAndAssignDefaults(defaults_subobject); + subobject.RecursivelyValidateAndAssignDefaults(defaults_subobject); } } @@ -549,7 +672,120 @@ class Parameters } } } + + bool IsEquivalentTo(Parameters& reference) { + //Checks if the names and values are the same, no importance to the order. + //Lists have to be ordered, though! Take into account that in Kratos some physical vectors are represented with a list. + + for (rapidjson::Value::ConstMemberIterator itr = this->mpvalue->MemberBegin(); itr != this->mpvalue->MemberEnd(); ++itr) + { + std::string item_name = itr->name.GetString(); + + bool found = false; + + for (rapidjson::Value::ConstMemberIterator itr_ref = reference.mpvalue->MemberBegin(); itr_ref != reference.mpvalue->MemberEnd(); ++itr_ref) + { + if(item_name == itr_ref->name.GetString()) { + found = true; + Parameters subobject = (*this)[item_name]; + Parameters reference_subobject = reference[item_name]; + + if(itr->value.IsObject()) { + if ( ! subobject.IsEquivalentTo(reference_subobject) ) return false; + } + else { + if(itr->value != itr_ref->value) return false; + } + break; + } + } + + if ( ! found) return false; + } + + //reverse check: the reference can contain fields that are missing in the object + for (rapidjson::Value::ConstMemberIterator itr = reference.mpvalue->MemberBegin(); itr != reference.mpvalue->MemberEnd(); ++itr) + { + std::string item_name = itr->name.GetString(); + + bool found = false; + + for (rapidjson::Value::ConstMemberIterator itr_ref = this->mpvalue->MemberBegin(); itr_ref != this->mpvalue->MemberEnd(); ++itr_ref) + { + if(item_name == itr_ref->name.GetString()) { + found = true; + //no need to check the values here, if they were found in the previous loop, values were checked there + break; + } + } + + if ( ! found) return false; + } + + return true; + } + + bool HasSameKeysAndTypeOfValuesAs(Parameters& reference) { + //Checks if the names and the type of values are the same, no importance to the order. + //Lists have to be ordered, though! Take into account that in Kratos some physical vectors are represented with a list. + + for (rapidjson::Value::ConstMemberIterator itr = this->mpvalue->MemberBegin(); itr != this->mpvalue->MemberEnd(); ++itr) + { + std::string item_name = itr->name.GetString(); + + bool found = false; + + for (rapidjson::Value::ConstMemberIterator itr_ref = reference.mpvalue->MemberBegin(); itr_ref != reference.mpvalue->MemberEnd(); ++itr_ref) + { + if(item_name == itr_ref->name.GetString()) { + found = true; + Parameters subobject = (*this)[item_name]; + Parameters reference_subobject = reference[item_name]; + + if(itr->value.IsObject()) { + if ( ! subobject.HasSameKeysAndTypeOfValuesAs(reference_subobject) ) return false; + } + else { + if(itr->value.GetType() != itr_ref->value.GetType()) { + /*std::stringstream msg; + msg << "The item with name :\"" << item_name << "\" does not have the same type as the corresponding one in the default values" << std::endl; + msg << "The Parameters being validated are : " << std::endl; + msg << this->PrettyPrintJsonString() << std::endl; + msg << "Defaults against which the current parameters are validated are :" << std::endl; + msg << reference.PrettyPrintJsonString() << std::endl; + KRATOS_THROW_ERROR(std::invalid_argument,"",msg.str());*/ + return false; + } + } + break; + } + } + + if ( ! found) return false; + } + + //reverse check: the reference can contain fields that are missing in the object + for (rapidjson::Value::ConstMemberIterator itr = reference.mpvalue->MemberBegin(); itr != reference.mpvalue->MemberEnd(); ++itr) + { + std::string item_name = itr->name.GetString(); + + bool found = false; + + for (rapidjson::Value::ConstMemberIterator itr_ref = this->mpvalue->MemberBegin(); itr_ref != this->mpvalue->MemberEnd(); ++itr_ref) + { + if(item_name == itr_ref->name.GetString()) { + found = true; + //no need to check the types here, if they were found in the previous loop, types were checked there + break; + } + } + + if ( ! found) return false; + } + + return true; + } diff --git a/kratos/includes/mortar_classes.h b/kratos/includes/mortar_classes.h index a94ad1f6d221..0a17afd3d790 100755 --- a/kratos/includes/mortar_classes.h +++ b/kratos/includes/mortar_classes.h @@ -32,7 +32,7 @@ namespace Kratos ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryType; @@ -1680,7 +1680,7 @@ class DualLagrangeMultiplierOperatorsWithDerivatives : public DualLagrangeMultip */ template -class PointBelong : public Point<3> +class PointBelong : public Point { public: ///@name Type Definitions @@ -1697,15 +1697,15 @@ class PointBelong : public Point<3> /// Default constructors PointBelong(): - Point<3>() + Point() {} PointBelong(const array_1d Coords): - Point<3>(Coords) + Point(Coords) {} PointBelong(const array_1d Coords, const BelongType& ThisBelongs): - Point<3>(Coords), + Point(Coords), mBelongs(ThisBelongs) {} diff --git a/kratos/includes/node.h b/kratos/includes/node.h index 289ac9714104..ef0394aa4578 100755 --- a/kratos/includes/node.h +++ b/kratos/includes/node.h @@ -70,7 +70,7 @@ class Element; /** The node class from Kratos is defined in this class */ template > -class Node : public Point, public IndexedObject, public Flags +class Node : public Point, public IndexedObject, public Flags { class GetDofKey : public std::unary_function { @@ -90,9 +90,9 @@ class Node : public Point, public IndexedObject, public Flags typedef Node NodeType; - typedef Point BaseType; + typedef Point BaseType; - typedef Point PointType; + typedef Point PointType; typedef TDofType DofType; @@ -261,10 +261,6 @@ class Node : public Point, public IndexedObject, public Flags template Node(Node const& rOtherNode) = delete; - /** Copy constructor from a point with different dimension.*/ - template - Node(IndexType NewId, Point const& rThisPoint) = delete; - /** * Constructor using coordinates stored in given array. Initialize @@ -1306,9 +1302,7 @@ class Node : public Point, public IndexedObject, public Flags void save(Serializer& rSerializer) const override { -// int size = rSerializer.GetBuffer().end() - rSerializer.GetBuffer().begin(); -// KRATOS_WATCH(rSerializer.GetBuffer().end() - rSerializer.GetBuffer().begin()); - KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Point ); + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Point ); KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, IndexedObject ); KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Flags ); rSerializer.save("Data", mData); @@ -1318,14 +1312,11 @@ class Node : public Point, public IndexedObject, public Flags rSerializer.save("Initial Position", mInitialPosition); rSerializer.save("Data", mDofs); -// KRATOS_WATCH((rSerializer.GetBuffer().end() - rSerializer.GetBuffer().begin())-size); } void load(Serializer& rSerializer) override { -// int size = rSerializer.GetBuffer().end() - rSerializer.GetBuffer().begin(); -// KRATOS_WATCH(rSerializer.GetBuffer().end() - rSerializer.GetBuffer().begin()); - KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Point ); + KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Point ); KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, IndexedObject ); KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Flags ); rSerializer.load("Data", mData); @@ -1333,7 +1324,6 @@ class Node : public Point, public IndexedObject, public Flags rSerializer.load("Solution Steps Nodal Data", pSolutionStepsNodalData); rSerializer.load("Initial Position", mInitialPosition); rSerializer.load("Data", mDofs); -// KRATOS_WATCH(size- (rSerializer.GetBuffer().end() - rSerializer.GetBuffer().begin())); } ///@} diff --git a/kratos/integration/integration_point.h b/kratos/integration/integration_point.h index 70b760d237ba..5a492a33eca0 100644 --- a/kratos/integration/integration_point.h +++ b/kratos/integration/integration_point.h @@ -58,7 +58,7 @@ namespace Kratos /** Detail class definition. */ template -class IntegrationPoint : public Point +class IntegrationPoint : public Point { public: ///@name Type Definitions @@ -67,13 +67,13 @@ class IntegrationPoint : public Point /// Pointer definition of IntegrationPoint KRATOS_CLASS_POINTER_DEFINITION(IntegrationPoint); - typedef Point BaseType; + typedef Point BaseType; - typedef Point PointType; + typedef Point PointType; - typedef typename Point::CoordinatesArrayType CoordinatesArrayType; + typedef typename Point::CoordinatesArrayType CoordinatesArrayType; - typedef typename Point::IndexType IndexType; + typedef typename Point::IndexType IndexType; ///@} ///@name Life Cycle @@ -198,13 +198,6 @@ class IntegrationPoint : public Point return *this; } - /// Point assignment operator with different dimension. - template - IntegrationPoint& operator=(const Point& OtherPoint) - { - BaseType::operator =(OtherPoint); - } - ///@} ///@name Operations ///@{ diff --git a/kratos/modeler/cartesian_mesh_generator_modeler.h b/kratos/modeler/cartesian_mesh_generator_modeler.h index a1877fb7024a..c8a49dd78fd5 100644 --- a/kratos/modeler/cartesian_mesh_generator_modeler.h +++ b/kratos/modeler/cartesian_mesh_generator_modeler.h @@ -60,7 +60,7 @@ class CartesianMeshGeneratorModeler : public Modeler typedef Modeler BaseType; - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; @@ -387,7 +387,7 @@ class CartesianMeshGeneratorModeler : public Modeler std::sort(mIntersections[i].begin(), mIntersections[i].end()); } - void CalculateBoundingBox(ModelPart& rThisModelPart, Point<3>& rMinPoint, Point<3>& rMaxPoint) + void CalculateBoundingBox(ModelPart& rThisModelPart, Point& rMinPoint, Point& rMaxPoint) { if(rThisModelPart.NumberOfElements() == 0) { diff --git a/kratos/modeler/duplicate_mesh_modeler.h b/kratos/modeler/duplicate_mesh_modeler.h index 5be70154686e..b07f1f81c3fc 100644 --- a/kratos/modeler/duplicate_mesh_modeler.h +++ b/kratos/modeler/duplicate_mesh_modeler.h @@ -65,7 +65,7 @@ class DuplicateMeshModeler : public Modeler typedef Modeler BaseType; - typedef Point < 3 > PointType; + typedef Point PointType; typedef Node < 3 > NodeType; diff --git a/kratos/modeler/edge_swapping_2d_modeler.h b/kratos/modeler/edge_swapping_2d_modeler.h index 4b8c55ef21af..03c5e667dbda 100644 --- a/kratos/modeler/edge_swapping_2d_modeler.h +++ b/kratos/modeler/edge_swapping_2d_modeler.h @@ -115,7 +115,7 @@ class EdgeSwapping2DModeler : public Modeler */ typedef Modeler BaseType; - typedef Point<3> PointType; + typedef Point PointType; /** Defining 3D Node class as nodes of the mesh */ diff --git a/kratos/processes/calculate_discontinuous_distance_to_skin_process.h b/kratos/processes/calculate_discontinuous_distance_to_skin_process.h index 8409ac66fa08..107e408d05df 100644 --- a/kratos/processes/calculate_discontinuous_distance_to_skin_process.h +++ b/kratos/processes/calculate_discontinuous_distance_to_skin_process.h @@ -122,7 +122,7 @@ namespace Kratos class Plane3D { public: using VectorType = array_1d; - using PointType = Point<3>; + using PointType = Point; Plane3D(VectorType const& TheNormal, double DistanceToOrigin) :mNormal(TheNormal), mD(DistanceToOrigin) {} Plane3D() = delete; diff --git a/kratos/processes/calculate_distance_to_skin_process.cpp b/kratos/processes/calculate_distance_to_skin_process.cpp index ae6350d255f0..92f3b18d908e 100644 --- a/kratos/processes/calculate_distance_to_skin_process.cpp +++ b/kratos/processes/calculate_distance_to_skin_process.cpp @@ -281,7 +281,7 @@ namespace Kratos return -1; // do not deal with this case double triangle_origin_distance = -inner_prod(n, rGeometry[0]); - Point<3> ray_point_1, ray_point_2; + Point ray_point_1, ray_point_2; for(int i = 0 ; i < 3 ; i++) { diff --git a/kratos/processes/calculate_octree_signed_distance_to_3d_skin_process.h b/kratos/processes/calculate_octree_signed_distance_to_3d_skin_process.h index 131f47f52ed3..345426c30c5e 100644 --- a/kratos/processes/calculate_octree_signed_distance_to_3d_skin_process.h +++ b/kratos/processes/calculate_octree_signed_distance_to_3d_skin_process.h @@ -67,7 +67,7 @@ class DistanceSpatialContainersConfigure MAX_LEVEL = 12, MIN_LEVEL = 2 }; - typedef Point<3, double> PointType; /// always the point 3D + typedef Point PointType; /// always the point 3D typedef std::vector::iterator DistanceIteratorType; typedef ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; @@ -171,8 +171,8 @@ class DistanceSpatialContainersConfigure { Kratos::Element::GeometryType& geom_1 = rObject->GetGeometry(); - Kratos::Point<3,double> rLowPointTolerance; - Kratos::Point<3,double> rHighPointTolerance; + Kratos::Point rLowPointTolerance; + Kratos::Point rHighPointTolerance; for(std::size_t i = 0; i<3; i++) { @@ -603,7 +603,7 @@ class DistanceSpatialContainersConfigure //cell_point[1] = pCell->GetCoordinate(keys[1]); //cell_point[2] = pCell->GetCoordinate(keys[2]); - double d = GeometryUtils::PointDistanceToTriangle3D((*i_object)->GetGeometry()[0], (*i_object)->GetGeometry()[1], (*i_object)->GetGeometry()[2], Point<3>(cell_point[0], cell_point[1], cell_point[2])); + double d = GeometryUtils::PointDistanceToTriangle3D((*i_object)->GetGeometry()[0], (*i_object)->GetGeometry()[1], (*i_object)->GetGeometry()[2], Point(cell_point[0], cell_point[1], cell_point[2])); if(d < distance) distance = d; diff --git a/kratos/processes/calculate_signed_distance_to_3d_condition_skin_process.h b/kratos/processes/calculate_signed_distance_to_3d_condition_skin_process.h index 59bbb99b4397..2773d8f682b4 100644 --- a/kratos/processes/calculate_signed_distance_to_3d_condition_skin_process.h +++ b/kratos/processes/calculate_signed_distance_to_3d_condition_skin_process.h @@ -74,7 +74,7 @@ class DistanceSpatialContainersConditionConfigure MIN_LEVEL = 2 // this cannot be less than 2!!! }; - typedef Point<3, double> PointType; /// always the point 3D + typedef Point PointType; /// always the point 3D typedef std::vector::iterator DistanceIteratorType; typedef PointerVectorSet ContainerType; typedef ContainerType::value_type PointerType; @@ -191,8 +191,8 @@ class DistanceSpatialContainersConditionConfigure static inline bool IsIntersected(const Element::Pointer rObject, double Tolerance, const double* rLowPoint, const double* rHighPoint) { - Point<3,double> low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); - Point<3,double> high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); + Point low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); + Point high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); KRATOS_THROW_ERROR(std::logic_error, "Not Implemented method", "") //return HasIntersection(rObject->GetGeometry(), low_point, high_point); @@ -278,7 +278,7 @@ class DistanceSpatialContainersConditionConfigure typedef OctreeBinaryCell CellType; typedef OctreeBinary OctreeType; typedef ConfigurationType::cell_node_data_type CellNodeDataType; - typedef Point<3, double> PointType; /// always the point 3D + typedef Point PointType; /// always the point 3D typedef OctreeType::cell_type::object_container_type object_container_type; typedef struct{ array_1d Coordinates; @@ -891,8 +891,8 @@ class DistanceSpatialContainersConditionConfigure double InnerProduct; double NormDistTetNode; - const Point<3> LinePoint1 = Point<3>(IntersectionNode1Coord[0] , IntersectionNode1Coord[1] , IntersectionNode1Coord[2]); - const Point<3> LinePoint2 = Point<3>(IntersectionNode2Coord[0] , IntersectionNode2Coord[1] , IntersectionNode2Coord[2]); + const Point LinePoint1 = Point(IntersectionNode1Coord[0] , IntersectionNode1Coord[1] , IntersectionNode1Coord[2]); + const Point LinePoint2 = Point(IntersectionNode2Coord[0] , IntersectionNode2Coord[1] , IntersectionNode2Coord[2]); Geometry< Node<3> >& rFluidGeom = i_fluid_element->GetGeometry(); @@ -902,7 +902,7 @@ class DistanceSpatialContainersConditionConfigure TetNode = rFluidGeom(i_TetNode)->Coordinates(); // Compute distance to point - NormDistTetNode = GeometryUtils::PointDistanceToLineSegment3D(LinePoint1, LinePoint2 , Point<3>(TetNode[0],TetNode[1],TetNode[2])); + NormDistTetNode = GeometryUtils::PointDistanceToLineSegment3D(LinePoint1, LinePoint2 , Point(TetNode[0],TetNode[1],TetNode[2])); // Compute unsigned distance vector by assuming the mean position vector of the two intersection points DistVecTetNode[0] = TetNode[0] - IntersectionNode1Coord[0]; @@ -1052,9 +1052,9 @@ class DistanceSpatialContainersConditionConfigure array_1d IntersectionNode1Coord; array_1d IntersectionNode2Coord; array_1d IntersectionNode3Coord; - Point<3> ApproxTrianglePoint1; - Point<3> ApproxTrianglePoint2; - Point<3> ApproxTrianglePoint3; + Point ApproxTrianglePoint1; + Point ApproxTrianglePoint2; + Point ApproxTrianglePoint3; double UnsignedDistance; double InnerProduct; unsigned int IndexNode1; @@ -1072,12 +1072,12 @@ class DistanceSpatialContainersConditionConfigure IntersectionNode2Coord = NodesOfApproximatedStructure[IndexNode2].Coordinates; IntersectionNode3Coord = NodesOfApproximatedStructure[IndexNode3].Coordinates; - ApproxTrianglePoint1 = Point<3>(IntersectionNode1Coord[0] , IntersectionNode1Coord[1] , IntersectionNode1Coord[2]); - ApproxTrianglePoint2 = Point<3>(IntersectionNode2Coord[0] , IntersectionNode2Coord[1] , IntersectionNode2Coord[2]); - ApproxTrianglePoint3 = Point<3>(IntersectionNode3Coord[0] , IntersectionNode3Coord[1] , IntersectionNode3Coord[2]); + ApproxTrianglePoint1 = Point(IntersectionNode1Coord[0] , IntersectionNode1Coord[1] , IntersectionNode1Coord[2]); + ApproxTrianglePoint2 = Point(IntersectionNode2Coord[0] , IntersectionNode2Coord[1] , IntersectionNode2Coord[2]); + ApproxTrianglePoint3 = Point(IntersectionNode3Coord[0] , IntersectionNode3Coord[1] , IntersectionNode3Coord[2]); // Compute distance from tet node to current triangle - UnsignedDistance = GeometryUtils::PointDistanceToTriangle3D(ApproxTrianglePoint1, ApproxTrianglePoint2 , ApproxTrianglePoint3 , Point<3>(TetNode[0],TetNode[1],TetNode[2])); + UnsignedDistance = GeometryUtils::PointDistanceToTriangle3D(ApproxTrianglePoint1, ApproxTrianglePoint2 , ApproxTrianglePoint3 , Point(TetNode[0],TetNode[1],TetNode[2])); bool TetNodeIsInsideStructure = true; bool TetNodeIsOnStructure = true; @@ -1555,7 +1555,7 @@ class DistanceSpatialContainersConditionConfigure // cell_point[1] = pCell->GetCoordinate(keys[1]); // cell_point[2] = pCell->GetCoordinate(keys[2]); - double d = GeometryUtils::PointDistanceToTriangle3D((*i_object)->GetGeometry()[0], (*i_object)->GetGeometry()[1], (*i_object)->GetGeometry()[2], Point<3>(cell_point[0], cell_point[1], cell_point[2])); + double d = GeometryUtils::PointDistanceToTriangle3D((*i_object)->GetGeometry()[0], (*i_object)->GetGeometry()[1], (*i_object)->GetGeometry()[2], Point(cell_point[0], cell_point[1], cell_point[2])); if(d < distance) distance = d; diff --git a/kratos/processes/calculate_signed_distance_to_3d_skin_process.h b/kratos/processes/calculate_signed_distance_to_3d_skin_process.h index dc330dfecc1a..173ed7f5fb82 100644 --- a/kratos/processes/calculate_signed_distance_to_3d_skin_process.h +++ b/kratos/processes/calculate_signed_distance_to_3d_skin_process.h @@ -83,7 +83,7 @@ class DistanceSpatialContainersConfigure MIN_LEVEL = 2 // this cannot be less than 2!!! }; - typedef Point<3, double> PointType; /// always the point 3D + typedef Point PointType; /// always the point 3D typedef std::vector::iterator DistanceIteratorType; typedef ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; @@ -187,8 +187,8 @@ class DistanceSpatialContainersConfigure static inline bool IsIntersected(const Element::Pointer rObject, double Tolerance, const double* rLowPoint, const double* rHighPoint) { - Point<3,double> low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); - Point<3,double> high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); + Point low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); + Point high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); KRATOS_THROW_ERROR(std::logic_error, "Not Implemented method", "") //return HasIntersection(rObject->GetGeometry(), low_point, high_point); @@ -274,7 +274,7 @@ class CalculateSignedDistanceTo3DSkinProcess typedef OctreeBinaryCell CellType; typedef OctreeBinary OctreeType; typedef ConfigurationType::cell_node_data_type CellNodeDataType; - typedef Point<3, double> PointType; /// always the point 3D + typedef Point PointType; /// always the point 3D typedef OctreeType::cell_type::object_container_type object_container_type; typedef struct{ array_1d Coordinates; @@ -540,7 +540,7 @@ class CalculateSignedDistanceTo3DSkinProcess //generate the points on the edges at the zero of the distance function //generate "father nodes", defined as the end nodes of the edge on which the local point is located - std::vector< Point<3> > edge_points; + std::vector< Point > edge_points; edge_points.reserve(4); array_1d positive_fathers, negative_fathers; //there are at most 4 cut edges unsigned int k=0; @@ -558,7 +558,7 @@ class CalculateSignedDistanceTo3DSkinProcess //generate point on edge by linear interpolation double Ni = fabs(dj) / ( fabs(di) + fabs(dj) ); double Nj = 1.0 - Ni; - Point<3> edge_point(Ni * geom[i] + Nj * geom[j]); + Point edge_point(Ni * geom[i] + Nj * geom[j]); edge_points.push_back(edge_point); //store the id of the positive and negative fathers @@ -582,9 +582,9 @@ class CalculateSignedDistanceTo3DSkinProcess Vector Nlocal(3); //form a triangle with the edge nodes - Triangle3D3< Point<3> > triangle(Point<3>::Pointer(new Point<3>(edge_points[0])), - Point<3>::Pointer(new Point<3>(edge_points[1])), - Point<3>::Pointer(new Point<3>(edge_points[2])) + Triangle3D3< Point > triangle(Point::Pointer(new Point(edge_points[0])), + Point::Pointer(new Point(edge_points[1])), + Point::Pointer(new Point(edge_points[2])) ); array_1d local_coords; @@ -657,11 +657,11 @@ class CalculateSignedDistanceTo3DSkinProcess } //form a quadrilateral with the edge nodes - Quadrilateral3D4< Point<3> > quad = Quadrilateral3D4< Point<3> >( - Point<3>::Pointer(new Point<3>(edge_points[0])), - Point<3>::Pointer(new Point<3>(edge_points[min_pos])), - Point<3>::Pointer(new Point<3>(edge_points[center_pos])), - Point<3>::Pointer(new Point<3>(edge_points[max_pos])) + Quadrilateral3D4< Point > quad = Quadrilateral3D4< Point >( + Point::Pointer(new Point(edge_points[0])), + Point::Pointer(new Point(edge_points[min_pos])), + Point::Pointer(new Point(edge_points[center_pos])), + Point::Pointer(new Point(edge_points[max_pos])) ); array_1d local_coords; @@ -1130,9 +1130,9 @@ class CalculateSignedDistanceTo3DSkinProcess ///****************************************************************************************************************** ///****************************************************************************************************************** - void CalculateNormal3D( Point<3>& Point1, - Point<3>& Point2, - Point<3>& Point3, + void CalculateNormal3D( Point& Point1, + Point& Point2, + Point& Point3, array_1d& rResultNormal ) { array_1d v1 = Point2 - Point1; @@ -1219,7 +1219,7 @@ class CalculateSignedDistanceTo3DSkinProcess { Geometry< Node<3> >& rFluidGeom = i_fluid_Element->GetGeometry(); - Point<3> P1; + Point P1; P1.Coordinates() = NodesOfApproximatedStructure[0].Coordinates; array_1d& Normal = NodesOfApproximatedStructure[0].StructElemNormal; @@ -1240,7 +1240,7 @@ class CalculateSignedDistanceTo3DSkinProcess { Geometry< Node<3> >& rFluidGeom = i_fluid_Element->GetGeometry(); - Point<3> P1; + Point P1; P1.Coordinates() = NodesOfApproximatedStructure[0].Coordinates; // Get normal at intersections, average them and check direction of distances @@ -1281,9 +1281,9 @@ class CalculateSignedDistanceTo3DSkinProcess { Geometry< Node<3> >& rFluidGeom = i_fluid_Element->GetGeometry(); - Point<3> P1; - Point<3> P2; - Point<3> P3; + Point P1; + Point P2; + Point P3; P1.Coordinates() = NodesOfApproximatedStructure[0].Coordinates; P2.Coordinates() = NodesOfApproximatedStructure[1].Coordinates; @@ -1322,7 +1322,7 @@ class CalculateSignedDistanceTo3DSkinProcess unsigned int numberCutEdges = NodesOfApproximatedStructure.size(); // Compute average of the intersection nodes which is a node on the plane we look for - Point<3> P_mean; + Point P_mean; for(unsigned int k=0; k& planeBasePoint, + double PointDistanceToPlane( Point& planeBasePoint, array_1d& planeNormal, - Point<3>& ToPoint) + Point& ToPoint) { // calculate vector pointing from a node in the plane (e.g. triangle point 1) to the considered node ToPoint array_1d planeToPointVec = ToPoint - planeBasePoint; @@ -1552,7 +1552,7 @@ class CalculateSignedDistanceTo3DSkinProcess Geometry< Node<3> >& geom = i_fluid_element->GetGeometry(); // generate the points on the edges at the zero of the distance function - std::vector< Point<3> > edge_points; + std::vector< Point > edge_points; edge_points.reserve(4); // loop over all 6 edges of the tetrahedra @@ -1568,7 +1568,7 @@ class CalculateSignedDistanceTo3DSkinProcess // generate point on edge by linear interpolation double Ni = fabs(dj) / ( fabs(di) + fabs(dj) ); double Nj = 1.0 - Ni; - Point<3> edge_point(Ni * geom[i] + Nj * geom[j]); + Point edge_point(Ni * geom[i] + Nj * geom[j]); edge_points.push_back(edge_point); } } @@ -2039,7 +2039,7 @@ class CalculateSignedDistanceTo3DSkinProcess // cell_point[1] = pCell->GetCoordinate(keys[1]); // cell_point[2] = pCell->GetCoordinate(keys[2]); - double d = GeometryUtils::PointDistanceToTriangle3D((*i_object)->GetGeometry()[0], (*i_object)->GetGeometry()[1], (*i_object)->GetGeometry()[2], Point<3>(cell_point[0], cell_point[1], cell_point[2])); + double d = GeometryUtils::PointDistanceToTriangle3D((*i_object)->GetGeometry()[0], (*i_object)->GetGeometry()[1], (*i_object)->GetGeometry()[2], Point(cell_point[0], cell_point[1], cell_point[2])); if(d < distance) distance = d; @@ -2396,7 +2396,7 @@ class CalculateSignedDistanceTo3DSkinProcess return -1; // do not deal with this case double triangle_origin_distance = -inner_prod(n, rGeometry[0]); - Point<3> ray_point_1, ray_point_2; + Point ray_point_1, ray_point_2; for(int i = 0 ; i < 3 ; i++) { diff --git a/kratos/processes/compute_nodal_gradient_process.h b/kratos/processes/compute_nodal_gradient_process.h index 5093250d5361..b81169a1e00a 100644 --- a/kratos/processes/compute_nodal_gradient_process.h +++ b/kratos/processes/compute_nodal_gradient_process.h @@ -26,6 +26,7 @@ // Project includes #include "includes/define.h" +#include "includes/enums.h" #include "processes/process.h" #include "includes/model_part.h" #include "utilities/geometry_utilities.h" @@ -45,11 +46,6 @@ namespace Kratos ///@} ///@name Enum's ///@{ - - #if !defined(HISTORICAL_VALUES) - #define HISTORICAL_VALUES - enum HistoricalValues {Historical = 0, NonHistorical = 1}; - #endif ///@} ///@name Functions diff --git a/kratos/processes/find_intersected_geometrical_objects_process.cpp b/kratos/processes/find_intersected_geometrical_objects_process.cpp index 9732e6249c0c..9808f547ff54 100644 --- a/kratos/processes/find_intersected_geometrical_objects_process.cpp +++ b/kratos/processes/find_intersected_geometrical_objects_process.cpp @@ -119,8 +119,8 @@ namespace Kratos } void FindIntersectedGeometricalObjectsProcess::SetOctreeBoundingBox() { - Point<3> low(mrModelPart1.NodesBegin()->Coordinates()); - Point<3> high(mrModelPart1.NodesBegin()->Coordinates()); + Point low(mrModelPart1.NodesBegin()->Coordinates()); + Point high(mrModelPart1.NodesBegin()->Coordinates()); // loop over all nodes in first modelpart for (auto i_node = mrModelPart1.NodesBegin(); i_node != mrModelPart1.NodesEnd(); i_node++) { diff --git a/kratos/processes/find_intersected_geometrical_objects_process.h b/kratos/processes/find_intersected_geometrical_objects_process.h index 1468f09a6901..3d78af14854f 100644 --- a/kratos/processes/find_intersected_geometrical_objects_process.h +++ b/kratos/processes/find_intersected_geometrical_objects_process.h @@ -62,7 +62,7 @@ namespace Kratos MIN_LEVEL = 2 // this cannot be less than 2!!! }; - typedef Point<3, double> PointType; /// always the point 3D + typedef Point PointType; /// always the point 3D typedef std::vector::iterator DistanceIteratorType; typedef ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; @@ -166,8 +166,8 @@ namespace Kratos static inline bool IsIntersected(const Element::Pointer rObject, double Tolerance, const double* rLowPoint, const double* rHighPoint) { - Point<3, double> low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); - Point<3, double> high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); + Point low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); + Point high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); KRATOS_THROW_ERROR(std::logic_error, "Not Implemented method", "") //return HasIntersection(rObject->GetGeometry(), low_point, high_point); diff --git a/kratos/processes/mesh_local_smoothing_process.cpp b/kratos/processes/mesh_local_smoothing_process.cpp index d591af657ddd..f469922e52a4 100644 --- a/kratos/processes/mesh_local_smoothing_process.cpp +++ b/kratos/processes/mesh_local_smoothing_process.cpp @@ -119,7 +119,7 @@ namespace Kratos { PointsVectorType optimal_points; Vector weights; - Point<3> node_optimal_position; + Point node_optimal_position; for (ModelPart::NodeIterator i_node = mrModelPart.NodesBegin(); i_node != mrModelPart.NodesEnd(); i_node++){ if (i_node->Is(SELECTED) && i_node->IsNot(BOUNDARY)) @@ -145,7 +145,7 @@ namespace Kratos } } - void MeshLocalSmoothingProcess::MoveNodeIfImprovesMinimumQuality(NodeType& rNode, Point<3> const& OptimumPosition) + void MeshLocalSmoothingProcess::MoveNodeIfImprovesMinimumQuality(NodeType& rNode, Point const& OptimumPosition) { constexpr std::size_t maximum_bisectioning_iteration = 1; @@ -197,7 +197,7 @@ namespace Kratos //} } - void MeshLocalSmoothingProcess::InterpolateNodeOptimumPosition(PointsVectorType const& rOptimumPoints, Vector const& rWeights, Point<3>& OptimumPosition) + void MeshLocalSmoothingProcess::InterpolateNodeOptimumPosition(PointsVectorType const& rOptimumPoints, Vector const& rWeights, Point& OptimumPosition) { std::size_t size = rOptimumPoints.size(); diff --git a/kratos/processes/mesh_local_smoothing_process.h b/kratos/processes/mesh_local_smoothing_process.h index 22374f5edc30..a5b5bb534d5d 100644 --- a/kratos/processes/mesh_local_smoothing_process.h +++ b/kratos/processes/mesh_local_smoothing_process.h @@ -57,7 +57,7 @@ namespace Kratos typedef WeakPointerVector< Node<3> > NeighboursVectorType; - typedef std::vector > PointsVectorType; + typedef std::vector PointsVectorType; ///@} ///@name Flags @@ -190,9 +190,9 @@ namespace Kratos void PerformSmoothing(); - void InterpolateNodeOptimumPosition(PointsVectorType const& rOptimumPoints, Vector const& rWeights, Point<3>& OptimumPosition); + void InterpolateNodeOptimumPosition(PointsVectorType const& rOptimumPoints, Vector const& rWeights, Point& OptimumPosition); - void MoveNodeIfImprovesMinimumQuality(NodeType& rNode, Point<3> const& OptimumPosition); + void MoveNodeIfImprovesMinimumQuality(NodeType& rNode, Point const& OptimumPosition); ///@} diff --git a/kratos/processes/mesh_node_collapsing_process.cpp b/kratos/processes/mesh_node_collapsing_process.cpp index dab3cd8efbe9..2eed732f8894 100644 --- a/kratos/processes/mesh_node_collapsing_process.cpp +++ b/kratos/processes/mesh_node_collapsing_process.cpp @@ -103,7 +103,7 @@ namespace Kratos } double MeshNodeCollapsingProcess::CalculateQualityIfNodeCollapses(Node<3>& rThisNode, Node<3> const& rCoarseNode) { - Point<3> original_coordinates = rThisNode; + Point original_coordinates = rThisNode; rThisNode.Coordinates() = rCoarseNode.Coordinates(); double min_quality = CalculateMinQualityOfNeighbourElements(rThisNode, rCoarseNode); rThisNode.Coordinates() = original_coordinates; diff --git a/kratos/processes/mesh_smoothing_process.cpp b/kratos/processes/mesh_smoothing_process.cpp index a91a632aa1b8..fe4e01cb48a6 100644 --- a/kratos/processes/mesh_smoothing_process.cpp +++ b/kratos/processes/mesh_smoothing_process.cpp @@ -357,7 +357,7 @@ namespace Kratos { if ((i_neighbour_node->Is(COARSE_MESH_NODE))) { - Point<3> d = *i_neighbour_node - rThisNode; + Point d = *i_neighbour_node - rThisNode; double distance2 = inner_prod(d,d); if (distance2 < min_distance) { @@ -471,7 +471,7 @@ namespace Kratos std::size_t size = rOptimumPoints.size(); if (size > 0) { - Point<3> optimal_position = ZeroVector(3); + Point optimal_position = ZeroVector(3); double weight_sum = 0.00; for (std::size_t i = 0; i < size; i++) diff --git a/kratos/processes/mesh_smoothing_process.h b/kratos/processes/mesh_smoothing_process.h index 5fd3a2df9bba..5f436b27759a 100644 --- a/kratos/processes/mesh_smoothing_process.h +++ b/kratos/processes/mesh_smoothing_process.h @@ -71,7 +71,7 @@ namespace Kratos typedef WeakPointerVector< Node<3> > NeighboursVectorType; - typedef std::vector > PointsVectorType; + typedef std::vector PointsVectorType; ///@} ///@name Flags diff --git a/kratos/processes/reorder_and_optimize_modelpart_process.h b/kratos/processes/reorder_and_optimize_modelpart_process.h index ee4d33ed0343..5ea2f61163e9 100644 --- a/kratos/processes/reorder_and_optimize_modelpart_process.h +++ b/kratos/processes/reorder_and_optimize_modelpart_process.h @@ -44,7 +44,7 @@ namespace Kratos class KRATOS_API(KRATOS_CORE) ReorderAndOptimizeModelPartProcess : public Process { public: - using GeometryType = Geometry >; + using GeometryType = Geometry; ///@name Type Definitions ///@{ diff --git a/kratos/processes/structured_mesh_generator_process.cpp b/kratos/processes/structured_mesh_generator_process.cpp index 01fbe2d18c38..b31ae8b5b800 100644 --- a/kratos/processes/structured_mesh_generator_process.cpp +++ b/kratos/processes/structured_mesh_generator_process.cpp @@ -92,8 +92,8 @@ namespace Kratos } void StructuredMeshGeneratorProcess::Generate2DMesh() { - Point<3> min_point(1.00, 1.00, 1.00); - Point<3> max_point(-1.00, -1.00, -1.00); + Point min_point(1.00, 1.00, 1.00); + Point max_point(-1.00, -1.00, -1.00); GetLocalCoordinatesRange(min_point, max_point); GenerateNodes2D(min_point, max_point); @@ -102,8 +102,8 @@ namespace Kratos } void StructuredMeshGeneratorProcess::Generate3DMesh() { - Point<3> min_point(1.00, 1.00, 1.00); - Point<3> max_point(-1.00, -1.00, -1.00); + Point min_point(1.00, 1.00, 1.00); + Point max_point(-1.00, -1.00, -1.00); GetLocalCoordinatesRange(min_point, max_point); GenerateNodes3D(min_point, max_point); @@ -111,12 +111,12 @@ namespace Kratos GenerateTetrahedraElements(); } - void StructuredMeshGeneratorProcess::GenerateNodes2D(Point<3> const& rMinPoint, Point<3> const& rMaxPoint) { + void StructuredMeshGeneratorProcess::GenerateNodes2D(Point const& rMinPoint, Point const& rMaxPoint) { GeometryType::CoordinatesArrayType local_element_size = rMaxPoint - rMinPoint; local_element_size /= mNumberOfDivisions; //const std::size_t local_space_dimension = mrGeometry.LocalSpaceDimension(); - Point<3> local_coordinates = rMinPoint; - Point<3> global_coordinates = ZeroVector(3); + Point local_coordinates = rMinPoint; + Point global_coordinates = ZeroVector(3); std::size_t node_id = mStartNodeId; for (std::size_t j = 0; j <= mNumberOfDivisions; j++) { @@ -132,11 +132,11 @@ namespace Kratos } } - void StructuredMeshGeneratorProcess::GenerateNodes3D(Point<3> const& rMinPoint, Point<3> const& rMaxPoint) { + void StructuredMeshGeneratorProcess::GenerateNodes3D(Point const& rMinPoint, Point const& rMaxPoint) { GeometryType::CoordinatesArrayType local_element_size = rMaxPoint - rMinPoint; local_element_size /= mNumberOfDivisions; - Point<3> local_coordinates = rMinPoint; - Point<3> global_coordinates = ZeroVector(3); + Point local_coordinates = rMinPoint; + Point global_coordinates = ZeroVector(3); std::size_t node_id = mStartNodeId; for (std::size_t k = 0; k <= mNumberOfDivisions; k++) { @@ -210,7 +210,7 @@ namespace Kratos return mStartNodeId + (K * (mNumberOfDivisions + 1) * (mNumberOfDivisions + 1)) + (J * (mNumberOfDivisions + 1)) + I; } - void StructuredMeshGeneratorProcess::GetLocalCoordinatesRange(Point<3>& rMinPoint, Point<3>& rMaxPoint) { + void StructuredMeshGeneratorProcess::GetLocalCoordinatesRange(Point& rMinPoint, Point& rMaxPoint) { const std::size_t local_space_dimension = mrGeometry.LocalSpaceDimension(); Matrix geometry_points_local_coordinates; mrGeometry.PointsLocalCoordinates(geometry_points_local_coordinates); @@ -265,7 +265,7 @@ namespace Kratos constexpr triangle_connectivity_in_cell_type connectivity_cases[number_of_cases] = { {{ 1,3,2 }},{{ 1,4,3 }} }; - std::vector::Pointer> my_points(3); + std::vector my_points(3); double min_area = 1.0; for (std::size_t i_case = 0; i_case < number_of_cases; i_case++) { @@ -273,11 +273,11 @@ namespace Kratos for (std::size_t i_position = 0; i_position < 3; i_position++) { auto& cell_point = cell_points[connectivity[i_position]]; - Point<3>::Pointer pPi(new Point<3>(cell_point[0], cell_point[1], cell_point[2])); + Point::Pointer pPi(new Point(cell_point[0], cell_point[1], cell_point[2])); my_points[i_position] = pPi; } - Triangle2D3 > trial_triangle(my_points[0], my_points[1], my_points[2]); + Triangle2D3 trial_triangle(my_points[0], my_points[1], my_points[2]); min_area = std::min(min_area, trial_triangle.DomainSize()); } @@ -298,7 +298,7 @@ namespace Kratos constexpr tetrahedra_connectivity_in_cell_type connectivity_cases[number_of_cases] = { {{ 0,3,6,2 }},{{ 3,6,7,0 }},{{ 4,7,6,0 }}, {{ 0,4,5,6 }},{{ 0,1,2,6 }},{{ 1,5,6,0 }} }; - std::vector::Pointer> my_points(4); + std::vector my_points(4); double min_volume = 1.0; for (std::size_t i_case = 0; i_case < number_of_cases; i_case++) { @@ -306,11 +306,11 @@ namespace Kratos for (std::size_t i_position = 0; i_position < 4; i_position++) { auto& cell_point = cell_points[connectivity[i_position]]; - Point<3>::Pointer pPi(new Point<3>(cell_point[0], cell_point[1], cell_point[2])); + Point::Pointer pPi(new Point(cell_point[0], cell_point[1], cell_point[2])); my_points[i_position] = pPi; } - Tetrahedra3D4 > trial_tetra(my_points[0], my_points[1], my_points[2], my_points[3]); + Tetrahedra3D4 trial_tetra(my_points[0], my_points[1], my_points[2], my_points[3]); min_volume = std::min(min_volume, trial_tetra.DomainSize()); } diff --git a/kratos/processes/structured_mesh_generator_process.h b/kratos/processes/structured_mesh_generator_process.h index 56fdec1a894c..84c453574514 100644 --- a/kratos/processes/structured_mesh_generator_process.h +++ b/kratos/processes/structured_mesh_generator_process.h @@ -145,9 +145,9 @@ namespace Kratos void Generate3DMesh(); - void GenerateNodes2D(Point<3> const& rMinPoint, Point<3> const& rMaxPoint); + void GenerateNodes2D(Point const& rMinPoint, Point const& rMaxPoint); - void GenerateNodes3D(Point<3> const& rMinPoint, Point<3> const& rMaxPoint); + void GenerateNodes3D(Point const& rMinPoint, Point const& rMaxPoint); void GenerateTriangularElements(); @@ -157,7 +157,7 @@ namespace Kratos std::size_t GetNodeId(std::size_t I, std::size_t J, std::size_t K); - void GetLocalCoordinatesRange(Point<3>& rMinPoint, Point<3>& rMaxPoint); + void GetLocalCoordinatesRange(Point& rMinPoint, Point& rMaxPoint); void Check(); diff --git a/kratos/processes/tetrahedra_mesh_quality_weighted_smoothing_process.h b/kratos/processes/tetrahedra_mesh_quality_weighted_smoothing_process.h index 72ed0a020187..0c2587e3857d 100644 --- a/kratos/processes/tetrahedra_mesh_quality_weighted_smoothing_process.h +++ b/kratos/processes/tetrahedra_mesh_quality_weighted_smoothing_process.h @@ -55,7 +55,7 @@ namespace Kratos typedef WeakPointerVector< Node<3> > NeighboursVectorType; - typedef std::vector > PointsVectorType; + typedef std::vector PointsVectorType; ///@} ///@name Flags diff --git a/kratos/processes/tetrahedra_mesh_worst_element_smoothing_process.cpp b/kratos/processes/tetrahedra_mesh_worst_element_smoothing_process.cpp index 9d4a4716ebc5..a2d358237e78 100644 --- a/kratos/processes/tetrahedra_mesh_worst_element_smoothing_process.cpp +++ b/kratos/processes/tetrahedra_mesh_worst_element_smoothing_process.cpp @@ -64,18 +64,18 @@ namespace Kratos rWeights[min_i] = 1.00; } - void TetrahedraMeshWorstElementSmoothingProcess::CalculateElementOptimumPosition(NodeType& rNode, Geometry > const& rTetrahedra, Point<3>& rOptimumPoint) { + void TetrahedraMeshWorstElementSmoothingProcess::CalculateElementOptimumPosition(NodeType& rNode, Geometry > const& rTetrahedra, Point& rOptimumPoint) { std::size_t i = 0; for (; i < 4; i++) if (rNode.Id() == rTetrahedra[i].Id()) break; constexpr int tetrahedra_connectivity[4][3] = { {3,2,1},{2,3,0},{0,3,1},{0,1,2} }; - Triangle3D3 > face(rTetrahedra(tetrahedra_connectivity[i][0]), rTetrahedra(tetrahedra_connectivity[i][1]), rTetrahedra(tetrahedra_connectivity[i][2])); - Point<3> center = face.Center(); - Point<3> v1 = face[0] - face[1]; - Point<3> v2 = face[0] - face[2]; - Point<3> normal; + Triangle3D3 face(rTetrahedra(tetrahedra_connectivity[i][0]), rTetrahedra(tetrahedra_connectivity[i][1]), rTetrahedra(tetrahedra_connectivity[i][2])); + Point center = face.Center(); + Point v1 = face[0] - face[1]; + Point v2 = face[0] - face[2]; + Point normal; MathUtils::CrossProduct(normal, v1, v2); double norm = norm_2(normal); if(norm > std::numeric_limits::epsilon()) diff --git a/kratos/processes/tetrahedra_mesh_worst_element_smoothing_process.h b/kratos/processes/tetrahedra_mesh_worst_element_smoothing_process.h index bae1f55ea690..38d4a57a8037 100644 --- a/kratos/processes/tetrahedra_mesh_worst_element_smoothing_process.h +++ b/kratos/processes/tetrahedra_mesh_worst_element_smoothing_process.h @@ -55,7 +55,7 @@ namespace Kratos typedef WeakPointerVector< Node<3> > NeighboursVectorType; - typedef std::vector > PointsVectorType; + typedef std::vector PointsVectorType; ///@} ///@name Flags @@ -127,7 +127,7 @@ namespace Kratos void FindOptimumPositionsAndWeights(NodeType& rNode, PointsVectorType& rOptimumPoints, Vector& rWeights) override; - void CalculateElementOptimumPosition(NodeType& rNode, Geometry > const& rTetrahedra, Point<3>& rOptimumPoint); + void CalculateElementOptimumPosition(NodeType& rNode, Geometry > const& rTetrahedra, Point& rOptimumPoint); ///@} ///@name Protected Access diff --git a/kratos/python/add_ale_variables_to_python.h b/kratos/python/add_ale_variables_to_python.h index a1f583af0215..9d14e8b09919 100644 --- a/kratos/python/add_ale_variables_to_python.h +++ b/kratos/python/add_ale_variables_to_python.h @@ -18,7 +18,6 @@ // External includes // Project includes -#include "includes/define.h" namespace Kratos { diff --git a/kratos/python/add_amgcl_solver_to_python.h b/kratos/python/add_amgcl_solver_to_python.h index 4aac73093706..95e6f4d5c11a 100644 --- a/kratos/python/add_amgcl_solver_to_python.h +++ b/kratos/python/add_amgcl_solver_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_c2c_variables_to_python.cpp b/kratos/python/add_c2c_variables_to_python.cpp index fd0e3d279b48..1e8d332817af 100644 --- a/kratos/python/add_c2c_variables_to_python.cpp +++ b/kratos/python/add_c2c_variables_to_python.cpp @@ -41,36 +41,6 @@ #include "utilities/timer.h" - -#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION -#undef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION -#endif -#define KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag) \ - scope().attr(#flag) = boost::ref(flag) \ - -#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG -#undef KRATOS_REGISTER_IN_PYTHON_FLAG -#endif -#define KRATOS_REGISTER_IN_PYTHON_FLAG(flag) \ - KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag); \ - KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(NOT_##flag) - -#ifdef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#undef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#endif -#define KRATOS_REGISTER_IN_PYTHON_VARIABLE(variable) \ - scope().attr(#variable) = boost::ref(variable); - - -#ifdef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS -#undef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS -#endif -#define KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS(name) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_X) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Y) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Z) - namespace Kratos { //KRATOS_CREATE_FLAG(STRUCTURE, 63); @@ -144,9 +114,5 @@ void AddC2CVariablesToPython() KRATOS_REGISTER_IN_PYTHON_VARIABLE(NIYAMA) KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS(TEMPERATURE_GRADIENT) } -} // namespace Python. +} // namespace Python. } // Namespace Kratos - -#undef KRATOS_REGISTER_IN_PYTHON_FLAG -#undef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#undef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS diff --git a/kratos/python/add_c2c_variables_to_python.h b/kratos/python/add_c2c_variables_to_python.h index 09263b2c256e..8a3bbb5b4532 100644 --- a/kratos/python/add_c2c_variables_to_python.h +++ b/kratos/python/add_c2c_variables_to_python.h @@ -22,7 +22,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_cfd_variables_to_python.h b/kratos/python/add_cfd_variables_to_python.h index 756041c75ff2..587bb989a010 100644 --- a/kratos/python/add_cfd_variables_to_python.h +++ b/kratos/python/add_cfd_variables_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_constitutive_law_to_python.h b/kratos/python/add_constitutive_law_to_python.h index d0ffe0cf7fa6..5a5e20aa2013 100644 --- a/kratos/python/add_constitutive_law_to_python.h +++ b/kratos/python/add_constitutive_law_to_python.h @@ -22,11 +22,9 @@ // External includes -#include "boost/smart_ptr.hpp" // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_containers_to_python.cpp b/kratos/python/add_containers_to_python.cpp index a91195c204e1..d58022161269 100644 --- a/kratos/python/add_containers_to_python.cpp +++ b/kratos/python/add_containers_to_python.cpp @@ -50,36 +50,6 @@ #include "utilities/quaternion.h" - -#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION -#undef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION -#endif -#define KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag) \ - scope().attr(#flag) = boost::ref(flag); \ - -#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG -#undef KRATOS_REGISTER_IN_PYTHON_FLAG -#endif -#define KRATOS_REGISTER_IN_PYTHON_FLAG(flag) \ - KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag) \ - KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(NOT_##flag) - -#ifdef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#undef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#endif -#define KRATOS_REGISTER_IN_PYTHON_VARIABLE(variable) \ - scope().attr(#variable) = boost::ref(variable); - - -#ifdef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS -#undef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS -#endif -#define KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS(name) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_X) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Y) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Z) - namespace Kratos { @@ -360,36 +330,36 @@ void AddContainersToPython() - KRATOS_REGISTER_IN_PYTHON_FLAG(STRUCTURE) - KRATOS_REGISTER_IN_PYTHON_FLAG(INTERFACE) - KRATOS_REGISTER_IN_PYTHON_FLAG(FLUID) - KRATOS_REGISTER_IN_PYTHON_FLAG(INLET) - KRATOS_REGISTER_IN_PYTHON_FLAG(OUTLET) - KRATOS_REGISTER_IN_PYTHON_FLAG(VISITED) - KRATOS_REGISTER_IN_PYTHON_FLAG(THERMAL) - KRATOS_REGISTER_IN_PYTHON_FLAG(SELECTED) - KRATOS_REGISTER_IN_PYTHON_FLAG(BOUNDARY) - KRATOS_REGISTER_IN_PYTHON_FLAG(SLIP) - KRATOS_REGISTER_IN_PYTHON_FLAG(CONTACT) - KRATOS_REGISTER_IN_PYTHON_FLAG(TO_SPLIT) - KRATOS_REGISTER_IN_PYTHON_FLAG(TO_ERASE) - KRATOS_REGISTER_IN_PYTHON_FLAG(TO_REFINE) - KRATOS_REGISTER_IN_PYTHON_FLAG(NEW_ENTITY) - KRATOS_REGISTER_IN_PYTHON_FLAG(OLD_ENTITY) - KRATOS_REGISTER_IN_PYTHON_FLAG(ACTIVE) - KRATOS_REGISTER_IN_PYTHON_FLAG(MODIFIED) - KRATOS_REGISTER_IN_PYTHON_FLAG(RIGID) - KRATOS_REGISTER_IN_PYTHON_FLAG(SOLID) - KRATOS_REGISTER_IN_PYTHON_FLAG(MPI_BOUNDARY) - KRATOS_REGISTER_IN_PYTHON_FLAG(INTERACTION) - KRATOS_REGISTER_IN_PYTHON_FLAG(ISOLATED) - KRATOS_REGISTER_IN_PYTHON_FLAG(MASTER) - KRATOS_REGISTER_IN_PYTHON_FLAG(SLAVE) - KRATOS_REGISTER_IN_PYTHON_FLAG(INSIDE) - KRATOS_REGISTER_IN_PYTHON_FLAG(FREE_SURFACE) - KRATOS_REGISTER_IN_PYTHON_FLAG(BLOCKED) - KRATOS_REGISTER_IN_PYTHON_FLAG(MARKER) - KRATOS_REGISTER_IN_PYTHON_FLAG(PERIODIC) + KRATOS_REGISTER_IN_PYTHON_FLAG(STRUCTURE); + KRATOS_REGISTER_IN_PYTHON_FLAG(INTERFACE); + KRATOS_REGISTER_IN_PYTHON_FLAG(FLUID); + KRATOS_REGISTER_IN_PYTHON_FLAG(INLET); + KRATOS_REGISTER_IN_PYTHON_FLAG(OUTLET); + KRATOS_REGISTER_IN_PYTHON_FLAG(VISITED); + KRATOS_REGISTER_IN_PYTHON_FLAG(THERMAL); + KRATOS_REGISTER_IN_PYTHON_FLAG(SELECTED); + KRATOS_REGISTER_IN_PYTHON_FLAG(BOUNDARY); + KRATOS_REGISTER_IN_PYTHON_FLAG(SLIP); + KRATOS_REGISTER_IN_PYTHON_FLAG(CONTACT); + KRATOS_REGISTER_IN_PYTHON_FLAG(TO_SPLIT); + KRATOS_REGISTER_IN_PYTHON_FLAG(TO_ERASE); + KRATOS_REGISTER_IN_PYTHON_FLAG(TO_REFINE); + KRATOS_REGISTER_IN_PYTHON_FLAG(NEW_ENTITY); + KRATOS_REGISTER_IN_PYTHON_FLAG(OLD_ENTITY); + KRATOS_REGISTER_IN_PYTHON_FLAG(ACTIVE); + KRATOS_REGISTER_IN_PYTHON_FLAG(MODIFIED); + KRATOS_REGISTER_IN_PYTHON_FLAG(RIGID); + KRATOS_REGISTER_IN_PYTHON_FLAG(SOLID); + KRATOS_REGISTER_IN_PYTHON_FLAG(MPI_BOUNDARY); + KRATOS_REGISTER_IN_PYTHON_FLAG(INTERACTION); + KRATOS_REGISTER_IN_PYTHON_FLAG(ISOLATED); + KRATOS_REGISTER_IN_PYTHON_FLAG(MASTER); + KRATOS_REGISTER_IN_PYTHON_FLAG(SLAVE); + KRATOS_REGISTER_IN_PYTHON_FLAG(INSIDE); + KRATOS_REGISTER_IN_PYTHON_FLAG(FREE_SURFACE); + KRATOS_REGISTER_IN_PYTHON_FLAG(BLOCKED); + KRATOS_REGISTER_IN_PYTHON_FLAG(MARKER); + KRATOS_REGISTER_IN_PYTHON_FLAG(PERIODIC); AddDeprecatedVariablesToPython(); @@ -768,9 +738,5 @@ void AddContainersToPython() // KRATOS_REGISTER_IN_PYTHON_VARIABLE(CONVECTION_DIFFUSION_SETTINGS) } -} // namespace Python. +} // namespace Python. } // Namespace Kratos - -#undef KRATOS_REGISTER_IN_PYTHON_FLAG -#undef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#undef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS diff --git a/kratos/python/add_containers_to_python.h b/kratos/python/add_containers_to_python.h index c0566be8a0e9..f65b607d1788 100644 --- a/kratos/python/add_containers_to_python.h +++ b/kratos/python/add_containers_to_python.h @@ -25,7 +25,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_dem_variables_to_python.cpp b/kratos/python/add_dem_variables_to_python.cpp index cb5d62c7f3de..fe93a038997e 100644 --- a/kratos/python/add_dem_variables_to_python.cpp +++ b/kratos/python/add_dem_variables_to_python.cpp @@ -41,37 +41,6 @@ // #include "includes/radiation_settings.h" #include "utilities/timer.h" - - -#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION -#undef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION -#endif -#define KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag) \ - scope().attr(#flag) = boost::ref(flag) \ - -#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG -#undef KRATOS_REGISTER_IN_PYTHON_FLAG -#endif -#define KRATOS_REGISTER_IN_PYTHON_FLAG(flag) \ - KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag); \ - KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(NOT_##flag) - -#ifdef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#undef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#endif -#define KRATOS_REGISTER_IN_PYTHON_VARIABLE(variable) \ - scope().attr(#variable) = boost::ref(variable); - - -#ifdef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS -#undef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS -#endif -#define KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS(name) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_X) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Y) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Z) - namespace Kratos { //KRATOS_CREATE_FLAG(STRUCTURE, 63); @@ -200,9 +169,5 @@ void AddDEMVariablesToPython() KRATOS_REGISTER_IN_PYTHON_VARIABLE( ENTHAPLY_ACTIVATION ) } -} // namespace Python. -} // Namespace Kratos - -#undef KRATOS_REGISTER_IN_PYTHON_FLAG -#undef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#undef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS +} // namespace Python. +} // Namespace Kratos \ No newline at end of file diff --git a/kratos/python/add_dem_variables_to_python.h b/kratos/python/add_dem_variables_to_python.h index 8454d67120c5..afb779e4e038 100644 --- a/kratos/python/add_dem_variables_to_python.h +++ b/kratos/python/add_dem_variables_to_python.h @@ -26,7 +26,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_deprecated_variables_to_python.cpp b/kratos/python/add_deprecated_variables_to_python.cpp index 9aa318984f78..888853618636 100644 --- a/kratos/python/add_deprecated_variables_to_python.cpp +++ b/kratos/python/add_deprecated_variables_to_python.cpp @@ -40,37 +40,6 @@ #include "includes/radiation_settings.h" #include "utilities/timer.h" - - -#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION -#undef KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION -#endif -#define KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag) \ - scope().attr(#flag) = boost::ref(flag) \ - -#ifdef KRATOS_REGISTER_IN_PYTHON_FLAG -#undef KRATOS_REGISTER_IN_PYTHON_FLAG -#endif -#define KRATOS_REGISTER_IN_PYTHON_FLAG(flag) \ - KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(flag); \ - KRATOS_REGISTER_IN_PYTHON_FLAG_IMPLEMENTATION(NOT_##flag) - -#ifdef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#undef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#endif -#define KRATOS_REGISTER_IN_PYTHON_VARIABLE(variable) \ - scope().attr(#variable) = boost::ref(variable); - - -#ifdef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS -#undef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS -#endif -#define KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS(name) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_X) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Y) \ - KRATOS_REGISTER_IN_PYTHON_VARIABLE(name##_Z) - namespace Kratos { //KRATOS_CREATE_FLAG(STRUCTURE, 63); @@ -176,9 +145,5 @@ void AddDeprecatedVariablesToPython() KRATOS_REGISTER_IN_PYTHON_VARIABLE( SOLID_FRACTION_RATE ) } -} // namespace Python. +} // namespace Python. } // Namespace Kratos - -#undef KRATOS_REGISTER_IN_PYTHON_FLAG -#undef KRATOS_REGISTER_IN_PYTHON_VARIABLE -#undef KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS diff --git a/kratos/python/add_deprecated_variables_to_python.h b/kratos/python/add_deprecated_variables_to_python.h index 0cefe3b69dd7..a811e8fe7dae 100644 --- a/kratos/python/add_deprecated_variables_to_python.h +++ b/kratos/python/add_deprecated_variables_to_python.h @@ -25,7 +25,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_equation_systems_to_python.h b/kratos/python/add_equation_systems_to_python.h index 0fcff0814e56..68c43001de14 100644 --- a/kratos/python/add_equation_systems_to_python.h +++ b/kratos/python/add_equation_systems_to_python.h @@ -25,7 +25,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_fsi_variables_to_python.h b/kratos/python/add_fsi_variables_to_python.h index c0278f9238a9..0de6c424cf2d 100644 --- a/kratos/python/add_fsi_variables_to_python.h +++ b/kratos/python/add_fsi_variables_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_geometries_to_python.h b/kratos/python/add_geometries_to_python.h index 31a08a227be4..b34d518432de 100644 --- a/kratos/python/add_geometries_to_python.h +++ b/kratos/python/add_geometries_to_python.h @@ -22,7 +22,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_integration_points_to_python.cpp b/kratos/python/add_integration_points_to_python.cpp index 51dcd65ed8e7..b0115c2ba175 100644 --- a/kratos/python/add_integration_points_to_python.cpp +++ b/kratos/python/add_integration_points_to_python.cpp @@ -46,9 +46,9 @@ double IntegrationPointGetWeight(TIntegrationPointType& ThisIntegrationPoint) void AddIntegrationPointsToPython() { - BoundedVectorPythonInterface, 1>::CreateInterfaceWithBase("IntegrationPoint1D", Point<1>()) + BoundedVectorPythonInterface, 1>::CreateInterfaceWithBase("IntegrationPoint1D", Point()) .def(init()) - .def(init, double>()) + .def(init()) .def(init > >()) .def(init >, double >()) .add_property("Weight", IntegrationPointGetWeight >, IntegrationPointSetWeight >) @@ -57,15 +57,12 @@ void AddIntegrationPointsToPython() .def(VectorVectorOperatorPython, unit_vector, IntegrationPoint<1> >()) .def(VectorVectorOperatorPython, scalar_vector, IntegrationPoint<1> >()) .def(VectorVectorOperatorPython, vector, IntegrationPoint<1> >()) - //.def(VectorVectorOperatorPython, mapped_vector, IntegrationPoint<1> >()) - //.def(VectorVectorOperatorPython, compressed_vector, IntegrationPoint<1> >()) - //.def(VectorVectorOperatorPython, coordinate_vector, IntegrationPoint<1> >()) ; - BoundedVectorPythonInterface, 2>::CreateInterfaceWithBase("IntegrationPoint2D", Point<2>()) + BoundedVectorPythonInterface, 2>::CreateInterfaceWithBase("IntegrationPoint2D", Point()) .def(init()) .def(init()) - .def(init, double>()) + .def(init()) .def(init > >()) .def(init >, double >()) .add_property("Weight", IntegrationPointGetWeight >, IntegrationPointSetWeight >) @@ -74,16 +71,13 @@ void AddIntegrationPointsToPython() .def(VectorVectorOperatorPython, unit_vector, IntegrationPoint<2> >()) .def(VectorVectorOperatorPython, scalar_vector, IntegrationPoint<2> >()) .def(VectorVectorOperatorPython, vector, IntegrationPoint<2> >()) - //.def(VectorVectorOperatorPython, mapped_vector, IntegrationPoint<2> >()) - //.def(VectorVectorOperatorPython, compressed_vector, IntegrationPoint<2> >()) - //.def(VectorVectorOperatorPython, coordinate_vector, IntegrationPoint<2> >()) ; - BoundedVectorPythonInterface, 3>::CreateInterfaceWithBase("IntegrationPoint3D", Point<3>()) + BoundedVectorPythonInterface, 3>::CreateInterfaceWithBase("IntegrationPoint3D", Point()) .def(init()) .def(init()) .def(init()) - .def(init, double>()) + .def(init()) .def(init > >()) .def(init >, double >()) .add_property("Weight", IntegrationPointGetWeight >, IntegrationPointSetWeight >) @@ -92,9 +86,6 @@ void AddIntegrationPointsToPython() .def(VectorVectorOperatorPython, unit_vector, IntegrationPoint<3> >()) .def(VectorVectorOperatorPython, scalar_vector, IntegrationPoint<3> >()) .def(VectorVectorOperatorPython, vector, IntegrationPoint<3> >()) - //.def(VectorVectorOperatorPython, mapped_vector, IntegrationPoint<3> >()) - //.def(VectorVectorOperatorPython, compressed_vector, IntegrationPoint<3> >()) - //.def(VectorVectorOperatorPython, coordinate_vector, IntegrationPoint<3> >()) ; } diff --git a/kratos/python/add_io_to_python.h b/kratos/python/add_io_to_python.h index 8055d6c62b3c..e7e8e337a077 100644 --- a/kratos/python/add_io_to_python.h +++ b/kratos/python/add_io_to_python.h @@ -25,7 +25,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_kernel_to_python.h b/kratos/python/add_kernel_to_python.h index cfde87f9d0de..7167387c6f20 100644 --- a/kratos/python/add_kernel_to_python.h +++ b/kratos/python/add_kernel_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_kratos_application_to_python.h b/kratos/python/add_kratos_application_to_python.h index 7bdd6c78cd30..0adf4c688cb0 100644 --- a/kratos/python/add_kratos_application_to_python.h +++ b/kratos/python/add_kratos_application_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_kratos_parameters_to_python.cpp b/kratos/python/add_kratos_parameters_to_python.cpp index be18b7353c07..f86f5c221eb2 100644 --- a/kratos/python/add_kratos_parameters_to_python.cpp +++ b/kratos/python/add_kratos_parameters_to_python.cpp @@ -77,6 +77,8 @@ void AddKratosParametersToPython() .def("RemoveValue", &Parameters::RemoveValue) .def("ValidateAndAssignDefaults",&Parameters::ValidateAndAssignDefaults) .def("RecursivelyValidateAndAssignDefaults",&Parameters::RecursivelyValidateAndAssignDefaults) + .def("IsEquivalentTo",&Parameters::IsEquivalentTo) + .def("HasSameKeysAndTypeOfValuesAs",&Parameters::HasSameKeysAndTypeOfValuesAs) //.def("GetValue", &Parameters::GetValue) //Do not export this method. users shall adopt the operator [] syntax .def("IsNull", &Parameters::IsNull) .def("IsNumber", &Parameters::IsNumber) @@ -85,22 +87,28 @@ void AddKratosParametersToPython() .def("IsBool", &Parameters::IsBool) .def("IsString", &Parameters::IsString) .def("IsArray", &Parameters::IsArray) + .def("IsVector", &Parameters::IsVector) + .def("IsMatrix", &Parameters::IsMatrix) .def("IsSubParameter", &Parameters::IsSubParameter) .def("GetDouble", &Parameters::GetDouble) .def("GetInt", &Parameters::GetInt) .def("GetBool", &Parameters::GetBool) .def("GetString", &Parameters::GetString) + .def("GetVector", &Parameters::GetVector) + .def("GetMatrix", &Parameters::GetMatrix) .def("SetDouble", &Parameters::SetDouble) .def("SetInt", &Parameters::SetInt) .def("SetBool", &Parameters::SetBool) .def("SetString", &Parameters::SetString) + .def("SetVector", &Parameters::SetVector) + .def("SetMatrix", &Parameters::SetMatrix) .def("size", &Parameters::size) //.def("GetArrayItem", &Parameters::GetArrayItem) //Do not export this method. users shall adopt the operator [] syntax .def("__setitem__", &Parameters::SetValue) .def("__getitem__", &Parameters::GetValue) .def("__setitem__", &Parameters::SetArrayItem) .def("__getitem__", &Parameters::GetArrayItem) - .def("__iter__", range(&NonConstBegin, &NonConstEnd) ) + .def("__iter__", boost::python::range(&NonConstBegin, &NonConstEnd) ) .def("items", &items ) .def("keys", &keys ) .def("values", &values ) diff --git a/kratos/python/add_kratos_parameters_to_python.h b/kratos/python/add_kratos_parameters_to_python.h index 82400814ca69..af7b0bf70e59 100644 --- a/kratos/python/add_kratos_parameters_to_python.h +++ b/kratos/python/add_kratos_parameters_to_python.h @@ -22,7 +22,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_legacy_structural_app_vars_to_python.h b/kratos/python/add_legacy_structural_app_vars_to_python.h index 835b149e1d74..23a3d91fca3f 100644 --- a/kratos/python/add_legacy_structural_app_vars_to_python.h +++ b/kratos/python/add_legacy_structural_app_vars_to_python.h @@ -23,7 +23,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_linear_solvers_to_python.h b/kratos/python/add_linear_solvers_to_python.h index 4c6a0165c939..bc6ab9531c44 100644 --- a/kratos/python/add_linear_solvers_to_python.h +++ b/kratos/python/add_linear_solvers_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_logger_to_python.h b/kratos/python/add_logger_to_python.h index 396b0e168ffa..f319f499f195 100644 --- a/kratos/python/add_logger_to_python.h +++ b/kratos/python/add_logger_to_python.h @@ -16,7 +16,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_mapping_variables_to_python.h b/kratos/python/add_mapping_variables_to_python.h index 9850271b3a7f..6a768a6fc118 100644 --- a/kratos/python/add_mapping_variables_to_python.h +++ b/kratos/python/add_mapping_variables_to_python.h @@ -15,10 +15,12 @@ // System includes + // External includes + // Project includes -#include "includes/define.h" + namespace Kratos { diff --git a/kratos/python/add_mat_variables_to_python.h b/kratos/python/add_mat_variables_to_python.h index 084ef7a4eaa2..b7f8f5412025 100644 --- a/kratos/python/add_mat_variables_to_python.h +++ b/kratos/python/add_mat_variables_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_matrix_market_interface_to_python.h b/kratos/python/add_matrix_market_interface_to_python.h index c7ec4a3739c9..a311748f50cc 100644 --- a/kratos/python/add_matrix_market_interface_to_python.h +++ b/kratos/python/add_matrix_market_interface_to_python.h @@ -25,7 +25,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_matrix_to_python.h b/kratos/python/add_matrix_to_python.h index f266acc384e0..02f40cbeae8e 100644 --- a/kratos/python/add_matrix_to_python.h +++ b/kratos/python/add_matrix_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_mesh_to_python.cpp b/kratos/python/add_mesh_to_python.cpp index e2c242a44c9e..dd0b77c4b8cd 100644 --- a/kratos/python/add_mesh_to_python.cpp +++ b/kratos/python/add_mesh_to_python.cpp @@ -58,7 +58,7 @@ typedef MeshType::NodeType NodeType; typedef MeshType::NodesContainerType NodesContainerType; typedef Geometry >::PointsArrayType NodesArrayType; typedef Geometry >::IntegrationPointsArrayType IntegrationPointsArrayType; -typedef Point<3>::CoordinatesArrayType CoordinatesArrayType; +typedef Point::CoordinatesArrayType CoordinatesArrayType; array_1d GetNormalFromCondition( Condition& dummy, @@ -150,10 +150,10 @@ boost::python::list GetIntegrationPointsFromElement( Element& dummy ) for( unsigned int i=0; i< integration_points.size(); i++ ) { boost::python::list item; - Point<3> pnt; - dummy.GetGeometry().GlobalCoordinates(pnt, integration_points[i]); + Point point; + dummy.GetGeometry().GlobalCoordinates(point, integration_points[i]); for( unsigned int j=0; j<3; j++ ) - item.append( pnt[j] ); + item.append( point[j] ); integration_points_list.append( item ); } return( integration_points_list ); @@ -440,7 +440,6 @@ void AddMeshToPython() ; class_ >("Element", init()) - //.def(init& >()) .add_property("Properties", GetPropertiesFromElement, SetPropertiesFromElement) .def("__setitem__", SetValueHelperFunction< Element, Variable< array_1d > >) .def("__getitem__", GetValueHelperFunction< Element, Variable< array_1d > >) @@ -544,7 +543,6 @@ void AddMeshToPython() ; class_ >("Condition", init()) - //.def(init& >()) .add_property("Properties", GetPropertiesFromCondition, SetPropertiesFromCondition) .def("__setitem__", SetValueHelperFunction< Condition, Variable< array_1d > >) .def("__getitem__", GetValueHelperFunction< Condition, Variable< array_1d > >) diff --git a/kratos/python/add_mesh_to_python.h b/kratos/python/add_mesh_to_python.h index 3b1527340b62..dade200b1e33 100644 --- a/kratos/python/add_mesh_to_python.h +++ b/kratos/python/add_mesh_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_model_part_to_python.h b/kratos/python/add_model_part_to_python.h index 07d3755523a0..434d2ad6cc3b 100644 --- a/kratos/python/add_model_part_to_python.h +++ b/kratos/python/add_model_part_to_python.h @@ -23,7 +23,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_model_to_python.h b/kratos/python/add_model_to_python.h index 90d44753127d..f630f4c1c728 100644 --- a/kratos/python/add_model_to_python.h +++ b/kratos/python/add_model_to_python.h @@ -23,7 +23,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_modeler_to_python.h b/kratos/python/add_modeler_to_python.h index d7a47dbbb268..ede56f881dd3 100644 --- a/kratos/python/add_modeler_to_python.h +++ b/kratos/python/add_modeler_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_node_to_python.cpp b/kratos/python/add_node_to_python.cpp index 9ebce98269a8..a5c93df254de 100644 --- a/kratos/python/add_node_to_python.cpp +++ b/kratos/python/add_node_to_python.cpp @@ -148,7 +148,7 @@ void AddNodeToPython() class_, boost::noncopyable >("Node", init()) - .def(init& >()) + .def(init()) .def(VariableIndexingPython >()) .def(VariableIndexingPython >()) .def(VariableIndexingPython >()) diff --git a/kratos/python/add_parallel_linear_solvers_to_python.h b/kratos/python/add_parallel_linear_solvers_to_python.h index 5a81cf9d6085..ecce9a280bdb 100644 --- a/kratos/python/add_parallel_linear_solvers_to_python.h +++ b/kratos/python/add_parallel_linear_solvers_to_python.h @@ -23,7 +23,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_parallel_strategies_to_python.h b/kratos/python/add_parallel_strategies_to_python.h index f81d04a5ea48..000f77f7c538 100644 --- a/kratos/python/add_parallel_strategies_to_python.h +++ b/kratos/python/add_parallel_strategies_to_python.h @@ -22,11 +22,9 @@ // External includes -#include "boost/smart_ptr.hpp" // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_points_to_python.cpp b/kratos/python/add_points_to_python.cpp index 9edcc4ba2e73..0a422b0d90a8 100644 --- a/kratos/python/add_points_to_python.cpp +++ b/kratos/python/add_points_to_python.cpp @@ -68,53 +68,19 @@ double PointGetZ(TPointType& ThisPoint) void AddPointsToPython() { - /* - BoundedVectorPythonInterface, 1>::CreateInterface("Point1D") - .def(init()) - .def(init > >()) - .add_property("X", PointGetX >, PointSetX >) - .def(VectorScalarOperatorPython, double, Point<1> >()) - .def(VectorVectorOperatorPython, zero_vector, Point<1> >()) - .def(VectorVectorOperatorPython, unit_vector, Point<1> >()) - .def(VectorVectorOperatorPython, scalar_vector, Point<1> >()) - .def(VectorVectorOperatorPython, vector, Point<1> >()) - .def(VectorVectorOperatorPython, mapped_vector, Point<1> >()) - .def(VectorVectorOperatorPython, compressed_vector, Point<1> >()) - .def(VectorVectorOperatorPython, coordinate_vector, Point<1> >()) - ; - - BoundedVectorPythonInterface, 2>::CreateInterface("Point2D") - .def(init()) - .def(init()) - .def(init > >()) - .add_property("X", PointGetX >, PointSetX >) - .add_property("Y", PointGetY >, PointSetY >) - .def(VectorScalarOperatorPython, double, Point<2> >()) - .def(VectorVectorOperatorPython, zero_vector, Point<2> >()) - .def(VectorVectorOperatorPython, unit_vector, Point<2> >()) - .def(VectorVectorOperatorPython, scalar_vector, Point<2> >()) - .def(VectorVectorOperatorPython, vector, Point<2> >()) - .def(VectorVectorOperatorPython, mapped_vector, Point<2> >()) - .def(VectorVectorOperatorPython, compressed_vector, Point<2> >()) - .def(VectorVectorOperatorPython, coordinate_vector, Point<2> >()) - ; - */ - BoundedVectorPythonInterface, 3>::CreateInterface("Point3D") + BoundedVectorPythonInterface::CreateInterface("Point3D") .def(init()) .def(init()) .def(init()) .def(init > >()) - .add_property("X", PointGetX >, PointSetX >) - .add_property("Y", PointGetY >, PointSetY >) - .add_property("Z", PointGetZ >, PointSetZ >) - .def(VectorScalarOperatorPython, double, Point<3> >()) - .def(VectorVectorOperatorPython, zero_vector, Point<3> >()) - .def(VectorVectorOperatorPython, unit_vector, Point<3> >()) - .def(VectorVectorOperatorPython, scalar_vector, Point<3> >()) - .def(VectorVectorOperatorPython, vector, Point<3> >()) - //.def(VectorVectorOperatorPython, mapped_vector, Point<3> >()) - //.def(VectorVectorOperatorPython, compressed_vector, Point<3> >()) - // .def(VectorVectorOperatorPython, coordinate_vector, Point<3> >()) + .add_property("X", PointGetX, PointSetX) + .add_property("Y", PointGetY, PointSetY) + .add_property("Z", PointGetZ, PointSetZ) + .def(VectorScalarOperatorPython()) + .def(VectorVectorOperatorPython, Point >()) + .def(VectorVectorOperatorPython, Point >()) + .def(VectorVectorOperatorPython, Point >()) + .def(VectorVectorOperatorPython, Point >()) ; } diff --git a/kratos/python/add_points_to_python.h b/kratos/python/add_points_to_python.h index ddffc17f5b2b..520d3643bb67 100644 --- a/kratos/python/add_points_to_python.h +++ b/kratos/python/add_points_to_python.h @@ -23,7 +23,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_process_info_to_python.h b/kratos/python/add_process_info_to_python.h index 002921606e56..c4ee6de61f3e 100644 --- a/kratos/python/add_process_info_to_python.h +++ b/kratos/python/add_process_info_to_python.h @@ -23,7 +23,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_processes_to_python.h b/kratos/python/add_processes_to_python.h index f098d0f4959f..2476ce67fd77 100644 --- a/kratos/python/add_processes_to_python.h +++ b/kratos/python/add_processes_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_quadratures_to_python.h b/kratos/python/add_quadratures_to_python.h index b74bf6bd13d7..0a91963dbd41 100644 --- a/kratos/python/add_quadratures_to_python.h +++ b/kratos/python/add_quadratures_to_python.h @@ -25,7 +25,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_search_strategies_to_python.h b/kratos/python/add_search_strategies_to_python.h index fa017b8187b5..1e227252a7cc 100644 --- a/kratos/python/add_search_strategies_to_python.h +++ b/kratos/python/add_search_strategies_to_python.h @@ -25,7 +25,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_serializer_to_python.h b/kratos/python/add_serializer_to_python.h index a1637d4059bc..df0b29c8600b 100644 --- a/kratos/python/add_serializer_to_python.h +++ b/kratos/python/add_serializer_to_python.h @@ -23,7 +23,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_sparse_vector_to_python.h b/kratos/python/add_sparse_vector_to_python.h index ad614d588458..d7b46899c133 100644 --- a/kratos/python/add_sparse_vector_to_python.h +++ b/kratos/python/add_sparse_vector_to_python.h @@ -23,7 +23,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_strategies_to_python.h b/kratos/python/add_strategies_to_python.h index 9198b071efd9..e98aa59cb49d 100644 --- a/kratos/python/add_strategies_to_python.h +++ b/kratos/python/add_strategies_to_python.h @@ -22,11 +22,9 @@ // External includes -#include "boost/smart_ptr.hpp" // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_table_to_python.h b/kratos/python/add_table_to_python.h index c56176d5dc6f..88912a64a033 100644 --- a/kratos/python/add_table_to_python.h +++ b/kratos/python/add_table_to_python.h @@ -24,7 +24,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_testing_to_python.h b/kratos/python/add_testing_to_python.h index 45ab5daf5316..4e0d93bf2e40 100644 --- a/kratos/python/add_testing_to_python.h +++ b/kratos/python/add_testing_to_python.h @@ -16,7 +16,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_utilities_to_python.h b/kratos/python/add_utilities_to_python.h index 5375344efd9c..8ad5cabd2202 100644 --- a/kratos/python/add_utilities_to_python.h +++ b/kratos/python/add_utilities_to_python.h @@ -23,7 +23,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python/add_vector_to_python.h b/kratos/python/add_vector_to_python.h index dc228c8c74f6..6a8f3416c6e5 100644 --- a/kratos/python/add_vector_to_python.h +++ b/kratos/python/add_vector_to_python.h @@ -25,7 +25,6 @@ // Project includes -#include "includes/define.h" namespace Kratos diff --git a/kratos/python_scripts/read_materials_process.py b/kratos/python_scripts/read_materials_process.py index 2f2982285194..59d15b54e932 100644 --- a/kratos/python_scripts/read_materials_process.py +++ b/kratos/python_scripts/read_materials_process.py @@ -86,7 +86,9 @@ def _AssignPropertyBlock(self, data): }, "Variables" : { "YOUNG_MODULUS" : 200e9, - "POISSION_RATIO" : 0.3 + "POISSON_RATIO" : 0.3, + "RESIDUAL_VECTOR" : [1.5,0.3,-2.58], + "LOCAL_INERTIA_TENSOR" : [[0.27,0.0],[0.0,0.27]] }, "Tables" : {} } @@ -118,7 +120,22 @@ def _AssignPropertyBlock(self, data): # Add / override the values of material parameters in the properties for key, value in mat["Variables"].items(): var = self._GetItemFromModule(key) - prop.SetValue( var, value) + if isinstance(value, (list, tuple)): + size_1 = len(value) + if isinstance(value[0], (list, tuple)): + size_2 = len(value[0]) + matrix = Matrix(size_1,size_2) + for i in range(size_1): + for j in range(size_2): + matrix[i, j] = value[i][j] + prop.SetValue( var, matrix) + else: + vector = Vector(size_1) + for i in range(size_1): + vector[i] = value[i] + prop.SetValue( var, vector) + else: + prop.SetValue( var, value) # Add / override tables in the properties for key, table in mat["Tables"].items(): diff --git a/kratos/python_scripts/run_tests.py b/kratos/python_scripts/run_tests.py index 8d640e400f49..caac99d5b26b 100644 --- a/kratos/python_scripts/run_tests.py +++ b/kratos/python_scripts/run_tests.py @@ -297,6 +297,16 @@ def main(): signalTime ) + sys.stderr.flush() + + # Run the cpp tests (does the same as run_cpp_tests.py) + print('Running cpp tests', file=sys.stderr) + try: + Tester.SetVerbosity(Tester.Verbosity.PROGRESS) + Tester.RunAllTestCases() + except: + print('[Warning]: Cpp tests were unable to run', file=sys.stderr) + sys.exit(commander.exitCode) diff --git a/kratos/solving_strategies/strategies/residualbased_newton_raphson_strategy.h b/kratos/solving_strategies/strategies/residualbased_newton_raphson_strategy.h index 79a8a1e85f1c..6a2fbfdb2ffb 100644 --- a/kratos/solving_strategies/strategies/residualbased_newton_raphson_strategy.h +++ b/kratos/solving_strategies/strategies/residualbased_newton_raphson_strategy.h @@ -10,18 +10,15 @@ // Main authors: Riccardo Rossi // +#if !defined(KRATOS_RESIDUALBASED_NEWTON_RAPHSON_STRATEGY) +#define KRATOS_RESIDUALBASED_NEWTON_RAPHSON_STRATEGY -#if !defined(KRATOS_RESIDUALBASED_NEWTON_RAPHSON_STRATEGY ) -#define KRATOS_RESIDUALBASED_NEWTON_RAPHSON_STRATEGY +// System includes -// System includes - - -// External includes +// External includes #include "boost/smart_ptr.hpp" - -// Project includes +// Project includes #include "includes/define.h" #include "includes/model_part.h" #include "solving_strategies/strategies/solving_strategy.h" @@ -34,29 +31,24 @@ namespace Kratos { -///@name Kratos Globals +///@name Kratos Globals ///@{ - ///@} -///@name Type Definitions +///@name Type Definitions ///@{ ///@} - -///@name Enum's +///@name Enum's ///@{ - ///@} -///@name Functions +///@name Functions ///@{ - - ///@} -///@name Kratos Classes +///@name Kratos Classes ///@{ /// Short class definition. @@ -71,7 +63,6 @@ namespace Kratos //URL[Example of use ps]{ extended_documentation/no_ex_of_use.ps} - //URL[Extended documentation html]{ extended_documentation/no_ext_doc.html} //URL[Extended documentation pdf]{ extended_documentation/no_ext_doc.pdf} @@ -80,21 +71,19 @@ namespace Kratos //URL[Extended documentation ps]{ extended_documentation/no_ext_doc.ps} - - -template, - class TLinearSolver //= LinearSolver - > +template , + class TLinearSolver //= LinearSolver + > class ResidualBasedNewtonRaphsonStrategy : public SolvingStrategy { -public: - ///@name Type Definitions + public: + ///@name Type Definitions ///@{ typedef ConvergenceCriteria TConvergenceCriteriaType; - // Counted pointer of ClassName + // Counted pointer of ClassName KRATOS_CLASS_POINTER_DEFINITION(ResidualBasedNewtonRaphsonStrategy); typedef SolvingStrategy BaseType; @@ -119,29 +108,27 @@ class ResidualBasedNewtonRaphsonStrategy typedef typename BaseType::LocalSystemMatrixType LocalSystemMatrixType; typedef typename BaseType::TSystemMatrixPointerType TSystemMatrixPointerType; - - typedef typename BaseType::TSystemVectorPointerType TSystemVectorPointerType; + typedef typename BaseType::TSystemVectorPointerType TSystemVectorPointerType; ///@} ///@name Life Cycle - + ///@{ /** * Constructor. */ - + ResidualBasedNewtonRaphsonStrategy( - ModelPart& model_part, + ModelPart &model_part, typename TSchemeType::Pointer pScheme, typename TLinearSolver::Pointer pNewLinearSolver, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, int MaxIterations = 30, bool CalculateReactions = false, bool ReformDofSetAtEachStep = false, - bool MoveMeshFlag = false - ) + bool MoveMeshFlag = false) : SolvingStrategy(model_part, MoveMeshFlag) { KRATOS_TRY; @@ -152,7 +139,6 @@ class ResidualBasedNewtonRaphsonStrategy SetMaxIterationNumber(MaxIterations); mCalculateReactionsFlag = CalculateReactions; - mReformDofSetAtEachStep = ReformDofSetAtEachStep; //saving the convergence criteria to be used @@ -165,10 +151,8 @@ class ResidualBasedNewtonRaphsonStrategy mpLinearSolver = pNewLinearSolver; //setting up the default builder and solver - mpBuilderAndSolver = typename TBuilderAndSolverType::Pointer - ( - new ResidualBasedBlockBuilderAndSolver (mpLinearSolver) - ); + mpBuilderAndSolver = typename TBuilderAndSolverType::Pointer( + new ResidualBasedBlockBuilderAndSolver(mpLinearSolver)); //set flags to start correcty the calculations mSolutionStepIsInitialized = false; @@ -195,7 +179,7 @@ class ResidualBasedNewtonRaphsonStrategy } ResidualBasedNewtonRaphsonStrategy( - ModelPart& model_part, + ModelPart &model_part, typename TSchemeType::Pointer pScheme, typename TLinearSolver::Pointer pNewLinearSolver, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, @@ -203,8 +187,7 @@ class ResidualBasedNewtonRaphsonStrategy int MaxIterations = 30, bool CalculateReactions = false, bool ReformDofSetAtEachStep = false, - bool MoveMeshFlag = false - ) + bool MoveMeshFlag = false) : SolvingStrategy(model_part, MoveMeshFlag) { KRATOS_TRY @@ -215,7 +198,6 @@ class ResidualBasedNewtonRaphsonStrategy SetMaxIterationNumber(MaxIterations); mCalculateReactionsFlag = CalculateReactions; - mReformDofSetAtEachStep = ReformDofSetAtEachStep; //saving the convergence criteria to be used @@ -266,27 +248,27 @@ class ResidualBasedNewtonRaphsonStrategy /** * Destructor. */ - + //Set and Get Scheme ... containing Builder, Update and other - void SetScheme(typename TSchemeType::Pointer pScheme) + void SetScheme(typename TSchemeType::Pointer pScheme) { mpScheme = pScheme; }; - typename TSchemeType::Pointer GetScheme() + typename TSchemeType::Pointer GetScheme() { return mpScheme; }; //Set and Get the BuilderAndSolver - void SetBuilderAndSolver(typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver) + void SetBuilderAndSolver(typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver) { mpBuilderAndSolver = pNewBuilderAndSolver; }; - typename TBuilderAndSolverType::Pointer GetBuilderAndSolver() + typename TBuilderAndSolverType::Pointer GetBuilderAndSolver() { return mpBuilderAndSolver; }; @@ -301,33 +283,33 @@ class ResidualBasedNewtonRaphsonStrategy return mInitializeWasPerformed; } - void SetCalculateReactionsFlag(bool CalculateReactionsFlag) + void SetCalculateReactionsFlag(bool CalculateReactionsFlag) { mCalculateReactionsFlag = CalculateReactionsFlag; } - bool GetCalculateReactionsFlag() + bool GetCalculateReactionsFlag() { return mCalculateReactionsFlag; } - void SetReformDofSetAtEachStepFlag(bool flag) + void SetReformDofSetAtEachStepFlag(bool flag) { mReformDofSetAtEachStep = flag; GetBuilderAndSolver()->SetReshapeMatrixFlag(mReformDofSetAtEachStep); } - bool GetReformDofSetAtEachStepFlag() + bool GetReformDofSetAtEachStepFlag() { return mReformDofSetAtEachStep; } - void SetMaxIterationNumber(unsigned int MaxIterationNumber) + void SetMaxIterationNumber(unsigned int MaxIterationNumber) { mMaxIterationNumber = MaxIterationNumber; } - unsigned int GetMaxIterationNumber() + unsigned int GetMaxIterationNumber() { return mMaxIterationNumber; } @@ -351,8 +333,7 @@ class ResidualBasedNewtonRaphsonStrategy /** * Operation to predict the solution ... if it is not called a trivial predictor is used in which the * values of the solution step of interest are assumed equal to the old values - */ - + */ void Predict() override { KRATOS_TRY @@ -369,10 +350,9 @@ class ResidualBasedNewtonRaphsonStrategy InitializeSolutionStep(); } - TSystemMatrixType& A = *mpA; - TSystemVectorType& Dx = *mpDx; - TSystemVectorType& b = *mpb; - + TSystemMatrixType &A = *mpA; + TSystemVectorType &Dx = *mpDx; + TSystemVectorType &b = *mpb; GetScheme()->Predict(BaseType::GetModelPart(), GetBuilderAndSolver()->GetDofSet(), A, Dx, b); @@ -387,8 +367,7 @@ class ResidualBasedNewtonRaphsonStrategy /** * Initialization of member variables and prior operations - */ - + */ void Initialize() override { KRATOS_TRY; @@ -423,6 +402,33 @@ class ResidualBasedNewtonRaphsonStrategy mpConvergenceCriteria->Initialize(BaseType::GetModelPart()); } + //pointers needed in the solution + typename TBuilderAndSolverType::Pointer pBuilderAndSolver = GetBuilderAndSolver(); + int rank = BaseType::GetModelPart().GetCommunicator().MyPID(); + + //set up the system, operation performed just once unless it is required + //to reform the dof set at each iteration + if (pBuilderAndSolver->GetDofSetIsInitializedFlag() == false || + mReformDofSetAtEachStep == true) + { + //setting up the list of the DOFs to be solved + double setup_dofs_begintime = OpenMPUtils::GetCurrentTime(); + pBuilderAndSolver->SetUpDofSet(pScheme, BaseType::GetModelPart()); + if (this->GetEchoLevel() > 0 && rank == 0) + { + double setup_dofs_endtime = OpenMPUtils::GetCurrentTime(); + std::cout << "setup_dofs_time : " << setup_dofs_endtime - setup_dofs_begintime << std::endl; + } + //shaping correctly the system + double setup_system_begin = OpenMPUtils::GetCurrentTime(); + pBuilderAndSolver->SetUpSystem(BaseType::GetModelPart()); + if (this->GetEchoLevel() > 0 && rank == 0) + { + double setup_system_end = OpenMPUtils::GetCurrentTime(); + std::cout << rank << ": setup_system_time : " << setup_system_end - setup_system_begin << std::endl; + } + } + mInitializeWasPerformed = true; } @@ -434,8 +440,7 @@ class ResidualBasedNewtonRaphsonStrategy * This function calls sequentially: Initialize(), InitializeSolutionStep(), Predict(), * SolveSolutionStep() and FinalizeSolutionStep(). * All those functions can otherwise be called separately. - */ - + */ double Solve() override { Initialize(); @@ -449,7 +454,6 @@ class ResidualBasedNewtonRaphsonStrategy /** * Clears the internal storage */ - void Clear() override { KRATOS_TRY; @@ -472,7 +476,7 @@ class ResidualBasedNewtonRaphsonStrategy if (this->GetEchoLevel() > 0) { - if(BaseType::GetModelPart().GetCommunicator().MyPID() == 0) + if (BaseType::GetModelPart().GetCommunicator().MyPID() == 0) { std::cout << "Newton Raphson strategy Clear function used" << std::endl; } @@ -484,16 +488,14 @@ class ResidualBasedNewtonRaphsonStrategy /** * This should be considered as a "post solution" convergence check which is useful for coupled * analysis - the convergence criteria used is the one used inside the "solve" step - */ - + */ bool IsConverged() override { KRATOS_TRY; - TSystemMatrixType& A = *mpA; - TSystemVectorType& Dx = *mpDx; - TSystemVectorType& b = *mpb; - + TSystemMatrixType &A = *mpA; + TSystemVectorType &Dx = *mpDx; + TSystemVectorType &b = *mpb; if (mpConvergenceCriteria->mActualizeRHSIsNeeded == true) { @@ -512,12 +514,11 @@ class ResidualBasedNewtonRaphsonStrategy * This operations should be called only when needed, before printing as it can involve a non * negligible cost */ - void CalculateOutputData() override { - TSystemMatrixType& A = *mpA; - TSystemVectorType& Dx = *mpDx; - TSystemVectorType& b = *mpb; + TSystemMatrixType &A = *mpA; + TSystemVectorType &Dx = *mpDx; + TSystemVectorType &b = *mpb; GetScheme()->CalculateOutputData(BaseType::GetModelPart(), GetBuilderAndSolver()->GetDofSet(), A, Dx, b); } @@ -526,8 +527,7 @@ class ResidualBasedNewtonRaphsonStrategy * Performs all the required operations that should be done (for each step) * before solving the solution step. * A member variable should be used as a flag to make sure this function is called only once per step. - */ - + */ void InitializeSolutionStep() override { KRATOS_TRY; @@ -540,7 +540,7 @@ class ResidualBasedNewtonRaphsonStrategy //set up the system, operation performed just once unless it is required //to reform the dof set at each iteration if (pBuilderAndSolver->GetDofSetIsInitializedFlag() == false || - mReformDofSetAtEachStep == true) + mReformDofSetAtEachStep == true) { //setting up the list of the DOFs to be solved double setup_dofs_begintime = OpenMPUtils::GetCurrentTime(); @@ -548,7 +548,7 @@ class ResidualBasedNewtonRaphsonStrategy if (this->GetEchoLevel() > 0 && rank == 0) { double setup_dofs_endtime = OpenMPUtils::GetCurrentTime(); - std::cout << "setup_dofs_time : " << setup_dofs_endtime- setup_dofs_begintime << std::endl; + std::cout << "setup_dofs_time : " << setup_dofs_endtime - setup_dofs_begintime << std::endl; } //shaping correctly the system @@ -557,12 +557,12 @@ class ResidualBasedNewtonRaphsonStrategy if (this->GetEchoLevel() > 0 && rank == 0) { double setup_system_end = OpenMPUtils::GetCurrentTime(); - std::cout << rank << ": setup_system_time : " << setup_system_end- setup_system_begin << std::endl; + std::cout << rank << ": setup_system_time : " << setup_system_end - setup_system_begin << std::endl; } } //prints informations about the current time - if (this->GetEchoLevel() != 0 && BaseType::GetModelPart().GetCommunicator().MyPID() == 0 ) + if (this->GetEchoLevel() != 0 && BaseType::GetModelPart().GetCommunicator().MyPID() == 0) { std::cout << " " << std::endl; std::cout << "CurrentTime = " << BaseType::GetModelPart().GetProcessInfo()[TIME] << std::endl; @@ -580,18 +580,17 @@ class ResidualBasedNewtonRaphsonStrategy if (this->GetEchoLevel() > 0 && rank == 0) { double system_matrix_resize_end = OpenMPUtils::GetCurrentTime(); - std::cout << rank << ": system_matrix_resize_time : " << system_matrix_resize_end- system_matrix_resize_begin << std::endl; + std::cout << rank << ": system_matrix_resize_time : " << system_matrix_resize_end - system_matrix_resize_begin << std::endl; } - TSystemMatrixType& A = *mpA; - TSystemVectorType& Dx = *mpDx; - TSystemVectorType& b = *mpb; + TSystemMatrixType &A = *mpA; + TSystemVectorType &Dx = *mpDx; + TSystemVectorType &b = *mpb; //initial operations ... things that are constant over the Solution Step pBuilderAndSolver->InitializeSolutionStep(BaseType::GetModelPart(), A, Dx, b); //initial operations ... things that are constant over the Solution Step pScheme->InitializeSolutionStep(BaseType::GetModelPart(), A, Dx, b); - mSolutionStepIsInitialized = true; } @@ -603,7 +602,6 @@ class ResidualBasedNewtonRaphsonStrategy * after solving the solution step. * A member variable should be used as a flag to make sure this function is called only once per step. */ - void FinalizeSolutionStep() override { KRATOS_TRY; @@ -611,9 +609,9 @@ class ResidualBasedNewtonRaphsonStrategy typename TSchemeType::Pointer pScheme = GetScheme(); typename TBuilderAndSolverType::Pointer pBuilderAndSolver = GetBuilderAndSolver(); - TSystemMatrixType& A = *mpA; - TSystemVectorType& Dx = *mpDx; - TSystemVectorType& b = *mpb; + TSystemMatrixType &A = *mpA; + TSystemVectorType &Dx = *mpDx; + TSystemVectorType &b = *mpb; //Finalisation of the solution step, //operations to be done after achieving convergence, for example the @@ -643,17 +641,16 @@ class ResidualBasedNewtonRaphsonStrategy /** * Solves the current step. This function returns true if a solution has been found, false otherwise. - */ - + */ bool SolveSolutionStep() override { // Pointers needed in the solution typename TSchemeType::Pointer pScheme = GetScheme(); typename TBuilderAndSolverType::Pointer pBuilderAndSolver = GetBuilderAndSolver(); - TSystemMatrixType& A = *mpA; - TSystemVectorType& Dx = *mpDx; - TSystemVectorType& b = *mpb; + TSystemMatrixType &A = *mpA; + TSystemVectorType &Dx = *mpDx; + TSystemVectorType &b = *mpb; //initializing the parameters of the Newton-Raphson cicle unsigned int iteration_number = 1; @@ -680,10 +677,10 @@ class ResidualBasedNewtonRaphsonStrategy pBuilderAndSolver->BuildRHSAndSolve(pScheme, BaseType::GetModelPart(), A, Dx, b); } - + // Debugging info EchoInfo(iteration_number); - + // Updating the results stored in the database UpdateDatabase(A, Dx, b, BaseType::MoveMeshFlag()); @@ -704,10 +701,9 @@ class ResidualBasedNewtonRaphsonStrategy is_converged = mpConvergenceCriteria->PostCriteria(BaseType::GetModelPart(), pBuilderAndSolver->GetDofSet(), A, Dx, b); } - //Iteration Cicle... performed only for NonLinearProblems while (is_converged == false && - iteration_number++ 1 || BaseType::mStiffnessMatrixIsBuilt == false ) + if (BaseType::mRebuildLevel > 1 || BaseType::mStiffnessMatrixIsBuilt == false) { - if( GetKeepSystemConstantDuringIterations() == false) + if (GetKeepSystemConstantDuringIterations() == false) { //A = 0.00; TSparseSpace::SetToZero(A); @@ -754,7 +750,7 @@ class ResidualBasedNewtonRaphsonStrategy // Debugging info EchoInfo(iteration_number); - + // Updating the results stored in the database UpdateDatabase(A, Dx, b, BaseType::MoveMeshFlag()); @@ -778,7 +774,6 @@ class ResidualBasedNewtonRaphsonStrategy } } - //plots a warning if the maximum number of iterations is exceeded if (iteration_number >= mMaxIterationNumber && BaseType::GetModelPart().GetCommunicator().MyPID() == 0) { @@ -810,22 +805,21 @@ class ResidualBasedNewtonRaphsonStrategy ///@} ///@name Operators - + ///@{ ///@} - ///@name Operations + ///@name Operations ///@{ - ///@} - ///@name Access + ///@name Access ///@{ - TSystemMatrixType& GetSystemMatrix() + TSystemMatrixType &GetSystemMatrix() { - TSystemMatrixType& mA = *mpA; + TSystemMatrixType &mA = *mpA; return mA; } @@ -839,65 +833,53 @@ class ResidualBasedNewtonRaphsonStrategy { return mKeepSystemConstantDuringIterations; } - + ///@} - ///@name Inquiry + ///@name Inquiry ///@{ - ///@} - ///@name Friends + ///@name Friends ///@{ - ///@} -private: - ///@name Protected static Member Variables + private: + ///@name Protected static Member Variables ///@{ - ///@} - ///@name Protected member Variables + ///@name Protected member Variables ///@{ - ///@} ///@name Protected Operators ///@{ - ///@} ///@name Protected Operations ///@{ - - ///@} - ///@name Protected Access + ///@name Protected Access ///@{ - ///@} - ///@name Protected Inquiry + ///@name Protected Inquiry ///@{ - ///@} - ///@name Protected LifeCycle + ///@name Protected LifeCycle ///@{ - - ///@} -protected: - ///@name Static Member Variables + protected: + ///@name Static Member Variables ///@{ - ///@} - ///@name Member Variables + ///@name Member Variables ///@{ typename TSchemeType::Pointer mpScheme; @@ -908,10 +890,10 @@ class ResidualBasedNewtonRaphsonStrategy typename TConvergenceCriteriaType::Pointer mpConvergenceCriteria; -// TSystemVectorType mDx; -// TSystemVectorType mb; -// TSystemMatrixType mA; - + // TSystemVectorType mDx; + // TSystemVectorType mb; + // TSystemMatrixType mA; + TSystemVectorPointerType mpDx; TSystemVectorPointerType mpb; TSystemMatrixPointerType mpA; @@ -923,14 +905,14 @@ class ResidualBasedNewtonRaphsonStrategy * - false => form just one (more efficient) * Default = false */ - + bool mReformDofSetAtEachStep; /** * Flag telling if it is needed or not to compute the reaction * default = true * */ - + bool mCalculateReactionsFlag; bool mSolutionStepIsInitialized; @@ -943,29 +925,27 @@ class ResidualBasedNewtonRaphsonStrategy //flag to allow keeping system matrix constant during iterations bool mKeepSystemConstantDuringIterations; - ///@} ///@name Private Operators ///@{ - + /** * Here the database is updated */ - + virtual void UpdateDatabase( - TSystemMatrixType& A, - TSystemVectorType& Dx, - TSystemVectorType& b, - const bool MoveMesh - ) + TSystemMatrixType &A, + TSystemVectorType &Dx, + TSystemVectorType &b, + const bool MoveMesh) { typename TSchemeType::Pointer pScheme = GetScheme(); typename TBuilderAndSolverType::Pointer pBuilderAndSolver = GetBuilderAndSolver(); - + pScheme->Update(BaseType::GetModelPart(), pBuilderAndSolver->GetDofSet(), A, Dx, b); // Move the mesh if needed - if (MoveMesh == true) + if (MoveMesh == true) { BaseType::MoveMesh(); } @@ -973,13 +953,13 @@ class ResidualBasedNewtonRaphsonStrategy //********************************************************************** //********************************************************************** - + virtual void EchoInfo(const unsigned int iteration_number) { - TSystemMatrixType& A = *mpA; - TSystemVectorType& Dx = *mpDx; - TSystemVectorType& b = *mpb; - + TSystemMatrixType &A = *mpA; + TSystemVectorType &Dx = *mpDx; + TSystemVectorType &b = *mpb; + if (this->GetEchoLevel() == 2) //if it is needed to print the debug info { std::cout << "Solution obtained = " << Dx << std::endl; @@ -987,7 +967,7 @@ class ResidualBasedNewtonRaphsonStrategy } else if (this->GetEchoLevel() == 3) //if it is needed to print the debug info { -// std::cout << "After first system solution" << std::endl; + // std::cout << "After first system solution" << std::endl; std::cout << "SystemMatrix = " << A << std::endl; std::cout << "Solution obtained = " << Dx << std::endl; std::cout << "RHS = " << b << std::endl; @@ -996,34 +976,32 @@ class ResidualBasedNewtonRaphsonStrategy { std::stringstream matrix_market_name; matrix_market_name << "A_" << BaseType::GetModelPart().GetProcessInfo()[TIME] << "_" << iteration_number << ".mm"; - TSparseSpace::WriteMatrixMarketMatrix((char*) (matrix_market_name.str()).c_str(), A, false); + TSparseSpace::WriteMatrixMarketMatrix((char *)(matrix_market_name.str()).c_str(), A, false); std::stringstream matrix_market_vectname; matrix_market_vectname << "b_" << BaseType::GetModelPart().GetProcessInfo()[TIME] << "_" << iteration_number << ".mm.rhs"; - TSparseSpace::WriteMatrixMarketVector((char*) (matrix_market_vectname.str()).c_str(), b); + TSparseSpace::WriteMatrixMarketVector((char *)(matrix_market_vectname.str()).c_str(), b); } } - + /** * This method prints information after reach the max number of interations */ - + virtual void MaxIterationsExceeded() { - if (this->GetEchoLevel() != 0 && BaseType::GetModelPart().GetCommunicator().MyPID() == 0 ) + if (this->GetEchoLevel() != 0 && BaseType::GetModelPart().GetCommunicator().MyPID() == 0) { std::cout << "***************************************************" << std::endl; std::cout << "******* ATTENTION: max iterations exceeded ********" << std::endl; std::cout << "***************************************************" << std::endl; } - } /** * function to perform expensive checks. * It is designed to be called ONCE to verify that the input is correct. */ - int Check() override { KRATOS_TRY @@ -1041,34 +1019,27 @@ class ResidualBasedNewtonRaphsonStrategy KRATOS_CATCH("") } - ///@} ///@name Private Operations ///@{ - ///@} - ///@name Private Access + ///@name Private Access ///@{ - ///@} - ///@name Private Inquiry + ///@name Private Inquiry ///@{ - ///@} - ///@name Un accessible methods + ///@name Un accessible methods ///@{ /** * Copy constructor. */ - - ResidualBasedNewtonRaphsonStrategy(const ResidualBasedNewtonRaphsonStrategy& Other) - { - }; + ResidualBasedNewtonRaphsonStrategy(const ResidualBasedNewtonRaphsonStrategy &Other){}; ///@} @@ -1076,13 +1047,11 @@ class ResidualBasedNewtonRaphsonStrategy ///@} -///@name Type Definitions +///@name Type Definitions ///@{ - ///@} } /* namespace Kratos. */ #endif /* KRATOS_RESIDUALBASED_NEWTON_RAPHSON_STRATEGY defined */ - diff --git a/kratos/sources/c2c_variables.cpp b/kratos/sources/c2c_variables.cpp index fb6e02273043..b337c6bc2953 100644 --- a/kratos/sources/c2c_variables.cpp +++ b/kratos/sources/c2c_variables.cpp @@ -22,42 +22,6 @@ #include "includes/c2c_variables.h" #include "includes/kernel.h" #include "includes/node.h" -// #include "includes/element.h" -// #include "includes/condition.h" -// #include "includes/constitutive_law.h" -// #include "includes/geometrical_object.h" - -// #include "geometries/line_2d.h" -// #include "geometries/line_2d_2.h" -// #include "geometries/line_2d_3.h" -// #include "geometries/line_3d_2.h" -// #include "geometries/line_3d_3.h" -// #include "geometries/point.h" -// #include "geometries/point_2d.h" -// #include "geometries/point_3d.h" -// #include "geometries/sphere_3d_1.h" -// #include "geometries/triangle_2d_3.h" -// #include "geometries/triangle_2d_6.h" -// #include "geometries/triangle_3d_3.h" -// #include "geometries/triangle_3d_6.h" -// #include "geometries/quadrilateral_2d_4.h" -// #include "geometries/quadrilateral_2d_8.h" -// #include "geometries/quadrilateral_2d_9.h" -// #include "geometries/quadrilateral_3d_4.h" -// #include "geometries/quadrilateral_3d_8.h" -// #include "geometries/quadrilateral_3d_9.h" -// #include "geometries/tetrahedra_3d_4.h" -// #include "geometries/tetrahedra_3d_10.h" -// #include "geometries/prism_3d_6.h" -// #include "geometries/prism_3d_15.h" -// #include "geometries/hexahedra_3d_8.h" -// #include "geometries/hexahedra_3d_20.h" -// #include "geometries/hexahedra_3d_27.h" - -// #include "python/add_c2c_variables_to_python.h" - -// #include "includes/convection_diffusion_settings.h" -// #include "includes/radiation_settings.h" #include "includes/kratos_flags.h" diff --git a/kratos/sources/code_location.cpp b/kratos/sources/code_location.cpp index 6a83a3b9c353..edb381b818e3 100644 --- a/kratos/sources/code_location.cpp +++ b/kratos/sources/code_location.cpp @@ -83,7 +83,7 @@ namespace Kratos ReduceTemplateArgumentsToFirstN(clean_function_name, "ResidualBasedLinearStrategy", 1); ReplaceAll(clean_function_name, "Dof", "Dof"); ReplaceAll(clean_function_name, "Node<3, Dof >", "Node"); - ReplaceAll(clean_function_name, "Point<3,double>", "Point"); + return clean_function_name; diff --git a/kratos/sources/deprecated_variables.cpp b/kratos/sources/deprecated_variables.cpp index 6184558b21b2..9400abdd52e8 100644 --- a/kratos/sources/deprecated_variables.cpp +++ b/kratos/sources/deprecated_variables.cpp @@ -27,33 +27,6 @@ #include "includes/constitutive_law.h" #include "includes/geometrical_object.h" -#include "geometries/line_2d.h" -#include "geometries/line_2d_2.h" -#include "geometries/line_2d_3.h" -#include "geometries/line_3d_2.h" -#include "geometries/line_3d_3.h" -#include "geometries/point.h" -#include "geometries/point_2d.h" -#include "geometries/point_3d.h" -#include "geometries/sphere_3d_1.h" -#include "geometries/triangle_2d_3.h" -#include "geometries/triangle_2d_6.h" -#include "geometries/triangle_3d_3.h" -#include "geometries/triangle_3d_6.h" -#include "geometries/quadrilateral_2d_4.h" -#include "geometries/quadrilateral_2d_8.h" -#include "geometries/quadrilateral_2d_9.h" -#include "geometries/quadrilateral_3d_4.h" -#include "geometries/quadrilateral_3d_8.h" -#include "geometries/quadrilateral_3d_9.h" -#include "geometries/tetrahedra_3d_4.h" -#include "geometries/tetrahedra_3d_10.h" -#include "geometries/prism_3d_6.h" -#include "geometries/prism_3d_15.h" -#include "geometries/hexahedra_3d_8.h" -#include "geometries/hexahedra_3d_20.h" -#include "geometries/hexahedra_3d_27.h" - #include "python/add_deprecated_variables_to_python.h" #include "includes/convection_diffusion_settings.h" diff --git a/kratos/sources/variables.cpp b/kratos/sources/variables.cpp index 9147e6761090..f4b466f959aa 100644 --- a/kratos/sources/variables.cpp +++ b/kratos/sources/variables.cpp @@ -31,7 +31,6 @@ #include "geometries/line_2d_2.h" #include "geometries/line_2d_3.h" #include "geometries/line_3d_2.h" -#include "geometries/line_gl_3d_2.h" #include "geometries/line_3d_3.h" #include "geometries/point.h" #include "geometries/point_2d.h" @@ -1120,7 +1119,7 @@ namespace Kratos //Register general geometries: //Points: - Serializer::Register( "Point", Point<3>() ); + Serializer::Register( "Point", Point() ); Point2D > Point2DPrototype( Element::GeometryType::PointsArrayType( 1 ) ); Serializer::Register( "Point2D", Point2DPrototype ); diff --git a/kratos/spatial_containers/configures/point_configure.h b/kratos/spatial_containers/configures/point_configure.h index 9a5edb8d6a1e..bdac1d22d0cc 100644 --- a/kratos/spatial_containers/configures/point_configure.h +++ b/kratos/spatial_containers/configures/point_configure.h @@ -72,8 +72,8 @@ class PointConfigure { * @param PointType Point of doubles with 3 coordinates (Dimension = 3) * @param PointerType Pointer to Point of doubles with 3 coordinates (Dimension = 3) */ - typedef Point PointType; - typedef Point::Pointer PointerType; + typedef Point PointType; + typedef Point::Pointer PointerType; /** Additional types needed by the bins. * @param PointContainerType Point Container. diff --git a/kratos/spatial_containers/dem_search.h b/kratos/spatial_containers/dem_search.h index 909f3a902296..9db208ab2acd 100644 --- a/kratos/spatial_containers/dem_search.h +++ b/kratos/spatial_containers/dem_search.h @@ -117,9 +117,9 @@ class RadiusPoint SpatialSearch::ElementPointerType pNaseElem; - void operator=(Point const& Other){ + void operator=(Point const& Other){ for(std::size_t i = 0; i < Dimension; i++) - coord[i] = Other.coord[i]; + coord[i] = Other[i]; } }; diff --git a/kratos/spatial_containers/octree_binary.h b/kratos/spatial_containers/octree_binary.h index f38c5f847d4a..f849bdbe3a21 100644 --- a/kratos/spatial_containers/octree_binary.h +++ b/kratos/spatial_containers/octree_binary.h @@ -1245,8 +1245,8 @@ namespace Kratos { inline bool IsIntersected(typename cell_type::pointer_type rObject, double Tolerance, const double* rLowPoint, const double* rHighPoint) { - Point<3,double> low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); - Point<3,double> high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); + Point low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance); + Point high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance); return HasIntersection(rObject->GetGeometry(), low_point, high_point); @@ -1256,12 +1256,12 @@ namespace Kratos { /// detect if triangle and box are intersected - virtual bool HasIntersection(Element::GeometryType& geom_1, const Point<3, double>& rLowPoint, const Point<3, double>& rHighPoint ) + virtual bool HasIntersection(Element::GeometryType& geom_1, const Point& rLowPoint, const Point& rHighPoint ) { // const BaseType& geom_1 = rGeometry; - Point<3, double> boxcenter; - Point<3, double> boxhalfsize; + Point boxcenter; + Point boxhalfsize; boxcenter[0] = 0.50 * ( rLowPoint[0] + rHighPoint[0] ); boxcenter[1] = 0.50 * ( rLowPoint[1] + rHighPoint[1] ); @@ -1274,7 +1274,7 @@ namespace Kratos { std::size_t size = geom_1.size(); - std::vector > triverts; + std::vector triverts; triverts.resize( size ); @@ -1326,7 +1326,7 @@ namespace Kratos { return false; } - inline bool TriBoxOverlap( Point<3, double>& boxcenter, Point<3, double>& boxhalfsize, std::vector< Point<3, double> >& triverts ) + inline bool TriBoxOverlap( Point& boxcenter, Point& boxhalfsize, std::vector< Point >& triverts ) { /* use separating axis theorem to test overlap between triangle and box */ @@ -1486,7 +1486,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v2, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { p0 = a * v0[1] - b * v0[2]; @@ -1515,7 +1515,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v1, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { p0 = a * v0[1] - b * v0[2]; @@ -1545,7 +1545,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v2, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { @@ -1575,7 +1575,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v1, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { @@ -1607,7 +1607,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v1, array_1d& v2, - Point<3, double>& boxhalfsize + Point boxhalfsize ) { p1 = a * v1[0] - b * v1[1]; @@ -1636,7 +1636,7 @@ namespace Kratos { double& min, double& max, double& rad, array_1d& v0, array_1d& v1, - Point<3, double>& boxhalfsize + Point& boxhalfsize ) { p0 = a * v0[0] - b * v0[1]; diff --git a/kratos/spatial_containers/spatial_search.h b/kratos/spatial_containers/spatial_search.h index b4aa9cd741ca..b7e70d479bac 100644 --- a/kratos/spatial_containers/spatial_search.h +++ b/kratos/spatial_containers/spatial_search.h @@ -75,7 +75,7 @@ class SpatialSearch }; /// Common Defines - typedef Point PointType; + typedef Point PointType; typedef ModelPart::ElementsContainerType ElementsContainerType; typedef ModelPart::ElementType ElementType; diff --git a/kratos/templates/geometry_template b/kratos/templates/geometry_template index 46c462b4623f..abc32b5a0e73 100644 --- a/kratos/templates/geometry_template +++ b/kratos/templates/geometry_template @@ -229,16 +229,16 @@ namespace Kratos ///@name Operations ///@{ - virtual boost::shared_ptr< Geometry< Point<3> > > Clone() const + virtual boost::shared_ptr< Geometry< Point > > Clone() const { - Geometry< Point<3> >::PointsArrayType NewPoints; + Geometry< Point >::PointsArrayType NewPoints; //making a copy of the nodes TO POINTS (not Nodes!!!) for(IndexType i = 0 ; i < mPoints.size() ; i++) NewPoints.push_back(mPoints[i]); //creating a geometry with the new points - boost::shared_ptr< Geometry< Point<3> > > p_clone(new ClassName< Point<3> >(NewPoints)); + boost::shared_ptr< Geometry< Point > > p_clone(new ClassName< Point >(NewPoints)); p_clone->ClonePoints(); return p_clone; @@ -473,7 +473,7 @@ namespace Kratos @see DeterminantOfJacobian @see InverseOfJacobian */ - virtual double DeterminantOfJacobian(const Point<3>& rPoint) + virtual double DeterminantOfJacobian(const Point& rPoint) { KRATOS_THROW_ERROR(std::logic_error, "Calling base class DeterminantOfJacobian method instead of drived class one. Please check the definition of derived class." , *this); diff --git a/kratos/tests/geometries/test_triangle_2d_3.cpp b/kratos/tests/geometries/test_triangle_2d_3.cpp index dd7f4bf80e4c..180b4b31e1a6 100644 --- a/kratos/tests/geometries/test_triangle_2d_3.cpp +++ b/kratos/tests/geometries/test_triangle_2d_3.cpp @@ -170,12 +170,12 @@ namespace Testing { KRATOS_TEST_CASE_IN_SUITE(Triangle2D3IsInside, KratosCoreGeometriesFastSuite) { auto geom = GenerateRightTriangle2D3>(); - Point<3> PointInside(0.33, 0.33); - Point<3> PointOutside(0.66, 0.66); - Point<3> PointInVertex(0.0, 0.0); - Point<3> PointInEdge(0.5, 0.5); + Point PointInside(0.33, 0.33); + Point PointOutside(0.66, 0.66); + Point PointInVertex(0.0, 0.0); + Point PointInEdge(0.5, 0.5); - Point<3> LocalCoords; + Point LocalCoords; KRATOS_CHECK(geom->IsInside(PointInside, LocalCoords, EPSILON)); KRATOS_CHECK_IS_FALSE(geom->IsInside(PointOutside, LocalCoords, EPSILON)); @@ -432,5 +432,72 @@ namespace Testing { KRATOS_CHECK_NEAR(JacobianDeterminant, ExpectedJacobian, TOLERANCE); } + /** + * Test an overlaping box and triangle (intersects a triangle edge) HasIntersection + */ + KRATOS_TEST_CASE_IN_SUITE(Triangle2D3IntersectionBoxEdge, KratosCoreGeometriesFastSuite) { + auto geom = GenerateRightTriangle2D3>(); + Point point_1(-0.1, 0.1, 0.0); + Point point_2( 0.1, 0.3, 0.0); + KRATOS_CHECK(geom->HasIntersection(point_1, point_2)); + + Point point_3( 0.1,-0.1, 0.0); + Point point_4( 0.3, 0.1, 0.0); + KRATOS_CHECK(geom->HasIntersection(point_3, point_4)); + + Point point_5( 0.3, 0.2, 0.0); + Point point_6( 1.0, 1.0, 0.0); + KRATOS_CHECK(geom->HasIntersection(point_5, point_6)); + } + + /** + * Test an overlaping box and triangle (intersects a triangle node) HasIntersection + */ + KRATOS_TEST_CASE_IN_SUITE(Triangle2D3IntersectionBoxNode, KratosCoreGeometriesFastSuite) { + auto geom = GenerateRightTriangle2D3>(); + Point point_1(-0.5, 0.8, 0.0); + Point point_2( 0.5, 1.2, 0.0); + KRATOS_CHECK(geom->HasIntersection(point_1, point_2)); + + Point point_3( 0.3,-0.5, 0.0); + Point point_4( 1.2, 0.5, 0.0); + KRATOS_CHECK(geom->HasIntersection(point_3, point_4)); + + Point point_5(-0.8,-0.3, 0.0); + Point point_6( 0.2, 0.3, 0.0); + KRATOS_CHECK(geom->HasIntersection(point_5, point_6)); + } + + /** + * Test a box inside a triangle HasIntersection + */ + KRATOS_TEST_CASE_IN_SUITE(Triangle2D3IntersectionBoxInside, KratosCoreGeometriesFastSuite) { + auto geom = GenerateRightTriangle2D3>(); + Point point_1( 0.1, 0.1, 0.0); + Point point_2( 0.3, 0.4, 0.0); + KRATOS_CHECK(geom->HasIntersection(point_1, point_2)); + } + + /** + * Test a non overlaping box and triangle HasIntersection + */ + KRATOS_TEST_CASE_IN_SUITE(Triangle2D3IntersectionBoxNoIntersect, KratosCoreGeometriesFastSuite) { + auto geom = GenerateRightTriangle2D3>(); + Point point_1( 0.6, 0.5, 0.0); + Point point_2( 1.0, 1.0, 0.0); + KRATOS_CHECK_IS_FALSE(geom->HasIntersection(point_1, point_2)); + } + + /** + * Test a box outside the triangle plane + * HasIntersection should return true, because a 2D-space does not take care about Z-coordinates + */ + KRATOS_TEST_CASE_IN_SUITE(Triangle2D3IntersectionBoxOutsidePlane, KratosCoreGeometriesFastSuite) { + auto geom = GenerateRightTriangle2D3>(); + Point point_1( 0.2, 0.1, 0.1); + Point point_2( 0.3, 0.5, 1.0); + KRATOS_CHECK(geom->HasIntersection(point_1, point_2)); + } + } // namespace Testing. } // namespace Kratos. diff --git a/kratos/tests/geometries/test_triangle_3d_3.cpp b/kratos/tests/geometries/test_triangle_3d_3.cpp index 7bf5e1a607fe..963a75647521 100644 --- a/kratos/tests/geometries/test_triangle_3d_3.cpp +++ b/kratos/tests/geometries/test_triangle_3d_3.cpp @@ -58,6 +58,19 @@ namespace Testing )); } + /** Generates a sample Triangle3D3. + * Generates an equilateral triangle with vertices at each axis. + * @return Pointer to a Triangle3D3 + */ + template + typename Triangle3D3::Pointer GenerateEquilateralTriangle3D3() { + return typename Triangle3D3::Pointer(new Triangle3D3( + GeneratePoint(1.0, 0.0, 0.0), + GeneratePoint(0.0, 1.0, 0.0), + GeneratePoint(0.0, 0.0, 1.0) + )); + } + /// Tests /** Checks if the number of edges is correct. @@ -155,12 +168,12 @@ namespace Testing KRATOS_TEST_CASE_IN_SUITE(Triangle3D3IsInside, KratosCoreGeometriesFastSuite) { auto geom = GenerateRightTriangle3D3>(); - Point<3> PointInside(0.33, 0.33, 0.0); - Point<3> PointOutside(0.66, 0.66, 0.0); - Point<3> PointInVertex(0.0, 0.0, 0.0); - Point<3> PointInEdge(0.5, 0.5, 0.0); + Point PointInside(0.33, 0.33, 0.0); + Point PointOutside(0.66, 0.66, 0.0); + Point PointInVertex(0.0, 0.0, 0.0); + Point PointInEdge(0.5, 0.5, 0.0); - Point<3> LocalCoords; + Point LocalCoords; // It appears that the function checks whether the PROJECTION of the point is inside the geometry. KRATOS_CHECK(geom->IsInside(PointInside, LocalCoords, EPSILON)); @@ -342,12 +355,12 @@ namespace Testing /** Tests two very near parallel triangles HasIntegration which should give false */ KRATOS_TEST_CASE_IN_SUITE(Triangle3D3ParallelNoIntersection, KratosCoreGeometriesFastSuite) { - Triangle3D3 > triangle_1( + Triangle3D3 triangle_1( GeneratePoint >(0.0, 0.0, 0.0), GeneratePoint >(10., 0.0, 2.0), GeneratePoint >(0.0, 1.0, 0.0) ); - Triangle3D3 > triangle_2( + Triangle3D3 triangle_2( GeneratePoint >(0.0, 0.0, 0.01), GeneratePoint >(10., 0.0, 2.01), GeneratePoint >(0.0, 1.0, 0.01) @@ -357,12 +370,12 @@ namespace Testing } KRATOS_TEST_CASE_IN_SUITE(Triangle3D3ParallelNearIntersection, KratosCoreGeometriesFastSuite) { - Triangle3D3 > triangle_1( + Triangle3D3 triangle_1( GeneratePoint >(0.0, 0.0, 0.0), GeneratePoint >(10., 0.0, 2.0), GeneratePoint >(0.0, 1.0, 0.0) ); - Triangle3D3 > triangle_2( + Triangle3D3 triangle_2( GeneratePoint >(0.0, 0.0, 0.00000001), GeneratePoint >(10., 0.0, 2.00000001), GeneratePoint >(0.0, 1.0, 0.00000001) @@ -372,12 +385,12 @@ namespace Testing } KRATOS_TEST_CASE_IN_SUITE(Triangle3D3CoplanarNoIntersection, KratosCoreGeometriesFastSuite) { - Triangle3D3 > triangle_1( + Triangle3D3 triangle_1( GeneratePoint >(0.0, 0.0, 0.0), GeneratePoint >(10., 0.0, 2.0), GeneratePoint >(0.0, 1.0, 0.0) ); - Triangle3D3 > triangle_2( + Triangle3D3 triangle_2( GeneratePoint >(0.00000001, 0.00000001, 0.00000001), GeneratePoint >(-10., 0.0, -2.0), GeneratePoint >(0.0, -1.0, 0.00) @@ -387,12 +400,12 @@ namespace Testing } KRATOS_TEST_CASE_IN_SUITE(Triangle3D3CoplanarPointIntersection, KratosCoreGeometriesFastSuite) { - Triangle3D3 > triangle_1( + Triangle3D3 triangle_1( GeneratePoint >(0.0, 0.0, 0.0), GeneratePoint >(10., 0.0, 2.0), GeneratePoint >(0.0, 1.0, 0.0) ); - Triangle3D3 > triangle_2( + Triangle3D3 triangle_2( GeneratePoint >(0.00, 0.00, 0.0), GeneratePoint >(-10., 0.0, -2.0), GeneratePoint >(0.0, -1.0, 0.00) @@ -402,12 +415,12 @@ namespace Testing } KRATOS_TEST_CASE_IN_SUITE(Triangle3D3EdgeIntersection, KratosCoreGeometriesFastSuite) { - Triangle3D3 > triangle_1( + Triangle3D3 triangle_1( GeneratePoint >(0.0, 0.0, 0.0), GeneratePoint >(10., 0.0, 2.0), GeneratePoint >(0.0, 1.0, 0.0) ); - Triangle3D3 > triangle_2( + Triangle3D3 triangle_2( GeneratePoint >(0.00, 0.00, 0.0), GeneratePoint >(10., 0.0, 2.0), GeneratePoint >(0.0, -1.0, 0.00) @@ -417,12 +430,12 @@ namespace Testing } KRATOS_TEST_CASE_IN_SUITE(Triangle3D3InsideIntersection, KratosCoreGeometriesFastSuite) { - Triangle3D3 > triangle_1( + Triangle3D3 triangle_1( GeneratePoint >(0.0, 0.0, 0.0), GeneratePoint >(0.0, 0.0, 4.0), GeneratePoint >(0.0, 4.0, 0.0) ); - Triangle3D3 > triangle_2( + Triangle3D3 triangle_2( GeneratePoint >(0.0, 1.0, 1.0), GeneratePoint >(0.0, 1.0, 3.0), GeneratePoint >(0.0, 3.0, 1.0) @@ -431,5 +444,61 @@ namespace Testing KRATOS_CHECK(triangle_1.HasIntersection(triangle_2)); } + /** + * Test an overlaping box and triangle (intersects a triangle edge) HasIntersection + */ + KRATOS_TEST_CASE_IN_SUITE(Triangle3D3IntersectionBoxEdge, KratosCoreGeometriesFastSuite) { + auto geom = GenerateEquilateralTriangle3D3>(); + Point point_1( 0.3, 0.3,-0.3); + Point point_2( 1.0, 1.0, 1.0); + KRATOS_CHECK(geom->HasIntersection(point_1, point_2)); + + Point point_3(-0.3, 0.3, 0.3); + Point point_4( 1.0, 1.0, 1.0); + KRATOS_CHECK(geom->HasIntersection(point_3, point_4)); + + Point point_5( 0.3,-0.3, 0.3); + Point point_6( 1.0, 1.0, 1.0); + KRATOS_CHECK(geom->HasIntersection(point_5, point_6)); + } + + /** + * Test an overlaping box and triangle (intersects a triangle node) HasIntersection + */ + KRATOS_TEST_CASE_IN_SUITE(Triangle3D3IntersectionBoxNode, KratosCoreGeometriesFastSuite) { + auto geom = GenerateEquilateralTriangle3D3>(); + Point point_1(-0.5, 0.8,-0.3); + Point point_2( 0.5, 1.2, 0.3); + KRATOS_CHECK(geom->HasIntersection(point_1, point_2)); + + Point point_3(-0.3,-0.5, 0.8); + Point point_4( 0.3, 0.5, 1.2); + KRATOS_CHECK(geom->HasIntersection(point_3, point_4)); + + Point point_5( 0.8,-0.3,-0.5); + Point point_6( 1.2, 0.3, 0.5); + KRATOS_CHECK(geom->HasIntersection(point_5, point_6)); + } + + /** + * Test an overlaping box and triangle (intersects the triangle face) HasIntersection + */ + KRATOS_TEST_CASE_IN_SUITE(Triangle3D3IntersectionBoxPlane, KratosCoreGeometriesFastSuite) { + auto geom = GenerateEquilateralTriangle3D3>(); + Point point_1( 0.0, 0.0, 0.0); + Point point_2( 0.4, 0.5, 0.6); + KRATOS_CHECK(geom->HasIntersection(point_1, point_2)); + } + + /** + * Test a non overlaping box and triangle HasIntersection + */ + KRATOS_TEST_CASE_IN_SUITE(Triangle3D3IntersectionBoxNoIntersect, KratosCoreGeometriesFastSuite) { + auto geom = GenerateEquilateralTriangle3D3>(); + Point point_1( 0.4, 0.5, 0.6); + Point point_2( 1.0, 1.0, 1.0); + KRATOS_CHECK_IS_FALSE(geom->HasIntersection(point_1, point_2)); + } + } // namespace Testing. } // namespace Kratos. diff --git a/kratos/tests/materials.json b/kratos/tests/materials.json index 03d981f22fa3..3b9b93153df9 100644 --- a/kratos/tests/materials.json +++ b/kratos/tests/materials.json @@ -36,15 +36,19 @@ "YOUNG_MODULUS": 100.0, "POISSON_RATIO": 0.1, "YIELD_STRESS": 800.0, - "HTC" : 0.3 + "HTC" : 0.3, + "CAUCHY_STRESS_VECTOR" : [1.5,0.3,-2.58], + "KratosMultiphysics.LOCAL_INERTIA_TENSOR" : [[1.27,-22.5],[2.01,0.257]] }, "Tables": { - "Table1" : { + "Table1" : { "input_variable": "TEMPERATURE", "output_variable": "YOUNG_MODULUS", "data": [ [0.0, 2.0], - [1.0, 10.0] + [1.0, 10.0], + [2.0, 12.0], + [3.5, 15.0] ] } } diff --git a/kratos/tests/math_utils/test_math_utils.cpp b/kratos/tests/math_utils/test_math_utils.cpp index 7ade86b7c767..8b39d0e1d47b 100644 --- a/kratos/tests/math_utils/test_math_utils.cpp +++ b/kratos/tests/math_utils/test_math_utils.cpp @@ -131,7 +131,7 @@ namespace Kratos double det = MathUtils::GeneralizedDet(mat23); - KRATOS_CHECK_NEAR(det, 0.0, tolerance); + KRATOS_CHECK_NEAR(det, 1.0, tolerance); Matrix mat55 = ZeroMatrix(5, 5); mat55(0,0) = 1.0; diff --git a/kratos/tests/processes/test_find_intersected_geometrical_objects_process.cpp b/kratos/tests/processes/test_find_intersected_geometrical_objects_process.cpp index a2ccb3155877..70effc018a20 100644 --- a/kratos/tests/processes/test_find_intersected_geometrical_objects_process.cpp +++ b/kratos/tests/processes/test_find_intersected_geometrical_objects_process.cpp @@ -41,8 +41,6 @@ namespace Kratos { "element_name": "Element3D4N" } )"); - std::size_t number_of_divisions = mesher_parameters["number_of_divisions"].GetInt(); - ModelPart volume_part("Volume"); ModelPart skin_part("Boundaries"); skin_part.CreateNewNode(1, 1., .2, 0.); diff --git a/kratos/tests/test_kratos_parameters.py b/kratos/tests/test_kratos_parameters.py index e42b0c1fa17e..277b8fdc7983 100644 --- a/kratos/tests/test_kratos_parameters.py +++ b/kratos/tests/test_kratos_parameters.py @@ -1,5 +1,7 @@ from __future__ import print_function, absolute_import, division from KratosMultiphysics import Parameters +from KratosMultiphysics import Vector +from KratosMultiphysics import Matrix import KratosMultiphysics.KratosUnittest as KratosUnittest @@ -121,6 +123,71 @@ } }""" +four_levels = """{ + "int_value": 10, + "double_value": 2.0, + "bool_value": true, + "string_value": "hello", + "level1": { + "level2": { + "level3": { + "level4": { + } + } + } + } +}""" + +four_levels_variation = """{ + "int_value": 10, + "double_value": 2.0, + "bool_value": true, + "string_value": "hello", + "level1": { + "a":11.0, + "level2": { + "level3": { + "level4": { + } + } + } + } +}""" + +four_levels_wrong_variation = """{ + "int_value": 10, + "double_value": "hi", + "bool_value": true, + "string_value": "hello", + "level1": { + "a":11.0, + "level2": { + "level3": { + "level4": { + } + } + } + } +}""" + +four_levels_defaults = """{ + "int_value": 10, + "double_value": 2.0, + "bool_value": true, + "string_value": "hello", + "level1": { + "a":1.0, + "level2": { + "b":2.0, + "level3": { + "c":3.0, + "level4": { + "d":4.0 + } + } + } + } +}""" class TestParameters(KratosUnittest.TestCase): @@ -216,6 +283,22 @@ def test_recursive_validation_fails_error_on_first_level(self): with self.assertRaises(RuntimeError): kp.RecursivelyValidateAndAssignDefaults(defaults_params) + def test_recursive_validation_4_levels(self): + kp = Parameters(four_levels) + kp_variation = Parameters(four_levels_variation) + kp_wrong_wariation = Parameters(four_levels_wrong_variation) + defaults_params = Parameters(four_levels_defaults) + + kp.RecursivelyValidateAndAssignDefaults(defaults_params) + kp_variation.RecursivelyValidateAndAssignDefaults(defaults_params) + + self.assertTrue( kp.IsEquivalentTo(defaults_params) ) + self.assertFalse( kp_variation.IsEquivalentTo(defaults_params) ) + + self.assertTrue( kp.HasSameKeysAndTypeOfValuesAs(defaults_params) ) + self.assertTrue( kp_variation.HasSameKeysAndTypeOfValuesAs(defaults_params) ) + self.assertFalse( kp_wrong_wariation.HasSameKeysAndTypeOfValuesAs(defaults_params) ) + def test_validation_succeds_error_on_first_level(self): kp = Parameters(wrong_lev2) defaults_params = Parameters(defaults) @@ -256,8 +339,6 @@ def test_iterators(self): #print(key,value) #testing values - - expected_values = ['10', '2.0', 'true', '"hello"', '{"list_value":[3,"hi",false],"tmp":5.0}'] counter = 0 @@ -276,14 +357,172 @@ def test_remove_value(self): kp = Parameters(json_string) self.assertTrue(kp.Has("int_value")) self.assertTrue(kp.Has("level1")) - print(kp) kp.RemoveValue("int_value") kp.RemoveValue("level1") - print(kp) self.assertFalse(kp.Has("int_value")) self.assertFalse(kp.Has("level1")) + def test_is_methods(self): + # This method checks all the "IsXXX" Methods + tmp = Parameters("""{ + "int_value" : 10, + "double_value": 2.0, + "bool_value" : true, + "string_value" : "hello", + "vector_value" : [5,3,4], + "matrix_value" : [[1,2],[3,6]] + }""") # if you add more values to this, make sure to add the corresponding in the loop + + for key in tmp.keys(): + val_type = key[:-6] # removing "_value" + + if val_type == "int": + self.assertTrue(tmp[key].IsInt()) + else: + self.assertFalse(tmp[key].IsInt()) + + if val_type == "double": + self.assertTrue(tmp[key].IsDouble()) + else: + self.assertFalse(tmp[key].IsDouble()) + + if val_type == "bool": + self.assertTrue(tmp[key].IsBool()) + else: + self.assertFalse(tmp[key].IsBool()) + + if val_type == "string": + self.assertTrue(tmp[key].IsString()) + else: + self.assertFalse(tmp[key].IsString()) + + if val_type == "vector": + self.assertTrue(tmp[key].IsVector()) + else: + self.assertFalse(tmp[key].IsVector()) + + if val_type == "matrix": + self.assertTrue(tmp[key].IsMatrix()) + else: + self.assertFalse(tmp[key].IsMatrix()) + + def test_get_methods(self): + # This method checks all the "GetXXX" Methods if they throw an error + tmp = Parameters("""{ + "int_value" : 10, + "double_value": 2.0, + "bool_value" : true, + "string_value" : "hello", + "vector_value" : [5.2,-3.1,4.33], + "matrix_value" : [[1,2],[3,4],[5,6]] + }""") # if you add more values to this, make sure to add the corresponding in the loop + + for key in tmp.keys(): + val_type = key[:-6] # removing "_value" + + # Int and Double are checked tgth bcs both internally call "IsNumber" + if val_type == "int" or val_type == "double": + if val_type == "int": + self.assertEqual(tmp[key].GetInt(),10) + else: + with self.assertRaises(RuntimeError): + tmp[key].GetInt() + + if val_type == "double" or val_type == "int": + if val_type == "double": + self.assertEqual(tmp[key].GetDouble(),2.0) + else: + with self.assertRaises(RuntimeError): + tmp[key].GetDouble() + + if val_type == "bool": + self.assertEqual(tmp[key].GetBool(),True) + else: + with self.assertRaises(RuntimeError): + tmp[key].GetBool() + + if val_type == "string": + self.assertEqual(tmp[key].GetString(),"hello") + else: + with self.assertRaises(RuntimeError): + tmp[key].GetString() + + if val_type == "vector": + V = tmp[key].GetVector() + self.assertEqual(V[0],5.2) + self.assertEqual(V[1],-3.1) + self.assertEqual(V[2],4.33) + else: + with self.assertRaises(RuntimeError): + tmp[key].GetVector() + + if val_type == "matrix": + A = tmp[key].GetMatrix() + self.assertEqual(A[0,0],1.0) + self.assertEqual(A[0,1],2.0) + self.assertEqual(A[1,0],3.0) + self.assertEqual(A[1,1],4.0) + self.assertEqual(A[2,0],5.0) + self.assertEqual(A[2,1],6.0) + else: + with self.assertRaises(RuntimeError): + tmp[key].GetMatrix() + + def test_vector_interface(self): + tmp = Parameters("""{ }""") + # Manually assign and check a Vector + vec = Vector(3) + vec[0] = 1.32 + vec[1] = -2.22 + vec[2] = 5.5 + + tmp.AddEmptyValue("vector_value") + tmp["vector_value"].SetVector(vec) + + self.assertTrue(tmp["vector_value"].IsVector()) + + V2 = tmp["vector_value"].GetVector() + self.assertEqual(V2[0],1.32) + self.assertEqual(V2[1],-2.22) + self.assertEqual(V2[2],5.5) + + def test_matrix_interface(self): + # Read and check a Matrix from a Parameters-Object + tmp = Parameters("""{ + "false_matrix_value": [[2, 1.5,3.3],[1,2]] + }""") + + # Manually assign and check a Matrix + mat = Matrix(3,2) + mat[0,0] = 1.0 + mat[0,1] = 2.0 + mat[1,0] = 3.0 + mat[1,1] = 4.0 + mat[2,0] = 5.0 + mat[2,1] = 6.0 + + tmp.AddEmptyValue("matrix_value") + tmp["matrix_value"].SetMatrix(mat) + + self.assertTrue(tmp["matrix_value"].IsMatrix()) + + A2 = tmp["matrix_value"].GetMatrix() + self.assertEqual(A2[0,0],1.0) + self.assertEqual(A2[0,1],2.0) + self.assertEqual(A2[1,0],3.0) + self.assertEqual(A2[1,1],4.0) + self.assertEqual(A2[2,0],5.0) + self.assertEqual(A2[2,1],6.0) + + # Check the IsMatrix Method + self.assertFalse(tmp["false_matrix_value"].IsMatrix()) # Mis-sized Matrix + + # check that the errors of the GetMatrix method are thrown correctly + with self.assertRaises(RuntimeError): + tmp["false_matrix_value"].GetMatrix() # Mis-sized Matrix + + if __name__ == '__main__': KratosUnittest.main() diff --git a/kratos/tests/test_materials_input.py b/kratos/tests/test_materials_input.py index 715d2d41fe90..6ee012fdbcf0 100644 --- a/kratos/tests/test_materials_input.py +++ b/kratos/tests/test_materials_input.py @@ -2,12 +2,10 @@ import KratosMultiphysics.KratosUnittest as KratosUnittest from KratosMultiphysics import * -#from KratosMultiphysics.SolidMechanicsApplication import * def GetFilePath(fileName): return os.path.dirname(os.path.realpath(__file__)) + "/" + fileName - class TestMaterialsInput(KratosUnittest.TestCase): def test_input(self): @@ -16,7 +14,6 @@ def test_input(self): except: self.skipTest("KratosMultiphysics.SolidMechanicsApplication is not available") - model_part = ModelPart("Main") model_part.AddNodalSolutionStepVariable(DISPLACEMENT) model_part.AddNodalSolutionStepVariable(VISCOSITY) @@ -40,7 +37,7 @@ def test_input(self): } """) - ##assign the real path + #assign the real path test_settings["Parameters"]["materials_filename"].SetString(GetFilePath("materials.json")) import read_materials_process @@ -60,13 +57,28 @@ def test_input(self): self.assertTrue(model_part.Properties[1].GetValue(YOUNG_MODULUS) == 200.0) self.assertTrue(model_part.Properties[1].GetValue(POISSON_RATIO) == 0.3) self.assertTrue(model_part.Properties[1].GetValue(YIELD_STRESS) == 400.0) - - self.assertTrue(model_part.Properties[2].GetValue(YOUNG_MODULUS) == 100.0) self.assertTrue(model_part.Properties[2].GetValue(POISSON_RATIO) == 0.1) self.assertTrue(model_part.Properties[2].GetValue(YIELD_STRESS) == 800.0) self.assertTrue(model_part.Properties[2].GetValue(HTC) == 0.3) + mat_vector = model_part.Properties[2].GetValue(CAUCHY_STRESS_VECTOR) + self.assertAlmostEqual(mat_vector[0],1.5) + self.assertAlmostEqual(mat_vector[1],0.3) + self.assertAlmostEqual(mat_vector[2],-2.58) + + mat_matrix = model_part.Properties[2].GetValue(LOCAL_INERTIA_TENSOR) + self.assertAlmostEqual(mat_matrix[0,0],1.27) + self.assertAlmostEqual(mat_matrix[0,1],-22.5) + self.assertAlmostEqual(mat_matrix[1,0],2.01) + self.assertAlmostEqual(mat_matrix[1,1],0.257) + + table = model_part.Properties[2].GetTable(TEMPERATURE, YOUNG_MODULUS) + self.assertAlmostEqual(table.GetValue(1.5),11.0) + self.assertAlmostEqual(table.GetNearestValue(1.1),10.0) + self.assertAlmostEqual(table.GetDerivative(1.2),2.0) + + if __name__ == '__main__': KratosUnittest.main() diff --git a/kratos/utilities/bounding_box_utilities.h b/kratos/utilities/bounding_box_utilities.h index 695c2f914daa..54c2571f69a2 100644 --- a/kratos/utilities/bounding_box_utilities.h +++ b/kratos/utilities/bounding_box_utilities.h @@ -113,10 +113,10 @@ class TDistanceFunction }; template -class Segment : public Point +class Segment : public Point { enum {Dimension = TDimension }; - typedef Point PointType; + typedef Point PointType; typedef array_1d VectorType; public: @@ -188,7 +188,7 @@ class BoundingBoxUtilities // const static std::size_t dimension = 2; - typedef Point PointType; + typedef Point PointType; typedef Segment SegmentType; typedef SegmentType* SegmentPointer; typedef std::vector ContainerSegmentType; @@ -681,7 +681,7 @@ class BoundingBoxUtilities { const std::size_t dimension = 2; - typedef Point PointType; + typedef Point PointType; typedef ModelPart::ElementsContainerType::ContainerType ElementsArrayType; typedef ElementsArrayType::value_type PointerType; typedef ElementsArrayType::iterator ElementsArrayTypeIterator; diff --git a/kratos/utilities/color_utilities.h b/kratos/utilities/color_utilities.h index 2dcaf44f8798..b02a8887b36b 100755 --- a/kratos/utilities/color_utilities.h +++ b/kratos/utilities/color_utilities.h @@ -15,24 +15,46 @@ #define _COLORS_ /* FOREGROUND */ -#define RST "\x1B[0m" -#define KRED "\x1B[31m" -#define KGRN "\x1B[32m" -#define KYEL "\x1B[33m" -#define KBLU "\x1B[34m" -#define KMAG "\x1B[35m" -#define KCYN "\x1B[36m" -#define KWHT "\x1B[37m" +#if !defined(_WIN32) + #define RST "\x1B[0m" + #define KRED "\x1B[31m" + #define KGRN "\x1B[32m" + #define KYEL "\x1B[33m" + #define KBLU "\x1B[34m" + #define KMAG "\x1B[35m" + #define KCYN "\x1B[36m" + #define KWHT "\x1B[37m" -#define FRED(x) KRED x RST -#define FGRN(x) KGRN x RST -#define FYEL(x) KYEL x RST -#define FBLU(x) KBLU x RST -#define FMAG(x) KMAG x RST -#define FCYN(x) KCYN x RST -#define FWHT(x) KWHT x RST + #define FRED(x) KRED x RST + #define FGRN(x) KGRN x RST + #define FYEL(x) KYEL x RST + #define FBLU(x) KBLU x RST + #define FMAG(x) KMAG x RST + #define FCYN(x) KCYN x RST + #define FWHT(x) KWHT x RST -#define BOLDFONT(x) "\x1B[1m" x RST -#define UNDL(x) "\x1B[4m" x RST + #define BOLDFONT(x) "\x1B[1m" x RST + #define UNDL(x) "\x1B[4m" x RST +#else + #define RST "" + #define KRED "" + #define KGRN "" + #define KYEL "" + #define KBLU "" + #define KMAG "" + #define KCYN "" + #define KWHT "" + + #define FRED(x) KRED x RST + #define FGRN(x) KGRN x RST + #define FYEL(x) KYEL x RST + #define FBLU(x) KBLU x RST + #define FMAG(x) KMAG x RST + #define FCYN(x) KCYN x RST + #define FWHT(x) KWHT x RST + + #define BOLDFONT(x) "" x RST + #define UNDL(x) "" x RST +#endif #endif /* _COLORS_ */ diff --git a/kratos/utilities/exact_mortar_segmentation_utility.h b/kratos/utilities/exact_mortar_segmentation_utility.h index 8db386c4d794..03072a78d8c4 100755 --- a/kratos/utilities/exact_mortar_segmentation_utility.h +++ b/kratos/utilities/exact_mortar_segmentation_utility.h @@ -15,12 +15,12 @@ // System includes #include +#include +#include // External includes // Project includes -#include - #include "includes/mortar_classes.h" // The geometry of the triangle for the "tessellation" @@ -48,7 +48,7 @@ namespace Kratos ///@name Type Definitions ///@{ - typedef Point<3> PointType; + typedef Point PointType; typedef Node<3> NodeType; typedef Geometry GeometryNodeType; typedef Geometry GeometryPointType; @@ -100,9 +100,9 @@ class ExactMortarIntegrationUtility typedef typename std::conditional::type ArrayTriangleType; - typedef Line2D2> LineType; + typedef Line2D2 LineType; - typedef Triangle3D3> TriangleType; + typedef Triangle3D3 TriangleType; typedef typename std::conditional::type DecompositionType; @@ -250,7 +250,16 @@ class ExactMortarIntegrationUtility if (mDebugGeometries == true) { - std::cout << "\nGraphics3D[{Opacity[.3],Triangle[{{" << decomp_geom[0].X() << "," << decomp_geom[0].Y() << "," << decomp_geom[0].Z() << "},{" << decomp_geom[1].X() << "," << decomp_geom[1].Y() << "," << decomp_geom[1].Z() << "},{" << decomp_geom[2].X() << "," << decomp_geom[2].Y() << "," << decomp_geom[2].Z() << "}}]}],";// << std::endl; + std::cout << "\nGraphics3D[{Opacity[.3],Triangle[{{"; + + for (unsigned int i = 0; i < 3; i++) + { + std::cout << std::setprecision(16) << decomp_geom[i].X() << "," << decomp_geom[i].Y() << "," << decomp_geom[i].Z(); + + if (i < 2) std::cout << "},{"; + } + + std::cout << "}}]}],";// << std::endl; } rArea += decomp_geom.Area(); @@ -313,15 +322,25 @@ class ExactMortarIntegrationUtility */ double TestGetExactAreaIntegration(Condition::Pointer& SlaveCond) - { + { // Initalize values double area = 0.0; boost::shared_ptr& all_conditions_maps = SlaveCond->GetValue( MAPPING_PAIRS ); if (mDebugGeometries == true) { + auto this_geom = SlaveCond->GetGeometry(); + // std::cout << "\n\nID: " << SlaveCond->Id() << std::endl; - std::cout << "\nGraphics3D[{EdgeForm[{Thick,Dashed,Red}],FaceForm[],Triangle[{{" << SlaveCond->GetGeometry()[0].X() << "," << SlaveCond->GetGeometry()[0].Y() << "," << SlaveCond->GetGeometry()[0].Z() << "},{" << SlaveCond->GetGeometry()[1].X() << "," << SlaveCond->GetGeometry()[1].Y() << "," << SlaveCond->GetGeometry()[1].Z() << "},{" << SlaveCond->GetGeometry()[2].X() << "," << SlaveCond->GetGeometry()[2].Y() << "," << SlaveCond->GetGeometry()[2].Z() << "}}],Text[Style["<< SlaveCond->Id() <<", Tiny],{"<< SlaveCond->GetGeometry().Center().X() << "," << SlaveCond->GetGeometry().Center().Y() << ","<< SlaveCond->GetGeometry().Center().Z() << "}]}],";// << std::endl; + std::cout << "\nGraphics3D[{EdgeForm[{Thick,Dashed,Red}],FaceForm[],Polygon[{{"; + + for (unsigned int i = 0; i < TNumNodes; i++) + { + std::cout << this_geom[i].X() << "," << this_geom[i].Y() << "," << this_geom[i].Z(); + + if (i < TNumNodes - 1) std::cout << "},{"; + } + std::cout << "}}],Text[Style["<< SlaveCond->Id() <<", Tiny],{"<< this_geom.Center().X() << "," << this_geom.Center().Y() << ","<< this_geom.Center().Z() << "}]}],";// << std::endl; } for (auto it_pair = all_conditions_maps->begin(); it_pair != all_conditions_maps->end(); ++it_pair ) @@ -331,7 +350,16 @@ class ExactMortarIntegrationUtility // std::cout << "\n\nID MASTER: " << (it_pair->first)->Id() << std::endl; if ((it_pair->first)->Is(VISITED) == false || (it_pair->first)->IsDefined(VISITED) == false) { - std::cout << "\nGraphics3D[{EdgeForm[{Thick,Dashed,Blue}],FaceForm[],Triangle[{{" << (it_pair->first)->GetGeometry()[0].X() << "," << (it_pair->first)->GetGeometry()[0].Y() << "," << (it_pair->first)->GetGeometry()[0].Z() << "},{" << (it_pair->first)->GetGeometry()[1].X() << "," << (it_pair->first)->GetGeometry()[1].Y() << "," << (it_pair->first)->GetGeometry()[1].Z() << "},{" << (it_pair->first)->GetGeometry()[2].X() << "," << (it_pair->first)->GetGeometry()[2].Y() << "," << (it_pair->first)->GetGeometry()[2].Z() << "}}],Text[Style["<< (it_pair->first)->Id() <<", Tiny],{"<< (it_pair->first)->GetGeometry().Center().X() << "," << (it_pair->first)->GetGeometry().Center().Y() << ","<< (it_pair->first)->GetGeometry().Center().Z() << "}]}],";// << std::endl; + auto this_geom = (it_pair->first)->GetGeometry(); + + std::cout << "\nGraphics3D[{EdgeForm[{Thick,Dashed,Blue}],FaceForm[],Polygon[{{"; + for (unsigned int i = 0; i < TNumNodes; i++) + { + std::cout << this_geom[i].X() << "," << this_geom[i].Y() << "," << this_geom[i].Z(); + + if (i < TNumNodes - 1) std::cout << "},{"; + } + std::cout << "}}],Text[Style["<< (it_pair->first)->Id() <<", Tiny],{"<< this_geom.Center().X() << "," << this_geom.Center().Y() << ","<< this_geom.Center().Z() << "}]}],";// << std::endl; (it_pair->first)->Set(VISITED, true); } @@ -340,6 +368,9 @@ class ExactMortarIntegrationUtility GetExactAreaIntegration(SlaveCond->GetGeometry(), SlaveCond->GetValue(NORMAL), (it_pair->first)->GetGeometry(), (it_pair->first)->GetValue(NORMAL), area); } +// // DEBUG +// std::cout << "\nTOTAL AREA: " << area << "\tORIGINAL AREA: " << SlaveCond->GetGeometry().Area() << std::endl; + return area; } @@ -425,6 +456,80 @@ class ExactMortarIntegrationUtility } } + /** + * This function divides the triangles to enhance the integration + * @param ConditionsPointsSlave: The + */ + + static inline void EnhanceTriangulation(ConditionArrayListType& ConditionsPointsSlave) + { + ConditionArrayListType aux_conditions_points_slave = ConditionsPointsSlave; + + ConditionsPointsSlave.clear(); + + for (unsigned int i_geom = 0; i_geom < aux_conditions_points_slave.size(); i_geom++) + { + PointType& point1 = aux_conditions_points_slave[i_geom][0]; + PointType& point2 = aux_conditions_points_slave[i_geom][1]; + PointType& point3 = aux_conditions_points_slave[i_geom][2]; + + // Aux info + std::vector points_array (3); + points_array[0] = boost::make_shared(point1); + points_array[1] = boost::make_shared(point2); + points_array[2] = boost::make_shared(point3); + TriangleType aux_triangle = TriangleType(points_array); + Vector N_aux; + array_1d aux_coords = ZeroVector(3); + + // Compute intermediate points + // Point 4 + aux_coords[0] = 0.5; + N_aux = aux_triangle.ShapeFunctionsValues(N_aux, aux_coords); + PointType point4; + point4.Coordinates() = N_aux[0] * point1.Coordinates() + N_aux[1] * point2.Coordinates(); + + // Point 5 + aux_coords[1] = 0.5; + N_aux = aux_triangle.ShapeFunctionsValues(N_aux, aux_coords); + PointType point5; + point5.Coordinates() = N_aux[1] * point2.Coordinates() + N_aux[2] * point3.Coordinates(); + + // Point 6 + aux_coords[0] = 0.0; + N_aux = aux_triangle.ShapeFunctionsValues(N_aux, aux_coords); + PointType point6; + point6.Coordinates() = N_aux[2] * point3.Coordinates() + N_aux[0] * point1.Coordinates(); + + // New triangles + array_1d aux_new_triangle; + + // Triangle 1 + aux_new_triangle[0] = point1; + aux_new_triangle[1] = point4; + aux_new_triangle[2] = point6; + ConditionsPointsSlave.push_back(aux_new_triangle); + + // Triangle 2 + aux_new_triangle[0] = point4; + aux_new_triangle[1] = point2; + aux_new_triangle[2] = point5; + ConditionsPointsSlave.push_back(aux_new_triangle); + + // Triangle 3 + aux_new_triangle[0] = point6; + aux_new_triangle[1] = point4; + aux_new_triangle[2] = point5; + ConditionsPointsSlave.push_back(aux_new_triangle); + + // Triangle 4 + aux_new_triangle[0] = point6; + aux_new_triangle[1] = point5; + aux_new_triangle[2] = point3; + ConditionsPointsSlave.push_back(aux_new_triangle); + } + } + /** * This function intersects two lines in a 2D plane * @param PointOrig: The points from the origin geometry @@ -448,7 +553,9 @@ class ExactMortarIntegrationUtility const double denom = s_orig1_orig2_x * s_dest1_dest2_y - s_dest1_dest2_x * s_orig1_orig2_y; - const double tolerance = 1.0e-12; // std::numeric_limits::epsilon(); + const double tolerance = 1.0e-12; +// const double tolerance = std::numeric_limits::epsilon(); + if (std::abs(denom) < tolerance) // NOTE: Collinear { return false; @@ -767,10 +874,11 @@ class ExactMortarIntegrationUtility * @return If there is intersection or not (true/false) */ + template inline bool TriangleIntersections( ConditionArrayListType& ConditionsPointsSlave, PointListType& PointList, - GeometryNodeType& OriginalSlaveGeometry, + TGeometryType& OriginalSlaveGeometry, GeometryPointType& Geometry1, GeometryPointType& Geometry2, const array_1d& SlaveTangentXi, @@ -1052,7 +1160,7 @@ class ExactMortarIntegrationUtility MathUtils::CrossProduct(slave_tangent_eta, SlaveNormal, slave_tangent_xi); // We define the tolerance - const double tolerance = 1.0e-8; // std::numeric_limits::epsilon(); + const double tolerance = std::numeric_limits::epsilon(); // We define the auxiliar geometry std::vector points_array_slave (3); @@ -1109,7 +1217,7 @@ class ExactMortarIntegrationUtility // We add the internal nodes PushBackPoints(point_list, all_inside, slave_geometry); - return TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center); + return TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center); } ConditionsPointsSlave.clear(); @@ -1129,7 +1237,7 @@ class ExactMortarIntegrationUtility ) { // We define the tolerance - const double tolerance = 1.0e-8; // std::numeric_limits::epsilon(); + const double tolerance = std::numeric_limits::epsilon(); // Firt we create an auxiliar plane based in the condition center and its normal const PointType slave_center = OriginalSlaveGeometry.Center(); @@ -1141,12 +1249,14 @@ class ExactMortarIntegrationUtility // We define the auxiliar geometry std::vector points_array_slave (4); + std::vector points_array_slave_not_rotated (4); std::vector points_array_master (4); for (unsigned int i_node = 0; i_node < 4; i_node++) { PointType aux_point; aux_point = MortarUtilities::FastProject( slave_center, OriginalSlaveGeometry[i_node], SlaveNormal); + points_array_slave_not_rotated[i_node] = boost::make_shared(aux_point); MortarUtilities::RotatePoint( aux_point, slave_center, slave_tangent_xi, slave_tangent_eta, false); points_array_slave[i_node] = boost::make_shared(aux_point); @@ -1156,8 +1266,9 @@ class ExactMortarIntegrationUtility } Quadrilateral3D4 slave_geometry( points_array_slave ); + Quadrilateral3D4 slave_geometry_not_rotated( points_array_slave_not_rotated ); Quadrilateral3D4 master_geometry( points_array_master ); - + // No we project both nodes from the slave side and the master side array_1d all_inside; @@ -1176,7 +1287,13 @@ class ExactMortarIntegrationUtility // We add the internal nodes PushBackPoints(point_list, all_inside, master_geometry); - return TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center, true); + return TriangleIntersections(ConditionsPointsSlave, point_list, slave_geometry_not_rotated, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center, true); + +// const bool solution = TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center, true); +// +// EnhanceTriangulation(ConditionsPointsSlave); +// +// return solution; } else { @@ -1189,7 +1306,13 @@ class ExactMortarIntegrationUtility // We add the internal nodes PushBackPoints(point_list, all_inside, slave_geometry); - return TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center); + return TriangleIntersections(ConditionsPointsSlave, point_list, slave_geometry_not_rotated, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center); + +// const bool solution = TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center); +// +// EnhanceTriangulation(ConditionsPointsSlave); +// +// return solution; } ConditionsPointsSlave.clear(); @@ -1382,7 +1505,7 @@ class ExactMortarIntegrationUtility MathUtils::CrossProduct(slave_tangent_eta, SlaveNormal, slave_tangent_xi); // We define the tolerance - const double tolerance = 1.0e-8; // std::numeric_limits::epsilon(); + const double tolerance = std::numeric_limits::epsilon(); // We define the auxiliar geometry std::vector points_array_slave (3); @@ -1439,7 +1562,7 @@ class ExactMortarIntegrationUtility // We add the internal nodes PushBackPoints(point_list, all_inside, slave_geometry, Slave); - return TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center); + return TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center); } ConditionsPointsSlave.clear(); @@ -1459,7 +1582,7 @@ class ExactMortarIntegrationUtility ) { // We define the tolerance - const double tolerance = 1.0e-8; // std::numeric_limits::epsilon(); + const double tolerance = std::numeric_limits::epsilon(); // Firt we create an auxiliar plane based in the condition center and its normal const PointType slave_center = OriginalSlaveGeometry.Center(); @@ -1471,12 +1594,14 @@ class ExactMortarIntegrationUtility // We define the auxiliar geometry std::vector points_array_slave (4); + std::vector points_array_slave_not_rotated (4); std::vector points_array_master (4); for (unsigned int i_node = 0; i_node < 4; i_node++) { PointType aux_point; aux_point = MortarUtilities::FastProject( slave_center, OriginalSlaveGeometry[i_node], SlaveNormal); + points_array_slave_not_rotated[i_node] = boost::make_shared(aux_point); MortarUtilities::RotatePoint( aux_point, slave_center, slave_tangent_xi, slave_tangent_eta, false); points_array_slave[i_node] = boost::make_shared(aux_point); @@ -1486,6 +1611,7 @@ class ExactMortarIntegrationUtility } Quadrilateral3D4 slave_geometry( points_array_slave ); + Quadrilateral3D4 slave_geometry_not_rotated( points_array_slave_not_rotated ); Quadrilateral3D4 master_geometry( points_array_master ); // No we project both nodes from the slave side and the master side @@ -1506,7 +1632,7 @@ class ExactMortarIntegrationUtility // We add the internal nodes PushBackPoints(point_list, all_inside, master_geometry, Master); - return TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center, true); + return TriangleIntersections(ConditionsPointsSlave, point_list, slave_geometry_not_rotated, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center, true); } else { @@ -1519,7 +1645,7 @@ class ExactMortarIntegrationUtility // We add the internal nodes PushBackPoints(point_list, all_inside, slave_geometry, Slave); - return TriangleIntersections(ConditionsPointsSlave, point_list, OriginalSlaveGeometry, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center); + return TriangleIntersections(ConditionsPointsSlave, point_list, slave_geometry_not_rotated, slave_geometry, master_geometry, slave_tangent_xi, slave_tangent_eta, slave_center); } ConditionsPointsSlave.clear(); diff --git a/kratos/utilities/geometry_utilities.h b/kratos/utilities/geometry_utilities.h index 6806df2ff682..ca401700f236 100644 --- a/kratos/utilities/geometry_utilities.h +++ b/kratos/utilities/geometry_utilities.h @@ -236,7 +236,7 @@ class GeometryUtils static void CalculateTetrahedraDistances(Element::GeometryType& ThisGeometry, array_1d& Distances) { // Calculating the intersection points - array_1d, 4> intersection_points; + array_1d intersection_points; int number_of_intersection_points = CalculateTetrahedraIntersectionPoints(ThisGeometry, Distances, intersection_points); // for(int i = 0 ; i < number_of_intersection_points ; i++) @@ -338,7 +338,7 @@ class GeometryUtils static void CalculateTriangleDistances(Element::GeometryType& ThisGeometry, array_1d& Distances) { // Calculating the intersection points - array_1d, 4> intersection_points; + array_1d intersection_points; int number_of_intersection_points = CalculateTetrahedraIntersectionPoints(ThisGeometry, Distances, intersection_points); // for(int i = 0 ; i < number_of_intersection_points ; i++) @@ -413,7 +413,7 @@ class GeometryUtils * @return Number of intersection points. */ template - static int CalculateTetrahedraIntersectionPoints(Element::GeometryType& ThisGeometry, array_1d& Distances, array_1d, TSize2>& IntersectionPoints) + static int CalculateTetrahedraIntersectionPoints(Element::GeometryType& ThisGeometry, array_1d& Distances, array_1d& IntersectionPoints) { const double epsilon = 1e-15; //1.00e-9; @@ -459,9 +459,9 @@ class GeometryUtils * @param ToPoint The point which distance is required * @return The distance between the point and the line */ - static double PointDistanceToLineSegment3D(Point<3> const& LinePoint1, - Point<3> const& LinePoint2, - Point<3> const& ToPoint) + static double PointDistanceToLineSegment3D(Point const& LinePoint1, + Point const& LinePoint2, + Point const& ToPoint) { const double epsilon = 1e-15; //1.00e-9; @@ -516,10 +516,10 @@ class GeometryUtils * @param ToPoint The point which distance is required * @return The distance between the point and the triangle */ - static double PointDistanceToTriangle3D(Point<3> const& TrianglePoint1, - Point<3> const& TrianglePoint2, - Point<3> const& TrianglePoint3, - Point<3> const& ToPoint) + static double PointDistanceToTriangle3D(Point const& TrianglePoint1, + Point const& TrianglePoint2, + Point const& TrianglePoint3, + Point const& ToPoint) { // The implementation is done using following reference: // http://www.geometrictools.com/Documentation/DistancePoint3Triangle3.pdf diff --git a/kratos/utilities/math_utils.h b/kratos/utilities/math_utils.h index b351515cd65d..46316ad07444 100755 --- a/kratos/utilities/math_utils.h +++ b/kratos/utilities/math_utils.h @@ -600,19 +600,24 @@ class MathUtils static inline TDataType GeneralizedDet(const MatrixType& A) { - TDataType Determinant; + TDataType determinant; if (A.size1() == A.size2()) { - Determinant = Det(A); + determinant = Det(A); } - else + else if (A.size1() < A.size2()) // Right determinant + { + Matrix AAT = prod( A, trans(A) ); + determinant = std::sqrt(Det(AAT)); + } + else // Left determinant { Matrix ATA = prod( trans(A), A ); - Determinant = std::sqrt(Det(ATA)); + determinant = std::sqrt(Det(ATA)); } - return Determinant; + return determinant; } /** diff --git a/kratos/utilities/mortar_utilities.h b/kratos/utilities/mortar_utilities.h index 5b8b5a7ceacc..932c8d122a59 100755 --- a/kratos/utilities/mortar_utilities.h +++ b/kratos/utilities/mortar_utilities.h @@ -19,6 +19,7 @@ // Project includes #include "utilities/math_utils.h" +#include "includes/enums.h" #include "includes/model_part.h" #include "geometries/point.h" #include "utilities/openmp_utils.h" @@ -48,7 +49,7 @@ class MortarUtilities // General type definitions typedef Node<3> NodeType; - typedef Point<3> PointType; + typedef Point PointType; typedef PointType::CoordinatesArrayType CoordinatesArrayType; typedef Geometry GeometryType; typedef Geometry GeometryPointType; @@ -358,6 +359,35 @@ class MortarUtilities PointToRotate.Coordinates() = prod(rotation_matrix, aux_point_to_rotate) + PointReferenceRotation.Coordinates(); } + /** + * This function calculates the normal in a specific GP with a given shape function + * @param N: The shape function considered + * @param Geom: The geometry of condition of interest + */ + + static inline array_1d GaussPointUnitNormal( + const Vector& N, + const GeometryType& Geom + ) + { + array_1d normal = ZeroVector(3); + for( unsigned int i_node = 0; i_node < Geom.PointsNumber(); ++i_node ) + { + normal += N[i_node] * Geom[i_node].GetValue(NORMAL); + } + + const double this_norm = norm_2(normal); + + #ifdef KRATOS_DEBUG + const bool not_zero_vector = (this_norm > std::numeric_limits::epsilon()); + if (not_zero_vector == false) KRATOS_ERROR << "Zero norm normal vector. Norm:" << this_norm << std::endl; + #endif + + normal /= this_norm; + + return normal; + } + /** * This function gives you the indexes needed to order a vector * @param vect: The vector to order diff --git a/kratos/utilities/spatial_containers_configure.h b/kratos/utilities/spatial_containers_configure.h index f222171381e3..c7515399834c 100644 --- a/kratos/utilities/spatial_containers_configure.h +++ b/kratos/utilities/spatial_containers_configure.h @@ -61,7 +61,7 @@ class SpatialContainersConfigure MAX_LEVEL = 16, MIN_LEVEL = 2 }; - typedef Point<3, double> PointType; /// always the point 3D + typedef Point PointType; /// always the point 3D typedef std::vector::iterator DistanceIteratorType; typedef ModelPart::ElementsContainerType::ContainerType ContainerType; typedef ContainerType::value_type PointerType; diff --git a/kratos_version.h.in b/kratos_version.h.in index 08902cad6d2b..05c9b3de1d94 100644 --- a/kratos_version.h.in +++ b/kratos_version.h.in @@ -3,7 +3,10 @@ #define KRATOS_MINOR_VERSION @KratosMultiphysics_MINOR_VERSION@ #define KRATOS_PATCH_VERSION @KratosMultiphysics_PATCH_VERSION@ -//svn version at configure time +//git revision at configure time #define KRATOS_SHA1_NUMBER @KratosMultiphysics_SHA1_NUMBER@ -#define KRATOS_VERSION "@KratosMultiphysics_MAJOR_VERSION@.@KratosMultiphysics_MINOR_VERSION@.@KratosMultiphysics_PATCH_VERSION@-@KratosMultiphysics_SHA1_NUMBER@" +//cmake build type +#define KRATOS_BUILD_TYPE @KratosMultiphysics_BUILD_TYPE@ + +#define KRATOS_VERSION "@KratosMultiphysics_MAJOR_VERSION@.@KratosMultiphysics_MINOR_VERSION@.@KratosMultiphysics_PATCH_VERSION@-@KratosMultiphysics_SHA1_NUMBER@@KratosMultiphysics_BUILD_SUFFIX@" diff --git a/scripts/build/nightly/configure_clang.sh b/scripts/build/nightly/configure_clang.sh index 47ffd2b08d3f..f6aabf6baff2 100644 --- a/scripts/build/nightly/configure_clang.sh +++ b/scripts/build/nightly/configure_clang.sh @@ -23,7 +23,7 @@ cmake .. \ -DFLUID_DYNAMICS_APPLICATION=ON \ -DMESHING_APPLICATION=ON \ -DMULTISCALE_APPLICATION=OFF \ --DPARTICLE_MECHANICS_APPLICATION=OFF \ +-DPARTICLE_MECHANICS_APPLICATION=ON \ -DPFEM_APPLICATION=ON \ -DCONTACT_MECHANICS_APPLICATION=ON \ -DPFEM_FLUID_DYNAMICS_APPLICATION=ON \ diff --git a/scripts/build/nightly/configure_gcc.sh b/scripts/build/nightly/configure_gcc.sh index b7d6a8279934..15318de0f8ab 100644 --- a/scripts/build/nightly/configure_gcc.sh +++ b/scripts/build/nightly/configure_gcc.sh @@ -23,7 +23,7 @@ cmake .. \ -DFLUID_DYNAMICS_APPLICATION=ON \ -DMESHING_APPLICATION=ON \ -DMULTISCALE_APPLICATION=OFF \ --DPARTICLE_MECHANICS_APPLICATION=OFF \ +-DPARTICLE_MECHANICS_APPLICATION=ON \ -DPFEM_APPLICATION=ON \ -DCONTACT_MECHANICS_APPLICATION=ON \ -DPFEM_FLUID_DYNAMICS_APPLICATION=ON \