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.
trilinos_mvqn_recursive_convergence_accelerator.hpp
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ \.
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Original author: Ruben Zorrilla
9 //
10 
11 #if !defined(KRATOS_TRILINOS_MVQN_RECURSIVE_CONVERGENCE_ACCELERATOR)
12 #define KRATOS_TRILINOS_MVQN_RECURSIVE_CONVERGENCE_ACCELERATOR
13 
14 /* System includes */
15 
16 /* External includes */
17 #include "Epetra_SerialDenseSolver.h"
18 
19 /* Project includes */
20 #include "includes/define.h"
21 #include "includes/variables.h"
25 
26 namespace Kratos
27 {
31 
35 
39 
43 
46 
49 template<class TSpace>
51 {
52 public:
53 
56  typedef typename std::unique_ptr< TrilinosJacobianEmulator<TSpace> > Pointer;
57 
58  typedef typename TSpace::VectorType VectorType;
59  typedef typename TSpace::VectorPointerType VectorPointerType;
60 
61  typedef typename TSpace::MatrixType MatrixType;
62  typedef typename TSpace::MatrixPointerType MatrixPointerType;
63 
64 
66 
70 
73 
78  TrilinosJacobianEmulator( ModelPart& rInterfaceModelPart,
79  const Epetra_MpiComm& rEpetraCommunicator,
80  Pointer&& OldJacobianEmulatorPointer ) :
81  mrInterfaceModelPart(rInterfaceModelPart),
82  mrEpetraCommunicator(rEpetraCommunicator)
83  {
84  mpOldJacobianEmulator = std::unique_ptr<TrilinosJacobianEmulator<TSpace> >(std::move(OldJacobianEmulatorPointer));
85  }
86 
91  TrilinosJacobianEmulator( ModelPart &rInterfaceModelPart,
92  const Epetra_MpiComm &rEpetraCommunicator,
93  Pointer &&OldJacobianEmulatorPointer,
94  const unsigned int EmulatorBufferSize) :
95  mrInterfaceModelPart(rInterfaceModelPart),
96  mrEpetraCommunicator(rEpetraCommunicator)
97  {
98  mpOldJacobianEmulator = std::unique_ptr<TrilinosJacobianEmulator<TSpace> >(std::move(OldJacobianEmulatorPointer));
99 
100  // Get the last pointer out of buffer
101  if(EmulatorBufferSize > 1)
102  {
103  TrilinosJacobianEmulator* p = (mpOldJacobianEmulator->mpOldJacobianEmulator).get();
104 
105  for(unsigned int i = 1; i < (EmulatorBufferSize); i++)
106  {
107  if(i == EmulatorBufferSize-1)
108  {
109  (p->mpOldJacobianEmulator).reset();
110  }
111  else
112  {
113  p = (p->mpOldJacobianEmulator).get();
114  }
115  }
116  }
117  else // If Jacobian buffer size equals 1 directly destroy the previous one
118  {
119  (mpOldJacobianEmulator->mpOldJacobianEmulator).reset();
120  }
121  }
122 
127  TrilinosJacobianEmulator( ModelPart &rInterfaceModelPart,
128  const Epetra_MpiComm &rEpetraCommunicator) :
129  mrInterfaceModelPart(rInterfaceModelPart),
130  mrEpetraCommunicator(rEpetraCommunicator) {}
131 
136  {
140  }
141 
146  () {}
147 
149 
153 
156 
162  void ApplyPrevStepJacobian(const VectorPointerType pWorkVector,
163  VectorPointerType pProjectedVector)
164  {
165  // Security check for the empty observation matrices case (when no correction has been done in the previous step)
166  if (mpOldJacobianEmulator->mJacobianObsMatrixV.size() != 0)
167  {
168  mpOldJacobianEmulator->ApplyJacobian(pWorkVector, pProjectedVector);
169  }
170  else
171  {
172  TSpace::Assign(*pProjectedVector, -1.0, *pWorkVector); // Consider minus the identity matrix as inverse Jacobian
173  }
174  }
175 
181  void ApplyJacobian(const VectorPointerType pWorkVector,
182  VectorPointerType pProjectedVector)
183  {
184  KRATOS_TRY;
185 
186  const unsigned int previous_iterations = mJacobianObsMatrixV.size();
187 
188  // Security check for the empty observation matrices case (when no correction has been done in the previous step)
189  if (previous_iterations == 0)
190  {
191  if (mpOldJacobianEmulator != nullptr) // If it is available, consider the previous step Jacobian
192  {
193  mpOldJacobianEmulator->ApplyJacobian(pWorkVector, pProjectedVector);
194  }
195  else // When the JacobianEmulator has no PreviousJacobianEmulator consider minus the identity matrix as inverse Jacobian
196  {
197  TSpace::Assign(*pProjectedVector, -1.0, *pWorkVector);
198  }
199  }
200  else
201  {
202  // Get the domain size
203  unsigned int n_dim = mrInterfaceModelPart.GetProcessInfo()[DOMAIN_SIZE];
204 
205  // Construct the interface map
206  int NumLocalInterfaceDofs = mrInterfaceModelPart.GetCommunicator().LocalMesh().NumberOfNodes() * n_dim;
207  int NumGlobalInterfaceDofs = mrInterfaceModelPart.GetCommunicator().GetDataCommunicator().SumAll(NumLocalInterfaceDofs);
208  int IndexBase = 0; // 0 for C-style vectors, 1 for Fortran numbering
209  Epetra_Map InterfaceMap(NumGlobalInterfaceDofs, NumLocalInterfaceDofs, IndexBase, mrEpetraCommunicator);
210 
211  // Create new vector using given map
212  auto pY(new Epetra_FEVector(InterfaceMap));
213  auto pW(new Epetra_FEVector(InterfaceMap));
214 
215  // Loop to store a std::vector<VectorType> type as Matrix type
216  Epetra_SerialDenseMatrix Vtrans_V(previous_iterations, previous_iterations);
217 
218  for (unsigned int i=0; i<previous_iterations; ++i)
219  {
221 
222  for (unsigned int j=i+1; j<previous_iterations; ++j)
223  {
225  Vtrans_V(j,i) = Vtrans_V(i,j);
226  }
227  }
228 
229  Epetra_SerialDenseVector Vtrans_r(previous_iterations);
230  Epetra_SerialDenseVector zSystemSol(previous_iterations);
231 
232  for (unsigned int i=0; i<previous_iterations; ++i)
233  {
234  Vtrans_r(i) = TSpace::Dot(mJacobianObsMatrixV[i], (*pWorkVector));
235  }
236 
237  Epetra_SerialDenseSolver EpetraSystemSolver;
238  EpetraSystemSolver.SetMatrix(Vtrans_V);
239  EpetraSystemSolver.SetVectors(zSystemSol,Vtrans_r);
240  EpetraSystemSolver.Solve();
241 
242  TSpace::SetToZero(*pY);
243  for (unsigned int j = 0; j < previous_iterations; ++j)
244  {
245  TSpace::UnaliasedAdd(*pY, zSystemSol(j), mJacobianObsMatrixV[j]);
246  }
247 
248  TSpace::UnaliasedAdd(*pY, -1.0, *pWorkVector);
249 
250  if (mpOldJacobianEmulator == nullptr)
251  {
252  TSpace::Copy(*pY, *pProjectedVector); // Consider minus the identity as previous step Jacobian
253  }
254  else
255  {
256  VectorPointerType pYminus(new VectorType(*pY));
257  TSpace::Assign(*pYminus, -1.0, *pY);
258  mpOldJacobianEmulator->ApplyJacobian(pYminus, pProjectedVector); // The minus comes from the fact that we want to apply r_k - V_k*zQR
259  }
260 
261  // w = W_k*z
262  TSpace::SetToZero(*pW);
263  for (unsigned int j = 0; j < previous_iterations; ++j)
264  {
265  TSpace::UnaliasedAdd(*pW, zSystemSol(j), mJacobianObsMatrixW[j]);
266  }
267 
268  TSpace::UnaliasedAdd(*pProjectedVector, 1.0, *pW);
269 
270  }
271 
272  KRATOS_CATCH( "" );
273 
274  }
275 
280  void AppendColToV(const VectorType& rNewColV)
281  {
282  KRATOS_TRY;
283 
284  mJacobianObsMatrixV.push_back(rNewColV);
285 
286  KRATOS_CATCH( "" );
287  }
288 
293  void AppendColToW(const VectorType& rNewColW)
294  {
295  KRATOS_TRY;
296 
297  mJacobianObsMatrixW.push_back(rNewColW);
298 
299  KRATOS_CATCH( "" );
300  }
301 
306  void DropAndAppendColToV(const VectorType& rNewColV)
307  {
308  KRATOS_TRY;
309 
310  // Observation matrices size are close to the interface DOFs number. Old columns are to be dropped.
311  for (unsigned int i = 0; i < (TSpace::Size(mJacobianObsMatrixV[0])-1); i++)
312  {
314  }
315 
316  // Substitute the last column by the new information.
317  mJacobianObsMatrixV.back() = rNewColV;
318 
319  KRATOS_CATCH( "" );
320  }
321 
326  void DropAndAppendColToW(const VectorType& rNewColW)
327  {
328  KRATOS_TRY;
329 
330  // Observation matrices size are close to the interface DOFs number. Old columns are to be dropped.
331  for (unsigned int i = 0; i < (TSpace::Size(mJacobianObsMatrixV[0])-1); i++)
332  {
334  }
335 
336  // Substitute the last column by the new information.
337  mJacobianObsMatrixW.back() = rNewColW;
338 
339  KRATOS_CATCH( "" );
340  }
341 
343 
347 
351 
355 
358 
359 protected:
360 
364 
367  ModelPart& mrInterfaceModelPart; // Interface model part
368  const Epetra_MpiComm& mrEpetraCommunicator; // Epetra communicator
369 
370  Pointer mpOldJacobianEmulator; // Pointer to the old Jacobian
371 
372  std::vector<VectorType> mJacobianObsMatrixV; // Residual increment observation matrix
373  std::vector<VectorType> mJacobianObsMatrixW; // Solution increment observation matrix
374 
376 
380 
384 
388 
392 
396 
397 private:
398 
402 
406 
410 
414 
418 
421 
425 
429 
430 }; /* Class TrilinosJacobianEmulator */
431 
432 
439 template<class TSparseSpace, class TDenseSpace>
441 {
442 public:
446 
448  typedef typename BaseType::Pointer BaseTypePointer;
449 
451 
453  typedef typename TSparseSpace::VectorPointerType VectorPointerType;
454 
457 
461 
467  ModelPart& rInterfaceModelPart,
468  const Epetra_MpiComm& rEpetraCommunicator,
469  Parameters rConvAcceleratorParameters)
470  : mrInterfaceModelPart(rInterfaceModelPart)
471  , mrEpetraCommunicator(rEpetraCommunicator)
472  {
473  Parameters mvqn_recursive_default_parameters(R"(
474  {
475  "solver_type" : "MVQN_recursive",
476  "w_0" : 0.825,
477  "buffer_size" : 10,
478  "interface_block_newton" : false
479  }
480  )");
481 
482  rConvAcceleratorParameters.ValidateAndAssignDefaults(mvqn_recursive_default_parameters);
483 
484  mProblemSize = 0;
485  mOmega_0 = rConvAcceleratorParameters["w_0"].GetDouble();
486  mJacobianBufferSize = rConvAcceleratorParameters["buffer_size"].GetInt();
490  }
491 
493  const Epetra_MpiComm& rEpetraCommunicator,
494  const double OmegaInitial = 0.825,
495  const unsigned int JacobianBufferSize = 7 ):
496  mrInterfaceModelPart(rInterfaceModelPart),
497  mrEpetraCommunicator(rEpetraCommunicator),
498  mOmega_0(OmegaInitial),
499  mJacobianBufferSize(JacobianBufferSize)
500  {
501  mProblemSize = 0;
505  }
506 
511  {
514  mOmega_0 = rOther.mOmega_0;
519  }
520 
525  () {}
526 
528 
532 
535 
539  void Initialize() override
540  {
541  KRATOS_TRY;
542 
543  mpCurrentJacobianEmulatorPointer = Kratos::make_unique<TrilinosJacobianEmulator<TSparseSpace>>(
546 
547  KRATOS_CATCH( "" );
548  }
549 
550 
554  void InitializeSolutionStep() override
555  {
556  KRATOS_TRY;
557 
560 
562  {
563  // Construct the inverse Jacobian emulator
564  mpCurrentJacobianEmulatorPointer = Kratos::make_unique< TrilinosJacobianEmulator<TSparseSpace>>(
568  }
569  else
570  {
571  // Construct the inverse Jacobian emulator considering the recursive elimination
572  mpCurrentJacobianEmulatorPointer = Kratos::make_unique<TrilinosJacobianEmulator<TSparseSpace>>(
577  }
578 
579  KRATOS_CATCH( "" );
580  }
581 
588  void UpdateSolution(const VectorType& rResidualVector,
589  VectorType& rIterationGuess) override
590  {
591  KRATOS_TRY;
592 
593  mProblemSize = TSparseSpace::Size(rResidualVector);
594 
595  VectorPointerType pAuxResidualVector(new VectorType(rResidualVector));
596  VectorPointerType pAuxIterationGuess(new VectorType(rIterationGuess));
597  std::swap(mpResidualVector_1, pAuxResidualVector);
598  std::swap(mpIterationValue_1, pAuxIterationGuess);
599 
601  {
603  {
604  // The very first correction of the problem is done with a fixed point iteration
606 
608  }
609  else
610  {
611  VectorPointerType pInitialCorrection(new VectorType(rResidualVector));
612 
613  // The first correction of the current step is done with the previous step inverse Jacobian approximation
614  mpCurrentJacobianEmulatorPointer->ApplyPrevStepJacobian(mpResidualVector_1, pInitialCorrection);
615 
616  TSparseSpace::UnaliasedAdd(rIterationGuess, -1.0, *pInitialCorrection); // Recall the minus sign coming from the Taylor expansion of the residual (Newton-Raphson)
617  }
618  }
619  else
620  {
621  // Gather the new observation matrices column information
624 
625  TSparseSpace::UnaliasedAdd(*pNewColV, -1.0, *mpResidualVector_0); // NewColV = ResidualVector_1 - ResidualVector_0
626  TSparseSpace::UnaliasedAdd(*pNewColW, -1.0, *mpIterationValue_0); // NewColW = IterationValue_1 - IterationValue_0
627 
628  // Observation matrices information filling
630  {
631  // Append the new information to the existent observation matrices
632  (mpCurrentJacobianEmulatorPointer)->AppendColToV(*pNewColV);
633  (mpCurrentJacobianEmulatorPointer)->AppendColToW(*pNewColW);
634  }
635  else
636  {
637  (mpCurrentJacobianEmulatorPointer)->DropAndAppendColToV(*pNewColV);
638  (mpCurrentJacobianEmulatorPointer)->DropAndAppendColToW(*pNewColW);
639  }
640 
641  // Apply the current step inverse Jacobian emulator to the residual vector
642  VectorPointerType pIterationCorrection(new VectorType(rResidualVector));
643  mpCurrentJacobianEmulatorPointer->ApplyJacobian(mpResidualVector_1, pIterationCorrection);
644 
645  TSparseSpace::UnaliasedAdd(rIterationGuess, -1.0, *pIterationCorrection); // Recall the minus sign coming from the Taylor expansion of the residual (Newton-Raphson)
646  }
647 
648  KRATOS_CATCH( "" );
649  }
650 
655  {
656  KRATOS_TRY;
657 
658  // Variables update
661 
663 
664  KRATOS_CATCH( "" );
665  }
666 
668 
672 
676 
680 
683 
684 protected:
685 
689 
692  ModelPart& mrInterfaceModelPart; // Interface model part
693  const Epetra_MpiComm& mrEpetraCommunicator; // Epetra communicator
694  double mOmega_0; // Relaxation factor for the initial fixed point iteration
695  unsigned int mJacobianBufferSize; // User-defined Jacobian buffer-size
696 
697  unsigned int mProblemSize; // Residual to minimize size
698  unsigned int mCurrentJacobianBufferSize; // Current Jacobian buffer-size (expected to be less or equal to the user-defined one)
699  unsigned int mConvergenceAcceleratorStep; // Convergence accelerator steps counter
700  unsigned int mConvergenceAcceleratorIteration; // Convergence accelerator iteration counter
701  bool mConvergenceAcceleratorFirstCorrectionPerformed; // Indicates that the initial fixed point iteration has been already performed
702 
703  VectorPointerType mpResidualVector_0; // Previous iteration residual vector pointer
704  VectorPointerType mpResidualVector_1; // Current iteration residual vector pointer
705  VectorPointerType mpIterationValue_0; // Previous iteration guess pointer
706  VectorPointerType mpIterationValue_1; // Current iteration guess pointer
707 
708  JacobianEmulatorPointerType mpCurrentJacobianEmulatorPointer; // Current step Jacobian approximator pointer
709 
711 
715 
719 
723 
727 
731 
732 private:
733 
737 
741 
745 
749 
753 
756 
760 
764 
765 }; /* Class TrilinosMVQNRecursiveJacobianConvergenceAccelerator */
766 
768 
769 
771 
775 
779 
780 } /* namespace Kratos.*/
781 
782 #endif /* KRATOS_TRILINOS_MVQN_RECURSIVE_CONVERGENCE_ACCELERATOR defined */
virtual const DataCommunicator & GetDataCommunicator() const
Definition: communicator.cpp:340
MeshType & LocalMesh()
Returns the reference to the mesh storing all local entities.
Definition: communicator.cpp:245
Base class for convergence accelerators This class is intended to be the base of any convergence acce...
Definition: convergence_accelerator.h:43
SizeType NumberOfNodes() const
Definition: mesh.h:259
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Communicator & GetCommunicator()
Definition: model_part.h:1821
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
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
Jacobian emulator.
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:51
ModelPart & mrInterfaceModelPart
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:367
TSpace::VectorType VectorType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:58
TrilinosJacobianEmulator(const TrilinosJacobianEmulator &rOther)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:135
Pointer mpOldJacobianEmulator
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:370
std::unique_ptr< TrilinosJacobianEmulator< TSpace > > Pointer
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:56
const Epetra_MpiComm & mrEpetraCommunicator
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:368
TSpace::MatrixPointerType MatrixPointerType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:62
void AppendColToV(const VectorType &rNewColV)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:280
TrilinosJacobianEmulator(ModelPart &rInterfaceModelPart, const Epetra_MpiComm &rEpetraCommunicator, Pointer &&OldJacobianEmulatorPointer)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:78
void ApplyPrevStepJacobian(const VectorPointerType pWorkVector, VectorPointerType pProjectedVector)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:162
virtual ~TrilinosJacobianEmulator()
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:146
void ApplyJacobian(const VectorPointerType pWorkVector, VectorPointerType pProjectedVector)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:181
void AppendColToW(const VectorType &rNewColW)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:293
void DropAndAppendColToW(const VectorType &rNewColW)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:326
TrilinosJacobianEmulator(ModelPart &rInterfaceModelPart, const Epetra_MpiComm &rEpetraCommunicator)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:127
std::vector< VectorType > mJacobianObsMatrixW
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:373
std::vector< VectorType > mJacobianObsMatrixV
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:372
TrilinosJacobianEmulator(ModelPart &rInterfaceModelPart, const Epetra_MpiComm &rEpetraCommunicator, Pointer &&OldJacobianEmulatorPointer, const unsigned int EmulatorBufferSize)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:91
TSpace::MatrixType MatrixType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:61
TSpace::VectorPointerType VectorPointerType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:59
void DropAndAppendColToV(const VectorType &rNewColV)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:306
MVQN (MultiVectorQuasiNewton method) acceleration scheme Recursive MultiVectorQuasiNewton convergence...
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:441
void FinalizeNonLinearIteration() override
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:654
KRATOS_CLASS_POINTER_DEFINITION(TrilinosMVQNRecursiveJacobianConvergenceAccelerator)
unsigned int mConvergenceAcceleratorStep
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:699
VectorPointerType mpResidualVector_0
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:703
unsigned int mJacobianBufferSize
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:695
BaseType::Pointer BaseTypePointer
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:448
void UpdateSolution(const VectorType &rResidualVector, VectorType &rIterationGuess) override
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:588
VectorPointerType mpIterationValue_0
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:705
VectorPointerType mpIterationValue_1
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:706
BaseType::MatrixPointerType MatrixPointerType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:456
TrilinosJacobianEmulator< TSparseSpace >::Pointer JacobianEmulatorPointerType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:450
void InitializeSolutionStep() override
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:554
virtual ~TrilinosMVQNRecursiveJacobianConvergenceAccelerator()
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:525
ConvergenceAccelerator< TSparseSpace, TDenseSpace > BaseType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:447
unsigned int mProblemSize
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:697
TSparseSpace::VectorType VectorType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:452
TrilinosMVQNRecursiveJacobianConvergenceAccelerator(ModelPart &rInterfaceModelPart, const Epetra_MpiComm &rEpetraCommunicator, const double OmegaInitial=0.825, const unsigned int JacobianBufferSize=7)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:492
TSparseSpace::VectorPointerType VectorPointerType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:453
void Initialize() override
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:539
TrilinosMVQNRecursiveJacobianConvergenceAccelerator(ModelPart &rInterfaceModelPart, const Epetra_MpiComm &rEpetraCommunicator, Parameters rConvAcceleratorParameters)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:466
ModelPart & mrInterfaceModelPart
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:692
unsigned int mConvergenceAcceleratorIteration
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:700
JacobianEmulatorPointerType mpCurrentJacobianEmulatorPointer
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:708
VectorPointerType mpResidualVector_1
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:704
unsigned int mCurrentJacobianBufferSize
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:698
bool mConvergenceAcceleratorFirstCorrectionPerformed
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:701
double mOmega_0
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:694
const Epetra_MpiComm & mrEpetraCommunicator
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:693
BaseType::MatrixType MatrixType
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:455
TrilinosMVQNRecursiveJacobianConvergenceAccelerator(const TrilinosMVQNRecursiveJacobianConvergenceAccelerator &rOther)
Definition: trilinos_mvqn_recursive_convergence_accelerator.hpp:510
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
TSparseSpace::VectorType VectorType
Definition: convergence_accelerator.h:50
TSparseSpace::VectorPointerType VectorPointerType
Definition: convergence_accelerator.h:53
TSparseSpace::MatrixPointerType MatrixPointerType
Definition: convergence_accelerator.h:54
TSparseSpace::MatrixType MatrixType
Definition: convergence_accelerator.h:51
Vector VectorType
Definition: geometrical_transformation_utilities.h:56
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
TSpaceType::IndexType Size(TSpaceType &dummy, typename TSpaceType::VectorType const &rV)
Definition: add_strategies_to_python.cpp:111
double Dot(SparseSpaceType &dummy, SparseSpaceType::VectorType &rX, SparseSpaceType::VectorType &rY)
Definition: add_strategies_to_python.cpp:85
void UnaliasedAdd(TSpaceType &dummy, typename TSpaceType::VectorType &x, const double A, const typename TSpaceType::VectorType &rY)
Definition: add_strategies_to_python.cpp:170
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 j
Definition: quadrature.py:648
p
Definition: sensitivityMatrix.py:52
integer i
Definition: TensorModule.f:17