SU2
Public Member Functions | Protected Attributes | List of all members
CDriver Class Reference

Parent class for driving an iteration of a single or multi-zone problem. More...

#include <driver_structure.hpp>

Inheritance diagram for CDriver:
CFluidDriver CFSIDriver CGeneralDriver CHBDriver

Public Member Functions

 CDriver (char *confFile, unsigned short val_nZone, unsigned short val_nDim, SU2_Comm MPICommunicator)
 Constructor of the class. More...
 
virtual ~CDriver (void)
 Destructor of the class.
 
virtual void Run ()
 A virtual member.
 
void Geometrical_Preprocessing ()
 Construction of the edge-based data structure and the multigrid structure.
 
void Iteration_Preprocessing ()
 Definition of the physics iteration class or within a single zone. More...
 
void Solver_Preprocessing (CSolver ***solver_container, CGeometry **geometry, CConfig *config)
 Definition and allocation of all solution classes. More...
 
void Solver_Postprocessing (CSolver ***solver_container, CGeometry **geometry, CConfig *config)
 Definition and allocation of all solution classes. More...
 
void Integration_Preprocessing (CIntegration **integration_container, CGeometry **geometry, CConfig *config)
 Definition and allocation of all integration classes. More...
 
void Integration_Postprocessing (CIntegration **integration_container, CGeometry **geometry, CConfig *config)
 Definition and allocation of all integration classes. More...
 
void Interface_Preprocessing ()
 Definition and allocation of all interface classes.
 
void Numerics_Preprocessing (CNumerics ****numerics_container, CSolver ***solver_container, CGeometry **geometry, CConfig *config)
 Definition and allocation of all solver classes. More...
 
void Numerics_Postprocessing (CNumerics ****numerics_container, CSolver ***solver_container, CGeometry **geometry, CConfig *config)
 Definition and allocation of all solver classes. More...
 
void Postprocessing ()
 Deallocation routine.
 
virtual void Predict_Displacements (unsigned short donorZone, unsigned short targetZone)
 A virtual member. More...
 
virtual void Predict_Tractions (unsigned short donorZone, unsigned short targetZone)
 A virtual member. More...
 
virtual void Transfer_Displacements (unsigned short donorZone, unsigned short targetZone)
 A virtual member. More...
 
virtual void Transfer_Tractions (unsigned short donorZone, unsigned short targetZone)
 A virtual member. More...
 
virtual void Relaxation_Displacements (unsigned short donorZone, unsigned short targetZone, unsigned long iFSIIter)
 A virtual member. More...
 
virtual void Relaxation_Tractions (unsigned short donorZone, unsigned short targetZone, unsigned long iFSIIter)
 A virtual member. More...
 
virtual void Update ()
 A virtual member.
 
void StartSolver ()
 Launch the computation for all zones and all physics.
 
virtual void ResetConvergence ()
 A virtual member.
 
void PreprocessExtIter (unsigned long ExtIter)
 Perform some pre-processing before an iteration of the physics.
 
bool Monitor (unsigned long ExtIter)
 Monitor the computation.
 
void Output (unsigned long ExtIter)
 Output the solution in solution file.
 
virtual void DynamicMeshUpdate (unsigned long ExtIter)
 Perform a dynamic mesh deformation, including grid velocity computation and update of the multigrid structure.
 
virtual void StaticMeshUpdate ()
 Perform a static mesh deformation, without considering grid velocity.
 
virtual void SetInitialMesh ()
 Perform a mesh deformation as initial condition.
 
su2double Get_Drag ()
 Get the total drag. More...
 
su2double Get_Lift ()
 Get the total lift. More...
 
su2double Get_Mx ()
 Get the total x moment. More...
 
su2double Get_My ()
 Get the total y moment. More...
 
su2double Get_Mz ()
 Get the total z moment. More...
 
su2double Get_DragCoeff ()
 Get the total drag coefficient. More...
 
su2double Get_LiftCoeff ()
 Get the total lift coefficient. More...
 
unsigned short GetMovingMarker ()
 Get the moving marker identifier. More...
 
unsigned long GetNumberVertices (unsigned short iMarker)
 Get the number of vertices (halo nodes included) from a specified marker. More...
 
unsigned long GetNumberHaloVertices (unsigned short iMarker)
 Get the number of halo vertices from a specified marker. More...
 
bool IsAHaloNode (unsigned short iMarker, unsigned short iVertex)
 Check if a vertex is physical or not (halo node) on a specified marker. More...
 
unsigned long GetnExtIter ()
 Get the number of external iterations. More...
 
unsigned long GetVertexGlobalIndex (unsigned short iMarker, unsigned short iVertex)
 Get the global index of a vertex on a specified marker. More...
 
