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.
dam_uplift_condition_load_process.hpp
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: Lorenzo Gracia
11 //
12 //
13 
14 #if !defined(KRATOS_DAM_UPLIFT_CONDITION_LOAD_PROCESS)
15 #define KRATOS_DAM_UPLIFT_CONDITION_LOAD_PROCESS
16 
17 #include <cmath>
18 
19 // Project includes
20 #include "includes/kratos_flags.h"
22 #include "processes/process.h"
23 
24 // Application include
26 
27 namespace Kratos
28 {
29 
31 {
32 
33  public:
35 
37 
39 
40  struct GaussPoint
41  {
43  double StateVariable;
44  };
45  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
46 
49  ModelPart &rJointModelPart,
50  Parameters &rParameters) : Process(Flags()), mrModelPart(rModelPart), mrJointModelPart(rJointModelPart)
51  {
53 
54  //only include validation with c++11 since raw_literals do not exist in c++03
55  Parameters default_parameters(R"(
56  {
57  "model_part_name":"PLEASE_CHOOSE_MODEL_PART_NAME",
58  "variable_name": "PLEASE_PRESCRIBE_VARIABLE_NAME",
59  "Modify" : true,
60  "joint_group_name" : "PLEASE_CHOOSE_JOINT_GROUP_NAME",
61  "Gravity_Direction" : "Y",
62  "Reservoir_Bottom_Coordinate_in_Gravity_Direction" : 0.0,
63  "Upstream_Coordinate" : [0.0,0.0,0.0],
64  "Downstream_Coordinate" : [0.0,0.0,0.0],
65  "Upstream_Longitudinal_Coordinate" : [0.0,0.0,0.0],
66  "Spe_weight" : 0.0,
67  "Water_level" : 10.0,
68  "Water_Table" : 0,
69  "Drains" : false,
70  "Height_drain" : 0.0,
71  "Distance" : 0.0,
72  "Effectiveness" : 0.0,
73  "interval":[
74  0.0,
75  0.0
76  ]
77  } )");
78 
79  // Some values need to be mandatorily prescribed since no meaningful default value exist. For this reason try accessing to them
80  // So that an error is thrown if they don't exist
81  rParameters["Reservoir_Bottom_Coordinate_in_Gravity_Direction"];
82  rParameters["Upstream_Coordinate"];
83  rParameters["variable_name"];
84  rParameters["model_part_name"];
85 
86  // Now validate agains defaults -- this also ensures no type mismatch
87  rParameters.ValidateAndAssignDefaults(default_parameters);
88 
89  mVariableName = rParameters["variable_name"].GetString();
90  mGravityDirection = rParameters["Gravity_Direction"].GetString();
91  mReferenceCoordinate = rParameters["Reservoir_Bottom_Coordinate_in_Gravity_Direction"].GetDouble();
92  mSpecific = rParameters["Spe_weight"].GetDouble();
93 
94  // Getting the values of the coordinates (reference value)
95  mX0.resize(3, false);
96  mX0[0] = rParameters["Upstream_Coordinate"][0].GetDouble();
97  mX0[1] = rParameters["Upstream_Coordinate"][1].GetDouble();
98  mX0[2] = rParameters["Upstream_Coordinate"][2].GetDouble();
99 
100  mX1.resize(3, false);
101  mX1[0] = rParameters["Downstream_Coordinate"][0].GetDouble();
102  mX1[1] = rParameters["Downstream_Coordinate"][1].GetDouble();
103  mX1[2] = rParameters["Downstream_Coordinate"][2].GetDouble();
104 
105  mX2.resize(3, false);
106  mX2[0] = rParameters["Upstream_Longitudinal_Coordinate"][0].GetDouble();
107  mX2[1] = rParameters["Upstream_Longitudinal_Coordinate"][1].GetDouble();
108  mX2[2] = rParameters["Upstream_Longitudinal_Coordinate"][2].GetDouble();
109 
110  // Drains
111  mDrain = rParameters["Drains"].GetBool();
112  mHeightDrain = rParameters["Height_drain"].GetDouble();
113  mDistanceDrain = rParameters["Distance"].GetDouble();
114  mEffectivenessDrain = rParameters["Effectiveness"].GetDouble();
115  mWaterLevel = rParameters["Water_level"].GetDouble();
116 
117  mTimeUnitConverter = mrModelPart.GetProcessInfo()[TIME_UNIT_CONVERTER];
118  mTableId = rParameters["Water_Table"].GetInt();
119 
120  if (mTableId != 0)
122 
123  KRATOS_CATCH("");
124  }
125 
127 
130 
131  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
132  void Execute() override
133  {
134  }
135 
136  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
137 
138  void ExecuteInitialize() override
139  {
140 
141  KRATOS_TRY;
142 
143  //Defining necessary variables
145  const int nelems = mrJointModelPart.GetMesh(0).Elements().size();
146  const int nnodes = mrModelPart.GetMesh(0).Nodes().size();
147  BoundedMatrix<double, 3, 3> RotationMatrix;
148 
149  // Getting the values of table in case that it exist
150  if (mTableId != 0)
151  {
152  double time = mrModelPart.GetProcessInfo()[TIME];
154  mWaterLevel = mpTable->GetValue(time);
155  }
156 
157  // && mrModelPart.GetProcessInfo()[TIME] >= 1.0
158 
159  // Computing the rotation matrix accoding with the introduced points by the user
160  this->CalculateRotationMatrix(RotationMatrix);
161  array_1d<double, 3> newCoordinate;
162  array_1d<double, 3> auxiliar_vector;
163  array_1d<double, 3> reference_vector;
164 
165  // Gravity direction for computing the hydrostatic pressure
166  int direction;
167 
168  if (mGravityDirection == "X")
169  direction = 0;
170  else if (mGravityDirection == "Y")
171  direction = 1;
172  else
173  direction = 2;
174 
175  // Computing the reference vector (coordinates)
176  reference_vector = prod(RotationMatrix, mX0);
177 
178  // Locate Old Gauss Points in cells
179  GaussPoint MyGaussPoint;
180  GeometryData::IntegrationMethod MyIntegrationMethod;
181  const ProcessInfo& CurrentProcessInfo = mrModelPart.GetProcessInfo();
182  array_1d<double,3> AuxLocalCoordinates;
183 
184  double JointPosition = 0.0;
185  double ref_water_level = mReferenceCoordinate + mWaterLevel;
186 
187  if (nelems != 0)
188  {
189  ModelPart::ElementsContainerType::iterator el_begin = mrJointModelPart.ElementsBegin();
190 
191  for(int j = 0; j < nelems; j++)
192  {
193  ModelPart::ElementsContainerType::iterator it_elem = el_begin + j;
194 
195  Element::GeometryType& rGeom = it_elem->GetGeometry();
196  MyIntegrationMethod = GeometryData::IntegrationMethod::GI_GAUSS_1;
197  const Element::GeometryType::IntegrationPointsArrayType& IntegrationPoints = rGeom.IntegrationPoints(MyIntegrationMethod);
198  unsigned int NumGPoints = IntegrationPoints.size();
199  Vector detJContainer(NumGPoints);
200  rGeom.DeterminantOfJacobian(detJContainer,MyIntegrationMethod);
201  std::vector<double> StateVariableVector(NumGPoints);
202  it_elem->CalculateOnIntegrationPoints(STATE_VARIABLE,StateVariableVector,CurrentProcessInfo);
203 
204  // Loop through GaussPoints
205  for ( unsigned int GPoint = 0; GPoint < NumGPoints; GPoint++ )
206  {
207  // GaussPoint Coordinates
208  AuxLocalCoordinates[0] = IntegrationPoints[GPoint][0];
209  AuxLocalCoordinates[1] = IntegrationPoints[GPoint][1];
210  AuxLocalCoordinates[2] = IntegrationPoints[GPoint][2];
211  rGeom.GlobalCoordinates(MyGaussPoint.Coordinates,AuxLocalCoordinates); //Note: these are the CURRENT global coordinates
212 
213  // GaussPoint StateVariable (1 broken, !=1 not broken)
214  if (StateVariableVector.empty()) MyGaussPoint.StateVariable = 0.0;
215  else MyGaussPoint.StateVariable = StateVariableVector[GPoint];
216 
217  if (MyGaussPoint.StateVariable == 1.0) // Broken part
218  {
219  if (MyGaussPoint.Coordinates[0] > JointPosition)
220  {
221  JointPosition = MyGaussPoint.Coordinates[0];
222  }
223  }
224  }
225  }
226  }
227 
228  KRATOS_WATCH(JointPosition)
229 
230  if (nnodes != 0)
231  {
232 
233  block_for_each(mrModelPart.GetMesh(0).Nodes(), [&](auto& rNode){
234 
235  // Node Global Coordinates
236  noalias(auxiliar_vector) = rNode.Coordinates();
237 
238  newCoordinate = prod(RotationMatrix, auxiliar_vector);
239 
240  double uplift_pressure = 0.0;
241 
242  if (newCoordinate(0) < (reference_vector(0) + JointPosition)) // Broken part
243  {
244  uplift_pressure = mSpecific * (ref_water_level - (rNode.Coordinates()[direction]));
245  }
246  else // Not broken part
247  {
248  if (mDrain == true && JointPosition < (reference_vector(0) + mDistanceDrain)) // If Drain and Joint broken less than the Drain
249  {
250  if (newCoordinate(0) < (reference_vector(0) + mDistanceDrain)) // UpliftPressure before the Drain
251  {
252  uplift_pressure = mSpecific * (ref_water_level - (rNode.Coordinates()[direction])) * (1.0 - 0.8 * ((1.0 / ((reference_vector(0) + mDistanceDrain) - JointPosition)) * (fabs(newCoordinate(0) - JointPosition))));
253  }
254  else // UpliftPressure after the Drain
255  {
256  uplift_pressure = 0.2 * mSpecific * (ref_water_level - (rNode.Coordinates()[direction])) * (1.0 - ((1.0 / (mBaseDam - mDistanceDrain)) * (fabs(newCoordinate(0) - (reference_vector(0) + mDistanceDrain)))));
257  }
258  }
259  else // If Not Drain or Joint broken more than the Drain
260  {
261  uplift_pressure = mSpecific * (ref_water_level - (rNode.Coordinates()[direction])) * (1.0 - ((1.0 / (mBaseDam - (JointPosition - reference_vector(0)))) * (fabs(newCoordinate(0) - JointPosition))));
262  }
263  }
264 
265  if (uplift_pressure < 0.0)
266  {
267  rNode.FastGetSolutionStepValue(var) = 0.0;
268  }
269  else
270  {
271  rNode.FastGetSolutionStepValue(var) = uplift_pressure;
272  }
273  });
274  }
275 
276  KRATOS_CATCH("");
277  }
278 
279  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
280 
282  {
283 
284  KRATOS_TRY;
285 
286  //Defining necessary variables
287  const Variable<double>& var = KratosComponents<Variable<double>>::Get(mVariableName);
288  const int nelems = mrJointModelPart.GetMesh(0).Elements().size();
289  const int nnodes = mrModelPart.GetMesh(0).Nodes().size();
290  BoundedMatrix<double, 3, 3> RotationMatrix;
291 
292  // Getting the values of table in case that it exist
293  if (mTableId != 0)
294  {
295  double time = mrModelPart.GetProcessInfo()[TIME];
296  time = time / mTimeUnitConverter;
297  mWaterLevel = mpTable->GetValue(time);
298  }
299 
300  // && mrModelPart.GetProcessInfo()[TIME] >= 1.0
301 
302  // Computing the rotation matrix accoding with the introduced points by the user
303  this->CalculateRotationMatrix(RotationMatrix);
304  array_1d<double, 3> newCoordinate;
305  array_1d<double, 3> auxiliar_vector;
306  array_1d<double, 3> reference_vector;
307 
308  // Gravity direction for computing the hydrostatic pressure
309  int direction;
310 
311  if (mGravityDirection == "X")
312  direction = 0;
313  else if (mGravityDirection == "Y")
314  direction = 1;
315  else
316  direction = 2;
317 
318  // Computing the reference vector (coordinates)
319  reference_vector = prod(RotationMatrix, mX0);
320 
321  // Locate Old Gauss Points in cells
322  GaussPoint MyGaussPoint;
323  GeometryData::IntegrationMethod MyIntegrationMethod;
324  const ProcessInfo& CurrentProcessInfo = mrModelPart.GetProcessInfo();
325  array_1d<double,3> AuxLocalCoordinates;
326 
327  double JointPosition = 0.0;
328  double ref_water_level = mReferenceCoordinate + mWaterLevel;
329 
330  if (nelems != 0)
331  {
332  ModelPart::ElementsContainerType::iterator el_begin = mrJointModelPart.ElementsBegin();
333 
334  for(int j = 0; j < nelems; j++)
335  {
336  ModelPart::ElementsContainerType::iterator it_elem = el_begin + j;
337 
338  Element::GeometryType& rGeom = it_elem->GetGeometry();
339  MyIntegrationMethod = GeometryData::IntegrationMethod::GI_GAUSS_1;
340  const Element::GeometryType::IntegrationPointsArrayType& IntegrationPoints = rGeom.IntegrationPoints(MyIntegrationMethod);
341  unsigned int NumGPoints = IntegrationPoints.size();
342  Vector detJContainer(NumGPoints);
343  rGeom.DeterminantOfJacobian(detJContainer,MyIntegrationMethod);
344  std::vector<double> StateVariableVector(NumGPoints);
345  it_elem->CalculateOnIntegrationPoints(STATE_VARIABLE,StateVariableVector,CurrentProcessInfo);
346 
347  // Loop through GaussPoints
348  for ( unsigned int GPoint = 0; GPoint < NumGPoints; GPoint++ )
349  {
350  // GaussPoint Coordinates
351  AuxLocalCoordinates[0] = IntegrationPoints[GPoint][0];
352  AuxLocalCoordinates[1] = IntegrationPoints[GPoint][1];
353  AuxLocalCoordinates[2] = IntegrationPoints[GPoint][2];
354  rGeom.GlobalCoordinates(MyGaussPoint.Coordinates,AuxLocalCoordinates); //Note: these are the CURRENT global coordinates
355 
356  // GaussPoint StateVariable (1 broken, !=1 not broken)
357  if (StateVariableVector.empty()) MyGaussPoint.StateVariable = 0.0;
358  else MyGaussPoint.StateVariable = StateVariableVector[GPoint];
359 
360  if (MyGaussPoint.StateVariable == 1.0) // Broken part
361  {
362  if (MyGaussPoint.Coordinates[0] > JointPosition)
363  {
364  JointPosition = MyGaussPoint.Coordinates[0];
365  }
366  }
367  }
368  }
369  }
370 
371  KRATOS_WATCH(JointPosition)
372 
373  if (nnodes != 0)
374  {
375 
376  block_for_each(mrModelPart.GetMesh(0).Nodes(), [&](auto& rNode){
377 
378  // Node Global Coordinates
379  noalias(auxiliar_vector) = rNode.Coordinates();
380 
381  newCoordinate = prod(RotationMatrix, auxiliar_vector);
382 
383  double uplift_pressure = 0.0;
384 
385  if (newCoordinate(0) < (reference_vector(0) + JointPosition)) // Broken part
386  {
387  uplift_pressure = mSpecific * (ref_water_level - (rNode.Coordinates()[direction]));
388  }
389  else // Not broken part
390  {
391  if (mDrain == true && JointPosition < (reference_vector(0) + mDistanceDrain)) // If Drain and Joint broken less than the Drain
392  {
393  if (newCoordinate(0) < (reference_vector(0) + mDistanceDrain)) // UpliftPressure before the Drain
394  {
395  uplift_pressure = mSpecific * (ref_water_level - (rNode.Coordinates()[direction])) * (1.0 - 0.8 * ((1.0 / ((reference_vector(0) + mDistanceDrain) - JointPosition)) * (fabs(newCoordinate(0) - JointPosition))));
396  }
397  else // UpliftPressure after the Drain
398  {
399  uplift_pressure = 0.2 * mSpecific * (ref_water_level - (rNode.Coordinates()[direction])) * (1.0 - ((1.0 / (mBaseDam - mDistanceDrain)) * (fabs(newCoordinate(0) - (reference_vector(0) + mDistanceDrain)))));
400  }
401  }
402  else // If Not Drain or Joint broken more than the Drain
403  {
404  uplift_pressure = mSpecific * (ref_water_level - (rNode.Coordinates()[direction])) * (1.0 - ((1.0 / (mBaseDam - (JointPosition - reference_vector(0)))) * (fabs(newCoordinate(0) - JointPosition))));
405  }
406  }
407 
408  if (uplift_pressure < 0.0)
409  {
410  rNode.FastGetSolutionStepValue(var) = 0.0;
411  }
412  else
413  {
414  rNode.FastGetSolutionStepValue(var) = uplift_pressure;
415  }
416  });
417  }
418 
419  KRATOS_CATCH("");
420  }
421 
423  {
424  KRATOS_TRY;
425 
426  //Unitary vector in uplift direction
427  array_1d<double, 3> V_uplift;
428  V_uplift = (mX1 - mX0);
429  mBaseDam = norm_2(V_uplift);
430  double inv_norm_uplift = 1.0 / norm_2(V_uplift);
431  V_uplift[0] *= inv_norm_uplift;
432  V_uplift[1] *= inv_norm_uplift;
433  V_uplift[2] *= inv_norm_uplift;
434 
435  //Unitary vector in longitudinal direction
436  array_1d<double, 3> V_longitudinal;
437  V_longitudinal = (mX2 - mX0);
438  double inv_norm_longitudinal = 1.0 / norm_2(V_longitudinal);
439  V_longitudinal[0] *= inv_norm_longitudinal;
440  V_longitudinal[1] *= inv_norm_longitudinal;
441  V_longitudinal[2] *= inv_norm_longitudinal;
442 
443  //Unitary vector in local z direction
444  array_1d<double, 3> V_normal;
445  MathUtils<double>::CrossProduct(V_normal, V_uplift, V_longitudinal);
446 
447  //Rotation Matrix
448  rRotationMatrix(0, 0) = V_uplift[0];
449  rRotationMatrix(0, 1) = V_uplift[1];
450  rRotationMatrix(0, 2) = V_uplift[2];
451 
452  rRotationMatrix(1, 0) = V_longitudinal[0];
453  rRotationMatrix(1, 1) = V_longitudinal[1];
454  rRotationMatrix(1, 2) = V_longitudinal[2];
455 
456  rRotationMatrix(2, 0) = V_normal[0];
457  rRotationMatrix(2, 1) = V_normal[1];
458  rRotationMatrix(2, 2) = V_normal[2];
459 
460  KRATOS_CATCH("")
461  }
462 
464  std::string Info() const override
465  {
466  return "DamUpliftConditionLoadProcess";
467  }
468 
470  void PrintInfo(std::ostream &rOStream) const override
471  {
472  rOStream << "DamUpliftConditionLoadProcess";
473  }
474 
476  void PrintData(std::ostream &rOStream) const override
477  {
478  }
479 
481 
482  protected:
484 
487  std::string mVariableName;
488  std::string mGravityDirection;
490  double mSpecific;
491  double mBaseDam;
492  double mWaterLevel;
493  bool mDrain;
494  double mHeightDrain;
501  TableType::Pointer mpTable;
502  int mTableId;
503 
504  //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
505 
506  private:
509 
510 }; //Class
511 
513 inline std::istream &operator>>(std::istream &rIStream,
515 
517 inline std::ostream &operator<<(std::ostream &rOStream,
518  const DamUpliftConditionLoadProcess &rThis)
519 {
520  rThis.PrintInfo(rOStream);
521  rOStream << std::endl;
522  rThis.PrintData(rOStream);
523 
524  return rOStream;
525 }
526 
527 } /* namespace Kratos.*/
528 
529 #endif /* KRATOS_DAM_UPLIFT_CONDITION_LOAD_PROCESS defined */
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: dam_uplift_condition_load_process.hpp:31
std::string mGravityDirection
Definition: dam_uplift_condition_load_process.hpp:488
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: dam_uplift_condition_load_process.hpp:470
double mDistanceDrain
Definition: dam_uplift_condition_load_process.hpp:495
Vector mX1
Definition: dam_uplift_condition_load_process.hpp:498
double mSpecific
Definition: dam_uplift_condition_load_process.hpp:490
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: dam_uplift_condition_load_process.hpp:132
void CalculateRotationMatrix(BoundedMatrix< double, 3, 3 > &rRotationMatrix)
Definition: dam_uplift_condition_load_process.hpp:422
double mEffectivenessDrain
Definition: dam_uplift_condition_load_process.hpp:496
bool mDrain
Definition: dam_uplift_condition_load_process.hpp:493
virtual ~DamUpliftConditionLoadProcess()
Destructor.
Definition: dam_uplift_condition_load_process.hpp:129
std::string Info() const override
Turn back information as a string.
Definition: dam_uplift_condition_load_process.hpp:464
ModelPart & mrJointModelPart
Definition: dam_uplift_condition_load_process.hpp:486
KRATOS_CLASS_POINTER_DEFINITION(DamUpliftConditionLoadProcess)
TableType::Pointer mpTable
Definition: dam_uplift_condition_load_process.hpp:501
int mTableId
Definition: dam_uplift_condition_load_process.hpp:502
void ExecuteInitialize() override
This function is designed for being called at the beginning of the computations right after reading t...
Definition: dam_uplift_condition_load_process.hpp:138
void ExecuteInitializeSolutionStep() override
This function will be executed at every time step BEFORE performing the solve phase.
Definition: dam_uplift_condition_load_process.hpp:281
Vector mX0
Definition: dam_uplift_condition_load_process.hpp:497
double mTimeUnitConverter
Definition: dam_uplift_condition_load_process.hpp:500
double mBaseDam
Definition: dam_uplift_condition_load_process.hpp:491
ModelPart & mrModelPart
Member Variables.
Definition: dam_uplift_condition_load_process.hpp:485
double mHeightDrain
Definition: dam_uplift_condition_load_process.hpp:494
double mReferenceCoordinate
Definition: dam_uplift_condition_load_process.hpp:489
Table< double, double > TableType
Definition: dam_uplift_condition_load_process.hpp:36
Vector mX2
Definition: dam_uplift_condition_load_process.hpp:499
DamUpliftConditionLoadProcess(ModelPart &rModelPart, ModelPart &rJointModelPart, Parameters &rParameters)
Constructor.
Definition: dam_uplift_condition_load_process.hpp:48
std::string mVariableName
Definition: dam_uplift_condition_load_process.hpp:487
double mWaterLevel
Definition: dam_uplift_condition_load_process.hpp:492
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: dam_uplift_condition_load_process.hpp:476
Definition: flags.h:58
IntegrationMethod
Definition: geometry_data.h:76
Geometry base class.
Definition: geometry.h:71
virtual CoordinatesArrayType & GlobalCoordinates(CoordinatesArrayType &rResult, CoordinatesArrayType const &LocalCoordinates) const
Definition: geometry.h:2377
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
Vector & DeterminantOfJacobian(Vector &rResult) const
Definition: geometry.h:3154
const IntegrationPointsArrayType & IntegrationPoints() const
Definition: geometry.h:2284
Definition: amatrix_interface.h:41
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
NodesContainerType & Nodes()
Definition: mesh.h:346
ElementsContainerType & Elements()
Definition: mesh.h:568
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
TableType::Pointer pGetTable(IndexType TableId)
Definition: model_part.h:595
MeshType & GetMesh(IndexType ThisIndex=0)
Definition: model_part.h:1791
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
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
std::string GetString() const
This method returns the string contained in the current Parameter.
Definition: kratos_parameters.cpp:684
bool GetBool() const
This method returns the boolean contained in the current Parameter.
Definition: kratos_parameters.cpp:675
size_type size() const
Returns the number of elements in the container.
Definition: pointer_vector_set.h:502
The base class for all processes in Kratos.
Definition: process.h:49
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Definition: table.h:435
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_WATCH(variable)
Definition: define.h:806
#define KRATOS_TRY
Definition: define.h:109
void CalculateRotationMatrix(const double Theta, MatrixType &rMatrix, const DenseVector< double > &rAxisOfRotationVector, const DenseVector< double > &rCenterOfRotation)
Calculate the transformation matrix which rotates the given vector around mAxisOfRotationVector and m...
Definition: geometrical_transformation_utilities.cpp:41
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
void block_for_each(TIterator itBegin, TIterator itEnd, TFunction &&rFunction)
Execute a functor on all items of a range in parallel.
Definition: parallel_utilities.h:299
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
std::ostream & operator<<(std::ostream &rOStream, const DamUpliftConditionLoadProcess &rThis)
output stream function
Definition: dam_uplift_condition_load_process.hpp:517
std::istream & operator>>(std::istream &rIStream, DamUpliftConditionLoadProcess &rThis)
input stream function
def CrossProduct(A, B)
Definition: define_wake_process_3d.py:13
time
Definition: face_heat.py:85
int j
Definition: quadrature.py:648
int nnodes
Definition: sensitivityMatrix.py:24
Structs for mapping model parts ---------------------------------------------------------------------...
Definition: dam_uplift_condition_load_process.hpp:41
double StateVariable
Definition: dam_uplift_condition_load_process.hpp:43
array_1d< double, 3 > Coordinates
Definition: dam_uplift_condition_load_process.hpp:42