SU2
Public Member Functions | List of all members
CMultiGridIntegration Class Reference

Class for doing the numerical integration using a multigrid method. More...

#include <integration_structure.hpp>

Inheritance diagram for CMultiGridIntegration:
CIntegration

Public Member Functions

 CMultiGridIntegration (CConfig *config)
 Constructor of the class. More...
 
 ~CMultiGridIntegration (void)
 Destructor of the class.
 
void MultiGrid_Iteration (CGeometry ***geometry, CSolver ****solver_container, CNumerics *****numerics_container, CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone)
 This subroutine calls the MultiGrid_Cycle and also prepare the multigrid levels and the monitoring. More...
 
void MultiGrid_Cycle (CGeometry ***geometry, CSolver ****solver_container, CNumerics *****numerics_container, CConfig **config, unsigned short iMesh, unsigned short mu, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone)
 Perform a Full-Approximation Storage (FAS) Multigrid. More...
 
void NonDimensional_Parameters (CGeometry **geometry, CSolver ***solver_container, CNumerics ****numerics_container, CConfig *config, unsigned short FinestMesh, unsigned short RunTime_EqSystem, unsigned long Iteration, su2double *monitor)
 Compute the non-dimensional parameters. More...
 
void SetProlongated_Solution (unsigned short RunTime_EqSystem, CSolver *sol_fine, CSolver *sol_coarse, CGeometry *geo_fine, CGeometry *geo_coarse, CConfig *config)
 Compute the fine solution from a coarse solution. More...
 
void GetProlongated_Correction (unsigned short RunTime_EqSystem, CSolver *sol_fine, CSolver *sol_coarse, CGeometry *geo_fine, CGeometry *geo_coarse, CConfig *config)
 Compute the fine grid correction from the coarse solution. More...
 
void SmoothProlongated_Correction (unsigned short RunTime_EqSystem, CSolver *solver, CGeometry *geometry, unsigned short val_nSmooth, su2double val_smooth_coeff, CConfig *config)
 Do an implicit smoothing of the prolongated correction. More...
 
void Smooth_Solution (unsigned short RunTime_EqSystem, CSolver *solver, CGeometry *geometry, unsigned short val_nSmooth, su2double val_smooth_coeff, CConfig *config)
 Do an implicit smoothing of the solution. More...
 
void SetProlongated_Correction (CSolver *sol_fine, CGeometry *geo_fine, CConfig *config, unsigned short iMesh)
 Set the value of the corrected fine grid solution. More...
 
void SetRestricted_Residual (CSolver *sol_fine, CSolver *sol_coarse, CGeometry *geo_fine, CGeometry *geo_coarse, CConfig *config)
 Compute truncation error in the coarse grid using the fine grid information. More...
 
void SetRestricted_Solution (unsigned short RunTime_EqSystem, CSolver *sol_fine, CSolver *sol_coarse, CGeometry *geo_fine, CGeometry *geo_coarse, CConfig *config)
 Restrict solution from fine grid to a coarse grid. More...
 
void SetRestricted_Gradient (unsigned short RunTime_EqSystem, CSolver *sol_fine, CSolver *sol_coarse, CGeometry *geo_fine, CGeometry *geo_coarse, CConfig *config)
 Compute the gradient in coarse grid using the fine grid information. More...
 
void SetResidual_Term (CGeometry *geometry, CSolver *flow)
 Add the truncation error to the residual. More...
 
void SetForcing_Term (CSolver *sol_fine, CSolver *sol_coarse, CGeometry *geo_fine, CGeometry *geo_coarse, CConfig *config, unsigned short iMesh)
 Compute the forcing term. More...
 
- Public Member Functions inherited from CIntegration
 CIntegration (CConfig *config)
 Constructor of the class.
 
virtual ~CIntegration (void)
 Destructor of the class.
 
void Space_Integration (CGeometry *geometry, CSolver **solver_container, CNumerics **numerics, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem)
 Do the space integration of the numerical system. More...
 
void Space_Integration_FEM (CGeometry *geometry, CSolver **solver_container, CNumerics **numerics, CConfig *config, unsigned short RunTime_EqSystem, unsigned long Iteration)
 Do the space integration of the numerical system on a FEM framework. More...
 
void Time_Integration (CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep, unsigned short RunTime_EqSystem, unsigned long Iteration)
 Do the time integration (explicit or implicit) of the numerical system. More...
 
