BISICLES AMR ice sheet model
0.9
|
BasalFriction that calls a python function to compute .
More...
#include <PythonInterface.H>
Public Member Functions | |
PythonBasalFriction (const std::string &a_pyModule, const std::string &a_pyFunc) | |
Construct a PythonBasalFriction from module and function names. More... | |
virtual | ~PythonBasalFriction () |
virtual BasalFriction * | new_basalFriction () const |
factory method More... | |
virtual void | setBasalFriction (LevelData< FArrayBox > &a_C, LevelSigmaCS &a_coordSys, Real a_time, Real a_dt) |
compute basal friction coefficient beta^2 and place in a_betaSqr More... | |
![]() | |
virtual | ~BasalFriction () |
virtual destructor More... | |
Additional Inherited Members | |
![]() | |
static BasalFriction * | parse (const char *a_prefix, const RealVect &a_domainSize) |
BasalFriction that calls a python function to compute .
The user needs to provide a python function foo
that takes x,y,thickness,topography as args, and returns a single scalar
Run time configuration is carried out in BasalFriction::parse(A, ... ) If the option A.beta_type = Python
is found, then the expected form is:
PythonBasalFriction.module = <string>
(the name of the python module, eg. foo
not foo.py
)PythonBasalFriction.function = <string>
(the name of the python function in foo
) PythonInterface::PythonBasalFriction::PythonBasalFriction | ( | const std::string & | a_pyModule, |
const std::string & | a_pyFunc | ||
) |
Construct a PythonBasalFriction from module and function names.
a_pyModule | the python module name |
a_pyFunc | the python function name |
References PythonInterface::InitializePythonFunction(), and PythonInterface::InitializePythonModule().
|
virtual |
|
virtual |
factory method
Implements BasalFriction.
References setBasalFriction().
|
virtual |
compute basal friction coefficient beta^2 and place in a_betaSqr
time and dt are included in case this is time-dependent. Units should usually be chosen so that the basal traction is measured in Pascals when
is measured in meters per year.
a_betaSqr | basal friction coefficient beta^2 data |
a_coordSys | ice sheet geometry |
a_time | current time |
a_dt | current time step |
Implements BasalFriction.
References LevelSigmaCS::dx(), LevelSigmaCS::getH(), LevelSigmaCS::getTopography(), and PythonInterface::PythonEval().
Referenced by new_basalFriction().