35 #include "../sm/EngineeringModels/deidynamic.h" 46 #define ZERO_MASS 1.E-10 // unit dependent !!!! 100 OOFEM_ERROR(
"Unknown is of undefined ValueModeType for this problem");
110 double totalTime = 0.;
116 counter =
currentStep->giveSolutionStateCounter() + 1;
144 double coeff, maxDt, maxOmi, maxOm = 0., maxOmEl, c1, c2, c3;
163 for (
int i = 1; i <= nelem; i++ ) {
190 for (
int j = 1; j <= n; j++ ) {
192 maxOmi = charMtrx2.
at(j, j) / charMtrx.
at(j, j);
194 maxOmEl = ( maxOmEl > maxOmi ) ? ( maxOmEl ) : ( maxOmi );
199 maxOm = ( maxOm > maxOmEl ) ? ( maxOm ) : ( maxOmEl );
203 for (
int j = 1; j <= n; j++ ) {
205 if ( ( jj ) && ( charMtrx.
at(j, j) <=
ZERO_MASS ) ) {
206 charMtrx.
at(j, j) = charMtrx2.
at(j, j) / maxOmEl;
211 for (
int j = 1; j <= n; j++ ) {
221 maxDt = 2 / sqrt(maxOm);
248 if ( !iDof->isPrimaryDof() ) {
252 int jj = iDof->__giveEquationNumber();
273 c2 = ( 1. / ( 2. *
deltaT ) );
293 for (
int i = 1; i <= nelem; i++ ) {
305 for (
int j = 1; j <= n; j++ ) {
308 for (
int k = 1; k <= n; k++ ) {
327 for (
int j = 1; j <= neq; j++ ) {
331 previousDisplacementVector.
at(j);
349 for (
int i = 1; i <= neq; i++ ) {
350 prevD = previousDisplacementVector.
at(i);
366 static char dofchar[] =
"dva";
368 VM_Total, VM_Velocity, VM_Acceleration
The representation of EngngModel default unknown numbering.
FloatArray velocityVector
std::unique_ptr< TimeStep > currentStep
Current time step.
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Returns number of equations for given domain in active (current time step) time step.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
std::unique_ptr< TimeStep > previousStep
Previous time step.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
long StateCounterType
StateCounterType type used to indicate solution state.
virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
virtual void printDofOutputAt(FILE *stream, Dof *iDof, TimeStep *tStep)
DOF printing routine.
This base class is an abstraction for numerical algorithm.
double giveTargetTime()
Returns target time.
void setTimeIncrement(double newDt)
Sets solution step time increment.
Abstract base class for all finite elements.
std::vector< std::unique_ptr< DofManager > > & giveDofManagers()
virtual int __giveEquationNumber() const =0
Returns equation number of receiver, usually assigned by emodel.
int giveNumberOfElements() const
Returns number of elements in domain.
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
Computes characteristic matrix of receiver of requested type in given time step.
virtual void printMultipleOutputAt(FILE *File, TimeStep *tStep, char *ch, ValueModeType *mode, int nite)
Prints Dof output (it prints value of unknown related to dof at given timeStep).
REGISTER_EngngModel(ProblemSequence)
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
#define _IFT_DEIDynamic_dumpcoef
#define OOFEM_LOG_RELEVANT(...)
FloatArray nextDisplacementVector
bool isNotEmpty() const
Tests for empty matrix.
#define OOFEM_LOG_INFO(...)
int giveNumber()
Returns receiver's number.
Element * giveElement(int n)
Service for accessing particular domain fe element.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
Exchanges necessary remote DofManagers data.
FloatArray accelerationVector
Implementation for assembling external forces vectors in standard monolithic FE-problems.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
Returns the location array (array of code numbers) of receiver for given numbering scheme...
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver 'a' transformed using give transformation matrix r.
virtual bool giveRotationMatrix(FloatMatrix &answer)
Transformation matrices updates rotation matrix between element-local and primary DOFs...
double at(int i, int j) const
Coefficient access function.
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
Class representing vector of real numbers.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
FloatArray displacementVector
virtual void init()
Initializes the receiver state.
void zero()
Zeroes all coefficients of receiver.
void times(double s)
Multiplies receiver with scalar.
#define _IFT_DEIDynamic_deltat
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
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.
int giveNumberOfRows() const
Returns number of rows of receiver.
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...
Class representing solution step.
void add(const FloatArray &src)
Adds array src to receiver.
void resize(int s)
Resizes receiver towards requested size.