43 #ifndef __Panzer_STK_PeriodicBC_Matcher_hpp__
44 #define __Panzer_STK_PeriodicBC_Matcher_hpp__
46 #include "Teuchos_Tuple.hpp"
50 #include "PanzerAdaptersSTK_config.hpp"
53 namespace panzer_stk {
59 namespace periodic_helpers {
65 template <
typename Matcher>
68 const STK_Interface & mesh,
69 const Matcher & matcher,
const std::string type_ =
"coord");
71 template <
typename Matcher>
74 const STK_Interface & mesh,
75 const Matcher & matcher,
76 const std::vector<std::pair<std::size_t,std::size_t> > & current,
const std::string type_ =
"coord");
81 std::pair<Teuchos::RCP<std::vector<std::size_t> >,
84 const std::string & sideName,
const std::string type_ =
"coord");
89 std::pair<Teuchos::RCP<std::vector<std::size_t> >,
92 const std::string & sideName,
const std::string type_ =
"coord");
99 const std::string & sideName,
const std::string type_ =
"coord");
105 template <
typename Matcher>
109 const STK_Interface & mesh,
110 const std::string & sideName,
const Matcher & matcher,
const std::string type_ =
"coord");
123 const std::vector<std::pair<std::size_t,std::size_t> > & locallyMatchedIds,
124 const STK_Interface & mesh,
bool failure);
153 const Teuchos::RCP<
const std::vector<std::pair<std::size_t,std::size_t> > > & currentState = Teuchos::null
159 virtual std::string
getString()
const = 0;
164 virtual std::string
getType()
const = 0;
174 const T*
getAs()
const {
return dynamic_cast<const T*
>(
this);}
182 template <
typename Matcher>
185 PeriodicBC_Matcher(
const std::string & left,
const std::string & right,
const Matcher & matcher,
const std::string type =
"coord")
202 const Teuchos::RCP<
const std::vector<std::pair<std::size_t,std::size_t> > > & currentState = Teuchos::null
205 if(currentState==Teuchos::null)
213 std::stringstream ss;
214 ss <<
"condition: " <<
matcher_.getString() <<
", sides = [ "
215 <<
"\"" <<
left_ <<
"\", "
216 <<
"\"" <<
right_ <<
"\" ]";
248 template <
typename Matcher>
250 buildPeriodicBC_Matcher(
const std::string & left,
const std::string & right,
const Matcher & matcher,
const std::string type =
"coord")
PeriodicBC_Matcher(const std::string &left, const std::string &right, const Matcher &matcher, const std::string type="coord")
virtual ~PeriodicBC_MatcherBase()
const Matcher & getMatcher() const
Teuchos::RCP< std::vector< std::size_t > > getLocalSideIds(const STK_Interface &mesh, const std::string &sideName, const std::string type_)
Teuchos::RCP< std::vector< std::pair< std::size_t, std::size_t > > > matchPeriodicSides(const std::string &left, const std::string &right, const STK_Interface &mesh, const Matcher &matcher, const std::string type_="coord")
virtual std::string getString() const =0
PeriodicBC_Matcher(const PeriodicBC_Matcher &src)
std::pair< Teuchos::RCP< std::vector< std::size_t > >, Teuchos::RCP< std::vector< Teuchos::Tuple< double, 3 > > > > getLocalSideIdsAndCoords(const STK_Interface &mesh, const std::string &sideName, const std::string type_)
std::string getLeftSidesetName() const
Returns the sideset name for the left side.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual std::string getLeftSidesetName() const =0
Returns the sideset name for the left side.
std::string getString() const
Teuchos::RCP< PeriodicBC_MatcherBase > buildPeriodicBC_Matcher(const std::string &left, const std::string &right, const Matcher &matcher, const std::string type="coord")
std::string getType() const
Teuchos::RCP< std::vector< std::pair< std::size_t, std::size_t > > > getGlobalPairing(const std::vector< std::size_t > &locallyRequiredIds, const std::vector< std::pair< std::size_t, std::size_t > > &locallyMatchedIds, const STK_Interface &mesh, bool failure)
virtual std::string getRightSidesetName() const =0
Returns the sideset name for the right side.
Teuchos::RCP< std::vector< std::pair< std::size_t, std::size_t > > > getMatchedPair(const STK_Interface &mesh, const Teuchos::RCP< const std::vector< std::pair< std::size_t, std::size_t > > > ¤tState=Teuchos::null) const
virtual std::string getType() const =0
virtual Teuchos::RCP< std::vector< std::pair< std::size_t, std::size_t > > > getMatchedPair(const STK_Interface &mesh, const Teuchos::RCP< const std::vector< std::pair< std::size_t, std::size_t > > > ¤tState=Teuchos::null) const =0
std::string getRightSidesetName() const
Returns the sideset name for the right side.
std::pair< Teuchos::RCP< std::vector< std::size_t > >, Teuchos::RCP< std::vector< Teuchos::Tuple< double, 3 > > > > getSideIdsAndCoords(const STK_Interface &mesh, const std::string &sideName, const std::string type_)
Teuchos::RCP< std::vector< std::pair< std::size_t, std::size_t > > > getLocallyMatchedSideIds(const std::vector< std::size_t > &side_ids, const std::vector< Teuchos::Tuple< double, 3 > > &side_coords, const STK_Interface &mesh, const std::string &sideName, const Matcher &matcher, const std::string type_="coord")
const T * getAs() const
Attempts to cast the underlying matcher to type T. Returns nullptr if cast fails. ...