Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
HO_homog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Baptiste Durand
HO_homog
Commits
ce07d3d6
Commit
ce07d3d6
authored
Dec 09, 2020
by
Baptiste Durand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply fix for periodic mesh
Original commit for this change:
0b6c4d15
parent
7d5f2442
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
ho_homog/geometry/curves.py
ho_homog/geometry/curves.py
+1
-1
ho_homog/mesh_generate/__init__.py
ho_homog/mesh_generate/__init__.py
+17
-8
No files found.
ho_homog/geometry/curves.py
View file @
ce07d3d6
...
...
@@ -208,7 +208,7 @@ class AbstractCurve(Curve):
"""
bndry_logger
.
debug
(
f
"Abstract Curve -> get_boundary. self.tag :
{
self
.
tag
}
"
)
def_pts
=
[]
boundary
=
model
.
getBoundary
((
1
,
self
.
tag
),
combined
=
False
)
boundary
=
model
.
getBoundary
((
1
,
self
.
tag
),
False
,
False
,
False
)
bndry_logger
.
debug
(
f
"Abstract Curve -> get_boundary. raw API return :
{
boundary
}
"
)
...
...
ho_homog/mesh_generate/__init__.py
View file @
ce07d3d6
...
...
@@ -230,15 +230,24 @@ class Gmsh2DRVE(object):
else
:
try
:
s
=
one
(
rve_s
)
boundary
=
geo
.
AbstractSurface
.
get_surfs_boundary
(
s
)
boundary
=
geo
.
AbstractSurface
.
get_surfs_boundary
(
s
,
recursive
=
False
)
except
ValueError
:
boundary
=
geo
.
AbstractSurface
.
get_surfs_boundary
(
rve_s
)
factory
.
synchronize
()
micro_bndry
=
[
geo
.
macro_line_fragments
(
boundary
,
M_ln
)
for
M_ln
in
macro_bndry
]
macro_dir
=
[
macro_bndry
[
i
].
def_pts
[
-
1
].
coord
-
macro_bndry
[
i
].
def_pts
[
0
].
coord
for
i
in
range
(
len
(
macro_bndry
)
//
2
)
]
boundary
=
geo
.
AbstractSurface
.
get_surfs_boundary
(
rve_s
,
recursive
=
False
)
for
b
in
boundary
:
b
.
get_boundary
(
get_coords
=
True
)
# factory.synchronize()
micro_bndry
=
list
()
for
macro_line
in
macro_bndry
:
fragments
=
geo
.
macro_line_fragments
(
boundary
,
macro_line
)
for
c
in
fragments
:
c
.
gmsh_type
=
model
.
getType
(
1
,
c
.
tag
)
lines_only
=
[
c
for
c
in
fragments
if
c
.
gmsh_type
==
"Line"
]
micro_bndry
.
append
(
lines_only
)
macro_dir
=
list
()
for
i
in
range
(
len
(
macro_bndry
)
//
2
):
macro_line
=
macro_bndry
[
i
]
direction
=
macro_line
.
def_pts
[
-
1
].
coord
-
macro_line
.
def_pts
[
0
].
coord
macro_dir
.
append
(
direction
)
for
i
,
crvs
in
enumerate
(
micro_bndry
):
msh
.
order_curves
(
crvs
,
macro_dir
[
i
%
2
],
orientation
=
True
)
msh
.
set_periodicity_pairs
(
micro_bndry
[
0
],
micro_bndry
[
2
])
...
...
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