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
6ae1dbcb
Commit
6ae1dbcb
authored
Jun 11, 2019
by
Stephan Schulz
Browse files
Options
Downloads
Patches
Plain Diff
add set_min_domain_size and print_vtk_outlines to interface
parent
b2866326
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ALL_fortran.cpp
+9
-3
9 additions, 3 deletions
src/ALL_fortran.cpp
src/ALL_module.f90
+21
-9
21 additions, 9 deletions
src/ALL_module.f90
with
30 additions
and
12 deletions
src/ALL_fortran.cpp
+
9
−
3
View file @
6ae1dbcb
...
...
@@ -40,10 +40,10 @@ extern "C"
}
// wrapper to set the minimum domain size
void
ALL_set_min_domain_size_f
(
ALL
<
double
,
double
>*
all_obj
,
int
dim
,
double
*
domain_size
)
void
ALL_set_min_domain_size_f
(
ALL
<
double
,
double
>*
all_obj
,
ALL_LB_t
method
,
int
dim
,
double
*
domain_size
)
{
if
(
all_obj
->
get_dimension
()
!=
dim
)
throw
ALL_Invalid_Argument_Exception
(
__FILE__
,
__func__
,
__LINE__
,
"Length of array does not match dimension"
);
all_obj
->
set_min_domain_size
(
domain_size
);
all_obj
->
set_min_domain_size
(
method
,
domain_size
);
}
// wrapper to set the work (scalar only for the moment)
...
...
@@ -112,4 +112,10 @@ extern "C"
}
}
}
void
ALL_print_vtk_outlines_f
(
ALL
<
double
,
double
>*
all_obj
,
int
step
)
{
#ifdef ALL_VTK_OUTPUT
all_obj
->
print_vtk_outlines
(
step
);
#endif
}
}
This diff is collapsed.
Click to expand it.
src/ALL_module.f90
+
21
−
9
View file @
6ae1dbcb
...
...
@@ -49,10 +49,11 @@ MODULE ALL_module
REAL
(
c_double
),
VALUE
::
gamma
TYPE
(
c_ptr
)
::
this
END
FUNCTION
SUBROUTINE
ALL_set_min_domain_size_int
(
obj
,
dim
,
domain_size
)
BIND
(
C
,
NAME
=
"ALL_set_min_domain_size_f"
)
SUBROUTINE
ALL_set_min_domain_size_int
(
obj
,
method
,
dim
,
domain_size
)
BIND
(
C
,
NAME
=
"ALL_set_min_domain_size_f"
)
USE
ISO_C_BINDING
INTEGER
(
c_int
),
VALUE
::
dim
REAL
(
c_double
),
DIMENSION
(
n
)
::
domain_size
INTEGER
(
c_short
),
VALUE
::
method
REAL
(
c_double
),
DIMENSION
(
dim
)
::
domain_size
TYPE
(
c_ptr
),
VALUE
::
obj
END
SUBROUTINE
SUBROUTINE
ALL_set_work_int
(
obj
,
work
)
BIND
(
C
,
NAME
=
"ALL_set_work_f"
)
...
...
@@ -102,6 +103,11 @@ MODULE ALL_module
INTEGER
(
c_int
)
::
n
REAL
(
c_double
)
::
vertices
(
*
)
END
SUBROUTINE
SUBROUTINE
ALL_print_vtk_outlines_int
(
obj
,
step
)
BIND
(
C
,
NAME
=
"ALL_print_vtk_outlines_f"
)
USE
ISO_C_BINDING
TYPE
(
c_ptr
),
VALUE
::
obj
INTEGER
(
c_int
),
VALUE
::
step
END
SUBROUTINE
END
INTERFACE
! module subroutines to be called from Fortran code
CONTAINS
...
...
@@ -111,11 +117,12 @@ MODULE ALL_module
REAL
(
8
)
::
gamma
obj
%
object
=
ALL_init_int
(
INT
(
dim
,
c_int
),
REAL
(
gamma
,
c_double
))
END
SUBROUTINE
SUBROUTINE
ALL_set_min_domain_size
(
obj
,
dim
,
domain_size
)
SUBROUTINE
ALL_set_min_domain_size
(
obj
,
method
,
dim
,
domain_size
)
INTEGER
(
c_short
)
::
method
INTEGER
::
dim
REAL
(
8
),
DIMENSION
(
n
)
::
domain_size
REAL
(
8
),
DIMENSION
(
dim
)
::
domain_size
TYPE
(
ALL_t
)
::
obj
CALL
ALL_set_min_domain_size
(
obj
%
object
,
dim
,
domain_size
)
CALL
ALL_set_min_domain_size
_int
(
obj
%
object
,
method
,
dim
,
domain_size
)
END
SUBROUTINE
SUBROUTINE
ALL_set_work
(
obj
,
work
)
TYPE
(
ALL_t
)
::
obj
...
...
@@ -163,5 +170,10 @@ MODULE ALL_module
REAL
(
8
)
::
vertices
(
*
)
CALL
ALL_get_new_vertices_int
(
obj
%
object
,
n
,
vertices
)
END
SUBROUTINE
SUBROUTINE
ALL_print_vtk_outlines
(
obj
,
step
)
TYPE
(
ALL_t
)
::
obj
INTEGER
::
step
CALL
ALL_print_vtk_outlines_int
(
obj
%
object
,
step
)
END
SUBROUTINE
END
MODULE
ALL_module
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