self.Conn = newConn if self.Sets.has_key('elem'): for key, set in self.Sets['elem'].items(): newelem = [] for n in set: newelem.append(trans[n]) self.Sets['elem'][key] = newelem self.makeModelCache() self.dirty['Conn'] = True return trans if __name__ == '__main__': from feval.FEval import * m = FEModel() from feval.fecodes.marc.MarcFile import * mf = MarcFile(m) mf.readFile('../data/marc/test1.dat') #mf.readInc(2) vars = m.getNodVarsAsArray() m.update() print m eidx = m.renumberElements(base=0) nidx = m.renumberNodes(base=0) print m
newnr += 1 self.Conn = newConn if self.Sets.has_key('elem'): for key, set in self.Sets['elem'].items(): newelem = [] for n in set: newelem.append(trans[n]) self.Sets['elem'][key] = newelem self.makeModelCache() self.dirty['Conn'] = True return trans if __name__ == '__main__': from feval.FEval import * m = FEModel() from feval.fecodes.marc.MarcFile import * mf = MarcFile(m) mf.readFile('../data/marc/test1.dat') #mf.readInc(2) vars = m.getNodVarsAsArray() m.update() print m eidx = m.renumberElements(base=0) nidx = m.renumberNodes(base=0) print m
## import modules import os from feval.ModelData import * from feval.fecodes.marc.MarcFile import * from feval.fecodes.tochnog.TochnogFile import * ## file names infilename = os.path.join( feval.__path__[0], 'data', 'marc', 'test1.dat' ) outfilename = os.path.join( feval.__path__[0], 'data', 'marc', 'test1_tochnog.dat' ) ## initalize a FE-Model (data container with "intelligence") m = ModelData() ## read the Marc input file mf = MarcFile(m) mf.readFile(infilename) ## initailise the Femtool File tn = TochnogFile(m) ## set the blocks which are written to the file #tn.setWrite('number_of_space_dimensions') #tn.setWrite('echo') tn.setWrite('element') tn.setWrite('node') ## write the file tn.writeFile(outfilename)
## import modules import os from feval.ModelData import * from feval.fecodes.marc.MarcFile import * from feval.fecodes.femtool.FemtoolFile import * ## file names inputfilename = os.path.expanduser('~/projects/illimani/marc/ia.dat') outfilename = os.path.expanduser('~/projects/illimani/fem/ia.dat') ## initalize a FE-Model (data container with "intelligence") m = ModelData() ## read the Marc input file mf = MarcFile(m) mf.readFile(inputfilename) ## initailise the Femtool File ff = FemtoolFile(m) ## calculate and set boundary conditions in the Femtool file ## print available node sets in the Model with ## print m.Sets['node'].keys() print m.getSetTypes() ## set surface boundary conditions (p) boundnodes = [] try: boundnodes.extend( m.getSet('node','surf_all') )
## import modules import os from feval.ModelData import * from feval.fecodes.marc.MarcFile import * from feval.fecodes.femtool.FemtoolFile import * ## file names inputfilename = os.path.expanduser('~/projects/illimani/marc/ia.dat') outfilename = os.path.expanduser('~/projects/illimani/fem/ia.dat') ## initalize a FE-Model (data container with "intelligence") m = ModelData() ## read the Marc input file mf = MarcFile(m) mf.readFile(inputfilename) ## initailise the Femtool File ff = FemtoolFile(m) ## calculate and set boundary conditions in the Femtool file ## print available node sets in the Model with ## print m.Sets['node'].keys() print m.getSetTypes() ## set surface boundary conditions (p) boundnodes = [] try: boundnodes.extend(m.getSet('node', 'surf_all'))