KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
pyramid_3d_5.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Philipp Bucher (https://github.com/philbucher)
11 // Ashish Darekar
12 //
13 
14 #pragma once
15 
16 // System includes
17 #include <cmath> // std::abs for double
18 
19 // External includes
20 
21 // Project includes
22 #include "includes/define.h"
23 #include "geometries/geometry.h"
27 #include "utilities/geometry_utilities.h"
28 
29 namespace Kratos {
30 
33 
57 template<class TPointType>
58 class Pyramid3D5 : public Geometry<TPointType>
59 {
60 public:
64 
67 
74 
77 
81 
84  typedef TPointType PointType;
85 
90  typedef typename BaseType::IndexType IndexType;
91 
96  typedef typename BaseType::SizeType SizeType;
97 
102 
108 
115 
121 
126 
133 
140 
145 
151 
152 
156 
157  explicit Pyramid3D5(
158  typename PointType::Pointer pPoint1,
159  typename PointType::Pointer pPoint2,
160  typename PointType::Pointer pPoint3,
161  typename PointType::Pointer pPoint4,
162  typename PointType::Pointer pPoint5)
163  : BaseType( PointsArrayType(), &msGeometryData )
164  {
165  this->Points().reserve(5);
166  this->Points().push_back(pPoint1);
167  this->Points().push_back(pPoint2);
168  this->Points().push_back(pPoint3);
169  this->Points().push_back(pPoint4);
170  this->Points().push_back(pPoint5);
171  }
172 
173  explicit Pyramid3D5( const PointsArrayType& ThisPoints )
174  : BaseType( ThisPoints, &msGeometryData )
175  {
176  KRATOS_ERROR_IF( this->PointsNumber() != 5 ) << "Invalid points number. Expected 5, given " << this->PointsNumber() << std::endl;
177  }
178 
180  explicit Pyramid3D5(
181  const IndexType GeometryId,
182  const PointsArrayType& rThisPoints
183  ) : BaseType( GeometryId, rThisPoints, &msGeometryData)
184  {
185  KRATOS_ERROR_IF( this->PointsNumber() != 5 ) << "Invalid points number. Expected 5, given " << this->PointsNumber() << std::endl;
186  }
187 
189  explicit Pyramid3D5(
190  const std::string& rGeometryName,
191  const PointsArrayType& rThisPoints
192  ) : BaseType(rGeometryName, rThisPoints, &msGeometryData)
193  {
194  KRATOS_ERROR_IF(this->PointsNumber() != 5) << "Invalid points number. Expected 5, given " << this->PointsNumber() << std::endl;
195  }
196 
205  Pyramid3D5(Pyramid3D5 const& rOther)
206  : BaseType(rOther)
207  {
208  }
209 
221  template<class TOtherPointType> Pyramid3D5(Pyramid3D5<TOtherPointType> const& rOther)
222  : BaseType(rOther)
223  {
224  }
225 
227  {
229  }
230 
232  {
234  }
235 
239 
251  {
252  BaseType::operator=(rOther);
253 
254  return *this;
255  }
256 
267  template<class TOtherPointType>
269  {
270  BaseType::operator=(rOther);
271 
272  return *this;
273  }
274 
278 
285  typename BaseType::Pointer Create(
286  const IndexType NewGeometryId,
287  PointsArrayType const& rThisPoints
288  ) const override
289  {
290  return typename BaseType::Pointer( new Pyramid3D5( NewGeometryId, rThisPoints ) );
291  }
292 
299  typename BaseType::Pointer Create(
300  const IndexType NewGeometryId,
301  const BaseType& rGeometry
302  ) const override
303  {
304  auto p_geometry = typename BaseType::Pointer( new Pyramid3D5( NewGeometryId, rGeometry.Points() ) );
305  p_geometry->SetData(rGeometry.GetData());
306  return p_geometry;
307  }
308 
312 
323  SizeType EdgesNumber() const override
324  {
325  return 8;
326  }
327 
337  {
339  typedef typename Geometry<TPointType>::Pointer EdgePointerType;
340  edges.push_back( EdgePointerType( new EdgeType(
341  this->pGetPoint( 0 ),
342  this->pGetPoint( 1 ) ) ) );
343  edges.push_back( EdgePointerType( new EdgeType(
344  this->pGetPoint( 1 ),
345  this->pGetPoint( 2 ) ) ) );
346  edges.push_back( EdgePointerType( new EdgeType(
347  this->pGetPoint( 2 ),
348  this->pGetPoint( 3 ) ) ) );
349  edges.push_back( EdgePointerType( new EdgeType(
350  this->pGetPoint( 3 ),
351  this->pGetPoint( 0 ) ) ) );
352  edges.push_back( EdgePointerType( new EdgeType(
353  this->pGetPoint( 0 ),
354  this->pGetPoint( 4 ) ) ) );
355  edges.push_back( EdgePointerType( new EdgeType(
356  this->pGetPoint( 1 ),
357  this->pGetPoint( 4 ) ) ) );
358  edges.push_back( EdgePointerType( new EdgeType(
359  this->pGetPoint( 2 ),
360  this->pGetPoint( 4 ) ) ) );
361  edges.push_back( EdgePointerType( new EdgeType(
362  this->pGetPoint( 3 ),
363  this->pGetPoint( 4 ) ) ) );
364  return edges;
365  }
366 
373  SizeType FacesNumber() const override
374  {
375  return 5;
376  }
377 
387  {
389  typedef typename Geometry<TPointType>::Pointer FacePointerType;
390  faces.push_back( FacePointerType( new FaceType1(
391  this->pGetPoint( 0 ),
392  this->pGetPoint( 1 ),
393  this->pGetPoint( 4 ) ) ) );
394  faces.push_back( FacePointerType( new FaceType1(
395  this->pGetPoint( 1 ),
396  this->pGetPoint( 2 ),
397  this->pGetPoint( 4 ) ) ) );
398  faces.push_back( FacePointerType( new FaceType2(
399  this->pGetPoint( 0 ),
400  this->pGetPoint( 1 ),
401  this->pGetPoint( 2 ),
402  this->pGetPoint( 3 ) ) ) );
403  faces.push_back( FacePointerType( new FaceType1(
404  this->pGetPoint( 2 ),
405  this->pGetPoint( 3 ),
406  this->pGetPoint( 4 ) ) ) );
407  faces.push_back( FacePointerType( new FaceType1(
408  this->pGetPoint( 3 ),
409  this->pGetPoint( 0 ),
410  this->pGetPoint( 4 ) ) ) );
411  return faces;
412  }
413 
423  double Volume() const override
424  {
426  }
427 
439  double DomainSize() const override
440  {
441  return Volume();
442  }
443 
455  const CoordinatesArrayType& rPointLocalCoordinates,
456  const double Tolerance = std::numeric_limits<double>::epsilon()
457  ) const override
458  {
459  if ( std::abs( rPointLocalCoordinates[0] ) <= (1.0 + Tolerance) ) {
460  if ( std::abs( rPointLocalCoordinates[1] ) <= (1.0 + Tolerance) ) {
461  if ( std::abs( rPointLocalCoordinates[2] ) <= (1.0 + Tolerance) ) {
462  if ( (std::abs(rPointLocalCoordinates[0]) +
463  std::abs(rPointLocalCoordinates[1]) +
464  rPointLocalCoordinates[2]) <= (1.0 + Tolerance) ) {
465  return 1;
466  }
467  }
468  }
469  }
470 
471  return 0;
472  }
473 
479  Matrix& PointsLocalCoordinates( Matrix& rResult ) const override
480  {
481  if ( rResult.size1() != 5 || rResult.size2() != 3 )
482  rResult.resize( 5, 3, false );
483 
484  rResult( 0, 0 ) = -1.0;
485  rResult( 0, 1 ) = -1.0;
486  rResult( 0, 2 ) = -1.0;
487 
488  rResult( 1, 0 ) = +1.0;
489  rResult( 1, 1 ) = -1.0;
490  rResult( 1, 2 ) = -1.0;
491 
492  rResult( 2, 0 ) = +1.0;
493  rResult( 2, 1 ) = +1.0;
494  rResult( 2, 2 ) = -1.0;
495 
496  rResult( 3, 0 ) = -1.0;
497  rResult( 3, 1 ) = +1.0;
498  rResult( 3, 2 ) = -1.0;
499 
500  rResult( 4, 0 ) = 0.0;
501  rResult( 4, 1 ) = 0.0;
502  rResult( 4, 2 ) = +1.0;
503 
504  return rResult;
505  }
506 
522  Vector& ShapeFunctionsValues(Vector &rResult, const CoordinatesArrayType& rCoordinates) const override
523  {
524  if(rResult.size() != 5) rResult.resize(5,false);
525 
526  for (std::size_t i=0; i<5; ++i) {
527  rResult[i] = ShapeFunctionValue(i, rCoordinates);
528  }
529 
530  return rResult;
531  }
532 
542  double ShapeFunctionValue( IndexType ShapeFunctionIndex,
543  const CoordinatesArrayType& rPoint ) const override
544  {
545  return ShapeFunctionValueImpl(ShapeFunctionIndex, rPoint);
546  }
547 
558  {
559  IntegrationPointsContainerType all_integration_points = AllIntegrationPoints();
560  IntegrationPointsArrayType integration_points = all_integration_points[static_cast<int>(ThisMethod)];
561  //number of integration points
562  const std::size_t integration_points_number = integration_points.size();
563  //number of nodes in current geometry
564  const std::size_t points_number = 5;
565  //setting up return matrix
566  Matrix shape_function_values( integration_points_number, points_number );
567 
568  //loop over all integration points
569  for (std::size_t pnt = 0; pnt<integration_points_number; ++pnt) {
570  for (std::size_t i=0; i<points_number; ++i) {
571  shape_function_values( pnt, i ) = ShapeFunctionValueImpl(i, integration_points[pnt]);
572  }
573  }
574 
575  return shape_function_values;
576  }
577 
586  Matrix& rResult,
587  const CoordinatesArrayType& rPoint
588  ) const override
589  {
590  if(rResult.size1() != this->PointsNumber() || rResult.size2() != this->LocalSpaceDimension())
591  rResult.resize(this->PointsNumber(),this->LocalSpaceDimension(),false);
592 
593  CalculateShapeFunctionsLocalGradients(rResult, rPoint);
594 
595  return rResult;
596  }
597 
607  Matrix& rResult,
608  const CoordinatesArrayType& rPoint
609  )
610  {
611  rResult.resize( 5, 3, false );
612  noalias( rResult ) = ZeroMatrix( 5, 3 );
613 
614  rResult( 0, 0 ) = (-0.125) * ( 1 - rPoint[1] ) * ( 1 - rPoint[2] ) ;
615  rResult( 0, 1 ) = (-0.125) * ( 1 - rPoint[0] ) * ( 1 - rPoint[2] ) ;
616  rResult( 0, 2 ) = (-0.125) * ( 1 - rPoint[0] ) * ( 1 - rPoint[1] ) ;
617 
618  rResult( 1, 0 ) = (+0.125) * ( 1 - rPoint[1] ) * ( 1 - rPoint[2] ) ;
619  rResult( 1, 1 ) = (-0.125) * ( 1 + rPoint[0] ) * ( 1 - rPoint[2] ) ;
620  rResult( 1, 2 ) = (-0.125) * ( 1 + rPoint[0] ) * ( 1 - rPoint[1] ) ;
621 
622  rResult( 2, 0 ) = (+0.125) * ( 1 + rPoint[1] ) * ( 1 - rPoint[2] ) ;
623  rResult( 2, 1 ) = (+0.125) * ( 1 + rPoint[0] ) * ( 1 - rPoint[2] ) ;
624  rResult( 2, 2 ) = (-0.125) * ( 1 + rPoint[0] ) * ( 1 + rPoint[1] ) ;
625 
626  rResult( 3, 0 ) = (-0.125) * ( 1 + rPoint[1] ) * ( 1 - rPoint[2] ) ;
627  rResult( 3, 1 ) = (+0.125) * ( 1 - rPoint[0] ) * ( 1 - rPoint[2] ) ;
628  rResult( 3, 2 ) = (-0.125) * ( 1 - rPoint[0] ) * ( 1 + rPoint[1] ) ;
629 
630  rResult( 4, 0 ) = 0.00 ;
631  rResult( 4, 1 ) = 0.00 ;
632  rResult( 4, 2 ) = +0.50 ;
633 
634  return rResult;
635  }
636 
647  {
648  IntegrationPointsContainerType all_integration_points = AllIntegrationPoints();
649  IntegrationPointsArrayType integration_points = all_integration_points[static_cast<int>(ThisMethod)]; //number of integration points
650 
651  const std::size_t integration_points_number = integration_points.size();
652  ShapeFunctionsGradientsType d_shape_f_values(integration_points_number); //initialising container
653 
654  Matrix result;
655 
656  //loop over all integration points
657  for (std::size_t pnt = 0; pnt<integration_points_number; ++pnt) {
658  d_shape_f_values[pnt] = CalculateShapeFunctionsLocalGradients(result, integration_points[pnt]);
659  }
660 
661  return d_shape_f_values;
662  }
663 
667 
681  const CoordinatesArrayType& rPointGlobalCoordinates,
682  const double Tolerance = std::numeric_limits<double>::epsilon()
683  ) const override
684  {
685  // Point to compute distance to
686  const Point point(rPointGlobalCoordinates);
687 
688  // Check if point is inside
689  CoordinatesArrayType aux_coordinates;
690  if (this->IsInside(rPointGlobalCoordinates, aux_coordinates, Tolerance)) {
691  return 0.0;
692  }
693 
694  // Compute distance to faces
695  std::array<double, 5> distances;
696  distances[0] = GeometryUtils::PointDistanceToTriangle3D(this->GetPoint(0), this->GetPoint(1), this->GetPoint(4), point);
697  distances[1] = GeometryUtils::PointDistanceToTriangle3D(this->GetPoint(1), this->GetPoint(2), this->GetPoint(4), point);
698  distances[2] = GeometryUtils::PointDistanceToQuadrilateral3D(this->GetPoint(0), this->GetPoint(1), this->GetPoint(2), this->GetPoint(3), point);
699  distances[3] = GeometryUtils::PointDistanceToTriangle3D(this->GetPoint(2), this->GetPoint(3), this->GetPoint(4), point);
700  distances[4] = GeometryUtils::PointDistanceToTriangle3D(this->GetPoint(3), this->GetPoint(0), this->GetPoint(4), point);
701  const auto min = std::min_element(distances.begin(), distances.end());
702  return *min;
703  }
704 
708 
715  std::string Info() const override
716  {
717  return "3 dimensional pyramid with 5 nodes in 3D space";
718  }
719 
726  void PrintInfo(std::ostream& rOStream) const override
727  {
728  rOStream << Info();
729  }
730 
739  void PrintData(std::ostream& rOStream) const override
740  {
741  BaseType::PrintData(rOStream);
742  }
743 
745 
746 private:
749 
750  static const GeometryData msGeometryData;
751 
752  static const GeometryDimension msGeometryDimension;
753 
757 
758  friend class Serializer;
759 
760  void save( Serializer& rSerializer ) const override
761  {
763  }
764 
765  void load( Serializer& rSerializer ) override
766  {
768  }
769 
770  Pyramid3D5() : BaseType( PointsArrayType(), &msGeometryData ) {}
771 
775 
776  // see ShapeFunctionValue
777  // special function such that it can also be used in the static methods
778  static double ShapeFunctionValueImpl(
779  IndexType ShapeFunctionIndex,
780  const CoordinatesArrayType& rPoint)
781  {
782  switch ( ShapeFunctionIndex )
783  {
784  case 0:
785  return( (0.125) * (1 - rPoint[0]) * (1 - rPoint[1]) * (1 - rPoint[2]) );
786  case 1:
787  return( (0.125) * (1 + rPoint[0]) * (1 - rPoint[1]) * (1 - rPoint[2]) );
788  case 2:
789  return( (0.125) * (1 + rPoint[0]) * (1 + rPoint[1]) * (1 - rPoint[2]) );
790  case 3:
791  return( (0.125) * (1 - rPoint[0]) * (1 + rPoint[1]) * (1 - rPoint[2]) );
792  case 4:
793  return( (0.5) * (1 + rPoint[2]) );
794  default:
795  KRATOS_ERROR << "Wrong index of shape function:" << ShapeFunctionIndex << std::endl;
796  }
797 
798  return 0;
799  }
800 
801  static const IntegrationPointsContainerType AllIntegrationPoints()
802  {
803  IntegrationPointsContainerType integration_points =
804  {
805  {
806  Quadrature < PyramidGaussLegendreIntegrationPoints1,
807  3, IntegrationPoint<3> >::GenerateIntegrationPoints(),
808  Quadrature < PyramidGaussLegendreIntegrationPoints2,
809  3, IntegrationPoint<3> >::GenerateIntegrationPoints(),
810  Quadrature < PyramidGaussLegendreIntegrationPoints3,
811  3, IntegrationPoint<3> >::GenerateIntegrationPoints(),
812  Quadrature < PyramidGaussLegendreIntegrationPoints4,
813  3, IntegrationPoint<3> >::GenerateIntegrationPoints(),
814  Quadrature < PyramidGaussLegendreIntegrationPoints5,
815  3, IntegrationPoint<3> >::GenerateIntegrationPoints()
816  }
817  };
818  return integration_points;
819  }
820 
821  static const ShapeFunctionsValuesContainerType AllShapeFunctionsValues()
822  {
823  ShapeFunctionsValuesContainerType shape_functions_values =
824  {
825  {
831  }
832  };
833  return shape_functions_values;
834  }
835 
836  static const ShapeFunctionsLocalGradientsContainerType AllShapeFunctionsLocalGradients()
837  {
838  ShapeFunctionsLocalGradientsContainerType shape_functions_local_gradients =
839  {
840  {
846  }
847  };
848  return shape_functions_local_gradients;
849  }
850 
854 
855 
859 
860 
864 
865  template<class TOtherPointType> friend class Pyramid3D5;
866 
868 
869 }; // Class Geometry
870 
872 
875 
876 
880 
882 template<class TPointType>
883 inline std::istream& operator >> (std::istream& rIStream,
884  Pyramid3D5<TPointType>& rThis);
885 
887 template<class TPointType>
888 inline std::ostream& operator << (std::ostream& rOStream,
889  const Pyramid3D5<TPointType>& rThis)
890 {
891  rThis.PrintInfo(rOStream);
892  rOStream << std::endl;
893  rThis.PrintData(rOStream);
894 
895  return rOStream;
896 }
898 
899 template<class TPointType> const
900 GeometryData Pyramid3D5<TPointType>::msGeometryData(
903  Pyramid3D5<TPointType>::AllIntegrationPoints(),
904  Pyramid3D5<TPointType>::AllShapeFunctionsValues(),
905  AllShapeFunctionsLocalGradients()
906 );
907 
908 template<class TPointType> const
909 GeometryDimension Pyramid3D5<TPointType>::msGeometryDimension(3, 3);
910 
911 } // namespace Kratos.
Definition: geometry_data.h:60
KratosGeometryType
Definition: geometry_data.h:110
IntegrationMethod
Definition: geometry_data.h:76
KratosGeometryFamily
Definition: geometry_data.h:91
Definition: geometry_dimension.h:42
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: geometry.h:3834
Geometry & operator=(const Geometry &rOther)
Definition: geometry.h:400
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
DataValueContainer & GetData()
Definition: geometry.h:591
SizeType LocalSpaceDimension() const
Definition: geometry.h:1300
std::size_t SizeType
Definition: geometry.h:144
const TPointType::Pointer pGetPoint(const int Index) const
Definition: geometry.h:1790
std::size_t IndexType
Definition: geometry.h:137
std::array< Matrix, static_cast< int >GeometryData::IntegrationMethod::NumberOfIntegrationMethods)> ShapeFunctionsValuesContainerType
Definition: geometry.h:172
virtual bool IsInside(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rResult, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Checks if given point in global space coordinates is inside the geometry boundaries....
Definition: geometry.h:1918
const PointsArrayType & Points() const
Definition: geometry.h:1768
std::array< IntegrationPointsArrayType, static_cast< int >GeometryData::IntegrationMethod::NumberOfIntegrationMethods)> IntegrationPointsContainerType
Definition: geometry.h:167
TPointType const & GetPoint(const int Index) const
Definition: geometry.h:1816
GeometryData::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: geometry.h:177
static double PointDistanceToTriangle3D(const Point &rTrianglePoint1, const Point &rTrianglePoint2, const Point &rTrianglePoint3, const Point &rPoint)
This function calculates the distance of a 3D point to a 3D triangle.
Definition: geometry_utilities.cpp:172
static double PointDistanceToQuadrilateral3D(const Point &rQuadrilateralPoint1, const Point &rQuadrilateralPoint2, const Point &rQuadrilateralPoint3, const Point &rQuadrilateralPoint4, const Point &rPoint)
This function calculates the distance of a 3D point to a 3D quadrilateral.
Definition: geometry_utilities.cpp:376
Short class definition.
Definition: integration_point.h:52
static double ComputeVolume3DGeometry(const Geometry< TPointType > &rGeometry)
This method calculates and returns the volume of the geometry from a 3D geometry.
Definition: integration_utilities.h:168
Definition: amatrix_interface.h:41
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
An two node 3D line geometry with linear shape functions.
Definition: line_3d_2.h:64
Point class.
Definition: point.h:59
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
void reserve(size_type dim)
Definition: pointer_vector.h:319
void push_back(const TPointerType &x)
Definition: pointer_vector.h:270
A five node pyramid geometry with linear shape functions.
Definition: pyramid_3d_5.h:59
BaseType::CoordinatesArrayType CoordinatesArrayType
Definition: pyramid_3d_5.h:144
Pyramid3D5(Pyramid3D5 const &rOther)
Definition: pyramid_3d_5.h:205
GeometryData::KratosGeometryType GetGeometryType() const override
Definition: pyramid_3d_5.h:231
Pyramid3D5(typename PointType::Pointer pPoint1, typename PointType::Pointer pPoint2, typename PointType::Pointer pPoint3, typename PointType::Pointer pPoint4, typename PointType::Pointer pPoint5)
Definition: pyramid_3d_5.h:157
Pyramid3D5(const PointsArrayType &ThisPoints)
Definition: pyramid_3d_5.h:173
friend class Pyramid3D5
Definition: pyramid_3d_5.h:865
double CalculateDistance(const CoordinatesArrayType &rPointGlobalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Computes the distance between an point in global coordinates and the closest point of this geometry....
Definition: pyramid_3d_5.h:680
GeometriesArrayType GenerateEdges() const override
This method gives you all edges of this geometry.
Definition: pyramid_3d_5.h:336
double ShapeFunctionValue(IndexType ShapeFunctionIndex, const CoordinatesArrayType &rPoint) const override
Definition: pyramid_3d_5.h:542
BaseType::IntegrationPointType IntegrationPointType
Definition: pyramid_3d_5.h:107
Pyramid3D5 & operator=(const Pyramid3D5 &rOther)
Definition: pyramid_3d_5.h:250
Pyramid3D5 & operator=(Pyramid3D5< TOtherPointType > const &rOther)
Definition: pyramid_3d_5.h:268
Triangle3D3< TPointType > FaceType1
Definition: pyramid_3d_5.h:72
Quadrilateral3D4< TPointType > FaceType2
Definition: pyramid_3d_5.h:73
GeometriesArrayType GenerateFaces() const override
Returns all faces of the current geometry.
Definition: pyramid_3d_5.h:386
static ShapeFunctionsGradientsType CalculateShapeFunctionsIntegrationPointsLocalGradients(typename BaseType::IntegrationMethod ThisMethod)
Definition: pyramid_3d_5.h:646
BaseType::SizeType SizeType
Definition: pyramid_3d_5.h:96
Matrix & PointsLocalCoordinates(Matrix &rResult) const override
Definition: pyramid_3d_5.h:479
Pyramid3D5(const IndexType GeometryId, const PointsArrayType &rThisPoints)
Constructor with Geometry Id.
Definition: pyramid_3d_5.h:180
GeometryData::KratosGeometryFamily GetGeometryFamily() const override
Definition: pyramid_3d_5.h:226
BaseType::IndexType IndexType
Definition: pyramid_3d_5.h:90
static Matrix CalculateShapeFunctionsIntegrationPointsValues(typename BaseType::IntegrationMethod ThisMethod)
Definition: pyramid_3d_5.h:557
BaseType::PointsArrayType PointsArrayType
Definition: pyramid_3d_5.h:101
BaseType::IntegrationPointsContainerType IntegrationPointsContainerType
Definition: pyramid_3d_5.h:120
Pyramid3D5(Pyramid3D5< TOtherPointType > const &rOther)
Definition: pyramid_3d_5.h:221
static Matrix & CalculateShapeFunctionsLocalGradients(Matrix &rResult, const CoordinatesArrayType &rPoint)
Definition: pyramid_3d_5.h:606
BaseType::IntegrationPointsArrayType IntegrationPointsArrayType
Definition: pyramid_3d_5.h:114
double Volume() const override
Definition: pyramid_3d_5.h:423
SizeType EdgesNumber() const override
This method gives you number of all edges of this geometry.
Definition: pyramid_3d_5.h:323
BaseType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: pyramid_3d_5.h:132
int IsInsideLocalSpace(const CoordinatesArrayType &rPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Checks if given point in local space coordinates of this geometry is inside the geometry boundaries.
Definition: pyramid_3d_5.h:454
Matrix & ShapeFunctionsLocalGradients(Matrix &rResult, const CoordinatesArrayType &rPoint) const override
Definition: pyramid_3d_5.h:585
Pyramid3D5(const std::string &rGeometryName, const PointsArrayType &rThisPoints)
Constructor with Geometry Name.
Definition: pyramid_3d_5.h:189
BaseType::GeometriesArrayType GeometriesArrayType
Definition: pyramid_3d_5.h:150
void PrintInfo(std::ostream &rOStream) const override
Definition: pyramid_3d_5.h:726
BaseType::ShapeFunctionsValuesContainerType ShapeFunctionsValuesContainerType
Definition: pyramid_3d_5.h:125
SizeType FacesNumber() const override
Returns the number of faces of the current geometry.
Definition: pyramid_3d_5.h:373
Vector & ShapeFunctionsValues(Vector &rResult, const CoordinatesArrayType &rCoordinates) const override
Definition: pyramid_3d_5.h:522
Geometry< TPointType > BaseType
Geometry as base class.
Definition: pyramid_3d_5.h:66
BaseType::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: pyramid_3d_5.h:139
BaseType::Pointer Create(const IndexType NewGeometryId, PointsArrayType const &rThisPoints) const override
Creates a new geometry pointer.
Definition: pyramid_3d_5.h:285
Line3D2< TPointType > EdgeType
Definition: pyramid_3d_5.h:71
TPointType PointType
Definition: pyramid_3d_5.h:84
std::string Info() const override
Definition: pyramid_3d_5.h:715
void PrintData(std::ostream &rOStream) const override
Definition: pyramid_3d_5.h:739
KRATOS_CLASS_POINTER_DEFINITION(Pyramid3D5)
Pointer definition of Pyramid3D5.
double DomainSize() const override
Definition: pyramid_3d_5.h:439
GeometryData::IntegrationMethod IntegrationMethod
Definition: pyramid_3d_5.h:80
BaseType::Pointer Create(const IndexType NewGeometryId, const BaseType &rGeometry) const override
Creates a new geometry pointer.
Definition: pyramid_3d_5.h:299
A four node 3D quadrilateral geometry with bi-linear shape functions.
Definition: quadrilateral_3d_4.h:76
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
A three node 3D triangle geometry with linear shape functions.
Definition: triangle_3d_3.h:77
Short class definition.
Definition: array_1d.h:61
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
static double min(double a, double b)
Definition: GeometryFunctions.h:71
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
const GeometryData Pyramid3D5< TPointType >::msGeometryData & msGeometryDimension(), Pyramid3D5< TPointType >::AllShapeFunctionsValues(), AllShapeFunctionsLocalGradients()
Definition: brep_curve.h:483
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
const GeometryData BrepCurve< TContainerPointType, TContainerPointEmbeddedType >::msGeometryData & msGeometryDimension
Definition: brep_curve.h:483
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17