Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
FE_decl.hpp
1#ifndef FE_DECL_hpp
2#define FE_DECL_hpp
3
4
5#include "feddlib/core/FEDDCore.hpp"
6#include "feddlib/core/General/SmallMatrix.hpp"
7#include "feddlib/core/General/DefaultTypeDefs.hpp"
8#include "feddlib/core/LinearAlgebra/Matrix.hpp"
9#include "feddlib/core/LinearAlgebra/MultiVector.hpp"
10#include "feddlib/core/LinearAlgebra/BlockMatrix.hpp"
11#include "Domain.hpp"
12#include "Helper.hpp"
13#include "sms.hpp"
14#include "feddlib/core/AceFemAssembly/AssembleFE.hpp"
15#include "feddlib/core/AceFemAssembly/specific/AssembleFE_SCI_SMC_Active_Growth_Reorientation_decl.hpp"
16#include "feddlib/core/AceFemAssembly/specific/AssembleFENavierStokes_decl.hpp"
17
18#include "feddlib/core/AceFemAssembly/AssembleFEFactory.hpp"
19
20#include <Teuchos_Array.hpp>
21#include <Teuchos_BLAS.hpp>
22
23#include <boost/function.hpp>
24
33
34namespace FEDD {
35class DataElement {
36 public:
37 DataElement();
38 DataElement(int size);
39 std::vector<double> getHp();
40 std::vector<double> getHt();
41 void setHp( double* ht);
42 private:
43 std::vector<double> ht_;
44 std::vector<double> hp_;
45};
46
47template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
48class FE {
49 public:
50
51 typedef Domain<SC,LO,GO,NO> Domain_Type;
52 typedef Teuchos::RCP<Domain_Type> DomainPtr_Type;
53 typedef Teuchos::RCP<const Domain_Type> DomainConstPtr_Type;
54 typedef std::vector<DomainConstPtr_Type> DomainConstPtr_vec_Type;
55
56 typedef Teuchos::RCP<Mesh<SC,LO,GO,NO> > MeshPtr_Type;
57 typedef MeshUnstructured<SC,LO,GO,NO> MeshUnstr_Type;
58 typedef Teuchos::RCP<MeshUnstr_Type> MeshUnstrPtr_Type;
59
60 typedef Elements Elements_Type;
61 typedef Teuchos::RCP<Elements_Type> ElementsPtr_Type;
62 typedef Teuchos::RCP<const Elements_Type> ElementsConstPtr_Type;
63
64 typedef Matrix<SC,LO,GO,NO> Matrix_Type;
65 typedef Teuchos::RCP<Matrix_Type> MatrixPtr_Type;
66
67 typedef typename Matrix_Type::MapPtr_Type MapPtr_Type;
68 typedef typename Matrix_Type::MapConstPtr_Type MapConstPtr_Type;
69
70 typedef MultiVector<SC,LO,GO,NO> MultiVector_Type;
71 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
72 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorConstPtr_Type;
73
74 typedef std::vector<GO> vec_GO_Type;
75 typedef std::vector<vec_GO_Type> vec2D_GO_Type;
76 typedef std::vector<vec2D_GO_Type> vec3D_GO_Type;
77 typedef Teuchos::RCP<vec3D_GO_Type> vec3D_GO_ptr_Type;
78
79 typedef boost::function<void(double* x, double* res, double t, const double* parameters)> BC_func_Type;
80
81 typedef AssembleFE<SC,LO,GO,NO> AssembleFE_Type;
82 typedef Teuchos::RCP<AssembleFE_Type> AssembleFEPtr_Type;
83
84 typedef AssembleFENavierStokes<SC,LO,GO,NO> AssembleFENavierStokes_Type;
85 typedef Teuchos::RCP<AssembleFENavierStokes_Type> AssembleFENavierStokesPtr_Type;
86
87 typedef AssembleFEGeneralizedNewtonian<SC,LO,GO,NO> AssembleFEGeneralizedNewtonian_Type;
88 typedef Teuchos::RCP<AssembleFEGeneralizedNewtonian_Type> AssembleFEGeneralizedNewtonianPtr_Type;
89
90 typedef AssembleFE_SCI_SMC_Active_Growth_Reorientation<SC,LO,GO,NO> AssembleFE_SCI_SMC_Active_Growth_Reorientation_Type;
91 typedef Teuchos::RCP<AssembleFE_SCI_SMC_Active_Growth_Reorientation_Type> AssembleFE_SCI_SMC_Active_Growth_Reorientation_Ptr_Type;
92
93 typedef std::vector<AssembleFEPtr_Type> AssembleFEPtr_vec_Type;
94
95 typedef BlockMatrix<SC,LO,GO,NO> BlockMatrix_Type ;
96 typedef Teuchos::RCP<BlockMatrix_Type> BlockMatrixPtr_Type;
97
98 typedef BlockMultiVector<SC,LO,GO,NO> BlockMultiVector_Type ;
99 typedef Teuchos::RCP<BlockMultiVector_Type> BlockMultiVectorPtr_Type;
100
101 typedef SmallMatrix<SC> SmallMatrix_Type;
102 typedef Teuchos::RCP<SmallMatrix_Type> SmallMatrixPtr_Type;
103
104 DomainConstPtr_vec_Type domainVec_;
105 Teuchos::RCP<ElementSpec> es_;
106
107 /* ###################################################################### */
108
109 FE(bool saveAssembly=false);
110
111 void assemblyIdentity(MatrixPtr_Type &A);
112
113 void assemblySurfaceIntegral(int dim,
114 std::string FEType,
115 MultiVectorPtr_Type a,
116 std::string fieldType,
117 RhsFunc_Type func,
118 std::vector<SC>& funcParameter);
119
120 void assemblySurfaceIntegralExternal(int dim,
121 std::string FEType,
122 MultiVectorPtr_Type f,
123 MultiVectorPtr_Type d_rep,
124 std::vector<SC>& funcParameter,
125 RhsFunc_Type func,
126 ParameterListPtr_Type params,
127 int FEloc=0);
128
130 std::string FEType,
131 MultiVectorPtr_Type f,
132 MultiVectorPtr_Type d_rep,
133 MatrixPtr_Type &Kext,
134 std::vector<SC>& funcParameter,
135 RhsFunc_Type func,
136 ParameterListPtr_Type params,
137 int FEloc = 0);
138
139 void assemblySurfaceIntegralFlag(int dim,
140 std::string FEType,
141 MultiVectorPtr_Type a,
142 std::string fieldType,
143 BC_func_Type func,
144 std::vector<SC>& funcParameter);
145
146 void assemblyAceGenTPM( MatrixPtr_Type &A00,
147 MatrixPtr_Type &A01,
148 MatrixPtr_Type &A10,
149 MatrixPtr_Type &A11,
150 MultiVectorPtr_Type &F0,
151 MultiVectorPtr_Type &F1,
152 MapPtr_Type &mapRepeated1,
153 MapPtr_Type &mapRepeated2,
154 ParameterListPtr_Type parameterList,
155 MultiVectorPtr_Type u_repeatedNewton=Teuchos::null,
156 MultiVectorPtr_Type p_repeatedNewton=Teuchos::null,
157 MultiVectorPtr_Type u_repeatedTime=Teuchos::null,
158 MultiVectorPtr_Type p_repeatedTime=Teuchos::null,
159 bool update=true,
160 bool updateHistory=true);
161
162
163 void addFE(DomainConstPtr_Type domain);
164
165 void doSetZeros(double eps = 10*Teuchos::ScalarTraits<SC>::eps());
166
167 void assemblyEmptyMatrix(MatrixPtr_Type &A);
168
169 void applyBTinv(vec3D_dbl_ptr_Type& dPhiIn,
170 vec3D_dbl_Type& dPhiOut,
171 SmallMatrix<SC>& Binv);
172
173 void applyBTinv(vec3D_dbl_ptr_Type& dPhiIn,
174 vec3D_dbl_Type& dPhiOut,
175 const SmallMatrix<SC>& Binv);
176
177 void assemblyLaplace(int Dimension,
178 std::string FEType,
179 int degree,
180 MatrixPtr_Type &A,
181 bool callFillComplete = true,
182 int FELocExternal = -1);
183
184 void assemblyMass(int dim,
185 std::string FEType,
186 std::string fieldType,
187 MatrixPtr_Type &A,
188 bool callFillComplete = true);
189
190 // Ueberladung der Assemblierung der Massematrix fuer FSI, da
191 // checkFE sonst auch fuer das Strukturproblem FEloc = 1 liefert (= Fluid)
192 // und somit die welche domain und Map in der Assemblierung genutzt wird.
193 void assemblyMass(int dim,
194 std::string FEType,
195 std::string fieldType,
196 MatrixPtr_Type &A,
197 int FEloc,
198 bool callFillComplete = true);
199
200 void assemblyLaplaceVecField(int dim,
201 std::string FEType,
202 int degree,
203 MatrixPtr_Type &A,
204 bool callFillComplete = true);
205
206 void assemblyLaplaceVecFieldV2(int dim,
207 std::string FEType,
208 int degree,
209 MatrixPtr_Type &A,
210 bool callFillComplete = true);
211
213 int dim, std::string FEType, int degree, MultiVectorPtr_Type u_rep,
214 BlockMatrixPtr_Type &A, BlockMultiVectorPtr_Type &resVec,
215 ParameterListPtr_Type params, std::string assembleMode,
216 bool callFillComplete = true, int FELocExternal = -1);
217
218 // // Assembling the reaction term of the reaction diffusion equation. Maybe add default function.
219 // void assemblyLinearReactionTerm(int dim,
220 // std::string FEType,
221 // MatrixPtr_Type &A,
222 // bool callFillComplete,
223 // std::vector<SC>& funcParameter,
224 // RhsFunc_Type reactionFunc);
225
226 // // Assembling the reaction term of the reaction diffusion equation. Maybe add default function.
227 // void assemblyReactionTerm(int dim,
228 // std::string FEType,
229 // MatrixPtr_Type &A,
230 // MultiVectorPtr_Type u,
231 // bool callFillComplete,
232 // std::vector<SC>& funcParameter,
233 // RhsFunc_Type reactionFunc);
234
235 // // Assembling the reaction term of the reaction diffusion equation. Maybe add default function.
236 // void assemblyDReactionTerm(int dim,
237 // std::string FEType,
238 // MatrixPtr_Type &A,
239 // MultiVectorPtr_Type u,
240 // bool callFillComplete,
241 // std::vector<SC>& funcParameter,
242 // RhsFunc_Type reactionFunc);
243
245 std::string FEType,
246 MatrixPtr_Type &A,
247 MultiVectorPtr_Type eModVec,
248 double nu,
249 bool callFillComplete=true);
250
251 void determineEMod(std::string FEType,
252 MultiVectorPtr_Type solution,
253 MultiVectorPtr_Type &eModVec,
254 DomainConstPtr_Type domain,
255 ParameterListPtr_Type params);
256 void assemblyLaplaceDiffusion(int Dimension,
257 std::string FEType,
258 int degree,
259 MatrixPtr_Type &A,
260 vec2D_dbl_Type diffusionTensor,
261 bool callFillComplete = true,
262 int FELocExternal = -1);
263
264 void assemblyElasticityJacobianAndStressAceFEM(int dim,
265 std::string FEType,
266 MatrixPtr_Type &A,
267 MultiVectorPtr_Type &f,
268 MultiVectorPtr_Type u,
269 ParameterListPtr_Type pList,
270 double C,
271 bool callFillComplete=true);
272
273 void assemblyElasticityJacobianAceFEM(int dim,
274 std::string FEType,
275 MatrixPtr_Type &A,
276 MultiVectorPtr_Type u,
277 std::string material_model,
278 double E,
279 double nu,
280 double C,
281 bool callFillComplete=true);
282
283 void assemblyElasticityStressesAceFEM(int dim,
284 std::string FEType,
285 MultiVectorPtr_Type &f,
286 MultiVectorPtr_Type u,
287 std::string material_model,
288 double E,
289 double nu,
290 double C,
291 bool callFillComplete=true);
292
294 std::string FEType,
295 MatrixPtr_Type &A,
296 MultiVectorPtr_Type u,
297 bool callFillComplete);
298
300 std::string FEType,
301 MatrixPtr_Type &A,
302 MultiVectorPtr_Type u,
303 bool callFillComplete);
304
305 void assemblyDivAndDivT( int dim,
306 std::string FEType1,
307 std::string FEType2,
308 int degree,
309 MatrixPtr_Type &Bmat,
310 MatrixPtr_Type &BTmat,
311 MapConstPtr_Type map1,
312 MapConstPtr_Type map2,
313 bool callFillComplete = true);
314
316 std::string FEType1,
317 std::string FEType2,
318 int degree,
319 MatrixPtr_Type &Bmat,
320 MatrixPtr_Type &BTmat,
321 MapConstPtr_Type map1,
322 MapConstPtr_Type map2,
323 bool callFillComplete = true);
324
325
328 std::string FEType,
329 MatrixPtr_Type &A,
330 bool callFillComplete = true);
331
335 std::string FEType,
336 MatrixPtr_Type &A,
337 CoeffFuncDbl_Type func,
338 double* parameters,
339 bool callFillComplete = true);
340
342 void assemblyStress(int dim,
343 std::string FEType,
344 MatrixPtr_Type &A,
345 CoeffFunc_Type func,
346 int* parameters,
347 bool callFillComplete = true);
348
352 std::string FEType,
353 MatrixPtr_Type &A,
354 double lambda,
355 double mu,
356 bool callFillComplete = true);
357
365 std::string FEType,
366 MatrixPtr_Type &A,
367 MultiVectorPtr_Type w,
368 bool callFillComplete = true);
369
370 // Das ist Assemblierungsroutine fuer die Kopplungsbloecke C1, C2 und C3 und deren Transponierte.
371 // Die entsprechende Skalierung wird hinterher in dem Problem gemacht. Hier wird die entsprechende
372 // Einheitsmatrix (auf den Interfaceknoten) gesetzt.
373 void assemblyFSICoupling(int dim,
374 std::string FEType,
375 MatrixPtr_Type &C,
376 MatrixPtr_Type &C_T,
377 int FEloc1, // 0 = Fluid, 2 = Struktur
378 int FEloc2,
379 MapConstPtr_Type map1, // DomainMap: InterfaceMapVecFieldUnique = Spalten von C_T
380 MapConstPtr_Type map2, // RangeMap: this->getDomain(0)->getMapVecFieldUnique() = Zeilen von C_T
381 bool callFillComplete = true);
382
383 void assemblyDummyCoupling( int dim,
384 std::string FEType,
385 MatrixPtr_Type &C,
386 int FEloc, // 0 = Fluid, 2 = Struktur
387 bool callFillComplete);
388
389
390 // Das ist Assemblierungsroutine fuer den Kopplungsblock C4, der
391 // Geometrie und Struktur koppelt. Ist nur bei geometrisch implizit von Noeten.
392 void assemblyGeometryCoupling(int dim,
393 std::string FEType,
394 MatrixPtr_Type &C,
395 int FEloc, // wie oben. Allerdings 4 = Geometrie (= 0)
396 MapConstPtr_Type map1, // Fluid-Interface-Map
397 MapConstPtr_Type map2, // DomainMap: this->getDomain(2)->getMapVecFieldUnique() = Spalten von C
398 MapConstPtr_Type map3, // RangeMap: this->getDomain(4)->getMapVecFieldUnique() = Zeilen von C
399 bool callFillComplete = true);
400
401 // Shape-Derivatives fuer die Geschwindigkeit; die Hauptvariable ist \delta d und Testfunktion ist v:
402 // Spannung 1: DK1 = - \mu \int [ \grad(u) \grad(\delta d) + [\grad(\delta d)]^T [\grad(u)]^T ] : \grad(v) d\Omega
403 // Spannung 2: DK2 = \int [ \sigma \eta ] : \grad(v) d\Omega
404 // mit \sigma = \mu ( \grad(u) + [\grad(u)]^T ) - pI und \eta = I (\nabla \cdot \delta d) - [\grad(\delta d)]^T.
405 // Konvektion: DN = \rho \int (u - w)^T \eta [\grad(u)]^T v d\Omega
406 // Impliziter Anteil der Konvektion: DW = - \rho \frac{1}{k} \int (\delta d \cdot \nabla) u v d\Omega
407 // aehnlich zur Newton-Matrix W aus Navier-Stokes, wobei k = dt = Zeitschrittweite
408 // Zusaetzlicher Term wg. non-conservatie: DP = - \rho \int ( \grad(w) : \eta ) u \cdot v d\Omega
409 // Massematrix und impliziter Anteil wg. non-conservative:
410 // DM = \rho \frac{1.5}{k} \int (\nabla \cdot \delta d) u \cdot v d\Omega (Massematrix aus BDF2)
411 // - \rho \frac{1}{k} \int (\nabla \cdot \delta d) u \cdot v d\Omega
412 // = \rho \frac{0.5}{k} \int (\nabla \cdot \delta d) u \cdot v d\Omega
413 // ACHTUNG: Der erste Koeffizient \frac{1.5}{k} ist durch den fuehrenden Koeffizienten
414 // bei der BDF2-Zeitintegration nach Normierung gegeben (bei BDF2 also 3/2 = 1.5).
415 void assemblyShapeDerivativeVelocity(int dim,
416 std::string FEType1,
417 std::string FEType2,
418 MatrixPtr_Type &D,
419 int FEloc, // 4 = Fluid (Velocity)
420 MultiVectorPtr_Type u, // Geschwindigkeit
421 MultiVectorPtr_Type w, // Beschleunigung Gitter
422 MultiVectorPtr_Type p, // Druck
423 double dt, // Zeitschrittweite
424 double rho, // Dichte vom Fluid
425 double nu, // Viskositaet vom Fluid
426 bool callFillComplete = true);
427
428
429 // Shape-Derivatives fuer Div-Nebenbedingung; Hauptvariable ist \delta d und Testfunktion ist q:
430 // Divergenz: DB = - \int q \grad(u) : \eta d\Omega
431 void assemblyShapeDerivativeDivergence(int dim,
432 std::string FEType1,
433 std::string FEType2,
434 MatrixPtr_Type &DB,
435 int FEloc1, // 1 = Fluid-Pressure
436 int FEloc2, // 4 = Fluid-Velocity
437 MapConstPtr_Type map1_unique, // Pressure-Map
438 MapConstPtr_Type map2_unique, // Velocity-Map unique als VecField
439 MultiVectorPtr_Type u, // Geschwindigkeit
440 bool callFillComplete = true);
441
442
447 void assemblyPressureMeanValue(int dim, std::string FEType, MatrixPtr_Type a, MatrixPtr_Type aT);
448
449 void assemblyRHS(int dim,
450 std::string FEType,
451 MultiVectorPtr_Type a,
452 std::string fieldType,
453 RhsFunc_Type func,
454 std::vector<SC>& funcParameter
455 );
456
457 void assemblyRHSDegTest( int dim,
458 std::string FEType,
459 MultiVectorPtr_Type a,
460 std::string fieldType,
461 RhsFunc_Type func,
462 std::vector<SC>& funcParameter,
463 int degree) ;
464
465 void buildFullDPhi(vec3D_dbl_ptr_Type dPhi, Teuchos::Array<SmallMatrix<double> >& dPhiMat);
466
467 void fillMatrixArray(SmallMatrix<double> &matIn, double* matArrayOut, std::string order, int offset=0);
468
469 void epsilonTensor(vec_dbl_Type &basisValues, SmallMatrix<SC> &epsilonValues, int activeDof);
470
472 std::string FETypeVelocity,
473 std::string FETypePressure,
474 int degree,
475 int dofsVelocity,
476 int dofsPressure,
477 MultiVectorPtr_Type u_rep,
478 MultiVectorPtr_Type p_rep,
479 BlockMatrixPtr_Type &A,
480 BlockMultiVectorPtr_Type &resVec,
481 SmallMatrix_Type coeff,
482 ParameterListPtr_Type params,
483 bool reAssemble,
484 std::string assembleMode,
485 bool callFillComplete = true,
486 int FELocExternal=-1);
487
489 std::string FEType,
490 int degree,
491 int dofs,
492 BlockMatrixPtr_Type &A,
493 bool callFillComplete,
494 int FELocExternal=-1);
495
497 std::string FETypeChem,
498 std::string FETypeSolid,
499 int degree,
500 int dofsChem,
501 int dofsSolid,
502 MultiVectorPtr_Type c_rep,
503 MultiVectorPtr_Type d_rep,
504 BlockMatrixPtr_Type &A,
505 BlockMultiVectorPtr_Type &resVec,
506 ParameterListPtr_Type params,
507 std::string assembleMode,
508 bool callFillComplete = true,
509 int FELocExternal=-1);
510
512 std::string FETypeChem,
513 std::string FETypeSolid,
514 int degree,
515 int dofsChem,
516 int dofsSolid,
517 MultiVectorPtr_Type c_rep,
518 MultiVectorPtr_Type d_rep,
519 BlockMatrixPtr_Type &A,
520 int blockRow,
521 int blockCol,
522 BlockMultiVectorPtr_Type &resVec,
523 int block,
524 ParameterListPtr_Type params,
525 std::string assembleMode,
526 bool callFillComplete = true,
527 int FELocExternal=-1);
528
529 void advanceInTimeAssemblyFEElements(double dt ,MultiVectorPtr_Type d_rep , MultiVectorPtr_Type c_rep)
530 {
531 //UN FElocChem = 1; //checkFE(dim,FETypeChem); // Checks for different domains which belongs to a certain fetype
532 UN FElocSolid = 0; //checkFE(dim,FETypeSolid); // Checks for different domains which belongs to a certain fetype
533
534 //ElementsPtr_Type elementsChem= domainVec_.at(FElocChem)->getElementsC();
535
536 ElementsPtr_Type elementsSolid = domainVec_.at(FElocSolid)->getElementsC();
537
538 vec_dbl_Type solution_c;
539 vec_dbl_Type solution_d;
540 for (UN T=0; T<assemblyFEElements_.size(); T++) {
541 vec_dbl_Type solution(0);
542
543 solution_c = getSolution(elementsSolid->getElement(T).getVectorNodeList(), c_rep,1);
544 solution_d = getSolution(elementsSolid->getElement(T).getVectorNodeList(), d_rep,3);
545 // First Solid, then Chemistry
546 solution.insert( solution.end(), solution_d.begin(), solution_d.end() );
547 solution.insert( solution.end(), solution_c.begin(), solution_c.end() );
548
549 assemblyFEElements_[T]->updateSolution(solution);
550
551 assemblyFEElements_[T]->advanceInTime(dt);
552 }
553
554 };
555
557 std::string FEType,
558 int degree,
559 int dofs,
560 MultiVectorPtr_Type d_rep,
561 BlockMatrixPtr_Type &A,
562 BlockMultiVectorPtr_Type &resVec,
563 ParameterListPtr_Type params,
564 bool reAssemble,
565 std::string assembleMode,
566 bool callFillComplete=true,
567 int FELocExternal=-1);
568
570 std::string FEType,
571 int degree,
572 int dofs,
573 MultiVectorPtr_Type d_rep,
574 BlockMatrixPtr_Type &A,
575 BlockMultiVectorPtr_Type &resVec,
576 ParameterListPtr_Type params,
577 bool callFillComplete=true,
578 int FELocExternal=-1);
579
581 std::string FEType,
582 int degree,
583 int dofs,
584 MultiVectorPtr_Type d_rep,
585 BlockMatrixPtr_Type &A,
586 BlockMultiVectorPtr_Type &resVec,
587 ParameterListPtr_Type params,
588 DomainConstPtr_Type domain,
589 MultiVectorPtr_Type eModVec,
590 bool callFillComplete = true,
591 int FELocExternal=-1);
592
593 void checkMeshOrientation(int dim, std::string FEType);
594
595 /* Given a converged velocity solution this function
596 computes the averaged viscosity estimate in each cell at the center of mass
597 - CM stands for center of mass so the values at the node are averaged to obtain one value
598 */
600 std::string FETypeVelocity,
601 std::string FETypePressure,
602 int dofsVelocity,
603 int dofsPressure,
604 MultiVectorPtr_Type u_rep,
605 MultiVectorPtr_Type p_rep,
606 ParameterListPtr_Type params);
607
608 // Write prostprocessing output fields like e.g. the viscosity based on velocity, pressure .. solution
609 // inside this BMV -> For visualization or postprocessing
610 BlockMultiVectorPtr_Type const_output_fields;
611
612
613/* ----------------------------------------------------------------------------------------*/
614private:
615 void addFeBlockMatrix(BlockMatrixPtr_Type &A, SmallMatrixPtr_Type elementMatrix, FiniteElement element1,FiniteElement element2, MapConstPtr_Type mapFirstColumn,MapConstPtr_Type mapSecondColumn, tuple_disk_vec_ptr_Type problemDisk);
616
617 void addFeBlock(BlockMatrixPtr_Type &A, SmallMatrixPtr_Type elementMatrix, FiniteElement element, MapConstPtr_Type mapFirstRow, int row, int column, tuple_disk_vec_ptr_Type problemDisk);
618
619 void initAssembleFEElements(std::string elementType, tuple_disk_vec_ptr_Type problemDisk, ElementsPtr_Type elements, ParameterListPtr_Type params, vec2D_dbl_ptr_Type pointsRep, MapConstPtr_Type elementMap);
620
621 void addFeBlockMv(BlockMultiVectorPtr_Type &res, vec_dbl_ptr_Type rhsVec, FiniteElement elementBlock1,FiniteElement elementBlock2, int dofs1, int dofs2 );
622
623 void addFeBlockMv(BlockMultiVectorPtr_Type &res, vec_dbl_ptr_Type rhsVec, FiniteElement elementBlock, int dofs);
624
625 void computeSurfaceNormal(int dim,vec2D_dbl_ptr_Type pointsRep,vec_int_Type nodeList,vec_dbl_Type &v_E, double &norm_v_E);
626
627
628 AssembleFEPtr_vec_Type assemblyFEElements_;
629
630 vec2D_dbl_Type getCoordinates(vec_LO_Type localIDs, vec2D_dbl_ptr_Type points);
631 vec_dbl_Type getSolution(vec_LO_Type localIDs, MultiVectorPtr_Type u_rep, int dofsVelocity);
632
633 //Start of AceGen code
642 void nh3d(double* v, double (*E), double (*Nu), double** F , double** Pmat, double**** Amat);
643
653 void mr3d(double* v, double (*E), double (*Nu), double (*C), double** F, double** Pmat, double**** Amat);
654
655 void stvk3d(double* v,double (*lam),double (*mue),double** F,double** Pmat,double**** Amat);
656
657 void stvk2d(double* v, double (*lam),double (*mue),double** F ,double** Pmat,double**** Amat);
658
659 void SMTSetElSpecBiot(ElementSpec *es,int *idata/*not needed*/,int ic,int ng, vec_dbl_Type& paraVec);
660
661 void SMTSetElSpecBiotStVK(ElementSpec *es,int *idata/*not needed*/,int ic,int ng, vec_dbl_Type& paraVec);
662
663 void SMTSetElSpecBiot3D(ElementSpec *es,int *idata/*not needed*/,int ic,int ng, vec_dbl_Type& paraVec);
664
665 void SKR_Biot(double* v,ElementSpec *es,ElementData *ed, NodeSpec **ns, NodeData **nd,double *rdata,int *idata,double *p,double **s);
666
667 void SKR_Biot_StVK(double* v,ElementSpec *es,ElementData *ed, NodeSpec **ns, NodeData **nd,double *rdata,int *idata,double *p,double **s);
668
669 void SKR_Biot3D(double* v,ElementSpec *es,ElementData *ed, NodeSpec **ns, NodeData **nd,double *rdata,int *idata,double *p,double **s);
670
671 //End of AceGen code
672
673 void buildTransformation(const vec_int_Type& element,
674 vec2D_dbl_ptr_Type pointsRep,
676 std::string FEType="P");
677
678 void buildTransformation(const vec_int_Type& element,
679 vec2D_dbl_ptr_Type pointsRep,
681 vec_dbl_Type& b,
682 std::string FEType="P");
683
684
685 void buildTransformationSurface(const vec_int_Type& element,
686 vec2D_dbl_ptr_Type pointsRep,
688 vec_dbl_Type& b,
689 std::string FEType="P");
690
691 void applyDiff(vec3D_dbl_Type& dPhiIn,
692 vec3D_dbl_Type& dPhiOut,
693 SmallMatrix<SC>& diffT);
694
695
696 void phi( int Dimension,
697 int intFE,
698 int i,
699 vec_dbl_Type &QuadPts,
700 double* value);
701
702
703 void gradPhi( int Dimension,
704 int intFE,
705 int i,
706 vec_dbl_Type &QuadPts,
707 vec_dbl_ptr_Type &value);
708
710 void getQuadratureValues(int Dimension,
711 int Degree,
712 vec2D_dbl_ptr_Type &QuadPts,
713 vec_dbl_ptr_Type &QuadW,
714 std::string FEType);
715
716 int getPhi( vec2D_dbl_ptr_Type &Phi,
717 vec_dbl_ptr_Type &weightsPhi,
718 int Dimension,
719 std::string FEType,
720 int Degree,
721 std::string FETypeQuadPoints="");
722
723 int getPhiGlobal(vec2D_dbl_ptr_Type &Phi,
724 vec_dbl_ptr_Type &weightsPhi,
725 int Dimension,
726 std::string FEType,
727 int Degree);
728
729 int getDPhi( vec3D_dbl_ptr_Type &DPhi,
730 vec_dbl_ptr_Type &weightsDPhi,
731 int Dimension,
732 std::string FEType,
733 int Degree);
734
735 int checkFE(int Dimension,
736 std::string FEType);
737
738
739 bool setZeros_;
740 SC myeps_;
741 std::vector<Teuchos::RCP<DataElement> > ed_;
742 bool saveAssembly_;
743};
744}
745#endif
Definition AssembleFEGeneralizedNewtonian_decl.hpp:21
Definition AssembleFENavierStokes_decl.hpp:13
Definition AssembleFE_SCI_SMC_Active_Growth_Reorientation_decl.hpp:29
This abstract class defining the interface for any type of element assembly rountines in the FEDDLib.
Definition AssembleFE_decl.hpp:61
Definition BlockMatrix_decl.hpp:23
Definition BlockMultiVector_decl.hpp:25
Definition Domain_decl.hpp:20
Definition Elements.hpp:22
void assemblyNonlinearSurfaceIntegralExternal(int dim, std::string FEType, MultiVectorPtr_Type f, MultiVectorPtr_Type d_rep, MatrixPtr_Type &Kext, std::vector< SC > &funcParameter, RhsFunc_Type func, ParameterListPtr_Type params, int FEloc=0)
assemblyNonlinearSurfaceIntegralExternal -
Definition FE_def.hpp:6809
void assemblyDivAndDivT(int dim, std::string FEType1, std::string FEType2, int degree, MatrixPtr_Type &Bmat, MatrixPtr_Type &BTmat, MapConstPtr_Type map1, MapConstPtr_Type map2, bool callFillComplete=true)
Assembly of \int q_h (nabla \cdot v_h) dx.
Definition FE_def.hpp:3776
void assemblyStress(int dim, std::string FEType, MatrixPtr_Type &A, CoeffFunc_Type func, int *parameters, bool callFillComplete=true)
(\grad u + (\grad u)^T, \grad v ); symmetrischer Gradient, wenn func = 1.0
Definition FE_def.hpp:4255
void assemblyAceDeformDiffuBlock(int dim, std::string FETypeChem, std::string FETypeSolid, int degree, int dofsChem, int dofsSolid, MultiVectorPtr_Type c_rep, MultiVectorPtr_Type d_rep, BlockMatrixPtr_Type &A, int blockRow, int blockCol, BlockMultiVectorPtr_Type &resVec, int block, ParameterListPtr_Type params, std::string assembleMode, bool callFillComplete=true, int FELocExternal=-1)
Definition FE_def.hpp:822
void assemblyNonLinearElasticity(int dim, std::string FEType, int degree, int dofs, MultiVectorPtr_Type d_rep, BlockMatrixPtr_Type &A, BlockMultiVectorPtr_Type &resVec, ParameterListPtr_Type params, bool callFillComplete=true, int FELocExternal=-1)
Assembly of Jacobian for nonlinear Elasticity.
Definition FE_def.hpp:449
void assemblyLinearElasticity(int dim, std::string FEType, int degree, int dofs, MultiVectorPtr_Type d_rep, BlockMatrixPtr_Type &A, BlockMultiVectorPtr_Type &resVec, ParameterListPtr_Type params, bool reAssemble, std::string assembleMode, bool callFillComplete=true, int FELocExternal=-1)
Assembly of Jacobian.
Definition FE_def.hpp:362
void assemblyBDStabilization(int dim, std::string FEType, MatrixPtr_Type &A, bool callFillComplete=true)
Definition FE_def.hpp:3999
void assemblyNonLinearElasticity(int dim, std::string FEType, int degree, int dofs, MultiVectorPtr_Type d_rep, BlockMatrixPtr_Type &A, BlockMultiVectorPtr_Type &resVec, ParameterListPtr_Type params, DomainConstPtr_Type domain, MultiVectorPtr_Type eModVec, bool callFillComplete=true, int FELocExternal=-1)
Assembly of Jacobian for nonlinear Elasticity.
Definition FE_def.hpp:538
void assemblyDivAndDivTFast(int dim, std::string FEType1, std::string FEType2, int degree, MatrixPtr_Type &Bmat, MatrixPtr_Type &BTmat, MapConstPtr_Type map1, MapConstPtr_Type map2, bool callFillComplete=true)
Assembly of \int q_h (nabla \cdot v_h) dx.
Definition FE_def.hpp:3906
void assemblyPressureMeanValue(int dim, std::string FEType, MatrixPtr_Type a, MatrixPtr_Type aT)
Assembling Pressure Integral to determine pressure mean value.
Definition FE_def.hpp:7273
void assemblyLaplaceXDim(int dim, std::string FEType, MatrixPtr_Type &A, CoeffFuncDbl_Type func, double *parameters, bool callFillComplete=true)
Definition FE_def.hpp:4073
void assemblyAdvectionVecField(int dim, std::string FEType, MatrixPtr_Type &A, MultiVectorPtr_Type u, bool callFillComplete)
Assembly of operator \int ((u_h \cdot \nabla ) v_h)v_h dx.
Definition FE_def.hpp:3591
void assemblyAdvectionInUVecField(int dim, std::string FEType, MatrixPtr_Type &A, MultiVectorPtr_Type u, bool callFillComplete)
Assembly of operator \int ((v_h \cdot \nabla ) u_h)v_h dx.
Definition FE_def.hpp:3685
void computeSteadyViscosityFE_CM(int dim, std::string FETypeVelocity, std::string FETypePressure, int dofsVelocity, int dofsPressure, MultiVectorPtr_Type u_rep, MultiVectorPtr_Type p_rep, ParameterListPtr_Type params)
Postprocessing: Using a converged velocity solution -> compute averaged viscosity inside an element a...
Definition FE_def.hpp:1253
void assemblyLinElasXDimE(int dim, std::string FEType, MatrixPtr_Type &A, MultiVectorPtr_Type eModVec, double nu, bool callFillComplete=true)
Same as assemblyLinElasXDim except for changing E Module Value.
Definition FE_def.hpp:4945
void assemblyNonlinearLaplace(int dim, std::string FEType, int degree, MultiVectorPtr_Type u_rep, BlockMatrixPtr_Type &A, BlockMultiVectorPtr_Type &resVec, ParameterListPtr_Type params, std::string assembleMode, bool callFillComplete=true, int FELocExternal=-1)
Assembly of Jacobian for nonlinear Laplace example.
Definition FE_def.hpp:2630
void assemblyAdditionalConvection(int dim, std::string FEType, MatrixPtr_Type &A, MultiVectorPtr_Type w, bool callFillComplete=true)
Addional Matrix due to ALE derivation: \int \rho_f div(w) u_h \cdot v_f dx, with mesh velocity w.
Definition FE_def.hpp:5257
void assemblyNavierStokes(int dim, std::string FETypeVelocity, std::string FETypePressure, int degree, int dofsVelocity, int dofsPressure, MultiVectorPtr_Type u_rep, MultiVectorPtr_Type p_rep, BlockMatrixPtr_Type &A, BlockMultiVectorPtr_Type &resVec, SmallMatrix_Type coeff, ParameterListPtr_Type params, bool reAssemble, std::string assembleMode, bool callFillComplete=true, int FELocExternal=-1)
Assembly of Jacobian for NavierStokes.
Definition FE_def.hpp:1078
void assemblyLaplaceAssFE(int dim, std::string FEType, int degree, int dofs, BlockMatrixPtr_Type &A, bool callFillComplete, int FELocExternal=-1)
Assembly of constant stiffness matix for laplacian operator .
Definition FE_def.hpp:1758
void assemblyLinElasXDim(int dim, std::string FEType, MatrixPtr_Type &A, double lambda, double mu, bool callFillComplete=true)
Definition FE_def.hpp:4589
void assemblyAceDeformDiffu(int dim, std::string FETypeChem, std::string FETypeSolid, int degree, int dofsChem, int dofsSolid, MultiVectorPtr_Type c_rep, MultiVectorPtr_Type d_rep, BlockMatrixPtr_Type &A, BlockMultiVectorPtr_Type &resVec, ParameterListPtr_Type params, std::string assembleMode, bool callFillComplete=true, int FELocExternal=-1)
Definition FE_def.hpp:644
Definition FiniteElement.hpp:17
Definition Matrix_decl.hpp:32
Definition MeshUnstructured_decl.hpp:31
Definition MultiVector_decl.hpp:36
This class represents a templated small Matrix of type T. Primarily created for 2x2 and 3x3 matrices....
Definition SmallMatrix.hpp:22
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5
Definition sms.hpp:336
Definition sms.hpp:377
Definition sms.hpp:278
Definition sms.hpp:306