49 Matrix invK (
static_cast<UInt> (2),
static_cast<UInt> (2) );
51 const Real unkown_n = scalarField (0).eval ( iElem, P, time );
54 const Real Entry00 = 1.;
55 const Real Entry01 = 0.;
58 const Real Entry11 = 1. / ( unkown_n * unkown_n + 1. );
61 invK (
static_cast<UInt> (0),
static_cast<UInt> (0) ) = Entry00;
62 invK (
static_cast<UInt> (0),
static_cast<UInt> (1) ) = Entry01;
63 invK (
static_cast<UInt> (1),
static_cast<UInt> (0) ) = Entry01;
64 invK (
static_cast<UInt> (1),
static_cast<UInt> (1) ) = Entry11;
78 const Real x (P
[0
]), y (P
[1
]), t (time);
79 return t * x * x - 2. * t * t - t -
80 ( 6. * y + 2. * t * t * y ) * ( 1. + t * t * t * t * x * x * x * x +
81 y * y * y * y * y * y +
82 2. * t * t * x * x * y * y * y ) -
83 ( 3. * y * y + t * t * y * y ) * ( 6. * y * y * y * y * y +
84 6. * t * t * x * x * y * y ) +
85 t * t * x * x + y * y * y;
91 const Real x (P
[0
]), y (P
[1
]), t (time);
92 Vector source (
static_cast<
UInt> (2) );
94 const Real Entry0 = t * ( - x + y );
95 const Real Entry1 = t * t * ( - y * y );
97 source (
static_cast<UInt> (0) ) = Entry0;
98 source (
static_cast<UInt> (1) ) = Entry1;
123 dirichletBDfun.setFunction ( dirichlet );
125 bcDarcy->addBC (
"Top", BCFlags::TOP, Essential, Scalar, dirichletBDfun );
126 bcDarcy->addBC (
"Bottom", BCFlags::BOTTOM, Essential, Scalar, dirichletBDfun );
127 bcDarcy->addBC (
"Left", BCFlags::LEFT, Essential, Scalar, dirichletBDfun );
128 bcDarcy->addBC (
"Right", BCFlags::RIGHT, Essential, Scalar, dirichletBDfun );
153 return t * t * x * x + y * y * y;
166 return -1. * ( 2. * t * t * x + t * ( x - y ) );
168 return -1. * ( ( 3. * y * y + t * t * y * y ) *
169 ( 1. + t * t * t * t * x * x * x * x +
170 y * y * y * y * y * y +
171 2. * t * t * x * x * y * y * y ) );
Real dirichlet(const Real &t, const Real &x, const Real &y, const Real &z, const ID &ic)
darcySolverLinear_Type::bcHandlerPtr_Type bcHandlerPtr_Type
Real const & operator[](UInt const &i) const
Operator [].
virtual Matrix eval(const UInt &iElem, const Vector3D &P, const Real &time=0.) const
Abstract virtual eval function.
virtual Real eval(const UInt &iElem, const Vector3D &P, const Real &time=0.) const
Abstract virtual eval function.
BCFunctionBase - class that holds the function used for prescribing boundary conditions.
virtual Real eval(const UInt &iElem, const Vector3D &P, const Real &time=0.) const
Abstract virtual eval function.
Real analyticalFlux(const Real &, const Real &, const Real &, const Real &, const ID &)
virtual Vector eval(const UInt &iElem, const Vector3D &P, const Real &time=0.) const
Abstract virtual eval function.
Real analyticalSolution(const Real &t, const Real &x, const Real &y, const Real &, const ID &)
Analytical solution.
double Real
Generic real data.
virtual Real eval(const UInt &iElem, const Vector3D &P, const Real &time=0.) const
Abstract virtual eval function.
VectorSmall< 3 > Vector3D
void setBoundaryConditions(bcHandlerPtr_Type &bcDarcy)
Boundary data.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
virtual Real eval(const UInt &iElem, const Vector3D &P, const Real &time=0.) const
Abstract virtual eval function.