Loading...
Searching...
No Matches
terra::geophysics::viscosity::RadialProfileViscosityInterpolator< ScalarType > Class Template Reference

Helper class for interpolation of purely radially dependent viscosity profiles. More...

#include <viscosity_interpolation.hpp>

Public Member Functions

 RadialProfileViscosityInterpolator (const grid::Grid2DDataScalar< ScalarType > &radial_viscosity_profile, const ScalarType &reference_viscosity=1.0, const ScalarType &viscosity_lower_bound=std::numeric_limits< ScalarType >::lowest(), const ScalarType &viscosity_upper_bound=std::numeric_limits< ScalarType >::max())
 Creates an interpolator class.
 
void interpolate (const grid::Grid4DDataScalar< ScalarType > &dst_grid)
 Runs a kernel to interpolate the viscosity profile into a full grid.
 
void operator() (const int local_subdomain_id, const int x, const int y, const int r) const
 Call interpolate() to run this kernel.
 

Detailed Description

template<typename ScalarType>
class terra::geophysics::viscosity::RadialProfileViscosityInterpolator< ScalarType >

Helper class for interpolation of purely radially dependent viscosity profiles.

Requires as input the already radially interpolated profile on a 2D grid (layout: (local_subdomain_id, r)). Such a grid can be initialized using functions like

If requested, the viscosity can be scaled by 1.0 / reference_viscosity and also clamped to some upper and lower bounds.

Constructor & Destructor Documentation

◆ RadialProfileViscosityInterpolator()

template<typename ScalarType >
terra::geophysics::viscosity::RadialProfileViscosityInterpolator< ScalarType >::RadialProfileViscosityInterpolator ( const grid::Grid2DDataScalar< ScalarType > &  radial_viscosity_profile,
const ScalarType &  reference_viscosity = 1.0,
const ScalarType &  viscosity_lower_bound = std::numeric_limits< ScalarType >::lowest(),
const ScalarType &  viscosity_upper_bound = std::numeric_limits< ScalarType >::max() 
)
inlineexplicit

Creates an interpolator class.

The order is: first clamping, then scaling by the inverse of the reference.

Parameters
radial_viscosity_profilesee class description
reference_viscositythe resulting profile is scaled by 1.0 / reference_viscosity
viscosity_lower_boundlower bound for clamping
viscosity_upper_boundupper bound for clamping

Member Function Documentation

◆ interpolate()

template<typename ScalarType >
void terra::geophysics::viscosity::RadialProfileViscosityInterpolator< ScalarType >::interpolate ( const grid::Grid4DDataScalar< ScalarType > &  dst_grid)
inline

Runs a kernel to interpolate the viscosity profile into a full grid.

◆ operator()()

template<typename ScalarType >
void terra::geophysics::viscosity::RadialProfileViscosityInterpolator< ScalarType >::operator() ( const int  local_subdomain_id,
const int  x,
const int  y,
const int  r 
) const
inline

Call interpolate() to run this kernel.


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