su2double GetVertexCoordX (unsigned short iMarker, unsigned short iVertex)
 Get the x coordinate of a vertex on a specified marker. More...
 
su2double GetVertexCoordY (unsigned short iMarker, unsigned short iVertex)
 Get the y coordinate of a vertex on a specified marker. More...
 
su2double GetVertexCoordZ (unsigned short iMarker, unsigned short iVertex)
 Get the z coordinate of a vertex on a specified marker. More...
 
bool ComputeVertexForces (unsigned short iMarker, unsigned short iVertex)
 Compute the total force (pressure and shear stress) at a vertex on a specified marker (3 components). More...
 
su2double GetVertexForceX (unsigned short iMarker, unsigned short iVertex)
 Get the x component of the force at a vertex on a specified marker. More...
 
su2double GetVertexForceY (unsigned short iMarker, unsigned short iVertex)
 Get the y component of the force at a vertex on a specified marker. More...
 
su2double GetVertexForceZ (unsigned short iMarker, unsigned short iVertex)
 Get the z component of the force at a vertex on a specified marker. More...
 
su2double GetVertexForceDensityX (unsigned short iMarker, unsigned short iVertex)
 Get the x component of the force density at a vertex on a specified marker. More...
 
su2double GetVertexForceDensityY (unsigned short iMarker, unsigned short iVertex)
 Get the y component of the force density at a vertex on a specified marker. More...
 
su2double GetVertexForceDensityZ (unsigned short iMarker, unsigned short iVertex)
 Get the z component of the force density at a vertex on a specified marker. More...
 
void SetVertexCoordX (unsigned short iMarker, unsigned short iVertex, su2double newPosX)
 Set the x coordinate of a vertex on a specified marker. More...
 
void SetVertexCoordY (unsigned short iMarker, unsigned short iVertex, su2double newPosY)
 Set the y coordinate of a vertex on a specified marker. More...
 
void SetVertexCoordZ (unsigned short iMarker, unsigned short iVertex, su2double newPosZ)
 Set the z coordinate of a vertex on a specified marker. More...
 
su2double SetVertexVarCoord (unsigned short iMarker, unsigned short iVertex)
 Set the VarCoord of a vertex on a specified marker. More...
 

Protected Attributes

char * config_file_name
 Configuration file name of the problem.
 
char runtime_file_name [MAX_STRING_SIZE]
 
su2double StartTime
 Start point of the timer for performance benchmarking.
 
su2double StopTime
 Stop point of the timer for performance benchmarking.
 
su2double UsedTime
 Elapsed time between Start and Stop point of the timer.
 
unsigned long ExtIter
 External iteration.
 
ofstream ConvHist_file
 Convergence history file.
 
unsigned short iMesh
 Iterator on mesh levels.
 
unsigned short iZone
 Iterator on zones.
 
unsigned short nZone
 Total number of zones in the problem.
 
unsigned short nDim
 Number of dimensions.
 
bool StopCalc
 Stop computation flag.
 
bool fsi
 FSI simulation flag.
 
CIteration ** iteration_container
 Container vector with all the iteration methods.
 
COutputoutput
 Pointer to the COutput class.
 
CIntegration *** integration_container
 Container vector with all the integration methods.
 
CGeometry *** geometry_container
 Geometrical definition of the problem.
 
CSolver **** solver_container
 Container vector with all the solutions.
 
CNumerics ***** numerics_container
 Description of the numerical method (the way in which the equations are solved).
 
CConfig ** config_container
 Definition of the particular problem.
 
CSurfaceMovement ** surface_movement
 Surface movement classes of the problem.
 
CVolumetricMovement ** grid_movement
 Volume grid movement classes of the problem.
 
CFreeFormDefBox *** FFDBox
 FFD FFDBoxes of the problem.
 
CInterpolator *** interpolator_container
 Definition of the interpolation method between non-matching discretizations of the interface.
 
CTransfer *** transfer_container
 Definition of the transfer of information and the physics involved in the interface.
 
su2double APIVarCoord [3]
 This is used to store the VarCoord of each node.
 
su2double APINodalForce [3]
 This is used to store the force at each node.
 
su2double APINodalForceDensity [3]
 This is used to store the force density at each node.
 

Detailed Description

Parent class for driving an iteration of a single or multi-zone problem.

Author
T. Economon
Version
5.0.0 "Raven"

Constructor & Destructor Documentation

§ CDriver()

CDriver::CDriver ( char *  confFile,
unsigned short  val_nZone,
unsigned short  val_nDim,
SU2_Comm  MPICommunicator 
)

Constructor of the class.

