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.
integration_point_statistics_process.h
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: Jordi Cotela
11 //
12 
13 #if !defined(KRATOS_INTEGRATION_POINT_STATISTICS_PROCESS_H_INCLUDED)
14 #define KRATOS_INTEGRATION_POINT_STATISTICS_PROCESS_H_INCLUDED
15 
16 // System includes
17 #include <string>
18 #include <iostream>
19 
20 // External includes
21 
22 // Project includes
23 #include "includes/define.h"
25 #include "processes/process.h"
27 
28 namespace Kratos
29 {
32 
35 
38 {
39 public:
42 
45 
46 typedef std::map< std::string, StatisticsSampler::Pointer > StatisticsDictionary;
47 
51 
53 
56 IntegrationPointStatisticsProcess(ModelPart& rModelPart, Kratos::Parameters::Pointer pParameters):
57  Process(),
58  mrModelPart(rModelPart),
59  mpParameters(pParameters),
60  mDimension(3),
61  mStartTime(0.0)
62 {}
63 
65 
68 IntegrationPointStatisticsProcess(Model& rModel, Kratos::Parameters::Pointer pParameters):
69  Process(),
70  mrModelPart(rModel.GetModelPart((*pParameters)["model_part_name"].GetString())),
71  mpParameters(pParameters),
72  mDimension(3),
73  mStartTime(0.0)
74 {}
75 
78 {}
79 
83 
85 void ExecuteInitialize() override
86 {
87  KRATOS_TRY;
88 
89  // Create a new container for statistics
90  StatisticsRecord::Pointer p_turbulence_statistics = Kratos::make_shared<StatisticsRecord>();
91 
92  // Build statistics records
93  CreateStatisticsFromInput(p_turbulence_statistics);
94 
95  // Initialize STATISTICS_CONTAINER in ProcessInfo
96  p_turbulence_statistics->InitializeStorage(mrModelPart.Elements());
97  mrModelPart.GetProcessInfo().SetValue(STATISTICS_CONTAINER,p_turbulence_statistics);
98 
99  KRATOS_CATCH("");
100 }
101 
104 {
105  if (mrModelPart.GetProcessInfo()[TIME] >= mStartTime)
106  {
107  auto p_turbulence_statistics = mrModelPart.GetProcessInfo().GetValue(STATISTICS_CONTAINER);
108  p_turbulence_statistics->SampleIntegrationPointResults(mrModelPart);
109  }
110 }
111 
113 void ExecuteFinalize() override
114 {
115  auto p_turbulence_statistics = mrModelPart.GetProcessInfo().GetValue(STATISTICS_CONTAINER);
116  p_turbulence_statistics->PrintToFile(mrModelPart, mOutputFileName);
117 }
118 
122 
124 std::string Info() const override
125 {
126  std::stringstream buffer;
127  buffer << "IntegrationPointStatisticsProcess";
128  return buffer.str();
129 }
130 
132 void PrintInfo(std::ostream &rOStream) const override { rOStream << "IntegrationPointStatisticsProcess"; }
133 
135 void PrintData(std::ostream &rOStream) const override {}
136 
138 
139 protected:
140 
143 
144 void CreateStatisticsFromInput(StatisticsRecord::Pointer pRecordedStatistics)
145 {
146  KRATOS_TRY;
147 
148  // Validate parameters
149  Kratos::Parameters default_parameters = Kratos::Parameters(R"({
150  "statistics" : [],
151  "output_file_name": "statistics",
152  "model_part_name": "",
153  "dimension": 3,
154  "start_time": 0.0
155  })");
156 
157  Parameters& r_parameters = *mpParameters;
158  r_parameters.ValidateAndAssignDefaults(default_parameters);
159 
160  mOutputFileName = r_parameters["output_file_name"].GetString();
161  mStartTime = r_parameters["start_time"].GetDouble();
162 
163  mDimension = r_parameters["dimension"].GetInt();
164  KRATOS_ERROR_IF( mDimension != 2 && mDimension != 3)
165  << "Unsupported dimension " << mDimension << ". IntegrationPointStatisticsProcess only works for dimension 2 or 3." << std::endl;
166 
167  StatisticsDictionary defined_statistics;
168 
169  for (unsigned int i = 0; i < r_parameters["statistics"].size(); i++)
170  {
171  Kratos::Parameters settings = r_parameters["statistics"][i];
172  KRATOS_ERROR_IF_NOT( settings.Has("type") && settings["type"].IsString() )
173  << "Element " << i << " in the list of statistics passed to IntegrationPointStatitsticsProcess"
174  << " has no \"type\" (string) attribute defined." << std::endl;
175 
176  std::string statistic_type = settings["type"].GetString();
177 
178  if ( statistic_type == "average" )
179  {
180  pRecordedStatistics->AddResult(CreateAverageSampler(settings,defined_statistics));
181  }
182  else if ( statistic_type == "variance" )
183  {
184  pRecordedStatistics->AddHigherOrderStatistic(CreateVarianceSampler(settings,defined_statistics));
185  }
186  else if ( statistic_type == "third_order_moment" )
187  {
188  pRecordedStatistics->AddHigherOrderStatistic(CreateThirdOrderSampler(settings,defined_statistics));
189  }
190  else
191  {
192  KRATOS_ERROR << "Unknown string \"" << statistic_type << "\" passed as \"type\" argument in statistics definition." << std::endl;
193  }
194  }
195 
196  KRATOS_CATCH("");
197 }
198 
199 StatisticsSampler::Pointer CreateAverageSampler(
200  Kratos::Parameters& rParameters,
201  StatisticsDictionary& rDefinedStatistics) const
202 {
203  KRATOS_TRY;
204 
205  Kratos::Parameters default_parameters(R"({
206  "type" : "average",
207  "variable": "",
208  "tags": []
209  })");
210 
211  rParameters.ValidateAndAssignDefaults(default_parameters);
212  std::string variable_name = rParameters["variable"].GetString();
213  std::string type = rParameters["type"].GetString();
214  KRATOS_ERROR_IF_NOT(type == "average") << "Trying to define an average statistic of unsupported type " << type << "." << std::endl;
215 
216  KRATOS_ERROR_IF(rDefinedStatistics.find(variable_name) != rDefinedStatistics.end())
217  << "Duplicate definition of an average for " << variable_name << "." << std::endl;
218 
219  StatisticsSampler::Pointer new_statistic;
220  if (KratosComponents<Variable<double>>::Has(variable_name))
221  {
222  // build double variable sampler
223  const Variable<double>& variable = KratosComponents<Variable<double>>::Get(variable_name);
225  std::string tag = variable_name;
226  if (rParameters["tags"].size() > 0)
227  {
228  KRATOS_ERROR_IF(rParameters["tags"].size() != 1) << "Only one tag is needed for scalar averages, but "
229  << rParameters["tags"].size() << " were provided for variable " << variable_name << "." << std::endl;
230 
231  tag = rParameters["tags"][0].GetString();
232  }
233  new_statistic = Kratos::make_shared<ScalarAverageSampler>(value_getter,tag);
234  }
235  else if (KratosComponents<Variable<array_1d<double,3>>>::Has(variable_name))
236  {
237  // build vector sampler
238  const Variable<array_1d<double,3>>& variable = KratosComponents<Variable<array_1d<double,3>>>::Get(variable_name);
240  std::vector<std::string> tags;
241  if (rParameters["tags"].size() > 0)
242  {
243  KRATOS_ERROR_IF(rParameters["tags"].size() != mDimension) << mDimension << " tags are needed for vector averages, but "
244  << rParameters["tags"].size() << " were provided for variable " << variable_name << "." << std::endl;
245 
246  for (unsigned int i = 0; i < mDimension; i++) {
247  tags.push_back(rParameters["tags"][i].GetString());
248  }
249  }
250  else
251  {
252  tags.push_back(std::string(variable_name+"_X"));
253  tags.push_back(std::string(variable_name+"_Y"));
254  if (mDimension == 3) tags.push_back(std::string(variable_name+"_Z"));
255  }
256  new_statistic = Kratos::make_shared<VectorAverageSampler<array_1d<double,3>>>(value_getter,mDimension,tags);
257  }
258  else
259  {
261  << "Trying to define an average statistic for variable " << variable_name
262  << " which is not a variable of a supported type." << std::endl;
263  }
264 
265  rDefinedStatistics[variable_name] = new_statistic;
266  return new_statistic;
267 
268  KRATOS_CATCH("");
269 }
270 
271 StatisticsSampler::Pointer CreateVarianceSampler(
272  Kratos::Parameters& rParameters,
273  StatisticsDictionary& rDefinedStatistics) const
274 {
275  KRATOS_TRY;
276 
277  Kratos::Parameters default_parameters(R"({
278  "type" : "",
279  "variables": []
280  })");
281 
282  rParameters.ValidateAndAssignDefaults(default_parameters);
283  KRATOS_ERROR_IF(rParameters["variables"].size() < 1 || rParameters["variables"].size() > 2)
284  << "Unexpected number of arguments when reading \"variables\" list argument. "
285  << "Expected 1 or 2 values, got " << rParameters["variables"].size() << "." << std::endl;
286 
287  StatisticsSampler::Pointer new_statistic;
288  if (rParameters["variables"].size() == 1)
289  {
290  // symmetric variance
291  std::string variable_name = rParameters["variables"][0].GetString();
292  StatisticsDictionary::iterator it_average = rDefinedStatistics.find(variable_name);
293  KRATOS_ERROR_IF(it_average == rDefinedStatistics.end())
294  << "Trying to define a variance for " << variable_name
295  << " but no average has been defined for this variable." << std::endl;
296 
297  new_statistic = Kratos::make_shared<SymmetricVarianceSampler>(it_average->second);
298  rDefinedStatistics[MakeVarianceKey(variable_name,variable_name)] = new_statistic;
299  }
300  else // size == 2
301  {
302  // complete or componentwise variance
303  std::string first_argument = rParameters["variables"][0].GetString();
304  std::string first_argument_base;
305  unsigned int first_argument_index;
306  bool first_argument_is_component = ProcessComponent(first_argument,first_argument_base,first_argument_index);
307 
308  std::string second_argument = rParameters["variables"][1].GetString();
309  std::string second_argument_base;
310  unsigned int second_argument_index;
311  bool second_argument_is_component = ProcessComponent(second_argument,second_argument_base,second_argument_index);
312 
313  StatisticsSampler::Pointer first_statistic;
314  if (first_argument_is_component)
315  {
316  auto found = rDefinedStatistics.find(first_argument_base);
317  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
318  << "Trying to record variance for " << first_argument << " and " << second_argument
319  << " but no average was declared for " << first_argument_base << "." << std::endl;
320  first_statistic = found->second;
321 
322  }
323  else
324  {
325  auto found = rDefinedStatistics.find(first_argument);
326  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
327  << "Trying to record variance for " << first_argument << " and " << second_argument
328  << " but no average was declared for " << first_argument << "." << std::endl;
329  first_statistic = found->second;
330  }
331 
332  StatisticsSampler::Pointer second_statistic;
333  if (second_argument_is_component)
334  {
335  auto found = rDefinedStatistics.find(second_argument_base);
336  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
337  << "Trying to record variance for " << first_argument << " and " << second_argument
338  << " but no average was declared for " << second_argument_base << "." << std::endl;
339  second_statistic = found->second;
340  }
341  else
342  {
343  auto found = rDefinedStatistics.find(second_argument);
344  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
345  << "Trying to record variance for " << first_argument << " and " << second_argument
346  << " but no average was declared for " << second_argument << "." << std::endl;
347  second_statistic = found->second;
348  }
349 
350  if (
351  (first_argument_is_component && !(second_argument_is_component || IsScalar(second_argument) )) ||
352  (second_argument_is_component && !(first_argument_is_component || IsScalar(first_argument) ))
353  )
354  {
355  KRATOS_ERROR << "Variances involving a component and a vector are currently not supported, please define them component-by-component." << std::endl;
356  }
357 
358  if (first_argument_is_component || second_argument_is_component)
359  {
360  // componentwise statistic
361  new_statistic = Kratos::make_shared<ComponentwiseVarianceSampler>(
362  first_statistic,first_argument_index,
363  second_statistic,second_argument_index);
364  }
365  else
366  {
367  // full variable statistic
368  new_statistic = Kratos::make_shared<VarianceSampler>(
369  first_statistic, second_statistic);
370  }
371 
372  rDefinedStatistics[MakeVarianceKey(first_argument,second_argument)] = new_statistic;
373  }
374  return new_statistic;
375 
376  KRATOS_CATCH("");
377 }
378 
379 StatisticsSampler::Pointer CreateThirdOrderSampler(
380  Kratos::Parameters& rParameters,
381  StatisticsDictionary& rDefinedStatistics) const
382 {
383  KRATOS_TRY;
384 
385  Kratos::Parameters default_parameters(R"({
386  "type" : "",
387  "variables": []
388  })");
389 
390  rParameters.ValidateAndAssignDefaults(default_parameters);
391  KRATOS_ERROR_IF(rParameters["variables"].size() != 3 )
392  << "Unexpected number of arguments when reading \"variables\" list argument. "
393  << "Expected 3 values, got " << rParameters["variables"].size() << "." << std::endl;
394 
395  const std::string first_argument = rParameters["variables"][0].GetString();
396  const std::string second_argument = rParameters["variables"][1].GetString();
397  const std::string third_argument = rParameters["variables"][2].GetString();
398 
399  std::string first_argument_base;
400  unsigned int first_argument_index;
401  ProcessThirdOrderInputValue(first_argument, first_argument_base, first_argument_index);
402  auto found = rDefinedStatistics.find(first_argument_base);
403  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
404  << "Trying to record third order moment for " << first_argument << ", " << second_argument << " and " << third_argument
405  << " but no average was declared for " << first_argument_base << "." << std::endl;
406  StatisticsSampler::Pointer first_average = found->second;
407 
408  std::string second_argument_base;
409  unsigned int second_argument_index;
410  ProcessThirdOrderInputValue(second_argument, second_argument_base, second_argument_index);
411  found = rDefinedStatistics.find(second_argument_base);
412  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
413  << "Trying to record third order moment for " << first_argument << ", " << second_argument << " and " << third_argument
414  << " but no average was declared for " << second_argument_base << "." << std::endl;
415  StatisticsSampler::Pointer second_average = found->second;
416 
417  std::string third_argument_base;
418  unsigned int third_argument_index;
419  ProcessThirdOrderInputValue(third_argument, third_argument_base, third_argument_index);
420  found = rDefinedStatistics.find(third_argument_base);
421  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
422  << "Trying to record third order moment for " << first_argument << ", " << second_argument << " and " << third_argument
423  << " but no average was declared for " << third_argument_base << "." << std::endl;
424  StatisticsSampler::Pointer third_average = found->second;
425 
426  found = rDefinedStatistics.find(MakeVarianceKey(first_argument_base,second_argument_base));
427  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
428  << "Trying to record third order moment for " << first_argument << ", " << second_argument << " and " << third_argument
429  << " but no correlation was declared for " << first_argument_base << " and " << second_argument_base << "." << std::endl;
430  StatisticsSampler::Pointer first_second_correlation = found->second;
431 
432  found = rDefinedStatistics.find(MakeVarianceKey(first_argument_base,third_argument_base));
433  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
434  << "Trying to record third order moment for " << first_argument << ", " << second_argument << " and " << third_argument
435  << " but no correlation was declared for " << first_argument_base << " and " << third_argument_base << "." << std::endl;
436  StatisticsSampler::Pointer first_third_correlation = found->second;
437 
438 
439  found = rDefinedStatistics.find(MakeVarianceKey(second_argument_base,third_argument_base));
440  KRATOS_ERROR_IF(found == rDefinedStatistics.end())
441  << "Trying to record third order moment for " << first_argument << ", " << second_argument << " and " << third_argument
442  << " but no correlation was declared for " << second_argument_base << " and " << third_argument_base << "." << std::endl;
443  StatisticsSampler::Pointer second_third_correlation = found->second;
444 
445  return Kratos::make_shared<ThirdOrderCorrelationSampler>(
446  first_average, first_argument_index,
447  second_average, second_argument_index,
448  third_average, third_argument_index,
449  first_second_correlation, first_second_correlation->ComponentIndex(first_argument_index,second_argument_index),
450  first_third_correlation, first_third_correlation->ComponentIndex(first_argument_index,third_argument_index),
451  second_third_correlation, second_third_correlation->ComponentIndex(second_argument_index, third_argument_index)
452  );
453 
454  KRATOS_CATCH("");
455 }
456 
458 
459 private:
460 
463 
464 ModelPart& mrModelPart;
465 
466 Kratos::Parameters::Pointer mpParameters;
467 
468 unsigned int mDimension;
469 
470 double mStartTime;
471 
472 std::string mOutputFileName;
473 
477 
479 bool IsScalar(const std::string& rInputName) const
480 {
481  return KratosComponents< Variable<double> >::Has(rInputName);
482 }
483 
485 bool ProcessComponent(
486  const std::string& rInputName,
487  std::string& rBaseVariableName,
488  unsigned int& rComponentIndex) const
489 {
490  KRATOS_TRY
491 
492  bool is_component = false;
493 
494  const std::string x_suffix = std::string("_X");
495  const std::string y_suffix = std::string("_Y");
496  const std::string z_suffix = std::string("_Z");
497 
498  if( StringEndsWith(rInputName,x_suffix) )
499  {
500  is_component = true;
501  rBaseVariableName = rInputName.substr(0, rInputName.length() - 2);
502  rComponentIndex = 0;
503  }
504  else if ( StringEndsWith(rInputName,y_suffix) )
505  {
506  is_component = true;
507  rBaseVariableName = rInputName.substr(0, rInputName.length() - 2);
508  rComponentIndex = 1;
509  }
510  else if ( StringEndsWith(rInputName,z_suffix) )
511  {
512  is_component = true;
513  rBaseVariableName = rInputName.substr(0, rInputName.length() - 2);
514  rComponentIndex = 2;
515  KRATOS_ERROR_IF_NOT(mDimension == 3)
516  << "Trying to record a statistic for " << rInputName
517  << " but IntegrationPointStatisticsProcess was initialized with dimension 2." << std::endl;
518  }
519  else
520  {
521  rComponentIndex = 0; // can be used also if variable is not a component
522  rBaseVariableName = rInputName;
523  }
524 
525  return is_component;
526 
527  KRATOS_CATCH("");
528 }
529 
531 bool StringEndsWith(std::string const &rString, std::string const &rEnding) const {
532  if (rString.length() >= rEnding.length()) {
533  return (0 == rString.compare(rString.length() - rEnding.length(), rEnding.length(), rEnding));
534  } else {
535  return false;
536  }
537 }
538 
540 std::string MakeVarianceKey(std::string const &rFirstArgument, std::string const &rSecondArgument) const
541 {
542  if (rFirstArgument < rSecondArgument)
543  {
544  return std::string("Variance_" + rFirstArgument + "_" + rSecondArgument);
545  }
546  else
547  {
548  return std::string("Variance_" + rSecondArgument + "_" + rFirstArgument);
549  }
550 }
551 
553 void ProcessThirdOrderInputValue(
554  const std::string& rArgument,
555  std::string& rBaseName,
556  unsigned int& rComponentIndex ) const
557 {
558  bool argument_is_scalar = IsScalar(rArgument);
559  bool argument_is_component = ProcessComponent(rArgument,rBaseName,rComponentIndex);
560  KRATOS_ERROR_IF_NOT(argument_is_scalar || argument_is_component)
561  << "Unexpected variable " << rArgument << " found while defining a third order correlation. "
562  << "Only scalar or component variables are supported at the moment." << std::endl;
563 }
564 
567 
570 
573 
575 
576 }; // Class IntegrationPointStatisticsProcess
577 
579 
582 
584 inline std::istream &operator>>(std::istream &rIStream,
586 {
587  return rIStream;
588 }
589 
591 inline std::ostream &operator<<(std::ostream &rOStream,
593 {
594  rThis.PrintInfo(rOStream);
595  rOStream << std::endl;
596  rThis.PrintData(rOStream);
597 
598  return rOStream;
599 }
601 
603 
604 } // namespace Kratos.
605 
606 #endif // KRATOS_INTEGRATION_POINT_STATISTICS_PROCESS_H_INCLUDED defined
void SetValue(const Variable< TDataType > &rThisVariable, TDataType const &rValue)
Sets the value for a given variable.
Definition: data_value_container.h:320
TDataType & GetValue(const Variable< TDataType > &rThisVariable)
Gets the value associated with a given variable.
Definition: data_value_container.h:268
Helper process to record statistics on the integration points of the mesh.
Definition: integration_point_statistics_process.h:38
StatisticsSampler::Pointer CreateAverageSampler(Kratos::Parameters &rParameters, StatisticsDictionary &rDefinedStatistics) const
Definition: integration_point_statistics_process.h:199
void CreateStatisticsFromInput(StatisticsRecord::Pointer pRecordedStatistics)
Definition: integration_point_statistics_process.h:144
StatisticsSampler::Pointer CreateThirdOrderSampler(Kratos::Parameters &rParameters, StatisticsDictionary &rDefinedStatistics) const
Definition: integration_point_statistics_process.h:379
KRATOS_CLASS_POINTER_DEFINITION(IntegrationPointStatisticsProcess)
Pointer definition of IntegrationPointStatisticsProcess.
void ExecuteInitialize() override
Define the statistics and initialize internal storage.
Definition: integration_point_statistics_process.h:85
void ExecuteFinalize() override
Output simulation results to file.
Definition: integration_point_statistics_process.h:113
std::map< std::string, StatisticsSampler::Pointer > StatisticsDictionary
Definition: integration_point_statistics_process.h:46
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: integration_point_statistics_process.h:135
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: integration_point_statistics_process.h:132
~IntegrationPointStatisticsProcess() override
Destructor.
Definition: integration_point_statistics_process.h:77
void ExecuteFinalizeSolutionStep() override
Update statistics.
Definition: integration_point_statistics_process.h:103
IntegrationPointStatisticsProcess(Model &rModel, Kratos::Parameters::Pointer pParameters)
Constructor using a Model.
Definition: integration_point_statistics_process.h:68
std::string Info() const override
Turn back information as a string.
Definition: integration_point_statistics_process.h:124
IntegrationPointStatisticsProcess(ModelPart &rModelPart, Kratos::Parameters::Pointer pParameters)
Constructor using a ModelPart.
Definition: integration_point_statistics_process.h:56
StatisticsSampler::Pointer CreateVarianceSampler(Kratos::Parameters &rParameters, StatisticsDictionary &rDefinedStatistics) const
Definition: integration_point_statistics_process.h:271
static std::function< double(const Geometry< Node > &rGeometry, const Vector &rShapeFunctions, const Matrix &rShapeDerivatives)> ValueGetter(const Variable< double > &rVariable)
Definition: statistics_utilities.h:650
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
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
SizeType size() const
This method returns the total size of the current array parameter.
Definition: kratos_parameters.cpp:993
std::string GetString() const
This method returns the string contained in the current Parameter.
Definition: kratos_parameters.cpp:684
bool Has(const std::string &rEntry) const
This method checks if the Parameter contains a certain entry.
Definition: kratos_parameters.cpp:520
bool IsString() const
This method checks if the parameter is a string.
Definition: kratos_parameters.cpp:568
The base class for all processes in Kratos.
Definition: process.h:49
#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_NOT(conditional)
Definition: exception.h:163
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
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
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
type
Definition: generate_gid_list_file.py:35
string tag
Definition: regular_mesher.py:14
integer i
Definition: TensorModule.f:17