43 #ifndef __Panzer_STK_PeriodicBC_Matcher_hpp__ 44 #define __Panzer_STK_PeriodicBC_Matcher_hpp__ 46 #include "Teuchos_Tuple.hpp" 47 #include "Teuchos_RCP.hpp" 50 #include "PanzerAdaptersSTK_config.hpp" 59 namespace periodic_helpers {
65 template <
typename Matcher>
66 Teuchos::RCP<std::vector<std::pair<std::size_t,std::size_t> > >
68 const STK_Interface & mesh,
69 const Matcher & matcher,
const std::string type_ =
"coord");
71 template <
typename Matcher>
72 Teuchos::RCP<std::vector<std::pair<std::size_t,std::size_t> > >
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> >,
82 Teuchos::RCP<std::vector<Teuchos::Tuple<double,3> > > >
84 const std::string & sideName,
const std::string type_ =
"coord");
89 std::pair<Teuchos::RCP<std::vector<std::size_t> >,
90 Teuchos::RCP<std::vector<Teuchos::Tuple<double,3> > > >
92 const std::string & sideName,
const std::string type_ =
"coord");
97 Teuchos::RCP<std::vector<std::size_t> >
99 const std::string & sideName,
const std::string type_ =
"coord");
105 template <
typename Matcher>
106 Teuchos::RCP<std::vector<std::pair<std::size_t,std::size_t> > >
108 const std::vector<Teuchos::Tuple<double,3> > & side_coords,
109 const STK_Interface & mesh,
110 const std::string & sideName,
const Matcher & matcher,
const std::string type_ =
"coord");
121 Teuchos::RCP<std::vector<std::pair<std::size_t,std::size_t> > >
123 const std::vector<std::pair<std::size_t,std::size_t> > & locallyMatchedIds,
124 const STK_Interface & mesh,
bool failure);
151 Teuchos::RCP<std::vector<std::pair<std::size_t,std::size_t> > >
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;
172 template <
typename Matcher>
175 PeriodicBC_Matcher(
const std::string & left,
const std::string & right,
const Matcher & matcher,
const std::string type =
"coord")
190 Teuchos::RCP<std::vector<std::pair<std::size_t,std::size_t> > >
192 const Teuchos::RCP<
const std::vector<std::pair<std::size_t,std::size_t> > > & currentState = Teuchos::null
195 if(currentState==Teuchos::null)
203 std::stringstream ss;
204 ss <<
"condition: " <<
matcher_.getString() <<
", sides = [ " 205 <<
"\"" <<
left_ <<
"\", " 206 <<
"\"" <<
right_ <<
"\" ]";
231 template <
typename Matcher>
232 Teuchos::RCP<PeriodicBC_MatcherBase>
233 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()
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
std::string getType() const
PeriodicBC_Matcher(const PeriodicBC_Matcher &src)
PHX::MDField< ScalarT > vector
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 getString() const
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
Teuchos::RCP< PeriodicBC_MatcherBase > buildPeriodicBC_Matcher(const std::string &left, const std::string &right, const Matcher &matcher, const std::string type="coord")
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 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::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")