15 #ifndef KRATOS_COORDINATE_TRANSFORMATION_UTILITIES_H
16 #define KRATOS_COORDINATE_TRANSFORMATION_UTILITIES_H
21 #include "boost/numeric/ublas/matrix_proxy.hpp"
56 template<
class TLocalMatrixType,
class TLocalVectorType,
class TValueType>
83 const unsigned int NumRowsPerNode,
85 mDomainSize(DomainSize),
86 mBlockSize(NumRowsPerNode),
87 mrFlag(rSelectionFlag)
111 TLocalMatrixType& rRotationMatrix,
116 if (mDomainSize == 2) {
119 if (rRotationMatrix.size1() != 2 || rRotationMatrix.size2() != 2) {
120 rRotationMatrix.resize(2, 2,
false);
122 noalias(rRotationMatrix) = local_matrix;
123 }
else if (mDomainSize == 3) {
126 if (rRotationMatrix.size1() != 3 || rRotationMatrix.size2() != 3) {
127 rRotationMatrix.resize(3, 3,
false);
129 noalias(rRotationMatrix) = local_matrix;
131 KRATOS_ERROR <<
"Unsupported domain size [ mDomainSize = " << mDomainSize
145 double aux = rNormal[0] * rNormal[0] + rNormal[1] * rNormal[1] +
146 rNormal[2] * rNormal[2];
148 rRot(0, 0) = rNormal[0] / aux;
149 rRot(0, 1) = rNormal[1] / aux;
150 rRot(0, 2) = rNormal[2] / aux;
158 double dot = rRot(0, 0);
162 if (fabs(dot) > 0.99) {
171 rT1[0] -= dot * rRot(0, 0);
172 rT1[1] -= dot * rRot(0, 1);
173 rT1[2] -= dot * rRot(0, 2);
180 rRot(2, 0) = rRot(0, 1) * rT1[2] - rRot(0, 2) * rT1[1];
181 rRot(2, 1) = rRot(0, 2) * rT1[0] - rRot(0, 0) * rT1[2];
182 rRot(2, 2) = rRot(0, 0) * rT1[1] - rRot(0, 1) * rT1[0];
192 double aux = rNormal[0] * rNormal[0] + rNormal[1] * rNormal[1];
195 rRot(0, 0) = rNormal[0] / aux;
196 rRot(0, 1) = rNormal[1] / aux;
197 rRot(1, 0) = -rNormal[1] / aux;
198 rRot(1, 1) = rNormal[0] / aux;
217 TLocalMatrixType& rRotationMatrixShapeDerivative,
218 const std::size_t DerivativeNodeIndex,
219 const std::size_t DerivativeDirectionIndex,
224 if (mDomainSize == 2) {
227 local_matrix, DerivativeNodeIndex, DerivativeDirectionIndex, rThisPoint);
228 if (rRotationMatrixShapeDerivative.size1() != 2 ||
229 rRotationMatrixShapeDerivative.size2() != 2) {
230 rRotationMatrixShapeDerivative.resize(2, 2,
false);
232 noalias(rRotationMatrixShapeDerivative) = local_matrix;
233 }
else if (mDomainSize == 3) {
236 local_matrix, DerivativeNodeIndex, DerivativeDirectionIndex, rThisPoint);
237 if (rRotationMatrixShapeDerivative.size1() != 3 ||
238 rRotationMatrixShapeDerivative.size2() != 3) {
239 rRotationMatrixShapeDerivative.resize(3, 3,
false);
241 noalias(rRotationMatrixShapeDerivative) = local_matrix;
243 KRATOS_ERROR <<
"Unsupported domain size [ mDomainSize = " << mDomainSize
269 const std::size_t DerivativeNodeIndex,
270 const std::size_t DerivativeDirectionIndex,
276 <<
"NORMAL is not found in node at " << rThisPoint.
Coordinates() <<
".";
278 <<
"NORMAL_SHAPE_DERIVATIVE is not found in node [ Node.Id() = "
279 << rThisPoint.
Id() <<
" ] at " << rThisPoint.
Coordinates() <<
".";
283 const double nodal_normal_magnitude =
norm_2(r_nodal_normal);
287 <<
" is not properly initialized.";
289 const Matrix& r_sensitivity_values = rThisPoint.
GetValue(NORMAL_SHAPE_DERIVATIVE);
292 <<
"NORMAL_SHAPE_DERIVATIVE is not properly initialized at node [ Node.Id() = "
293 << rThisPoint.
Id() <<
" ] "
294 << rThisPoint.
Coordinates() <<
" to calculate 2D rotation operator shape sensitivities. [ required number of columns = 2, available number of columns = "
295 << r_sensitivity_values.size2() <<
" ].";
297 const std::size_t require_rows = (DerivativeNodeIndex + 1) * 2;
299 <<
"NORMAL_SHAPE_DERIVATIVE is not properly initialized at node [ Node.Id() = "
300 << rThisPoint.
Id() <<
" ] "
301 << rThisPoint.
Coordinates() <<
" to calculate 2D rotation operator shape sensitivities. [ required number of rows >= "
303 <<
", available number of rows = " << r_sensitivity_values.size1() <<
" ].";
305 const Vector& r_nodal_normal_derivatives =
306 row(r_sensitivity_values, DerivativeNodeIndex * 2 + DerivativeDirectionIndex);
308 rOutput(0, 0) = r_nodal_normal_derivatives[0] / nodal_normal_magnitude;
309 rOutput(0, 1) = r_nodal_normal_derivatives[1] / nodal_normal_magnitude;
310 rOutput(1, 0) = -r_nodal_normal_derivatives[1] / nodal_normal_magnitude;
311 rOutput(1, 1) = r_nodal_normal_derivatives[0] / nodal_normal_magnitude;
313 const double nodal_normal_magnitude_derivative =
314 (r_nodal_normal[0] * r_nodal_normal_derivatives[0] +
315 r_nodal_normal[1] * r_nodal_normal_derivatives[1]) /
316 nodal_normal_magnitude;
318 const double coeff = nodal_normal_magnitude_derivative /
319 (std::pow(nodal_normal_magnitude, 2));
321 rOutput(0, 0) -= r_nodal_normal[0] *
coeff;
322 rOutput(0, 1) -= r_nodal_normal[1] *
coeff;
323 rOutput(1, 0) -= -r_nodal_normal[1] *
coeff;
324 rOutput(1, 1) -= r_nodal_normal[0] *
coeff;
347 const std::size_t DerivativeNodeIndex,
348 const std::size_t DerivativeDirectionIndex,
354 <<
"NORMAL is not found in node at " << rThisPoint.
Coordinates() <<
".";
356 <<
"NORMAL_SHAPE_DERIVATIVE is not found in node at "
361 const double nodal_normal_magnitude =
norm_2(r_nodal_normal);
365 <<
" is not properly initialized.";
367 const Matrix& r_sensitivity_values = rThisPoint.
GetValue(NORMAL_SHAPE_DERIVATIVE);
370 <<
"NORMAL_SHAPE_DERIVATIVE is not properly initialized at node "
371 << rThisPoint.
Coordinates() <<
" to calculate 3D rotation operator shape sensitivities. [ required number of columns = 3, available number of columns = "
372 << r_sensitivity_values.size2() <<
" ].";
374 const std::size_t require_rows = (DerivativeNodeIndex + 1) * 3;
376 <<
"NORMAL_SHAPE_DERIVATIVE is not properly initialized at node "
377 << rThisPoint.
Coordinates() <<
" to calculate 3D rotation operator shape sensitivities. [ required number of rows >= "
379 <<
", available number of rows = " << r_sensitivity_values.size1() <<
" ].";
381 const Vector& r_nodal_normal_derivative =
382 row(r_sensitivity_values, DerivativeNodeIndex * 3 + DerivativeDirectionIndex);
384 const double nodal_normal_magnitude_derivative = VectorNormDerivative(nodal_normal_magnitude, r_nodal_normal, r_nodal_normal_derivative);
386 const array_1d<double, 3>& unit_normal_derivative = UnitVectorDerivative(nodal_normal_magnitude, nodal_normal_magnitude_derivative, r_nodal_normal, r_nodal_normal_derivative);
388 rOutput(0, 0) = unit_normal_derivative[0];
389 rOutput(0, 1) = unit_normal_derivative[1];
390 rOutput(0, 2) = unit_normal_derivative[2];
394 double dot = unit_normal[0];
395 double dot_derivative = unit_normal_derivative[0];
397 if (std::abs(dot) > 0.99) {
400 dot = unit_normal[1];
401 dot_derivative = unit_normal_derivative[1];
405 noalias(rT1) -= unit_normal * dot;
406 const double rT1_norm =
norm_2(rT1);
410 const array_1d<double, 3>& rT1_derivative = (unit_normal_derivative * dot + unit_normal * dot_derivative) * -1.0;
413 const double rT1_norm_derivative = VectorNormDerivative(rT1_norm, rT1, rT1_derivative);
416 UnitVectorDerivative(rT1_norm, rT1_norm_derivative, rT1, rT1_derivative);
418 rOutput(1, 0) = unit_rT1_derivative[0];
419 rOutput(1, 1) = unit_rT1_derivative[1];
420 rOutput(1, 2) = unit_rT1_derivative[2];
422 rOutput(2, 0) = unit_normal_derivative[1] * unit_rT1[2]
423 + unit_normal[1] * unit_rT1_derivative[2]
424 - unit_normal_derivative[2] * unit_rT1[1]
425 - unit_normal[2] * unit_rT1_derivative[1];
428 rOutput(2, 1) = unit_normal_derivative[2] * unit_rT1[0]
429 + unit_normal[2] * unit_rT1_derivative[0]
430 - unit_normal_derivative[0] * unit_rT1[2]
431 - unit_normal[0] * unit_rT1_derivative[2];
433 rOutput(2, 2) = unit_normal_derivative[0] * unit_rT1[1]
434 + unit_normal[0] * unit_rT1_derivative[1]
435 - unit_normal_derivative[1] * unit_rT1[0]
436 - unit_normal[1] * unit_rT1_derivative[0];
447 virtual void Rotate(TLocalMatrixType& rLocalMatrix,
448 TLocalVectorType& rLocalVector,
451 if(mBlockSize != mDomainSize)
453 if(mDomainSize == 2) RotateAux<2,3>(rLocalMatrix,rLocalVector,rGeometry);
454 if(mDomainSize == 3) RotateAux<3,4>(rLocalMatrix,rLocalVector,rGeometry);
458 if(mDomainSize == 2) RotateAuxPure<2>(rLocalMatrix,rLocalVector,rGeometry);
459 if(mDomainSize == 3) RotateAuxPure<3>(rLocalMatrix,rLocalVector,rGeometry);
465 virtual void Rotate(TLocalVectorType& rLocalVector,
472 if (rLocalVector.size() > 0)
474 if(mBlockSize != mDomainSize)
478 if( this->
IsSlip(rGeometry[
j]) )
484 LocalRotationOperator3D<4>(rRot,rGeometry[
j]);
486 for(
unsigned int k=0;
k<4;
k++)
487 aux[
k] = rLocalVector[
j*mBlockSize+
k];
491 for(
unsigned int k=0;
k<4;
k++)
492 rLocalVector[
j*mBlockSize+
k] =
aux1[
k];
498 LocalRotationOperator2D<3>(rRot,rGeometry[
j]);
500 for(
unsigned int k=0;
k<3;
k++)
502 aux[
k] = rLocalVector[
j*mBlockSize+
k];
507 for(
unsigned int k=0;
k<3;
k++)
508 rLocalVector[
j*mBlockSize+
k] =
aux1[
k];
519 if( this->
IsSlip(rGeometry[
j]) )
527 for(
unsigned int k=0;
k<3;
k++)
528 aux[
k] = rLocalVector[
j*mBlockSize+
k];
532 for(
unsigned int k=0;
k<3;
k++)
533 rLocalVector[
j*mBlockSize+
k] =
aux1[
k];
541 for(
unsigned int k=0;
k<2;
k++)
542 aux[
k] = rLocalVector[
j*mBlockSize+
k];
546 for(
unsigned int k=0;
k<2;
k++)
547 rLocalVector[
j*mBlockSize+
k] =
aux1[
k];
566 TLocalVectorType& rLocalVector,
569 const unsigned int LocalSize = rLocalVector.size();
573 for(
unsigned int itNode = 0; itNode < rGeometry.
PointsNumber(); ++itNode)
575 if( this->
IsSlip(rGeometry[itNode]))
578 unsigned int j = itNode * mBlockSize;
583 VMesh -= rGeometry[itNode].FastGetSolutionStepValue(VELOCITY);
587 for(
unsigned int i = 0;
i <
j; ++
i)
589 rLocalMatrix(
i,
j) = 0.0;
590 rLocalMatrix(
j,
i) = 0.0;
592 for(
unsigned int i =
j+1;
i < LocalSize; ++
i)
594 rLocalMatrix(
i,
j) = 0.0;
595 rLocalMatrix(
j,
i) = 0.0;
599 rLocalMatrix(
j,
j) = 1.0;
609 if (rLocalVector.size() > 0)
611 for(
unsigned int itNode = 0; itNode < rGeometry.
PointsNumber(); ++itNode)
613 if( this->
IsSlip(rGeometry[itNode]) )
616 unsigned int j = itNode * mBlockSize;
620 VMesh -= rGeometry[itNode].FastGetSolutionStepValue(VELOCITY);
633 TLocalVectorType Vel(mDomainSize);
634 TLocalVectorType Tmp(mDomainSize);
637 #pragma omp parallel for firstprivate(Vel,Tmp)
638 for(
int iii=0; iii<static_cast<int>(rModelPart.
Nodes().size()); iii++)
641 if( this->
IsSlip(*itNode) )
650 for(
unsigned int i = 0;
i < 3;
i++) Vel[
i] = rVelocity[
i];
652 for(
unsigned int i = 0;
i < 3;
i++) rVelocity[
i] = Tmp[
i];
660 for(
unsigned int i = 0;
i < 2;
i++) Vel[
i] = rVelocity[
i];
662 for(
unsigned int i = 0;
i < 2;
i++) rVelocity[
i] = Tmp[
i];
671 TLocalVectorType Vel(mDomainSize);
672 TLocalVectorType Tmp(mDomainSize);
675 #pragma omp parallel for firstprivate(Vel,Tmp)
676 for(
int iii=0; iii<static_cast<int>(rModelPart.
Nodes().size()); iii++)
679 if( this->
IsSlip(*itNode) )
687 for(
unsigned int i = 0;
i < 3;
i++) Vel[
i] = rVelocity[
i];
689 for(
unsigned int i = 0;
i < 3;
i++) rVelocity[
i] = Tmp[
i];
697 for(
unsigned int i = 0;
i < 2;
i++) Vel[
i] = rVelocity[
i];
699 for(
unsigned int i = 0;
i < 2;
i++) rVelocity[
i] = Tmp[
i];
718 virtual std::string
Info()
const
720 std::stringstream buffer;
721 buffer <<
"CoordinateTransformationUtils";
728 rOStream <<
"CoordinateTransformationUtils";
756 template<
unsigned int TDim,
unsigned int TBlockSize,
unsigned int TSkip = 0>
758 TLocalVectorType& rLocalVector,
761 const unsigned int LocalSize = rLocalVector.size();
764 int rotations_needed = 0;
765 const unsigned int NumBlocks = LocalSize / TBlockSize;
768 std::vector< BoundedMatrix<double,TBlockSize,TBlockSize> > rRot(NumBlocks);
769 for(
unsigned int j = 0;
j < NumBlocks; ++
j)
771 if( this->
IsSlip(rGeometry[
j]) )
773 NeedRotation[
j] =
true;
776 if constexpr (TDim == 2) LocalRotationOperator2D<TBlockSize,TSkip>(rRot[
j],rGeometry[
j]);
777 else LocalRotationOperator3D<TBlockSize,TSkip>(rRot[
j],rGeometry[
j]);
783 if(rotations_needed > 0)
788 for(
unsigned int i=0;
i<NumBlocks;
i++)
790 if(NeedRotation[
i] ==
true)
792 for(
unsigned int j=0;
j<NumBlocks;
j++)
794 if(NeedRotation[
j] ==
true)
796 ReadBlockMatrix<TBlockSize>(mat_block, rLocalMatrix,
i*TBlockSize,
j*TBlockSize);
799 WriteBlockMatrix<TBlockSize>(mat_block, rLocalMatrix,
i*TBlockSize,
j*TBlockSize);
803 ReadBlockMatrix<TBlockSize>(mat_block, rLocalMatrix,
i*TBlockSize,
j*TBlockSize);
805 WriteBlockMatrix<TBlockSize>(
tmp, rLocalMatrix,
i*TBlockSize,
j*TBlockSize);
809 for(
unsigned int k=0;
k<TBlockSize;
k++)
810 aux[
k] = rLocalVector[
i*TBlockSize+
k];
814 for(
unsigned int k=0;
k<TBlockSize;
k++)
815 rLocalVector[
i*TBlockSize+
k] =
aux1[
k];
820 for(
unsigned int j=0;
j<NumBlocks;
j++)
822 if(NeedRotation[
j] ==
true)
824 ReadBlockMatrix<TBlockSize>(mat_block, rLocalMatrix,
i*TBlockSize,
j*TBlockSize);
826 WriteBlockMatrix<TBlockSize>(
tmp, rLocalMatrix,
i*TBlockSize,
j*TBlockSize);
836 template<
unsigned int TDim>
838 TLocalVectorType& rLocalVector,
841 const unsigned int LocalSize = rLocalVector.size();
844 int rotations_needed = 0;
845 const unsigned int NumBlocks = LocalSize / mBlockSize;
848 std::vector< BoundedMatrix<double,TDim,TDim> > rRot(NumBlocks);
849 for(
unsigned int j = 0;
j < NumBlocks; ++
j)
851 if( this->
IsSlip(rGeometry[
j]) )
853 NeedRotation[
j] =
true;
862 if(rotations_needed > 0)
867 for(
unsigned int i=0;
i<NumBlocks;
i++)
869 if(NeedRotation[
i] ==
true)
871 for(
unsigned int j=0;
j<NumBlocks;
j++)
873 if(NeedRotation[
j] ==
true)
875 ReadBlockMatrix<TDim>(mat_block, rLocalMatrix,
i*mBlockSize,
j*mBlockSize);
878 WriteBlockMatrix<TDim>(mat_block, rLocalMatrix,
i*mBlockSize,
j*mBlockSize);
882 ReadBlockMatrix<TDim>(mat_block, rLocalMatrix,
i*mBlockSize,
j*mBlockSize);
884 WriteBlockMatrix<TDim>(
tmp, rLocalMatrix,
i*mBlockSize,
j*mBlockSize);
888 for(
unsigned int k=0;
k<TDim;
k++)
889 aux[
k] = rLocalVector[
i*mBlockSize+
k];
893 for(
unsigned int k=0;
k<TDim;
k++)
894 rLocalVector[
i*mBlockSize+
k] =
aux1[
k];
899 for(
unsigned int j=0;
j<NumBlocks;
j++)
901 if(NeedRotation[
j] ==
true)
903 ReadBlockMatrix<TDim>(mat_block, rLocalMatrix,
i*mBlockSize,
j*mBlockSize);
905 WriteBlockMatrix<TDim>(
tmp, rLocalMatrix,
i*mBlockSize,
j*mBlockSize);
914 template<
unsigned int TBlockSize,
unsigned int TSkip = 0>
924 double aux = rNormal[0]*rNormal[0] + rNormal[1]*rNormal[1];
927 rRot(TSkip ,TSkip ) = rNormal[0]/aux;
928 rRot(TSkip ,TSkip+1) = rNormal[1]/aux;
929 rRot(TSkip+1,TSkip ) = -rNormal[1]/aux;
930 rRot(TSkip+1,TSkip+1) = rNormal[0]/aux;
933 template<
unsigned int TBlockSize,
unsigned int TSkip = 0>
943 double aux = rNormal[0]*rNormal[0] + rNormal[1]*rNormal[1] + rNormal[2]*rNormal[2];
945 rRot(TSkip,TSkip ) = rNormal[0]/aux;
946 rRot(TSkip,TSkip+1) = rNormal[1]/aux;
947 rRot(TSkip,TSkip+2) = rNormal[2]/aux;
955 double dot = rRot(TSkip,TSkip);
959 if ( fabs(dot) > 0.99 )
965 dot = rRot(TSkip,TSkip+1);
969 rT1[0] -= dot*rRot(TSkip,TSkip);
970 rT1[1] -= dot*rRot(TSkip,TSkip+1);
971 rT1[2] -= dot*rRot(TSkip,TSkip+2);
973 rRot(TSkip+1,TSkip ) = rT1[0];
974 rRot(TSkip+1,TSkip+1) = rT1[1];
975 rRot(TSkip+1,TSkip+2) = rT1[2];
978 rRot(TSkip+2,TSkip ) = rRot(TSkip,TSkip+1)*rT1[2] - rRot(TSkip,TSkip+2)*rT1[1];
979 rRot(TSkip+2,TSkip+1) = rRot(TSkip,TSkip+2)*rT1[0] - rRot(TSkip,TSkip )*rT1[2];
980 rRot(TSkip+2,TSkip+2) = rRot(TSkip,TSkip )*rT1[1] - rRot(TSkip,TSkip+1)*rT1[0];
985 return rNode.
Is(mrFlag);
993 template<
class TVectorType >
997 for(
typename TVectorType::iterator iComponent = rThis.begin(); iComponent < rThis.end(); ++iComponent)
998 Norm += (*iComponent)*(*iComponent);
1000 for(
typename TVectorType::iterator iComponent = rThis.begin(); iComponent < rThis.end(); ++iComponent)
1001 *iComponent /=
Norm;
1038 const unsigned int mDomainSize;
1043 const unsigned int mBlockSize;
1126 template<
class TVectorType >
1127 double Dot(
const TVectorType& rV1,
1128 const TVectorType& rV2)
const
1131 for(
typename TVectorType::const_iterator iV1 = rV1.begin(),iV2 = rV2.begin(); iV1 != rV1.end(); ++iV1, ++iV2)
1133 dot += (*iV1) * (*iV2);
1138 inline double VectorNormDerivative(
1139 const double ValueNorm,
1140 const array_1d<double, 3>& rValue,
1141 const array_1d<double, 3>& rValueDerivative)
const
1143 return inner_prod(rValue, rValueDerivative) / ValueNorm;
1146 inline array_1d<double, 3> UnitVectorDerivative(
1147 const double VectorNorm,
1148 const double VectorNormDerivative,
1149 const array_1d<double, 3>& rVector,
1150 const array_1d<double, 3>& rVectorDerivative)
const
1152 return (rVectorDerivative * VectorNorm - rVector * VectorNormDerivative) /
1153 std::pow(VectorNorm, 2);
1193 template<
unsigned int TBlockSize >
1194 void ReadBlockMatrix( BoundedMatrix<double,TBlockSize, TBlockSize>& block,
const Matrix& origin,
const unsigned int Ibegin,
const unsigned int Jbegin)
const
1196 for(
unsigned int i=0;
i<TBlockSize;
i++)
1198 for(
unsigned int j=0;
j<TBlockSize;
j++)
1200 block(
i,
j) = origin(Ibegin+
i, Jbegin+
j);
1205 template<
unsigned int TBlockSize >
1206 void WriteBlockMatrix(
const BoundedMatrix<double,TBlockSize, TBlockSize>& block,
Matrix& destination,
const unsigned int Ibegin,
const unsigned int Jbegin)
const
1208 for(
unsigned int i=0;
i<TBlockSize;
i++)
1210 for(
unsigned int j=0;
j<TBlockSize;
j++)
1212 destination(Ibegin+
i, Jbegin+
j) = block(
i,
j);
1248 template<
class TLocalMatrixType,
class TLocalVectorType,
class TValueType>
1251 TValueType>& rThis) {
1256 template<
class TLocalMatrixType,
class TLocalVectorType,
class TValueType>
1259 TValueType>& rThis) {
1260 rThis.PrintInfo(rOStream);
1261 rOStream << std::endl;
1262 rThis.PrintData(rOStream);
bool Is(Flags const &rOther) const
Definition: flags.h:274
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
Definition: amatrix_interface.h:41
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
TVariableType::Type & FastGetSolutionStepValue(const TVariableType &rThisVariable)
Definition: node.h:435
IndexType Id() const
Definition: node.h:262
bool SolutionStepsDataHas(const VariableData &rThisVariable) const
Definition: node.h:427
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: node.h:466
bool Has(const Variable< TDataType > &rThisVariable) const
Definition: node.h:498
CoordinatesArrayType const & Coordinates() const
Definition: point.h:215
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_DEBUG_ERROR_IF(conditional)
Definition: exception.h:171
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
AMatrix::IdentityMatrix< double > IdentityMatrix
Definition: amatrix_interface.h:564
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
AMatrix::MatrixRow< const TExpressionType > row(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression, std::size_t RowIndex)
Definition: amatrix_interface.h:649
AMatrix::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
list coeff
Definition: bombardelli_test.py:41
tuple tmp
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:98
float aux1
Definition: isotropic_damage_automatic_differentiation.py:239
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
def Norm(vector)
Definition: sand_production_post_process_tool.py:10
integer i
Definition: TensorModule.f:17