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.
cylinder_bounding_box.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosContactMechanicsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: July 2016 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_CYLINDER_BOUNDING_BOX_H_INCLUDED )
11 #define KRATOS_CYLINDER_BOUNDING_BOX_H_INCLUDED
12 
13 // External includes
14 
15 // System includes
16 
17 // Project includes
20 
21 namespace Kratos
22 {
23 
26 
30 
34 
38 
42 
44 
55  : public SpatialBoundingBox
56 {
57 public:
60 
63 
64  //typedef BoundedVector<double, 3> PointType;
68  typedef NodesContainerType::Pointer NodesContainerTypePointer;
72 
76 
79  {
81 
82  std::cout<< "Calling Cylinder Wall BBX empty constructor" <<std::endl;
83 
84  KRATOS_CATCH("")
85  }
86 
87 
88  //**************************************************************************
89  //**************************************************************************
90 
91  CylinderBoundingBox(Parameters CustomParameters)
92  {
93 
95 
96  Parameters DefaultParameters( R"(
97  {
98  "parameters_list":[{
99  "first_center": [0.0, 0.0, 0.0],
100  "second_center": [0.0, 0.0, 0.0],
101  "radius": 0.0,
102  "convexity": 1
103  }],
104  "velocity": [0.0, 0.0, 0.0]
105 
106  } )" );
107 
108 
109  //validate against defaults -- this also ensures no type mismatch
110  CustomParameters.ValidateAndAssignDefaults(DefaultParameters);
111 
112  if(CustomParameters["parameters_list"].IsArray() == true && CustomParameters["parameters_list"].size() != 1)
113  {
114  KRATOS_THROW_ERROR(std::runtime_error,"paramters_list for the Cylinder BBX must contain only one term",CustomParameters.PrettyPrintJsonString());
115  }
116 
117  mBox.Initialize();
118 
119  Parameters BoxParameters = CustomParameters["parameters_list"][0];
120 
121  mFirstCenter[0] = BoxParameters["first_center"][0].GetDouble();
122  mFirstCenter[1] = BoxParameters["first_center"][1].GetDouble();
123  mFirstCenter[2] = BoxParameters["first_center"][2].GetDouble();
124 
125  mSecondCenter[0] = BoxParameters["second_center"][0].GetDouble();
126  mSecondCenter[1] = BoxParameters["second_center"][1].GetDouble();
127  mSecondCenter[2] = BoxParameters["second_center"][2].GetDouble();
128 
130 
131  mBox.Radius = BoxParameters["radius"].GetDouble();
132 
133  mBox.Velocity[0] = CustomParameters["velocity"][0].GetDouble();
134  mBox.Velocity[1] = CustomParameters["velocity"][1].GetDouble();
135  mBox.Velocity[2] = CustomParameters["velocity"][2].GetDouble();
136 
137  mBox.Convexity = BoxParameters["convexity"].GetInt();
138 
139  PointType Side;
140  Side[0] = mBox.Radius;
141  Side[1] = mBox.Radius;
142  Side[2] = mBox.Radius;
143 
144  mBox.UpperPoint = mBox.Center + Side;
145  mBox.LowerPoint = mSecondCenter - Side;
146 
148 
149  mRigidBodyCenterSupplied = false;
150 
151  KRATOS_CATCH("")
152  }
153 
154 
155  //**************************************************************************
156  //**************************************************************************
157 
158 
159  // General Wall constructor
161  PointType SecondCenter,
162  double Radius,
163  PointType Velocity,
164  int Convexity)
165 
166  {
167  KRATOS_TRY
168 
169  std::cout<<" [--CYLINDER WALL--] "<<std::endl;
170 
171  mFirstCenter = FirstCenter;
172  mSecondCenter = SecondCenter;
173 
174  mBox.Center = 0.5 * (FirstCenter+SecondCenter);
175  mBox.Radius = Radius;
176  mBox.Convexity = Convexity;
177 
178  std::cout<<" [Convexity:"<<mBox.Convexity<<std::endl;
179  std::cout<<" [Radius:"<<mBox.Radius<<std::endl;
180  std::cout<<" [Center1:"<<mFirstCenter<<std::endl;
181  std::cout<<" [Center2:"<<mSecondCenter<<std::endl;
182  std::cout<<" [--------] "<<std::endl;
183 
184  mBox.Velocity = Velocity;
185 
187 
188  mRigidBodyCenterSupplied = false;
189 
190  KRATOS_CATCH("")
191  }
192 
193  //**************************************************************************
194  //**************************************************************************
195 
198  {
199  KRATOS_TRY
200 
202 
203  mFirstCenter = rOther.mFirstCenter;
204  mSecondCenter = rOther.mSecondCenter;
205 
206  return *this;
207 
208  KRATOS_CATCH("")
209  }
210 
211  //**************************************************************************
212  //**************************************************************************
213 
216  :SpatialBoundingBox(rOther)
217  ,mFirstCenter(rOther.mFirstCenter)
219  {
220  }
221 
222 
223  //**************************************************************************
224  //**************************************************************************
225 
227  virtual ~CylinderBoundingBox() {};
228 
229 
233 
234 
238 
239 
240  //************************************************************************************
241  //************************************************************************************
242 
243  bool IsInside (const PointType& rPoint, double& rCurrentTime, double Radius = 0) override
244  {
245 
246  KRATOS_TRY
247 
248  bool is_inside = false;
249 
250  double CylinderRadius = mBox.Radius;
251 
252  //outside
253  if( mBox.Convexity == 1)
254  CylinderRadius *= 1.25; //increase the bounding box
255 
256  //inside
257  if( mBox.Convexity == -1)
258  CylinderRadius *= 0.75; //decrease the bounding box
259 
260  is_inside = ContactSearch(rPoint, CylinderRadius);
261 
262  return is_inside;
263 
264  KRATOS_CATCH("")
265  }
266 
267 
268  //************************************************************************************
269  //************************************************************************************
270 
271  bool IsInside(BoundingBoxParameters& rValues, const ProcessInfo& rCurrentProcessInfo) override
272  {
273  KRATOS_TRY
274 
275  bool is_inside = false;
276 
277  rValues.SetContactFace(2);
278 
279  is_inside = ContactSearch(rValues, rCurrentProcessInfo);
280 
281  return is_inside;
282 
283  KRATOS_CATCH("")
284  }
285 
286 
287 
288  //************************************************************************************
289  //************************************************************************************
290 
291  //Cylinder
292  void CreateBoundingBoxBoundaryMesh(ModelPart& rModelPart, int linear_partitions = 4, int angular_partitions = 4 ) override
293  {
294  KRATOS_TRY
295 
296  //std::cout<<" Create Cylinder Mesh "<<std::endl;
297 
298  //1.-create generatrix
300  double AxisLength = norm_2(Axis);
301 
302  if( AxisLength )
303  Axis/=AxisLength;
304 
305 
306  unsigned int NodeId = 0;
307  if( rModelPart.IsSubModelPart() )
308  NodeId = this->GetMaxNodeId( rModelPart.GetParentModelPart());
309  else
310  NodeId = this->GetMaxNodeId( rModelPart );
311 
312  unsigned int InitialNodeId = NodeId;
313 
314  //get boundary model parts ( temporary implementation )
315  std::vector<std::string> BoundaryModelPartsName;
316 
317  ModelPart* pMainModelPart = &rModelPart;
318  if( rModelPart.IsSubModelPart() )
319  pMainModelPart = &rModelPart.GetParentModelPart();
320 
321  for(ModelPart::SubModelPartIterator i_mp= pMainModelPart->SubModelPartsBegin() ; i_mp!=pMainModelPart->SubModelPartsEnd(); i_mp++)
322  {
323  if( i_mp->Is(BOUNDARY) || i_mp->Is(ACTIVE) ){
324  for(ModelPart::NodesContainerType::iterator i_node = i_mp->NodesBegin() ; i_node != i_mp->NodesEnd() ; ++i_node)
325  {
326  if( i_node->Id() == rModelPart.Nodes().front().Id() ){
327  BoundaryModelPartsName.push_back(i_mp->Name());
328  break;
329  }
330  }
331  }
332  }
333  //get boundary model parts ( temporary implementation )
334 
335 
336  double SingleLength = AxisLength / (double)linear_partitions;
337 
338  PointType Point(3);
339 
340  // Create Axis generatrix
341  // for(int i=0; i<linear_partitions; i++)
342  // {
343  // Point = mFirstCenter + Axis * ( SingleLength );
344  // NodeId += 1;
345  // NodeType::Pointer pNode = this->CreateNode(rModelPart, BasePoint, NodeId);
346 
347  // pNode->Set(RIGID,true);
348  // rModelPart.AddNode( pNode );
349  // }
350 
351 
352  PointType DirectionX(3);
353  noalias(DirectionX) = Axis;
354  PointType DirectionY(3);
355  noalias(DirectionY) = ZeroVector(3);
356  PointType DirectionZ(3);
357  noalias(DirectionZ) = ZeroVector(3);
358 
359  this->CalculateOrthonormalBase(DirectionX, DirectionY, DirectionZ);
360 
361  PointType BasePoint(3);
362  PointType RotationAxis(3);
363  PointType RotatedDirectionY(3);
364 
365  double alpha = 0;
367 
368  for(int i=0; i<linear_partitions; i++)
369  {
370  Point = mFirstCenter + Axis * ( SingleLength ) * i /(double)linear_partitions;
371 
372  for(int k=0; k<angular_partitions; k++)
373  {
374  alpha = (2.0 * 3.14159262 * k)/(double)angular_partitions;
375 
376  //vector of rotation
377  RotationAxis = DirectionX * alpha;
379 
380  RotatedDirectionY = DirectionY;
381 
382  Quaternion.RotateVector3(RotatedDirectionY);
383 
384  // std::cout<<" alpha "<<alpha<<" cos "<<Q(1,1)<<std::endl;
385  //std::cout<<" Rotated "<<RotatedDirectionY<<" alpha "<<alpha<<std::endl;
386 
387  //add the angular_partitions points number along the circular base of the cylinder
388  NodeId += 1;
389  noalias(BasePoint) = Point + mBox.Radius * RotatedDirectionY;
390 
391  //std::cout<<" BasePoint["<<NodeId<<"] "<<BasePoint<<" radius "<<mBox.Radius<<std::endl;
392 
393  NodeType::Pointer pNode = this->CreateNode(rModelPart, BasePoint, NodeId);
394 
395  pNode->Set(RIGID,true);
396  rModelPart.AddNode( pNode );
397 
398  //get boundary model parts ( temporary implementation )
399  for(unsigned int j=0; j<BoundaryModelPartsName.size(); j++)
400  (pMainModelPart->GetSubModelPart(BoundaryModelPartsName[j])).AddNode( pNode );
401  //get boundary model parts ( temporary implementation )
402 
403  }
404  }
405 
406  //std::cout<<" Create Cylinder Mesh NODES "<<std::endl;
407 
408  this->CreateQuadrilateralBoundaryMesh(rModelPart, InitialNodeId, angular_partitions);
409 
410  KRATOS_CATCH( "" )
411  }
412 
413 
414 
418 
419 
420 
424 
425 
429 
431  std::string Info() const override
432  {
433  return "CylinderBoundingBox";
434  }
435 
437  void PrintInfo(std::ostream& rOStream) const override
438  {
439  rOStream << Info();
440  }
441 
443  void PrintData(std::ostream& rOStream) const override
444  {
445  rOStream << this->mBox.UpperPoint << " , " << this->mBox.LowerPoint;
446  }
447 
451 
452 
454 
455 protected:
458 
459  PointType mFirstCenter;
461 
465 
466 
470 
471 
475 
476 
477 
478 
479  //************************************************************************************
480  //************************************************************************************
481 
482 
483  bool ContactSearch(const PointType& rPoint, const double& rRadius)
484  {
485 
486  KRATOS_TRY
487 
488  //1.-compute point projection
490  if( norm_2(Axis) )
491  Axis/=norm_2(Axis);
492 
493  PointType Projection(3);
494  Projection = inner_prod( (rPoint-mFirstCenter), Axis) * Axis;
495 
496  //2.-compute gap
497  double GapNormal = norm_2(rPoint-Projection)-rRadius;
498 
499  GapNormal *= mBox.Convexity;
500 
501  if(GapNormal<0)
502  return true;
503  else
504  return false;
505 
506 
507  KRATOS_CATCH( "" )
508 
509  }
510 
511 
512  //************************************************************************************
513  //************************************************************************************
514 
515  //Cylinder (note: box position has been updated previously)
516  bool ContactSearch(BoundingBoxParameters& rValues, const ProcessInfo& rCurrentProcessInfo)
517  {
518  KRATOS_TRY
519 
520  const PointType& rPoint = rValues.GetPoint();
521  PointType& rNormal = rValues.GetNormal();
522  PointType& rTangent = rValues.GetTangent();
523 
524  double& rGapNormal = rValues.GetGapNormal();
525 
526  rNormal = ZeroVector(3);
527  rTangent = ZeroVector(3);
528 
529  //1.-compute point projection
531  if( norm_2(Axis) )
532  Axis/=norm_2(Axis);
533 
534  PointType Projection(3);
535  Projection = inner_prod( (rPoint-mFirstCenter), Axis) * Axis;
536 
537 
538  //2.-compute contact normal
539  rNormal = rPoint-Projection;
540 
541  if(norm_2(rNormal))
542  rNormal /= norm_2(rNormal);
543 
544  rNormal *= mBox.Convexity;
545 
546  //3.-compute gap
547  rGapNormal = norm_2(rPoint-Projection)-mBox.Radius;
548 
549  rGapNormal *= mBox.Convexity;
550 
551  this->ComputeContactTangent(rValues,rCurrentProcessInfo);
552 
553  if(rGapNormal<0)
554  return true;
555  else
556  return false;
557 
558  KRATOS_CATCH( "" )
559  }
560 
561 
562  //************************************************************************************
563  //************************************************************************************
564 
565  void CreateQuadrilateralBoundaryMesh(ModelPart& rModelPart, const unsigned int& rInitialNodeId, const unsigned int& angular_partitions )
566  {
567 
568  KRATOS_TRY
569 
570  //std::cout<<" Create Cylinder Mesh ELEMENTS "<<std::endl;
571 
572  //add elements to computing model part: (in order to be written)
573  ModelPart* pComputingModelPart = NULL;
574  if( rModelPart.IsSubModelPart() )
575  for(ModelPart::SubModelPartIterator i_mp= rModelPart.GetParentModelPart().SubModelPartsBegin() ; i_mp!=rModelPart.GetParentModelPart().SubModelPartsEnd(); i_mp++)
576  {
577  if( i_mp->Is(ACTIVE) ) //computing_domain
578  pComputingModelPart = &rModelPart.GetParentModelPart().GetSubModelPart(i_mp->Name());
579  }
580  else{
581  for(ModelPart::SubModelPartIterator i_mp= rModelPart.SubModelPartsBegin() ; i_mp!=rModelPart.SubModelPartsEnd(); i_mp++)
582  {
583  if( i_mp->Is(ACTIVE) ) //computing_domain
584  pComputingModelPart = &rModelPart.GetSubModelPart(i_mp->Name());
585  }
586  }
587 
588  // Create surface of the cylinder/tube with quadrilateral shell conditions
589  unsigned int ElementId = 0;
590  if( rModelPart.IsSubModelPart() )
591  ElementId = this->GetMaxElementId( rModelPart.GetParentModelPart());
592  else
593  ElementId = this->GetMaxElementId( rModelPart );
594 
595 
596  unsigned int NodeId = 0;
597  if( rModelPart.IsSubModelPart() )
598  NodeId = this->GetMaxNodeId( rModelPart.GetParentModelPart());
599  else
600  NodeId = this->GetMaxNodeId( rModelPart );
601 
602 
603  //GEOMETRY:
604  GeometryType::Pointer pFace;
605  ElementType::Pointer pElement;
606 
607  //PROPERTIES:
608  int number_of_properties = rModelPart.NumberOfProperties();
609  Properties::Pointer pProperties = Kratos::make_shared<Properties>(number_of_properties);
610 
611  unsigned int local_counter = 1;
612  unsigned int counter = 0;
613  unsigned int Id = rInitialNodeId;
614 
615  Vector FaceNodesIds = ZeroVector(4);
616 
617  while(Id < NodeId){
618 
619  counter += 1;
620  ElementId += 1;
621 
622  if( local_counter < angular_partitions ){
623 
624  FaceNodesIds[0] = rInitialNodeId + counter ;
625  FaceNodesIds[1] = rInitialNodeId + counter + 1;
626  FaceNodesIds[2] = rInitialNodeId + counter + angular_partitions + 1;
627  FaceNodesIds[3] = rInitialNodeId + counter + angular_partitions;
628 
629  //std::cout<<" ElementA "<<FaceNodesIds<<std::endl;
630 
632  FaceNodes.reserve(4);
633 
634  //NOTE: when creating a PointsArrayType
635  //important ask for pGetNode, if you ask for GetNode a copy is created
636  //if a copy is created a segmentation fault occurs when the node destructor is called
637 
638  for(unsigned int j=0; j<4; j++)
639  FaceNodes.push_back(rModelPart.pGetNode(FaceNodesIds[j]));
640 
641  pFace = Kratos::make_shared<Quadrilateral3D4<NodeType> >(FaceNodes);
642  pElement = Kratos::make_intrusive<Element>(ElementId, pFace, pProperties);
643 
644  rModelPart.AddElement(pElement);
645  pElement->Set(ACTIVE,false);
646  pComputingModelPart->AddElement(pElement);
647 
648  local_counter++;
649 
650  }
651  else if( local_counter == angular_partitions ){
652 
653  FaceNodesIds[0] = rInitialNodeId + counter ;
654  FaceNodesIds[1] = rInitialNodeId + counter + 1 - angular_partitions;
655  FaceNodesIds[2] = rInitialNodeId + counter + 1;
656  FaceNodesIds[3] = rInitialNodeId + counter + angular_partitions;
657 
658  //std::cout<<" ElementB "<<FaceNodesIds<<std::endl;
659 
661  FaceNodes.reserve(4);
662 
663  for(unsigned int j=0; j<4; j++)
664  FaceNodes.push_back(rModelPart.pGetNode(FaceNodesIds[j]));
665 
666  pFace = Kratos::make_shared<Quadrilateral3D4<NodeType> >(FaceNodes);
667  pElement = Kratos::make_intrusive<Element>(ElementId, pFace, pProperties);
668 
669  rModelPart.AddElement(pElement);
670  pElement->Set(ACTIVE,false);
671  pComputingModelPart->AddElement(pElement);
672 
673  local_counter = 1;
674  }
675 
676  Id = rInitialNodeId + counter + angular_partitions;
677  }
678 
679 
680  //std::cout<<" Create Cylinder Mesh ELEMENTS CREATED "<<std::endl;
681 
682  KRATOS_CATCH( "" )
683 
684  }
685 
686 
690 
691 
695 
696 
700 
701 
703 
704 private:
707 
708 
712 
713 
717 
718 
722 
723 
727 
728 
732 
733 
737 
738 
740 
741 
742 }; // Class CylinderBoundingBox
743 
745 
748 
749 
753 
755 
756 
757 } // namespace Kratos.
758 
759 #endif // KRATOS_CYLINDER_BOUNDING_BOX_H_INCLUDED defined
Short class definition.
Definition: cylinder_bounding_box.hpp:56
NodesContainerType::Pointer NodesContainerTypePointer
Definition: cylinder_bounding_box.hpp:68
std::string Info() const override
Turn back information as a string.
Definition: cylinder_bounding_box.hpp:431
CylinderBoundingBox(CylinderBoundingBox const &rOther)
Copy constructor.
Definition: cylinder_bounding_box.hpp:215
CylinderBoundingBox()
Default constructor.
Definition: cylinder_bounding_box.hpp:78
PointType mSecondCenter
Definition: cylinder_bounding_box.hpp:460
bool IsInside(const PointType &rPoint, double &rCurrentTime, double Radius=0) override
Definition: cylinder_bounding_box.hpp:243
ElementType::GeometryType GeometryType
Definition: cylinder_bounding_box.hpp:71
CylinderBoundingBox(Parameters CustomParameters)
Definition: cylinder_bounding_box.hpp:91
CylinderBoundingBox(PointType FirstCenter, PointType SecondCenter, double Radius, PointType Velocity, int Convexity)
Definition: cylinder_bounding_box.hpp:160
Quaternion< double > QuaternionType
Definition: cylinder_bounding_box.hpp:69
CylinderBoundingBox & operator=(CylinderBoundingBox const &rOther)
Assignment operator.
Definition: cylinder_bounding_box.hpp:197
ModelPart::ElementType ElementType
Definition: cylinder_bounding_box.hpp:70
array_1d< double, 3 > PointType
Definition: cylinder_bounding_box.hpp:65
bool ContactSearch(BoundingBoxParameters &rValues, const ProcessInfo &rCurrentProcessInfo)
Definition: cylinder_bounding_box.hpp:516
KRATOS_CLASS_POINTER_DEFINITION(CylinderBoundingBox)
Pointer definition of CylinderBoundingBox.
ModelPart::NodesContainerType NodesContainerType
Definition: cylinder_bounding_box.hpp:67
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: cylinder_bounding_box.hpp:437
void CreateBoundingBoxBoundaryMesh(ModelPart &rModelPart, int linear_partitions=4, int angular_partitions=4) override
Definition: cylinder_bounding_box.hpp:292
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: cylinder_bounding_box.hpp:443
PointType mFirstCenter
Definition: cylinder_bounding_box.hpp:459
ModelPart::NodeType NodeType
Definition: cylinder_bounding_box.hpp:66
bool IsInside(BoundingBoxParameters &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: cylinder_bounding_box.hpp:271
virtual ~CylinderBoundingBox()
Destructor.
Definition: cylinder_bounding_box.hpp:227
void CreateQuadrilateralBoundaryMesh(ModelPart &rModelPart, const unsigned int &rInitialNodeId, const unsigned int &angular_partitions)
Definition: cylinder_bounding_box.hpp:565
bool ContactSearch(const PointType &rPoint, const double &rRadius)
Definition: cylinder_bounding_box.hpp:483
Base class for all Elements.
Definition: element.h:60
Geometry base class.
Definition: geometry.h:71
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
SubModelPartIterator SubModelPartsEnd()
Definition: model_part.h:1708
SubModelPartIterator SubModelPartsBegin()
Definition: model_part.h:1698
void AddNode(NodeType::Pointer pNewNode, IndexType ThisIndex=0)
Definition: model_part.cpp:211
SizeType NumberOfProperties(IndexType ThisIndex=0) const
Returns the number of properties of the mesh.
Definition: model_part.cpp:575
bool IsSubModelPart() const
Definition: model_part.h:1893
SubModelPartsContainerType::iterator SubModelPartIterator
Iterator over the sub model parts of this model part.
Definition: model_part.h:258
NodeType::Pointer pGetNode(IndexType NodeId, IndexType ThisIndex=0)
Definition: model_part.h:421
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
ModelPart & GetSubModelPart(std::string const &SubModelPartName)
Definition: model_part.cpp:2029
void AddElement(ElementType::Pointer pNewElement, IndexType ThisIndex=0)
Definition: model_part.cpp:917
ModelPart & GetParentModelPart()
Definition: model_part.cpp:2124
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
double GetDouble() const
This method returns the double contained in the current Parameter.
Definition: kratos_parameters.cpp:657
const std::string PrettyPrintJsonString() const
This method returns a string with the corresponding text to the equivalent *.json file (this version ...
Definition: kratos_parameters.cpp:415
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
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
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
void RotateVector3(const TVector3_A &a, TVector3_B &b) const
Definition: quaternion.h:325
static Quaternion FromRotationVector(double rx, double ry, double rz)
Definition: quaternion.h:427
Short class definition.
Definition: spatial_bounding_box.hpp:48
bool mRigidBodyCenterSupplied
Definition: spatial_bounding_box.hpp:1150
void CalculateOrthonormalBase(PointType &rDirectionVectorX, PointType &rDirectionVectorY, PointType &rDirectionVectorZ)
Definition: spatial_bounding_box.hpp:1408
void ComputeContactTangent(BoundingBoxParameters &rValues, const ProcessInfo &rCurrentProcessInfo)
Definition: spatial_bounding_box.hpp:1274
NodeType::Pointer CreateNode(ModelPart &rModelPart, PointType &rPoint, const unsigned int &rNodeId)
Definition: spatial_bounding_box.hpp:1357
static unsigned int GetMaxNodeId(ModelPart &rModelPart)
Definition: spatial_bounding_box.hpp:1314
static unsigned int GetMaxElementId(ModelPart &rModelPart)
Definition: spatial_bounding_box.hpp:1334
BoundingBoxVariables mBox
Definition: spatial_bounding_box.hpp:1152
virtual SpatialBoundingBox & operator=(SpatialBoundingBox const &rOther)
Assignment operator.
Definition: spatial_bounding_box.hpp:540
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182
alpha
Definition: generate_convection_diffusion_explicit_element.py:113
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
int counter
Definition: script_THERMAL_CORRECT.py:218
integer i
Definition: TensorModule.f:17
Definition: spatial_bounding_box.hpp:61
void SetContactFace(int ContactFace)
Definition: spatial_bounding_box.hpp:178
PointType & GetTangent()
Definition: spatial_bounding_box.hpp:189
double & GetGapNormal()
Definition: spatial_bounding_box.hpp:193
const PointType & GetPoint()
Definition: spatial_bounding_box.hpp:181
PointType & GetNormal()
Definition: spatial_bounding_box.hpp:188
int Convexity
Definition: spatial_bounding_box.hpp:210
PointType Velocity
Definition: spatial_bounding_box.hpp:221
PointType LowerPoint
Definition: spatial_bounding_box.hpp:218
double Radius
Definition: spatial_bounding_box.hpp:211
void Initialize()
Definition: spatial_bounding_box.hpp:229
PointType Center
Definition: spatial_bounding_box.hpp:219
PointType UpperPoint
Definition: spatial_bounding_box.hpp:217
void SetInitialValues()
Definition: spatial_bounding_box.hpp:253