MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Public Member Functions | |
CachedTargetCalculator () | |
virtual bool | get_3D_target (PatchData &, size_t elem, Sample sample, MsqMatrix< 3, 3 > &result, MsqError &) |
Get a target matrix. | |
virtual bool | get_2D_target (PatchData &, size_t elem, Sample sample, MsqMatrix< 2, 2 > &result, MsqError &) |
Get a target matrix. | |
virtual bool | get_surface_target (PatchData &, size_t elem, Sample sample, MsqMatrix< 3, 2 > &result, MsqError &) |
Get a target matrix. | |
void | clear () |
unsigned | calls_3d () const |
unsigned | calls_2d () const |
unsigned | calls_surf () const |
void | surf_orient (bool value) |
virtual bool | have_surface_orient () const |
Use 3x2 W for surface elements if true, 2x2 W if false. | |
Static Public Member Functions | |
static MsqMatrix< 3, 3 > | make_3d (size_t elem, Sample sample) |
static MsqMatrix< 2, 2 > | make_2d (size_t elem, Sample sample) |
static MsqMatrix< 3, 2 > | make_surf (size_t elem, Sample sample) |
Private Attributes | |
unsigned | called_3d |
unsigned | called_2d |
unsigned | called_surf |
bool | surfOrientFlag |
Definition at line 89 of file CachingTargetTest.cpp.
CachedTargetCalculator::CachedTargetCalculator | ( | ) | [inline] |
Definition at line 100 of file CachingTargetTest.cpp.
: called_3d( 0 ), called_2d( 0 ), called_surf( 0 ), surfOrientFlag( true ) {}
unsigned CachedTargetCalculator::calls_2d | ( | ) | const [inline] |
Definition at line 135 of file CachingTargetTest.cpp.
{ return called_2d; }
unsigned CachedTargetCalculator::calls_3d | ( | ) | const [inline] |
Definition at line 130 of file CachingTargetTest.cpp.
{ return called_3d; }
unsigned CachedTargetCalculator::calls_surf | ( | ) | const [inline] |
Definition at line 140 of file CachingTargetTest.cpp.
{ return called_surf; }
void CachedTargetCalculator::clear | ( | ) | [inline] |
Definition at line 123 of file CachingTargetTest.cpp.
{ called_3d = 0; called_2d = 0; called_surf = 0; }
virtual bool CachedTargetCalculator::get_2D_target | ( | PatchData & | pd, |
size_t | element, | ||
Sample | sample, | ||
MsqMatrix< 2, 2 > & | W_out, | ||
MsqError & | err | ||
) | [inline, 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 109 of file CachingTargetTest.cpp.
virtual bool CachedTargetCalculator::get_3D_target | ( | PatchData & | pd, |
size_t | element, | ||
Sample | sample, | ||
MsqMatrix< 3, 3 > & | W_out, | ||
MsqError & | err | ||
) | [inline, 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 102 of file CachingTargetTest.cpp.
virtual bool CachedTargetCalculator::get_surface_target | ( | PatchData & | pd, |
size_t | element, | ||
Sample | sample, | ||
MsqMatrix< 3, 2 > & | W_out, | ||
MsqError & | err | ||
) | [inline, 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 116 of file CachingTargetTest.cpp.
{ ++called_surf; result = make_surf( elem, sample ); return true; }
virtual bool CachedTargetCalculator::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 150 of file CachingTargetTest.cpp.
{ return surfOrientFlag; }
MsqMatrix< 2, 2 > CachedTargetCalculator::make_2d | ( | size_t | elem, |
Sample | sample | ||
) | [static] |
Definition at line 163 of file CachingTargetTest.cpp.
References MBMesquite::Sample::dimension, and MBMesquite::Sample::number.
Referenced by CachingTargetTest::test_2d_target_subpatch(), and CachingTargetTest::test_2d_target_values().
{ double v = 100. * elem + 4 * sample.number + sample.dimension + 1; const double values[] = { v, 0, 0, 1 / v }; return MsqMatrix< 2, 2 >( values ); }
MsqMatrix< 3, 3 > CachedTargetCalculator::make_3d | ( | size_t | elem, |
Sample | sample | ||
) | [static] |
Definition at line 156 of file CachingTargetTest.cpp.
References MBMesquite::Sample::dimension, and MBMesquite::Sample::number.
Referenced by CachingTargetTest::test_3d_target_subpatch(), and CachingTargetTest::test_3d_target_values().
{ double v = 100. * elem + 4 * sample.number + sample.dimension + 1; const double values[] = { v, 0, 0, 0, v, 0, 0, 0, 1 / v }; return MsqMatrix< 3, 3 >( values ); }
MsqMatrix< 3, 2 > CachedTargetCalculator::make_surf | ( | size_t | elem, |
Sample | sample | ||
) | [static] |
Definition at line 170 of file CachingTargetTest.cpp.
References MBMesquite::Sample::dimension, and MBMesquite::Sample::number.
Referenced by CachingTargetTest::test_surface_target_subpatch(), and CachingTargetTest::test_surface_target_values().
{ double v = 100. * elem + 4 * sample.number + sample.dimension + 1; const double values[] = { v, 0, 0, v, 0.5 * v, 0.5 * v }; return MsqMatrix< 3, 2 >( values ); }
void CachedTargetCalculator::surf_orient | ( | bool | value | ) | [inline] |
Definition at line 145 of file CachingTargetTest.cpp.
References value().
{ surfOrientFlag = value; }
unsigned CachedTargetCalculator::called_2d [private] |
Definition at line 92 of file CachingTargetTest.cpp.
unsigned CachedTargetCalculator::called_3d [private] |
Definition at line 92 of file CachingTargetTest.cpp.
unsigned CachedTargetCalculator::called_surf [private] |
Definition at line 92 of file CachingTargetTest.cpp.
bool CachedTargetCalculator::surfOrientFlag [private] |
Definition at line 93 of file CachingTargetTest.cpp.