void Time_Integration_FEM (CGeometry *geometry, CSolver **solver_container, CNumerics **numerics, CConfig *config, unsigned short RunTime_EqSystem, unsigned long Iteration)
 Do the time integration (explicit or implicit) of the numerical system on a FEM framework. More...
 
void Adjoint_Setup (CGeometry ***geometry, CSolver ****solver_container, CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone)
 Initialize the adjoint solution using the primal problem. More...
 
void Convergence_Monitoring (CGeometry *geometry, CConfig *config, unsigned long Iteration, su2double monitor, unsigned short iMesh)
 Do the convergence analisys to determine if the code must stop the execution. More...
 
void Convergence_Monitoring_FEM (CGeometry *geometry, CConfig *config, CSolver *solver, unsigned long iFSIIter)
 Do the convergence analysis to determine if the structural FEM analysis has converged. More...
 
void Convergence_Monitoring_FSI (CGeometry *fea_geometry, CConfig *fea_config, CSolver *fea_solver, unsigned long iFSIIter)
 Do the convergence analysis to determine if the FSI problem has converged on the structural side. More...
 
su2double GetCauchy_Value (void)
 Get the value of the convergence. More...
 
bool GetConvergence (void)
 Get the indicator of the convergence for the direct, adjoint and linearized problem. More...
 
bool GetConvergence_FSI (void)
 Get the indicator of the convergence for the Fluid-Structure Interaction problem. More...
 
void SetConvergence (bool value)
 Set the indicator of the convergence. More...
 
void SetConvergence_FSI (bool valueFSI)
 Set the indicator of the convergence for FSI. More...
 
bool GetConvergence_FullMG (void)
 Get the indicator of the convergence for the full multigrid problem. More...
 
void SetDualTime_Solver (CGeometry *geometry, CSolver *solver, CConfig *config, unsigned short iMesh)
 Save the solution, and volume at different time steps. More...
 
void SetStructural_Solver (CGeometry *geometry, CSolver *solver, CConfig *config, unsigned short iMesh)
 Save the structural solution at different time steps. More...
 
void SetFEM_StructuralSolver (CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh)
 Save the structural solution at different time steps. More...
 
virtual void SetRestricted_EddyVisc (unsigned short RunTime_EqSystem, CSolver *sol_fine, CSolver *sol_coarse, CGeometry *geo_fine, CGeometry *geo_coarse, CConfig *config)
 A virtual member. More...
 
virtual void SingleGrid_Iteration (CGeometry ***geometry, CSolver ****solver_container, CNumerics *****numerics_container, CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone)
 A virtual member. More...
 
virtual void Structural_Iteration (CGeometry ***geometry, CSolver ****solver_container, CNumerics *****numerics_container, CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone)
 A virtual member. More...
 
virtual void SetPotential_Solver (CGeometry ***geometry, CSolver ****solver_container, CNumerics *****numerics_container, CConfig **config, unsigned short RunTime_EqSystem, unsigned short iMesh, unsigned short iZone)
 A virtual member. More...
 

Additional Inherited Members

- Protected Attributes inherited from CIntegration
su2double Cauchy_Value
 Summed value of the convergence indicator.
 
su2double Cauchy_Func
 Current value of the convergence indicator at one iteration.
 
unsigned short Cauchy_Counter
 Number of elements of the Cauchy serial.
 
su2double * Cauchy_Serie
 Complete Cauchy serial.
 
su2double Old_Func
 Old value of the objective function (the function which is monitored).
 
su2double New_Func
 Current value of the objective function (the function which is monitored).
 
bool Convergence
 To indicate if the flow solver (direct, adjoint, or linearized) has converged or not.
 
bool Convergence_FSI
 To indicate if the FSI problem has converged or not.
 
bool Convergence_FullMG
 To indicate if the Full Multigrid has converged and it is necessary to add a new level.
 
su2double InitResidual
 Initial value of the residual to evaluate the convergence level.
 

Detailed Description

Class for doing the numerical integration using a multigrid method.

Author
F. Palacios
Version
5.0.0 "Raven"

Constructor & Destructor Documentation

§ CMultiGridIntegration()

CMultiGridIntegration::CMultiGridIntegration ( CConfig config)

Constructor of the class.

Parameters
[in]config- Definition of the particular problem.

Member Function Documentation

§ GetProlongated_Correction()

void CMultiGridIntegration::GetProlongated_Correction ( unsigned short  RunTime_EqSystem,
CSolver sol_fine,
CSolver sol_coarse,
CGeometry geo_fine,
CGeometry geo_coarse,
CConfig config 
)

