48 #define ERROR_NORM_SMALL_NUM 1.e-6 49 #define MAX_REL_ERROR_BOUND 1.e20 78 bool converged, errorOutOfRangeFlag;
88 OOFEM_LOG_INFO(
"\n----------------------------------------------------------------------------\n");
115 double size = elem->computeMeanSize();
116 if ( Le < 0 || Le >= size ) {
121 for ( nite = 0; ; ++nite ) {
126 converged = this->
checkConvergence(RT, F, rhs, ddX, X, RRT, internalForcesEBENorm, nite, errorOutOfRangeFlag);
127 if ( errorOutOfRangeFlag ) {
131 OOFEM_WARNING(
"Divergence reached after %d iterations", nite);
136 }
else if ( nite >=
nsmax ) {
142 double lambda = 210e9;
144 double c = sqrt((lambda + 2*mu) / density);
145 double dt = 0.25 * Le / c;
146 double alpha = 0.1 / dt;
147 printf(
"dt = %e\n", dt);
148 for (
int j = 0; j < neq; ++j ) {
150 X[j] = rhs[j] * dt * dt / M[j] - ( -2*X_n1[j] + X_n[j] ) - alpha * (X_n1[j] - X_n[j]) * dt;
The representation of EngngModel default unknown numbering.
virtual NM_Status solve(SparseMtrx &k, FloatArray &R, FloatArray *R0, FloatArray &X, FloatArray &dX, FloatArray &F, const FloatArray &internalForcesEBENorm, double &l, referenceLoadInputModeType rlm, int &nite, TimeStep *)
Solves the given sparse linear system of equations .
#define NM_Success
Numerical method exited with success.
virtual IRResultType initializeFrom(InputRecord *ir)
problemScale giveProblemScale()
Returns scale in multiscale simulation.
Solves static equilibrium by means of explicit dynamic iterations.
Base class for all matrices stored in sparse format.
This class implements Newton-Raphson Method, derived from abstract NumericalMethod class for solving ...
double & at(int i)
Coefficient access function.
REGISTER_SparseNonLinearSystemNM(CylindricalALM)
virtual IRResultType initializeFrom(InputRecord *ir)
FloatArray rtold
Relative iterative displacement change tolerance for each group.
void incrementStateCounter()
Updates solution state counter.
int giveNumber()
Returns domain number.
unsigned long NM_Status
Mask defining NumMetod Status; which can be asked after finishing computation by Numerical Method...
#define OOFEM_LOG_DEBUG(...)
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
void incrementSubStepNumber()
Increments receiver's substep number.
#define NM_NoSuccess
Numerical method failed to solve problem.
Domain * domain
Pointer to domain.
#define OOFEM_LOG_INFO(...)
virtual void updateComponent(TimeStep *tStep, NumericalCmpn cmpn, Domain *d)
Updates components mapped to numerical method if necessary during solution process.
FloatArray rtolf
Relative unbalanced force tolerance for each group.
virtual ParallelContext * giveParallelContext(int n)
Returns the parallel context corresponding to given domain (n) and unknown type Default implementatio...
referenceLoadInputModeType
The following parameter allows to specify how the reference load vector is obtained from given totalL...
Class representing vector of real numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
Implementation for assembling lumped mass matrix (diagonal components) in vector form.
This class provides an communication context for distributed memory parallelism.
void zero()
Zeroes all coefficients of receiver.
std::vector< std::unique_ptr< Element > > & giveElements()
Abstract base class representing the "problem" under consideration.
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
EngngModel * engngModel
Pointer to engineering model.
double localNorm(const FloatArray &src)
Norm for a locally distributed array.
#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.
void add(const FloatArray &src)
Adds array src to receiver.
bool checkConvergence(FloatArray &RT, FloatArray &F, FloatArray &rhs, FloatArray &ddX, FloatArray &X, double RRT, const FloatArray &internalForcesEBENorm, int nite, bool &errorOutOfRange)
Determines whether or not the solution has reached convergence.
void resize(int s)
Resizes receiver towards requested size.