7 #ifndef __BCMANAGER_HPP__
8 #define __BCMANAGER_HPP__
37 struct BCs : boost::enable_shared_from_this<BCs> {
42 using DofsView = std::vector<boost::weak_ptr<NumeredDofEntity>>;
45 boost::shared_ptr<DisplacementCubitBcData>
dispBcPtr;
46 boost::shared_ptr<TemperatureCubitBcData>
tempBcPtr;
53 return boost::shared_ptr<Range>(shared_from_this(), &
bcEnts);
57 return boost::shared_ptr<Range>(shared_from_this(), &
bcEnts);
61 return boost::shared_ptr<std::vector<unsigned char>>(shared_from_this(),
75 bool get_low_dim_ents =
false,
76 bool block_name_field_prefix =
false,
77 bool is_distributed_mesh =
false);
90 const std::string block_name,
106 const std::string block_name,
109 bool is_distributed_mesh =
true);
124 const std::string block_name,
126 int hi,
bool get_low_dim_ents =
true,
127 bool is_distributed_mesh =
true);
142 const std::string block_name,
144 int hi,
bool get_low_dim_ents =
true);
157 template <
typename T>
160 bool get_low_dim_ents =
true,
161 bool block_name_field_prefix =
false,
162 bool is_distributed_mesh =
true);
173 template <
typename T>
176 bool get_low_dim_ents =
true,
177 bool block_name_field_prefix =
false);
190 template <
typename T>
192 const std::string block_name,
194 bool get_low_dim_ents =
true,
195 bool is_distributed_mesh =
true);
206 template <
typename T>
208 const std::string block_name,
210 bool get_low_dim_ents =
true);
227 using BcMarkerPtr = boost::shared_ptr<std::vector<char unsigned>>;
260 std::vector<std::regex> reg_vec(bc_names.size());
261 for (
int i = 0;
i != bc_names.size(); ++
i) {
262 auto full_name = std::string(
"(.*)_") + bc_names[
i] + std::string(
"(.*)");
263 reg_vec[
i] = std::regex(full_name);
282 std::vector<std::regex> reg_vec(bc_names.size());
283 for (
int i = 0;
i != bc_names.size(); ++
i) {
284 auto full_name = std::string(
"(.*)_") + bc_names[
i] + std::string(
"(.*)");
285 reg_vec[
i] = std::regex(full_name);
296 const std::vector<BcMarkerPtr> &boundary_markers_ptr_vec);
305 inline auto checkBlock(
const std::pair<
string, boost::shared_ptr<BCs>> &bc,
307 return std::regex_match(bc.first, reg);
317 checkBlock(
const std::pair<std::string, boost::shared_ptr<BCs>> &bc,
319 auto full_name = std::string(
"(.*)_") + name + std::string(
"(.*)");
336 getBlockIS(
const std::string block_prefix,
const std::string block_name,
337 const std::string
field_name,
const std::string problem_name,
352 getBlockIS(
const std::string problem_name,
const std::string block_name,
363 static std::pair<std::string, std::string>
365 const std::string prb_name);
375 BcManager::removeBlockDOFsOnEntities<BcMeshsetType<DISPLACEMENTSET>>(
376 const std::string problem_name,
const std::string
field_name,
377 bool get_low_dim_ents,
bool block_name_field_prefix,
378 bool is_distributed_mesh);
382 BcManager::removeBlockDOFsOnEntities<BcMeshsetType<TEMPERATURESET>>(
383 const std::string problem_name,
const std::string
field_name,
384 bool get_low_dim_ents,
bool block_name_field_prefix,
385 bool is_distributed_mesh);
388 MoFEMErrorCode BcManager::removeBlockDOFsOnEntities<BcMeshsetType<HEATFLUXSET>>(
389 const std::string problem_name,
const std::string
field_name,
390 bool get_low_dim_ents,
bool block_name_field_prefix,
391 bool is_distributed_mesh);
395 BcManager::removeBlockDOFsOnEntities<BcDisplacementMeshsetType<BLOCKSET>>(
396 const std::string problem_name,
const std::string
field_name,
397 bool get_low_dim_ents,
bool block_name_field_prefix,
398 bool is_distributed_mesh);
402 BcManager::removeBlockDOFsOnEntities<BcScalarMeshsetType<BLOCKSET>>(
403 const std::string problem_name,
const std::string block_name,
404 const std::string
field_name,
bool get_low_dim_ents,
405 bool is_distributed_mesh);
409 BcManager::pushMarkDOFsOnEntities<BcMeshsetType<DISPLACEMENTSET>>(
410 const std::string problem_name,
const std::string
field_name,
411 bool get_low_dim_ents,
bool block_name_field_prefix);
414 MoFEMErrorCode BcManager::pushMarkDOFsOnEntities<BcMeshsetType<TEMPERATURESET>>(
415 const std::string problem_name,
const std::string
field_name,
416 bool get_low_dim_ents,
bool block_name_field_prefix);
419 MoFEMErrorCode BcManager::pushMarkDOFsOnEntities<BcMeshsetType<HEATFLUXSET>>(
420 const std::string problem_name,
const std::string
field_name,
421 bool get_low_dim_ents,
bool block_name_field_prefix);
425 BcManager::pushMarkDOFsOnEntities<BcDisplacementMeshsetType<BLOCKSET>>(
426 const std::string problem_name,
const std::string
field_name,
427 bool get_low_dim_ents,
bool block_name_field_prefix);
430 MoFEMErrorCode BcManager::pushMarkDOFsOnEntities<BcScalarMeshsetType<BLOCKSET>>(
431 const std::string problem_name,
const std::string
field_name,
432 const std::string block_name,
bool get_low_dim_ents);
435 MoFEMErrorCode BcManager::pushMarkDOFsOnEntities<DisplacementCubitBcData>(
436 const std::string problem_name,
const std::string
field_name,
437 bool get_low_dim_ents,
bool block_name_field_prefix);
440 MoFEMErrorCode BcManager::removeBlockDOFsOnEntities<DisplacementCubitBcData>(
441 const std::string problem_name,
const std::string
field_name,
442 bool get_low_dim_ents,
bool block_name_field_prefix,
443 bool is_distributed_mesh);
446 MoFEMErrorCode BcManager::pushMarkDOFsOnEntities<TemperatureCubitBcData>(
447 const std::string problem_name,
const std::string
field_name,
448 bool get_low_dim_ents,
bool block_name_field_prefix);
451 MoFEMErrorCode BcManager::removeBlockDOFsOnEntities<TemperatureCubitBcData>(
452 const std::string problem_name,
const std::string
field_name,
453 bool get_low_dim_ents,
bool block_name_field_prefix,
454 bool is_distributed_mesh);
457 MoFEMErrorCode BcManager::pushMarkDOFsOnEntities<HeatFluxCubitBcData>(
458 const std::string problem_name,
const std::string
field_name,
459 bool get_low_dim_ents,
bool block_name_field_prefix);
462 MoFEMErrorCode BcManager::removeBlockDOFsOnEntities<HeatFluxCubitBcData>(
463 const std::string problem_name,
const std::string
field_name,
464 bool get_low_dim_ents,
bool block_name_field_prefix,
465 bool is_distributed_mesh);
468 MoFEMErrorCode BcManager::pushMarkDOFsOnEntities<BcMeshsetType<FORCESET>>(
469 const std::string problem_name,
const std::string
field_name,
470 bool get_low_dim_ents,
bool block_name_field_prefix);
473 MoFEMErrorCode BcManager::pushMarkDOFsOnEntities<BcForceMeshsetType<BLOCKSET>>(
474 const std::string problem_name,
const std::string
field_name,
475 bool get_low_dim_ents,
bool block_name_field_prefix);
478 MoFEMErrorCode BcManager::pushMarkDOFsOnEntities<ForceCubitBcData>(
479 const std::string problem_name,
const std::string
field_name,
480 bool get_low_dim_ents,
bool block_name_field_prefix);
483 MoFEMErrorCode BcManager::removeBlockDOFsOnEntities<BcMeshsetType<FORCESET>>(
484 const std::string problem_name,
const std::string
field_name,
485 bool get_low_dim_ents,
bool block_name_field_prefix,
486 bool is_distributed_mesh);
490 BcManager::removeBlockDOFsOnEntities<BcForceMeshsetType<BLOCKSET>>(
491 const std::string problem_name,
const std::string
field_name,
492 bool get_low_dim_ents,
bool block_name_field_prefix,
493 bool is_distributed_mesh);
496 MoFEMErrorCode BcManager::removeBlockDOFsOnEntities<ForceCubitBcData>(
497 const std::string problem_name,
const std::string
field_name,
498 bool get_low_dim_ents,
bool block_name_field_prefix,
499 bool is_distributed_mesh);
503 #endif //__BCMANAGER_HPP__