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

#include <Panzer_STK_PeriodicBC_MatchConditions.hpp>

Public Member Functions

 PlaneMatcher (int index0, int index1)
 index0 and index1 are the two coordinate directions defining the plane compared to find matching nodes.
 
 PlaneMatcher (int index0, int index1, double error)
 Construct with an explicit absolute tolerance.
 
 PlaneMatcher (int index0, int index1, const std::vector< std::string > &params)
 Construct with tolerance and "relative" option parsed from strings, as accepted by parseParams().
 
 PlaneMatcher (const PlaneMatcher &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 both compared directions are within tolerance.
 
std::string getString () const
 Returns a human-readable description of this matcher's compared coordinates and tolerance.
 
int getIndex0 () const
 Returns the first coordinate direction being compared.
 
int getIndex1 () const
 Returns the second coordinate direction being compared.
 
int getPeriodicDirection () const
 Returns the direction orthogonal to the compared plane, in which the boundary condition is periodic.
 
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 index0_
 
int index1_
 
bool relative_
 
char labels_ [3]
 

Detailed Description

Match coordinates at the same point on a plane

Definition at line 115 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

Constructor & Destructor Documentation

◆ PlaneMatcher() [1/4]

panzer_stk::PlaneMatcher::PlaneMatcher ( int  index0,
int  index1 
)
inline

index0 and index1 are the two coordinate directions defining the plane compared to find matching nodes.

Definition at line 152 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ PlaneMatcher() [2/4]

panzer_stk::PlaneMatcher::PlaneMatcher ( int  index0,
int  index1,
double  error 
)
inline

Construct with an explicit absolute tolerance.

Definition at line 156 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ PlaneMatcher() [3/4]

panzer_stk::PlaneMatcher::PlaneMatcher ( int  index0,
int  index1,
const std::vector< std::string > &  params 
)
inline

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

Definition at line 160 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ PlaneMatcher() [4/4]

panzer_stk::PlaneMatcher::PlaneMatcher ( const PlaneMatcher cm)
inline

Copy constructor.

Definition at line 165 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

Member Function Documentation

◆ buildLabels()

void panzer_stk::PlaneMatcher::buildLabels ( )
inlineprivate

Definition at line 121 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ parseParams()

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

Definition at line 124 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ operator()()

bool panzer_stk::PlaneMatcher::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 both compared directions are within tolerance.

Definition at line 169 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ getString()

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

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

Definition at line 180 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ getIndex0()

int panzer_stk::PlaneMatcher::getIndex0 ( ) const
inline

Returns the first coordinate direction being compared.

Definition at line 188 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ getIndex1()

int panzer_stk::PlaneMatcher::getIndex1 ( ) const
inline

Returns the second coordinate direction being compared.

Definition at line 190 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ getPeriodicDirection()

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

Returns the direction orthogonal to the compared plane, in which the boundary condition is periodic.

Definition at line 192 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ getAbsoluteTolerance()

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

Returns the absolute matching tolerance.

Definition at line 215 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ transform()

void panzer_stk::PlaneMatcher::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 218 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

Member Data Documentation

◆ error_

double panzer_stk::PlaneMatcher::error_
private

Definition at line 116 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ index0_

int panzer_stk::PlaneMatcher::index0_
private

Definition at line 117 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ index1_

int panzer_stk::PlaneMatcher::index1_
private

Definition at line 117 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ relative_

bool panzer_stk::PlaneMatcher::relative_
private

Definition at line 118 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.

◆ labels_

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

Definition at line 119 of file Panzer_STK_PeriodicBC_MatchConditions.hpp.


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