Parameters
[in]confFile- Configuration file name.
[in]val_nZone- Total number of zones.
[in]val_nDim- Number of dimensions.
[in]MPICommunicator- MPI communicator for SU2.

Member Function Documentation

§ ComputeVertexForces()

bool CDriver::ComputeVertexForces ( unsigned short  iMarker,
unsigned short  iVertex 
)

Compute the total force (pressure and shear stress) at a vertex on a specified marker (3 components).

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
True if the vertex is a halo node (non physical force).

§ Get_Drag()

su2double CDriver::Get_Drag ( )

Get the total drag.

Returns
Total drag.

§ Get_DragCoeff()

su2double CDriver::Get_DragCoeff ( )

Get the total drag coefficient.

Returns
Total drag coefficient.

§ Get_Lift()

su2double CDriver::Get_Lift ( )

Get the total lift.

Returns
Total lift.

§ Get_LiftCoeff()

su2double CDriver::Get_LiftCoeff ( )

Get the total lift coefficient.

Returns
Total lift coefficient.

§ Get_Mx()

su2double CDriver::Get_Mx ( )

Get the total x moment.

Returns
Total x moment.

§ Get_My()

su2double CDriver::Get_My ( )

Get the total y moment.

Returns
Total y moment.

§ Get_Mz()

su2double CDriver::Get_Mz ( )

Get the total z moment.

Returns
Total z moment.

§ GetMovingMarker()

unsigned short CDriver::GetMovingMarker ( )

Get the moving marker identifier.

Returns
Moving marker identifier.

§ GetnExtIter()

unsigned long CDriver::GetnExtIter ( )

Get the number of external iterations.

Returns
Number of external iterations.

§ GetNumberHaloVertices()

unsigned long CDriver::GetNumberHaloVertices ( unsigned short  iMarker)

Get the number of halo vertices from a specified marker.

Parameters
[in]iMarker- Marker identifier.
Returns
Number of vertices.

§ GetNumberVertices()

unsigned long CDriver::GetNumberVertices ( unsigned short  iMarker)

Get the number of vertices (halo nodes included) from a specified marker.

Parameters
[in]iMarker- Marker identifier.
Returns
Number of vertices.

§ GetVertexCoordX()

su2double CDriver::GetVertexCoordX ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the x coordinate of a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
x coordinate of the vertex.

§ GetVertexCoordY()

su2double CDriver::GetVertexCoordY ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the y coordinate of a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
y coordinate of the vertex.

§ GetVertexCoordZ()

su2double CDriver::GetVertexCoordZ ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the z coordinate of a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
z coordinate of the vertex.

§ GetVertexForceDensityX()

su2double CDriver::GetVertexForceDensityX ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the x component of the force density at a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
x component of the force density at the vertex.

§ GetVertexForceDensityY()

su2double CDriver::GetVertexForceDensityY ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the y component of the force density at a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
y component of the force density at the vertex.

§ GetVertexForceDensityZ()

su2double CDriver::GetVertexForceDensityZ ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the z component of the force density at a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
z component of the force density at the vertex.

§ GetVertexForceX()

su2double CDriver::GetVertexForceX ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the x component of the force at a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
x component of the force at the vertex.

§ GetVertexForceY()

su2double CDriver::GetVertexForceY ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the y component of the force at a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
y component of the force at the vertex.

§ GetVertexForceZ()

su2double CDriver::GetVertexForceZ ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the z component of the force at a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
z component of the force at the vertex.

§ GetVertexGlobalIndex()

unsigned long CDriver::GetVertexGlobalIndex ( unsigned short  iMarker,
unsigned short  iVertex 
)

Get the global index of a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
Vertex global index.

§ Integration_Postprocessing()

void CDriver::Integration_Postprocessing ( CIntegration **  integration_container,
CGeometry **  geometry,
CConfig config 
)

Definition and allocation of all integration classes.

Parameters
[in]integration_container- Container vector with all the integration methods.
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ Integration_Preprocessing()

void CDriver::Integration_Preprocessing ( CIntegration **  integration_container,
CGeometry **  geometry,
CConfig config 
)

Definition and allocation of all integration classes.

Parameters
[in]integration_container- Container vector with all the integration methods.
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ IsAHaloNode()

bool CDriver::IsAHaloNode ( unsigned short  iMarker,
unsigned short  iVertex 
)

Check if a vertex is physical or not (halo node) on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
True if the specified vertex is a halo node.

§ Iteration_Preprocessing()

void CDriver::Iteration_Preprocessing ( )

Definition of the physics iteration class or within a single zone.

Parameters
[in]iteration_container- Pointer to the iteration container to be instantiated.
[in]config- Definition of the particular problem.
[in]iZone- Index of the zone.

