35 #include "../sm/EngineeringModels/diidynamic.h" 36 #include "../sm/Elements/structuralelement.h" 37 #include "../sm/Elements/structuralelementevaluator.h" 52 loadVector(), previousLoadVector(), rhs(), displacementVector(), velocityVector(), accelerationVector(),
53 previousDisplacementVector(), previousVelocityVector(), previousAccelerationVector(), previousIncrementOfDisplacement(), help()
125 if (
theta < 1.37 ) {
126 OOFEM_WARNING(
"Found theta < 1.37. Performing correction, theta = 1.37");
163 case VM_Acceleration:
167 OOFEM_ERROR(
"Unknown is of undefined ValueModeType for this problem");
177 double totalTime =
deltaT;
184 counter =
currentStep->giveSolutionStateCounter() + 1;
226 if ( !iDof->isPrimaryDof() ) {
230 int jj = iDof->__giveEquationNumber();
311 for (
int i = 1; i <= neq; i++ ) {
328 for (
int i = 1; i <= neq; i++ ) {
339 for (
int i = 1; i <= neq; i++ ) {
345 for (
int i = 1; i <= neq; i++ ) {
350 for (
int i = 1; i <= neq; i++ ) {
365 OOFEM_LOG_INFO(
"TD_Wilson: Updating acceleration, velocity and displacement.\n");
366 for (
int i = 1; i <= neq; i++ ) {
380 for (
int i = 1; i <= neq; i++ ) {
388 for (
int i = 1; i <= neq; i++ ) {
416 static char dofchar[] =
"dva";
418 VM_Total, VM_Velocity, VM_Acceleration
430 int i, j, k, jj, kk, n;
439 for ( i = 1; i <= nelem; i++ ) {
463 for ( j = 1; j <= n; j++ ) {
466 for ( k = 1; k <= n; k++ ) {
469 answer.
at(jj) += charMtrx.
at(j, k) * vec.
at(kk);
502 for (
int ielem = 1; ielem <= nelem; ielem++ ) {
568 a3 = 1 / ( 2 *
beta ) - 1;
573 a8 = dt2 * ( ( 1 / 2 ) -
beta );
616 a10 = deltaT * deltaT / 6;
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
The representation of EngngModel default unknown numbering.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
std::unique_ptr< SparseMtrx > stiffnessMatrix
#define _IFT_DIIDynamic_deltat
virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
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.
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
std::unique_ptr< SparseLinearSystemNM > nMethod
Numerical method used to solve the problem.
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.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
long StateCounterType
StateCounterType type used to indicate solution state.
FloatArray displacementVector
This base class is an abstraction for numerical algorithm.
#define _IFT_DIIDynamic_ddtScheme
std::unique_ptr< TimeStep > stepWhenIcApply
Solution step when IC (initial conditions) apply.
FloatArray previousDisplacementVector
LinSystSolverType solverType
double giveTargetTime()
Returns target time.
Abstract base class for all finite elements.
std::vector< std::unique_ptr< DofManager > > & giveDofManagers()
virtual void solveYourself()
Starts solution process.
int giveNumber()
Returns domain number.
virtual int __giveEquationNumber() const =0
Returns equation number of receiver, usually assigned by emodel.
int giveNumberOfElements() const
Returns number of elements in domain.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
#define _IFT_DIIDynamic_beta
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
Computes characteristic matrix of receiver of requested type in given time step.
FloatArray previousLoadVector
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).
#define _IFT_DIIDynamic_theta
REGISTER_EngngModel(ProblemSequence)
#define OOFEM_LOG_DEBUG(...)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual void solveYourself()
Starts solution process.
void assembleDirichletBcRhsVector(FloatArray &answer, Domain *d, TimeStep *tStep)
void rotatedWith(FloatMatrix &r, char mode)
Returns the receiver a rotated according the change-of-base matrix r.
#define OOFEM_LOG_RELEVANT(...)
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
void computeVectorOfPrescribed(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of prescribed unknowns.
double giveTimeIncrement()
Returns solution step associated time increment.
bool isTheFirstStep()
Check if receiver is first step.
bool isNotEmpty() const
Tests for empty matrix.
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.
FloatArray previousAccelerationVector
virtual void printDofOutputAt(FILE *stream, Dof *iDof, TimeStep *tStep)
DOF printing routine.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
TimeDiscretizationType
Time discretization used by transient solvers.
int giveNumber()
Returns receiver's number.
#define OOFEM_LOG_INFO(...)
Element * giveElement(int n)
Service for accessing particular domain fe element.
FloatArray velocityVector
#define _IFT_EngngModel_smtype
TimeDiscretizationType initialTimeDiscretization
int ndomains
Number of receiver domains.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
Exchanges necessary remote DofManagers data.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
Implementation for assembling external forces vectors in standard monolithic FE-problems.
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 times(double f)
Multiplies receiver by factor f.
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver 'a' transformed using give transformation matrix r.
contextIOResultType restoreYourself(DataStream &stream)
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
SparseMtrxType sparseMtrxType
virtual bool giveRotationMatrix(FloatMatrix &answer)
Transformation matrices updates rotation matrix between element-local and primary DOFs...
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
virtual void giveElementDofIDMask(IntArray &answer) const
Returns element dof mask for node.
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
double at(int i, int j) const
Coefficient access function.
void timesMtrx(FloatArray &answer, FloatArray &vec, CharType type, Domain *domain, TimeStep *tStep)
void determineConstants(TimeStep *tStep)
virtual void initializeYourself(TimeStep *tStep)
Provides the opportunity to initialize state variables stored in element integration points according...
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
#define _IFT_DIIDynamic_gamma
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
TimeDiscretizationType giveTimeDiscretization()
Returns time discretization.
Class representing vector of real numbers.
SparseLinearSystemNM * createSparseLinSolver(LinSystSolverType st, Domain *d, EngngModel *m)
Creates new instance of SparseLinearSystemNM corresponding to given type.
elementParallelMode giveParallelMode() const
Return elementParallelMode of receiver.
Implementation of matrix containing floating point numbers.
#define _IFT_EngngModel_lstype
IRResultType
Type defining the return values of InputRecord reading operations.
FloatArray previousIncrementOfDisplacement
void assemble(const FloatArray &fe, const IntArray &loc)
Assembles the array fe (typically, the load vector of a finite element) into the receiver, using loc as location array.
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
DIIDynamic(int i, EngngModel *_master=NULL)
void add(const FloatMatrix &a)
Adds matrix to the receiver.
void assembleLoadVector(FloatArray &_loadVector, Domain *domain, ValueModeType mode, TimeStep *tStep)
void zero()
Zeroes all coefficients of receiver.
void setTimeDiscretization(TimeDiscretizationType td)
Sets time discretization.
FloatArray previousVelocityVector
ClassFactory & classFactory
#define _IFT_DIIDynamic_eta
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Element in active domain is only mirror of some remote element.
This class implements extension of EngngModel for structural models.
Two-point Backward Euler method.
FloatArray accelerationVector
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
Abstract base class representing the "problem" under consideration.
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.
bool containsOnlyZeroes() const
Returns nonzero if all coefficients of the receiver are 0, else returns zero.
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.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Three-point Backward Euler method.
Callback class for assembling effective tangents composed of stiffness and mass matrix.
int giveNumberOfRows() const
Returns number of rows of receiver.
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
#define OOFEM_WARNING(...)
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.
#define _IFT_DIIDynamic_delta
void resize(int s)
Resizes receiver towards requested size.