restflow.hf3binding

Functions

dict_to_xml(map)
param map:
dictionfy(tree) Creates a dictionary structure from a simple xml tree.
generate_id()
indent(string[, prefix]) indent the given string by prefix
md(*args) creates an directory silently
merge_dict(base, update) merges to dictionaries
read_ugrid(filename)
read_xml(filename) Reads an xml file
update_bcdata(bcfilename) Returns a dictionary fragment for updating the bcdata field.
update_meshfile(f) Returns a dictionary fragment for updating the mesh filename in hf3.
update_output_folder(folder) Returns a fragment for updating the output folder in hf3.
update_runtime_informations(steps, duration) Returns a fragment for updating the amount of steps and duration of a step.
write_stl(ugrid, filename)
write_surface(ugrid, filename)
write_vtk(ugrid, filename)
write_vtu(ugrid, filename[, mode])

Classes

AbstractHf3Session() Abstract base class for the Remote or Local Hiflow3 session.
Hiflow3Session(working_dir) This class handles session of the elasticity executable.
defaultdict defaultdict(default_factory[, ...]) –> dict with default factory
dstruct() A magic class, that creates new config entries on access.
path Represents a filesystem path.
class restflow.hf3binding.Hiflow3Session(working_dir)[source]

Bases: restflow.base.AbstractHf3Session

This class handles session of the elasticity executable.

  • It holds both configuration files (bcdata and hf3data) in memory.
  • It sets the last mesh as the input of the next run
  • Provides access to results
bcdataxml()[source]

Returns the bc data as xml string. :rtype: str

get_result(step)[source]

Returns the filename for step

This is a pvtu file.

Return type:path.path
get_result_files()[source]

Returns all result files after SOLUTION_FILENAME

Returns:a list of path.path
Return type:list[path.path]
hf3xml()[source]

Returns hf3 data structure as xml string :rtype: str

run()[source]

Runs elasticity.

  • First prepares the configuration files for the run (`self._run´). * sets the last mesh result as new input mesh
  • Creates output folder
Raises:BaseException if elasticity returned with errorlevel != 0, checkout self.workingdir/outptu_{self._run}.txt for more information.
Returns:something undefined
working_dir[source]

the working dir for elasticity (holds all configs and results)

restflow.hf3binding.SOLUTION_FILENAME = '_deformedSolution_np{np}_RefLvl{rlvl}_Tstep.{step}.pvtu'

Filename of result files written by elasticity. Filename is parameterized by:

Np:number of parallel threads
Rlvl:refinement level
Step:step
restflow.hf3binding.md(*args)[source]

creates an directory silently

Related Topics

This Page