2011-11-09 17:39:54 +05:30
|
|
|
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:
|
2011-11-17 19:35:39 +05:30
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
class MATERIAL_CONFIG():
|
|
|
|
import os,sys
|
|
|
|
|
|
|
|
def __init__(self):
|
2011-11-17 21:47:56 +05:30
|
|
|
homogenization=[]
|
2011-11-17 19:35:39 +05:30
|
|
|
|
|
|
|
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
|
2011-11-17 19:35:39 +05:30
|
|
|
|
|
|
|
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
|
|
|
|
|