-
Notifications
You must be signed in to change notification settings - Fork 9
/
SIMStatPoroElasticity.h
66 lines (53 loc) · 1.64 KB
/
SIMStatPoroElasticity.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// $Id$
//==============================================================================
//!
//! \file SIMStatPoroElasticity.h
//!
//! \date Sep 10 2018
//!
//! \author Knut Morten Okstad / SINTEF
//!
//! \brief Static simulation driver for poroelasticity problems.
//!
//==============================================================================
#ifndef _SIM_STAT_PORO_ELASTICITY_H_
#define _SIM_STAT_PORO_ELASTICITY_H_
#include "SIMPoroElasticity.h"
#include "PoroElasticity.h"
#include "TimeStep.h"
/*!
\brief Driver class for quasi-static poroelasticity problems.
*/
template<class Dim, bool staticFlow> class SIMStatPoroElasticity : public SIMPoroElasticity<Dim>
{
public:
//! \brief Default constructor.
SIMStatPoroElasticity() {}
//! \brief Constructor for mixed problems.
explicit SIMStatPoroElasticity(const std::vector<unsigned char>& flds)
: SIMPoroElasticity<Dim>(flds) {}
//! \brief Empty destructor.
virtual ~SIMStatPoroElasticity() {}
//! \brief Computes the solution for the current load step.
virtual bool solveStep(TimeStep& tp)
{
this->printStep(tp.step,tp.time);
Vector empty;
if (!this->updateDirichlet(tp.time.t,&empty))
return false;
double oldtol = utl::zero_print_tol;
utl::zero_print_tol = 1.0e-8;
bool ok = this->SIMPoroElasticity<Dim>::solveStep(tp);
utl::zero_print_tol = oldtol;
return ok;
}
protected:
//! \brief Returns the actual integrand.
virtual Elasticity* getIntegrand()
{
if (!Dim::myProblem)
Dim::myProblem = new PoroElasticity(Dim::dimension, Dim::nf.size() > 1, staticFlow);
return static_cast<Elasticity*>(Dim::myProblem);
}
};
#endif