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.
line_search_strategy.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosSolidMechanicsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: March 2018 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 
11 #if !defined(KRATOS_LINE_SEARCH_STRATEGY_H_INCLUDED)
12 #define KRATOS_LINE_SEARCH_STRATEGY_H_INCLUDED
13 
14 // System includes
15 
16 // External includes
17 
18 // Project includes
20 
21 
22 namespace Kratos
23 {
24 
27 
31 
35 
39 
43 
44 
45 template<class TSparseSpace,
46  class TDenseSpace, // = DenseSpace<double>,
47  class TLinearSolver //= LinearSolver<TSparseSpace,TDenseSpace>
48  >
50  : public NewtonRaphsonStrategy<TSparseSpace, TDenseSpace, TLinearSolver>
51 {
52  public:
55 
56  // Counted pointer of ClassName
58 
60 
62 
64 
66 
68 
69  typedef typename BaseType::SchemeType SchemeType;
70 
71  typedef TLinearSolver LinearSolverType;
72 
75 
77 
78 
80 
82  typename SchemeType::Pointer pScheme,
83  typename BuilderAndSolverType::Pointer pBuilderAndSolver,
84  typename ConvergenceCriterionType::Pointer pConvergenceCriterion,
85  Flags& rOptions,
86  unsigned int MaxIterations = 30,
87  unsigned int LineSearchType = 0)
88  : NewtonRaphsonStrategy<TSparseSpace, TDenseSpace, TLinearSolver>(rModelPart, pScheme, pBuilderAndSolver, pConvergenceCriterion, rOptions, MaxIterations), mType(LineSearchType)
89  {mAlpha=1.0;}
90 
92  typename SchemeType::Pointer pScheme,
93  typename LinearSolverType::Pointer pLinearSolver,
94  typename ConvergenceCriterionType::Pointer pConvergenceCriterion,
95  Flags& rOptions,
96  unsigned int MaxIterations = 30,
97  unsigned int LineSearchType = 0)
98  : NewtonRaphsonStrategy<TSparseSpace, TDenseSpace, TLinearSolver>(rModelPart, pScheme, pLinearSolver, pConvergenceCriterion, rOptions, MaxIterations), mType(LineSearchType)
99  {mAlpha=1.0;}
100 
103 
120 
121  protected:
133 
134 
135  // LINESEARCH
136  void Update() override
137  {
138  KRATOS_TRY
139 
140  //select line-search type:
141  switch (mType){
142  case 0:
143  UpdateA();
144  break;
145  case 1:
146  UpdateB();
147  break;
148  case 2:
149  UpdateC();
150  break;
151  case 3:
152  UpdateD();
153  break;
154  case 4:
155  UpdateE();
156  break;
157  case 5:
158  UpdateF();
159  break;
160  }
161 
162  KRATOS_CATCH( "" )
163  }
164 
165 
176 
177  private:
183 
184  unsigned int mType;
185 
186  double mAlpha;
187 
194 
195  //**************************************************************************
196  //**************************************************************************
197 
198  // LINESEARCH (Secant type)
199  void UpdateA()
200  {
201  KRATOS_TRY
202 
203  SystemVectorType Dx0((*this->mpDx).size());
204  TSparseSpace::Assign(Dx0,1.0,(*this->mpDx));
205 
206  SystemVectorType b0((*this->mpb).size());
207  TSparseSpace::Assign(b0,1.0,(*this->mpb));
208  ComputeResidual(); // initial computation of the residual (if scaling the value of b is not the real one)
209 
210  //compute slopes:
211 
212  //s0 (alpha=0)
213  double s0 = TSparseSpace::Dot((*this->mpDx),(*this->mpb));
214 
215  //s1 (alpha=1)
216  double s1 = 0;
217  ComputeUpdatedSlope(s1,Dx0);
218 
219  //std::cout<<" s0 "<<s0<<" s1 "<<s1<<std::endl;
220 
221  double alpha = 1;
222  // if(mAlpha>1e-3)
223  // alpha = mAlpha;
224 
225  if( s0 * s1 < 0 ){
226 
227  double s2 = s1; //current slope
228 
229  double s0_0 = s0;
230  double nabla = 0.0;
231  double delta = 1.0;
232  alpha = 1.0;
233 
234  unsigned int iterations = 0;
235  unsigned int max_iterations = 10;
236 
237  while(fabs(s2)>0.5*fabs(s0_0) && iterations<max_iterations && fabs(s0)>1e-5 && fabs(s1)>1e-5 && (s0*s1)<0) {
238 
239  alpha = 0.5*(nabla+delta);
240 
241  //compute:
242  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
243  ComputeUpdatedSlope(s2,Dx0);
244 
245  if( s2 * s1 < 0 ){
246  nabla = alpha;
247  s0 = s2;
248  }
249  else if( s2 * s0 < 0 ){
250  delta = alpha;
251  s1 = s2;
252  }
253  else{
254  break;
255  }
256 
257  // std::cout<<" s0 "<<s0<<" s1 "<<s1<<" s2 "<<s2<<" nabla "<<nabla<<" delta "<<delta<<" alpha "<<alpha<<std::endl;
258 
259  ++iterations;
260  }
261 
262  if(iterations>0)
263  KRATOS_INFO("LineSearch") << "alpha: "<<alpha<<" iterations: "<<iterations<<std::endl;
264 
265  if( alpha > 1 )
266  alpha = 1;
267 
268  if( alpha <= 0 )
269  alpha = 0.001;
270 
271  mAlpha = alpha;
272  }
273 
274  //perform final update
275  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
277 
278  //restore
279  TSparseSpace::Assign((*this->mpDx), 1.0, Dx0);
280  TSparseSpace::Assign((*this->mpb), 1.0, b0);
281 
282  KRATOS_CATCH( "" )
283  }
284 
285  //**************************************************************************
286  //**************************************************************************
287 
288  // LINESEARCH (Armijo type)
289  void UpdateB()
290  {
291  KRATOS_TRY
292 
293  SystemVectorType Dx0((*this->mpDx).size());
294  TSparseSpace::Assign(Dx0,1.0,(*this->mpDx));
295 
296  SystemVectorType b0((*this->mpb).size());
297  TSparseSpace::Assign(b0,1.0,(*this->mpb));
298  ComputeResidual(); // initial computation of the residual (if scaling the value of b is not the real one)
299 
300  //compute slopes:
301 
302  //s0 (alpha=0)
303  double s0 = TSparseSpace::Dot((*this->mpDx),(*this->mpb));
304 
305  //s1 (alpha=1)
306  double s1 = 0;
307  ComputeUpdatedSlope(s1,Dx0);
308 
309  double alpha = 1;
310  // if(mAlpha>1e-3)
311  // alpha = mAlpha;
312 
313  if( s0 * s1 < 0 ){
314 
315  alpha = 1.0;
316 
317  unsigned int iterations = 0;
318  unsigned int max_iterations = 10;
319 
320  while( s1/s0 < -alpha && iterations<max_iterations && fabs(s1)>1e-5 ){
321 
322  alpha *= 0.5;
323 
324  //compute:
325  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
326  ComputeUpdatedSlope(s1,Dx0);
327 
328  // std::cout<<" s1/s0 "<<s1/s0<<" alpha "<<-alpha<<std::endl;
329 
330  // std::cout<<" s0 "<<s0<<" s1 "<<s1<<" alpha "<<alpha<<std::endl;
331 
332  ++iterations;
333  }
334 
335  if(iterations>0)
336  KRATOS_INFO("LineSearch") << "alpha: "<<alpha<<" iterations: "<<iterations<<std::endl;
337 
338  if( alpha > 1 )
339  alpha = 1;
340 
341  if( alpha <= 0 )
342  alpha = 0.001;
343 
344  mAlpha = alpha;
345  }
346 
347  //perform final update
348  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
350 
351  //restore
352  TSparseSpace::Assign((*this->mpDx),1.0, Dx0);
353  TSparseSpace::Assign((*this->mpb), 1.0, b0);
354 
355  KRATOS_CATCH( "" )
356  }
357 
358  //**************************************************************************
359  //**************************************************************************
360 
361  // LINESEARCH (Error-based type)
362  void UpdateC()
363  {
364  KRATOS_TRY
365 
366  SystemVectorType Dx0((*this->mpDx).size());
367  TSparseSpace::Assign(Dx0,1.0,(*this->mpDx));
368 
369  SystemVectorType b0((*this->mpb).size());
370  TSparseSpace::Assign(b0,1.0,(*this->mpb));
371  ComputeResidual(); // initial computation of the residual (if scaling the value of b is not the real one)
372 
373  //compute slopes:
374 
375  //s0 (alpha=0)
376  double s0 = TSparseSpace::Dot((*this->mpDx),(*this->mpb));
377 
378  //s1 (alpha=1)
379  double s1 = 0;
380  ComputeUpdatedSlope(s1,Dx0);
381 
382  double alpha = 1;
383  // if(mAlpha>1e-3)
384  // alpha = mAlpha;
385 
386  if( s0 * s1 < 0 ){
387 
388  double s2 = s1; //current slope
389 
390  double nabla = s0/s1;
391  alpha = 1.0;
392 
393  unsigned int iterations = 0;
394  unsigned int max_iterations = 10;
395 
396  while(fabs(s2/s0)>0.5 && iterations<max_iterations && fabs(s2)>1e-5) {
397 
398  if( nabla < 0 ){
399  alpha = nabla/(0.5*(nabla-sqrt(nabla*(nabla-4.0))));
400  //alpha = 0.5*(nabla+std::sqrt(nabla*(nabla-4.0)));
401  //alpha = 0.5*nabla+std::sqrt(nabla*nabla*0.25-nabla);
402  }
403  else if( nabla > 0 && nabla <= 2 ){
404  alpha = nabla * 0.5;
405  }
406  else{
407  break;
408  }
409 
410  //compute:
411  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
412  ComputeUpdatedSlope(s2,Dx0);
413 
414  nabla = s0/s2;
415 
416  // std::cout<<" s0 "<<s0<<" s2 "<<s2<<" nabla "<<nabla<<" alpha "<<alpha<<std::endl;
417 
418  ++iterations;
419  }
420 
421  if(iterations>0)
422  KRATOS_INFO("LineSearch") << "alpha: "<<alpha<<" iterations: "<<iterations<<std::endl;
423 
424  if( alpha > 1 )
425  alpha = 1;
426 
427  if( alpha <= 0 )
428  alpha = 0.001;
429 
430  mAlpha = alpha;
431  }
432 
433  //perform final update
434  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
436 
437  //restore
438  TSparseSpace::Assign((*this->mpDx),1.0, Dx0);
439  TSparseSpace::Assign((*this->mpb), 1.0, b0);
440 
441  KRATOS_CATCH( "" )
442  }
443 
444 
445  //**************************************************************************
446  //**************************************************************************
447 
448  // LINESEARCH (Bonet and Wood)
449  void UpdateD()
450  {
451  KRATOS_TRY
452 
453  SystemVectorType Dx0((*this->mpDx).size());
454  TSparseSpace::Assign(Dx0,1.0,(*this->mpDx));
455 
456  SystemVectorType b0((*this->mpb).size());
457  TSparseSpace::Assign(b0,1.0,(*this->mpb));
458  ComputeResidual(); // initial computation of the residual (if scaling the value of b is not the real one)
459 
460  //compute slopes:
461 
462  //s0 (alpha=0)
463  double s0 = TSparseSpace::Dot((*this->mpDx),(*this->mpb));
464 
465  //s1 (alpha=1)
466  double s1 = 0;
467  ComputeUpdatedSlope(s1,Dx0);
468 
469 
470  double alpha = 1;
471  // if(mAlpha>1e-3)
472  // alpha = mAlpha;
473 
474  if( s0 * s1 < 0 ){
475 
476  double s2 = s1; //current slope
477 
478  double nabla = 0.0;
479  alpha = 1.0;
480 
481  unsigned int iterations = 0;
482  unsigned int max_iterations = 3;
483 
484  while(fabs(s2)>0.5*fabs(s0) && iterations<max_iterations && fabs(s0)>1e-5 && fabs(s2)>1e-5 && (s0*s2)<0) {
485 
486  nabla = s0/s2;
487 
488  if( nabla < 0 ){
489  alpha = 0.5*(nabla+std::sqrt(nabla*(nabla-4.0)));
490  }
491  else if( nabla > 0 && nabla <= 2 ){
492  alpha = 0.5*nabla;
493  }
494  else{
495  break;
496  }
497 
498  //compute:
499  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
500  ComputeUpdatedSlope(s2,Dx0);
501 
502  ++iterations;
503  }
504 
505  if(iterations>0)
506  KRATOS_INFO("LineSearch") << "alpha: "<<alpha<<" iterations: "<<iterations<<std::endl;
507 
508  if( alpha > 1 )
509  alpha = 1;
510 
511  if( alpha <= 0 )
512  alpha = 0.001;
513 
514  mAlpha = alpha;
515  }
516 
517  //perform final update
518  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
520 
521  //restore
522  TSparseSpace::Assign((*this->mpDx),1.0, Dx0);
523  TSparseSpace::Assign((*this->mpb), 1.0, b0);
524 
525  KRATOS_CATCH( "" )
526  }
527 
528  //**************************************************************************
529  //**************************************************************************
530 
531  // LINESEARCH (Crisfield, Wriggers)
532  void UpdateE()
533  {
534  KRATOS_TRY
535 
536  SystemVectorType Dx0((*this->mpDx).size());
537  TSparseSpace::Assign(Dx0,1.0,(*this->mpDx));
538 
539  SystemVectorType b0((*this->mpb).size());
540  TSparseSpace::Assign(b0,1.0,(*this->mpb));
541  ComputeResidual(); // initial computation of the residual (if scaling the value of b is not the real one)
542 
543  //compute slopes:
544 
545  //s0 (alpha=0)
546  double s0 = TSparseSpace::Dot((*this->mpDx),(*this->mpb));
547 
548  //s1 (alpha=1)
549  double s1 = 0;
550  ComputeUpdatedSlope(s1,Dx0);
551 
552  double alpha = 1;
553  // if(mAlpha>1e-3)
554  // alpha = mAlpha;
555 
556  if( s0 * s1 < 0 ){
557 
558  double alpha = 1.0; //current_alpha
559  double nabla = 0.0; //previous_alpha
560  double delta = 0.0;
561 
562  unsigned int iterations = 0;
563  unsigned int max_iterations = 3;
564 
565  while(fabs(s1)>0.8*fabs(s0) && iterations<=max_iterations && fabs(s1)>1e-5 && fabs(s0)>1e-5 && (s0*s1)<0) {
566 
567  delta = -s1 * (alpha-nabla) / (s1-s0);
568 
569  //update:
570  nabla = alpha;
571  alpha += delta;
572  s0 = s1;
573 
574  //compute:
575  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
576  ComputeUpdatedSlope(s1,Dx0);
577 
578  ++iterations;
579  }
580 
581  if(iterations>0)
582  KRATOS_INFO("LineSearch") << "alpha: "<<alpha<<" iterations: "<<iterations<<std::endl;
583 
584  if( alpha > 1 )
585  alpha = 1;
586 
587  if( alpha <= 0 )
588  alpha = 0.001;
589 
590  mAlpha = alpha;
591  }
592 
593  //perform final update
594  TSparseSpace::Assign((*this->mpDx),alpha,Dx0);
596 
597  //restore
598  TSparseSpace::Assign((*this->mpDx),1.0, Dx0);
599  TSparseSpace::Assign((*this->mpb), 1.0, b0);
600 
601  KRATOS_CATCH( "" )
602  }
603 
604  //**************************************************************************
605  //**************************************************************************
606 
607  // LINESEARCH (Kratos core)
608  void UpdateF()
609  {
610  KRATOS_TRY
611 
612  SystemVectorType Dx0((*this->mpDx).size());
613  TSparseSpace::Assign(Dx0,1.0,(*this->mpDx));
614 
615  SystemVectorType b0((*this->mpb).size());
616  TSparseSpace::Assign(b0,1.0,(*this->mpb));
617  // ComputeResidual(); // initial computation of the residual (if scaling the value of b is not the real one)
618 
619  // //compute slopes:
620 
621  // //s0 (alpha=0)
622  // double s0 = TSparseSpace::Dot((*this->mpDx),(*this->mpb));
623 
624  // //s1 (alpha=1)
625  // double s1 = 0;
626  // ComputeUpdatedSlope(s1,Dx0);
627 
628  // //std::cout<<" s0 "<<s0<<" s1 "<<s1<<std::endl;
629 
630  double alpha = 1;
631  // // if(mAlpha>1e-3)
632  // // alpha = mAlpha;
633 
634  // if( s0 * s1 < 0 ){
635 
636  //compute residual without update
637  double ro = 0;
638  ComputeResidualNorm(ro);
639 
640  //compute half step residual
641  TSparseSpace::Assign((*this->mpDx),0.5,Dx0);
642  double rh = 0;
643  ComputeUpdatedResidualNorm(rh);
644 
645  //compute full step residual (add another half Dx to the previous half)
646  TSparseSpace::Assign((*this->mpDx),1.0,Dx0);
647  double rf = 0;
648  ComputeUpdatedResidualNorm(rf);
649 
650  //compute optimal (limited to the range 0-1)
651  //parabola is y = a*x^2 + b*x + c -> min/max for
652  //x=0 --> r=ro
653  //x=1/2 --> r=rh
654  //x=1 --> r =
655  //c= ro, b= 4*rh -rf -3*ro, a= 2*rf - 4*rh + 2*ro
656  //max found if a>0 at the position xmax = (rf/4 - rh)/(rf - 2*rh);
657  double parabola_a = 2*rf + 2*ro - 4*rh;
658  double parabola_b = 4*rh - rf - 3*ro;
659  double xmin = 1e-3;
660  double xmax = 1.0;
661  if( parabola_a > 0) //if parabola has a local minima
662  {
663  xmax = -0.5 * parabola_b/parabola_a; // -b / 2a
664  if( xmax > 1.0)
665  xmax = 1.0;
666  else if(xmax < -1.0)
667  xmax = -1.0;
668  }
669  else //parabola degenerates to either a line or to have a local max. best solution on either extreme
670  {
671  if(rf < ro)
672  xmax = 1.0;
673  else
674  xmax = xmin; //should be zero, but otherwise it will stagnate
675  }
676 
677  alpha = fabs(xmax);
678 
679  if(alpha!=1.0)
680  KRATOS_INFO("LineSearch") << "alpha: "<<alpha<<" iterations: NO "<<std::endl;
681 
682  // }
683 
684 
685  //perform final update
686  TSparseSpace::Assign((*this->mpDx),mAlpha,Dx0);
688 
689  //restore
690  TSparseSpace::Assign((*this->mpDx),1.0,Dx0);
691  TSparseSpace::Assign((*this->mpb), 1.0, b0);
692 
693  KRATOS_CATCH( "" )
694  }
695 
696 
697  //**************************************************************************
698  //**************************************************************************
699 
700  void Restore()
701  {
702  //Restore Current Displacement, Velocity, Acceleration
703  TSparseSpace::InplaceMult((*this->mpDx),-1.0);
705  TSparseSpace::InplaceMult((*this->mpDx),-1.0);
706  }
707 
708  //**************************************************************************
709  //**************************************************************************
710 
711  void ComputeSlope(double& rSlope, const SystemVectorType& rDx)
712  {
713  TSparseSpace::SetToZero((*this->mpb));
714  this->mpBuilderAndSolver->BuildRHS(this->mpScheme, BaseType::GetModelPart(), (*this->mpb) );
715  rSlope = TSparseSpace::Dot(rDx,(*this->mpb));
716  }
717 
718  //**************************************************************************
719  //**************************************************************************
720 
721  void ComputeUpdatedSlope(double& rSlope, const SystemVectorType& rDx)
722  {
724  ComputeSlope(rSlope,rDx);
725  Restore();
726  }
727 
728 
729  //**************************************************************************
730  //**************************************************************************
731 
732  void ComputeResidual()
733  {
734  TSparseSpace::SetToZero((*this->mpb));
735  this->mpBuilderAndSolver->BuildRHS(this->mpScheme, BaseType::GetModelPart(), (*this->mpb) );
736  }
737 
738 
739  //**************************************************************************
740  //**************************************************************************
741 
742  void ComputeResidualNorm(double& rNorm)
743  {
744  ComputeResidual();
745  rNorm = TSparseSpace::TwoNorm((*this->mpb));
746  }
747 
748  //**************************************************************************
749  //**************************************************************************
750 
751  void ComputeUpdatedResidualNorm(double& rNorm)
752  {
754  ComputeResidualNorm(rNorm);
755  Restore();
756  }
757 
758 
768 
771 
773 
774 };
775 
777 
780 
781 
785 
787 
789 
790 } // namespace Kratos.
791 
792 #endif // KRATOS_LINE_SEARCH_STRATEGY_H_INCLUDED
Convergence Criterion base class.
Definition: convergence_criterion.hpp:52
Definition: flags.h:58
Definition: line_search_strategy.hpp:51
BaseType::BuilderAndSolverType BuilderAndSolverType
Definition: line_search_strategy.hpp:67
~LineSearchSolutionStrategy() override
Destructor.
Definition: line_search_strategy.hpp:102
TLinearSolver LinearSolverType
Definition: line_search_strategy.hpp:71
LineSearchSolutionStrategy(ModelPart &rModelPart, typename SchemeType::Pointer pScheme, typename LinearSolverType::Pointer pLinearSolver, typename ConvergenceCriterionType::Pointer pConvergenceCriterion, Flags &rOptions, unsigned int MaxIterations=30, unsigned int LineSearchType=0)
Definition: line_search_strategy.hpp:91
BaseType::LocalFlagType LocalFlagType
Definition: line_search_strategy.hpp:61
BaseType::SystemVectorType SystemVectorType
Definition: line_search_strategy.hpp:63
void Update() override
Operation to update the solution ... if it is not called a trivial updater is used in which the value...
Definition: line_search_strategy.hpp:136
BaseType::SchemeType SchemeType
Definition: line_search_strategy.hpp:69
NewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
Definition: line_search_strategy.hpp:59
KRATOS_CLASS_POINTER_DEFINITION(LineSearchSolutionStrategy)
LineSearchSolutionStrategy(ModelPart &rModelPart, typename SchemeType::Pointer pScheme, typename BuilderAndSolverType::Pointer pBuilderAndSolver, typename ConvergenceCriterionType::Pointer pConvergenceCriterion, Flags &rOptions, unsigned int MaxIterations=30, unsigned int LineSearchType=0)
Constructor.
Definition: line_search_strategy.hpp:81
ConvergenceCriterion< TSparseSpace, TDenseSpace > ConvergenceCriterionType
Definition: line_search_strategy.hpp:65
SchemeType::Pointer mpScheme
Definition: linear_strategy.hpp:427
SystemVectorPointerType mpDx
The pointer to the builder and solver employed.
Definition: linear_strategy.hpp:430
void Update() override
Here the database is updated.
Definition: linear_strategy.hpp:483
BuilderAndSolverType::Pointer mpBuilderAndSolver
The pointer to the time scheme employed.
Definition: linear_strategy.hpp:428
SystemVectorPointerType mpb
The incremement in the solution.
Definition: linear_strategy.hpp:431
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This is the base Newton Raphson strategy.
Definition: newton_raphson_strategy.hpp:58
BaseType::SystemVectorType SystemVectorType
Definition: newton_raphson_strategy.hpp:84
Solution Buider and Solver base class.
Definition: solution_builder_and_solver.hpp:63
Solution scheme base class.
Definition: solution_scheme.hpp:54
ModelPart & GetModelPart()
Operations to get the pointer to the model.
Definition: solution_strategy.hpp:243
Solver local flags class definition.
Definition: solution_local_flags.hpp:48
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_INFO(label)
Definition: logger.h:250
double TwoNorm(SparseSpaceType &dummy, SparseSpaceType::VectorType &x)
Definition: add_strategies_to_python.cpp:164
double Dot(SparseSpaceType &dummy, SparseSpaceType::VectorType &rX, SparseSpaceType::VectorType &rY)
Definition: add_strategies_to_python.cpp:85
void Assign(const Expression &rExpression, const IndexType EntityIndex, const IndexType EntityDataBeginIndex, TDataType &rValue, std::index_sequence< TIndex... >)
Definition: variable_expression_data_io.cpp:41
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
int max_iterations
Definition: ProjectParameters.py:53
float xmax
Definition: cube_mesher.py:743
float xmin
Definition: cube_mesher.py:742
alpha
Definition: generate_convection_diffusion_explicit_element.py:113
double precision, dimension(3, 3), public delta
Definition: TensorModule.f:16
e
Definition: run_cpp_mpi_tests.py:31