Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
AssembleFEFactory_def.hpp
1#ifndef ASSEMBLEFEFACTORY_DEF_hpp
2#define ASSEMBLEFEFACTORY_DEF_hpp
3
4#include "AssembleFEFactory_decl.hpp"
5
6namespace FEDD {
7
8
9template <class SC, class LO, class GO, class NO>
13
14
15template <class SC, class LO, class GO, class NO>
16typename AssembleFEFactory<SC,LO,GO,NO>::AssembleFEPtr_Type AssembleFEFactory<SC,LO,GO,NO>::build(std::string problemType, int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type params,tuple_disk_vec_ptr_Type tuple)
17{
18 AssembleFEPtr_Type assembleFE;
19
20 AssembleFEPtr_Type assembleFESpecific;
21
22 if(problemType == "Laplace"){
23 //AssembleFE_Laplace<SC,LO,GO,NO> assembleFESpecific = new AssembleFE_Laplace<SC,LO,GO,NO>(flag,nodesRefConfig, params);
24 Teuchos::RCP<AssembleFE_Laplace<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_Laplace<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
25 assembleFE = assembleFESpecific;
26 }
27 else if (problemType == "NonLinearLaplace") {
28 Teuchos::RCP<AssembleFENonLinLaplace<SC, LO, GO, NO>> assembleFESpecific(new AssembleFENonLinLaplace<SC, LO, GO, NO>(flag, nodesRefConfig,
29 params, tuple));
30 assembleFE = assembleFESpecific;
31 }
32 else if(problemType == "NavierStokes"){
33 Teuchos::RCP<AssembleFENavierStokes<SC,LO,GO,NO>> assembleFESpecific(new AssembleFENavierStokes<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
34 assembleFE = assembleFESpecific;
35 }
36 else if(problemType == "GeneralizedNewtonian"){
37 Teuchos::RCP<AssembleFEGeneralizedNewtonian<SC,LO,GO,NO>> assembleFESpecific(new AssembleFEGeneralizedNewtonian<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
38 assembleFE = assembleFESpecific;
39 }
40 else if(problemType == "LinearElasticity"){
41 Teuchos::RCP<AssembleFE_LinElas<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_LinElas<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
42 assembleFE = assembleFESpecific;
43 }
44 else if(problemType == "NonLinearElasticity"){
45 Teuchos::RCP<AssembleFE_NonLinElas<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_NonLinElas<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
46 assembleFE = assembleFESpecific;
47 }
48 else if(problemType == "NonLinearElasticity2"){
49 Teuchos::RCP<AssembleFE_NonLinElas2<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_NonLinElas2<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
50 assembleFE = assembleFESpecific;
51 }
52 else if(problemType == "SCI_NH"){
53 Teuchos::RCP<AssembleFE_SCI_NH<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_SCI_NH<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
54 assembleFE = assembleFESpecific;
55 }
56 // Structure interaction model established by Klemens Uhlmann
57 else if(problemType == "SCI_SMC_MLCK"){
58 Teuchos::RCP<AssembleFE_SCI_SMC_MLCK<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_SCI_SMC_MLCK<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
59 assembleFE = assembleFESpecific;
60 }
61 else if(problemType == "SCI_SMC_Active_Growth_Reorientation"){
62 Teuchos::RCP<AssembleFE_SCI_SMC_Active_Growth_Reorientation<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_SCI_SMC_Active_Growth_Reorientation<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
63 assembleFE = assembleFESpecific;
64 }
65 else
66 TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "No specific implementation for your request.");
67
68
69 return assembleFE;
70};
71
72}
73#endif
AssembleFEFactory()
Constructor.
Definition AssembleFEFactory_def.hpp:10
AssembleFEPtr_Type build(std::string problemType, int flag, vec2D_dbl_Type nodesRefConfig, ParameterListPtr_Type params, tuple_disk_vec_ptr_Type tuple)
We only need this one function to build assembleFE, where we define the problem type and the Assemble...
Definition AssembleFEFactory_def.hpp:16
Definition AssembleFEGeneralizedNewtonian_decl.hpp:21
Definition AssembleFENavierStokes_decl.hpp:13
Definition AssembleFENonLinLaplace_decl.hpp:14
Definition AssembleFE_Laplace_decl.hpp:21
Definition AssembleFE_LinElas_decl.hpp:12
Definition AssembleFE_NonLinElas2_decl.hpp:12
Definition AssembleFE_NonLinElas_decl.hpp:12
Definition AssembleFE_SCI_NH_decl.hpp:12
Definition AssembleFE_SCI_SMC_Active_Growth_Reorientation_decl.hpp:29
Definition AssembleFE_SCI_SMC_MLCK_decl.hpp:24
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5