35 #include "../sm/EngineeringModels/incrementallinearstatic.h" 64 loadVector(), internalLoadVector(), incrementOfDisplacementVector(), discreteTimes()
119 printf(
"Suppressing output.\n");
140 return this->
deltaT * iStep;
195 const IntArray &nodes =
set->giveNodeList();
196 for (
int inode = 1; inode <= nodes.
giveSize(); ++inode ) {
197 for (
int idof = 1; idof <= appliedDofs.
giveSize(); ++idof ) {
199 if ( dof_bc [ nodes.
at(inode) - 1 ].find( appliedDofs.
at(idof) ) == dof_bc [ nodes.
at(inode) - 1 ].end() ) {
201 dof_bc [ nodes.
at(inode) - 1 ] [ appliedDofs.
at(idof) ] = i;
210 OOFEM_WARNING(
"More than one boundary condition assigned at time %f to node %d dof %d. Considering boundary condition %d", tStep->
giveTargetTime(), nodes.
at(inode), appliedDofs.
at(idof), dof_bc [ nodes.
at(inode) - 1 ] [appliedDofs.
at(idof)] );
230 for (
Dof *dof: *dofman ) {
232 dof->updateUnknownsDictionary(tStep, VM_Total, 0.);
236 for (
auto &bc : d->
giveBcs() ) {
239 if ( ( abc = dynamic_cast< ActiveBoundaryCondition * >(bc.get()) ) ) {
241 for (
int i = 1; i <= ndman; i++ ) {
243 for (
Dof *dof: *dofman ) {
245 dof->updateUnknownsDictionary(tStep, VM_Total, 0.);
254 for (
Dof *dof: *dofman ) {
256 if ( dof->hasBc(tStep) ) {
257 tot += dof->giveBcValue(VM_Incremental, tStep);
260 dof->updateUnknownsDictionary(tStep, VM_Total, tot);
329 OOFEM_ERROR(
"Only the mode requiresUnknownsDictionaryUpdate() is supported");
352 for (
Dof *dof: *inode ) {
354 if ( !dof->isPrimaryDof() ) {
357 val = dof->giveUnknown(VM_Total, tStep);
358 if ( !dof->hasBc(tStep) ) {
363 dof->updateUnknownsDictionary(tStep, VM_Total, val);
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
virtual bool isImposed(TimeStep *tStep)
Returns nonzero if receiver representing BC is imposed at given time, otherwise returns zero...
The representation of EngngModel default unknown numbering.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
std::unique_ptr< SparseMtrx > stiffnessMatrix
FILE * outputStream
Output stream.
#define NM_Success
Numerical method exited with success.
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.
virtual bool requiresActiveDofs()
Checks to see if active boundary condition requires special DOFs.
std::string dataOutputFileName
Path to output stream.
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
virtual ~IncrementalLinearStatic()
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
int giveNumberOfBoundaryConditions() const
Returns number of boundary conditions in domain.
IncrementalLinearStatic(int i, EngngModel *_master=NULL)
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
std::unique_ptr< TimeStep > previousStep
Previous time step.
double & at(int i)
Coefficient access function.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
virtual const IntArray & giveDofIDs() const
Array with default dofs which b.c.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
#define _IFT_IncrementalLinearStatic_deltat
This base class is an abstraction for numerical algorithm.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
virtual DofManager * giveInternalDofManager(int i)
Gives an internal dof manager from receiver.
Implementation for assembling tangent matrices in standard monolithic FE-problems.
time_t startTime
Solution start time.
double giveTargetTime()
Returns target time.
Base class for dof managers.
std::vector< std::unique_ptr< DofManager > > & giveDofManagers()
virtual void solveYourself()
Starts solution process.
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.
REGISTER_EngngModel(ProblemSequence)
unsigned long NM_Status
Mask defining NumMetod Status; which can be asked after finishing computation by Numerical Method...
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual void giveUnknowns(FloatArray &masterUnknowns, ValueModeType mode, TimeStep *tStep)
The key method of class Dof.
LinSystSolverType solverType
virtual int giveNumberOfInternalDofManagers()
Gives the number of internal dof managers.
#define OOFEM_LOG_RELEVANT(...)
virtual void setBcId(int bcId)
Overwrites the boundary condition id (0-inactive BC), intended for specific purposes such as coupling...
GeneralBoundaryCondition * giveBc(int n)
Service for accessing particular domain bc.
bool isTheFirstStep()
Check if receiver is first 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.
MetaStep * giveCurrentMetaStep()
Returns current meta step.
std::vector< std::unique_ptr< GeneralBoundaryCondition > > & giveBcs()
int giveSetNumber()
Gives the set number which boundary condition is applied to.
Class implementing Dirichlet boundary condition on DOF (primary boundary condition).
#define OOFEM_LOG_INFO(...)
int giveNumber()
Returns receiver's number.
#define _IFT_IncrementalLinearStatic_prescribedtimes
double giveDiscreteTime(int iStep)
This function returns time valid for iStep time step, used in integration of structure response...
#define _IFT_EngngModel_smtype
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
int numberOfSteps
Total number of time steps.
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.
Set of elements, boundaries, edges and/or nodes.
virtual double giveUnknownComponent(ValueModeType mode, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
#define _IFT_EngngModel_suppressOutput
Set * giveSet(int n)
Service for accessing particular domain set.
Abstract base class for all active boundary conditions.
Abstract base class for all boundary conditions of problem.
#define _IFT_EngngModel_nsteps
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
virtual int forceEquationNumbering()
Forces equation renumbering on all domains associated to engng model.
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
SparseLinearSystemNM * createSparseLinSolver(LinSystSolverType st, Domain *d, EngngModel *m)
Creates new instance of SparseLinearSystemNM corresponding to given type.
#define _IFT_EngngModel_lstype
IRResultType
Type defining the return values of InputRecord reading operations.
virtual int requiresUnknownsDictionaryUpdate()
Indicates if EngngModel requires Dofs dictionaries to be updated.
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
double endOfTimeOfInterest
Dof * giveDofWithID(int dofID) const
Returns DOF with given dofID; issues error if not present.
void zero()
Zeroes all coefficients of receiver.
ClassFactory & classFactory
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
bool suppressOutput
Flag for suppressing output to file.
This class implements extension of EngngModel for structural models.
SparseMtrxType sparseMtrxType
#define _IFT_IncrementalLinearStatic_endoftimeofinterest
virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep)
This method is responsible for computing unique dictionary id (ie hash value) from given valueModeTyp...
Abstract base class representing the "problem" under consideration.
virtual void updateDofUnknownsDictionary(DofManager *, TimeStep *)
Updates necessary values in Dofs unknown dictionaries.
int giveSize() const
Returns the size of receiver.
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.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
virtual void solveYourself()
Starts solution process.
#define OOFEM_WARNING(...)
FloatArray incrementOfDisplacementVector
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.
const char * __ValueModeTypeToString(ValueModeType _value)
void resize(int s)
Resizes receiver towards requested size.
FloatArray internalLoadVector