LifeV
darcy/testsuite/basic_test/2d/user_fun.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /**
28  @file
29  @author A. Fumagalli <alessio.fumagalli@mail.polimi.it>
30  @date 2010-07-29
31 */
32 
33 #ifndef __user_fun_H
34 #define __user_fun_H 1
35 
36 #include <lifev/core/LifeV.hpp>
37 
38 #include <lifev/core/mesh/RegionMesh.hpp>
39 
40 #include <lifev/darcy/solver/DarcySolverTransientNonLinear.hpp>
41 
42 namespace dataProblem
43 {
44 
45 using namespace LifeV;
46 
47 // ===================================================
48 //! Typedef
49 // ===================================================
50 
54 
56 
58 
60 
63 
66 
69 
72 
75 
78 
81 
84 
87 
88 // ===================================================
89 //! Problem data
90 // ===================================================
91 
92 // Inverse of permeability matrix
94 {
95 public:
96  virtual Matrix eval ( const UInt& iElem, const Vector3D& P, const Real& time = 0. ) const;
97 };
98 
99 // Reaction term
101 {
102 public:
103  virtual Real eval ( const UInt& iElem, const Vector3D& P, const Real& time = 0. ) const;
104 };
105 
106 // Scalar source term
108 {
109 public:
110  virtual Real eval ( const UInt& iElem, const Vector3D& P, const Real& time = 0. ) const;
111 };
112 
113 // Vector source term
115 {
116 public:
117  virtual Vector eval ( const UInt& iElem, const Vector3D& P, const Real& time = 0. ) const;
118 };
119 
120 // Initial time primal variable for transient and non-linear transient solvers
122 {
123 public:
124  virtual Real eval ( const UInt& iElem, const Vector3D& P, const Real& time = 0. ) const;
125 };
126 
127 // Mass function for time dependent problem
129 {
130 public:
131  virtual Real eval ( const UInt& iElem, const Vector3D& P, const Real& time = 0. ) const;
132 };
133 
134 // ===================================================
135 //! Boundary data
136 // ===================================================
137 namespace BCFlags
138 {
139 // Flags for structured meshes
140 const UInt BOTTOM = 1;
141 const UInt LEFT = 2;
142 const UInt TOP = 3;
143 const UInt RIGHT = 4;
144 }
145 
146 void setBoundaryConditions ( bcHandlerPtr_Type& bcDarcy) ;
147 
148 // Boundary condition of Dirichlet
149 Real dirichlet ( const Real&, const Real&, const Real&, const Real&, const ID& );
150 
151 // ===================================================
152 //! Analytical solution
153 // ===================================================
154 
155 // Analytical solution
156 Real analyticalSolution ( const Real&, const Real&, const Real&, const Real&, const ID& );
157 
158 // Gradient of the analytical solution
159 Real analyticalFlux ( const Real&, const Real&, const Real&, const Real&, const ID& );
160 
161 } // namespace dataProblem
162 
163 #endif /* __user_fun_H */
darcySolverLinear_Type::fESpacePtr_Type fESpacePtr_Type
Real dirichlet(const Real &t, const Real &x, const Real &y, const Real &z, const ID &ic)
Definition: hyperbolic.cpp:172
darcySolver_Type::dataPtr_Type darcyDataPtr_Type
darcySolverLinear_Type::vectorField_Type vectorField_Type
darcySolverLinear_Type::matrixFctPtr_Type matrixFctPtr_Type
A Geometric Shape.
darcySolverLinear_Type::bcHandlerPtr_Type bcHandlerPtr_Type
darcySolver_Type::data_Type darcyData_Type
RegionMesh< geoElement_Type > regionMesh_Type
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.
darcySolverLinear_Type::bcHandler_Type bcHandler_Type
darcySolverLinear_Type::matrixFct_Type matrixFct_Type
darcySolverLinear_Type::scalarFct_Type scalarFct_Type
virtual Real eval(const UInt &iElem, const Vector3D &P, const Real &time=0.) const
Abstract virtual eval function.
darcySolverLinear_Type::vector_Type vector_Type
darcySolverLinear_Type::scalarFieldPtr_Type scalarFieldPtr_Type
uint32_type ID
IDs.
Definition: LifeV.hpp:194
darcySolverLinear_Type::vectorFct_Type vectorFct_Type
darcySolverLinear_Type::vectorFieldPtr_Type vectorFieldPtr_Type
DarcySolverTransientNonLinear< regionMesh_Type > darcySolver_Type
darcySolverLinear_Type::vectorFctPtr_Type vectorFctPtr_Type
std::shared_ptr< std::vector< Int > > M_isOnProc
darcySolver_Type::darcySolverLinear_Type darcySolverLinear_Type
darcySolverLinear_Type::fESpace_Type fESpace_Type
darcySolverLinear_Type::scalarField_Type scalarField_Type
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.
Definition: hyperbolic.cpp:65
std::shared_ptr< regionMesh_Type > regionMeshPtr_Type
double Real
Generic real data.
Definition: LifeV.hpp:175
darcySolverLinear_Type::vectorPtr_Type vectorPtr_Type
darcySolverLinear_Type::scalarFctPtr_Type scalarFctPtr_Type
virtual Real eval(const UInt &iElem, const Vector3D &P, const Real &time=0.) const
Abstract virtual eval function.
VectorSmall< 3 > Vector3D
MeshPartitioner< regionMesh_Type > meshPartitioner_Type
void setBoundaryConditions(bcHandlerPtr_Type &bcDarcy)
Boundary data.
implements a non-linear transient mixed-hybrid FE Darcy solver.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
virtual Real eval(const UInt &iElem, const Vector3D &P, const Real &time=0.) const
Abstract virtual eval function.
LinearTetra geoElement_Type
Typedef.