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.
assign_scalar_field_to_pfem_entities_process.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosPfemFluidDynamicsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: August 2016 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_ASSIGN_SCALAR_FIELD_TO_PFEM_ENTITIES_PROCESS_H_INCLUDED)
11 #define KRATOS_ASSIGN_SCALAR_FIELD_TO_PFEM_ENTITIES_PROCESS_H_INCLUDED
12 
13 
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
21 
22 namespace Kratos
23 {
24 
27 
29 
32 {
33 public:
36 
39 
41 
46  pybind11::object& pPyObject,
47  const std::string& pPyMethodName,
48  const bool SpatialFieldFunction,
49  Parameters rParameters
50  ) : BaseType(rModelPart), mPyObject(pPyObject), mPyMethodName(pPyMethodName), mIsSpatialField(SpatialFieldFunction)
51  {
53 
54  Parameters default_parameters( R"(
55  {
56  "model_part_name":"MODEL_PART_NAME",
57  "variable_name": "VARIABLE_NAME",
58  "entity_type": "NODES",
59  "local_axes" : {},
60  "compound_assignment": "direct"
61  } )" );
62 
63 
64  // Validate against defaults -- this ensures no type mismatch
65  rParameters.ValidateAndAssignDefaults(default_parameters);
66 
67  this->mvariable_name = rParameters["variable_name"].GetString();
68 
69  // Admissible values for local axes, are "empty" or
70  //"local_axes" :{
71  // "origin" : [0.0, 0.0, 0.0]
72  // "axes" : [ [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0] ]
73  // }
74 
75  mHasLocalOrigin = false;
76  if( rParameters["local_axes"].Has("origin") ){
77  mHasLocalOrigin = true;
78  mLocalOrigin.resize(3,false);
80  for( unsigned int i=0; i<3; i++)
81  mLocalOrigin[i] = rParameters["local_axes"]["origin"][i].GetDouble();
82  }
83 
84  mHasLocalAxes = false;
85  if( rParameters["local_axes"].Has("axes") ){
86  mHasLocalAxes = true;
87  mTransformationMatrix.resize(3,3,false);
89  for( unsigned int i=0; i<3; i++)
90  for( unsigned int j=0; j<3; j++)
91  mTransformationMatrix(i,j) = rParameters["local_axes"]["axes"][i][j].GetDouble();
92  }
93 
94  if( rParameters["entity_type"].GetString() == "NODES" ){
95  this->mEntity = EntityType::NODES;
96  }
97  else if( rParameters["entity_type"].GetString() == "CONDITIONS" ){
99  }
100  else if( rParameters["entity_type"].GetString() == "ELEMENTS" ){
102  }
103  else{
104  KRATOS_ERROR <<" Entity type "<< rParameters["entity_type"].GetString() <<" is not supported "<<std::endl;
105  }
106 
107 
108  if( this->mEntity == EntityType::NODES ){
109 
111  {
112  if( rModelPart.GetNodalSolutionStepVariablesList().Has( KratosComponents< Variable<double> >::Get( this->mvariable_name ) ) == false )
113  {
114  KRATOS_ERROR << "trying to set a variable that is not in the model_part - variable name is " << this->mvariable_name << std::endl;
115  }
116 
117  }
118  else
119  {
120  KRATOS_ERROR << "Not able to set the variable type/name. Attempting to set variable:" << this->mvariable_name << std::endl;
121  }
122  }
123  else if( this->mEntity == EntityType::CONDITIONS || this->mEntity == EntityType::ELEMENTS ){
124 
125  if( KratosComponents< Variable<Vector> >::Has( this->mvariable_name ) == false ) //case of double variable
126  {
127  KRATOS_ERROR << "trying to set a variable that is not in the model_part - variable name is " << this->mvariable_name << std::endl;
128  }
129 
130  }
131  else{
132  KRATOS_ERROR << " Assignment to " << rParameters["entity_type"].GetString() << " not implemented "<< std::endl;
133  }
134 
135  this->SetAssignmentType(rParameters["compound_assignment"].GetString(), mAssignment);
136 
137  KRATOS_CATCH("")
138  }
139 
140  // Constructor.
142  pybind11::object& pPyObject,
143  const std::string& pPyMethodName,
144  const bool SpatialFieldFunction
145  ) : BaseType(rModelPart), mPyObject(pPyObject), mPyMethodName(pPyMethodName), mIsSpatialField(SpatialFieldFunction)
146  {
147  KRATOS_TRY
148  KRATOS_CATCH("")
149  }
150 
153 
154 
158 
160  void operator()()
161  {
162  Execute();
163  }
164 
165 
169 
170 
172  void Execute() override
173  {
174 
175  KRATOS_TRY
176 
177  ProcessInfo& rCurrentProcessInfo = this->mrModelPart.GetProcessInfo();
178 
179  const double& rCurrentTime = rCurrentProcessInfo[TIME];
180 
181  if( this->mEntity == EntityType::NODES || this->mEntity == EntityType::CONDITIONS ){
182 
183  if( KratosComponents< Variable<double> >::Has( this->mvariable_name ) ) //case of double variable
184  {
185  AssignValueToNodes<>(KratosComponents< Variable<double> >::Get(this->mvariable_name), rCurrentTime);
186  }
187  else if( KratosComponents< Variable<Vector> >::Has( this->mvariable_name ) ) //case of vector variable
188  {
189  AssignValueToConditions<>(KratosComponents< Variable<Vector> >::Get(this->mvariable_name), rCurrentTime);
190  }
191  else
192  {
193  KRATOS_ERROR << "Not able to set the variable. Attempting to set variable:" << this->mvariable_name << std::endl;
194  }
195 
196  }
197  else if( this->mEntity == EntityType::ELEMENTS ){
198 
199  if( KratosComponents< Variable<Vector> >::Has( this->mvariable_name ) ) //case of vector variable
200  {
201  AssignValueToElements<>(KratosComponents< Variable<Vector> >::Get(this->mvariable_name), rCurrentTime);
202  }
203  else
204  {
205  KRATOS_ERROR << "Not able to set the variable. Attempting to set variable:" << this->mvariable_name << std::endl;
206  }
207 
208  }
209 
210  KRATOS_CATCH("");
211 
212  }
213 
216  void ExecuteInitialize() override
217  {
218  }
219 
223  {
224  }
225 
226 
229  {
230  }
231 
234  {
235  }
236 
237 
239  void ExecuteBeforeOutputStep() override
240  {
241  }
242 
243 
245  void ExecuteAfterOutputStep() override
246  {
247  }
248 
249 
252  void ExecuteFinalize() override
253  {
254 
255  KRATOS_TRY
256 
257  if( this->mEntity == EntityType::CONDITIONS ){
258 
259  if( KratosComponents< Variable<Vector> >::Has( this->mvariable_name ) ) //case of vector variable
260  {
262  Vector Value(3);
263  noalias(Value) = ZeroVector(3);
264  AssignValueToConditions<>(KratosComponents< Variable<Vector> >::Get(this->mvariable_name), Value);
265  }
266  else
267  {
268  KRATOS_ERROR << "Not able to set the variable. Attempting to set variable:" << this->mvariable_name << std::endl;
269  }
270  }
271 
272  KRATOS_CATCH("")
273 
274  }
275 
276 
280 
281 
285 
286 
290 
292  std::string Info() const override
293  {
294  return "AssignScalarFieldToPfemEntitiesProcess";
295  }
296 
298  void PrintInfo(std::ostream& rOStream) const override
299  {
300  rOStream << "AssignScalarFieldToPfemEntitiesProcess";
301  }
302 
304  void PrintData(std::ostream& rOStream) const override
305  {
306  }
307 
308 
313 
314 protected:
315 
321 
322  pybind11::object mPyObject;
323  std::string mPyMethodName;
324 
327 
329 
332 
336 
339 
343 
344  void LocalAxesTransform(const double& rX_global, const double& rY_global, const double& rZ_global,
345  double& rx_local, double& ry_local, double& rz_local)
346  {
347  rx_local = rX_global;
348  ry_local = rY_global;
349  rz_local = rZ_global;
350 
352 
353  //implement global to local axes transformation
354  Vector GlobalPosition(3);
355  GlobalPosition[0] = rX_global;
356  GlobalPosition[1] = rY_global;
357  GlobalPosition[2] = rZ_global;
358 
359  if( mHasLocalOrigin )
360  GlobalPosition -= mLocalOrigin;
361 
362  Vector LocalPosition(3);
363  noalias(LocalPosition) = ZeroVector(3);
364 
365  if( mHasLocalAxes )
366  noalias(LocalPosition) = prod(mTransformationMatrix,GlobalPosition);
367 
368  rx_local = LocalPosition[0];
369  ry_local = LocalPosition[1];
370  rz_local = LocalPosition[2];
371 
372  }
373  }
374 
375  void CallFunction(const Node::Pointer& pNode, const double& time, double& rValue)
376  {
377 
378  if( mIsSpatialField ){
379 
380  double x = 0.0, y = 0.0, z = 0.0;
381 
382  LocalAxesTransform(pNode->X(), pNode->Y(), pNode->Z(), x, y, z);
383  rValue = mPyObject.attr(mPyMethodName.c_str())(x,y,z,time).cast<double>();
384 
385  }
386  else{
387 
388  rValue = mPyObject.attr(mPyMethodName.c_str())(0.0,0.0,0.0,time).cast<double>();
389  }
390 
391  }
392 
393 
394  void CallFunction(const Condition::Pointer& pCondition, const double& time, Vector& rValue)
395  {
396 
397  Condition::GeometryType& rConditionGeometry = pCondition->GetGeometry();
398  unsigned int size = rConditionGeometry.size();
399 
400  rValue.resize(size,false);
401 
402  if( mIsSpatialField ){
403 
404  double x = 0, y = 0, z = 0;
405 
406  for(unsigned int i=0; i<size; i++)
407  {
408  LocalAxesTransform(rConditionGeometry[i].X(), rConditionGeometry[i].Y(), rConditionGeometry[i].Z(), x, y, z);
409  rValue[i] = mPyObject.attr(mPyMethodName.c_str())(x,y,z,time).cast<double>();
410  }
411 
412  }
413  else{
414 
415  double value = mPyObject.attr(mPyMethodName.c_str())(0.0,0.0,0.0,time).cast<double>();
416  for(unsigned int i=0; i<size; i++)
417  {
418  rValue[i] = value;
419  }
420 
421  }
422 
423  }
424 
425 
426  void CallFunction(const Element::Pointer& pElement, const double& time, Vector& rValue)
427  {
428 
429  Element::GeometryType& rElementGeometry = pElement->GetGeometry();
430  unsigned int size = rElementGeometry.size();
431 
432  rValue.resize(size,false);
433 
434  if( mIsSpatialField ){
435 
436  double x = 0, y = 0, z = 0;
437 
438  for(unsigned int i=0; i<size; i++)
439  {
440  LocalAxesTransform(rElementGeometry[i].X(), rElementGeometry[i].Y(), rElementGeometry[i].Z(), x, y, z);
441  rValue[i] = mPyObject.attr(mPyMethodName.c_str())(x,y,z,time).cast<double>();
442  }
443 
444  }
445  else{
446 
447  double value = mPyObject.attr(mPyMethodName.c_str())(0.0,0.0,0.0,time).cast<double>();
448  for(unsigned int i=0; i<size; i++)
449  {
450  rValue[i] = value;
451  }
452 
453  }
454 
455  }
456 
457  template< class TVarType >
458  void AssignValueToNodes(TVarType& rVariable, const double& rTime)
459  {
460  if( this->mEntity == EntityType::NODES ){
461 
462  typedef void (BaseType::*AssignmentMethodPointer) (ModelPart::NodeType&, const TVarType&, const double&);
463 
464  AssignmentMethodPointer AssignmentMethod = this->GetAssignmentMethod<AssignmentMethodPointer>();
465 
466  const int nnodes = this->mrModelPart.GetMesh().Nodes().size();
467 
468  double Value = 0;
469 
470  if(nnodes != 0)
471  {
472  ModelPart::NodesContainerType::iterator it_begin = this->mrModelPart.GetMesh().NodesBegin();
473 
474  //#pragma omp parallel for //it does not work in parallel
475  for(int i = 0; i<nnodes; i++)
476  {
477  ModelPart::NodesContainerType::iterator it = it_begin + i;
478 
479  this->CallFunction(*(it.base()), rTime, Value);
480 
481  (this->*AssignmentMethod)(*it, rVariable, Value);
482  }
483  }
484 
485  }
486  }
487 
488  template< class TVarType >
489  void AssignValueToConditions(TVarType& rVariable, const double& rTime)
490  {
491  if( this->mEntity == EntityType::CONDITIONS ){
492 
493  typedef void (BaseType::*AssignmentMethodPointer) (ModelPart::ConditionType&, const Variable<Vector>&, const Vector&);
494 
495  AssignmentMethodPointer AssignmentMethod = this->GetAssignmentMethod<AssignmentMethodPointer>();
496 
497  const int nconditions = this->mrModelPart.GetMesh().Conditions().size();
498 
499  Vector Value;
500 
501  if(nconditions != 0)
502  {
503  ModelPart::ConditionsContainerType::iterator it_begin = this->mrModelPart.GetMesh().ConditionsBegin();
504 
505  //#pragma omp parallel for //it does not work in parallel
506  for(int i = 0; i<nconditions; i++)
507  {
508  ModelPart::ConditionsContainerType::iterator it = it_begin + i;
509 
510  this->CallFunction(*(it.base()), rTime, Value);
511 
512  (this->*AssignmentMethod)(*it, rVariable, Value);
513  }
514  }
515 
516  }
517  }
518 
519  template< class TVarType, class TDataType >
520  void AssignValueToConditions(TVarType& rVariable, const TDataType Value)
521  {
522 
523  if( this->mEntity == EntityType::CONDITIONS ){
524 
525  typedef void (BaseType::*AssignmentMethodPointer) (ModelPart::ConditionType&, const TVarType&, const TDataType&);
526  AssignmentMethodPointer AssignmentMethod = this->GetAssignmentMethod<AssignmentMethodPointer>();
527 
528  const int nconditions = this->mrModelPart.GetMesh().Conditions().size();
529 
530  if(nconditions != 0)
531  {
532  ModelPart::ConditionsContainerType::iterator it_begin = this->mrModelPart.GetMesh().ConditionsBegin();
533 
534  #pragma omp parallel for
535  for(int i = 0; i<nconditions; i++)
536  {
537  ModelPart::ConditionsContainerType::iterator it = it_begin + i;
538 
539  (this->*AssignmentMethod)(*it, rVariable, Value);
540  }
541  }
542 
543  }
544 
545  }
546 
547 
548  template< class TVarType >
549  void AssignValueToElements(TVarType& rVariable, const double& rTime)
550  {
551  if( this->mEntity == EntityType::ELEMENTS ){
552 
553  typedef void (BaseType::*AssignmentMethodPointer) (ModelPart::ElementType&, const Variable<Vector>&, const Vector&);
554 
555  AssignmentMethodPointer AssignmentMethod = this->GetAssignmentMethod<AssignmentMethodPointer>();
556 
557  const int nelements = this->mrModelPart.GetMesh().Elements().size();
558 
559  Vector Value;
560 
561  if(nelements != 0)
562  {
563  ModelPart::ElementsContainerType::iterator it_begin = this->mrModelPart.GetMesh().ElementsBegin();
564 
565  //#pragma omp parallel for //it does not work in parallel
566  for(int i = 0; i<nelements; i++)
567  {
568  ModelPart::ElementsContainerType::iterator it = it_begin + i;
569 
570  this->CallFunction(*(it.base()), rTime, Value);
571 
572  (this->*AssignmentMethod)(*it, rVariable, Value);
573  }
574  }
575 
576  }
577  }
578 
579  // template< class TVarType, class TDataType >
580  // void AssignValueToElements(TVarType& rVariable, const TDataType Value)
581  // {
582 
583  // if( this->mEntity == ELEMENTS ){
584 
585  // const int nelements = this->mrModelPart.GetMesh().Elements().size();
586 
587  // if(nelements != 0)
588  // {
589  // ModelPart::ElementsContainerType::iterator it_begin = this->mrModelPart.GetMesh().ElementsBegin();
590 
591  // #pragma omp parallel for
592  // for(int i = 0; i<nelements; i++)
593  // {
594  // ModelPart::ElementsContainerType::iterator it = it_begin + i;
595 
596  // it->SetValue(rVariable, Value);
597  // }
598  // }
599 
600  // }
601 
602  // }
603 
614 
615 private:
616 
631 
634 
635 
645 
646 }; // Class AssignScalarFieldToPfemEntitiesProcess
647 
648 
650 
653 
654 
658 
659 
661 inline std::istream& operator >> (std::istream& rIStream,
663 
665 inline std::ostream& operator << (std::ostream& rOStream,
667 {
668  rThis.PrintInfo(rOStream);
669  rOStream << std::endl;
670  rThis.PrintData(rOStream);
671 
672  return rOStream;
673 }
675 
676 
677 } // namespace Kratos.
678 
679 #endif // KRATOS_ASSIGN_SCALAR_FIELD_TO_PFEM_ENTITIES_PROCESS_H_INCLUDED defined
The base class for assigning a value to scalar variables or array_1d components processes in Kratos.
Definition: assign_scalar_field_to_pfem_entities_process.hpp:32
AssignScalarFieldToPfemEntitiesProcess(AssignScalarFieldToPfemEntitiesProcess const &rOther)
Copy constructor.
void CallFunction(const Element::Pointer &pElement, const double &time, Vector &rValue)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:426
void AssignValueToConditions(TVarType &rVariable, const double &rTime)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:489
~AssignScalarFieldToPfemEntitiesProcess() override
Destructor.
Definition: assign_scalar_field_to_pfem_entities_process.hpp:152
AssignScalarFieldToPfemEntitiesProcess(ModelPart &rModelPart, pybind11::object &pPyObject, const std::string &pPyMethodName, const bool SpatialFieldFunction)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:141
bool mIsSpatialField
Definition: assign_scalar_field_to_pfem_entities_process.hpp:328
KRATOS_CLASS_POINTER_DEFINITION(AssignScalarFieldToPfemEntitiesProcess)
Pointer definition of AssignScalarFieldToPfemEntitiesProcess.
void AssignValueToNodes(TVarType &rVariable, const double &rTime)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:458
void CallFunction(const Node::Pointer &pNode, const double &time, double &rValue)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:375
void AssignValueToElements(TVarType &rVariable, const double &rTime)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:549
void ExecuteAfterOutputStep() override
this function will be executed at every time step AFTER writing the output
Definition: assign_scalar_field_to_pfem_entities_process.hpp:245
std::string Info() const override
Turn back information as a string.
Definition: assign_scalar_field_to_pfem_entities_process.hpp:292
void LocalAxesTransform(const double &rX_global, const double &rY_global, const double &rZ_global, double &rx_local, double &ry_local, double &rz_local)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:344
std::string mPyMethodName
Definition: assign_scalar_field_to_pfem_entities_process.hpp:323
pybind11::object mPyObject
Definition: assign_scalar_field_to_pfem_entities_process.hpp:322
void Execute() override
Execute method is used to execute the AssignScalarFieldToPfemEntitiesProcess algorithms.
Definition: assign_scalar_field_to_pfem_entities_process.hpp:172
Matrix mTransformationMatrix
Definition: assign_scalar_field_to_pfem_entities_process.hpp:326
Vector mLocalOrigin
Definition: assign_scalar_field_to_pfem_entities_process.hpp:325
AssignScalarFieldToPfemEntitiesProcess(ModelPart &rModelPart, pybind11::object &pPyObject, const std::string &pPyMethodName, const bool SpatialFieldFunction, Parameters rParameters)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:45
void ExecuteBeforeSolutionLoop() override
Definition: assign_scalar_field_to_pfem_entities_process.hpp:222
void ExecuteInitialize() override
Definition: assign_scalar_field_to_pfem_entities_process.hpp:216
bool mHasLocalOrigin
Definition: assign_scalar_field_to_pfem_entities_process.hpp:330
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: assign_scalar_field_to_pfem_entities_process.hpp:233
AssignScalarVariableToPfemEntitiesProcess BaseType
Definition: assign_scalar_field_to_pfem_entities_process.hpp:40
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: assign_scalar_field_to_pfem_entities_process.hpp:160
bool mHasLocalAxes
Definition: assign_scalar_field_to_pfem_entities_process.hpp:331
void ExecuteBeforeOutputStep() override
this function will be executed at every time step BEFORE writing the output
Definition: assign_scalar_field_to_pfem_entities_process.hpp:239
void AssignValueToConditions(TVarType &rVariable, const TDataType Value)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:520
void ExecuteFinalize() override
Definition: assign_scalar_field_to_pfem_entities_process.hpp:252
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: assign_scalar_field_to_pfem_entities_process.hpp:304
void ExecuteInitializeSolutionStep() override
this function will be executed at every time step BEFORE performing the solve phase
Definition: assign_scalar_field_to_pfem_entities_process.hpp:228
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: assign_scalar_field_to_pfem_entities_process.hpp:298
void CallFunction(const Condition::Pointer &pCondition, const double &time, Vector &rValue)
Definition: assign_scalar_field_to_pfem_entities_process.hpp:394
The base class for assigning a value to scalar variables or array_1d components processes in Kratos.
Definition: assign_scalar_variable_to_pfem_entities_process.hpp:34
ModelPart & mrModelPart
Definition: assign_scalar_variable_to_pfem_entities_process.hpp:250
EntityType mEntity
Definition: assign_scalar_variable_to_pfem_entities_process.hpp:253
void SetAssignmentType(std::string method, AssignmentType &rAssignment)
Definition: assign_scalar_variable_to_pfem_entities_process.hpp:272
std::string mvariable_name
Definition: assign_scalar_variable_to_pfem_entities_process.hpp:251
AssignmentType mAssignment
Definition: assign_scalar_variable_to_pfem_entities_process.hpp:254
Base class for all Conditions.
Definition: condition.h:59
Base class for all Elements.
Definition: element.h:60
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
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
ConditionsContainerType & Conditions()
Definition: mesh.h:691
ElementIterator ElementsBegin()
Definition: mesh.h:548
NodesContainerType & Nodes()
Definition: mesh.h:346
ConditionIterator ConditionsBegin()
Definition: mesh.h:671
NodeIterator NodesBegin()
Definition: mesh.h:326
ElementsContainerType & Elements()
Definition: mesh.h:568
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType & GetMesh(IndexType ThisIndex=0)
Definition: model_part.h:1791
VariablesList & GetNodalSolutionStepVariablesList()
Definition: model_part.h:549
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
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
size_type size() const
Returns the number of elements in the container.
Definition: pointer_vector_set.h:502
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
bool Has(const VariableData &rThisVariable) const
Definition: variables_list.h:372
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
z
Definition: GenerateWind.py:163
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
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
time
Definition: face_heat.py:85
y
Other simbols definition.
Definition: generate_axisymmetric_navier_stokes_element.py:54
int j
Definition: quadrature.py:648
x
Definition: sensitivityMatrix.py:49
int nnodes
Definition: sensitivityMatrix.py:24
integer i
Definition: TensorModule.f:17