46#define ZERO_MASS 1.E-10
50DEIDynamic :: ~DEIDynamic() { }
64 StructuralEngngModel :: initializeFrom(ir);
71double DEIDynamic :: giveUnknownComponent(ValueModeType mode,
TimeStep *tStep,
Domain *d,
Dof *dof)
97 OOFEM_ERROR(
"Unknown is of undefined ValueModeType for this problem");
107 double totalTime = 0.;
113 counter =
currentStep->giveSolutionStateCounter() + 1;
117 currentStep = std::make_unique<TimeStep>(istep,
this, 1, totalTime,
deltaT, counter);
141 double coeff, maxDt, maxOmi, maxOm = 0., maxOmEl, c1, c2, c3;
160 for (
int i = 1; i <= nelem; i++ ) {
187 for (
int j = 1; j <= n; j++ ) {
189 maxOmi = charMtrx2.
at(j, j) / charMtrx.
at(j, j);
191 maxOmEl = ( maxOmEl > maxOmi ) ? ( maxOmEl ) : ( maxOmi );
196 maxOm = ( maxOm > maxOmEl ) ? ( maxOm ) : ( maxOmEl );
200 for (
int j = 1; j <= n; j++ ) {
202 if ( ( jj ) && ( charMtrx.
at(j, j) <=
ZERO_MASS ) ) {
203 charMtrx.
at(j, j) = charMtrx2.
at(j, j) / maxOmEl;
208 for (
int j = 1; j <= n; j++ ) {
218 maxDt = 2 / sqrt(maxOm);
241 for (
Dof *iDof: *node ) {
245 if ( !iDof->isPrimaryDof() ) {
249 int jj = iDof->__giveEquationNumber();
270 c2 = ( 1. / ( 2. *
deltaT ) );
290 for (
int i = 1; i <= nelem; i++ ) {
302 for (
int j = 1; j <= n; j++ ) {
305 for (
int k = 1; k <= n; k++ ) {
324 for (
int j = 1; j <= neq; j++ ) {
328 previousDisplacementVector.
at(j);
346 for (
int i = 1; i <= neq; i++ ) {
347 prevD = previousDisplacementVector.
at(i);
361void DEIDynamic :: printDofOutputAt(FILE *stream,
Dof *iDof,
TimeStep *tStep)
363 static char dofchar[] =
"dva";
364 static ValueModeType dofmodes[] = {
365 VM_Total, VM_Velocity, VM_Acceleration
#define REGISTER_EngngModel(class)
FloatArray displacementVector
FloatArray velocityVector
FloatArray nextDisplacementVector
FloatArray accelerationVector
int giveNumberOfFirstStep(bool force=false) override
virtual void printMultipleOutputAt(FILE *File, TimeStep *tStep, char *ch, ValueModeType *mode, int nite)
virtual int __giveEquationNumber() const =0
int giveNumberOfElements() const
Returns number of elements in domain.
std ::vector< std ::unique_ptr< DofManager > > & giveDofManagers()
Element * giveElement(int n)
virtual bool giveRotationMatrix(FloatMatrix &answer)
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
virtual TimeStep * giveCurrentStep(bool force=false)
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
std ::unique_ptr< TimeStep > previousStep
Previous time step.
Domain * giveDomain(int n)
std ::unique_ptr< TimeStep > currentStep
Current time step.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
void rotatedWith(const FloatMatrix &r, char mode='n')
bool isNotEmpty() const
Tests for empty matrix.
int giveNumberOfRows() const
Returns number of rows of receiver.
double at(std::size_t i, std::size_t j) const
double giveTargetTime()
Returns target time.
void setTimeIncrement(double newDt)
Sets solution step time increment.
int giveNumber()
Returns receiver's number.
#define _IFT_DEIDynamic_deltat
#define _IFT_DEIDynamic_dumpcoef
#define OOFEM_LOG_INFO(...)
#define OOFEM_LOG_RELEVANT(...)
long StateCounterType
StateCounterType type used to indicate solution state.