MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
solver_impl.h File Reference
#include <limits>
Include dependency graph for solver_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void mbdyn_signal_init (int pre)
 
int mbdyn_reserve_stack (unsigned long size)
 

Variables

static const doublereal dDefaultDerivativesCoefficient = 1.e-6
 
static const integer iDefaultDummyStepsNumber = 0
 
static const doublereal dDefaultDummyStepsRatio = 1.e-3
 
static const integer iDefaultIterationsBeforeAssembly = 2
 
static const integer iDefaultIterativeSolversMaxSteps = 100
 
static const integer iDefaultPreconditionerSteps = 20
 
static const doublereal dDefaultTol = 1.e-6
 
static const doublereal defaultIterativeEtaMax = 0.9
 
static const doublereal defaultIterativeTau = 1.e-7
 
static const integer iDefaultMaxIterations = 1
 
static const doublereal dDefaultMinTimeStep = -1.
 
static const doublereal dDefaultMaxTimeStep = std::numeric_limits<doublereal>::max()
 
static const doublereal dDefaultDummyStepsTolerance = dDefaultTol
 

Function Documentation

int mbdyn_reserve_stack ( unsigned long  size)

Definition at line 254 of file solver.cc.

References buf.

Referenced by RTSolverBase::Init().

255 {
256  int buf[size];
257 
258 #ifdef HAVE_MEMSET
259  memset(buf, 0, size*sizeof(int));
260 #else /* !HAVE_MEMSET */
261  for (unsigned long i = 0; i < size; i++) {
262  buf[i] = 0;
263  }
264 #endif /* !HAVE_MEMSET */
265 
266 #ifdef HAVE_MLOCKALL
267  return mlockall(MCL_CURRENT | MCL_FUTURE);
268 #else /* !HAVE_MLOCKALL */
269  return 0;
270 #endif /* !HAVE_MLOCKALL */
271 }
static doublereal buf[BUFSIZE]
Definition: discctrl.cc:333
void mbdyn_signal_init ( int  pre)

Definition at line 208 of file solver.cc.

Referenced by InverseSolver::Prepare(), and Solver::Prepare().

209 {
210 #ifdef HAVE_SIGNAL
211 #if defined(__FreeBSD__)
212  __sighandler_t *hdl;
213 #else // ! defined(__FreeBSD__)
214  __sighandler_t hdl;
215 #endif // ! defined(__FreeBSD__)
216 
217  if (pre) {
218  hdl = mbdyn_really_exit_handler;
219 
220  } else {
221  hdl = mbdyn_modify_final_time_handler;
222  }
223  /*
224  * FIXME: don't do this if compiling with USE_RTAI
225  * Re FIXME: use sigaction() ...
226  */
227  ::mbdyn_sh_term = signal(SIGTERM, hdl);
228  if (::mbdyn_sh_term == SIG_IGN) {
229  signal(SIGTERM, SIG_IGN);
230  }
231 
232  ::mbdyn_sh_int = signal(SIGINT, hdl);
233  if (::mbdyn_sh_int == SIG_IGN) {
234  signal(SIGINT, SIG_IGN);
235  }
236 
237 #ifdef SIGHUP
238  ::mbdyn_sh_hup = signal(SIGHUP, hdl);
239  if (::mbdyn_sh_hup == SIG_IGN) {
240  signal(SIGHUP, SIG_IGN);
241  }
242 #endif // SIGHUP
243 
244 #ifdef SIGPIPE
245  ::mbdyn_sh_pipe = signal(SIGPIPE, hdl);
246  if (::mbdyn_sh_pipe == SIG_IGN) {
247  signal(SIGPIPE, SIG_IGN);
248  }
249 #endif // SIGPIPE
250 #endif /* HAVE_SIGNAL */
251 }

Variable Documentation

const doublereal dDefaultDerivativesCoefficient = 1.e-6
static

Definition at line 89 of file solver_impl.h.

Referenced by Solver::ReadData().

const doublereal dDefaultDummyStepsRatio = 1.e-3
static

Definition at line 91 of file solver_impl.h.

const doublereal dDefaultDummyStepsTolerance = dDefaultTol
static

Definition at line 102 of file solver_impl.h.

Referenced by Solver::ReadData().

const doublereal dDefaultMaxTimeStep = std::numeric_limits<doublereal>::max()
static

Definition at line 101 of file solver_impl.h.

Referenced by Solver::dGetInitialMaxTimeStep(), and InverseSolver::ReadData().

const doublereal dDefaultMinTimeStep = -1.
static

Definition at line 100 of file solver_impl.h.

Referenced by Factor::Init().

const doublereal dDefaultTol = 1.e-6
static

Definition at line 95 of file solver_impl.h.

Referenced by InverseSolver::ReadData(), and Solver::ReadData().

const doublereal defaultIterativeEtaMax = 0.9
static

Definition at line 96 of file solver_impl.h.

const doublereal defaultIterativeTau = 1.e-7
static

Definition at line 97 of file solver_impl.h.

const integer iDefaultDummyStepsNumber = 0
static

Definition at line 90 of file solver_impl.h.

Referenced by Solver::ReadData().

const integer iDefaultIterationsBeforeAssembly = 2
static

Definition at line 92 of file solver_impl.h.

Referenced by InverseSolver::ReadData(), and Solver::ReadData().

const integer iDefaultIterativeSolversMaxSteps = 100
static

Definition at line 93 of file solver_impl.h.

const integer iDefaultMaxIterations = 1
static

Definition at line 99 of file solver_impl.h.

Referenced by InverseSolver::ReadData(), and Solver::ReadData().

const integer iDefaultPreconditionerSteps = 20
static

Definition at line 94 of file solver_impl.h.