Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-uggrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
staging
dune-uggrid
Commits
3ecbfc41
Commit
3ecbfc41
authored
7 years ago
by
Ansgar Burchardt
Browse files
Options
Downloads
Patches
Plain Diff
remove `move` command
parent
32055309
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!69
More cleanup
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ui/commands.cc
+0
-120
0 additions, 120 deletions
ui/commands.cc
ui/commands.doc
+0
-21
0 additions, 21 deletions
ui/commands.doc
with
0 additions
and
141 deletions
ui/commands.cc
+
0
−
120
View file @
3ecbfc41
...
...
@@ -2155,125 +2155,6 @@ Exit_gn:
}
/** \brief Implementation of \ref move. */
static
INT
MoveNodeCommand
(
INT
argc
,
char
**
argv
)
{
MULTIGRID
*
theMG
;
VERTEX
*
myVertex
;
NODE
*
theNode
;
DOUBLE
xc
[
DIM
];
INT
type
,
i
,
j
,
level
,
relative
;
/* following variables: keep type for sscanf */
double
x
[
DIM_MAX
];
int
id
,
segid
;
theMG
=
currMG
;
if
(
theMG
==
NULL
)
{
PrintErrorMessage
(
'E'
,
"move"
,
"no open multigrid"
);
return
(
CMDERRORCODE
);
}
theNode
=
NULL
;
/* check parameters */
if
(
sscanf
(
argv
[
0
],
"move %d"
,
&
id
)
==
1
)
{
/* search node */
for
(
level
=
0
;
level
<=
TOPLEVEL
(
theMG
);
level
++
)
if
((
theNode
=
FindNodeFromId
(
GRID_ON_LEVEL
(
theMG
,
level
),
id
))
!=
NULL
)
break
;
if
(
theNode
==
NULL
)
{
PrintErrorMessageF
(
'E'
,
"move"
,
"node with ID %ld not found"
,(
long
)
id
);
return
(
CMDERRORCODE
);
}
}
/* check options */
relative
=
false
;
for
(
i
=
1
;
i
<
argc
;
i
++
)
switch
(
argv
[
i
][
0
])
{
case
'i'
:
if
(
OBJT
(
MYVERTEX
(
theNode
))
!=
IVOBJ
)
{
PrintErrorMessageF
(
'E'
,
"move"
,
"node with ID %ld is no inner node"
,(
long
)
id
);
return
(
CMDERRORCODE
);
}
type
=
IVOBJ
;
if
(
sscanf
(
argv
[
i
],
"i %lf %lf %lf"
,
x
,
x
+
1
,
x
+
2
)
!=
DIM
)
{
PrintErrorMessageF
(
'E'
,
"move"
,
"specify %d new coordinates for an inner node"
,(
int
)
DIM
);
return
(
PARAMERRORCODE
);
}
for
(
j
=
0
;
j
<
DIM
;
j
++
)
xc
[
j
]
=
x
[
j
];
break
;
case
'b'
:
if
(
OBJT
(
MYVERTEX
(
theNode
))
!=
BVOBJ
)
{
PrintErrorMessageF
(
'E'
,
"move"
,
"node with ID %ld is no boundary node"
,(
long
)
id
);
return
(
CMDERRORCODE
);
}
type
=
BVOBJ
;
if
(
sscanf
(
argv
[
i
],
"b %d %lf %lf"
,
&
segid
,
x
,
x
+
1
)
!=
1
+
DIM_OF_BND
)
{
PrintErrorMessageF
(
'E'
,
"move"
,
"specify the segment if and %d new coordinates for a boundary node"
,(
int
)
DIM_OF_BND
);
return
(
PARAMERRORCODE
);
}
for
(
j
=
0
;
j
<
DIM_OF_BND
;
j
++
)
xc
[
j
]
=
x
[
j
];
break
;
case
'r'
:
relative
=
true
;
break
;
default
:
PrintErrorMessageF
(
'E'
,
"MoveNodeCommand"
,
"Unknown option '%s'"
,
argv
[
i
]);
return
(
PARAMERRORCODE
);
}
if
(
theNode
==
NULL
)
{
PrintErrorMessage
(
'E'
,
"move"
,
"you have to either specify
\n
"
"the ID of the node to move or the s option"
);
return
(
PARAMERRORCODE
);
}
myVertex
=
MYVERTEX
(
theNode
);
if
(
type
==
IVOBJ
)
{
if
(
relative
)
{
/* move relative to old position */
for
(
j
=
0
;
j
<
DIM
;
j
++
)
xc
[
j
]
+=
CVECT
(
myVertex
)[
j
];
}
if
(
MoveNode
(
theMG
,
theNode
,
xc
,
true
)
!=
GM_OK
)
{
PrintErrorMessage
(
'E'
,
"move"
,
"failed moving the node"
);
return
(
CMDERRORCODE
);
}
}
else
if
(
type
==
BVOBJ
)
{
PrintErrorMessage
(
'E'
,
"move"
,
"moving boundary nodes not implemented yet"
);
return
(
CMDERRORCODE
);
}
else
{
PrintErrorMessage
(
'E'
,
"MoveNodeCommand"
,
"either i or b option is mandatory"
);
return
(
PARAMERRORCODE
);
}
return
(
OKCODE
);
}
/** \brief Implementation of \ref adapt. */
static
INT
AdaptCommand
(
INT
argc
,
char
**
argv
)
{
...
...
@@ -4367,7 +4248,6 @@ INT NS_DIM_PREFIX InitCommands ()
if
(
CreateCommand
(
"bn"
,
InsertBoundaryNodeCommand
)
==
NULL
)
return
(
__LINE__
);
if
(
CreateCommand
(
"ngbn"
,
NGInsertBoundaryNodeCommand
)
==
NULL
)
return
(
__LINE__
);
if
(
CreateCommand
(
"gn"
,
InsertGlobalNodeCommand
)
==
NULL
)
return
(
__LINE__
);
if
(
CreateCommand
(
"move"
,
MoveNodeCommand
)
==
NULL
)
return
(
__LINE__
);
if
(
CreateCommand
(
"refine"
,
AdaptCommand
)
==
NULL
)
return
(
__LINE__
);
if
(
CreateCommand
(
"adapt"
,
AdaptCommand
)
==
NULL
)
return
(
__LINE__
);
if
(
CreateCommand
(
"fixcoarsegrid"
,
FixCoarseGridCommand
)
==
NULL
)
return
(
__LINE__
);
...
...
This diff is collapsed.
Click to expand it.
ui/commands.doc
+
0
−
21
View file @
3ecbfc41
...
...
@@ -798,27 +798,6 @@ freeaverage $nv uwTrans $s sol $nv unTrans $s sol;
*/
/****************************************************************************/
/****************************************************************************/
/** \page move move - Move a node and vertex
\section Description
This command moves a node and the corresponding vertex
of the current multigrid to a new position,
calling the functions 'MoveInnerNode' and 'MoveBoundaryNode'.
\section Syntax
'move \<Id> {$i \<x> \<y> [\<z>] | $b \<SegId> \<s> [\<t>]}'
<li> \<Id> - Id of the node to be moved
<li> $i~\<x>~\<y>~[\<z>] - specify as much coordinates as the space has dimensions
<li> $b~\<Id>~\<s>~[\<t>] - in the current implementation (domain module dependent)
boundary nodes can not be moved
\section Keywords
multigrid, move, node, edit
*/
/****************************************************************************/
/****************************************************************************/
/** \page adapt adapt - Adapt the current multigrid
...
...
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