The AHA Model  Revision: 12809
Reference implementation 04 (HEDG02_04)
the_environment::visual_range_new Interface Reference

Calculate visual range of predator using Dag Aksnes's procedures srgetr(), easyr() and deriv(). More...

Collaboration diagram for the_environment::visual_range_new:

Public Member Functions

elemental real(srp) function visual_range_fast (irradiance, prey_area, prey_contrast)
 Wrapper for calculating visual range of a fish predator using the Dag Aksnes's procedures srgetr(), easyr() and deriv(). This is a new elemental and parallel-ready visual range function wrapper making use the elemental-procedures based computational backend. See notes on visual_range_scalar() and srgetr() for computational details. More...
 

Detailed Description

Calculate visual range of predator using Dag Aksnes's procedures srgetr(), easyr() and deriv().

Note
This is a pure/elemental version with no debugging log output.
Warning
The main interface name is visual_range, it is this name which is used throughout the code.
The parameter prey_contrast to the vector-based function call must be an scalar. Otherwise a segmentation fault runtime error results. Vector-based call is analogous to calling visual_range_vector() with prey_contrast_vect parameter.

Definition at line 752 of file m_env.f90.

Member Function/Subroutine Documentation

◆ visual_range_fast()

elemental real(srp) function the_environment::visual_range_new::visual_range_fast ( real(srp), intent(in)  irradiance,
real(srp), intent(in), optional  prey_area,
real(srp), intent(in), optional  prey_contrast 
)

Wrapper for calculating visual range of a fish predator using the Dag Aksnes's procedures srgetr(), easyr() and deriv(). This is a new elemental and parallel-ready visual range function wrapper making use the elemental-procedures based computational backend. See notes on visual_range_scalar() and srgetr() for computational details.

Parameters
[in]irradiancebackground irradiance at specific depth
[in]prey_areaprey area, m^2
[in]prey_contrastoptional prey inherent contrast or default parameter if not present.
Returns
Returns visual range of the fish predator
Warning
It is simplified, e.g. no error reporting is done. Nonetheless, debugging the old code has shown that it works okay up to the MAX_LOG non-whale size limit. Use the non-elemental version whenever debugging or logging is required! The parameter prey_contrast to the vector-based function call must be an scalar. Otherwise a segmentation fault runtime error results. Vector-based call is analogous to calling visual_range_vector with prey_contrast_vect parameter.

Specific implementations

See specific implementations:

Definition at line 5009 of file m_env.f90.

Here is the call graph for this function:

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