#
####

## import modules
import os
from feval.ModelData import *
from feval.fecodes.gmsh.GMSHFile import *
from feval.fecodes.tochnog.TochnogFile import *

## file names
infilename  = os.path.join(feval.__path__[0],'data','gmsh','simple.gmsh')
outfilename = os.path.join(feval.__path__[0],'data','gmsh','simple_tochnog.dat')

## initalize a FE-Model (data container with "intelligence")
m = ModelData()

## read the GMSH input file
mf = GMSHFile(m)
mf.readFile(infilename)

## initailise the Tochnog File
ff = TochnogFile(m)

## set the blocks which are written to the file 
ff.setWrite('node')
ff.setWrite('element')

## write the file
ff.writeFile(outfilename)

## 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)

Example #3
0
## 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)