Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
ad225479
Commit
ad225479
authored
20 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
use v0, v1, ..., vn to access the other components of the field
parent
39f49fb6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Plugin/Evaluate.cpp
+13
-10
13 additions, 10 deletions
Plugin/Evaluate.cpp
with
13 additions
and
10 deletions
Plugin/Evaluate.cpp
+
13
−
10
View file @
ad225479
// $Id: Evaluate.cpp,v 1.1
2
2005-01-0
1
1
9:35:39
geuzaine Exp $
// $Id: Evaluate.cpp,v 1.1
3
2005-01-0
2
1
8:09:02
geuzaine Exp $
//
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -74,9 +74,11 @@ void GMSH_EvaluatePlugin::getInfos(char *author, char *copyright,
...
@@ -74,9 +74,11 @@ void GMSH_EvaluatePlugin::getInfos(char *author, char *copyright,
"mathematical functions (Exp, Log, Sqrt, Sin,
\n
"
"mathematical functions (Exp, Log, Sqrt, Sin,
\n
"
"Cos, Fabs, etc.) and operators (+, -, *, /, ^),
\n
"
"Cos, Fabs, etc.) and operators (+, -, *, /, ^),
\n
"
"`Expression' can contain the symbols x, y, z
\n
"
"`Expression' can contain the symbols x, y, z
\n
"
"and v, which represent the three spatial
\n
"
"(which represent the current position), v (which
\n
"
"coordinates and the value of the `TimeStep'-th
\n
"
"represents the `Component'-th component of
\n
"
"component of the field, respectively. If
\n
"
"the field at the `TimeStep'-th time step), and v0,
\n
"
"v1, v2, ..., vn (which represent the n components
\n
"
"of the field at the `TimeStep'-th time step). If
\n
"
"`iView' < 0, the plugin is run on the current
\n
"
"`iView' < 0, the plugin is run on the current
\n
"
"view.
\n
"
"view.
\n
"
"
\n
"
"
\n
"
...
@@ -149,13 +151,14 @@ static void evaluate(Post_View * v, List_T * list, int nbElm,
...
@@ -149,13 +151,14 @@ static void evaluate(Post_View * v, List_T * list, int nbElm,
double
*
val
=
(
double
*
)
List_Pointer_Fast
(
list
,
double
*
val
=
(
double
*
)
List_Pointer_Fast
(
list
,
i
+
3
*
nbNod
+
i
+
3
*
nbNod
+
nbNod
*
nbComp
*
timeStep
+
nbComp
*
j
);
nbNod
*
nbComp
*
timeStep
+
nbComp
*
j
);
double
xx
=
x
[
j
];
double
yy
=
y
[
j
];
double
zz
=
z
[
j
];
double
vv
=
val
[
comp
];
char
*
names
[]
=
{
"x"
,
"y"
,
"z"
,
"v"
};
double
v
[
9
]
=
{
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.
};
double
values
[]
=
{
xx
,
yy
,
zz
,
vv
};
for
(
int
k
=
0
;
k
<
nbComp
;
k
++
)
v
[
k
]
=
val
[
k
];
char
*
names
[]
=
{
"x"
,
"y"
,
"z"
,
"v"
,
"v0"
,
"v1"
,
"v2"
,
"v3"
,
"v4"
,
"v5"
,
"v6"
,
"v7"
,
"v8"
};
double
values
[]
=
{
x
[
j
]
,
y
[
j
],
z
[
j
],
v
[
comp
],
v
[
0
],
v
[
1
],
v
[
2
],
v
[
3
],
v
[
4
],
v
[
5
],
v
[
6
],
v
[
7
],
v
[
8
]
};
double
res
=
evaluator_evaluate
(
f
,
sizeof
(
names
)
/
sizeof
(
names
[
0
]),
names
,
values
);
double
res
=
evaluator_evaluate
(
f
,
sizeof
(
names
)
/
sizeof
(
names
[
0
]),
names
,
values
);
val
[
comp
]
=
res
;
val
[
comp
]
=
res
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment