Panzer Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
panzer_stk::CoordMatcher Class Reference

#include <Panzer_STK_PeriodicBC_MatchConditions.hpp>

Public Member Functions

 CoordMatcher (int index)
 Constructor where the index is the coordinate axis that will be compared to find matching nodes.
 
 CoordMatcher (int index, double error)
 Construct with an explicit absolute tolerance.
 
 CoordMatcher (int index, const std::vector< std::string > &params)
 Construct with tolerance and "relative" option parsed from strings, as accepted by parseParams().
 
 CoordMatcher (const CoordMatcher &cm)
 Copy constructor.
 
bool operator() (const Teuchos::Tuple< double, 3 > &a, const Teuchos::Tuple< double, 3 > &b) const
 Returns true if points a and b match, i.e. their coordinates in the compared direction are within tolerance.
 
std::string getString () const
 Returns a human-readable description of this matcher's compared coordinate and tolerance.
 
int getIndex () const
 Returns the coordinate axis/direction being compared.
 
int getPeriodicDirection () const
 Returns the direction (0=x, 1=y) in which the boundary condition is periodic; the direction orthogonal to the compared coordinate. Asserts for a z-direction matcher (3D requires PlaneMatcher instead).
 
double getAbsoluteTolerance () const
 Returns the absolute matching tolerance.
 
void transform (double *ptB, const std::vector< double > &centroidA) const
 Shifts ptB's periodic-direction coordinate to match centroidA's, in place.
 

Private Member Functions

void buildLabels ()
 
void parseParams (const std::vector< std::string > &params)
 

Private Attributes

double error_
 
int index_
 
bool relative_
 
char labels_ [3]
 

Detailed Description

Match coordinates that share the same point on a line that is axis aligned

Definition at line 23 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

Constructor & Destructor Documentation

◆ CoordMatcher() [1/4]

panzer_stk::CoordMatcher::CoordMatcher ( int  index)
inline

Constructor where the index is the coordinate axis that will be compared to find matching nodes.

Definition at line 53 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ CoordMatcher() [2/4]

panzer_stk::CoordMatcher::CoordMatcher ( int  index,
double  error 
)
inline

Construct with an explicit absolute tolerance.

Definition at line 55 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ CoordMatcher() [3/4]

panzer_stk::CoordMatcher::CoordMatcher ( int  index,
const std::vector< std::string > &  params 
)
inline

Construct with tolerance and "relative" option parsed from strings, as accepted by parseParams().

Definition at line 57 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ CoordMatcher() [4/4]

panzer_stk::CoordMatcher::CoordMatcher ( const CoordMatcher cm)
inline

Copy constructor.

Definition at line 61 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

Member Function Documentation

◆ buildLabels()

void panzer_stk::CoordMatcher::buildLabels ( )
inlineprivate

Definition at line 29 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ parseParams()

void panzer_stk::CoordMatcher::parseParams ( const std::vector< std::string > &  params)
inlineprivate

Definition at line 32 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ operator()()

bool panzer_stk::CoordMatcher::operator() ( const Teuchos::Tuple< double, 3 > &  a,
const Teuchos::Tuple< double, 3 > &  b 
) const
inline

Returns true if points a and b match, i.e. their coordinates in the compared direction are within tolerance.

Definition at line 64 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ getString()

std::string panzer_stk::CoordMatcher::getString ( ) const
inline

Returns a human-readable description of this matcher's compared coordinate and tolerance.

Definition at line 74 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ getIndex()

int panzer_stk::CoordMatcher::getIndex ( ) const
inline

Returns the coordinate axis/direction being compared.

Definition at line 82 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ getPeriodicDirection()

int panzer_stk::CoordMatcher::getPeriodicDirection ( ) const
inline

Returns the direction (0=x, 1=y) in which the boundary condition is periodic; the direction orthogonal to the compared coordinate. Asserts for a z-direction matcher (3D requires PlaneMatcher instead).

Definition at line 85 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ getAbsoluteTolerance()

double panzer_stk::CoordMatcher::getAbsoluteTolerance ( ) const
inline

Returns the absolute matching tolerance.

Definition at line 96 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ transform()

void panzer_stk::CoordMatcher::transform ( double *  ptB,
const std::vector< double > &  centroidA 
) const
inline

Shifts ptB's periodic-direction coordinate to match centroidA's, in place.

Definition at line 99 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

Member Data Documentation

◆ error_

double panzer_stk::CoordMatcher::error_
private

Definition at line 24 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ index_

int panzer_stk::CoordMatcher::index_
private

Definition at line 25 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ relative_

bool panzer_stk::CoordMatcher::relative_
private

Definition at line 26 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ labels_

char panzer_stk::CoordMatcher::labels_[3]
private

Definition at line 27 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.


The documentation for this class was generated from the following file: