DAMASK_EICMD/lib/damask_tools.py

46 lines
1.0 KiB
Python
Raw Normal View History

class DAMASK_TOOLS():
import os,string
def check_env(self):
import os
if os.getenv('DAMASK_ROOT') is None:
print('No DAMASK_ROOT environment variable, did you run DAMASK/installation/setup_shellrc?')
sys.exit(1)
else:
return True
class MATERIAL_CONFIG():
import os,sys
def __init__(self):
2011-11-17 21:47:56 +05:30
homogenization=[]
def add_homogenization(self, name=None, type=None):
if type is 'isostrain':
2011-11-17 21:47:56 +05:30
h={'type':type}
h['ngrains']=ngrains
return h
def add_crystallite(self, name=None):
pass
def add_texture(self, name=None):
pass
def add_phase(self, name=None):
pass
def add_microstructure(self, name=None, phase=None, texture=None):
pass
def write_file(self,label=None):
fname='material.config'
if label is not None: fname+='_%s'%label
#f=open(fname)
#f.write()
#f.close()
class HOMOGENIZATION():
2011-11-17 21:47:56 +05:30
type=None