enable to pass string constants
This commit is contained in:
@ -787,8 +787,7 @@ namespace ATC {
|
|||||||
xtArgs[3] = 1.; xtArgs[4] = 1.; xtArgs[5] = 1.;
|
xtArgs[3] = 1.; xtArgs[4] = 1.; xtArgs[5] = 1.;
|
||||||
xtArgs[6] = coulombConstant*chargeDensity;
|
xtArgs[6] = coulombConstant*chargeDensity;
|
||||||
xtArgs[7] = -1.;
|
xtArgs[7] = -1.;
|
||||||
string radialPower = "radial_power";
|
f = XT_Function_Mgr::instance()->function("radial_power",8,xtArgs);
|
||||||
f = XT_Function_Mgr::instance()->function(radialPower,8,xtArgs);
|
|
||||||
|
|
||||||
|
|
||||||
for (iset = faceset->begin(); iset != faceset->end(); iset++) {
|
for (iset = faceset->begin(); iset != faceset->end(); iset++) {
|
||||||
|
|||||||
@ -48,7 +48,7 @@ namespace ATC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add user function into the if statement and assign returnFunction to it
|
// add user function into the if statement and assign returnFunction to it
|
||||||
UXT_Function* UXT_Function_Mgr::function(string & type, int nargs, double * args)
|
UXT_Function* UXT_Function_Mgr::function(const string & type, int nargs, double * args)
|
||||||
{
|
{
|
||||||
UXT_Function * returnFunction;
|
UXT_Function * returnFunction;
|
||||||
if (type=="linear") {
|
if (type=="linear") {
|
||||||
@ -167,7 +167,7 @@ XT_Function_Mgr * XT_Function_Mgr::myInstance_ = nullptr;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add user function into the if statement and assign returnFunction to it
|
// add user function into the if statement and assign returnFunction to it
|
||||||
XT_Function* XT_Function_Mgr::function(string & type, int nargs, double * args)
|
XT_Function* XT_Function_Mgr::function(const string & type, int nargs, double * args)
|
||||||
{
|
{
|
||||||
XT_Function * returnFunction;
|
XT_Function * returnFunction;
|
||||||
if (type=="constant") {
|
if (type=="constant") {
|
||||||
|
|||||||
@ -110,7 +110,7 @@ namespace ATC {
|
|||||||
/** Static instance of this class */
|
/** Static instance of this class */
|
||||||
static UXT_Function_Mgr * instance();
|
static UXT_Function_Mgr * instance();
|
||||||
|
|
||||||
UXT_Function* function(std::string & type, int nargs, double * arg);
|
UXT_Function* function(const std::string & type, int nargs, double * arg);
|
||||||
UXT_Function* function(char ** arg, int nargs);
|
UXT_Function* function(char ** arg, int nargs);
|
||||||
UXT_Function* linear_function(double c0, double c1);
|
UXT_Function* linear_function(double c0, double c1);
|
||||||
UXT_Function* copy_UXT_function(UXT_Function* other);
|
UXT_Function* copy_UXT_function(UXT_Function* other);
|
||||||
@ -181,7 +181,7 @@ namespace ATC {
|
|||||||
/** Static instance of this class */
|
/** Static instance of this class */
|
||||||
static XT_Function_Mgr * instance();
|
static XT_Function_Mgr * instance();
|
||||||
|
|
||||||
XT_Function* function(std::string & type, int nargs, double * arg);
|
XT_Function* function(const std::string & type, int nargs, double * arg);
|
||||||
XT_Function* function(char ** arg, int nargs);
|
XT_Function* function(char ** arg, int nargs);
|
||||||
XT_Function* constant_function(double c);
|
XT_Function* constant_function(double c);
|
||||||
XT_Function* copy_XT_function(XT_Function* other);
|
XT_Function* copy_XT_function(XT_Function* other);
|
||||||
|
|||||||
Reference in New Issue
Block a user