NeoPZ
|
Implements a very simple manner to perform transient simulations. Analysis. More...
#include <pztransientanalysis.h>
Public Member Functions | |
double | GetgTime () |
Method for gTime attribute access. More... | |
TPZTransientAnalysis (TPZCompMesh *mesh, bool IsLinear=false, std::ostream &out=std::cout) | |
Constructor. More... | |
~TPZTransientAnalysis () | |
Default destructor. More... | |
virtual void | Assemble () |
Assemble flux vector and jacobian matrix. More... | |
virtual void | RunTransient (std::ostream &out=std::cout, bool FromBegining=true, bool linesearch=true) |
Executes a Newton's method for the solution of the implicit in time equation. More... | |
virtual void | RunExplicit (std::ostream &out=std::cout, bool FromBegining=true) |
Solves a explicit Euler's scheme in time. More... | |
virtual void | PostProcess (int resolution) |
See base class for comments. More... | |
virtual void | PostProcess (int resolution, int dimension) |
See base class for comments. More... | |
virtual void | PostProcess (TPZVec< REAL > &loc, std::ostream &out=std::cout) |
See base class for comments. More... | |
void | SetConvergence (int niter, REAL eps, bool ForceAllSteps=true) |
Defines max number of steps and steady state convergence tolerance. More... | |
void | SetSaveFrequency (int SaveFrequency, int resolution) |
Defines properties of DX file. More... | |
void | SetSaveSolution (int SaveFrequency) |
Defines to save solution vector with SaveFrequency frequency. More... | |
std::list< std::pair< TPZFMatrix< STATE >, STATE > > & | GetSavedSolutions () |
Access to saved solution. Pair of (solution vec, simulation time) More... | |
void | SetNewtonConvergence (int niter, REAL eps) |
Defines max number of steps and error convergence tolerance for Newton's method. More... | |
REAL & | TimeStep () |
Access to time step attribute. More... | |
void | SetInitialSolution (TPZFMatrix< STATE > &InitialSol) |
Sets problem initial solution. More... | |
void | SetInitialSolutionAsZero () |
Sets problem initial solution as zero. More... | |
int | GetCurrentIter () |
Returns current iteration. More... | |
Public Member Functions inherited from TPZNonLinearAnalysis | |
TPZNonLinearAnalysis (TPZCompMesh *mesh, std::ostream &out) | |
Constructor with computational mesh. More... | |
TPZNonLinearAnalysis () | |
Default constructor. More... | |
virtual | ~TPZNonLinearAnalysis () |
Default destructor. More... | |
virtual void | IterativeProcess (std::ostream &out, REAL tol, int numiter, bool linesearch=false, bool checkconv=false) |
It process a Newton's method to solve the non-linear problem. More... | |
REAL | LineSearch (const TPZFMatrix< STATE > &Wn, TPZFMatrix< STATE > DeltaW, TPZFMatrix< STATE > &NextW, REAL tol, int niter) |
Implements a golden section line search. More... | |
REAL | SolutionNorm () |
Computes the L2 norm of the solution. More... | |
virtual void | ComputeTangent (TPZFMatrix< STATE > &tangent, TPZVec< REAL > &coefs, int icase) |
int | NumCases () |
Actually return 1. More... | |
virtual void | Residual (TPZFMatrix< STATE > &residual, int icase) |
virtual void | LoadSolution () |
Load the solution into the computable grid. More... | |
virtual void | LoadSolution (const TPZFMatrix< STATE > &state) |
Load the solution into the computable mesh considering sol as Solution vector of the analysis. More... | |
void | LoadState (TPZFMatrix< STATE > &state) |
Load solution with state as solution. But fSolution is not modified. More... | |
Public Member Functions inherited from TPZAnalysis | |
TPZAnalysis (TPZCompMesh *mesh, bool mustOptimizeBandwidth=true, std::ostream &out=std::cout) | |
Create an TPZAnalysis object from one mesh pointer. More... | |
TPZAnalysis (TPZAutoPointer< TPZCompMesh > mesh, bool mustOptimizeBandwidth=true, std::ostream &out=std::cout) | |
Create an TPZAnalysis object from one mesh auto pointer object. More... | |
void | SetGuiInterface (TPZAutoPointer< TPZGuiInterface > gui) |
Defines gui interface object. More... | |
TPZAutoPointer< TPZGuiInterface > | GetGuiInterface () const |
Gets gui interface object. More... | |
bool | AmIKilled () |
Returns if the process was canceled through gui interface. More... | |
virtual void | SetCompMesh (TPZCompMesh *mesh, bool mustOptimizeBandwidth) |
Set the computational mesh of the analysis. More... | |
TPZAnalysis () | |
Create an empty TPZAnalysis object. More... | |
void | Write (TPZStream &buf, int withclassid) const override |
Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More... | |
void | Read (TPZStream &buf, void *context) override |
read objects from the stream More... | |
virtual | ~TPZAnalysis (void) |
Destructor: deletes all protected dynamic allocated objects. More... | |
void | CleanUp () |
deletes all data structures More... | |
void | SetRenumber (TPZAutoPointer< TPZRenumbering > renumber) |
Change the renumbering scheme. More... | |
void | OptimizeBandwidth () |
Sets the computer connection block number from the graphical connections block number otimization. More... | |
int | HighestDimension () |
Returns the dimension of the material which has the highest dimension. More... | |
void | Resequence (int firstel=-1) |
Recompute the node sequence. More... | |
int | ComputeNumberofLoadCases () |
Determine the number of load cases from the material objects and return its value. More... | |
virtual void | AssembleResidual () |
Assemble the load vector. More... | |
virtual void | Solve () |
Invert the stiffness matrix. More... | |
TPZFMatrix< STATE > & | Rhs () |
Returns the load vector. More... | |
TPZFMatrix< STATE > & | Solution () |
Returns the solution matrix. More... | |
TPZCompMesh * | Mesh () const |
Returns the pointer to the computational mesh. More... | |
TPZAutoPointer< TPZStructMatrix > | StructMatrix () |
Returns a reference to the structural matrix. More... | |
TPZMatrixSolver< STATE > * | BuildPreconditioner (EPrecond preconditioner, bool overlap) |
Define the type of preconditioner used. More... | |
void | SetStep (int step) |
ste the step for post processing More... | |
void | SetThreadsForError (int nthreads) |
int | GetStep () |
void | SetTime (REAL time) |
Sets time will be used in dx files. More... | |
REAL | GetTime () |
Gets time used in dx files. More... | |
void | ShowShape (const std::string &plotfile, TPZVec< int64_t > &equationindices) |
Graphic of the solution as V3DGrap visualization. More... | |
void | ShowShape (const std::string &plotfile, TPZVec< int64_t > &equationindices, int matid, const TPZVec< std::string > &varname) |
Graphic of the solution as V3DGrap visualization. More... | |
void | LoadShape (double dx, double dy, int64_t numelem, TPZConnect *nod) |
Make assembling and clean the load and solution vectors. More... | |
virtual void | Run (std::ostream &out=std::cout) |
Calls the appropriate sequence of methods to build a solution or a time stepping sequence. More... | |
virtual void | DefineGraphMesh (int dimension, const TPZVec< std::string > &scalnames, const TPZVec< std::string > &vecnames, const std::string &plotfile) |
Define GrapMesh as V3D, DX, MV or VTK depending on extension of the file. More... | |
virtual void | DefineGraphMesh (int dimension, const TPZVec< std::string > &scalnames, const TPZVec< std::string > &vecnames, const TPZVec< std::string > &tensnames, const std::string &plotfile) |
Define GrapMesh as VTK with tensorial names depending on extension of the file. More... | |
virtual void | DefineGraphMesh (int dimension, const std::set< int > &matids, const TPZVec< std::string > &scalnames, const TPZVec< std::string > &vecnames, const std::string &plotfile) |
Define GrapMesh as V3D, DX, MV or VTK depending on extension of the file. More... | |
virtual void | DefineGraphMesh (int dimension, const std::set< int > &matids, const TPZVec< std::string > &scalnames, const TPZVec< std::string > &vecnames, const TPZVec< std::string > &tensnames, const std::string &plotfile) |
Define GrapMesh as VTK with tensorial names depending on extension of the file. More... | |
virtual void | CloseGraphMesh () |
Clean the GrapMesh vector. More... | |
TPZGraphMesh * | GraphMesh (int dimension) |
Defines the postprocessing parameters for the graphical grid. More... | |
void | IdentifyPostProcessingMatIds (int dimension, std::set< int > &matids) |
Fill mat ids with materials with provided dimension wich are not boundary conditinos or interface. More... | |
TPZVec< STATE > | Integrate (const std::string &varname, const std::set< int > &matids) |
Integrate the postprocessed variable name over the elements included in the set matids. More... | |
void | SetExact (std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &result, TPZFMatrix< STATE > &deriv)> f) |
Sets the pointer of the exact solution function. More... | |
virtual void | PostProcessError (TPZVec< REAL > &, bool store_error=true, std::ostream &out=std::cout) |
Compute the local error over all elements and global errors in several norms and print out without calculating the errors of the variables for hdiv spaces. More... | |
virtual void | PostProcessErrorSerial (TPZVec< REAL > &, bool store_error=true, std::ostream &out=std::cout) |
virtual void | PostProcessErrorParallel (TPZVec< REAL > &, bool store_error=true, std::ostream &out=std::cout) |
void | CreateListOfCompElsToComputeError (TPZAdmChunkVector< TPZCompEl *> &elvec) |
void | Print (const std::string &name, std::ostream &out) |
Print connect and solution information. More... | |
void | PrintVectorByElement (std::ostream &out, TPZFMatrix< STATE > &vec, REAL tol=1.e-10) |
Print the residual vector for those elements with entry above a given tolerance. More... | |
TPZMatrixSolver< STATE > & | Solver () |
Get the solver matrix. More... | |
void | AnimateRun (int64_t num_iter, int steps, TPZVec< std::string > &scalnames, TPZVec< std::string > &vecnames, const std::string &plotfile) |
Run and print the solution step by step. More... | |
void | SetSolver (TPZMatrixSolver< STATE > &solver) |
Set solver matrix. More... | |
void | SetStructuralMatrix (TPZAutoPointer< TPZStructMatrix > strmatrix) |
Set structural matrix as auto pointer for analysis. More... | |
void | SetStructuralMatrix (TPZStructMatrix &strmatrix) |
Set structural matrix for analysis. More... | |
int | ClassId () const override |
Define the class id associated with the class. More... | |
virtual void | DefineElementTable (int dimension, TPZVec< int64_t > &GeoElIds, TPZVec< REAL > &points) |
Fill the computational element vector to post processing depending over geometric mesh defined. More... | |
virtual void | SetTableVariableNames (TPZVec< std::string > varnames) |
Sets the names of the variables into the data structure for post processing. More... | |
virtual void | PrePostProcessTable (std::ostream &out_file) |
Prepare data to print post processing and print coordinates. More... | |
virtual void | PostProcessTable (std::ostream &out_file) |
Print the solution related with the computational element vector in post process. More... | |
void | PostProcessTable (TPZFMatrix< REAL > &pos, std::ostream &out=std::cout) |
Compute and print the local error over all elements in data structure of post process, also compute global errors in several norms. More... | |
Public Member Functions inherited from TPZSavable | |
TPZSavable () | |
virtual | ~TPZSavable () |
virtual std::list< std::map< std::string, uint64_t > > | VersionHistory () const |
virtual std::pair< std::string, uint64_t > | Version () const |
virtual bool | Compare (TPZSavable *copy, bool override=false) |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
virtual bool | Compare (TPZSavable *copy, bool override=false) const |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
Public Member Functions inherited from TPZRegisterClassId | |
template<typename T > | |
TPZRegisterClassId (int(T::*)() const) | |
TPZRegisterClassId ()=default | |
Static Public Attributes | |
static double | gTime |
Static attribute storing the current time of simulation. More... | |
Protected Member Functions | |
void | SaveCurrentSolutionVec () |
If fSaveSolutionVecFrequency != 0, save current solution vector in fSavedSolutionVec attribute. More... | |
void | SetImplicit () |
Sets all materials in temporal scheme as an implicit Euler. More... | |
void | SetExplicit () |
Sets all materials in temporal scheme as an explicit Euler. More... | |
void | SetLastState () |
Sets all materials in LastState. More... | |
void | SetCurrentState () |
Sets all materials in CurrentState. More... | |
void | SetMassMatrix () |
Sets all materials to compute the mass matrix - used in the explicit scheme. More... | |
void | SetFluxOnly () |
Sets all materials to compute only the flux contributions - used in the explicit scheme. More... | |
void | SetAllMaterialsDeltaT () |
Sets all materials the time step. More... | |
void | ComputeLinearTangentMatrix () |
Computes linear tangent matrix for linear problems. More... | |
void | ComputeMassMatrix () |
Computes the mass matrix for the explicit scheme. More... | |
void | ComputeFluxOnly () |
Computes the only the flux contribution for the explicit scheme. More... | |
Protected Attributes | |
bool | fIsLinearProblem |
Flag indicating whether the problem is linear or not. More... | |
REAL | fTimeStep |
Simulation time step. More... | |
int | fCurrentIter |
Current iteration. Variable allowing to restart the simulation. More... | |
int | fNIter |
Number of iterations counting from fCurrentIter to fCurrentIter+fNIter. More... | |
REAL | fSteadyTol |
Tolerance to consider the problem solution as steady state. More... | |
bool | fForceAllSteps |
Flag indicating whether all steps must be performed even if tolerance is achieved. More... | |
int | fSaveFrequency |
Frequency which solution must be saved in DX file. More... | |
int | fDXResolution |
Resolution of DX mesh. More... | |
int | fSaveSolutionVecFrequency |
Frequency which solution vector must be saved. More... | |
std::list< std::pair< TPZFMatrix< STATE >, STATE > > | fSavedSolutionVec |
Attribute to store solution vectors during process. Pair of (solution vec, simulation time) More... | |
int | fNewtonMaxIter |
Max iteration number of Newton's method. More... | |
REAL | fNewtonTol |
Tolerance of Newton's method. More... | |
Protected Attributes inherited from TPZAnalysis | |
TPZGeoMesh * | fGeoMesh |
Geometric Mesh. More... | |
TPZCompMesh * | fCompMesh |
Computational mesh. More... | |
TPZGraphMesh * | fGraphMesh [3] |
Graphical mesh. More... | |
TPZFMatrix< STATE > | fRhs |
Load vector. More... | |
TPZFMatrix< STATE > | fSolution |
Solution vector. More... | |
TPZMatrixSolver< STATE > * | fSolver |
Type of solver to be applied. More... | |
TPZVec< std::string > | fScalarNames [3] |
Scalar variables names - to post process. More... | |
TPZVec< std::string > | fVectorNames [3] |
Vectorial variables names - to post process. More... | |
TPZVec< std::string > | fTensorNames [3] |
Tensorial variables names - to post process. More... | |
int | fStep |
Time step. More... | |
REAL | fTime |
Time variable which is used in dx output. More... | |
int | fNthreadsError |
Number of threads to be used for post-processing error. More... | |
TPZAutoPointer< TPZStructMatrix > | fStructMatrix |
Structural matrix. More... | |
TPZAutoPointer< TPZRenumbering > | fRenumber |
Renumbering scheme. More... | |
TPZAutoPointer< TPZGuiInterface > | fGuiInterface |
Pointer for gui interface object. More... | |
TTablePostProcess | fTable |
Additional Inherited Members | |
Public Types inherited from TPZAnalysis | |
enum | EPrecond { EJacobi, EBlockJacobi, EElement, ENodeCentered } |
Preconditioners which can be created by objects of this class. More... | |
Static Public Member Functions inherited from TPZSavable | |
static std::set< TPZRestoreClassBase * > & | RestoreClassSet () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::map< int, TPZRestore_t > & | ClassIdMap () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::pair< std::string, uint64_t > | NeoPZVersion () |
static void | Register (TPZRestoreClassBase *restore) |
static void | RegisterClassId (int classid, TPZRestore_t fun) |
static TPZSavable * | CreateInstance (const int &classId) |
Public Attributes inherited from TPZAnalysis | |
std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &result, TPZFMatrix< STATE > &deriv)> | fExact |
Pointer to Exact solution function, it is necessary to calculating errors. More... | |
Implements a very simple manner to perform transient simulations. Analysis.
Definition at line 30 of file pztransientanalysis.h.
TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis | ( | TPZCompMesh * | mesh, |
bool | IsLinear = false , |
||
std::ostream & | out = std::cout |
||
) |
Constructor.
mesh | for base class |
IsLinear | for optimizating the process time, linear problems have flux tangent computed only once |
out | for base class |
Definition at line 20 of file pztransientanalysis.cpp.
References TPZTransientAnalysis< TRANSIENTCLASS >::fCurrentIter, TPZTransientAnalysis< TRANSIENTCLASS >::fIsLinearProblem, TPZTransientAnalysis< TRANSIENTCLASS >::fSaveSolutionVecFrequency, TPZTransientAnalysis< TRANSIENTCLASS >::fTimeStep, TPZTransientAnalysis< TRANSIENTCLASS >::SetConvergence(), TPZTransientAnalysis< TRANSIENTCLASS >::SetInitialSolutionAsZero(), TPZTransientAnalysis< TRANSIENTCLASS >::SetNewtonConvergence(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetSaveFrequency().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::GetgTime().
TPZTransientAnalysis< TRANSIENTCLASS >::~TPZTransientAnalysis | ( | ) |
Default destructor.
Definition at line 32 of file pztransientanalysis.cpp.
References TPZTransientAnalysis< TRANSIENTCLASS >::fSavedSolutionVec.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::GetgTime().
|
virtual |
Assemble flux vector and jacobian matrix.
Reimplemented from TPZAnalysis.
Definition at line 274 of file pztransientanalysis.cpp.
References TPZAnalysis::fCompMesh, TPZTransientAnalysis< TRANSIENTCLASS >::fIsLinearProblem, TPZAnalysis::fRhs, TPZAnalysis::fSolver, TPZAnalysis::fStructMatrix, TPZMatrixSolver< TVar >::Matrix(), TPZCompMesh::NEquations(), TPZFMatrix< TVar >::Redim(), TPZMatrix< TVar >::Rows(), TPZMatrixSolver< TVar >::SetMatrix(), TPZMatrixSolver< TVar >::UpdateFrom(), and TPZMatrix< TVar >::Zero().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::GetgTime(), and TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient().
|
protected |
Computes the only the flux contribution for the explicit scheme.
Definition at line 330 of file pztransientanalysis.cpp.
References TPZAnalysis::fCompMesh, TPZAnalysis::fRhs, TPZAnalysis::fSolver, TPZAnalysis::fStructMatrix, TPZMatrixSolver< TVar >::Matrix(), TPZCompMesh::NEquations(), TPZFMatrix< TVar >::Redim(), TPZMatrix< TVar >::Rows(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetFluxOnly().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit().
|
protected |
Computes linear tangent matrix for linear problems.
Definition at line 311 of file pztransientanalysis.cpp.
References TPZTransientAnalysis< TRANSIENTCLASS >::fIsLinearProblem, TPZAnalysis::fRhs, TPZAnalysis::fSolver, TPZAnalysis::fStructMatrix, TPZAnalysis::Mesh(), TPZCompMesh::NEquations(), TPZFMatrix< TVar >::Redim(), TPZTransientAnalysis< TRANSIENTCLASS >::SetCurrentState(), and TPZMatrixSolver< TVar >::SetMatrix().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient().
|
protected |
Computes the mass matrix for the explicit scheme.
Definition at line 321 of file pztransientanalysis.cpp.
References TPZAnalysis::fRhs, TPZAnalysis::fSolver, TPZAnalysis::fStructMatrix, TPZAnalysis::Mesh(), TPZCompMesh::NEquations(), TPZFMatrix< TVar >::Redim(), TPZTransientAnalysis< TRANSIENTCLASS >::SetMassMatrix(), and TPZMatrixSolver< TVar >::SetMatrix().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit().
|
inline |
Returns current iteration.
Definition at line 196 of file pztransientanalysis.h.
References TPZTransientAnalysis< TRANSIENTCLASS >::fCurrentIter.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess(), and TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient().
|
inline |
Method for gTime attribute access.
Definition at line 38 of file pztransientanalysis.h.
References TPZTransientAnalysis< TRANSIENTCLASS >::Assemble(), TPZTransientAnalysis< TRANSIENTCLASS >::gTime, TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis(), and TPZTransientAnalysis< TRANSIENTCLASS >::~TPZTransientAnalysis().
std::list< std::pair< TPZFMatrix< STATE >, STATE > > & TPZTransientAnalysis< TRANSIENTCLASS >::GetSavedSolutions | ( | ) |
Access to saved solution. Pair of (solution vec, simulation time)
Definition at line 409 of file pztransientanalysis.cpp.
References TPZTransientAnalysis< TRANSIENTCLASS >::fSavedSolutionVec.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess().
|
inlinevirtual |
See base class for comments.
Reimplemented from TPZAnalysis.
Definition at line 60 of file pztransientanalysis.h.
References dimension, TPZTransientAnalysis< TRANSIENTCLASS >::GetCurrentIter(), TPZTransientAnalysis< TRANSIENTCLASS >::GetSavedSolutions(), TPZAnalysis::PostProcess(), TPZTransientAnalysis< TRANSIENTCLASS >::SetConvergence(), TPZTransientAnalysis< TRANSIENTCLASS >::SetInitialSolution(), TPZTransientAnalysis< TRANSIENTCLASS >::SetInitialSolutionAsZero(), TPZTransientAnalysis< TRANSIENTCLASS >::SetNewtonConvergence(), TPZTransientAnalysis< TRANSIENTCLASS >::SetSaveFrequency(), TPZTransientAnalysis< TRANSIENTCLASS >::SetSaveSolution(), and TPZTransientAnalysis< TRANSIENTCLASS >::TimeStep().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), and TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient().
|
virtual |
See base class for comments.
Reimplemented from TPZAnalysis.
Definition at line 258 of file pztransientanalysis.cpp.
References TPZAnalysis::fTime, TPZTransientAnalysis< TRANSIENTCLASS >::GetCurrentIter(), TPZAnalysis::PostProcess(), and TPZTransientAnalysis< TRANSIENTCLASS >::TimeStep().
|
virtual |
See base class for comments.
Reimplemented from TPZAnalysis.
Definition at line 265 of file pztransientanalysis.cpp.
References TPZTransientAnalysis< TRANSIENTCLASS >::GetCurrentIter(), TPZTransientAnalysis< TRANSIENTCLASS >::gTime, TPZAnalysis::PostProcess(), and TPZTransientAnalysis< TRANSIENTCLASS >::TimeStep().
|
virtual |
Solves a explicit Euler's scheme in time.
Definition at line 348 of file pztransientanalysis.cpp.
References TPZTransientAnalysis< TRANSIENTCLASS >::ComputeFluxOnly(), TPZTransientAnalysis< TRANSIENTCLASS >::ComputeMassMatrix(), TPZTransientAnalysis< TRANSIENTCLASS >::fCurrentIter, TPZTransientAnalysis< TRANSIENTCLASS >::fDXResolution, TPZTransientAnalysis< TRANSIENTCLASS >::fForceAllSteps, TPZTransientAnalysis< TRANSIENTCLASS >::fNIter, TPZTransientAnalysis< TRANSIENTCLASS >::fSavedSolutionVec, TPZTransientAnalysis< TRANSIENTCLASS >::fSaveFrequency, TPZAnalysis::fSolution, TPZTransientAnalysis< TRANSIENTCLASS >::fSteadyTol, TPZTransientAnalysis< TRANSIENTCLASS >::gTime, TPZAnalysis::LoadSolution(), Norm(), TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess(), TPZTransientAnalysis< TRANSIENTCLASS >::SaveCurrentSolutionVec(), TPZTransientAnalysis< TRANSIENTCLASS >::SetAllMaterialsDeltaT(), TPZTransientAnalysis< TRANSIENTCLASS >::SetExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::SetFluxOnly(), TPZAnalysis::Solve(), and TPZTransientAnalysis< TRANSIENTCLASS >::TimeStep().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::GetgTime().
|
virtual |
Executes a Newton's method for the solution of the implicit in time equation.
Definition at line 56 of file pztransientanalysis.cpp.
References TPZTransientAnalysis< TRANSIENTCLASS >::Assemble(), CheckConvergence(), TPZTransientAnalysis< TRANSIENTCLASS >::ComputeLinearTangentMatrix(), error(), TPZAnalysis::fCompMesh, TPZTransientAnalysis< TRANSIENTCLASS >::fCurrentIter, TPZTransientAnalysis< TRANSIENTCLASS >::fDXResolution, TPZTransientAnalysis< TRANSIENTCLASS >::fForceAllSteps, TPZTransientAnalysis< TRANSIENTCLASS >::fIsLinearProblem, TPZTransientAnalysis< TRANSIENTCLASS >::fNewtonMaxIter, TPZTransientAnalysis< TRANSIENTCLASS >::fNewtonTol, TPZTransientAnalysis< TRANSIENTCLASS >::fNIter, TPZAnalysis::fRhs, TPZTransientAnalysis< TRANSIENTCLASS >::fSavedSolutionVec, TPZTransientAnalysis< TRANSIENTCLASS >::fSaveFrequency, TPZAnalysis::fSolution, TPZTransientAnalysis< TRANSIENTCLASS >::fSteadyTol, TPZTransientAnalysis< TRANSIENTCLASS >::GetCurrentIter(), TPZTransientAnalysis< TRANSIENTCLASS >::gTime, TPZNonLinearAnalysis::LineSearch(), TPZNonLinearAnalysis::LoadSolution(), TPZAnalysis::LoadSolution(), TPZCompMesh::NEquations(), Norm(), TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess(), TPZFMatrix< TVar >::Redim(), TPZTransientAnalysis< TRANSIENTCLASS >::SaveCurrentSolutionVec(), TPZTransientAnalysis< TRANSIENTCLASS >::SetAllMaterialsDeltaT(), TPZTransientAnalysis< TRANSIENTCLASS >::SetCurrentState(), TPZTransientAnalysis< TRANSIENTCLASS >::SetImplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::SetLastState(), TPZAnalysis::Solve(), and TPZTransientAnalysis< TRANSIENTCLASS >::TimeStep().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::GetgTime().
|
protected |
If fSaveSolutionVecFrequency != 0, save current solution vector in fSavedSolutionVec attribute.
Definition at line 415 of file pztransientanalysis.cpp.
References TPZTransientAnalysis< TRANSIENTCLASS >::fCurrentIter, TPZTransientAnalysis< TRANSIENTCLASS >::fSavedSolutionVec, TPZTransientAnalysis< TRANSIENTCLASS >::fSaveSolutionVecFrequency, TPZTransientAnalysis< TRANSIENTCLASS >::gTime, TPZMatrix< TVar >::Print(), and TPZAnalysis::Solution().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), and TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient().
|
protected |
Sets all materials the time step.
Definition at line 244 of file pztransientanalysis.cpp.
References TPZCompMesh::MaterialVec(), TPZAnalysis::Mesh(), TPZTransientMaterial< TBASEMAT >::SetTimeStep(), and TPZTransientAnalysis< TRANSIENTCLASS >::TimeStep().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), and TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient().
|
inline |
Defines max number of steps and steady state convergence tolerance.
Definition at line 172 of file pztransientanalysis.h.
References TPZTransientAnalysis< TRANSIENTCLASS >::fForceAllSteps, TPZTransientAnalysis< TRANSIENTCLASS >::fNIter, and TPZTransientAnalysis< TRANSIENTCLASS >::fSteadyTol.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess(), and TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis().
|
protected |
Sets all materials in CurrentState.
Definition at line 202 of file pztransientanalysis.cpp.
References TPZCompMesh::MaterialVec(), TPZAnalysis::Mesh(), and TPZTransientMaterial< TBASEMAT >::SetCurrentState().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::ComputeLinearTangentMatrix(), and TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient().
|
protected |
Sets all materials in temporal scheme as an explicit Euler.
Definition at line 174 of file pztransientanalysis.cpp.
References TPZCompMesh::MaterialVec(), TPZAnalysis::Mesh(), and TPZTransientMaterial< TBASEMAT >::SetExplicit().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit().
|
protected |
Sets all materials to compute only the flux contributions - used in the explicit scheme.
Definition at line 230 of file pztransientanalysis.cpp.
References TPZCompMesh::MaterialVec(), TPZAnalysis::Mesh(), and TPZTransientMaterial< TBASEMAT >::SetFluxOnly().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::ComputeFluxOnly(), and TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit().
|
protected |
Sets all materials in temporal scheme as an implicit Euler.
Definition at line 160 of file pztransientanalysis.cpp.
References TPZCompMesh::MaterialVec(), TPZAnalysis::Mesh(), and TPZTransientMaterial< TBASEMAT >::SetImplicit().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient().
void TPZTransientAnalysis< TRANSIENTCLASS >::SetInitialSolution | ( | TPZFMatrix< STATE > & | InitialSol | ) |
Sets problem initial solution.
Definition at line 37 of file pztransientanalysis.cpp.
References TPZMatrix< TVar >::Cols(), TPZAnalysis::fSolution, TPZAnalysis::Mesh(), PZError, TPZMatrix< TVar >::Rows(), and TPZCompMesh::Solution().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess().
void TPZTransientAnalysis< TRANSIENTCLASS >::SetInitialSolutionAsZero | ( | ) |
Sets problem initial solution as zero.
Definition at line 49 of file pztransientanalysis.cpp.
References TPZMatrix< TVar >::Cols(), TPZAnalysis::fSolution, TPZAnalysis::Mesh(), TPZFMatrix< TVar >::Redim(), TPZMatrix< TVar >::Rows(), TPZCompMesh::Solution(), and TPZFMatrix< TVar >::Zero().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess(), and TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis().
|
protected |
Sets all materials in LastState.
Definition at line 188 of file pztransientanalysis.cpp.
References TPZCompMesh::MaterialVec(), TPZAnalysis::Mesh(), and TPZTransientMaterial< TBASEMAT >::SetLastState().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient().
|
protected |
Sets all materials to compute the mass matrix - used in the explicit scheme.
Definition at line 216 of file pztransientanalysis.cpp.
References TPZCompMesh::MaterialVec(), TPZAnalysis::Mesh(), and TPZTransientMaterial< TBASEMAT >::SetMassMatrix().
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::ComputeMassMatrix().
|
inline |
Defines max number of steps and error convergence tolerance for Newton's method.
Definition at line 185 of file pztransientanalysis.h.
References TPZTransientAnalysis< TRANSIENTCLASS >::fNewtonMaxIter, and TPZTransientAnalysis< TRANSIENTCLASS >::fNewtonTol.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess(), and TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis().
|
inline |
Defines properties of DX file.
Definition at line 179 of file pztransientanalysis.h.
References TPZTransientAnalysis< TRANSIENTCLASS >::fDXResolution, and TPZTransientAnalysis< TRANSIENTCLASS >::fSaveFrequency.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess(), and TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis().
void TPZTransientAnalysis< TRANSIENTCLASS >::SetSaveSolution | ( | int | SaveFrequency | ) |
Defines to save solution vector with SaveFrequency frequency.
If not set, no solution is kept in the process.
Definition at line 404 of file pztransientanalysis.cpp.
References TPZTransientAnalysis< TRANSIENTCLASS >::fSaveSolutionVecFrequency.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess().
|
inline |
Access to time step attribute.
Definition at line 191 of file pztransientanalysis.h.
References TPZTransientAnalysis< TRANSIENTCLASS >::fTimeStep.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess(), TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetAllMaterialsDeltaT().
|
protected |
Current iteration. Variable allowing to restart the simulation.
Definition at line 106 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::GetCurrentIter(), TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), TPZTransientAnalysis< TRANSIENTCLASS >::SaveCurrentSolutionVec(), and TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis().
|
protected |
Resolution of DX mesh.
Definition at line 120 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetSaveFrequency().
|
protected |
Flag indicating whether all steps must be performed even if tolerance is achieved.
Definition at line 115 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetConvergence().
|
protected |
Flag indicating whether the problem is linear or not.
Linear problems require the computation and decompostition of tangent matrix only once.
Definition at line 100 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::Assemble(), TPZTransientAnalysis< TRANSIENTCLASS >::ComputeLinearTangentMatrix(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis().
|
protected |
Max iteration number of Newton's method.
Definition at line 134 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetNewtonConvergence().
|
protected |
Tolerance of Newton's method.
Definition at line 137 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetNewtonConvergence().
|
protected |
Number of iterations counting from fCurrentIter to fCurrentIter+fNIter.
Definition at line 109 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetConvergence().
|
protected |
Attribute to store solution vectors during process. Pair of (solution vec, simulation time)
This attribute is cleaned every time Run method is called
Definition at line 128 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::GetSavedSolutions(), TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), TPZTransientAnalysis< TRANSIENTCLASS >::SaveCurrentSolutionVec(), and TPZTransientAnalysis< TRANSIENTCLASS >::~TPZTransientAnalysis().
|
protected |
Frequency which solution must be saved in DX file.
Definition at line 118 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetSaveFrequency().
|
protected |
Frequency which solution vector must be saved.
Zero (default value) means no solution vector but the current one is saved.
Definition at line 124 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::SaveCurrentSolutionVec(), TPZTransientAnalysis< TRANSIENTCLASS >::SetSaveSolution(), and TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis().
|
protected |
Tolerance to consider the problem solution as steady state.
Definition at line 112 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::SetConvergence().
|
protected |
Simulation time step.
Definition at line 103 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::TimeStep(), and TPZTransientAnalysis< TRANSIENTCLASS >::TPZTransientAnalysis().
|
static |
Static attribute storing the current time of simulation.
Definition at line 35 of file pztransientanalysis.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::GetgTime(), TPZTransientAnalysis< TRANSIENTCLASS >::PostProcess(), TPZTransientAnalysis< TRANSIENTCLASS >::RunExplicit(), TPZTransientAnalysis< TRANSIENTCLASS >::RunTransient(), and TPZTransientAnalysis< TRANSIENTCLASS >::SaveCurrentSolutionVec().