§ Numerics_Postprocessing()

void CDriver::Numerics_Postprocessing ( CNumerics ****  numerics_container,
CSolver ***  solver_container,
CGeometry **  geometry,
CConfig config 
)

Definition and allocation of all solver classes.

Parameters
[in]numerics_container- Description of the numerical method (the way in which the equations are solved).
[in]solver_container- Container vector with all the solutions.
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ Numerics_Preprocessing()

void CDriver::Numerics_Preprocessing ( CNumerics ****  numerics_container,
CSolver ***  solver_container,
CGeometry **  geometry,
CConfig config 
)

Definition and allocation of all solver classes.

Parameters
[in]numerics_container- Description of the numerical method (the way in which the equations are solved).
[in]solver_container- Container vector with all the solutions.
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ Predict_Displacements()

virtual void CDriver::Predict_Displacements ( unsigned short  donorZone,
unsigned short  targetZone 
)
inlinevirtual

A virtual member.

Parameters
[in]donorZone- zone in which the displacements will be predicted.
[in]targetZone- zone which receives the predicted displacements.

Reimplemented in CFSIDriver.

§ Predict_Tractions()

virtual void CDriver::Predict_Tractions ( unsigned short  donorZone,
unsigned short  targetZone 
)
inlinevirtual

A virtual member.

Parameters
[in]donorZone- zone in which the tractions will be predicted.
[in]targetZone- zone which receives the predicted traction.

Reimplemented in CFSIDriver.

§ Relaxation_Displacements()

virtual void CDriver::Relaxation_Displacements ( unsigned short  donorZone,
unsigned short  targetZone,
unsigned long  iFSIIter 
)
inlinevirtual

A virtual member.

Parameters
[in]donorZone- origin of the information.
[in]targetZone- destination of the information.
[in]iFSIIter- Fluid-Structure Interaction subiteration.

Reimplemented in CFSIDriver.

§ Relaxation_Tractions()

virtual void CDriver::Relaxation_Tractions ( unsigned short  donorZone,
unsigned short  targetZone,
unsigned long  iFSIIter 
)
inlinevirtual

A virtual member.

Parameters
[in]donorZone- origin of the information.
[in]targetZone- destination of the information.
[in]iFSIIter- Fluid-Structure Interaction subiteration.

Reimplemented in CFSIDriver.

§ SetVertexCoordX()

void CDriver::SetVertexCoordX ( unsigned short  iMarker,
unsigned short  iVertex,
su2double  newPosX 
)

Set the x coordinate of a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
[in]newPosX- New x coordinate of the vertex.

§ SetVertexCoordY()

void CDriver::SetVertexCoordY ( unsigned short  iMarker,
unsigned short  iVertex,
su2double  newPosY 
)

Set the y coordinate of a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
[in]newPosY- New y coordinate of the vertex.

§ SetVertexCoordZ()

void CDriver::SetVertexCoordZ ( unsigned short  iMarker,
unsigned short  iVertex,
su2double  newPosZ 
)

Set the z coordinate of a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
[in]newPosZ- New z coordinate of the vertex.

§ SetVertexVarCoord()

su2double CDriver::SetVertexVarCoord ( unsigned short  iMarker,
unsigned short  iVertex 
)

Set the VarCoord of a vertex on a specified marker.

Parameters
[in]iMarker- Marker identifier.
[in]iVertex- Vertex identifier.
Returns
Norm of the VarCoord.

§ Solver_Postprocessing()

void CDriver::Solver_Postprocessing ( CSolver ***  solver_container,
CGeometry **  geometry,
CConfig config 
)

Definition and allocation of all solution classes.

Parameters
[in]solver_container- Container vector with all the solutions.
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ Solver_Preprocessing()

void CDriver::Solver_Preprocessing ( CSolver ***  solver_container,
CGeometry **  geometry,
CConfig config 
)

Definition and allocation of all solution classes.

Parameters
[in]solver_container- Container vector with all the solutions.
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ Transfer_Displacements()

virtual void CDriver::Transfer_Displacements ( unsigned short  donorZone,
unsigned short  targetZone 
)
inlinevirtual

A virtual member.

Parameters
[in]donorZone- zone in which the displacements will be transferred.
[in]targetZone- zone which receives the tractions transferred.

Reimplemented in CFSIDriver.

§ Transfer_Tractions()

virtual void CDriver::Transfer_Tractions ( unsigned short  donorZone,
unsigned short  targetZone 
)
inlinevirtual

A virtual member.

Parameters
[in]donorZone- zone from which the tractions will be transferred.
[in]targetZone- zone which receives the tractions transferred.

Reimplemented in CFSIDriver.


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