<< MASCARET_getInt Toolbox Mascaret MASCARET_getString >>

Toolbox Mascaret >> Toolbox Mascaret > MASCARET_getSizeVar

MASCARET_getSizeVar

Gives the maximal size of an index for a variable

Calling sequence

[error,size1,size2,size3]=MASCARET_getSizeVar(id,nameVar, index1)

Arguments

id

MASCARET instance number returned by the function MASCARET_create

nameVar

Name of the variable (pointed notation), the list of all the variables is given by MASCARET_getDescVar

index1

Value of the 1st index used by Cross-sections, Graphs, Singularities, Lateral singularities, Extremities, Storage areas and junctions

error

(Output argument) Error code value : zero indicates that no errors occurred

size1

Maximal value of the 1st index

size2

Maximal value of the 2nd index

size3

Maximal value of the 3rd index

Description

Gives the maximal size of an index for a variable

Example

toolbox_dir=getenv("toolbox_dir");
c = filesep();

// creation of the MASCARET model
[err, id] = MASCARET_create();
assert_checktrue(id>0);

// read data from files
path_xml = "file://"+toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1.xcas";
TabNomFichier = [strsubst(path_xml,'\','/'), ..
                 toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1.geo", ..
                 toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1_0.loi", ..
                 toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1_1.loi", ..
                 toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1.lis", ..
                 toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1.opt"];
 
TypeNomFichier = ["xcas","geo","loi","loi","listing","res"];
impression = 0;
err = MASCARET_importModel(id,TabNomFichier,TypeNomFichier,impression);
assert_checkequal(err,0);        
        
// get the number of nodes    
[err,size1,size2,size3]=MASCARET_getSizeVar(id,'Model.X', 0)
assert_checkequal(err,0);  

disp(size1,'The number of 1D nodes for this MASCARET model is : ');

// model deletion
err = MASCARET_delete(id);
assert_checkequal(err,0);

See also


Report an issue
<< MASCARET_getInt Toolbox Mascaret MASCARET_getString >>