CG
Version 25
|
Solver for advection-diffusion (AD) equations. More...
#include <Cgad.h>
Public Member Functions | |
Cgad (CompositeGrid &cg, GenericGraphicsInterface *ps=NULL, Ogshow *show=NULL, const int &plotOption=1) | |
virtual | ~Cgad () |
virtual void | addForcing (realMappedGridFunction &dvdt, const realMappedGridFunction &u, int iparam[], real rparam[], realMappedGridFunction &dvdtImplicit=Overture::nullRealMappedGridFunction(), realMappedGridFunction *referenceFrameVelocity=NULL) |
virtual void | advanceADI (real &t, real &dt, int &numberOfSubSteps, int &init, int initialStep) |
virtual int | applyBoundaryConditions (const real &t, realMappedGridFunction &u, realMappedGridFunction &gridVelocity, const int &grid, const int &option=-1, realMappedGridFunction *puOld=NULL, realMappedGridFunction *pGridVelocityOld=NULL, const real &dt=-1.) |
virtual int | applyBoundaryConditionsForImplicitTimeStepping (realMappedGridFunction &rhs, realMappedGridFunction &uL, realMappedGridFunction &gridVelocity, real t, int scalarSystem, int grid) |
virtual void | buildImplicitSolvers (CompositeGrid &cg) |
virtual int | buildTimeSteppingDialog (DialogData &dialog) |
Build the dialog that shows the various options for time stepping. | |
virtual void | formMatrixForImplicitSolve (const real &dt0, GridFunction &cgf1, GridFunction &cgf0) |
virtual int | getInterfaceDataOptions (GridFaceDescriptor &info, int &interfaceDataOptions) const |
Return the interface data required for a given type of interface. | |
virtual int | getUt (const realMappedGridFunction &v, const realMappedGridFunction &gridVelocity, realMappedGridFunction &dvdt, int iparam[], real rparam[], realMappedGridFunction &dvdtImplicit=Overture::nullRealMappedGridFunction(), MappedGrid *pmg2=NULL, const realMappedGridFunction *pGridVelocity2=NULL) |
virtual void | getTimeSteppingEigenvalue (MappedGrid &mg, realMappedGridFunction &u, realMappedGridFunction &gridVelocity, real &reLambda, real &imLambda, const int &grid) |
virtual int | getTimeSteppingOption (const aString &answer, DialogData &dialog) |
virtual void | implicitSolve (const real &dt0, GridFunction &cgf1, GridFunction &cgf0) |
virtual int | interfaceRightHandSide (InterfaceOptionsEnum option, int interfaceDataOptions, GridFaceDescriptor &info, GridFaceDescriptor &gfd, int gfIndex, real t) |
virtual void | saveShowFileComments (Ogshow &show) |
Save comments in the show file. | |
virtual int | setOgesBoundaryConditions (GridFunction &cgf, IntegerArray &boundaryConditions, RealArray &boundaryConditionData, const int imp) |
virtual int | setPlotTitle (const real &t, const real &dt) |
Set the plot titles for interactive plotting. | |
virtual int | setupGridFunctions () |
Allocate and initialize grid functions, based on the time-stepping method. | |
virtual int | setupPde (aString &reactionName, bool restartChosen, IntegerArray &originalBoundaryCondition) |
A virtual function to setup the PDE to be solved. | |
virtual int | setupUserDefinedInitialConditions () |
Choose user defined initial condition parameters. | |
virtual int | updateGeometryArrays (GridFunction &cgf) |
Update geometry arrays, solution at old times etc. after the time step has changed. | |
virtual int | updateToMatchGrid (CompositeGrid &cg) |
virtual int | userDefinedInitialConditions (CompositeGrid &cg, realCompositeGridFunction &u) |
Assign user defined initial conditions. | |
virtual void | userDefinedInitialConditionsCleanup () |
virtual void | writeParameterSummary (FILE *file) |
Output run-time parameters for the header. | |
Public Member Functions inherited from DomainSolver | |
DomainSolver (Parameters &par, CompositeGrid &cg, GenericGraphicsInterface *ps=NULL, Ogshow *show=NULL, const int &plotOption=1) | |
This is the constructor for the base class DomainSolver. | |
virtual | ~DomainSolver () |
Destructor. | |
virtual int | adaptGrids (GridFunction &gf0, int numberOfGridFunctionsToUpdate=0, realCompositeGridFunction *cgf=NULL, realCompositeGridFunction *uWork=NULL) |
virtual int | addArtificialDissipation (realCompositeGridFunction &u, real dt) |
virtual int | addArtificialDissipation (realMappedGridFunction &u, real dt, int grid) |
virtual int | addConstraintEquation (Parameters ¶meters, Oges &solver, realCompositeGridFunction &coeff, realCompositeGridFunction &ucur, realCompositeGridFunction &rhs, const int &numberOfComponents) |
virtual int | addGrids () |
virtual int | advance (real &tFinal) |
virtual void | advanceAdamsPredictorCorrector (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceAdamsPredictorCorrectorNew (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
Advance using an Adams predictor corrector method (new way) | |
void | advanceForwardEulerNew (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
Advance using an "forward-Euler" method (new way) | |
virtual void | advanceImplicitMultiStep (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceImplicitMultiStepNew (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
Generic advance routine that uses the separate time sub-step functions. | |
virtual int | advanceLineSolve (LineSolve &lineSolve, const int grid, const int direction, realCompositeGridFunction &u0, realMappedGridFunction &f, realMappedGridFunction &residual, const bool refactor, const bool computeTheResidual=false) |
virtual void | advanceMidPoint (real &t0, real &dt0, int &numberOfSubSteps, int initialStep) |
virtual void | advanceNewton (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceSecondOrderSystem (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceSteadyStateRungeKutta (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceTrapezoidal (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceVariableTimeStepAdamsPredictorCorrector (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | allSpeedImplicitTimeStep (GridFunction &gf, real &t, real &dt0, int &numberOfTimeSteps, const real &nextTimeToPrint) |
virtual int | applyBoundaryConditions (GridFunction &cgf, const int &option=-1, int grid_=-1, GridFunction *puOld=NULL, const real &dt=-1.) |
virtual int | applyBoundaryConditionsForImplicitTimeStepping (GridFunction &cgf) |
virtual int | assignInitialConditions (int gfIndex) |
Assign initial conditions. | |
virtual int | applyFilter (int gfIndex) |
This function applies a spatial filter to the solution in gf[gfIndex]. | |
virtual int | assignInterfaceBoundaryConditions (GridFunction &cgf, const int &option=-1, int grid_=-1, GridFunction *puOld=NULL, const real &dt=-1.) |
virtual void | assignTestProblem (GridFunction &gf) |
virtual void | bodyForcingCleanup () |
This routine is called when DomainSolver is finished and can be used to clean up memory. | |
virtual int | boundaryConditionPredictor (const BoundaryConditionPredictorEnum bcpOption, const AdamsPCData &adamsData, const int orderOfExtrapolation, const int mNew, const int mCur, const int mOld, realCompositeGridFunction *puga=NULL, realCompositeGridFunction *pugb=NULL, realCompositeGridFunction *pugc=NULL, realCompositeGridFunction *pugd=NULL) |
Apply operations required before applying the boundary conditions. E.g. extrapolate the pressure in time for fourth-order INS. | |
virtual int | buildAdaptiveGridOptionsDialog (DialogData &dialog) |
Build the dialog that shows the various general options. | |
virtual int | buildAmrGridsForInitialConditions () |
Build the AMR hierarchy of grids for the initial conditions. | |
virtual int | buildForcingOptionsDialog (DialogData &dialog) |
Build the dialog that shows the various forcing options. | |
virtual int | buildGeneralOptionsDialog (DialogData &dialog) |
Build the dialog that shows the various general options. | |
virtual int | buildGrid (Mapping *&newMapping, int newGridNumber, IntegerArray &sharedBoundaryCondition) |
virtual int | buildOutputOptionsDialog (DialogData &dialog) |
Build the output options dialog. | |
virtual int | buildMovingGridOptionsDialog (DialogData &dialog) |
Build the dialog that shows the various general options. | |
virtual int | buildPlotOptionsDialog (DialogData &dialog) |
Build the plot options dialog. | |
virtual int | buildRunTimeDialog () |
Build the run time dialog. This dialog appears while a Domain solver is time stepping. | |
void | checkArrays (const aString &label) |
void | checkSolution (const realGridCollectionFunction &u, const aString &title, bool printResults=false) |
int | checkSolution (realMappedGridFunction &u, const aString &title, bool printResults, int grid, real &maxVal, bool printResultsOnFailure=false) |
virtual void | cleanupInitialConditions () |
Cleanup routines after the initial conditions have been assigned. | |
virtual int | computeBodyForcing (GridFunction &gf, const real &tForce) |
Compute the body forcing such as drag models, wake models and heat sources. | |
virtual void | computeNumberOfStepsAndAdjustTheTimeStep (const real &t, const real &tFinal, const real &nextTimeToPrint, int &numberOfSubSteps, real &dtNew, const bool &adjustTimeStep=true) |
virtual void | correctMovingGrids (const real t1, const real t2, GridFunction &cgf1, GridFunction &cgf2) |
Corrector step for moving grids. | |
const int & | debug () const |
virtual void | determineErrors (GridFunction &cgf, const aString &label=nullString) |
virtual void | determineErrors (realCompositeGridFunction &u, realMappedGridFunction **gridVelocity, const real &t, const int options, RealArray &err, const aString &label=nullString) |
virtual void | determineErrors (realMappedGridFunction &v, const real &t) |
virtual void | displayBoundaryConditions (FILE *file=stdout) |
virtual int | displayParameters (FILE *file=stdout) |
Display DomainSolver parameters. | |
virtual int | endTimeStep (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual int | endTimeStepFE (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual int | endTimeStepIM (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual int | endTimeStepPC (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual int | endTimeStepAF (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual void | eulerStep (const real &t1, const real &t2, const real &t3, const real &dt0, GridFunction &cgf1, GridFunction &cgf2, GridFunction &cgf3, realCompositeGridFunction &ut, realCompositeGridFunction &uti, int stepNumber, int &numberOfSubSteps) |
void | extrapolateInterpolationNeighbours (GridFunction &gf, const Range &C) |
Extrapolate interpolation neighbours. | |
virtual int | fixupUnusedPoints (realCompositeGridFunction &u) |
virtual int | getAmrErrorFunction (realCompositeGridFunction &u, real t, intCompositeGridFunction &errorFlag, realCompositeGridFunction &error) |
virtual int | getAmrErrorFunction (realCompositeGridFunction &u, real t, realCompositeGridFunction &error, bool computeOnFinestLevel=false) |
virtual realCompositeGridFunction & | getAugmentedSolution (GridFunction &gf0, realCompositeGridFunction &v) |
const aString & | getClassName () const |
virtual int | getAdaptiveGridOption (const aString &answer, DialogData &dialog) |
: Look for a general option in the string "answer" | |
virtual int | getForcingOption (const aString &command, DialogData &dialog) |
: Look for a forcing option in the string "answer" | |
virtual int | getGeneralOption (const aString &answer, DialogData &dialog) |
: Look for a general option in the string "answer" | |
virtual void | getGridInfo (real &totalNumberOfGridPoints, real dsMin[3], real dsAve[3], real dsMax[3], real &maxMax, real &maxMin, real &minMin) |
Evaluate the min and max grid spacing, total number of grid points etc. | |
virtual void | getGridVelocity (GridFunction &gf0, const real &tGV) |
virtual int | getInitialConditions (const aString &command=nullString, DialogData *interface=NULL, GUIState *guiState=NULL, DialogState *dialogState=NULL) |
Determine the type of initial conditions to assign. | |
int | getMaterialProperties (GridFunction &solution, realCompositeGridFunction &matProp) |
Evaluate the variable material parameters (for plotting for example). | |
real | getMovingGridMaximumRelativeCorrection () |
Return the maximum relative change in the moving grid correction scheme. This is usually only an issue for "light" bodies. | |
bool | getMovingGridCorrectionHasConverged () |
Return true if the correction steps for moving grids have converged. This is usually only an issue for "light" bodies. | |
virtual int | getMovingGridOption (const aString &answer, DialogData &dialog) |
: Look for a general option in the string "answer" | |
const aString & | getName () const |
virtual int | getOutputOption (const aString &command, DialogData &dialog) |
: Look for an output option in the string "answer" | |
const aString & | getPdeName () const |
virtual int | getPlotOption (const aString &answer, DialogData &dialog) |
: Look for a plot option in the string "answer" | |
virtual int | getResidual (real t, real dt, GridFunction &cgf, realCompositeGridFunction &residual) |
Compute the residual for "steady state" solvers. | |
int | getResidualInfo (real t0, const realCompositeGridFunction &residual, real &maximumResidual, real &maximuml2, FILE *file=NULL) |
Compute the max and l2 residuals and optionally output the info to a file. | |
virtual void | getSolutionBounds (const realMappedGridFunction &u, realArray &uMin, realArray &uMax, real &uvMax) |
virtual int | getTimeDependentBoundaryConditions (MappedGrid &mg, real t, int grid=0, int side0=-1, int axis0=-1, ForcingTypeEnum forcingType=computeForcing) |
virtual int | getTimeDerivativeOfBoundaryValues (GridFunction &gf0, const real &t, const int &grid, int side=-1, int axis=-1) |
virtual real | getTimeStep (GridFunction &gf) |
virtual real | getTimeStep (MappedGrid &mg, realMappedGridFunction &u, realMappedGridFunction &gridVelocity, const Parameters::TimeSteppingMethod &timeSteppingMethod, const int &grid) |
int | getTimeStepAndNumberOfSubSteps (GridFunction &cgf, int stepNumber, int &numberOfSubSteps, real &dt) |
Compute a new time step and the number sub-steps to reach the next time to print. | |
virtual void | getUt (GridFunction &cgf, const real &t, RealCompositeGridFunction &ut, real tForce) |
virtual int | initializeInterfaces (GridFunction &cgf) |
virtual int | initializeSolution () |
virtual int | initializeTimeStepping (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTimeSteppingFE (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTimeSteppingIM (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTimeSteppingPC (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTimeSteppingAF (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTurbulenceModels (GridFunction &cgf) |
virtual int | interpolate (GridFunction &cgf, const Range &R=nullRange) |
virtual int | interpolateAndApplyBoundaryConditions (GridFunction &cgf, GridFunction *uOld=NULL, const real &dt=-1.) |
virtual bool | isImplicitMatrixSingular (realCompositeGridFunction &uL) |
virtual int | jetInflow (GridFunction &cgf) |
virtual void | moveGrids (const real &t1, const real &t2, const real &t3, const real &dt0, GridFunction &cgf1, GridFunction &cgf2, GridFunction &cgf3) |
virtual bool | movingGridProblem () const |
virtual int | newAdaptiveGridBuilt (CompositeGrid &cg, realCompositeGridFunction &u, bool updateSolution) |
const int & | numberOfComponents () const |
virtual int | output (GridFunction &gf0, int stepNumber) |
virtual void | outputHeader () |
Output the main header banner that includes info about the grid and parameters. | |
virtual int | outputProbes (GridFunction &gf0, int stepNumber) |
output probe information at a given time | |
virtual void | outputSolution (realCompositeGridFunction &u, const real &t, const aString &label=nullString, int printOption=0) |
virtual void | outputSolution (const realMappedGridFunction &u, const real &t) |
virtual int | parabolicInflow (GridFunction &cgf) |
virtual int | plot (const real &t, const int &optionIn, real &tFinal) |
virtual int | printMemoryUsage (FILE *file=stdout) |
Output information about the memory usage. | |
void | printP (const char *format,...) const |
Domain solver print function with a prefix identifier string. | |
virtual int | printStatistics (FILE *file=stdout) |
Output timing statistics. | |
virtual void | printTimeStepInfo (const int &step, const real &t, const real &cpuTime) |
virtual int | project (GridFunction &cgf) |
virtual int | readRestartFile (realCompositeGridFunction &v, real &t, const aString &restartFileName=nullString) |
virtual int | readRestartFile (GridFunction &cgf, const aString &restartFileName=nullString) |
virtual int | saveSequenceInfo (real t0, const realCompositeGridFunction &residual) |
Save sequence info (such as the norm of the residual) into the time history arrays. | |
virtual int | saveSequencesToShowFile () |
Save sequence info to the show file. | |
virtual int | saveRestartFile (const GridFunction &cgf, const aString &restartFileName) |
virtual void | saveShow (GridFunction &gf0) |
Save a solution in the show file. | |
virtual int | setBoundaryConditionsInteractively (const aString &answer, const IntegerArray &originalBoundaryCondition) |
virtual int | setDefaultDataForBoundaryConditions () |
virtual int | setFinalTime (const real &tFinal) |
Set the time to integrate to. | |
virtual void | setInterfacesAtPastTimes (const real &t1, const real &t2, const real &t3, const real &dt0, GridFunction &cgf1, GridFunction &cgf2, GridFunction &cgf3) |
Assign interface positions for "negative" times. | |
virtual int | setInterfaceBoundaryCondition (GridFaceDescriptor &info) |
Setup an interface boundary condition. | |
void | setName (const aString &name) |
void | setNameOfGridFile (const aString &name) |
Provide the name of the file from which the overlapping grid was read. | |
virtual int | setParametersInteractively (bool runSetupOnExit=true) |
Assign run-time parameters for the DomainSolver. | |
virtual void | setSensitivity (GUIState &dialog, bool trueOrFalse) |
virtual int | setSolverParameters (const aString &command=nullString, DialogData *interface=NULL) |
Prompt for changes in the solver parameters. | |
virtual void | setup (const real &time=0.) |
Setup routine. | |
virtual int | setupUserDefinedForcing () |
virtual int | setupUserDefinedMaterialProperties () |
Interactively choose material properties (e.g. rho,mu,lambda for elasticity) | |
virtual int | setVariableBoundaryValues (const real &t, GridFunction &gf0, const int &grid, int side0=-1, int axis0=-1, ForcingTypeEnum forcingType=computeForcing) |
Assign the right-hand-side for variable boundary conditions. | |
virtual int | setVariableMaterialProperties (GridFunction &gf, const real &t) |
Assign variable material properties: user-defined or "body-force" regions. | |
virtual real | sizeOf (FILE *file=NULL) const |
virtual void | smoothVelocity (GridFunction &cgf, const int numberOfSmooths) |
virtual int | solve () |
Solve equations to time tFinal,. | |
virtual void | solveForTimeIndependentVariables (GridFunction &cgf, bool updateSolutionDependentEquations=false) |
: Solve for the pressure given the velocity. | |
virtual int | startTimeStep (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function). | |
virtual int | startTimeStepFE (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function). | |
virtual int | startTimeStepIM (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function). | |
virtual int | startTimeStepPC (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function). | |
virtual int | startTimeStepAF (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function) for an approximate factorization method. | |
virtual void | takeOneStep (real &t, real &dt, int stepNumber, int &numberOfSubSteps) |
Advance one time-step. This function is used by the multi-physics solver Cgmp. | |
virtual int | takeTimeStep (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a single time step (a time sub-step function). | |
virtual int | takeTimeStepFE (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a single time step (a time sub-step function). | |
virtual int | takeTimeStepIM (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a single time step (a time sub-step function). | |
virtual int | takeTimeStepPC (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a single time step (a time sub-step function). | |
virtual int | takeTimeStepAF (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a time step using the approximate factored scheme. | |
virtual int | timeIndependentBoundaryConditions (GridFunction &cgf) |
virtual void | initializeFactorization () |
virtual int | tracking (GridFunction &gf0, int stepNumber) |
const bool & | twilightZoneFlow () const |
virtual int | userDefinedBoundaryValues (const real &t, GridFunction &gf0, const int &grid, int side0=-1, int axis0=-1, ForcingTypeEnum forcingType=computeForcing) |
Assign user specific values for boundary conditions. | |
virtual void | userDefinedCleanup () |
This routine is called when DomainSolver is finished and can be used to clean up memory. | |
virtual int | userDefinedGrid (GridFunction &gfct, Mapping *&newMapping, int newGridNumber, IntegerArray &sharedBoundaryCondition) |
virtual int | userDefinedForcing (realCompositeGridFunction &f, GridFunction &gf, const real &tForce) |
User defined forcing. Compute a user defined forcing that will be added to the right-hand side of the equations. This function is called to actually evaluate the user defined forcing The function setupUserDefinedForcing is first called to assign the option and parameters. Rewrite or add new options to this function and to setupUserDefinedForcing to supply your own forcing option. | |
virtual void | userDefinedForcingCleanup () |
This routine is called when DomainSolver is finished and can be used to clean up memory. | |
virtual int | userDefinedMaterialProperties (GridFunction &gf) |
Assign the user defined material properties. | |
virtual void | userDefinedMaterialPropertiesCleanup () |
This routine is called when DomainSolver is finished and can be used to clean up memory. | |
virtual int | userDefinedOutput (GridFunction &gf, int stepNumber) |
virtual int | updateForAdaptiveGrids (CompositeGrid &cg) |
virtual int | updateForMovingGrids (GridFunction &cgf) |
Update the DomainSolver after grids have moved or have been adapted. | |
virtual int | updateForNewTimeStep (GridFunction &gf, const real &dt) |
Update the geometry arrays. | |
virtual int | updateToMatchNewGrid (CompositeGrid &cgNew, IntegerArray &changes, IntegerArray &sharedBoundaryCondition, GridFunction &gf0) |
virtual int | updateStateVariables (GridFunction &cgf, int stage=-1) |
Ths function is used to update state-variables. For example, the visco plastic viscosity. | |
virtual void | updateTimeIndependentVariables (CompositeGrid &cg0, GridFunction &cgf) |
virtual int | updateVariableTimeInterpolation (int newGrid, GridFunction &cgf) |
virtual int | updateWorkSpace (GridFunction &gf0) |
virtual int | variableTimeStepBoundaryInterpolation (int grid, GridFunction &cgf) |
realCompositeGridFunction & | p () const |
realCompositeGridFunction & | px () const |
realCompositeGridFunction & | rL () const |
realCompositeGridFunction & | pL () const |
realCompositeGridFunction & | rho () const |
realCompositeGridFunction & | gam () const |
Additional Inherited Members | |
Public Types inherited from DomainSolver | |
enum | { defaultValue =-1234567 } |
enum | ForcingTypeEnum { computeForcing, computeTimeDerivativeOfForcing } |
enum | BoundaryConditionPredictorEnum { predictPressure, predictPressureAndVelocity } |
enum | InterfaceOptionsEnum { getInterfaceRightHandSide, setInterfaceRightHandSide } |
enum | Dimensions { maximumNumberOfGridFunctionsToUse =4, maximumNumberOfExtraFunctionsToUse =4 } |
enum | ChangesEnum { gridWasAdded =1, gridWasChanged, gridWasRemoved, refinementWasAdded, refinementWasRemoved } |
Static Public Member Functions inherited from DomainSolver | |
static int | getBounds (const realCompositeGridFunction &u, RealArray &uMin, RealArray &uMax, real &uvMax) |
static int | getOriginalBoundaryConditions (CompositeGrid &cg, IntegerArray &originalBoundaryCondition) |
Save the original boundary conditions from the CompositeGrid. | |
Public Attributes inherited from DomainSolver | |
CompositeGrid & | cg |
OgesParameters | pressureSolverParameters |
OgesParameters | implicitTimeStepSolverParameters |
CompositeGridOperators | finiteDifferenceOperators |
real | dt |
int | numberOfStepsTaken |
Parameters & | parameters |
GridFunction | gf [maximumNumberOfGridFunctionsToUse] |
int | current |
int | movieFrame |
aString | movieFileName |
int | numberOfGridFunctionsToUse |
int | numberOfExtraFunctionsToUse |
int | totalNumberOfArrays |
realCompositeGridFunction | fn [maximumNumberOfExtraFunctionsToUse] |
RealArray | variableDt |
RealArray | variableTime |
realArray * | ui |
RealArray | tv |
RealArray | tvb |
RealArray | tv0 |
realCompositeGridFunction | coeff |
int | numberOfImplicitSolvers |
Oges * | implicitSolver |
realCompositeGridFunction * | implicitCoeff |
Oges * | poisson |
realCompositeGridFunction | pressureRightHandSide |
realCompositeGridFunction | poissonCoefficients |
realCompositeGridFunction * | pp |
realCompositeGridFunction * | ppx |
realCompositeGridFunction * | prL |
realCompositeGridFunction * | ppL |
realCompositeGridFunction * | prho |
realCompositeGridFunction * | pgam |
realCompositeGridFunction * | pvIMS |
realCompositeGridFunction * | pwIMS |
realCompositeGridFunction * | previousPressure |
realCompositeGridFunction * | puLinearized |
realMappedGridFunction * | pGridVelocityLinearized |
LineSolve * | pLineSolve |
bool | gridHasMaterialInterfaces |
realCompositeGridFunction * | pdtVar |
std::vector< real > | hMin |
std::vector< real > | hMax |
std::vector< real > | numberOfGridPoints |
std::vector< real > | dtv |
std::vector< real > | realPartOfEigenvalue |
std::vector< real > | imaginaryPartOfEigenvalue |
int | numberSavedToShowFile |
CG_ApproximateFactorization::FactorList | factors |
Protected Attributes inherited from DomainSolver | |
aString | name |
aString | className |
aString | pdeName |
int | restartNumber |
DialogData * | pUniformFlowDialog |
DialogData * | pStepFunctionDialog |
DialogData * | pShowFileDialog |
DialogData * | pTzOptionsDialog |
int | chooseAComponentMenuItem |
int | numberOfPushButtons |
int | numberOfTextBoxes |
int | itemsToPlot |
Solver for advection-diffusion (AD) equations.
Cgad::Cgad | ( | CompositeGrid & | cg, |
GenericGraphicsInterface * | ps = NULL , |
||
Ogshow * | show = NULL , |
||
const int & | plotOption = 1 |
||
) |
|
virtual |
References DomainSolver::parameters.
|
virtual |
Reimplemented from DomainSolver.
References a, assert(), axis, Parameters::axisymmetric, c, Parameters::dbase, DomainSolver::debug(), e, getIndex(), Parameters::getReferenceFrame(), grid, Parameters::gridIsMoving(), I1, I2, I3, Parameters::isAxisymmetric(), isRectangular, kappa, m, mg, DomainSolver::numberOfComponents(), DomainSolver::numberOfStepsTaken, ok, DomainSolver::parameters, printF(), Parameters::rigidBodyReferenceFrame, side, ut(), ux, uxx, uy, uz, and x.
Referenced by getUt().
|
virtual |
Reimplemented from DomainSolver.
References a, Parameters::adi, all, assert(), c, GridFunction::cg, DomainSolver::current, Parameters::dbase, DomainSolver::debug(), DomainSolver::determineErrors(), display(), DomainSolver::dt, dx, e, Parameters::fixedReferenceFrame, getIndex(), Parameters::getReferenceFrame(), DomainSolver::gf, grid, Parameters::gridIsMoving(), I1, I2, I3, DomainSolver::interpolateAndApplyBoundaryConditions(), isRectangular, kappa, m, mg, N(), normal, DomainSolver::numberOfComponents(), ok, DomainSolver::output(), DomainSolver::outputSolution(), DomainSolver::parameters, printF(), r, side, GridFunction::t, tridiagonalSolver, DomainSolver::twilightZoneFlow(), GridFunction::u, u, ue, uex, uey, uLocal, ux, uxx, uy, uz, and x.
|
virtual |
Reimplemented from DomainSolver.
References a0, assert(), axis, Parameters::axisymmetric, c, Parameters::dbase, DomainSolver::debug(), dirichlet, Parameters::dirichletBoundaryCondition, Parameters::getBoundaryData(), Parameters::getGridIsImplicit(), Parameters::interfaceBoundaryCondition, mg, AdParameters::mixedBoundaryCondition, mixedCoeff, mixedNormalCoeff, Parameters::neumannBoundaryCondition, Parameters::noInterface, DomainSolver::numberOfComponents(), orderOfAccuracy, DomainSolver::parameters, printF(), DomainSolver::printP(), and side.
|
virtual |
Reimplemented from DomainSolver.
References a0, assert(), axis, Parameters::axisymmetric, Parameters::dbase, DomainSolver::debug(), dir, dirichlet, dirichletBoundaryCondition, Parameters::dirichletBoundaryCondition, Parameters::dirichletInterface, display(), e, Parameters::getBoundaryData(), getGhostIndex(), Parameters::getGridIsImplicit(), Ig1, Ig2, Ig3, includeGhost, Parameters::interfaceBoundaryCondition, isRectangular, mg, AdParameters::mixedBoundaryCondition, mixedCoeff, mixedNormalCoeff, mixedRHS, N(), n, Parameters::neumannBoundaryCondition, Parameters::neumannInterface, Parameters::noInterface, normal, DomainSolver::numberOfComponents(), ok, DomainSolver::parameters, DomainSolver::printP(), side, DomainSolver::twilightZoneFlow(), u, ue, uex, uey, uLocal, and x.
|
virtual |
Reimplemented from DomainSolver.
References Parameters::dbase, grid, n, DomainSolver::numberOfComponents(), DomainSolver::numberOfImplicitSolvers, DomainSolver::parameters, and printF().
|
virtual |
Build the dialog that shows the various options for time stepping.
dialog | (input) : graphics dialog to use. |
Dialog Menu Options:
Reimplemented from DomainSolver.
References assert(), DomainSolver::buildTimeSteppingDialog(), Parameters::dbase, Parameters::numberOfTimeSteppingMethods, and DomainSolver::parameters.
|
virtual |
Reimplemented from DomainSolver.
References assert(), GridFunction::cg, DomainSolver::cg, Parameters::dbase, DomainSolver::debug(), display(), Parameters::getGridIsImplicit(), grid, DomainSolver::implicitSolver, Parameters::isAxisymmetric(), kappa, n, DomainSolver::numberOfImplicitSolvers, DomainSolver::parameters, printF(), setOgesBoundaryConditions(), GridFunction::t, and GridFunction::u.
Referenced by implicitSolve().
|
virtual |
Return the interface data required for a given type of interface.
info | (input) : the descriptor for the interface. |
interfaceDataOptions | (output) : a list of items from Parameters::InterfaceDataEnum that define which data to get (or which data were set). Multiple items are chosen by bit-wise or of the different options |
Reimplemented from DomainSolver.
References axis, GridFaceDescriptor::axis, Parameters::dbase, GridFaceDescriptor::grid, grid, Parameters::heatFluxInterface, Parameters::heatFluxInterfaceData, OV_ABORT(), DomainSolver::parameters, DomainSolver::printP(), side, GridFaceDescriptor::side, and Parameters::tractionInterface.
|
virtual |
Reimplemented from DomainSolver.
References a, assert(), c, c1, Parameters::dbase, DomainSolver::debug(), dr1, dx, equationDomainList, Parameters::fixedReferenceFrame, Parameters::getGridIsImplicit(), getIndex(), Parameters::getReferenceFrame(), grid, ListOfEquationDomains::gridDomainNumberList, Parameters::gridIsMoving(), I1, I2, I3, DomainSolver::imaginaryPartOfEigenvalue, Parameters::isAxisymmetric(), kappa, m, MN, ok, DomainSolver::parameters, EquationDomain::pdeParameters, printF(), DomainSolver::realPartOfEigenvalue, RX, rx, and rxx.
|
virtual |
Reimplemented from DomainSolver.
References Parameters::adamsBashforth2, Parameters::adamsPredictorCorrector2, Parameters::adamsPredictorCorrector4, Parameters::adi, assert(), Parameters::backwardEuler, Parameters::crankNicolson, Parameters::dbase, Parameters::forwardEuler, DomainSolver::getTimeSteppingOption(), Parameters::implicit, Parameters::lineImplicit, Parameters::midPoint, Parameters::notImplicit, DomainSolver::parameters, printF(), Parameters::rKutta, Parameters::setGridIsImplicit(), Parameters::steadyStateNewton, Parameters::steadyStateRungeKutta, and Parameters::variableTimeStepAdamsPredictorCorrector.
|
virtual |
Reimplemented from DomainSolver.
References a, addForcing(), assert(), axis, Parameters::axisymmetric, c, Parameters::computeImplicitTermsSeparately, Parameters::dbase, DomainSolver::debug(), display(), Parameters::fixedReferenceFrame, Parameters::getGridIsImplicit(), getIndex(), Parameters::getReferenceFrame(), grid, Parameters::gridIsMoving(), I1, I2, I3, Parameters::isAxisymmetric(), kappa, m, mg, N(), DomainSolver::numberOfComponents(), DomainSolver::numberOfStepsTaken, ok, DomainSolver::parameters, side, uLocal, ux, uy, uz, and v.
|
virtual |
Reimplemented from DomainSolver.
References all, assert(), assign(), GridFunction::cg, DomainSolver::coeff, Parameters::dbase, DomainSolver::debug(), display(), DomainSolver::dt, formMatrixForImplicitSolve(), grid, DomainSolver::implicitSolver, n, DomainSolver::numberOfImplicitSolvers, DomainSolver::parameters, printF(), DomainSolver::printP(), DomainSolver::pvIMS, DomainSolver::pwIMS, GridFunction::t, GridFunction::u, and v.
|
virtual |
Reimplemented from DomainSolver.
|
virtual |
Save comments in the show file.
show | (input) : show file. |
Reimplemented from DomainSolver.
References a, c, Parameters::dbase, i, kappa, and DomainSolver::parameters.
|
virtual |
Reimplemented from DomainSolver.
References a0, assert(), axis, Parameters::axisymmetric, GridFunction::cg, DomainSolver::cg, Parameters::dbase, DomainSolver::debug(), dirichlet, Parameters::dirichletBoundaryCondition, Parameters::dirichletInterface, ForBoundary, grid, Parameters::interfaceBoundaryCondition, mg, AdParameters::mixedBoundaryCondition, mixedCoeff, mixedNormalCoeff, Parameters::neumannBoundaryCondition, Parameters::neumannInterface, Parameters::noInterface, DomainSolver::numberOfComponents(), DomainSolver::parameters, DomainSolver::printP(), side, and tc.
Referenced by formMatrixForImplicitSolve().
|
virtual |
Set the plot titles for interactive plotting.
t | (input) : current time |
dt | (input) : current time step |
Reimplemented from DomainSolver.
References a, c, Parameters::dbase, kappa, and DomainSolver::parameters.
|
virtual |
Allocate and initialize grid functions, based on the time-stepping method.
This function is called by DomainSolver::setup (DomainSolver.C)
Reimplemented from DomainSolver.
References assert(), DomainSolver::cg, DomainSolver::current, Parameters::dbase, DomainSolver::gf, Parameters::implicit, DomainSolver::implicitSolver, DomainSolver::numberOfImplicitSolvers, DomainSolver::parameters, printF(), DomainSolver::setupGridFunctions(), and GridFunction::u.
|
virtual |
A virtual function to setup the PDE to be solved.
This function is called at the very start in order to setup the equations to be solved etc.
reactionName | (input) : |
restartChosen | (input) : |
originalBoundaryCondition | (input) : |
Reimplemented from DomainSolver.
References assert(), DomainSolver::cg, DomainSolver::current, Parameters::dbase, equationDomainList, Parameters::fixedReferenceFrame, DomainSolver::getName(), DomainSolver::getOriginalBoundaryConditions(), DomainSolver::gf, grid, ListOfEquationDomains::gridDomainNumberList, i, DomainSolver::name, DomainSolver::numberOfComponents(), DomainSolver::parameters, DomainSolver::pdeName, printF(), DomainSolver::readRestartFile(), Parameters::rigidBodyReferenceFrame, Parameters::specifiedReferenceFrame, GridFunction::u, u, update(), and SurfaceEquation::update().
|
virtual |
Choose user defined initial condition parameters.
This function is used to setup and define the initial conditions. The function userDefinedInitialConditions (above) is called to actually evaluate the initial conditions. Rewrite or add new options to this routine to supply your own initial conditions. Choose the "user defined" option from the initial conditions options to have this routine called. : {itemize} You must fill in the realCompositeGridFunction u. The `parameters' object holds many useful parameters. {itemize}
values: 0=success, non-zero=failure.
Reimplemented from DomainSolver.
References Parameters::dbase, DomainSolver::numberOfComponents(), DomainSolver::parameters, printF(), and tc.
|
virtual |
Update geometry arrays, solution at old times etc. after the time step has changed.
Reimplemented from DomainSolver.
References GridFunction::cg, Parameters::dbase, DomainSolver::debug(), grid, Parameters::gridIsMoving(), DomainSolver::imaginaryPartOfEigenvalue, DomainSolver::parameters, printF(), DomainSolver::realPartOfEigenvalue, DomainSolver::twilightZoneFlow(), and DomainSolver::updateGeometryArrays().
|
virtual |
Reimplemented from DomainSolver.
References DomainSolver::imaginaryPartOfEigenvalue, printF(), DomainSolver::realPartOfEigenvalue, and DomainSolver::updateToMatchGrid().
|
virtual |
Assign user defined initial conditions.
This function is called to actually assign user defined initial conditions. The function setupUserDefinedInitialConditions is first called to assign the option and parameters. Rewrite or add new options to this function and to setupUserDefinedInitialConditions to supply your own initial conditions.
: {itemize} You must fill in the realCompositeGridFunction u. The `parameters' object holds many useful parameters. {itemize} When using adaptive mesh refinement, this function may be called multiple times as the AMR hierarchy is built up.
values: 0=success, non-zero=failure.
Reimplemented from DomainSolver.
References c, Parameters::dbase, getIndex(), grid, I1, I2, I3, mg, DomainSolver::numberOfComponents(), ok, OV_ABORT(), DomainSolver::parameters, printF(), tc, U2D, and U3D.
|
virtual |
This routine is called when Cgad is finished with the initial conditions and can be used to clean up memory.
Reimplemented from DomainSolver.
References Parameters::dbase, DomainSolver::parameters, DomainSolver::printP(), and DomainSolver::userDefinedInitialConditionsCleanup().
|
virtual |
Output run-time parameters for the header.
file | (input) : write values to this file. |
Reimplemented from DomainSolver.
References a, c, Parameters::dbase, kappa, m, n, DomainSolver::name, DomainSolver::numberOfComponents(), DomainSolver::parameters, and DomainSolver::writeParameterSummary().