This group of functions is available for managing Design Variables through the API. Click here to return to the main page.
More...
◆ AddDesignVar()
| void vsp::AddDesignVar |
( |
const std::string & | parm_id, |
|
|
int | type ) |
|
extern |
Add a design variable
string len =
GetParm( pid,
"Length",
"Design" );
void Print(const std::string &data, bool new_line=true)
void AddDesignVar(const std::string &parm_id, int type)
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
std::string GetParm(const std::string &geom_id, const std::string &name, const std::string &group)
void Update(bool update_managers=true)
- See also
- XDDM_QUANTITY_TYPE
- Parameters
-
| [in] | parm_id | string Parm ID |
| [in] | type | int XDDM type enum (XDDM_VAR or XDDM_CONST) |
◆ AddDesignVarLimits()
| void vsp::AddDesignVarLimits |
( |
const std::string & | parm_id, |
|
|
int | type, |
|
|
double | lowerlimit, |
|
|
double | upperlimit ) |
|
extern |
Add a design variable
- See also
- XDDM_QUANTITY_TYPE
- Parameters
-
| [in] | parm_id | string Parm ID |
| [in] | type | int XDDM type enum (XDDM_VAR or XDDM_CONST) |
| [in] | lowerlimit | double Variable lower limit |
| [in] | upperlimit | double Variable upper limit |
◆ DeleteAllDesignVars()
| void vsp::DeleteAllDesignVars |
( |
| ) |
|
|
extern |
Delete all design variables
string len =
GetParm( pid,
"Length",
"Design" );
void DeleteAllDesignVars()
◆ DeleteDesignVar()
| void vsp::DeleteDesignVar |
( |
const std::string & | parm_id | ) |
|
|
extern |
Delete a design variable, by its Parm ID.
string length_id =
FindParm( pod_id,
"Length",
"Design" );
{
Print(
"ERROR: DeleteDesignVar did not delete the variable" );
__failure++;
}
void DeleteDesignVar(const std::string &parm_id)
std::string FindParm(const std::string &parm_container_id, const std::string &parm_name, const std::string &group_name)
- See also
- AddDesignVar, DeleteAllDesignVars
- Parameters
-
| [in] | parm_id | string Parm ID of the design variable |
◆ GetDesignVar()
| std::string vsp::GetDesignVar |
( |
int | index | ) |
|
|
extern |
Get the Parm ID of the specified design variable
string len =
GetParm( pid,
"Length",
"Design" );
std::string GetDesignVar(int index)
- Parameters
-
| [in] | index | int Index of design variable |
- Returns
- string Parm ID
◆ GetDesignVarType()
| int vsp::GetDesignVarType |
( |
int | index | ) |
|
|
extern |
Get the XDDM type of the specified design variable
string len =
GetParm( pid,
"Length",
"Design" );
int GetDesignVarType(int index)
- See also
- XDDM_QUANTITY_TYPE, GetDesignVarTypeByID
- Parameters
-
| [in] | index | int Index of design variable |
- Returns
- int XDDM type enum (XDDM_VAR or XDDM_CONST)
◆ GetDesignVarTypeByID()
| int vsp::GetDesignVarTypeByID |
( |
const std::string & | parm_id | ) |
|
|
extern |
Get the XDDM type of a design variable, by its Parm ID.
string length_id =
FindParm( pod_id,
"Length",
"Design" );
{
Print(
"ERROR: GetDesignVarTypeByID did not return the type" );
__failure++;
}
int GetDesignVarTypeByID(const std::string &parm_id)
- See also
- XDDM_QUANTITY_TYPE, GetDesignVarType
- Parameters
-
| [in] | parm_id | string Parm ID of the design variable |
- Returns
- int XDDM type enum (i.e. XDDM_VAR)
◆ GetDesignVarVec()
| std::vector< std::string > vsp::GetDesignVarVec |
( |
| ) |
|
|
extern |
Get the Parm IDs of the design variables, in the order of their indexes.
string length_id =
FindParm( pod_id,
"Length",
"Design" );
if ( ids.size() != 1 || ids[0] != length_id )
{
Print(
"ERROR: GetDesignVarVec did not return the variable" );
__failure++;
}
std::vector< std::string > GetDesignVarVec()
- See also
- GetDesignVar, GetNumDesignVars
- Returns
- array<string> Array of Parm IDs
◆ GetNumDesignVars()
| int vsp::GetNumDesignVars |
( |
| ) |
|
|
extern |
Get the number of design variables
string len =
GetParm( pid,
"Length",
"Design" );
- Returns
- int Number of design variables
◆ ReadApplyDESFile()
| void vsp::ReadApplyDESFile |
( |
const std::string & | file_name | ) |
|
|
extern |
Read in and apply a design file (\*.des) to the current OpenVSP project
string len =
GetParm( pid,
"Length",
"Design" );
void WriteDESFile(const std::string &file_name)
void ReadApplyDESFile(const std::string &file_name)
- Parameters
-
| [in] | file_name | string \*.des input file |
◆ ReadApplyXDDMFile()
| void vsp::ReadApplyXDDMFile |
( |
const std::string & | file_name | ) |
|
|
extern |
Read in and apply a Cart3D XDDM file (\*.xddm) to the current OpenVSP project
string len =
GetParm( pid,
"Length",
"Design" );
void ReadApplyXDDMFile(const std::string &file_name)
void WriteXDDMFile(const std::string &file_name)
- Parameters
-
| [in] | file_name | string \*.xddm input file |
◆ WriteDESFile()
| void vsp::WriteDESFile |
( |
const std::string & | file_name | ) |
|
|
extern |
Write all design variables to a design file (\*.des)
string len =
GetParm( pid,
"Length",
"Design" );
- Parameters
-
| [in] | file_name | string \*.des output file |
◆ WriteXDDMFile()
| void vsp::WriteXDDMFile |
( |
const std::string & | file_name | ) |
|
|
extern |
Write all design variables to a Cart3D XDDM file (\*.xddm)
string len =
GetParm( pid,
"Length",
"Design" );
- Parameters
-
| [in] | file_name | string \*.xddm output file |