Compute the fine grid correction from the coarse solution.

Parameters
[out]sol_fine- Pointer to the solution on the fine grid.
[in]sol_coarse- Pointer to the solution on the coarse grid.
[in]geo_fine- Geometrical definition of the fine grid.
[in]geo_coarse- Geometrical definition of the coarse grid.
[in]config- Definition of the particular problem.

§ MultiGrid_Cycle()

void CMultiGridIntegration::MultiGrid_Cycle ( CGeometry ***  geometry,
CSolver ****  solver_container,
CNumerics *****  numerics_container,
CConfig **  config,
unsigned short  iMesh,
unsigned short  mu,
unsigned short  RunTime_EqSystem,
unsigned long  Iteration,
unsigned short  iZone 
)
virtual

Perform a Full-Approximation Storage (FAS) Multigrid.

Parameters
[in]geometry- Geometrical definition of the problem.
[in]solver_container- Container vector with all the solutions.
[in]numerics_container- Description of the numerical method (the way in which the equations are solved).
[in]config- Definition of the particular problem.
[in]iMesh- Index of the mesh in multigrid computations.
[in]mu- Variable for controlling the kind of multigrid algorithm.
[in]RunTime_EqSystem- System of equations which is going to be solved.
[in]Iteration- Current iteration.

Reimplemented from CIntegration.

§ MultiGrid_Iteration()

void CMultiGridIntegration::MultiGrid_Iteration ( CGeometry ***  geometry,
CSolver ****  solver_container,
CNumerics *****  numerics_container,
CConfig **  config,
unsigned short  RunTime_EqSystem,
unsigned long  Iteration,
unsigned short  iZone 
)
virtual

This subroutine calls the MultiGrid_Cycle and also prepare the multigrid levels and the monitoring.

Parameters
[in]geometry- Geometrical definition of the problem.
[in]solver_container- Container vector with all the solutions.
[in]numerics_container- Description of the numerical method (the way in which the equations are solved).
[in]config- Definition of the particular problem.
[in]RunTime_EqSystem- System of equations which is going to be solved.
[in]Iteration- Current iteration.

Reimplemented from CIntegration.

§ NonDimensional_Parameters()

void CMultiGridIntegration::NonDimensional_Parameters ( CGeometry **  geometry,
CSolver ***  solver_container,
CNumerics ****  numerics_container,
CConfig config,
unsigned short  FinestMesh,
unsigned short  RunTime_EqSystem,
unsigned long  Iteration,
su2double *  monitor 
)
virtual

Compute the non-dimensional parameters.

Parameters
[in]geometry- Geometrical definition of the problem.
[in]solver_container- Container vector with all the solutions.
[in]config- Definition of the particular problem.
[in]RunTime_EqSystem- System of equations which is going to be solved.
[in]Iteration- Current iteration.
[in]monitor- value of the non-dimensional parameters for monitoring the convergence.

Reimplemented from CIntegration.

§ SetForcing_Term()

void CMultiGridIntegration::SetForcing_Term ( CSolver sol_fine,
CSolver sol_coarse,
CGeometry geo_fine,
CGeometry geo_coarse,
CConfig config,
unsigned short  iMesh 
)
virtual

Compute the forcing term.

Parameters
[in]sol_fine- Pointer to the solution on the fine grid.
[in]sol_coarse- Pointer to the solution on the coarse grid.
[in]geo_fine- Geometrical definition of the fine grid.
[in]geo_coarse- Geometrical definition of the coarse grid.
[in]config- Definition of the particular problem.

Reimplemented from CIntegration.

§ SetProlongated_Correction()

void CMultiGridIntegration::SetProlongated_Correction ( CSolver sol_fine,
CGeometry geo_fine,
CConfig config,
unsigned short  iMesh 
)
virtual

Set the value of the corrected fine grid solution.

Parameters
[out]sol_fine- Pointer to the solution on the fine grid.
[in]geo_fine- Geometrical definition of the fine grid.
[in]config- Definition of the particular problem.

Reimplemented from CIntegration.

§ SetProlongated_Solution()

void CMultiGridIntegration::SetProlongated_Solution ( unsigned short  RunTime_EqSystem,
CSolver sol_fine,
CSolver sol_coarse,
CGeometry geo_fine,
CGeometry geo_coarse,
CConfig config 
)
virtual

Compute the fine solution from a coarse solution.

