FEM: frd reader, rename frd reading def

This commit is contained in:
Bernd Hahnebach
2019-01-29 23:51:11 +01:00
committed by Yorik van Havre
parent ea60b65518
commit 546cadebb8
2 changed files with 4 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ def importFrd(filename, analysis=None, result_name_prefix=None):
import ObjectsFem
if result_name_prefix is None:
result_name_prefix = ''
m = readResult(filename)
m = read_frd_result(filename)
result_mesh_object = None
if len(m['Nodes']) > 0:
if analysis:
@@ -134,7 +134,7 @@ def importFrd(filename, analysis=None, result_name_prefix=None):
# read a calculix result file and extract the nodes, displacement vectors and stress values.
def readResult(frd_input):
def read_frd_result(frd_input):
print('Read ccx results from frd file: ' + frd_input)
inout_nodes = []
inout_nodes_file = frd_input.rsplit('.', 1)[0] + '_inout_nodes.txt'

View File

@@ -45,8 +45,8 @@ class TestResult(unittest.TestCase):
def test_read_frd_massflow_networkpressure(self):
# read data from frd file
frd_file = testtools.get_fem_test_home_dir() + 'ccx/Flow1D_thermomech.frd'
import feminout.importCcxFrdResults as importCcxFrdResults
frd_content = importCcxFrdResults.readResult(frd_file)
from feminout.importCcxFrdResults import read_frd_result as read_frd
frd_content = read_frd(frd_file)
# do something with the read data
frd_content_len = []