-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#180 New meshGenerator to break mesh along sidesets of any shape (as …
…opposed to UnterfaceFromSidesetGenerator only working with linear sidesets) First draft (with lots of cleaning to do...)
- Loading branch information
Showing
19 changed files
with
1,271 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/****************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* REDBACK - Rock mEchanics with Dissipative feedBACKs */ | ||
/* */ | ||
/* (c) 2019 CSIRO */ | ||
/* ALL RIGHTS RESERVED */ | ||
/* */ | ||
/* Prepared by CSIRO */ | ||
/* */ | ||
/* See COPYRIGHT for full restrictions */ | ||
/****************************************************************/ | ||
#pragma once | ||
|
||
#include "BreakMeshByBlockGeneratorBase.h" | ||
|
||
class BreakMeshBySidesetGenerator; | ||
|
||
template <> | ||
InputParameters validParams<BreakMeshBySidesetGenerator>(); | ||
|
||
class BreakMeshBySidesetGenerator : public BreakMeshByBlockGeneratorBase | ||
{ | ||
public: | ||
BreakMeshBySidesetGenerator(const InputParameters & parameters); | ||
|
||
std::unique_ptr<MeshBase> generate() override; | ||
|
||
protected: | ||
std::unique_ptr<MeshBase> & _input; | ||
|
||
private: | ||
/// find interface name and ID | ||
void findInterfaceNameAndInd(MeshBase & mesh, | ||
const std::string & sideset_name, | ||
std::string & boundaryName, | ||
boundary_id_type & boundaryID, | ||
BoundaryInfo & boundary_info); | ||
/// generate the new boundary interface | ||
void addInterfaceBoundary(MeshBase & mesh); | ||
/// get string representing "color" | ||
std::string getColorString( | ||
std::map<boundary_id_type, bool> &, | ||
std::set<boundary_id_type> &); | ||
/// assign "color" of neighbor element | ||
void assignNeighborColor( | ||
const Elem*, | ||
const Elem*, | ||
std::set<dof_id_type> &, | ||
bool, | ||
std::map<dof_id_type, std::map<boundary_id_type, bool>> &, | ||
const Node &, | ||
std::set<dof_id_type> &, | ||
std::set<dof_id_type> &, | ||
boundary_id_type, | ||
std::set<dof_id_type> &, | ||
std::set<dof_id_type> &); | ||
|
||
std::set<std::pair<subdomain_id_type, subdomain_id_type>> _neighboring_block_list; | ||
std::map<std::pair<subdomain_id_type, subdomain_id_type>, | ||
std::set<std::pair<dof_id_type, unsigned int>>> | ||
_new_boundary_sides_map; | ||
|
||
/// The sidesets on which to transform to interfaces | ||
std::vector<BoundaryName> _sidesets; | ||
/// The sidesets delimiting the border of the whole mesh | ||
std::vector<BoundaryName> _boundaries; | ||
|
||
std::map<std::string, std::set<std::pair<dof_id_type, unsigned int>>> | ||
_new_boundary_sides_map2; | ||
|
||
}; |
Oops, something went wrong.