38 #include "../sm/EngineeringModels/linearstability.h" 97 if (
rtolv < 1.e-12 ) {
101 if (
rtolv > 0.01 ) {
115 printf(
"Suppressing output.\n");
145 if ( activeVector ) {
152 OOFEM_ERROR(
"Unknown is of undefined type for this problem");
165 counter =
currentStep->giveSolutionStateCounter() + 1;
212 #ifndef LIN_STAB_COMPATIBILITY_MODE 311 dman->updateYourself(tStep);
320 elem->updateInternalState(tStep);
321 elem->updateYourself(tStep);
332 if ((domain->giveContextOutputMode() ==
COM_Always ) ||
336 if (tStep->
giveNumber()%domain->giveContextOutputStep() == 0)
353 tStep->
setTime( (
double ) i );
362 dman->updateYourself(tStep);
378 fprintf(file,
"\nLinear Stability:");
379 fprintf(file,
"\nEigen Values are:\n-----------------\n");
382 fprintf(file,
"%15.8e ",
eigVal.
at(i) );
383 if ( ( i % 5 ) == 0 ) {
388 fprintf(file,
"\n\n");
392 fprintf(file,
"\nLinear solution\n\n");
394 fprintf(file,
"\nEigen vector no. %d, correposnding eigen value is %15.8e\n\n", i,
eigVal.
at(i));
396 tStep->
setTime( (
double ) i );
405 dman->updateYourself(tStep);
406 dman->printOutputAt(file, tStep);
413 elem->printOutputAt(file, tStep);
EngngModelTimer timer
E-model timer.
GenEigvalSolverType
Types of general eigenvalue solvers.
virtual void updateAttributes(MetaStep *mStep)
Update receiver attributes according to step metaStep attributes.
The representation of EngngModel default unknown numbering.
FILE * outputStream
Output stream.
std::unique_ptr< TimeStep > currentStep
Current time step.
std::string simulationDescription
Implementation for assembling internal forces vectors in standard monolithic, nonlinear FE-problems...
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Returns number of equations for given domain in active (current time step) time step.
std::unique_ptr< SparseGeneralEigenValueSystemNM > nMethod
std::string dataOutputFileName
Path to output stream.
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
virtual void doStepOutput(TimeStep *tStep)
Prints the ouput of the solution step (using virtual this->printOutputAtservice) to the stream detemi...
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
void startTimer(EngngModelTimerType t)
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
contextIOResultType storeYourself(DataStream &stream) const
std::unique_ptr< TimeStep > previousStep
Previous time step.
double & at(int i)
Coefficient access function.
MetaStep * giveMetaStep(int i)
Returns the i-th meta step.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
virtual int requiresUnknownsDictionaryUpdate()
Indicates if EngngModel requires Dofs dictionaries to be updated.
long StateCounterType
StateCounterType type used to indicate solution state.
This base class is an abstraction for all numerical methods solving sparse linear system of equations...
virtual void setActiveVector(int i)
Only relevant for eigen value analysis. Otherwise does noting.
This base class is an abstraction for numerical algorithm.
Implementation for assembling tangent matrices in standard monolithic FE-problems.
time_t startTime
Solution start time.
double giveTargetTime()
Returns target time.
void setTime(double newt)
Sets target and intrinsic time to be equal.
void doOutput(TimeStep *tStep, bool substepFlag=false)
Writes the output.
std::unique_ptr< SparseLinearSystemNM > nMethodLS
Numerical method used to solve the static problem.
std::vector< std::unique_ptr< DofManager > > & giveDofManagers()
int numberOfRequiredEigenValues
virtual int __giveEquationNumber() const =0
Returns equation number of receiver, usually assigned by emodel.
int giveNumberOfElements() const
Returns number of elements in domain.
REGISTER_EngngModel(ProblemSequence)
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
void printReactionForces(TimeStep *tStep, int id, FILE *out)
Computes and prints reaction forces, computed from nodal internal forces.
contextIOResultType storeYourself(DataStream &stream) const
If required (for backtracking computation).
#define VERBOSE_PRINT0(str, number)
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain)
Assembles characteristic matrix of required type into given sparse matrix.
MetaStep * giveCurrentMetaStep()
Returns current meta step.
#define OOFEM_LOG_INFO(...)
int giveNumber()
Returns receiver's number.
FILE * giveOutputStream()
Returns file descriptor of output file.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
int numberOfSteps
Total number of time steps.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
Exchanges necessary remote DofManagers data.
virtual void terminate(TimeStep *tStep)
Terminates the solution of time step.
Implementation for assembling external forces vectors in standard monolithic FE-problems.
GenEigvalSolverType solverType
Numerical method used to solve the problem.
#define _IFT_LinearStability_rtolv
std::unique_ptr< SparseMtrx > stiffnessMatrix
SparseLinearSystemNM * giveNumericalMethodForLinStaticProblem(TimeStep *tStep)
contextIOResultType restoreYourself(DataStream &stream)
#define _IFT_EngngModel_suppressOutput
int testTimeStepOutput(TimeStep *)
Tests if given time step output is required.
int nMetaSteps
Number of meta steps.
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
Enable for post-processing.
double at(int i, int j) const
Coefficient access function.
ExportModuleManager * exportModuleManager
Export module manager.
#define _IFT_LinearStability_stype
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
contextIOResultType restoreYourself(DataStream &stream)
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
SparseLinearSystemNM * createSparseLinSolver(LinSystSolverType st, Domain *d, EngngModel *m)
Creates new instance of SparseLinearSystemNM corresponding to given type.
Input attribute of domain (each n-th step).
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual void updateDofUnknownsDictionary(DofManager *, TimeStep *)
Updates necessary values in Dofs unknown dictionaries.
int giveMetaStepNumber()
Returns receiver's meta step number.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void zero()
Zeroes all coefficients of receiver.
ClassFactory & classFactory
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
void zero()
Zeroes all coefficient of receiver.
OutputManager * giveOutputManager()
Returns domain output manager.
bool suppressOutput
Flag for suppressing output to file.
Callback class for assembling initial stress matrices.
std::vector< std::unique_ptr< Element > > & giveElements()
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
SparseGeneralEigenValueSystemNM * createGeneralizedEigenValueSolver(GenEigvalSolverType name, Domain *d, EngngModel *m)
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to output domain stream, for given time step.
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
void terminateLinStatic(TimeStep *tStep)
Abstract class Dof represents Degree Of Freedom in finite element mesh.
void negated()
Switches the sign of every coefficient of receiver.
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
virtual void solveYourself()
Starts solution process.
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Assembles characteristic vector of required type from dofManagers, element, and active boundary condi...
FloatArray displacementVector
Class representing solution step.
void setNumber(int i)
Set receiver's number.
#define _IFT_LinearStability_nroot
std::unique_ptr< SparseMtrx > initialStressMatrix
void resize(int s)
Resizes receiver towards requested size.