17 #if !defined(KRATOS_LINE_GAUSS_LOBATTO_3D_2_H_INCLUDED )
18 #define KRATOS_LINE_GAUSS_LOBATTO_3D_2_H_INCLUDED
53 template<
class TPo
intType>
169 :
BaseType( ThisPoints, &msGeometryData )
249 template<
class TOtherPo
intType>
279 if(rResult.size() != 2)
280 rResult.
resize( 2,
false );
306 const double lx = point0.X() - point1.X();
307 const double ly = point0.Y() - point1.Y();
308 const double lz = point0.Z() - point1.Z();
310 const double length = lx * lx + ly * ly + lz * lz;
312 return sqrt( length );
346 const double lx = point0.X() - point1.X();
347 const double ly = point0.Y() - point1.Y();
348 const double lz = point0.Z() - point1.Z();
350 const double length = lx * lx + ly * ly + lz * lz;
352 return sqrt( length );
378 jacobian( 0, 0 ) = ( this->
GetPoint( 1 ).X() - this->
GetPoint( 0 ).X() ) * 0.5;
379 jacobian( 1, 0 ) = ( this->
GetPoint( 1 ).Y() - this->
GetPoint( 0 ).Y() ) * 0.5;
380 jacobian( 2, 0 ) = ( this->
GetPoint( 1 ).Z() - this->
GetPoint( 0 ).Z() ) * 0.5;
389 std::fill( rResult.
begin(), rResult.
end(), jacobian );
414 jacobian( 0, 0 ) = ( (this->
GetPoint( 1 ).X() - DeltaPosition(1,0)) - (this->
GetPoint( 0 ).X() - DeltaPosition(0,0)) ) * 0.5;
415 jacobian( 1, 0 ) = ( (this->
GetPoint( 1 ).Y() - DeltaPosition(1,1)) - (this->
GetPoint( 0 ).Y() - DeltaPosition(0,1)) ) * 0.5;
416 jacobian( 2, 0 ) = ( (this->
GetPoint( 1 ).Z() - DeltaPosition(1,2)) - (this->
GetPoint( 0 ).Z() - DeltaPosition(0,2)) ) * 0.5;
425 std::fill( rResult.
begin(), rResult.
end(), jacobian );
449 rResult.
resize( 3, 1,
false );
451 rResult( 0, 0 ) = ( this->
GetPoint( 1 ).X() - this->
GetPoint( 0 ).X() ) * 0.5;
452 rResult( 1, 0 ) = ( this->
GetPoint( 1 ).Y() - this->
GetPoint( 0 ).Y() ) * 0.5;
453 rResult( 2, 0 ) = ( this->
GetPoint( 1 ).Z() - this->
GetPoint( 0 ).Z() ) * 0.5;
470 rResult.
resize( 3, 1,
false );
472 rResult( 0, 0 ) = ( this->
GetPoint( 1 ).X() - this->
GetPoint( 0 ).X() ) * 0.5;
473 rResult( 1, 0 ) = ( this->
GetPoint( 1 ).Y() - this->
GetPoint( 0 ).Y() ) * 0.5;
474 rResult( 2, 0 ) = ( this->
GetPoint( 1 ).Z() - this->
GetPoint( 0 ).Z() ) * 0.5;
623 switch ( ShapeFunctionIndex )
627 return( 0.5*( 1.0 - rPoint[0] ) );
630 return( 0.5*( 1.0 + rPoint[0] ) );
633 KRATOS_ERROR <<
"Wrong index of shape function!" << *
this << std::endl;
643 rResult( 0, 0 ) = -0.5;
644 rResult( 1, 0 ) = 0.5;
654 std::string
Info()
const override
656 return "1 dimensional line with 2 nodes in 3D space";
667 rOStream <<
"1 dimensional line with 2 nodes in 3D space";
682 std::cout << std::endl;
688 rOStream <<
" Jacobian\t : " << jacobian;
754 void save(
Serializer& rSerializer )
const override
781 Matrix N( integration_points_number, 2 );
783 for (
int it_gp = 0; it_gp < integration_points_number; it_gp++ )
786 N( it_gp, 0 ) = 0.5 * ( 1 -
e );
787 N( it_gp, 1 ) = 0.5 * ( 1 +
e );
804 DN_De[it_gp] = aux_mat;
814 Quadrature<LineGaussLobattoIntegrationPoints1, 1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
815 Quadrature<LineGaussLobattoIntegrationPoints2, 1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
816 Quadrature<LineGaussLobattoIntegrationPoints3, 1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
817 Quadrature<LineGaussLobattoIntegrationPoints4, 1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
818 Quadrature<LineGaussLobattoIntegrationPoints5, 1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
819 Quadrature<LineGaussLobattoIntegrationPoints6, 1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
820 Quadrature<LineGaussLobattoIntegrationPoints7, 1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
821 Quadrature<LineGaussLobattoIntegrationPoints8, 1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
822 Quadrature<LineGaussLobattoIntegrationPoints9, 1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
823 Quadrature<LineGaussLobattoIntegrationPoints10,1, IntegrationPoint<3> >::GenerateIntegrationPoints(),
826 return integration_points;
844 return shape_functions_values;
863 return shape_functions_local_gradients;
902 template<
class TPo
intType>
907 template<
class TPo
intType>
912 rOStream << std::endl;
921 template<
class TPo
intType>
922 const GeometryData LineGaussLobatto3D2<TPointType>::msGeometryData(
925 LineGaussLobatto3D2<TPointType>::AllIntegrationPoints(),
926 LineGaussLobatto3D2<TPointType>::AllShapeFunctionsValues(),
927 AllShapeFunctionsLocalGradients() );
929 template<
class TPo
intType>
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
std::size_t SizeType
Definition: geometry.h:144
std::size_t IndexType
Definition: geometry.h:137
std::array< Matrix, static_cast< int >GeometryData::IntegrationMethod::NumberOfIntegrationMethods)> ShapeFunctionsValuesContainerType
Definition: geometry.h:172
const PointsArrayType & Points() const
Definition: geometry.h:1768
bool AllPointsAreValid() const
Checks if the geometry points are valid Checks if the geometry points are valid from the pointer valu...
Definition: geometry.h:4093
std::array< IntegrationPointsArrayType, static_cast< int >GeometryData::IntegrationMethod::NumberOfIntegrationMethods)> IntegrationPointsContainerType
Definition: geometry.h:167
LumpingMethods
This defines the different methods to compute the lumping methods.
Definition: geometry.h:109
const IntegrationPointsArrayType & IntegrationPoints() const
Definition: geometry.h:2284
TPointType const & GetPoint(const int Index) const
Definition: geometry.h:1816
GeometryData::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: geometry.h:177
SizeType IntegrationPointsNumber() const
Definition: geometry.h:2257
GeometryData::IntegrationMethod IntegrationMethod
Definition: geometry.h:122
Short class definition.
Definition: integration_point.h:52
Definition: amatrix_interface.h:41
void swap(Matrix &Other)
Definition: amatrix_interface.h:289
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
iterator end()
Definition: amatrix_interface.h:243
iterator begin()
Definition: amatrix_interface.h:241
Definition: line_gauss_lobatto_3d_2.h:56
GeometryData::IntegrationMethod IntegrationMethod
Definition: line_gauss_lobatto_3d_2.h:71
Matrix & Jacobian(Matrix &rResult, IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const override
Definition: line_gauss_lobatto_3d_2.h:447
BaseType::IntegrationPointType IntegrationPointType
Definition: line_gauss_lobatto_3d_2.h:104
Matrix & Jacobian(Matrix &rResult, const CoordinatesArrayType &rPoint) const override
Definition: line_gauss_lobatto_3d_2.h:468
BaseType::ShapeFunctionsValuesContainerType ShapeFunctionsValuesContainerType
Definition: line_gauss_lobatto_3d_2.h:122
Vector & DeterminantOfJacobian(Vector &rResult, IntegrationMethod ThisMethod) const override
Definition: line_gauss_lobatto_3d_2.h:489
double Area() const override
Definition: line_gauss_lobatto_3d_2.h:326
SizeType FacesNumber() const override
Returns the number of faces of the current geometry.
Definition: line_gauss_lobatto_3d_2.h:610
double DeterminantOfJacobian(IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const override
Definition: line_gauss_lobatto_3d_2.h:514
JacobiansType & InverseOfJacobian(JacobiansType &rResult, IntegrationMethod ThisMethod) const override
Definition: line_gauss_lobatto_3d_2.h:551
double DomainSize() const override
Definition: line_gauss_lobatto_3d_2.h:342
Matrix & ShapeFunctionsLocalGradients(Matrix &rResult, const CoordinatesArrayType &rPoint) const override
Definition: line_gauss_lobatto_3d_2.h:639
LineGaussLobatto3D2(const PointsArrayType &ThisPoints)
Definition: line_gauss_lobatto_3d_2.h:168
BaseType::IndexType IndexType
Definition: line_gauss_lobatto_3d_2.h:86
BaseType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: line_gauss_lobatto_3d_2.h:139
BaseType::IntegrationPointsContainerType IntegrationPointsContainerType
Definition: line_gauss_lobatto_3d_2.h:117
void PrintData(std::ostream &rOStream) const override
Definition: line_gauss_lobatto_3d_2.h:678
SizeType EdgesNumber() const override
Definition: line_gauss_lobatto_3d_2.h:604
Vector & LumpingFactors(Vector &rResult, const typename BaseType::LumpingMethods LumpingMethod=BaseType::LumpingMethods::ROW_SUM) const override
Lumping factors for the calculation of the lumped mass matrix.
Definition: line_gauss_lobatto_3d_2.h:274
LineGaussLobatto3D2(LineGaussLobatto3D2 const &rOther)
Definition: line_gauss_lobatto_3d_2.h:183
Matrix & InverseOfJacobian(Matrix &rResult, IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const override
Definition: line_gauss_lobatto_3d_2.h:575
BaseType::PointsArrayType PointsArrayType
Definition: line_gauss_lobatto_3d_2.h:98
GeometryData::KratosGeometryType GetGeometryType() const override
Definition: line_gauss_lobatto_3d_2.h:213
BaseType::JacobiansType JacobiansType
Definition: line_gauss_lobatto_3d_2.h:133
GeometryData::KratosGeometryFamily GetGeometryFamily() const override
Definition: line_gauss_lobatto_3d_2.h:208
LineGaussLobatto3D2 & operator=(const LineGaussLobatto3D2 &rOther)
Definition: line_gauss_lobatto_3d_2.h:232
LineGaussLobatto3D2(typename PointType::Pointer pFirstPoint, typename PointType::Pointer pSecondPoint)
Definition: line_gauss_lobatto_3d_2.h:161
BaseType::IntegrationPointsArrayType IntegrationPointsArrayType
Definition: line_gauss_lobatto_3d_2.h:111
double DeterminantOfJacobian(const CoordinatesArrayType &rPoint) const override
Definition: line_gauss_lobatto_3d_2.h:531
LineGaussLobatto3D2(LineGaussLobatto3D2< TOtherPointType > const &rOther)
Definition: line_gauss_lobatto_3d_2.h:200
JacobiansType & Jacobian(JacobiansType &rResult, IntegrationMethod ThisMethod, Matrix &DeltaPosition) const override
Definition: line_gauss_lobatto_3d_2.h:411
LineGaussLobatto3D2 & operator=(LineGaussLobatto3D2< TOtherPointType > const &rOther)
Definition: line_gauss_lobatto_3d_2.h:250
void PrintInfo(std::ostream &rOStream) const override
Definition: line_gauss_lobatto_3d_2.h:665
double Length() const override
Definition: line_gauss_lobatto_3d_2.h:302
Geometry< TPointType > BaseType
Geometry as base class.
Definition: line_gauss_lobatto_3d_2.h:64
TPointType PointType
Definition: line_gauss_lobatto_3d_2.h:80
std::string Info() const override
Definition: line_gauss_lobatto_3d_2.h:654
friend class LineGaussLobatto3D2
Definition: line_gauss_lobatto_3d_2.h:880
BaseType::Pointer Create(PointsArrayType const &ThisPoints) const override
Creates a new geometry pointer.
Definition: line_gauss_lobatto_3d_2.h:261
~LineGaussLobatto3D2() override
Destructor. Do nothing!!!
Definition: line_gauss_lobatto_3d_2.h:206
BaseType::CoordinatesArrayType CoordinatesArrayType
Definition: line_gauss_lobatto_3d_2.h:148
BaseType::GeometriesArrayType GeometriesArrayType
Definition: line_gauss_lobatto_3d_2.h:76
Matrix & InverseOfJacobian(Matrix &rResult, const CoordinatesArrayType &rPoint) const override
Definition: line_gauss_lobatto_3d_2.h:593
JacobiansType & Jacobian(JacobiansType &rResult, IntegrationMethod ThisMethod) const override
Definition: line_gauss_lobatto_3d_2.h:375
BaseType::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: line_gauss_lobatto_3d_2.h:127
KRATOS_CLASS_POINTER_DEFINITION(LineGaussLobatto3D2)
Pointer definition of LineGaussLobatto3D2.
BaseType::NormalType NormalType
Definition: line_gauss_lobatto_3d_2.h:143
double ShapeFunctionValue(IndexType ShapeFunctionIndex, const CoordinatesArrayType &rPoint) const override
Definition: line_gauss_lobatto_3d_2.h:620
BaseType::SizeType SizeType
Definition: line_gauss_lobatto_3d_2.h:93
Various mathematical utilitiy functions.
Definition: math_utils.h:62
static double Norm3(const TVectorType &a)
Calculates the norm of vector "a" which is assumed to be of size 3.
Definition: math_utils.h:691
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
void push_back(const TPointerType &x)
Definition: pointer_vector.h:270
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
const GeometryData LineGaussLobatto3D2< TPointType >::msGeometryData & msGeometryDimension(), LineGaussLobatto3D2< TPointType >::AllShapeFunctionsValues(), AllShapeFunctionsLocalGradients()
Definition: brep_curve.h:483
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
const GeometryData BrepCurve< TContainerPointType, TContainerPointEmbeddedType >::msGeometryData & msGeometryDimension
Definition: brep_curve.h:483
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
float temp
Definition: rotating_cone.py:85
N
Definition: sensitivityMatrix.py:29
e
Definition: run_cpp_mpi_tests.py:31