Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loadbalancing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SLMS
loadbalancing
Commits
eb559d04
Commit
eb559d04
authored
Nov 14, 2019
by
Stephan Schulz
Browse files
Options
Downloads
Patches
Plain Diff
do not modify n of get_vertices and get_prev_vertices
parent
0736ab75
No related branches found
No related tags found
1 merge request
!8
Refactor
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ALL_fortran.cpp
+7
-6
7 additions, 6 deletions
src/ALL_fortran.cpp
src/ALL_module.f90
+2
-2
2 additions, 2 deletions
src/ALL_module.f90
with
9 additions
and
8 deletions
src/ALL_fortran.cpp
+
7
−
6
View file @
eb559d04
...
...
@@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#include
"../include/ALL.hpp"
#include
<cassert>
#include
<vector>
extern
"C"
...
...
@@ -96,12 +97,12 @@ extern "C"
}
// wrapper to return new vertices
void
all_get_vertices_f
(
ALL
<
double
,
double
>*
all_obj
,
int
*
n_vertices
,
double
*
vertices
)
void
all_get_vertices_f
(
ALL
<
double
,
double
>*
all_obj
,
int
n_vertices
,
double
*
vertices
)
{
std
::
vector
<
ALL_Point
<
double
>>
tmp_vertices
=
all_obj
->
get_vertices
();
int
dimension
=
all_obj
->
get_dimension
();
*
n_vertices
=
tmp_vertices
.
size
();
for
(
int
i
=
0
;
i
<
*
n_vertices
;
++
i
)
assert
(
n_vertices
=
=
tmp_vertices
.
size
()
)
;
for
(
int
i
=
0
;
i
<
n_vertices
;
++
i
)
{
for
(
int
j
=
0
;
j
<
dimension
;
++
j
)
{
...
...
@@ -111,12 +112,12 @@ extern "C"
}
// wrapper to return new vertices
void
all_get_prev_vertices_f
(
ALL
<
double
,
double
>*
all_obj
,
int
*
n_vertices
,
double
*
prev_vertices
)
void
all_get_prev_vertices_f
(
ALL
<
double
,
double
>*
all_obj
,
int
n_vertices
,
double
*
prev_vertices
)
{
std
::
vector
<
ALL_Point
<
double
>>
tmp_vertices
=
all_obj
->
get_prev_vertices
();
int
dimension
=
all_obj
->
get_dimension
();
*
n_vertices
=
tmp_vertices
.
size
();
for
(
int
i
=
0
;
i
<
*
n_vertices
;
++
i
)
assert
(
n_vertices
=
=
tmp_vertices
.
size
()
)
;
for
(
int
i
=
0
;
i
<
n_vertices
;
++
i
)
{
for
(
int
j
=
0
;
j
<
dimension
;
++
j
)
{
...
...
This diff is collapsed.
Click to expand it.
src/ALL_module.f90
+
2
−
2
View file @
eb559d04
...
...
@@ -99,14 +99,14 @@ MODULE ALL_module
BIND
(
C
,
NAME
=
"all_get_vertices_f"
)
USE
ISO_C_BINDING
TYPE
(
c_ptr
),
VALUE
::
obj
INTEGER
(
c_int
)
::
n
INTEGER
(
c_int
)
,
VALUE
::
n
REAL
(
c_double
)
::
vertices
(
*
)
END
SUBROUTINE
SUBROUTINE
ALL_get_prev_vertices_int
(
obj
,
n
,
vertices
)
&
BIND
(
C
,
NAME
=
"all_get_prev_vertices_f"
)
USE
ISO_C_BINDING
TYPE
(
c_ptr
),
VALUE
::
obj
INTEGER
(
c_int
)
::
n
INTEGER
(
c_int
)
,
VALUE
::
n
REAL
(
c_double
)
::
vertices
(
*
)
END
SUBROUTINE
SUBROUTINE
ALL_print_vtk_outlines_int
(
obj
,
step
)
BIND
(
C
,
NAME
=
"all_print_vtk_outlines_f"
)
...
...
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