MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Scale a target matrix. More...
#include <LambdaConstant.hpp>
Public Member Functions | |
LambdaConstant (double lambda, TargetCalculator *target) | |
~LambdaConstant () | |
bool | get_3D_target (PatchData &pd, size_t element, Sample sample, MsqMatrix< 3, 3 > &W_out, MsqError &err) |
Get a target matrix. | |
bool | get_2D_target (PatchData &pd, size_t element, Sample sample, MsqMatrix< 2, 2 > &W_out, MsqError &err) |
Get a target matrix. | |
bool | get_surface_target (PatchData &pd, size_t element, Sample sample, MsqMatrix< 3, 2 > &W_out, MsqError &err) |
Get a target matrix. | |
bool | have_surface_orient () const |
Use 3x2 W for surface elements if true, 2x2 W if false. | |
Private Attributes | |
double | mLambda |
TargetCalculator * | mTarget |
Scale a target matrix.
Use the specified target calculator to determine the shape and orientation portions of the target matrix, but make the size component (lambda) a constant.
Definition at line 47 of file LambdaConstant.hpp.
MBMesquite::LambdaConstant::LambdaConstant | ( | double | lambda, |
TargetCalculator * | target | ||
) |
lambda | Target size. |
target | Target calcualtor from which to obtain a target that will be scaled by lambda. |
Definition at line 40 of file LambdaConstant.cpp.
Definition at line 42 of file LambdaConstant.cpp.
{}
bool MBMesquite::LambdaConstant::get_2D_target | ( | PatchData & | pd, |
size_t | element, | ||
Sample | sample, | ||
MsqMatrix< 2, 2 > & | W_out, | ||
MsqError & | err | ||
) | [virtual] |
Get a target matrix.
pd | The current PatchData |
element | The index an element within the patch data. |
sample | The sample point in the element. |
W_out | The resulting target matrix. |
Implements MBMesquite::TargetCalculator.
Definition at line 72 of file LambdaConstant.cpp.
References MBMesquite::TargetCalculator::get_2D_target(), mLambda, MSQ_CHKERR, mTarget, and MBMesquite::TargetCalculator::size().
{ bool valid = mTarget->get_2D_target( pd, element, sample, W_out, err ); if( MSQ_CHKERR( err ) || !valid ) return false; double lambda = this->size( W_out ); if( lambda < 1e-50 ) return false; W_out *= mLambda / lambda; return true; }
bool MBMesquite::LambdaConstant::get_3D_target | ( | PatchData & | pd, |
size_t | element, | ||
Sample | sample, | ||
MsqMatrix< 3, 3 > & | W_out, | ||
MsqError & | err | ||
) | [virtual] |
Get a target matrix.
pd | The current PatchData |
element | The index an element within the patch data. |
sample | The sample point in the element. |
W_out | The resulting target matrix. |
Implements MBMesquite::TargetCalculator.
Definition at line 44 of file LambdaConstant.cpp.
References MBMesquite::TargetCalculator::get_3D_target(), mLambda, MSQ_CHKERR, mTarget, and MBMesquite::TargetCalculator::size().
{ bool valid = mTarget->get_3D_target( pd, element, sample, W_out, err ); if( MSQ_CHKERR( err ) || !valid ) return false; double lambda = this->size( W_out ); if( lambda < 1e-50 ) return false; W_out *= mLambda / lambda; return true; }
bool MBMesquite::LambdaConstant::get_surface_target | ( | PatchData & | pd, |
size_t | element, | ||
Sample | sample, | ||
MsqMatrix< 3, 2 > & | W_out, | ||
MsqError & | err | ||
) | [virtual] |
Get a target matrix.
pd | The current PatchData |
element | The index an element within the patch data. |
sample | The sample point in the element. |
W_out | The resulting target matrix. |
Implements MBMesquite::TargetCalculator.
Definition at line 58 of file LambdaConstant.cpp.
References MBMesquite::TargetCalculator::get_surface_target(), mLambda, MSQ_CHKERR, mTarget, and MBMesquite::TargetCalculator::size().
{ bool valid = mTarget->get_surface_target( pd, element, sample, W_out, err ); if( MSQ_CHKERR( err ) || !valid ) return false; double lambda = this->size( W_out ); if( lambda < 1e-50 ) return false; W_out *= mLambda / lambda; return true; }
bool MBMesquite::LambdaConstant::have_surface_orient | ( | ) | const [inline, virtual] |
Use 3x2 W for surface elements if true, 2x2 W if false.
If true, then the targets for surface elements attempt some control of orientation and therefore get_surface_target must be used to get the targets. If false, then the target contains no orientation data and is therefore the same as the corresponding 2D target for surface elements. In this case, get_2D_target should be used.
Implements MBMesquite::TargetCalculator.
Definition at line 65 of file LambdaConstant.hpp.
References MBMesquite::TargetCalculator::have_surface_orient(), and mTarget.
{ return mTarget->have_surface_orient(); }
double MBMesquite::LambdaConstant::mLambda [private] |
Definition at line 71 of file LambdaConstant.hpp.
Referenced by get_2D_target(), get_3D_target(), and get_surface_target().
Definition at line 72 of file LambdaConstant.hpp.
Referenced by get_2D_target(), get_3D_target(), get_surface_target(), and have_surface_orient().