Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
AssembleFEFactory_def.hpp
1#ifndef ASSEMBLEFEFACTORY_DEF_hpp
2#define ASSEMBLEFEFACTORY_DEF_hpp
3
4namespace FEDD {
5
6
7template <class SC, class LO, class GO, class NO>
11
12
13template <class SC, class LO, class GO, class NO>
14typename 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)
15{
16 AssembleFEPtr_Type assembleFE;
17
18 AssembleFEPtr_Type assembleFESpecific;
19
20 if(problemType == "Laplace"){
21 //AssembleFE_Laplace<SC,LO,GO,NO> assembleFESpecific = new AssembleFE_Laplace<SC,LO,GO,NO>(flag,nodesRefConfig, params);
22 Teuchos::RCP<AssembleFE_Laplace<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_Laplace<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
23 assembleFE = assembleFESpecific;
24 }
25 else if (problemType == "NonLinearLaplace") {
26 Teuchos::RCP<AssembleFENonLinLaplace<SC, LO, GO, NO>> assembleFESpecific(new AssembleFENonLinLaplace<SC, LO, GO, NO>(flag, nodesRefConfig,
27 params, tuple));
28 assembleFE = assembleFESpecific;
29 }
30 else if(problemType == "NavierStokes"){
31 Teuchos::RCP<AssembleFENavierStokes<SC,LO,GO,NO>> assembleFESpecific(new AssembleFENavierStokes<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
32 assembleFE = assembleFESpecific;
33 }
34 else if(problemType == "GeneralizedNewtonian"){
35 Teuchos::RCP<AssembleFEGeneralizedNewtonian<SC,LO,GO,NO>> assembleFESpecific(new AssembleFEGeneralizedNewtonian<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
36 assembleFE = assembleFESpecific;
37 }
38 else if(problemType == "LinearElasticity"){
39 Teuchos::RCP<AssembleFE_LinElas<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_LinElas<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
40 assembleFE = assembleFESpecific;
41 }
42 else if(problemType == "NonLinearElasticity"){
43 Teuchos::RCP<AssembleFE_NonLinElas<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_NonLinElas<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
44 assembleFE = assembleFESpecific;
45 }
46 else if(problemType == "NonLinearElasticity2"){
47 Teuchos::RCP<AssembleFE_NonLinElas2<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_NonLinElas2<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
48 assembleFE = assembleFESpecific;
49 }
50 else if(problemType == "SCI_NH"){
51 Teuchos::RCP<AssembleFE_SCI_NH<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_SCI_NH<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
52 assembleFE = assembleFESpecific;
53 }
54 // Structure interaction model established by Klemens Uhlmann
55 else if(problemType == "SCI_SMC_MLCK"){
56 Teuchos::RCP<AssembleFE_SCI_SMC_MLCK<SC,LO,GO,NO>> assembleFESpecific(new AssembleFE_SCI_SMC_MLCK<SC,LO,GO,NO>(flag,nodesRefConfig, params,tuple) );
57 assembleFE = assembleFESpecific;
58 }
59 else if(problemType == "SCI_SMC_Active_Growth_Reorientation"){
60 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) );
61 assembleFE = assembleFESpecific;
62 }
63 else
64 TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "AssembleFE for problem \"" + problemType + "\" is not implemented");
65
66
67 return assembleFE;
68};
69
70}
71#endif
AssembleFEFactory()
Constructor.
Definition AssembleFEFactory_def.hpp:8
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:14
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_decl.hpp:36