37class FE_ElementAssembly {
41 typedef Teuchos::RCP<Domain_Type> DomainPtr_Type;
42 typedef Teuchos::RCP<const Domain_Type> DomainConstPtr_Type;
43 typedef std::vector<DomainConstPtr_Type> DomainConstPtr_vec_Type;
45 typedef Teuchos::RCP<Mesh<SC,LO,GO,NO> > MeshPtr_Type;
47 typedef Teuchos::RCP<MeshUnstr_Type> MeshUnstrPtr_Type;
50 typedef Teuchos::RCP<Elements_Type> ElementsPtr_Type;
51 typedef Teuchos::RCP<const Elements_Type> ElementsConstPtr_Type;
54 typedef Teuchos::RCP<Matrix_Type> MatrixPtr_Type;
56 typedef typename Matrix_Type::MapPtr_Type MapPtr_Type;
57 typedef typename Matrix_Type::MapConstPtr_Type MapConstPtr_Type;
60 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
61 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorConstPtr_Type;
63 typedef std::vector<GO> vec_GO_Type;
64 typedef std::vector<vec_GO_Type> vec2D_GO_Type;
65 typedef std::vector<vec2D_GO_Type> vec3D_GO_Type;
66 typedef Teuchos::RCP<vec3D_GO_Type> vec3D_GO_ptr_Type;
69 typedef Teuchos::RCP<AssembleFE_Type> AssembleFEPtr_Type;
72 typedef Teuchos::RCP<AssembleFENavierStokes_Type> AssembleFENavierStokesPtr_Type;
75 typedef Teuchos::RCP<AssembleFEGeneralizedNewtonian_Type> AssembleFEGeneralizedNewtonianPtr_Type;
78 typedef Teuchos::RCP<AssembleFE_SCI_SMC_Active_Growth_Reorientation_Type> AssembleFE_SCI_SMC_Active_Growth_Reorientation_Ptr_Type;
80 typedef std::vector<AssembleFEPtr_Type> AssembleFEPtr_vec_Type;
83 typedef Teuchos::RCP<BlockMatrix_Type> BlockMatrixPtr_Type;
86 typedef Teuchos::RCP<BlockMultiVector_Type> BlockMultiVectorPtr_Type;
89 typedef Teuchos::RCP<SmallMatrix_Type> SmallMatrixPtr_Type;
93 FE_ElementAssembly(
bool saveAssembly=
false);
95 void addFE(DomainConstPtr_Type domain);
97 void doSetZeros(
double eps = 10*Teuchos::ScalarTraits<SC>::eps());
99 void assemblyEmptyMatrix(MatrixPtr_Type &A);
102 int dim, std::string FEType,
int degree, MultiVectorPtr_Type u_rep,
103 BlockMatrixPtr_Type &A, BlockMultiVectorPtr_Type &resVec,
104 ParameterListPtr_Type params, std::string assembleMode,
105 bool callFillComplete =
true,
int FELocExternal = -1);
109 std::string FETypeVelocity,
110 std::string FETypePressure,
114 MultiVectorPtr_Type u_rep,
115 MultiVectorPtr_Type p_rep,
116 BlockMatrixPtr_Type &A,
117 BlockMultiVectorPtr_Type &resVec,
118 SmallMatrix_Type coeff,
119 ParameterListPtr_Type params,
121 std::string assembleMode,
122 bool callFillComplete =
true,
123 int FELocExternal=-1);
129 BlockMatrixPtr_Type &A,
130 bool callFillComplete,
131 int FELocExternal=-1);
134 std::string FETypeChem,
135 std::string FETypeSolid,
139 MultiVectorPtr_Type c_rep,
140 MultiVectorPtr_Type d_rep,
141 BlockMatrixPtr_Type &A,
142 BlockMultiVectorPtr_Type &resVec,
143 ParameterListPtr_Type params,
144 std::string assembleMode,
145 bool callFillComplete =
true,
146 int FELocExternal=-1);
149 std::string FETypeChem,
150 std::string FETypeSolid,
154 MultiVectorPtr_Type c_rep,
155 MultiVectorPtr_Type d_rep,
156 BlockMatrixPtr_Type &A,
159 BlockMultiVectorPtr_Type &resVec,
161 ParameterListPtr_Type params,
162 std::string assembleMode,
163 bool callFillComplete =
true,
164 int FELocExternal=-1);
166 void advanceInTimeAssemblyFEElements(
double dt ,MultiVectorPtr_Type d_rep , MultiVectorPtr_Type c_rep)
173 ElementsPtr_Type elementsSolid = domainVec_.at(FElocSolid)->getElementsC();
175 vec_dbl_Type solution_c;
176 vec_dbl_Type solution_d;
177 for (UN T=0; T<assemblyFEElements_.size(); T++) {
178 vec_dbl_Type solution(0);
180 solution_c =
getSolution(elementsSolid->getElement(T).getVectorNodeList(), c_rep,1);
181 solution_d =
getSolution(elementsSolid->getElement(T).getVectorNodeList(), d_rep,3);
183 solution.insert( solution.end(), solution_d.begin(), solution_d.end() );
184 solution.insert( solution.end(), solution_c.begin(), solution_c.end() );
186 assemblyFEElements_[T]->updateSolution(solution);
188 assemblyFEElements_[T]->advanceInTime(dt);
197 MultiVectorPtr_Type d_rep,
198 BlockMatrixPtr_Type &A,
199 BlockMultiVectorPtr_Type &resVec,
200 ParameterListPtr_Type params,
202 std::string assembleMode,
203 bool callFillComplete=
true,
204 int FELocExternal=-1);
210 MultiVectorPtr_Type d_rep,
211 BlockMatrixPtr_Type &A,
212 BlockMultiVectorPtr_Type &resVec,
213 ParameterListPtr_Type params,
214 bool callFillComplete=
true,
215 int FELocExternal=-1);
221 MultiVectorPtr_Type d_rep,
222 BlockMatrixPtr_Type &A,
223 BlockMultiVectorPtr_Type &resVec,
224 ParameterListPtr_Type params,
225 DomainConstPtr_Type domain,
226 MultiVectorPtr_Type eModVec,
227 bool callFillComplete =
true,
228 int FELocExternal=-1);
236 std::string FETypeVelocity,
237 std::string FETypePressure,
240 MultiVectorPtr_Type u_rep,
241 MultiVectorPtr_Type p_rep,
242 ParameterListPtr_Type params);
249 BlockMultiVectorPtr_Type const_output_fields;
251 DomainConstPtr_vec_Type domainVec_;
264 vec2D_dbl_Type
getCoordinates(vec_LO_Type localIDs, vec2D_dbl_ptr_Type points);
265 vec_dbl_Type
getSolution(vec_LO_Type localIDs, MultiVectorPtr_Type u_rep,
int dofsVelocity);
271 void addFeBlockMatrix(BlockMatrixPtr_Type &A, SmallMatrixPtr_Type elementMatrix,
FiniteElement element1,
FiniteElement element2, MapConstPtr_Type mapFirstColumn,MapConstPtr_Type mapSecondColumn, tuple_disk_vec_ptr_Type problemDisk);
273 void addFeBlock(BlockMatrixPtr_Type &A, SmallMatrixPtr_Type elementMatrix,
FiniteElement element, MapConstPtr_Type mapFirstRow,
int row,
int column, tuple_disk_vec_ptr_Type problemDisk);
275 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);
277 void addFeBlockMv(BlockMultiVectorPtr_Type &res, vec_dbl_ptr_Type rhsVec,
FiniteElement elementBlock1,
FiniteElement elementBlock2,
int dofs1,
int dofs2 );
279 void addFeBlockMv(BlockMultiVectorPtr_Type &res, vec_dbl_ptr_Type rhsVec,
FiniteElement elementBlock,
int dofs);
282 AssembleFEPtr_vec_Type assemblyFEElements_;