204 |
%token <realVariable> VARREALID "real_t variable" |
%token <realVariable> VARREALID "real_t variable" |
205 |
%token <vector3Variable> VARVECTID "vector variable" |
%token <vector3Variable> VARVECTID "vector variable" |
206 |
%token <functionVariable> VARFNCTID "function variable" |
%token <functionVariable> VARFNCTID "function variable" |
207 |
%token <meshVariable> MESHID STRUCT3DMESHID SURFMESHID TETRAHEDRAMESHID |
%token <meshVariable> MESHID |
208 |
|
|
209 |
%token <sceneVariable> VARSCENEID "scene variable" |
%token <sceneVariable> VARSCENEID "scene variable" |
210 |
%token <domainVariable> VARDOMAINID "domain variable" |
%token <domainVariable> VARDOMAINID "domain variable" |
223 |
%type <multilinearformsum> multiLinearSumExp |
%type <multilinearformsum> multiLinearSumExp |
224 |
%type <variationalFormula> variationalFormula |
%type <variationalFormula> variationalFormula |
225 |
|
|
|
%type <meshVariable> meshid "mesh variable" |
|
226 |
%type <expression> exp "expression" |
%type <expression> exp "expression" |
227 |
%type <realExp> realexp "double" |
%type <realExp> realexp "double" |
228 |
%type <vector3> vector3exp "vector" |
%type <vector3> vector3exp "vector" |
338 |
%token ZMIN "zmin" |
%token ZMIN "zmin" |
339 |
%token ZMAX "zmax" |
%token ZMAX "zmax" |
340 |
|
|
341 |
%token DNU CONVECT DERIVE |
%token DNU CONVECT |
342 |
|
|
343 |
%token INCR DECR |
%token INCR DECR |
344 |
|
|
370 |
%token TESTS |
%token TESTS |
371 |
%token IN ON BY INSIDE OUTSIDE POV SYSTEM |
%token IN ON BY INSIDE OUTSIDE POV SYSTEM |
372 |
%token COUT CERR |
%token COUT CERR |
373 |
%token ABS SIN COS TAN ASIN ACOS ATAN SQRT EXP |
%token ABS SIN COS TAN ASIN ACOS ATAN SQRT EXP LOG |
374 |
|
|
375 |
/* Variable, Function and User Function */ |
/* Variable, Function and User Function */ |
376 |
%token <aString> NAME |
%token <aString> NAME |
580 |
{ |
{ |
581 |
$$ = new InstructionAffectation<FunctionExpression, FunctionVariable>($1,$3); |
$$ = new InstructionAffectation<FunctionExpression, FunctionVariable>($1,$3); |
582 |
} |
} |
583 |
| meshid '=' meshexp |
| MESHID '=' meshexp |
584 |
{ |
{ |
585 |
$$ = new InstructionAffectation<MeshExpression, MeshVariable>($1,$3); |
$$ = new InstructionAffectation<MeshExpression, MeshVariable>($1,$3); |
586 |
} |
} |
720 |
{ |
{ |
721 |
$$ = $1; |
$$ = $1; |
722 |
} |
} |
723 |
| meshid |
| MESHID |
724 |
{ |
{ |
725 |
$$ = new MeshExpressionVariable($1); |
$$ = new MeshExpressionVariable($1); |
726 |
} |
} |
761 |
} |
} |
762 |
; |
; |
763 |
|
|
|
meshid: |
|
|
MESHID |
|
|
{ |
|
|
$$ = $1; |
|
|
} |
|
|
| STRUCT3DMESHID |
|
|
{ |
|
|
$$ = $1; |
|
|
} |
|
|
| SURFMESHID |
|
|
{ |
|
|
$$ = $1; |
|
|
} |
|
|
| TETRAHEDRAMESHID |
|
|
{ |
|
|
$$ = $1; |
|
|
} |
|
|
; |
|
|
|
|
764 |
sceneexp: |
sceneexp: |
765 |
POV '(' stringexp ')' |
POV '(' stringexp ')' |
766 |
{ |
{ |
1439 |
{ |
{ |
1440 |
$$ = new BoundaryExpressionPOVRay($1); |
$$ = new BoundaryExpressionPOVRay($1); |
1441 |
} |
} |
1442 |
| STRUCT3DMESHID |
| MESHID |
|
{ |
|
|
$$ = new BoundaryExpressionStructured3DMesh(); |
|
|
} |
|
|
| SURFMESHID |
|
1443 |
{ |
{ |
1444 |
ReferenceCounting<MeshExpression> m |
switch ((*$1->expression()).meshType()) { |
1445 |
= new MeshExpressionVariable($1); |
case MeshExpression::structured: { |
1446 |
$$ = new BoundaryExpressionSurfaceMesh(m); |
$$ = new BoundaryExpressionStructured3DMesh(); |
1447 |
|
break; |
1448 |
|
} |
1449 |
|
case MeshExpression::surface: { |
1450 |
|
ReferenceCounting<MeshExpression> m |
1451 |
|
= new MeshExpressionVariable($1); |
1452 |
|
$$ = new BoundaryExpressionSurfaceMesh(m); |
1453 |
|
break; |
1454 |
|
} |
1455 |
|
default: { |
1456 |
|
yyerror("Cannot use this kind of mesh as boundary condition"); |
1457 |
|
} |
1458 |
|
} |
1459 |
} |
} |
1460 |
| STRUCT3DMESHID face |
| MESHID face |
1461 |
{ |
{ |
1462 |
$$ = new BoundaryExpressionStructured3DMesh($2); |
$$ = new BoundaryExpressionStructured3DMesh($2); |
1463 |
} |
} |
1695 |
$$ = new FunctionExpressionUnaryOperator<ExpressionStdFunction<FunctionExpression, |
$$ = new FunctionExpressionUnaryOperator<ExpressionStdFunction<FunctionExpression, |
1696 |
std::exp> >($3); |
std::exp> >($3); |
1697 |
} |
} |
1698 |
|
| LOG '(' functionexp ')' |
1699 |
|
{ |
1700 |
|
$$ = new FunctionExpressionUnaryOperator<ExpressionStdFunction<FunctionExpression, |
1701 |
|
std::log> >($3); |
1702 |
|
} |
1703 |
| SIN '(' functionexp ')' |
| SIN '(' functionexp ')' |
1704 |
{ |
{ |
1705 |
$$ = new FunctionExpressionUnaryOperator<ExpressionStdFunction<FunctionExpression, |
$$ = new FunctionExpressionUnaryOperator<ExpressionStdFunction<FunctionExpression, |
1900 |
{ |
{ |
1901 |
$$ = new RealExpressionUnaryOperator<std::exp>($3); |
$$ = new RealExpressionUnaryOperator<std::exp>($3); |
1902 |
} |
} |
1903 |
|
| LOG '(' realexp ')' |
1904 |
|
{ |
1905 |
|
$$ = new RealExpressionUnaryOperator<std::log>($3); |
1906 |
|
} |
1907 |
| SIN '(' realexp ')' |
| SIN '(' realexp ')' |
1908 |
{ |
{ |
1909 |
$$ = new RealExpressionUnaryOperator<std::sin>($3); |
$$ = new RealExpressionUnaryOperator<std::sin>($3); |