14 #if !defined(KRATOS_PORO_CONDITION_UTILITIES )
15 #define KRATOS_PORO_CONDITION_UTILITIES
33 rNu(0,0) = Ncontainer(GPoint,0); rNu(0,2) = Ncontainer(GPoint,1);
34 rNu(1,1) = Ncontainer(GPoint,0); rNu(1,3) = Ncontainer(GPoint,1);
42 rNu(0,0) = Ncontainer(GPoint,0); rNu(0,3) = Ncontainer(GPoint,1); rNu(0,6) = Ncontainer(GPoint,2);
43 rNu(1,1) = Ncontainer(GPoint,0); rNu(1,4) = Ncontainer(GPoint,1); rNu(1,7) = Ncontainer(GPoint,2);
44 rNu(2,2) = Ncontainer(GPoint,0); rNu(2,5) = Ncontainer(GPoint,1); rNu(2,8) = Ncontainer(GPoint,2);
52 rNu(0,0) = Ncontainer(GPoint,0); rNu(0,3) = Ncontainer(GPoint,1); rNu(0,6) = Ncontainer(GPoint,2); rNu(0,9) = Ncontainer(GPoint,3);
53 rNu(1,1) = Ncontainer(GPoint,0); rNu(1,4) = Ncontainer(GPoint,1); rNu(1,7) = Ncontainer(GPoint,2); rNu(1,10) = Ncontainer(GPoint,3);
54 rNu(2,2) = Ncontainer(GPoint,0); rNu(2,5) = Ncontainer(GPoint,1); rNu(2,8) = Ncontainer(GPoint,2); rNu(2,11) = Ncontainer(GPoint,3);
65 unsigned int index = 0;
66 for(
unsigned int i=0;
i<2;
i++)
68 rVector[0] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
69 rVector[1] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
81 unsigned int index = 0;
82 for(
unsigned int i=0;
i<3;
i++)
84 rVector[0] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
85 rVector[1] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
86 rVector[2] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
98 unsigned int index = 0;
99 for(
unsigned int i=0;
i<4;
i++)
101 rVector[0] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
102 rVector[1] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
103 rVector[2] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
114 unsigned int index = 0;
115 for(
unsigned int i=0;
i<2;
i++)
118 rNodalVariableVector[index++] = NodalVariableAux[0];
119 rNodalVariableVector[index++] = NodalVariableAux[1];
130 unsigned int index = 0;
131 for(
unsigned int i=0;
i<3;
i++)
134 rNodalVariableVector[index++] = NodalVariableAux[0];
135 rNodalVariableVector[index++] = NodalVariableAux[1];
136 rNodalVariableVector[index++] = NodalVariableAux[2];
147 unsigned int index = 0;
148 for(
unsigned int i=0;
i<4;
i++)
151 rNodalVariableVector[index++] = NodalVariableAux[0];
152 rNodalVariableVector[index++] = NodalVariableAux[1];
153 rNodalVariableVector[index++] = NodalVariableAux[2];
162 unsigned int Global_i, Local_i;
164 for(
unsigned int i = 0;
i < 2;
i++)
166 Global_i =
i * (2 + 1);
169 rRightHandSideVector[Global_i] += UBlockVector[Local_i];
170 rRightHandSideVector[Global_i+1] += UBlockVector[Local_i+1];
179 unsigned int Global_i, Local_i;
181 for(
unsigned int i = 0;
i < 3;
i++)
183 Global_i =
i * (3 + 1);
186 rRightHandSideVector[Global_i] += UBlockVector[Local_i];
187 rRightHandSideVector[Global_i+1] += UBlockVector[Local_i+1];
188 rRightHandSideVector[Global_i+2] += UBlockVector[Local_i+2];
197 unsigned int Global_i, Local_i;
199 for(
unsigned int i = 0;
i < 4;
i++)
201 Global_i =
i * (3 + 1);
204 rRightHandSideVector[Global_i] += UBlockVector[Local_i];
205 rRightHandSideVector[Global_i+1] += UBlockVector[Local_i+1];
206 rRightHandSideVector[Global_i+2] += UBlockVector[Local_i+2];
212 template<
class TVectorType >
213 static inline void AssemblePBlockVector(
Vector& rRightHandSideVector,
const TVectorType& PBlockVector,
const unsigned int& Dim,
const unsigned int& NumNodes)
215 unsigned int Global_i;
217 for(
unsigned int i = 0;
i < NumNodes;
i++)
219 Global_i =
i * (Dim + 1) + Dim;
221 rRightHandSideVector[Global_i] += PBlockVector[
i];
230 unsigned int Global_i, Global_j, Local_i;
232 for(
unsigned int i = 0;
i < 2;
i++)
234 Global_i =
i * (2 + 1);
237 for(
unsigned int j = 0;
j < 2;
j++)
239 Global_j =
j * (2 + 1) + 2;
241 rLeftHandSideMatrix(Global_i,Global_j) += UPBlockMatrix(Local_i,
j);
242 rLeftHandSideMatrix(Global_i+1,Global_j) += UPBlockMatrix(Local_i+1,
j);
252 unsigned int Global_i, Global_j, Local_i;
254 for(
unsigned int i = 0;
i < 3;
i++)
256 Global_i =
i * (3 + 1);
259 for(
unsigned int j = 0;
j < 3;
j++)
261 Global_j =
j * (3 + 1) + 3;
263 rLeftHandSideMatrix(Global_i,Global_j) += UPBlockMatrix(Local_i,
j);
264 rLeftHandSideMatrix(Global_i+1,Global_j) += UPBlockMatrix(Local_i+1,
j);
265 rLeftHandSideMatrix(Global_i+2,Global_j) += UPBlockMatrix(Local_i+2,
j);
275 unsigned int Global_i, Global_j, Local_i;
277 for(
unsigned int i = 0;
i < 4;
i++)
279 Global_i =
i * (3 + 1);
282 for(
unsigned int j = 0;
j < 4;
j++)
284 Global_j =
j * (3 + 1) + 3;
286 rLeftHandSideMatrix(Global_i,Global_j) += UPBlockMatrix(Local_i,
j);
287 rLeftHandSideMatrix(Global_i+1,Global_j) += UPBlockMatrix(Local_i+1,
j);
288 rLeftHandSideMatrix(Global_i+2,Global_j) += UPBlockMatrix(Local_i+2,
j);
298 unsigned int Global_i, Global_j, Local_j;
300 for(
unsigned int i = 0;
i < 2;
i++)
302 Global_i =
i * (2 + 1) + 2;
304 for(
unsigned int j = 0;
j < 2;
j++)
306 Global_j =
j * (2 + 1);
309 rLeftHandSideMatrix(Global_i,Global_j) += PUBlockMatrix(
i,Local_j);
310 rLeftHandSideMatrix(Global_i,Global_j+1) += PUBlockMatrix(
i,Local_j+1);
320 unsigned int Global_i, Global_j, Local_j;
322 for(
unsigned int i = 0;
i < 3;
i++)
324 Global_i =
i * (3 + 1) + 3;
326 for(
unsigned int j = 0;
j < 3;
j++)
328 Global_j =
j * (3 + 1);
331 rLeftHandSideMatrix(Global_i,Global_j) += PUBlockMatrix(
i,Local_j);
332 rLeftHandSideMatrix(Global_i,Global_j+1) += PUBlockMatrix(
i,Local_j+1);
333 rLeftHandSideMatrix(Global_i,Global_j+2) += PUBlockMatrix(
i,Local_j+2);
343 unsigned int Global_i, Global_j, Local_j;
345 for(
unsigned int i = 0;
i < 4;
i++)
347 Global_i =
i * (3 + 1) + 3;
349 for(
unsigned int j = 0;
j < 4;
j++)
351 Global_j =
j * (3 + 1);
354 rLeftHandSideMatrix(Global_i,Global_j) += PUBlockMatrix(
i,Local_j);
355 rLeftHandSideMatrix(Global_i,Global_j+1) += PUBlockMatrix(
i,Local_j+1);
356 rLeftHandSideMatrix(Global_i,Global_j+2) += PUBlockMatrix(
i,Local_j+2);
Geometry base class.
Definition: geometry.h:71
Definition: amatrix_interface.h:41
Definition: poro_condition_utilities.hpp:24
static void AssemblePUMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 4, 12 > &PUBlockMatrix)
Definition: poro_condition_utilities.hpp:340
static void GetNodalVariableVector(array_1d< double, 9 > &rNodalVariableVector, const Element::GeometryType &Geom, const Variable< array_1d< double, 3 >> &Variable)
Definition: poro_condition_utilities.hpp:125
static void AssemblePUMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 3, 9 > &PUBlockMatrix)
Definition: poro_condition_utilities.hpp:317
static void AssembleUPMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 9, 3 > &UPBlockMatrix)
Definition: poro_condition_utilities.hpp:249
static void AssemblePUMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 2, 4 > &PUBlockMatrix)
Definition: poro_condition_utilities.hpp:295
static void AssemblePBlockVector(Vector &rRightHandSideVector, const TVectorType &PBlockVector, const unsigned int &Dim, const unsigned int &NumNodes)
Definition: poro_condition_utilities.hpp:213
static void AssembleUPMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 12, 4 > &UPBlockMatrix)
Definition: poro_condition_utilities.hpp:272
static void CalculateNuMatrix(BoundedMatrix< double, 3, 9 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_condition_utilities.hpp:39
static void InterpolateVariableWithComponents(array_1d< double, 3 > &rVector, const Matrix &Ncontainer, const array_1d< double, 9 > &VariableWithComponents, const unsigned int &GPoint)
Definition: poro_condition_utilities.hpp:75
static void AssembleUBlockVector(Vector &rRightHandSideVector, const array_1d< double, 9 > &UBlockVector)
Definition: poro_condition_utilities.hpp:176
static void InterpolateVariableWithComponents(array_1d< double, 2 > &rVector, const Matrix &Ncontainer, const array_1d< double, 4 > &VariableWithComponents, const unsigned int &GPoint)
Definition: poro_condition_utilities.hpp:59
static void AssembleUPMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 4, 2 > &UPBlockMatrix)
Definition: poro_condition_utilities.hpp:227
static void InterpolateVariableWithComponents(array_1d< double, 3 > &rVector, const Matrix &Ncontainer, const array_1d< double, 12 > &VariableWithComponents, const unsigned int &GPoint)
Definition: poro_condition_utilities.hpp:92
static void CalculateNuMatrix(BoundedMatrix< double, 2, 4 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_condition_utilities.hpp:30
static void GetNodalVariableVector(array_1d< double, 12 > &rNodalVariableVector, const Element::GeometryType &Geom, const Variable< array_1d< double, 3 >> &Variable)
Definition: poro_condition_utilities.hpp:142
static void AssembleUBlockVector(Vector &rRightHandSideVector, const array_1d< double, 12 > &UBlockVector)
Definition: poro_condition_utilities.hpp:194
static void CalculateNuMatrix(BoundedMatrix< double, 3, 12 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_condition_utilities.hpp:49
static void GetNodalVariableVector(array_1d< double, 4 > &rNodalVariableVector, const Element::GeometryType &Geom, const Variable< array_1d< double, 3 >> &Variable)
Definition: poro_condition_utilities.hpp:109
static void AssembleUBlockVector(Vector &rRightHandSideVector, const array_1d< double, 4 > &UBlockVector)
Definition: poro_condition_utilities.hpp:159
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17