diff --git a/kratos/includes/kratos_application.h b/kratos/includes/kratos_application.h index 851bc2b01769..611b7d7cf279 100644 --- a/kratos/includes/kratos_application.h +++ b/kratos/includes/kratos_application.h @@ -460,21 +460,25 @@ class KRATOS_API(KRATOS_CORE) KratosApplication { // General conditions must be defined // Generic condition const MeshCondition mGenericCondition; + // Point conditions const MeshCondition mPointCondition2D1N; const MeshCondition mPointCondition3D1N; + // Line conditions const MeshCondition mLineCondition2D2N; const MeshCondition mLineCondition2D3N; const MeshCondition mLineCondition3D2N; const MeshCondition mLineCondition3D3N; + // Surface conditions const MeshCondition mSurfaceCondition3D3N; const MeshCondition mSurfaceCondition3D6N; const MeshCondition mSurfaceCondition3D4N; const MeshCondition mSurfaceCondition3D8N; const MeshCondition mSurfaceCondition3D9N; - //prisms + + // Prisms conditions const MeshCondition mPrismCondition2D4N; const MeshCondition mPrismCondition3D6N; @@ -491,17 +495,19 @@ class KRATOS_API(KRATOS_CORE) KratosApplication { // General elements must be defined const MeshElement mGenericElement; - const MeshElement mElement2D1N; - const MeshElement mElement2D2N; + // 2D elements + const MeshElement mElement2D1N; // NOTE: This would be duplicated mPointElement2D1N + const MeshElement mElement2D2N; // NOTE: This would be duplicated mLineElement2D2N const MeshElement mElement2D3N; const MeshElement mElement2D6N; const MeshElement mElement2D4N; const MeshElement mElement2D8N; const MeshElement mElement2D9N; - const MeshElement mElement3D1N; - const MeshElement mElement3D2N; - const MeshElement mElement3D3N; + // 3D elements + const MeshElement mElement3D1N; // NOTE: This would be duplicated mPointElement3D1N + const MeshElement mElement3D2N; // NOTE: This would be duplicated mLineElement3D2N + const MeshElement mElement3D3N; // NOTE: This would be duplicated mSurfaceElement3D3N const MeshElement mElement3D4N; const MeshElement mElement3D5N; const MeshElement mElement3D6N; @@ -512,12 +518,33 @@ class KRATOS_API(KRATOS_CORE) KratosApplication { const MeshElement mElement3D20N; const MeshElement mElement3D27N; + // For sake of consistency and in order to define missing geometries for elements + // Point elements + const MeshElement mPointElement2D1N; + const MeshElement mPointElement3D1N; + + // Line elements + const MeshElement mLineElement2D2N; + const MeshElement mLineElement2D3N; + const MeshElement mLineElement3D2N; + const MeshElement mLineElement3D3N; + + // Surface elements + const MeshElement mSurfaceElement3D3N; + const MeshElement mSurfaceElement3D6N; + const MeshElement mSurfaceElement3D4N; + const MeshElement mSurfaceElement3D8N; + const MeshElement mSurfaceElement3D9N; + + // Distance calculation elements const DistanceCalculationElementSimplex<2> mDistanceCalculationElementSimplex2D3N; const DistanceCalculationElementSimplex<3> mDistanceCalculationElementSimplex3D4N; + // Edge based gradient recovery elements const EdgeBasedGradientRecoveryElement<2> mEdgeBasedGradientRecoveryElement2D2N; const EdgeBasedGradientRecoveryElement<3> mEdgeBasedGradientRecoveryElement3D2N; + // Level set convection elements const LevelSetConvectionElementSimplex<2,3> mLevelSetConvectionElementSimplex2D3N; const LevelSetConvectionElementSimplex<3,4> mLevelSetConvectionElementSimplex3D4N; const LevelSetConvectionElementSimplexAlgebraicStabilization<2,3> mLevelSetConvectionElementSimplexAlgebraicStabilization2D3N; diff --git a/kratos/sources/kratos_application.cpp b/kratos/sources/kratos_application.cpp index c8b7559638b4..4db8f1fc6b61 100644 --- a/kratos/sources/kratos_application.cpp +++ b/kratos/sources/kratos_application.cpp @@ -93,6 +93,20 @@ KratosApplication::KratosApplication(const std::string& ApplicationName) mElement3D20N( 0, GeometryType::Pointer(new Hexahedra3D20(GeometryType::PointsArrayType(20)))), mElement3D27N( 0, GeometryType::Pointer(new Hexahedra3D27(GeometryType::PointsArrayType(27)))), + mPointElement2D1N( 0, GeometryType::Pointer(new Point2D(GeometryType::PointsArrayType(1)))), + mPointElement3D1N( 0, GeometryType::Pointer(new Point3D(GeometryType::PointsArrayType(1)))), + + mLineElement2D2N( 0, GeometryType::Pointer(new Line2D2(GeometryType::PointsArrayType(2)))), + mLineElement2D3N( 0, GeometryType::Pointer(new Line2D3(GeometryType::PointsArrayType(3)))), + mLineElement3D2N( 0, GeometryType::Pointer(new Line3D2(GeometryType::PointsArrayType(2)))), + mLineElement3D3N( 0, GeometryType::Pointer(new Line3D3(GeometryType::PointsArrayType(3)))), + + mSurfaceElement3D3N( 0, GeometryType::Pointer(new Triangle3D3(GeometryType::PointsArrayType(3)))), + mSurfaceElement3D6N( 0, GeometryType::Pointer(new Triangle3D6(GeometryType::PointsArrayType(6)))), + mSurfaceElement3D4N( 0, GeometryType::Pointer(new Quadrilateral3D4(GeometryType::PointsArrayType(4)))), + mSurfaceElement3D8N( 0, GeometryType::Pointer(new Quadrilateral3D8(GeometryType::PointsArrayType(8)))), + mSurfaceElement3D9N( 0, GeometryType::Pointer(new Quadrilateral3D9(GeometryType::PointsArrayType(9)))), + mDistanceCalculationElementSimplex2D3N( 0, GeometryType::Pointer(new Triangle2D3(GeometryType::PointsArrayType(3)))), mDistanceCalculationElementSimplex3D4N( 0, GeometryType::Pointer(new Tetrahedra3D4(GeometryType::PointsArrayType(4)))), @@ -160,26 +174,29 @@ void KratosApplication::RegisterKratosCore() { //Register specific conditions ( must be completed : conditions defined in kratos_application.h) //generic condition KRATOS_REGISTER_CONDITION("GenericCondition", mGenericCondition); - //point conditions + + // Point conditions KRATOS_REGISTER_CONDITION("PointCondition2D1N", mPointCondition2D1N); KRATOS_REGISTER_CONDITION("PointCondition3D1N", mPointCondition3D1N); - //line conditions + + // Line conditions KRATOS_REGISTER_CONDITION("LineCondition2D2N", mLineCondition2D2N); KRATOS_REGISTER_CONDITION("LineCondition2D3N", mLineCondition2D3N); KRATOS_REGISTER_CONDITION("LineCondition3D2N", mLineCondition3D2N); KRATOS_REGISTER_CONDITION("LineCondition3D3N", mLineCondition3D3N); - //surface conditions + + // Surface conditions KRATOS_REGISTER_CONDITION("SurfaceCondition3D3N", mSurfaceCondition3D3N); KRATOS_REGISTER_CONDITION("SurfaceCondition3D6N", mSurfaceCondition3D6N); KRATOS_REGISTER_CONDITION("SurfaceCondition3D4N", mSurfaceCondition3D4N); KRATOS_REGISTER_CONDITION("SurfaceCondition3D8N", mSurfaceCondition3D8N); KRATOS_REGISTER_CONDITION("SurfaceCondition3D9N", mSurfaceCondition3D9N); - //prism conditions + + //Prism conditions KRATOS_REGISTER_CONDITION("PrismCondition2D4N", mPrismCondition2D4N); KRATOS_REGISTER_CONDITION("PrismCondition3D6N", mPrismCondition3D6N); - - //master-slave constraints + //Master-slave constraints KRATOS_REGISTER_CONSTRAINT("MasterSlaveConstraint",mMasterSlaveConstraint); KRATOS_REGISTER_CONSTRAINT("LinearMasterSlaveConstraint",mLinearMasterSlaveConstraint); @@ -211,6 +228,20 @@ void KratosApplication::RegisterKratosCore() { KRATOS_REGISTER_ELEMENT("Element3D20N", mElement3D20N) KRATOS_REGISTER_ELEMENT("Element3D27N", mElement3D27N) + KRATOS_REGISTER_ELEMENT("PointElement2D1N", mPointElement2D1N) + KRATOS_REGISTER_ELEMENT("PointElement3D1N", mPointElement3D1N) + + KRATOS_REGISTER_ELEMENT("LineElement2D2N", mLineElement2D2N) + KRATOS_REGISTER_ELEMENT("LineElement2D3N", mLineElement2D3N) + KRATOS_REGISTER_ELEMENT("LineElement3D2N", mLineElement3D2N) + KRATOS_REGISTER_ELEMENT("LineElement3D3N", mLineElement3D3N) + + KRATOS_REGISTER_ELEMENT("SurfaceElement3D3N", mSurfaceElement3D3N) + KRATOS_REGISTER_ELEMENT("SurfaceElement3D6N", mSurfaceElement3D6N) + KRATOS_REGISTER_ELEMENT("SurfaceElement3D4N", mSurfaceElement3D4N) + KRATOS_REGISTER_ELEMENT("SurfaceElement3D8N", mSurfaceElement3D8N) + KRATOS_REGISTER_ELEMENT("SurfaceElement3D9N", mSurfaceElement3D9N) + KRATOS_REGISTER_ELEMENT("DistanceCalculationElementSimplex2D3N", mDistanceCalculationElementSimplex2D3N) KRATOS_REGISTER_ELEMENT("DistanceCalculationElementSimplex3D4N", mDistanceCalculationElementSimplex3D4N)