Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_STK_PeriodicBC_Parser.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Panzer: A partial differential equation assembly
4// engine for strongly coupled complex multiphysics systems
5//
6// Copyright 2011 NTESS and the Panzer contributors.
7// SPDX-License-Identifier: BSD-3-Clause
8// *****************************************************************************
9// @HEADER
10
11#ifndef __Panzer_STK_PeriodicBC_Parser_hpp__
12#define __Panzer_STK_PeriodicBC_Parser_hpp__
13
15
16#include "Teuchos_ParameterList.hpp"
17#include "Teuchos_ParameterListAcceptor.hpp"
18#include "Teuchos_RCP.hpp"
19
20#include <vector>
21#include <string>
22
23namespace panzer_stk {
24
29class PeriodicBC_Parser : Teuchos::ParameterListAcceptor {
30public:
32
35 const std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > &
36 getMatchers() const;
37
40 const bool & useBoundingBoxSearch() const;
41
42 // parameterlistacceptor required functions
44 void setParameterList(const Teuchos::RCP<Teuchos::ParameterList> & pl);
45
46 Teuchos::RCP<Teuchos::ParameterList> getNonconstParameterList();
47
48 Teuchos::RCP<Teuchos::ParameterList> unsetParameterList();
49
50 Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const;
51
52 // specific to this class
54
60 Teuchos::RCP<Teuchos::ParameterList> getValidParameters(int count) const;
61
67 Teuchos::RCP<const PeriodicBC_MatcherBase>
68 buildMatcher(const std::string & buildStr) const;
69
74 std::pair<std::string, unsigned int> getMatcherTypeAndDim(const std::string & buildStr) const;
75
79 std::string replaceMatcherType(const std::string & buildStr, const std::string & matcherType) const;
80
84 void buildMatcher_Tokenize(const std::string & buildStr,
85 std::string & matcher,
86 std::string & bndry1,
87 std::string & bndry2) const;
88
95 bool buildMatcher_Tokenize_withParams(const std::string & buildStr,
96 std::string & matcher,
97 std::vector<std::string> & params,
98 std::string & bndry1,
99 std::string & bndry2) const;
100private:
102 Teuchos::RCP<Teuchos::ParameterList> storedPL_;
103
105 std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > matchers_;
106 std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > edgeMatchers_;
107 std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > faceMatchers_;
108
109 // stored string values
110 const std::string countStr_;
111 const std::string condPrefix_;
112 const std::string searchStr_;
113
114 // stored flag indicating if bounding box search is used for periodic DOF matching
116};
117
118}
119
120#endif
const std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > & getMatchers() const
std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > edgeMatchers_
std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > matchers_
matchers constructed by "setParameterList"
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
std::pair< std::string, unsigned int > getMatcherTypeAndDim(const std::string &buildStr) const
Teuchos::RCP< const PeriodicBC_MatcherBase > buildMatcher(const std::string &buildStr) const
std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > faceMatchers_
std::string replaceMatcherType(const std::string &buildStr, const std::string &matcherType) const
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
bool buildMatcher_Tokenize_withParams(const std::string &buildStr, std::string &matcher, std::vector< std::string > &params, std::string &bndry1, std::string &bndry2) const
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl)
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Teuchos::RCP< Teuchos::ParameterList > storedPL_
stored parameter list
void buildMatcher_Tokenize(const std::string &buildStr, std::string &matcher, std::string &bndry1, std::string &bndry2) const