|
Plugins
|
#include <smile_rescale.hpp>
Classes | |
| struct | GetScalingFactors |
| Helper class for the computation of the factors. More... | |
Public Types | |
| typedef ANumber | a_factor_type |
| Attachment type for the factors. | |
| typedef Grid::VertexAttachmentAccessor< a_factor_type > | aa_factor_type |
| Attachment accessor type for the factors. | |
| typedef TAlgebra | algebra_type |
| Type of algebra. | |
| typedef TDomain | domain_type |
| Type of Domain. | |
| typedef UserData< number, WDim > | factor_type |
| User data scaling factor type. | |
| typedef GridFunction< domain_type, algebra_type > | gf_type |
| Grid function type. | |
| typedef TDomain::grid_type | grid_type |
| Type of Grid: | |
| typedef domain_type::position_accessor_type | position_accessor_type |
| Type of the position accessor. | |
| typedef domain_type::position_type | position_type |
| Type of the position coordinate vectors. | |
| typedef domain_type::subset_handler_type | subset_handler_type |
| Type of subset handler. | |
Public Member Functions | |
| void | divide (SmartPtr< gf_type > gf, const char *cmps) |
| Divide the given components of the grid function by the factors. | |
| void | multiply (SmartPtr< gf_type > gf, const char *cmps) |
| Multiplies the given components of the grid function by the factors. | |
| void | set_factor (SmartPtr< factor_type > factor) |
| Sets the scaling factor. | |
| SmartRescaler () | |
| Constructor. | |
Static Public Attributes | |
| static const int | WDim = TDomain::dim |
| World dimention. | |
Private Types | |
| typedef SmartRescaler< TDomain, TAlgebra > | this_type |
| This type. | |
Private Member Functions | |
| void | get_scaling_factors (gf_type &gf, a_factor_type &factor) |
| Compute (sum up) the scaling factors (over the entire grid) | |
| template<typename TElem > | |
| void | get_scaling_factors_for_ (int si, gf_type &gf, aa_factor_type &factor) |
| Compute (sum up) the scaling factors (for one element type) | |
Private Attributes | |
| SmartPtr< factor_type > | m_spFactor |
A class for rescaling grid functions with values computed by a user data object
| typedef ANumber ug::smile::SmartRescaler< TDomain, TAlgebra >::a_factor_type |
Attachment type for the factors.
| typedef Grid::VertexAttachmentAccessor<a_factor_type> ug::smile::SmartRescaler< TDomain, TAlgebra >::aa_factor_type |
Attachment accessor type for the factors.
| typedef TAlgebra ug::smile::SmartRescaler< TDomain, TAlgebra >::algebra_type |
Type of algebra.
| typedef TDomain ug::smile::SmartRescaler< TDomain, TAlgebra >::domain_type |
Type of Domain.
| typedef UserData<number, WDim> ug::smile::SmartRescaler< TDomain, TAlgebra >::factor_type |
User data scaling factor type.
| typedef GridFunction<domain_type, algebra_type> ug::smile::SmartRescaler< TDomain, TAlgebra >::gf_type |
Grid function type.
| typedef TDomain::grid_type ug::smile::SmartRescaler< TDomain, TAlgebra >::grid_type |
Type of Grid:
| typedef domain_type::position_accessor_type ug::smile::SmartRescaler< TDomain, TAlgebra >::position_accessor_type |
Type of the position accessor.
| typedef domain_type::position_type ug::smile::SmartRescaler< TDomain, TAlgebra >::position_type |
Type of the position coordinate vectors.
| typedef domain_type::subset_handler_type ug::smile::SmartRescaler< TDomain, TAlgebra >::subset_handler_type |
Type of subset handler.
|
private |
This type.
|
inline |
Constructor.
| void ug::smile::SmartRescaler< TDomain, TAlgebra >::divide | ( | SmartPtr< gf_type > | gf, |
| const char * | cmps | ||
| ) |
Divide the given components of the grid function by the factors.
| gf | the grid function to rescale |
| cmps | component to rescale |
References ug::DoFRef().
|
private |
Compute (sum up) the scaling factors (over the entire grid)
| gf | the grid function |
| factor | attachment for the factors at vertices |
References ug::GridFunction< typename TDomain, typename TAlgebra >::domain(), ug::DoFDistributionInfoProvider::function_pattern(), PCL_RO_SUM, ug::SetAttachmentValues(), and UG_THROW.
|
private |
Compute (sum up) the scaling factors (for one element type)
| si | subset index |
| gf | the grid function |
| factor | attachment accessor for the factors at vertices |
References ug::GridFunction< typename TDomain, typename TAlgebra >::domain(), ug::GeomProvider< typename TGeom >::get(), ug::GetLocalVector(), ug::GridFunction< typename TDomain, typename TAlgebra >::indices(), ug::LocalVector::resize(), and UG_CATCH_THROW.
| void ug::smile::SmartRescaler< TDomain, TAlgebra >::multiply | ( | SmartPtr< gf_type > | gf, |
| const char * | cmps | ||
| ) |
Multiplies the given components of the grid function by the factors.
| gf | the grid function to rescale |
| cmps | component to rescale |
References ug::DoFRef().
|
inline |
Sets the scaling factor.
References ug::smile::SmartRescaler< TDomain, TAlgebra >::m_spFactor.
|
private |
Referenced by ug::smile::SmartRescaler< TDomain, TAlgebra >::set_factor().
|
static |
World dimention.