Parameters
[in]RunTime_EqSystem- System of equations which is going to be solved.
[out]sol_fine- Pointer to the solution on the fine grid.
[in]sol_coarse- Pointer to the solution on the coarse grid.
[in]geo_fine- Geometrical definition of the fine grid.
[in]geo_coarse- Geometrical definition of the coarse grid.
[in]config- Definition of the particular problem.

Reimplemented from CIntegration.

§ SetResidual_Term()

void CMultiGridIntegration::SetResidual_Term ( CGeometry geometry,
CSolver flow 
)
virtual

Add the truncation error to the residual.

Parameters
[in]geometry- Geometrical definition of the problem.
[in]flow- Flow solution.

Reimplemented from CIntegration.

§ SetRestricted_Gradient()

void CMultiGridIntegration::SetRestricted_Gradient ( unsigned short  RunTime_EqSystem,
CSolver sol_fine,
CSolver sol_coarse,
CGeometry geo_fine,
CGeometry geo_coarse,
CConfig config 
)
virtual

Compute the gradient in coarse grid using the fine grid information.

Parameters
[in]RunTime_EqSystem- System of equations which is going to be solved.
[in]sol_fine- Pointer to the solution on the fine grid.
[out]sol_coarse- Pointer to the solution on the coarse grid.
[in]geo_fine- Geometrical definition of the fine grid.
[in]geo_coarse- Geometrical definition of the coarse grid.
[in]config- Definition of the particular problem.

Reimplemented from CIntegration.

§ SetRestricted_Residual()

void CMultiGridIntegration::SetRestricted_Residual ( CSolver sol_fine,
CSolver sol_coarse,
CGeometry geo_fine,
CGeometry geo_coarse,
CConfig config 
)
virtual

Compute truncation error in the coarse grid using the fine grid information.

Parameters
[in]sol_fine- Pointer to the solution on the fine grid.
[out]sol_coarse- Pointer to the solution on the coarse grid.
[in]geo_fine- Geometrical definition of the fine grid.
[in]geo_coarse- Geometrical definition of the coarse grid.
[in]config- Definition of the particular problem.

Reimplemented from CIntegration.

§ SetRestricted_Solution()

void CMultiGridIntegration::SetRestricted_Solution ( unsigned short  RunTime_EqSystem,
CSolver sol_fine,
CSolver sol_coarse,
CGeometry geo_fine,
CGeometry geo_coarse,
CConfig config 
)
virtual

Restrict solution from fine grid to a coarse grid.

Parameters
[in]RunTime_EqSystem- System of equations which is going to be solved.
[in]sol_fine- Pointer to the solution on the fine grid.
[out]sol_coarse- Pointer to the solution on the coarse grid.
[in]geo_fine- Geometrical definition of the fine grid.
[in]geo_coarse- Geometrical definition of the coarse grid.
[in]config- Definition of the particular problem.
[in]iMesh- Index of the mesh in multigrid computations.
[in]InclSharedDomain- Include the shared domain in the interpolation.

Reimplemented from CIntegration.

§ Smooth_Solution()

void CMultiGridIntegration::Smooth_Solution ( unsigned short  RunTime_EqSystem,
CSolver solver,
CGeometry geometry,
unsigned short  val_nSmooth,
su2double  val_smooth_coeff,
CConfig config 
)
virtual

Do an implicit smoothing of the solution.

Parameters
[in]RunTime_EqSystem- System of equations which is going to be solved.
[in]solution- Container vector with all the solutions on the finest grid.
[in]geometry- Geometrical definition of the problem.
[in]val_nSmooth- Number of smoothing iterations.
[in]val_smooth_coeff- Relaxation factor.
[in]config- Definition of the particular problem.

Reimplemented from CIntegration.

§ SmoothProlongated_Correction()

void CMultiGridIntegration::SmoothProlongated_Correction ( unsigned short  RunTime_EqSystem,
CSolver solver,
CGeometry geometry,
unsigned short  val_nSmooth,
su2double  val_smooth_coeff,
CConfig config 
)

Do an implicit smoothing of the prolongated correction.

Parameters
[in]RunTime_EqSystem- System of equations which is going to be solved.
[in]solution- Container vector with all the solutions on the finest grid.
[in]geometry- Geometrical definition of the problem.
[in]val_nSmooth- Number of smoothing iterations.
[in]val_smooth_coeff- Relaxation factor.
[in]config- Definition of the particular problem.

The documentation for this class was generated from the following files: