14 #if !defined(KRATOS_PORO_ELEMENT_UTILITIES )
15 #define KRATOS_PORO_ELEMENT_UTILITIES
33 typedef std::size_t IndexType;
42 rNu(0,0) = Ncontainer(GPoint,0); rNu(0,2) = Ncontainer(GPoint,1); rNu(0,4) = Ncontainer(GPoint,2);
43 rNu(1,1) = Ncontainer(GPoint,0); rNu(1,3) = Ncontainer(GPoint,1); rNu(1,5) = Ncontainer(GPoint,2);
51 rNu(0,0) = Ncontainer(GPoint,0); rNu(0,2) = Ncontainer(GPoint,1); rNu(0,4) = Ncontainer(GPoint,2); rNu(0,6) = Ncontainer(GPoint,3);
52 rNu(1,1) = Ncontainer(GPoint,0); rNu(1,3) = Ncontainer(GPoint,1); rNu(1,5) = Ncontainer(GPoint,2); rNu(1,7) = Ncontainer(GPoint,3);
60 rNu(0,0) = Ncontainer(GPoint,0); rNu(0,3) = Ncontainer(GPoint,1); rNu(0,6) = Ncontainer(GPoint,2); rNu(0,9) = Ncontainer(GPoint,3);
61 rNu(1,1) = Ncontainer(GPoint,0); rNu(1,4) = Ncontainer(GPoint,1); rNu(1,7) = Ncontainer(GPoint,2); rNu(1,10) = Ncontainer(GPoint,3);
62 rNu(2,2) = Ncontainer(GPoint,0); rNu(2,5) = Ncontainer(GPoint,1); rNu(2,8) = Ncontainer(GPoint,2); rNu(2,11) = Ncontainer(GPoint,3);
70 rNu(0,0) = Ncontainer(GPoint,0); rNu(0,3) = Ncontainer(GPoint,1); rNu(0,6) = Ncontainer(GPoint,2);
71 rNu(1,1) = Ncontainer(GPoint,0); rNu(1,4) = Ncontainer(GPoint,1); rNu(1,7) = Ncontainer(GPoint,2);
72 rNu(2,2) = Ncontainer(GPoint,0); rNu(2,5) = Ncontainer(GPoint,1); rNu(2,8) = Ncontainer(GPoint,2);
74 rNu(0,9) = Ncontainer(GPoint,3); rNu(0,12) = Ncontainer(GPoint,4); rNu(0,15) = Ncontainer(GPoint,5);
75 rNu(1,10) = Ncontainer(GPoint,3); rNu(1,13) = Ncontainer(GPoint,4); rNu(1,16) = Ncontainer(GPoint,5);
76 rNu(2,11) = Ncontainer(GPoint,3); rNu(2,14) = Ncontainer(GPoint,4); rNu(2,17) = Ncontainer(GPoint,5);
84 rNu(0,0) = Ncontainer(GPoint,0); rNu(0,3) = Ncontainer(GPoint,1); rNu(0,6) = Ncontainer(GPoint,2); rNu(0,9) = Ncontainer(GPoint,3);
85 rNu(1,1) = Ncontainer(GPoint,0); rNu(1,4) = Ncontainer(GPoint,1); rNu(1,7) = Ncontainer(GPoint,2); rNu(1,10) = Ncontainer(GPoint,3);
86 rNu(2,2) = Ncontainer(GPoint,0); rNu(2,5) = Ncontainer(GPoint,1); rNu(2,8) = Ncontainer(GPoint,2); rNu(2,11) = Ncontainer(GPoint,3);
88 rNu(0,12) = Ncontainer(GPoint,4); rNu(0,15) = Ncontainer(GPoint,5); rNu(0,18) = Ncontainer(GPoint,6); rNu(0,21) = Ncontainer(GPoint,7);
89 rNu(1,13) = Ncontainer(GPoint,4); rNu(1,16) = Ncontainer(GPoint,5); rNu(1,19) = Ncontainer(GPoint,6); rNu(1,22) = Ncontainer(GPoint,7);
90 rNu(2,14) = Ncontainer(GPoint,4); rNu(2,17) = Ncontainer(GPoint,5); rNu(2,20) = Ncontainer(GPoint,6); rNu(2,23) = Ncontainer(GPoint,7);
98 rNut(0,0) = Ncontainer(GPoint,0); rNut(0,3) = Ncontainer(GPoint,1); rNut(0,6) = Ncontainer(GPoint,2);
99 rNut(1,1) = Ncontainer(GPoint,0); rNut(1,4) = Ncontainer(GPoint,1); rNut(1,7) = Ncontainer(GPoint,2);
107 rNut(0,0) = Ncontainer(GPoint,0); rNut(0,3) = Ncontainer(GPoint,1); rNut(0,6) = Ncontainer(GPoint,2); rNut(0,9) = Ncontainer(GPoint,3);
108 rNut(1,1) = Ncontainer(GPoint,0); rNut(1,4) = Ncontainer(GPoint,1); rNut(1,7) = Ncontainer(GPoint,2); rNut(1,10) = Ncontainer(GPoint,3);
116 rNut(0,0) = Ncontainer(GPoint,0); rNut(0,4) = Ncontainer(GPoint,1); rNut(0,8) = Ncontainer(GPoint,2); rNut(0,12) = Ncontainer(GPoint,3);
117 rNut(1,1) = Ncontainer(GPoint,0); rNut(1,5) = Ncontainer(GPoint,1); rNut(1,9) = Ncontainer(GPoint,2); rNut(1,13) = Ncontainer(GPoint,3);
118 rNut(2,2) = Ncontainer(GPoint,0); rNut(2,6) = Ncontainer(GPoint,1); rNut(2,10) = Ncontainer(GPoint,2); rNut(2,14) = Ncontainer(GPoint,3);
126 rNut(0,0) = Ncontainer(GPoint,0); rNut(0,4) = Ncontainer(GPoint,1); rNut(0,8) = Ncontainer(GPoint,2);
127 rNut(1,1) = Ncontainer(GPoint,0); rNut(1,5) = Ncontainer(GPoint,1); rNut(1,9) = Ncontainer(GPoint,2);
128 rNut(2,2) = Ncontainer(GPoint,0); rNut(2,6) = Ncontainer(GPoint,1); rNut(2,10) = Ncontainer(GPoint,2);
130 rNut(0,12) = Ncontainer(GPoint,3); rNut(0,16) = Ncontainer(GPoint,4); rNut(0,20) = Ncontainer(GPoint,5);
131 rNut(1,13) = Ncontainer(GPoint,3); rNut(1,17) = Ncontainer(GPoint,4); rNut(1,21) = Ncontainer(GPoint,5);
132 rNut(2,14) = Ncontainer(GPoint,3); rNut(2,18) = Ncontainer(GPoint,4); rNut(2,22) = Ncontainer(GPoint,5);
140 rNut(0,0) = Ncontainer(GPoint,0); rNut(0,4) = Ncontainer(GPoint,1); rNut(0,8) = Ncontainer(GPoint,2); rNut(0,12) = Ncontainer(GPoint,3);
141 rNut(1,1) = Ncontainer(GPoint,0); rNut(1,5) = Ncontainer(GPoint,1); rNut(1,9) = Ncontainer(GPoint,2); rNut(1,13) = Ncontainer(GPoint,3);
142 rNut(2,2) = Ncontainer(GPoint,0); rNut(2,6) = Ncontainer(GPoint,1); rNut(2,10) = Ncontainer(GPoint,2); rNut(2,14) = Ncontainer(GPoint,3);
144 rNut(0,16) = Ncontainer(GPoint,4); rNut(0,20) = Ncontainer(GPoint,5); rNut(0,24) = Ncontainer(GPoint,6); rNut(0,28) = Ncontainer(GPoint,7);
145 rNut(1,17) = Ncontainer(GPoint,4); rNut(1,21) = Ncontainer(GPoint,5); rNut(1,25) = Ncontainer(GPoint,6); rNut(1,29) = Ncontainer(GPoint,7);
146 rNut(2,18) = Ncontainer(GPoint,4); rNut(2,22) = Ncontainer(GPoint,5); rNut(2,26) = Ncontainer(GPoint,6); rNut(2,30) = Ncontainer(GPoint,7);
157 unsigned int index = 0;
158 for(
unsigned int i=0;
i<3;
i++)
160 rVector[0] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
161 rVector[1] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
173 unsigned int index = 0;
174 for(
unsigned int i=0;
i<4;
i++)
176 rVector[0] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
177 rVector[1] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
189 unsigned int index = 0;
190 for(
unsigned int i=0;
i<4;
i++)
192 rVector[0] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
193 rVector[1] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
194 rVector[2] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
206 unsigned int index = 0;
207 for(
unsigned int i=0;
i<6;
i++)
209 rVector[0] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
210 rVector[1] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
211 rVector[2] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
223 unsigned int index = 0;
224 for(
unsigned int i=0;
i<8;
i++)
226 rVector[0] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
227 rVector[1] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
228 rVector[2] += Ncontainer(GPoint,
i)*VariableWithComponents[index++];
236 rOutputValue[0] = ComputedValue[0];
237 rOutputValue[1] = ComputedValue[1];
238 rOutputValue[2] = 0.0;
245 rOutputValue[0] = ComputedValue[0];
246 rOutputValue[1] = ComputedValue[1];
247 rOutputValue[2] = ComputedValue[2];
257 unsigned int index = 0;
258 for(
unsigned int i=0;
i<3;
i++)
260 noalias(NodalVariableAux) = Geom[
i].FastGetSolutionStepValue(
Variable,SolutionStepIndex);
261 rNodalVariableVector[index++] = NodalVariableAux[0];
262 rNodalVariableVector[index++] = NodalVariableAux[1];
273 unsigned int index = 0;
274 for(
unsigned int i=0;
i<4;
i++)
276 noalias(NodalVariableAux) = Geom[
i].FastGetSolutionStepValue(
Variable,SolutionStepIndex);
277 rNodalVariableVector[index++] = NodalVariableAux[0];
278 rNodalVariableVector[index++] = NodalVariableAux[1];
289 unsigned int index = 0;
290 for(
unsigned int i=0;
i<4;
i++)
292 noalias(NodalVariableAux) = Geom[
i].FastGetSolutionStepValue(
Variable,SolutionStepIndex);
293 rNodalVariableVector[index++] = NodalVariableAux[0];
294 rNodalVariableVector[index++] = NodalVariableAux[1];
295 rNodalVariableVector[index++] = NodalVariableAux[2];
306 unsigned int index = 0;
307 for(
unsigned int i=0;
i<6;
i++)
309 noalias(NodalVariableAux) = Geom[
i].FastGetSolutionStepValue(
Variable,SolutionStepIndex);
310 rNodalVariableVector[index++] = NodalVariableAux[0];
311 rNodalVariableVector[index++] = NodalVariableAux[1];
312 rNodalVariableVector[index++] = NodalVariableAux[2];
323 unsigned int index = 0;
324 for(
unsigned int i=0;
i<8;
i++)
326 noalias(NodalVariableAux) = Geom[
i].FastGetSolutionStepValue(
Variable,SolutionStepIndex);
327 rNodalVariableVector[index++] = NodalVariableAux[0];
328 rNodalVariableVector[index++] = NodalVariableAux[1];
329 rNodalVariableVector[index++] = NodalVariableAux[2];
339 rPermeabilityMatrix(0,0) = Prop[PERMEABILITY_XX];
340 rPermeabilityMatrix(1,1) = Prop[PERMEABILITY_YY];
342 rPermeabilityMatrix(0,1) = Prop[PERMEABILITY_XY];
343 rPermeabilityMatrix(1,0) = rPermeabilityMatrix(0,1);
352 rPermeabilityMatrix(0,0) = Prop[PERMEABILITY_XX];
353 rPermeabilityMatrix(1,1) = Prop[PERMEABILITY_YY];
354 rPermeabilityMatrix(2,2) = Prop[PERMEABILITY_ZZ];
356 rPermeabilityMatrix(0,1) = Prop[PERMEABILITY_XY];
357 rPermeabilityMatrix(1,0) = rPermeabilityMatrix(0,1);
359 rPermeabilityMatrix(1,2) = Prop[PERMEABILITY_YZ];
360 rPermeabilityMatrix(2,1) = rPermeabilityMatrix(1,2);
362 rPermeabilityMatrix(2,0) = Prop[PERMEABILITY_ZX];
363 rPermeabilityMatrix(0,2) = rPermeabilityMatrix(2,0);
370 const unsigned int& Dim)
372 if ( rPermeabilityMatrix.size1() != Dim )
373 rPermeabilityMatrix.
resize( Dim, Dim,
false );
375 rPermeabilityMatrix(0,0) = Prop[PERMEABILITY_XX];
376 rPermeabilityMatrix(1,1) = Prop[PERMEABILITY_YY];
377 rPermeabilityMatrix(0,1) = Prop[PERMEABILITY_XY];
378 rPermeabilityMatrix(1,0) = rPermeabilityMatrix(0,1);
381 rPermeabilityMatrix(2,2) = Prop[PERMEABILITY_ZZ];
382 rPermeabilityMatrix(2,0) = Prop[PERMEABILITY_ZX];
383 rPermeabilityMatrix(1,2) = Prop[PERMEABILITY_YZ];
384 rPermeabilityMatrix(0,2) = rPermeabilityMatrix(2,0);
385 rPermeabilityMatrix(2,1) = rPermeabilityMatrix(1,2);
395 double InputMatrixDet = InputMatrix(0,0)*InputMatrix(1,1)-InputMatrix(0,1)*InputMatrix(1,0);
397 rInvertedMatrix(0,0) = InputMatrix(1,1)/InputMatrixDet;
398 rInvertedMatrix(0,1) = -InputMatrix(0,1)/InputMatrixDet;
399 rInvertedMatrix(1,0) = -InputMatrix(1,0)/InputMatrixDet;
400 rInvertedMatrix(1,1) = InputMatrix(0,0)/InputMatrixDet;
436 unsigned int Global_i, Global_j, Local_i, Local_j;
438 for(
unsigned int i = 0;
i < 3;
i++)
440 Global_i =
i * (2 + 1);
443 for(
unsigned int j = 0;
j < 3;
j++)
445 Global_j =
j * (2 + 1);
448 rLeftHandSideMatrix(Global_i,Global_j) += UBlockMatrix(Local_i,Local_j);
449 rLeftHandSideMatrix(Global_i,Global_j+1) += UBlockMatrix(Local_i,Local_j+1);
450 rLeftHandSideMatrix(Global_i+1,Global_j) += UBlockMatrix(Local_i+1,Local_j);
451 rLeftHandSideMatrix(Global_i+1,Global_j+1) += UBlockMatrix(Local_i+1,Local_j+1);
461 unsigned int Global_i, Global_j, Local_i, Local_j;
463 for(
unsigned int i = 0;
i < 4;
i++)
465 Global_i =
i * (2 + 1);
468 for(
unsigned int j = 0;
j < 4;
j++)
470 Global_j =
j * (2 + 1);
473 rLeftHandSideMatrix(Global_i,Global_j) += UBlockMatrix(Local_i,Local_j);
474 rLeftHandSideMatrix(Global_i,Global_j+1) += UBlockMatrix(Local_i,Local_j+1);
475 rLeftHandSideMatrix(Global_i+1,Global_j) += UBlockMatrix(Local_i+1,Local_j);
476 rLeftHandSideMatrix(Global_i+1,Global_j+1) += UBlockMatrix(Local_i+1,Local_j+1);
486 unsigned int Global_i, Global_j, Local_i, Local_j;
488 for(
unsigned int i = 0;
i < 4;
i++)
490 Global_i =
i * (3 + 1);
493 for(
unsigned int j = 0;
j < 4;
j++)
495 Global_j =
j * (3 + 1);
498 rLeftHandSideMatrix(Global_i,Global_j) += UBlockMatrix(Local_i,Local_j);
499 rLeftHandSideMatrix(Global_i,Global_j+1) += UBlockMatrix(Local_i,Local_j+1);
500 rLeftHandSideMatrix(Global_i+1,Global_j) += UBlockMatrix(Local_i+1,Local_j);
501 rLeftHandSideMatrix(Global_i+1,Global_j+1) += UBlockMatrix(Local_i+1,Local_j+1);
503 rLeftHandSideMatrix(Global_i,Global_j+2) += UBlockMatrix(Local_i,Local_j+2);
504 rLeftHandSideMatrix(Global_i+1,Global_j+2) += UBlockMatrix(Local_i+1,Local_j+2);
505 rLeftHandSideMatrix(Global_i+2,Global_j+1) += UBlockMatrix(Local_i+2,Local_j+1);
506 rLeftHandSideMatrix(Global_i+2,Global_j) += UBlockMatrix(Local_i+2,Local_j);
507 rLeftHandSideMatrix(Global_i+2,Global_j+2) += UBlockMatrix(Local_i+2,Local_j+2);
517 unsigned int Global_i, Global_j, Local_i, Local_j;
519 for(
unsigned int i = 0;
i < 6;
i++)
521 Global_i =
i * (3 + 1);
524 for(
unsigned int j = 0;
j < 6;
j++)
526 Global_j =
j * (3 + 1);
529 rLeftHandSideMatrix(Global_i,Global_j) += UBlockMatrix(Local_i,Local_j);
530 rLeftHandSideMatrix(Global_i,Global_j+1) += UBlockMatrix(Local_i,Local_j+1);
531 rLeftHandSideMatrix(Global_i+1,Global_j) += UBlockMatrix(Local_i+1,Local_j);
532 rLeftHandSideMatrix(Global_i+1,Global_j+1) += UBlockMatrix(Local_i+1,Local_j+1);
534 rLeftHandSideMatrix(Global_i,Global_j+2) += UBlockMatrix(Local_i,Local_j+2);
535 rLeftHandSideMatrix(Global_i+1,Global_j+2) += UBlockMatrix(Local_i+1,Local_j+2);
536 rLeftHandSideMatrix(Global_i+2,Global_j+1) += UBlockMatrix(Local_i+2,Local_j+1);
537 rLeftHandSideMatrix(Global_i+2,Global_j) += UBlockMatrix(Local_i+2,Local_j);
538 rLeftHandSideMatrix(Global_i+2,Global_j+2) += UBlockMatrix(Local_i+2,Local_j+2);
548 unsigned int Global_i, Global_j, Local_i, Local_j;
550 for(
unsigned int i = 0;
i < 8;
i++)
552 Global_i =
i * (3 + 1);
555 for(
unsigned int j = 0;
j < 8;
j++)
557 Global_j =
j * (3 + 1);
560 rLeftHandSideMatrix(Global_i,Global_j) += UBlockMatrix(Local_i,Local_j);
561 rLeftHandSideMatrix(Global_i,Global_j+1) += UBlockMatrix(Local_i,Local_j+1);
562 rLeftHandSideMatrix(Global_i+1,Global_j) += UBlockMatrix(Local_i+1,Local_j);
563 rLeftHandSideMatrix(Global_i+1,Global_j+1) += UBlockMatrix(Local_i+1,Local_j+1);
565 rLeftHandSideMatrix(Global_i,Global_j+2) += UBlockMatrix(Local_i,Local_j+2);
566 rLeftHandSideMatrix(Global_i+1,Global_j+2) += UBlockMatrix(Local_i+1,Local_j+2);
567 rLeftHandSideMatrix(Global_i+2,Global_j+1) += UBlockMatrix(Local_i+2,Local_j+1);
568 rLeftHandSideMatrix(Global_i+2,Global_j) += UBlockMatrix(Local_i+2,Local_j);
569 rLeftHandSideMatrix(Global_i+2,Global_j+2) += UBlockMatrix(Local_i+2,Local_j+2);
579 unsigned int Global_i, Global_j, Local_i;
581 for(
unsigned int i = 0;
i < 3;
i++)
583 Global_i =
i * (2 + 1);
586 for(
unsigned int j = 0;
j < 3;
j++)
588 Global_j =
j * (2 + 1) + 2;
590 rLeftHandSideMatrix(Global_i,Global_j) += UPBlockMatrix(Local_i,
j);
591 rLeftHandSideMatrix(Global_i+1,Global_j) += UPBlockMatrix(Local_i+1,
j);
601 unsigned int Global_i, Global_j, Local_i;
603 for(
unsigned int i = 0;
i < 4;
i++)
605 Global_i =
i * (2 + 1);
608 for(
unsigned int j = 0;
j < 4;
j++)
610 Global_j =
j * (2 + 1) + 2;
612 rLeftHandSideMatrix(Global_i,Global_j) += UPBlockMatrix(Local_i,
j);
613 rLeftHandSideMatrix(Global_i+1,Global_j) += UPBlockMatrix(Local_i+1,
j);
623 unsigned int Global_i, Global_j, Local_i;
625 for(
unsigned int i = 0;
i < 4;
i++)
627 Global_i =
i * (3 + 1);
630 for(
unsigned int j = 0;
j < 4;
j++)
632 Global_j =
j * (3 + 1) + 3;
634 rLeftHandSideMatrix(Global_i,Global_j) += UPBlockMatrix(Local_i,
j);
635 rLeftHandSideMatrix(Global_i+1,Global_j) += UPBlockMatrix(Local_i+1,
j);
636 rLeftHandSideMatrix(Global_i+2,Global_j) += UPBlockMatrix(Local_i+2,
j);
646 unsigned int Global_i, Global_j, Local_i;
648 for(
unsigned int i = 0;
i < 6;
i++)
650 Global_i =
i * (3 + 1);
653 for(
unsigned int j = 0;
j < 6;
j++)
655 Global_j =
j * (3 + 1) + 3;
657 rLeftHandSideMatrix(Global_i,Global_j) += UPBlockMatrix(Local_i,
j);
658 rLeftHandSideMatrix(Global_i+1,Global_j) += UPBlockMatrix(Local_i+1,
j);
659 rLeftHandSideMatrix(Global_i+2,Global_j) += UPBlockMatrix(Local_i+2,
j);
669 unsigned int Global_i, Global_j, Local_i;
671 for(
unsigned int i = 0;
i < 8;
i++)
673 Global_i =
i * (3 + 1);
676 for(
unsigned int j = 0;
j < 8;
j++)
678 Global_j =
j * (3 + 1) + 3;
680 rLeftHandSideMatrix(Global_i,Global_j) += UPBlockMatrix(Local_i,
j);
681 rLeftHandSideMatrix(Global_i+1,Global_j) += UPBlockMatrix(Local_i+1,
j);
682 rLeftHandSideMatrix(Global_i+2,Global_j) += UPBlockMatrix(Local_i+2,
j);
692 unsigned int Global_i, Global_j, Local_j;
694 for(
unsigned int i = 0;
i < 3;
i++)
696 Global_i =
i * (2 + 1) + 2;
698 for(
unsigned int j = 0;
j < 3;
j++)
700 Global_j =
j * (2 + 1);
703 rLeftHandSideMatrix(Global_i,Global_j) += PUBlockMatrix(
i,Local_j);
704 rLeftHandSideMatrix(Global_i,Global_j+1) += PUBlockMatrix(
i,Local_j+1);
714 unsigned int Global_i, Global_j, Local_j;
716 for(
unsigned int i = 0;
i < 4;
i++)
718 Global_i =
i * (2 + 1) + 2;
720 for(
unsigned int j = 0;
j < 4;
j++)
722 Global_j =
j * (2 + 1);
725 rLeftHandSideMatrix(Global_i,Global_j) += PUBlockMatrix(
i,Local_j);
726 rLeftHandSideMatrix(Global_i,Global_j+1) += PUBlockMatrix(
i,Local_j+1);
736 unsigned int Global_i, Global_j, Local_j;
738 for(
unsigned int i = 0;
i < 4;
i++)
740 Global_i =
i * (3 + 1) + 3;
742 for(
unsigned int j = 0;
j < 4;
j++)
744 Global_j =
j * (3 + 1);
747 rLeftHandSideMatrix(Global_i,Global_j) += PUBlockMatrix(
i,Local_j);
748 rLeftHandSideMatrix(Global_i,Global_j+1) += PUBlockMatrix(
i,Local_j+1);
749 rLeftHandSideMatrix(Global_i,Global_j+2) += PUBlockMatrix(
i,Local_j+2);
759 unsigned int Global_i, Global_j, Local_j;
761 for(
unsigned int i = 0;
i < 6;
i++)
763 Global_i =
i * (3 + 1) + 3;
765 for(
unsigned int j = 0;
j < 6;
j++)
767 Global_j =
j * (3 + 1);
770 rLeftHandSideMatrix(Global_i,Global_j) += PUBlockMatrix(
i,Local_j);
771 rLeftHandSideMatrix(Global_i,Global_j+1) += PUBlockMatrix(
i,Local_j+1);
772 rLeftHandSideMatrix(Global_i,Global_j+2) += PUBlockMatrix(
i,Local_j+2);
782 unsigned int Global_i, Global_j, Local_j;
784 for(
unsigned int i = 0;
i < 8;
i++)
786 Global_i =
i * (3 + 1) + 3;
788 for(
unsigned int j = 0;
j < 8;
j++)
790 Global_j =
j * (3 + 1);
793 rLeftHandSideMatrix(Global_i,Global_j) += PUBlockMatrix(
i,Local_j);
794 rLeftHandSideMatrix(Global_i,Global_j+1) += PUBlockMatrix(
i,Local_j+1);
795 rLeftHandSideMatrix(Global_i,Global_j+2) += PUBlockMatrix(
i,Local_j+2);
802 template<
class TMatrixType >
803 static inline void AssemblePBlockMatrix(
Matrix& rLeftHandSideMatrix,
const TMatrixType& PBlockMatrix,
const unsigned int& Dim,
const unsigned int& NumNodes)
805 unsigned int Global_i, Global_j;
807 for(
unsigned int i = 0;
i < NumNodes;
i++)
809 Global_i =
i * (Dim + 1) + Dim;
811 for(
unsigned int j = 0;
j < NumNodes;
j++)
813 Global_j =
j * (Dim + 1) + Dim;
815 rLeftHandSideMatrix(Global_i,Global_j) += PBlockMatrix(
i,
j);
825 unsigned int Global_i, Local_i;
827 for(
unsigned int i = 0;
i < 3;
i++)
829 Global_i =
i * (2 + 1);
832 rRightHandSideVector[Global_i] += UBlockVector[Local_i];
833 rRightHandSideVector[Global_i+1] += UBlockVector[Local_i+1];
842 unsigned int Global_i, Local_i;
844 for(
unsigned int i = 0;
i < 4;
i++)
846 Global_i =
i * (2 + 1);
849 rRightHandSideVector[Global_i] += UBlockVector[Local_i];
850 rRightHandSideVector[Global_i+1] += UBlockVector[Local_i+1];
859 unsigned int Global_i, Local_i;
861 for(
unsigned int i = 0;
i < 4;
i++)
863 Global_i =
i * (3 + 1);
866 rRightHandSideVector[Global_i] += UBlockVector[Local_i];
867 rRightHandSideVector[Global_i+1] += UBlockVector[Local_i+1];
868 rRightHandSideVector[Global_i+2] += UBlockVector[Local_i+2];
877 unsigned int Global_i, Local_i;
879 for(
unsigned int i = 0;
i < 6;
i++)
881 Global_i =
i * (3 + 1);
884 rRightHandSideVector[Global_i] += UBlockVector[Local_i];
885 rRightHandSideVector[Global_i+1] += UBlockVector[Local_i+1];
886 rRightHandSideVector[Global_i+2] += UBlockVector[Local_i+2];
895 unsigned int Global_i, Local_i;
897 for(
unsigned int i = 0;
i < 8;
i++)
899 Global_i =
i * (3 + 1);
902 rRightHandSideVector[Global_i] += UBlockVector[Local_i];
903 rRightHandSideVector[Global_i+1] += UBlockVector[Local_i+1];
904 rRightHandSideVector[Global_i+2] += UBlockVector[Local_i+2];
910 template<
class TVectorType >
911 static inline void AssemblePBlockVector(
Vector& rRightHandSideVector,
const TVectorType& PBlockVector,
const unsigned int& Dim,
const unsigned int& NumNodes)
913 unsigned int Global_i;
915 for(
unsigned int i = 0;
i < NumNodes;
i++)
917 Global_i =
i * (Dim + 1) + Dim;
919 rRightHandSideVector[Global_i] += PBlockVector[
i];
935 rExtrapolationMatrix(0,0) = 1.6666666666666666666; rExtrapolationMatrix(0,1) = -0.33333333333333333333; rExtrapolationMatrix(0,2) = -0.33333333333333333333;
936 rExtrapolationMatrix(1,0) = -0.33333333333333333333; rExtrapolationMatrix(1,1) = 1.6666666666666666666; rExtrapolationMatrix(1,2) = -0.33333333333333333333;
937 rExtrapolationMatrix(2,0) = -0.33333333333333333333; rExtrapolationMatrix(2,1) = -0.33333333333333333333; rExtrapolationMatrix(2,2) = 1.6666666666666666666;
947 rExtrapolationMatrix(0,0) = 1.8660254037844386; rExtrapolationMatrix(0,1) = -0.5; rExtrapolationMatrix(0,2) = 0.13397459621556132; rExtrapolationMatrix(0,3) = -0.5;
948 rExtrapolationMatrix(1,0) = -0.5; rExtrapolationMatrix(1,1) = 1.8660254037844386; rExtrapolationMatrix(1,2) = -0.5; rExtrapolationMatrix(1,3) = 0.13397459621556132;
949 rExtrapolationMatrix(2,0) = 0.13397459621556132; rExtrapolationMatrix(2,1) = -0.5; rExtrapolationMatrix(2,2) = 1.8660254037844386; rExtrapolationMatrix(2,3) = -0.5;
950 rExtrapolationMatrix(3,0) = -0.5; rExtrapolationMatrix(3,1) = 0.13397459621556132; rExtrapolationMatrix(3,2) = -0.5; rExtrapolationMatrix(3,3) = 1.8660254037844386;
960 rExtrapolationMatrix(0,0) = -0.309016988749894905; rExtrapolationMatrix(0,1) = -0.3090169887498949046; rExtrapolationMatrix(0,2) = -0.309016988749894905; rExtrapolationMatrix(0,3) = 1.9270509662496847144;
961 rExtrapolationMatrix(1,0) = 1.9270509662496847144; rExtrapolationMatrix(1,1) = -0.30901698874989490481; rExtrapolationMatrix(1,2) = -0.3090169887498949049; rExtrapolationMatrix(1,3) = -0.30901698874989490481;
962 rExtrapolationMatrix(2,0) = -0.30901698874989490473; rExtrapolationMatrix(2,1) = 1.9270509662496847143; rExtrapolationMatrix(2,2) = -0.3090169887498949049; rExtrapolationMatrix(2,3) = -0.30901698874989490481;
963 rExtrapolationMatrix(3,0) = -0.3090169887498949048; rExtrapolationMatrix(3,1) = -0.30901698874989490471; rExtrapolationMatrix(3,2) = 1.9270509662496847143; rExtrapolationMatrix(3,3) = -0.30901698874989490481;
973 rExtrapolationMatrix(0,0) = 2.549038105676658; rExtrapolationMatrix(0,1) = -0.6830127018922192; rExtrapolationMatrix(0,2) = 0.18301270189221927; rExtrapolationMatrix(0,3) = -0.6830127018922192;
974 rExtrapolationMatrix(0,4) = -0.6830127018922192; rExtrapolationMatrix(0,5) = 0.18301270189221927; rExtrapolationMatrix(0,6) = -0.04903810567665795; rExtrapolationMatrix(0,7) = 0.18301270189221927;
976 rExtrapolationMatrix(1,0) = -0.6830127018922192; rExtrapolationMatrix(1,1) = 2.549038105676658; rExtrapolationMatrix(1,2) = -0.6830127018922192; rExtrapolationMatrix(1,3) = 0.18301270189221927;
977 rExtrapolationMatrix(1,4) = 0.18301270189221927; rExtrapolationMatrix(1,5) = -0.6830127018922192; rExtrapolationMatrix(1,6) = 0.18301270189221927; rExtrapolationMatrix(1,7) = -0.04903810567665795;
979 rExtrapolationMatrix(2,0) = 0.18301270189221927; rExtrapolationMatrix(2,1) = -0.6830127018922192; rExtrapolationMatrix(2,2) = 2.549038105676658; rExtrapolationMatrix(2,3) = -0.6830127018922192;
980 rExtrapolationMatrix(2,4) = -0.04903810567665795; rExtrapolationMatrix(2,5) = 0.18301270189221927; rExtrapolationMatrix(2,6) = -0.6830127018922192; rExtrapolationMatrix(2,7) = 0.18301270189221927;
982 rExtrapolationMatrix(3,0) = -0.6830127018922192; rExtrapolationMatrix(3,1) = 0.18301270189221927; rExtrapolationMatrix(3,2) = -0.6830127018922192; rExtrapolationMatrix(3,3) = 2.549038105676658;
983 rExtrapolationMatrix(3,4) = 0.18301270189221927; rExtrapolationMatrix(3,5) = -0.04903810567665795; rExtrapolationMatrix(3,6) = 0.18301270189221927; rExtrapolationMatrix(3,7) = -0.6830127018922192;
985 rExtrapolationMatrix(4,0) = -0.6830127018922192; rExtrapolationMatrix(4,1) = 0.18301270189221927; rExtrapolationMatrix(4,2) = -0.04903810567665795; rExtrapolationMatrix(4,3) = 0.18301270189221927;
986 rExtrapolationMatrix(4,4) = 2.549038105676658; rExtrapolationMatrix(4,5) = -0.6830127018922192; rExtrapolationMatrix(4,6) = 0.18301270189221927; rExtrapolationMatrix(4,7) = -0.6830127018922192;
988 rExtrapolationMatrix(5,0) = 0.18301270189221927; rExtrapolationMatrix(5,1) = -0.6830127018922192; rExtrapolationMatrix(5,2) = 0.18301270189221927; rExtrapolationMatrix(5,3) = -0.04903810567665795;
989 rExtrapolationMatrix(5,4) = -0.6830127018922192; rExtrapolationMatrix(5,5) = 2.549038105676658; rExtrapolationMatrix(5,6) = -0.6830127018922192; rExtrapolationMatrix(5,7) = 0.18301270189221927;
991 rExtrapolationMatrix(6,0) = -0.04903810567665795; rExtrapolationMatrix(6,1) = 0.18301270189221927; rExtrapolationMatrix(6,2) = -0.6830127018922192; rExtrapolationMatrix(6,3) = 0.18301270189221927;
992 rExtrapolationMatrix(6,4) = 0.18301270189221927; rExtrapolationMatrix(6,5) = -0.6830127018922192; rExtrapolationMatrix(6,6) = 2.549038105676658; rExtrapolationMatrix(6,7) = -0.6830127018922192;
994 rExtrapolationMatrix(7,0) = 0.18301270189221927; rExtrapolationMatrix(7,1) = -0.04903810567665795; rExtrapolationMatrix(7,2) = 0.18301270189221927; rExtrapolationMatrix(7,3) = -0.6830127018922192;
995 rExtrapolationMatrix(7,4) = -0.6830127018922192; rExtrapolationMatrix(7,5) = 0.18301270189221927; rExtrapolationMatrix(7,6) = -0.6830127018922192; rExtrapolationMatrix(7,7) = 2.549038105676658;
Geometry base class.
Definition: geometry.h:71
Definition: amatrix_interface.h:41
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
Definition: poro_element_utilities.hpp:31
static void AssemblePUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 6, 18 > &PUBlockMatrix)
Definition: poro_element_utilities.hpp:756
static void Calculate3DExtrapolationMatrix(BoundedMatrix< double, 4, 4 > &rExtrapolationMatrix)
Definition: poro_element_utilities.hpp:955
static void InterpolateVariableWithComponents(array_1d< double, 3 > &rVector, const Matrix &Ncontainer, const array_1d< double, 18 > &VariableWithComponents, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:200
static void FillArray1dOutput(array_1d< double, 3 > &rOutputValue, const array_1d< double, 2 > &ComputedValue)
Definition: poro_element_utilities.hpp:234
static void GetNodalVariableVector(array_1d< double, 6 > &rNodalVariableVector, const Element::GeometryType &Geom, const Variable< array_1d< double, 3 >> &Variable, IndexType SolutionStepIndex=0)
Definition: poro_element_utilities.hpp:252
static void GetNodalVariableVector(array_1d< double, 12 > &rNodalVariableVector, const Element::GeometryType &Geom, const Variable< array_1d< double, 3 >> &Variable, IndexType SolutionStepIndex=0)
Definition: poro_element_utilities.hpp:284
static void CalculateNuElementMatrix(BoundedMatrix< double, 3, 9 > &rNut, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:95
static void AssembleUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 24, 24 > &UBlockMatrix)
Definition: poro_element_utilities.hpp:545
static void CalculateNuMatrix(BoundedMatrix< double, 3, 24 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:81
static void InterpolateVariableWithComponents(array_1d< double, 2 > &rVector, const Matrix &Ncontainer, const array_1d< double, 8 > &VariableWithComponents, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:167
static void AssemblePBlockVector(Vector &rRightHandSideVector, const TVectorType &PBlockVector, const unsigned int &Dim, const unsigned int &NumNodes)
Definition: poro_element_utilities.hpp:911
static void CalculatePermeabilityMatrix(BoundedMatrix< double, 3, 3 > &rPermeabilityMatrix, const Element::PropertiesType &Prop)
Definition: poro_element_utilities.hpp:348
static void InvertMatrix2(BoundedMatrix< double, 2, 2 > &rInvertedMatrix, const BoundedMatrix< double, 2, 2 > &InputMatrix)
Definition: poro_element_utilities.hpp:392
static void AssembleUPBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 12, 4 > &UPBlockMatrix)
Definition: poro_element_utilities.hpp:620
static void CalculateNuElementMatrix(BoundedMatrix< double, 4, 16 > &rNut, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:113
static void AssembleUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 12, 12 > &UBlockMatrix)
Definition: poro_element_utilities.hpp:483
static void AssembleUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 8, 8 > &UBlockMatrix)
Definition: poro_element_utilities.hpp:458
static void CalculateNuMatrix(BoundedMatrix< double, 3, 18 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:67
static void AssemblePUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 4, 12 > &PUBlockMatrix)
Definition: poro_element_utilities.hpp:733
static void CalculateNuElementMatrix(BoundedMatrix< double, 3, 12 > &rNut, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:104
static void AssemblePUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 8, 24 > &PUBlockMatrix)
Definition: poro_element_utilities.hpp:779
static void AssembleUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 6, 6 > &UBlockMatrix)
Definition: poro_element_utilities.hpp:433
static void CalculateNuElementMatrix(BoundedMatrix< double, 4, 32 > &rNut, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:137
static void AssembleUPBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 24, 8 > &UPBlockMatrix)
Definition: poro_element_utilities.hpp:666
static void AssembleUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 18, 18 > &UBlockMatrix)
Definition: poro_element_utilities.hpp:514
static void GetNodalVariableVector(array_1d< double, 24 > &rNodalVariableVector, const Element::GeometryType &Geom, const Variable< array_1d< double, 3 >> &Variable, IndexType SolutionStepIndex=0)
Definition: poro_element_utilities.hpp:318
static void AssembleUBlockVector(Vector &rRightHandSideVector, const array_1d< double, 8 > &UBlockVector)
Definition: poro_element_utilities.hpp:839
static void InterpolateVariableWithComponents(array_1d< double, 3 > &rVector, const Matrix &Ncontainer, const array_1d< double, 24 > &VariableWithComponents, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:217
static void AssembleUPBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 6, 3 > &UPBlockMatrix)
Definition: poro_element_utilities.hpp:576
static void FillArray1dOutput(array_1d< double, 3 > &rOutputValue, const array_1d< double, 3 > &ComputedValue)
Definition: poro_element_utilities.hpp:243
static void AssemblePBlockMatrix(Matrix &rLeftHandSideMatrix, const TMatrixType &PBlockMatrix, const unsigned int &Dim, const unsigned int &NumNodes)
Definition: poro_element_utilities.hpp:803
static void CalculatePermeabilityMatrix(BoundedMatrix< double, 2, 2 > &rPermeabilityMatrix, const Element::PropertiesType &Prop)
Definition: poro_element_utilities.hpp:335
static void CalculatePermeabilityMatrix(Matrix &rPermeabilityMatrix, const Element::PropertiesType &Prop, const unsigned int &Dim)
Definition: poro_element_utilities.hpp:368
static void AssembleUBlockVector(Vector &rRightHandSideVector, const array_1d< double, 6 > &UBlockVector)
Definition: poro_element_utilities.hpp:822
static void GetNodalVariableVector(array_1d< double, 18 > &rNodalVariableVector, const Element::GeometryType &Geom, const Variable< array_1d< double, 3 >> &Variable, IndexType SolutionStepIndex=0)
Definition: poro_element_utilities.hpp:301
static void CalculateNuMatrix(BoundedMatrix< double, 2, 8 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:48
static void CalculateNuElementMatrix(BoundedMatrix< double, 4, 24 > &rNut, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:123
static void Calculate2DExtrapolationMatrix(BoundedMatrix< double, 4, 4 > &rExtrapolationMatrix)
Definition: poro_element_utilities.hpp:942
static void AssemblePUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 4, 8 > &PUBlockMatrix)
Definition: poro_element_utilities.hpp:711
static void InterpolateVariableWithComponents(array_1d< double, 2 > &rVector, const Matrix &Ncontainer, const array_1d< double, 6 > &VariableWithComponents, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:151
static void GetNodalVariableVector(array_1d< double, 8 > &rNodalVariableVector, const Element::GeometryType &Geom, const Variable< array_1d< double, 3 >> &Variable, IndexType SolutionStepIndex=0)
Definition: poro_element_utilities.hpp:268
static void AssembleUBlockVector(Vector &rRightHandSideVector, const array_1d< double, 18 > &UBlockVector)
Definition: poro_element_utilities.hpp:874
static void AssembleUBlockVector(Vector &rRightHandSideVector, const array_1d< double, 12 > &UBlockVector)
Definition: poro_element_utilities.hpp:856
static void CalculateNuMatrix(BoundedMatrix< double, 3, 12 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:57
static void AssemblePUBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 3, 6 > &PUBlockMatrix)
Definition: poro_element_utilities.hpp:689
static void AssembleUPBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 8, 4 > &UPBlockMatrix)
Definition: poro_element_utilities.hpp:598
static void AssembleUPBlockMatrix(Matrix &rLeftHandSideMatrix, const BoundedMatrix< double, 18, 6 > &UPBlockMatrix)
Definition: poro_element_utilities.hpp:643
static void InterpolateVariableWithComponents(array_1d< double, 3 > &rVector, const Matrix &Ncontainer, const array_1d< double, 12 > &VariableWithComponents, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:183
static void Calculate3DExtrapolationMatrix(BoundedMatrix< double, 8, 8 > &rExtrapolationMatrix)
Definition: poro_element_utilities.hpp:968
static void Calculate2DExtrapolationMatrix(BoundedMatrix< double, 3, 3 > &rExtrapolationMatrix)
Definition: poro_element_utilities.hpp:930
static void AssembleUBlockVector(Vector &rRightHandSideVector, const array_1d< double, 24 > &UBlockVector)
Definition: poro_element_utilities.hpp:892
static void CalculateNuMatrix(BoundedMatrix< double, 2, 6 > &rNu, const Matrix &Ncontainer, const unsigned int &GPoint)
Definition: poro_element_utilities.hpp:39
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
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