Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96248184
xdfm_convert.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Dec 24, 03:36
Size
672 B
Mime Type
text/x-python
Expires
Thu, Dec 26, 03:36 (2 d)
Engine
blob
Format
Raw Data
Handle
23142835
Attached To
R11910 Additive Manufacturing Work
xdfm_convert.py
View Options
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 7 14:12:47 2022
@author: ekinkubilay
"""
from
fenics
import
*
import
argparse
def
parse_args
():
"""
Function to handle arguments
"""
parser
=
argparse
.
ArgumentParser
(
description
=
'Run FEM of single scan on a simple box'
)
parser
.
add_argument
(
"file_name"
,
type
=
str
,
help
=
'file i/o name'
)
args
=
parser
.
parse_args
()
return
args
def
main
():
args
=
parse_args
()
mesh
=
Mesh
(
args
.
file_name
+
'.xml'
)
#in mm
xdmf_file
=
XDMFFile
(
MPI
.
comm_world
,
args
.
file_name
+
'.xdmf'
)
xdmf_file
.
write
(
mesh
)
if
__name__
==
'__main__'
:
main
()
Event Timeline
Log In to Comment