13 #ifndef __NAVIERSTOKESELEMENT_HPP__
14 #define __NAVIERSTOKESELEMENT_HPP__
16 #ifndef __BASICFINITEELEMENTS_HPP__
18 #endif // __BASICFINITEELEMENTS_HPP__
20 using namespace boost::numeric;
46 : iD(-1), fluidViscosity(-1), fluidDensity(-1), inertiaCoef(-1),
53 boost::shared_ptr<MatrixDouble>
velPtr;
71 gradVelPtr = boost::shared_ptr<MatrixDouble>(
new MatrixDouble());
72 velPtr = boost::shared_ptr<MatrixDouble>(
new MatrixDouble());
73 pressPtr = boost::shared_ptr<VectorDouble>(
new VectorDouble());
75 pressureDragTract = boost::shared_ptr<MatrixDouble>(
new MatrixDouble());
76 shearDragTract = boost::shared_ptr<MatrixDouble>(
new MatrixDouble());
77 totalDragTract = boost::shared_ptr<MatrixDouble>(
new MatrixDouble());
94 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"Problem",
"none");
96 ierr = PetscOptionsEnd();
130 const string element_name,
131 const string velocity_field_name,
132 const string pressure_field_name,
133 const string mesh_field_name,
135 Range *ents =
nullptr) {
141 velocity_field_name);
143 velocity_field_name);
145 velocity_field_name);
148 pressure_field_name);
150 pressure_field_name);
152 pressure_field_name);
157 if (ents !=
nullptr) {
182 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feRhs,
183 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feLhs,
184 const std::string velocity_field,
const std::string pressure_field,
185 boost::shared_ptr<CommonData> common_data,
const EntityType
type = MBTET);
202 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feRhs,
203 boost::shared_ptr<VolumeElementForcesAndSourcesCore> feLhs,
204 const std::string velocity_field,
const std::string pressure_field,
205 boost::shared_ptr<CommonData> common_data,
const EntityType
type = MBTET);
221 boost::shared_ptr<FaceElementForcesAndSourcesCore> dragFe,
222 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideDragFe,
223 std::string side_fe_name,
const std::string velocity_field,
224 const std::string pressure_field,
225 boost::shared_ptr<CommonData> common_data);
241 boost::shared_ptr<PostProcFace> postProcDragPtr,
242 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> sideDragFe,
243 std::string side_fe_name,
const std::string velocity_field,
244 const std::string pressure_field,
245 boost::shared_ptr<CommonData> common_data);
251 boost::shared_ptr<VolumeElementForcesAndSourcesCore> fe_flux_ptr,
252 const std::string velocity_field,
253 boost::shared_ptr<CommonData> common_data,
const EntityType
type = MBTET);
264 int operator()(
int order_row,
int order_col,
int order_data)
const {
265 return 2 * order_data;
270 int operator()(
int order_row,
int order_col,
int order_data)
const {
271 return order_data + 2;
293 boost::shared_ptr<CommonData> common_data,
297 commonData(common_data), blockData(block_data) {
299 diagonalBlock =
false;
302 MoFEMErrorCode doWork(
int row_side,
int col_side, EntityType row_type,
303 EntityType col_type,
EntData &row_data,
321 const string field_name_col,
322 boost::shared_ptr<CommonData> common_data,
327 diagonalBlock =
false;
343 const string field_name_col,
344 boost::shared_ptr<CommonData> common_data,
349 diagonalBlock =
true;
365 const string field_name_col,
366 boost::shared_ptr<CommonData> common_data,
371 diagonalBlock =
true;
390 boost::shared_ptr<CommonData> common_data,
393 commonData(common_data), blockData(block_data){};
421 boost::shared_ptr<CommonData> common_data,
450 boost::shared_ptr<CommonData> common_data,
469 boost::shared_ptr<CommonData> common_data,
496 boost::shared_ptr<CommonData> &common_data,
500 commonData(common_data), blockData(block_data) {
525 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide>
sideFe;
530 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> &side_fe,
531 std::string side_fe_name, boost::shared_ptr<CommonData> &common_data,
535 sideFe(side_fe), sideFeName(side_fe_name), commonData(common_data),
536 blockData(block_data) {
560 std::vector<EntityHandle> &map_gauss_pts,
561 boost::shared_ptr<CommonData> &common_data,
565 commonData(common_data), postProcMesh(post_proc_mesh),
566 mapGaussPts(map_gauss_pts), blockData(block_data) {
590 std::vector<EntityHandle> &map_gauss_pts,
591 boost::shared_ptr<CommonData> &common_data,
594 commonData(common_data), postProcMesh(post_proc_mesh),
595 mapGaussPts(map_gauss_pts), blockData(block_data) {
619 boost::shared_ptr<CommonData> common_data,
622 commonData(common_data), blockData(block_data){};
628 #endif //__NAVIERSTOKESELEMENT_HPP__