Page MenuHomec4science

xdfm_convert.py
No OneTemporary

File Metadata

Created
Tue, Dec 24, 03:36

xdfm_convert.py

#!/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