LifeV
structure/testsuite/structuralsolver/ud_functions.cpp
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  * @brief File containing the boundary conditions for the Monolithic Test
30  *
31  * @date 2009-04-09
32  * @author Paolo Tricerri <paolo.tricerri@epfl.ch>
33  *
34  * @maintainer Paolo Tricerri <paolo.tricerri@epfl.ch>
35  *
36  * Contains the functions to be assigned as boundary conditions, in the file boundaryConditions.hpp . The functions
37  * can depend on time and space, while they can take in input an ID specifying one of the three principal axis
38  * if the functions to assign is vectorial and the boundary condition is of type \c Full \c.
39  */
40 
41 #include "ud_functions.hpp"
42 
43 namespace LifeV
44 {
45 
46 Real f (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& i)
47 {
48  switch (i)
49  {
50  case 0:
51  return 0.0;
52  break;
53  case 1:
54  return 0.0;
55  break;
56  case 2:
57  return 0.0;
58  break;
59  default:
60  ERROR_MSG ("This entrie is not allowed: ud_functions.hpp");
61  return 0.;
62  break;
63  }
64 }
65 
66 
67 Real fzero_scalar (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/)
68 {
69  return 0.0;
70 }
71 
72 Real InternalPressure (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/)
73 {
74  return -1e+5;
75  //return -260000*sin(80*3.141592*t);
76 }
77 
78 // Initial displacement and velocity
79 Real d0 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& i)
80 {
81  switch (i)
82  {
83  case 0:
84  return 0.;
85  break;
86  case 1:
87  return 0.;
88  break;
89  case 2:
90  return 0.;
91  break;
92  default:
93  ERROR_MSG ("This entrie is not allowed: ud_functions.hpp");
94  return 0.;
95  break;
96  }
97 }
98 
99 Real w0 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& i)
100 {
101 
102  switch (i)
103  {
104  case 0:
105  return 0.0;
106  break;
107  case 1:
108  return 0.0;
109  break;
110  case 2:
111  return 0.0;
112  break;
113  default:
114  ERROR_MSG ("This entrie is not allowed: ud_functions.hpp");
115  return 0.;
116  break;
117  }
118 }
119 
120 Real a0 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& i)
121 {
122 
123  switch (i)
124  {
125  case 0:
126  return 0.0;
127  break;
128  case 1:
129  return 0.0;
130  break;
131  case 2:
132  return 0.0;
133  break;
134  default:
135  ERROR_MSG ("This entrie is not allowed: ud_functions.hpp");
136  return 0.;
137  break;
138  }
139 }
140 
141 
142 //----------------------------------------------Boundary Conditions--------------
143 
144 Real g1 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& i)
145 {
146  switch (i)
147  {
148  case 0:
149  return 0.;
150  break;
151  case 1:
152  return 0.;
153  break;
154  case 2:
155  return 0.;
156  break;
157  default:
158  ERROR_MSG ("This entrie is not allowed: ud_functions.hpp");
159  return 0.;
160  break;
161  }
162 }
163 
164 Real g2 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& i)
165 {
166  switch (i)
167  {
168  case 0:
169  return 0.;
170  break;
171  case 1:
172  return 0.;
173  break;
174  case 2:
175  return 1.e+5;
176  break;
177  default:
178  ERROR_MSG ("This entrie is not allowed: ud_functions.hpp");
179  return 0.;
180  break;
181  }
182 }
183 
184 Real g3 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& i)
185 {
186  switch (i)
187  {
188  case 0:
189  return 0.;
190  break;
191  case 1:
192  return 0.;
193  break;
194  case 2:
195  return 0.;
196  break;
197  default:
198  ERROR_MSG ("This entrie is not allowed: ud_functions.hpp");
199  return 0.;
200  break;
201  }
202 }
203 
204 }
Real d0(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
void updateInverseJacobian(const UInt &iQuadPt)
Real w0(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
Real g2(const Real &, const Real &, const Real &, const Real &, const ID &i)
#define ERROR_MSG(A)
Definition: LifeAssert.hpp:69
uint32_type ID
IDs.
Definition: LifeV.hpp:194
Real g1(const Real &, const Real &, const Real &, const Real &, const ID &i)
Real f(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
double Real
Generic real data.
Definition: LifeV.hpp:175
Real g3(const Real &, const Real &, const Real &, const Real &, const ID &i)