Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Micropp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ggiuntol
Micropp
Commits
45af71c1
Commit
45af71c1
authored
Aug 08, 2019
by
Guido Giuntoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementing the homogenize linear public funcion
parent
eff497f5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
0 deletions
+36
-0
include/micro.hpp
include/micro.hpp
+2
-0
include/micropp_c.h
include/micropp_c.h
+2
-0
src/homogenize.cpp
src/homogenize.cpp
+20
-0
src/micro.f95
src/micro.f95
+6
-0
src/micropp_c.cpp
src/micropp_c.cpp
+6
-0
No files found.
include/micro.hpp
View file @
45af71c1
...
...
@@ -341,6 +341,8 @@ class micropp {
void
homogenize
();
void
homogenize_linear
();
/* Extras */
int
is_non_linear
(
const
int
gp_id
)
const
;
...
...
include/micropp_c.h
View file @
45af71c1
...
...
@@ -51,6 +51,8 @@ extern "C" {
void
micropp3_homogenize
(
struct
micropp3
*
self
);
void
micropp3_homogenize_linear
(
struct
micropp3
*
self
);
void
micropp3_update_vars
(
struct
micropp3
*
self
);
bool
micropp3_is_non_linear
(
const
struct
micropp3
*
self
,
...
...
src/homogenize.cpp
View file @
45af71c1
...
...
@@ -57,6 +57,26 @@ void micropp<tdim>::get_ctan(const int gp_id, double *ctan) const
}
template
<
int
tdim
>
void
micropp
<
tdim
>::
homogenize_linear
()
{
INST_START
;
#pragma omp parallel for schedule(dynamic,1)
for
(
int
igp
=
0
;
igp
<
ngp
;
++
igp
)
{
gp_t
<
tdim
>
*
gp_ptr
=
&
gp_list
[
igp
];
/*
* Computational cheap calculation
* stress = ctan_lin * strain
*/
homogenize_linear
(
gp_ptr
);
}
}
template
<
int
tdim
>
void
micropp
<
tdim
>::
homogenize
()
{
...
...
src/micro.f95
View file @
45af71c1
...
...
@@ -91,6 +91,12 @@ module libmicropp
type
(
micropp3
),
intent
(
inout
)
::
this
end
subroutine
micropp3_homogenize
subroutine
micropp3_homogenize_linear
(
this
)
bind
(
C
)
import
micropp3
implicit
none
type
(
micropp3
),
intent
(
inout
)
::
this
end
subroutine
micropp3_homogenize_linear
logical
(
c_bool
)
function
micropp3_is_non_linear
(
this
,
gp_id
)
bind
(
C
)
use
,
intrinsic
::
iso_c_binding
,
only
:
c_bool
,
c_int
import
micropp3
...
...
src/micropp_c.cpp
View file @
45af71c1
...
...
@@ -88,6 +88,12 @@ extern "C" {
ptr
->
homogenize
();
}
void
micropp3_homogenize_linear
(
micropp3
*
self
)
{
micropp
<
3
>
*
ptr
=
(
micropp
<
3
>
*
)
self
->
ptr
;
ptr
->
homogenize_linear
();
}
int
micropp3_get_cost
(
const
micropp3
*
self
,
int
gp_id
)
{
micropp
<
3
>
*
ptr
=
(
micropp
<
3
>
*
)
self
->
ptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment