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.
table.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: Pooyan Dadvand
11 // Riccardo Rossi
12 //
13 
14 #if !defined(KRATOS_TABLE_H_INCLUDED )
15 #define KRATOS_TABLE_H_INCLUDED
16 
17 // System includes
18 #include <string>
19 #include <iostream>
20 
21 // External includes
22 
23 // Project includes
24 #include "input_output/logger.h"
25 #include "includes/define.h"
26 #include "containers/variable.h"
27 
28 namespace Kratos
29 {
32 
35 
39 
43 
47 
51 
64 template<class TArgumentType, class TResultType = TArgumentType, std::size_t TResultsColumns = 1>
65 class Table
66 {
67 public:
70 
73 
74  typedef std::array<TResultType, TResultsColumns> result_row_type;
75 
76  typedef std::pair<TArgumentType, result_row_type> RecordType;
77 
78  typedef std::vector<RecordType> TableContainerType;
79 
83 
84  virtual ~Table() = default;
85 
89 
90  // This operator gives the first column result for the nearest argument found in table
91  TResultType const& operator()(TArgumentType const& X) const
92  {
93  return GetNearestRow(X)[0];
94  }
95 
96  // This operator gives the first column result for the nearest argument found in table
97  TResultType& operator()(TArgumentType const& X)
98  {
99  return GetNearestRow(X)[0];
100  }
101 
102  // This operator gives the result in the Jth column for the nearest argument found in table
103  TResultType const& operator()(TArgumentType const& X, std::size_t J) const
104  {
105  return GetNearestRow(X)[J];
106  }
107 
108  // This operator gives the result in the Jth column for the nearest argument found in table
109  TResultType& operator()(TArgumentType const& X, std::size_t J)
110  {
111  return GetNearestRow(X)[J];
112  }
113 
114  // This operator gives the row for the nearest value to argument found in table
115  result_row_type const & operator[](TArgumentType const& X) const
116  {
117  return GetNearestRow(X);
118  }
119 
120  // This operator gives the row for the nearest value to argument found in table
121  result_row_type & operator[](TArgumentType& X)
122  {
123  return GetNearestRow(X);
124  }
125 
129 
130 
131  // Get the nesrest value for the given argument
132  TResultType& GetNearestRow(TArgumentType const& X)
133  {
134  std::size_t size = mData.size();
135 
136  KRATOS_ERROR_IF(size == 0) << "Get value from empty table" << std::endl;
137 
138  if(size==1) // constant table. Returning the only value we have.
139  return mData.begin()->second;
140 
141  if(X <= mData[0].first)
142  return mData[0].second;
143 
144  for(std::size_t i = 1 ; i < size ; i++)
145  if(X <= mData[i].first)
146  return ((X - mData[i-1].first) < (mData[i].first - X)) ? mData[i-1].second : mData[i].second;
147 
148  // now the x is outside the table and we have to extrapolate it using last two records of table.
149  return mData[size-1].second;
150  }
151 
152  // Get the nesrest value for the given argument
153  TResultType const& GetNearestRow(TArgumentType const& X) const
154  {
155  std::size_t size = mData.size();
156 
157  KRATOS_ERROR_IF(size == 0) << "Get value from empty table" << std::endl;
158 
159  if(size==1) // constant table. Returning the only value we have.
160  return mData.begin()->second;
161 
162  if(X <= mData[0].first)
163  return mData[0].second;
164 
165  for(std::size_t i = 1 ; i < size ; i++)
166  if(X <= mData[i].first)
167  return ((X - mData[i-1].first) < (mData[i].first - X)) ? mData[i-1].second : mData[i].second;
168 
169  // now the x is outside the table and we have to extrapolate it using last two records of table.
170  return mData[size-1].second;
171  }
172 
173  // inserts a row in a sorted position where Xi-1 < X < Xi+1 and fills the first column with Y
174  void insert(TArgumentType const& X, TResultType const& Y)
175  {
176  result_row_type a = {{Y}};
177  insert(X,a);
178  }
179 
180  // inserts a row in a sorted position where Xi-1 < X < Xi+1 and fills the first column with Y
181  // assumes that Y has [] operator with TResultsColumns element
182  template<class TArrayType>
183  void insert(TArgumentType const& X, TArrayType const& Y)
184  {
186  for(std::size_t i = 0 ; i < TResultsColumns ; i++)
187  a[i] = Y[i];
188  insert(X,a);
189  }
190 
191  // inserts a row in a sorted position where Xi-1 < X < Xi+1
192  void insert(TArgumentType const& X, result_row_type const& Y)
193  {
194  std::size_t size = mData.size();
195 
196  if(size == 0)
197  mData.push_back(RecordType(X,Y));
198 
199  else if(X <= mData[0].first)
200  mData.insert(mData.begin(), RecordType(X,Y));
201  else if(X <= mData.back().first)
202  mData.push_back(RecordType(X,Y));
203  else
204  for(std::size_t i = 1 ; i < size ; i++)
205  if((X > mData[i-1].first) && (X <= mData[i].first))
206  {
207  mData.insert(mData.begin() + i, RecordType(X,Y));
208  break;
209  }
210 
211  }
212 
213 
214  // assumes that the X is the greater than the last argument and put the row at the end.
215  // faster than insert.
216  void PushBack(TArgumentType const& X, TResultType const& Y)
217  {
218  result_row_type a = {{Y}};
219  mData.push_back(RecordType(X,a));
220  }
221 
222  // assumes that the X is the greater than the last argument and put the row at the end.
223  // assumes that Y has [] operator with TResultsColumns element
224  // faster than insert.
225  template<class TArrayType>
226  void PushBack(TArgumentType const& X, TArrayType const& Y)
227  {
229  for(std::size_t i = 0 ; i < TResultsColumns ; i++)
230  a[i] = Y[i];
231  mData.push_back(RecordType(X,a));
232  }
233 
234  // assumes that the X is the greater than the last argument and put the row at the end.
235  // faster than insert.
236  template<class TArrayType>
237  void PushBack(TArgumentType const& X, result_row_type const& Y)
238  {
239  mData.push_back(RecordType(X,Y));
240  }
241 
245  void Clear()
246  {
247  mData.clear();
248  }
249 
253 
254 
256  {
257  return mData;
258  }
259 
260  TableContainerType const& Data() const
261  {
262  return mData;
263  }
264 
265 
269 
270 
274 
276  virtual std::string Info() const
277  {
278  return "Table";
279  }
280 
282  virtual void PrintInfo(std::ostream& rOStream) const
283  {
284  rOStream << Info();
285  }
286 
288  virtual void PrintData(std::ostream& rOStream) const
289  {
290  }
291 
292  const std::string& NameOfX() const
293  {
294  return mNameOfX;
295  }
296 
297  const std::string& NameOfY() const
298  {
299  return mNameOfY;
300  }
301 
302  void SetNameOfX(const std::string& name)
303  {
304  mNameOfX = name;
305  }
306 
307  void SetNameOfY(const std::string& name)
308  {
309  mNameOfY = name;
310  }
311 
315 
316 
318 
319 protected:
322 
323 
327 
328 
332 
333 
337 
338 
342 
343 
347 
348 
352 
353 
355 
356 private:
359 
360 
364 
365  TableContainerType mData;
366  std::string mNameOfX;
367  std::string mNameOfY;
368 
372 
373 
374 
378 
382 
383  friend class Serializer;
384 
385  virtual void save(Serializer& rSerializer) const
386  {
387  std::size_t local_size = mData.size();
388 
389  rSerializer.save("size", local_size);
390 
391  for(auto i_row = mData.begin() ; i_row != mData.end() ; i_row++){
392  rSerializer.save("Argument", i_row->first);
393  for(auto j = i_row->second.begin() ; j != i_row->second.end(); j++)
394  rSerializer.save("Column", j);
395  }
396  }
397 
398  virtual void load(Serializer& rSerializer)
399  {
400  std::size_t local_size;
401 
402  rSerializer.load("size", local_size);
403 
404  mData.resize(local_size);
405 
406  for(auto i_row = mData.begin() ; i_row != mData.end() ; i_row++){
407  rSerializer.load("Argument", i_row->first);
408  for(auto j = i_row->second.begin() ; j != i_row->second.end() ; j++)
409  rSerializer.load("Column", j);
410  }
411  }
412 
413 
417 
418 
422 
423 
427 
428 
430 
431 }; // Class Table
432 
433 template<>
435 {
436 public:
439 
442 
443  typedef double TResultType;
444  typedef double TArgumentType;
445 
446  typedef std::array<TResultType, 1> result_row_type;
447 
448  typedef std::pair<TArgumentType, result_row_type> RecordType;
449 
450  typedef std::vector<RecordType> TableContainerType;
451 
454 
458 
459  Table() = default;
460 
462  template<class TMatrixType>
463  explicit Table(TMatrixType const& ThisMatrix): mData()
464  {
465  for(unsigned int i = 0 ; i < ThisMatrix.size1() ; i++)
466  PushBack(ThisMatrix(i,0), ThisMatrix(i,1));
467  }
468 
469  virtual ~Table() = default;
470 
471 
475 
476  // I want to put operator(i,j) for accessing, operator(i) for first column and operator[i] for getting the complete row
477 
478  // This operator calculates the piecewise linear interpolation for
479  // given argument
481  {
482  return GetValue(X);
483  }
484 
485  // This operator gives the result for the nearest value to argument found in table
486  TResultType const & operator[](TArgumentType const& X) const
487  {
488  return GetNearestValue(X);
489  }
490 
491  // This operator gives the result for the nearest value to argument found in table
493  {
494  return GetNearestValue(X);
495  }
496 
500 
501  // Get the value for the given argument using piecewise linear
503  {
504  std::size_t size = mData.size();
505 
506  KRATOS_ERROR_IF(size == 0) << "Get value from empty table" << std::endl;
507 
508  if(size==1) // constant table. Returning the only value we have.
509  return mData.begin()->second[0];
510 
511  TResultType result;
512  if(X <= mData[0].first)
513  return Interpolate(X, mData[0].first, mData[0].second[0], mData[1].first, mData[1].second[0], result);
514 
515  for(std::size_t i = 1 ; i < size ; i++)
516  if(X <= mData[i].first)
517  return Interpolate(X, mData[i-1].first, mData[i-1].second[0], mData[i].first, mData[i].second[0], result);
518 
519  // now the x is outside the table and we have to extrapolate it using last two records of table.
520  return Interpolate(X, mData[size-2].first, mData[size-2].second[0], mData[size-1].first, mData[size-1].second[0], result);
521  }
522 
523  // Get the nesrest value for the given argument
525  {
526  std::size_t size = mData.size();
527 
528  KRATOS_ERROR_IF(size == 0) << "Get value from empty table" << std::endl;
529 
530  if(size==1) // constant table. Returning the only value we have.
531  return mData.begin()->second;
532 
533  if(X <= mData[0].first)
534  return mData[0].second;
535 
536  for(std::size_t i = 1 ; i < size ; i++)
537  if(X <= mData[i].first)
538  return ((X - mData[i-1].first) < (mData[i].first - X)) ? mData[i-1].second : mData[i].second;
539 
540  // now the x is outside the table and we have to extrapolate it using last two records of table.
541  return mData[size-1].second;
542  }
543 
544  // Get the nesrest value for the given argument
546  {
547  std::size_t size = mData.size();
548 
549  KRATOS_ERROR_IF(size == 0) << "Get value from empty table" << std::endl;
550 
551  if(size==1) // constant table. Returning the only value we have.
552  return mData.begin()->second[0];
553 
554  if(X <= mData[0].first)
555  return mData[0].second[0];
556 
557  for(std::size_t i = 1 ; i < size ; i++)
558  if(X <= mData[i].first)
559  return ((X - mData[i-1].first) < (mData[i].first - X)) ? mData[i-1].second[0] : mData[i].second[0];
560 
561  // now the x is outside the table and we have to extrapolate it using last two records of table.
562  return mData[size-1].second[0];
563  }
564 
565  // Get the nesrest value for the given argument
567  {
568  std::size_t size = mData.size();
569 
570  KRATOS_ERROR_IF(size == 0) << "Get value from empty table" << std::endl;
571 
572  if(size==1) // constant table. Returning the only value we have.
573  return mData.begin()->second[0];
574 
575  if(X <= mData[0].first)
576  return mData[0].second[0];
577 
578  for(std::size_t i = 1 ; i < size ; i++)
579  if(X <= mData[i].first)
580  return ((X - mData[i-1].first) < (mData[i].first - X)) ? mData[i-1].second[0] : mData[i].second[0];
581 
582  // now the x is outside the table and we have to extrapolate it using last two records of table.
583  return mData[size-1].second[0];
584  }
585 
586  TResultType& Interpolate(TArgumentType const& X, TArgumentType const& X1, TResultType const& Y1, TArgumentType const& X2, TResultType const& Y2, TResultType& Result) const
587  {
588  const double epsilon = 1e-12;
589 
590  double dx = X2 - X1;
591  TResultType dy = Y2 - Y1;
592 
593  double scale = 0.00;
594 
595  if (dx > epsilon)
596  scale = (X - X1) / dx;
597 
598  Result = Y1 + dy * scale;
599 
600  return Result;
601 
602  }
603 
604  // inserts a row in a sorted position where Xi-1 < X < Xi+1 and fills the first column with Y
605  void insert(TArgumentType const& X, TResultType const& Y)
606  {
607  result_row_type a = {{Y}};
608  insert(X,a);
609  }
610 
611 
612  // inserts a row in a sorted position where Xi-1 < X < Xi+1
613  void insert(TArgumentType const& X, result_row_type const& Y)
614  {
615  std::size_t size = mData.size();
616 
617  if(size == 0)
618  mData.push_back(RecordType(X,Y));
619  else if(X <= mData[0].first)
620  mData.insert(mData.begin(), RecordType(X,Y));
621  else if(X > mData.back().first)
622  mData.push_back(RecordType(X,Y));
623  else
624  for(std::size_t i = 1 ; i < size ; i++)
625  if((X > mData[i-1].first) && (X <= mData[i].first))
626  {
627  mData.insert(mData.begin() + i, RecordType(X,Y));
628  break;
629  }
630  }
631 
632  // assumes that the X is the greater than the last argument and put the row at the end.
633  // faster than insert.
634  void PushBack(TArgumentType const& X, TResultType const& Y)
635  {
636  result_row_type a = {{Y}};
637  mData.push_back(RecordType(X,a));
638  }
639 
640  // Get the derivative for the given argument using piecewise linear
642  {
643  std::size_t size = mData.size();
644 
645  KRATOS_ERROR_IF(size == 0) << "Get value from empty table" << std::endl;
646 
647  if(size==1) // constant table. Returning the only value we have.
648  return 0.0;
649 
650  TResultType result;
651  if(X <= mData[0].first)
652  //return Interpolate(X, mData[0].first, mData[0].second[0], mData[1].first, mData[1].second[0], result);
653  return 0.0;
654 
655  for(std::size_t i = 1 ; i < size ; i++)
656  if(X <= mData[i].first)
657  return InterpolateDerivative( mData[i-1].first, mData[i-1].second[0], mData[i].first, mData[i].second[0], result);
658 
659  // If it lies outside the table values we will return 0.0.
660  return 0.0;
661  }
662  TResultType& InterpolateDerivative( TArgumentType const& X1, TResultType const& Y1, TArgumentType const& X2, TResultType const& Y2, TResultType& Result) const
663  {
664  const double epsilon = 1e-12;
665  TArgumentType dx = X2 - X1;
666  TResultType dy = Y2 - Y1;
667  if (dx < epsilon)
668  {
669  dx=epsilon;
670  KRATOS_WARNING("")
671  << "*******************************************\n"
672  << "*** ATTENTION: SMALL dX WHEN COMPUTING ***\n"
673  << "*** DERIVATIVE FROM TABLE. SET TO 1E-12 ***\n"
674  << "*******************************************" <<std::endl;
675  }
676  Result= dy/dx;
677  return Result;
678  }
679 
683  void Clear()
684  {
685  mData.clear();
686  }
687 
691 
692 
694  {
695  return mData;
696  }
697 
698  TableContainerType const& Data() const
699  {
700  return mData;
701  }
702 
703 
707 
708 
712 
714  virtual std::string Info() const
715  {
716  return "Piecewise Linear Table";
717  }
718 
720  virtual void PrintInfo(std::ostream& rOStream) const
721  {
722  rOStream << Info();
723  }
724 
726  virtual void PrintData(std::ostream& rOStream) const
727  {
728  for(std::size_t i = 0 ; i < mData.size() ; i++)
729  rOStream << mData[i].first << "\t\t" << mData[i].second[0] << std::endl;
730  }
731 
732  const std::string& NameOfX() const
733  {
734  return mNameOfX;
735  }
736 
737  const std::string& NameOfY() const
738  {
739  return mNameOfY;
740  }
741 
742  void SetNameOfX(const std::string& name)
743  {
744  mNameOfX = name;
745  }
746 
747  void SetNameOfY(const std::string& name)
748  {
749  mNameOfY = name;
750  }
751 
755 
756 
758 
759 
760 private:
763 
764 
768 
769  TableContainerType mData;
770  std::string mNameOfX;
771  std::string mNameOfY;
772 
776 
777 
778 
782 
786 
787  friend class Serializer;
788 
789  void save(Serializer& rSerializer) const
790  {
791  std::size_t local_size = mData.size();
792 
793  rSerializer.save("size", local_size);
794 
795  for(auto i_row = mData.begin() ; i_row != mData.end() ; i_row++){
796  rSerializer.save("Argument", i_row->first);
797  for(auto j = i_row->second.begin() ; j != i_row->second.end(); j++)
798  rSerializer.save("Column", *j);
799  }
800  }
801 
802  void load(Serializer& rSerializer)
803  {
804  std::size_t local_size;
805 
806  rSerializer.load("size", local_size);
807 
808  mData.resize(local_size);
809 
810  for(auto i_row = mData.begin() ; i_row != mData.end() ; i_row++){
811  rSerializer.load("Argument", i_row->first);
812  for(auto j = i_row->second.begin() ; j != i_row->second.end() ; j++)
813  rSerializer.load("Column", *j);
814  }
815  }
816 
817 
821 
822 
826 
827 
831 
832 
834 
835 }; // Class Table
836 
838 
841 
842 
846 
847 
849 template<class TArgumentType, class TResultType>
850 inline std::istream& operator >> (std::istream& rIStream,
851  Table<TArgumentType, TResultType>& rThis);
852 
854 template<class TArgumentType, class TResultType>
855 inline std::ostream& operator << (std::ostream& rOStream,
856  const Table<TArgumentType, TResultType>& rThis)
857 {
858  rThis.PrintInfo(rOStream);
859  rOStream << std::endl;
860  rThis.PrintData(rOStream);
861 
862  return rOStream;
863 }
864 
866 
868 
869 } // namespace Kratos.
870 
871 #endif // KRATOS_TABLE_H_INCLUDED defined
872 
873 
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Variable< TArgumentType > XVariableType
Definition: table.h:452
const std::string & NameOfY() const
Definition: table.h:737
TResultType GetValue(TArgumentType const &X) const
Definition: table.h:502
TResultType & InterpolateDerivative(TArgumentType const &X1, TResultType const &Y1, TArgumentType const &X2, TResultType const &Y2, TResultType &Result) const
Definition: table.h:662
void Clear()
This method clears database.
Definition: table.h:683
void insert(TArgumentType const &X, result_row_type const &Y)
Definition: table.h:613
Variable< TResultType > YVariableType
Definition: table.h:453
std::array< TResultType, 1 > result_row_type
Definition: table.h:446
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: table.h:726
std::vector< RecordType > TableContainerType
Definition: table.h:450
void PushBack(TArgumentType const &X, TResultType const &Y)
Definition: table.h:634
TResultType operator()(TArgumentType const &X) const
Definition: table.h:480
void insert(TArgumentType const &X, TResultType const &Y)
Definition: table.h:605
KRATOS_CLASS_POINTER_DEFINITION(Table)
Pointer definition of Table.
double TResultType
Definition: table.h:443
TResultType & operator[](TArgumentType &X)
Definition: table.h:492
double TArgumentType
Definition: table.h:444
virtual std::string Info() const
Turn back information as a string.
Definition: table.h:714
void SetNameOfY(const std::string &name)
Definition: table.h:747
std::pair< TArgumentType, result_row_type > RecordType
Definition: table.h:448
const std::string & NameOfX() const
Definition: table.h:732
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: table.h:720
TResultType GetDerivative(TArgumentType const &X) const
Definition: table.h:641
TResultType const & operator[](TArgumentType const &X) const
Definition: table.h:486
void SetNameOfX(const std::string &name)
Definition: table.h:742
TResultType & GetNearestValue(TArgumentType const &X)
Definition: table.h:566
TableContainerType const & Data() const
Definition: table.h:698
TResultType & Interpolate(TArgumentType const &X, TArgumentType const &X1, TResultType const &Y1, TArgumentType const &X2, TResultType const &Y2, TResultType &Result) const
Definition: table.h:586
TableContainerType & Data()
Definition: table.h:693
result_row_type & GetNearestRow(TArgumentType const &X)
Definition: table.h:524
Table(TMatrixType const &ThisMatrix)
Matrix constructor. the template parameter must have (i,j) access operator and size1 methods defined.
Definition: table.h:463
TResultType const & GetNearestValue(TArgumentType const &X) const
Definition: table.h:545
This class represents the value of its variable depending to other variable.
Definition: piecewize_linear_table.h:63
std::pair< TArgumentType, result_row_type > RecordType
Definition: table.h:76
std::vector< RecordType > TableContainerType
Definition: table.h:78
void PushBack(TArgumentType const &X, TArrayType const &Y)
Definition: table.h:226
void insert(TArgumentType const &X, TResultType const &Y)
Definition: table.h:174
TResultType GetValue(TArgumentType const &X) const
Definition: piecewize_linear_table.h:138
const std::string & NameOfY() const
Definition: table.h:297
TResultType const & GetNearestValue(TArgumentType const &X) const
Definition: piecewize_linear_table.h:183
const std::string & NameOfX() const
Definition: table.h:292
void SetNameOfX(const std::string &name)
Definition: table.h:302
result_array_type & GetNearestRow(TArgumentType const &X)
Definition: piecewize_linear_table.h:161
void PushBack(TArgumentType const &X, result_row_type const &Y)
Definition: table.h:237
TResultType & Interpolate(TArgumentType const &X, TArgumentType const &X1, TResultType const &Y1, TArgumentType const &X2, TResultType const &Y2, TResultType &Result)
Definition: piecewize_linear_table.h:204
TResultType const & operator()(TArgumentType const &X) const
Definition: table.h:91
std::array< TResultType, TResultsColumns > result_row_type
Definition: table.h:74
virtual std::string Info() const
Turn back information as a string.
Definition: table.h:276
void insert(TArgumentType const &X, TArrayType const &Y)
Definition: table.h:183
std::pair< TArgumentType, result_array_type > RecordType
Definition: piecewize_linear_table.h:73
TResultType & operator()(TArgumentType const &X)
Definition: table.h:97
void insert(TArgumentType const &X, result_row_type const &Y)
Definition: table.h:192
void Clear()
This method clears database.
Definition: table.h:245
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: table.h:288
KRATOS_CLASS_POINTER_DEFINITION(Table)
Pointer definition of Table.
TResultType & GetNearestRow(TArgumentType const &X)
Definition: table.h:132
result_row_type const & operator[](TArgumentType const &X) const
Definition: table.h:115
TResultType const & GetNearestRow(TArgumentType const &X) const
Definition: table.h:153
void PushBack(TArgumentType const &X, TResultType const &Y)
Definition: table.h:216
friend class Serializer
Definition: table.h:383
virtual ~Table()=default
TResultType & operator()(TArgumentType const &X, std::size_t J)
Definition: table.h:109
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: table.h:282
TableContainerType const & Data() const
Definition: table.h:260
result_row_type & operator[](TArgumentType &X)
Definition: table.h:121
void SetNameOfY(const std::string &name)
Definition: table.h:307
TableContainerType & Data()
Definition: table.h:255
TResultType const & operator()(TArgumentType const &X, std::size_t J) const
Definition: table.h:103
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_WARNING(label)
Definition: logger.h:265
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
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
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
X2
Definition: generate_frictional_mortar_condition.py:120
X1
Definition: generate_frictional_mortar_condition.py:119
a
Definition: generate_stokes_twofluid_element.py:77
int local_size
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:17
def load(f)
Definition: ode_solve.py:307
int j
Definition: quadrature.py:648
J
Definition: sensitivityMatrix.py:58
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31