35 #include "../sm/EngineeringModels/eigenvaluedynamic.h" 85 if (
rtolv < 1.e-12 ) {
104 printf(
"Suppressing output.\n");
138 OOFEM_ERROR(
"Unknown is of undefined type for this problem");
152 counter =
currentStep->giveSolutionStateCounter() + 1;
229 tStep->
setTime( (
double ) i );
241 fprintf(file,
"\nOutput for time %.3e \n\n", 1.0);
243 fprintf(file,
"\n\nEigen Values (Omega^2) are:\n-----------------\n");
246 fprintf(file,
"%15.8e ",
eigVal.
at(i) );
247 if ( ( i % 5 ) == 0 ) {
252 fprintf(file,
"\n\n");
255 fprintf(file,
"\nOutput for eigen value no. %.3e \n", (
double ) i);
256 fprintf(file,
"Printing eigen vector no. %d, corresponding eigen value is %15.8e\n\n",
258 tStep->
setTime( (
double ) i );
268 dman->updateYourself(tStep);
269 dman->printOutputAt(file, tStep);
GenEigvalSolverType
Types of general eigenvalue solvers.
The representation of EngngModel default unknown numbering.
FILE * outputStream
Output stream.
std::unique_ptr< TimeStep > currentStep
Current time step.
std::string simulationDescription
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Returns number of equations for given domain in active (current time step) time step.
std::string dataOutputFileName
Path to output stream.
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
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.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
This base class is an abstraction for numerical algorithm.
virtual void doStepOutput(TimeStep *tStep)
Prints the ouput of the solution step (using virtual this->printOutputAtservice) to the stream detemi...
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::vector< std::unique_ptr< DofManager > > & giveDofManagers()
Implementation for assembling the consistent mass matrix.
virtual int __giveEquationNumber() const =0
Returns equation number of receiver, usually assigned by emodel.
virtual void setActiveVector(int i)
Only relevant for eigen value analysis. Otherwise does noting.
REGISTER_EngngModel(ProblemSequence)
#define _IFT_EigenValueDynamic_stype
contextIOResultType storeYourself(DataStream &stream) const
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
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.
int numberOfRequiredEigenValues
int giveNumber()
Returns receiver's number.
#define OOFEM_LOG_INFO(...)
FILE * giveOutputStream()
Returns file descriptor of output file.
#define _IFT_EngngModel_smtype
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
int numberOfSteps
Total number of time steps.
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
SparseMtrxType sparseMtrxType
contextIOResultType restoreYourself(DataStream &stream)
#define _IFT_EngngModel_suppressOutput
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
double at(int i, int j) const
Coefficient access function.
ExportModuleManager * exportModuleManager
Export module manager.
#define _IFT_EigenValueDynamic_rtolv
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...
std::unique_ptr< SparseGeneralEigenValueSystemNM > nMethod
Numerical method used to solve the problem.
IRResultType
Type defining the return values of InputRecord reading operations.
#define _IFT_EigenValueDynamic_nroot
virtual void updateDofUnknownsDictionary(DofManager *, TimeStep *)
Updates necessary values in Dofs unknown dictionaries.
int giveMetaStepNumber()
Returns receiver's meta step number.
std::unique_ptr< SparseMtrx > stiffnessMatrix
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void zero()
Zeroes all coefficients of receiver.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) 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.
bool suppressOutput
Flag for suppressing output to file.
SparseGeneralEigenValueSystemNM * createGeneralizedEigenValueSolver(GenEigvalSolverType name, Domain *d, EngngModel *m)
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.
GenEigvalSolverType solverType
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.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
std::unique_ptr< SparseMtrx > massMatrix
double rtolv
Relative tolerance.
Class representing solution step.
void setNumber(int i)
Set receiver's number.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to output domain stream, for given time step.
void resize(int s)
Resizes receiver towards requested size.