Skip to content

Commit

Permalink
Release 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
imirzov committed Jul 25, 2020
1 parent 65c41e0 commit fe595ba
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 147 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ In Windows to work with subroutines and to recompile CalculiX sources from CAE y

Do not skip comments while parsing the INP file. Keep comments on file save.

Replaced converters binaries with source code version. It reduced distro weight from 15 to 30 MB.
Replaced converters binaries with source code version. It reduced distro weight up to 13 MB.

Both source code and binaries could be started via cae.sh and cae.bat.

Expand Down
4 changes: 2 additions & 2 deletions cae.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set CAE=%DIR%src\cae.exe

if exist %CAE% (
echo Running binary.
start "" %CAE% %*
) else (
echo Binary does not exist. Running source code.
set CAE=%DIR%src\cae.py
start "" pythonw %CAE% %*
)

start "" pythonw %CAE% %*
2 changes: 1 addition & 1 deletion make_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def copy(src, dst, skip):
skip += ('.git', '.gitignore', '.py', 'tests.log',
'dist', 'gui', 'model', 'backup', 'releases',
'default.log', 'importer.log', 'ARPACK',
'SPOOLES.2.2', '.md', '.vscode')
'SPOOLES.2.2', '.md', '.vscode', 'utils')

# Copy files and folders from sources to 'dist'
copy('.', 'dist', skip)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/ccx2paraview/VTKWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import logging
import math

import frd2vtk
from utils.ccx2paraview import frd2vtk


# Write element connectivity with renumbered nodes
Expand Down
2 changes: 1 addition & 1 deletion src/utils/ccx2paraview/VTUWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import logging
import math

import frd2vtk
from utils.ccx2paraview import frd2vtk


# Write element connectivity with renumbered nodes
Expand Down
20 changes: 8 additions & 12 deletions src/utils/ccx2paraview/ccx2paraview.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
import logging
import argparse

sys_path = os.path.dirname(__file__)
sys.path.append(sys_path)
import FRDParser
import VTKWriter
import VTUWriter
import PVDWriter
from utils.ccx2paraview import FRDParser
from utils.ccx2paraview import VTKWriter
from utils.ccx2paraview import VTUWriter
from utils.ccx2paraview import PVDWriter
import clean


Expand All @@ -42,9 +40,8 @@ def __init__(self, file_name, fmt):
def run(self):

# Parse FRD-file
relpath = os.path.relpath(self.file_name,
start=os.path.dirname(__file__))
logging.info('Parsing ' + relpath)
base_name = os.path.basename(self.file_name)
logging.info('Parsing ' + base_name)
p = FRDParser.Parse(self.file_name)

# If file contains mesh data
Expand Down Expand Up @@ -74,9 +71,8 @@ def run(self):
# For each time increment generate separate .vt* file
# Output file name will be the same as input
for t, file_name in times_names.items():
relpath = os.path.relpath(file_name,
start=os.path.dirname(__file__))
logging.info('Writing ' + relpath)
base_name = os.path.basename(file_name)
logging.info('Writing ' + base_name)
if self.fmt == 'vtk':
VTKWriter.writeVTK(p, file_name, t)
if self.fmt == 'vtu':
Expand Down
59 changes: 0 additions & 59 deletions src/utils/ccx2paraview/clean.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/utils/unv2ccx/UNVParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import logging

import FEM
from utils.unv2ccx import FEM
FLAG = ' -1'


Expand Down
59 changes: 0 additions & 59 deletions src/utils/unv2ccx/clean.py

This file was deleted.

16 changes: 6 additions & 10 deletions src/utils/unv2ccx/unv2ccx.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
import argparse
import logging

sys_path = os.path.dirname(__file__)
sys.path.append(sys_path)
from utils.unv2ccx import UNVParser
from utils.unv2ccx import INPWriter
import clean
import UNVParser
import INPWriter


class Converter:
Expand All @@ -31,15 +29,13 @@ def __init__(self, unv_file_name):
def run(self):

# Parse UNV file
relpath = os.path.relpath(self.unv_file_name,
start=os.path.dirname(__file__))
logging.info('Parsing ' + relpath)
base_name = os.path.basename(self.unv_file_name)
logging.info('Parsing ' + base_name)
fem = UNVParser.UNVParser(self.unv_file_name).parse()

# Write INP file
relpath = os.path.relpath(self.inp_file_name,
start=os.path.dirname(__file__))
logging.info('Writing ' + relpath)
base_name = os.path.basename(self.inp_file_name)
logging.info('Writing ' + base_name)
INPWriter.write(fem, self.inp_file_name)


Expand Down

0 comments on commit fe595ba

Please sign in to comment.