<commit_before>from openmdao.lib.datatypes.api import Float
from os import system
from openmdao.lib.components.api import ExternalCode
from openmdao.main.api import FileMetadata
from openmdao.util.filewrap import InputFileGenerator, FileParser

class WrapAbaqus_stent(ExternalCode):


    #-------------------------------------------------------------------------------
    #                                   Variables definition
    #-------------------------------------------------------------------------------


    lenght=Float(3.7, iotype='in', desc='position of the center of the first circle')
    radius_2=Float(0.4, iotype='in', desc='external radius of the top')
    radius_4=Float(4.0, iotype='in', desc='external radius of the side')
    alpha=Float(0.4, iotype='in', desc='radius_1=alpha*radius_2')
    beta=Float(1.05, iotype='in', desc= 'radius_3=beta*radius_4')

    max_mises=Float(0.0, iotype='out', desc='the maximal Von Mises stress at integration point')
    minus_max_displacement=Float(0.0, iotype='out', desc='minus the maximal displacement')


    #-------------------------------------------------------------------------------
    #                                   Component initialisation
    #-------------------------------------------------------------------------------


    def __init__(self):
        
        super(WrapAbaqus_stent,self).__init__()
        
        self.input_file = 'ark_stent.py'
        self.output_file = 'output.txt'
        self.command= ['C:/Users/tbrosse/.openmdao/gui/projects/Stent/launcher.bat'] 
            
        self.external_files = [FileMetadata(path=self.input_file, input=True), FileMetadata(path=self.output_file), ]
<commit_msg>Now compatible with OpenMDAO v0.10 or higher<commit_after>from openmdao.lib.datatypes.api import Float
from os import system
from openmdao.lib.components.api import ExternalCode
from openmdao.main.api import FileMetadata
from openmdao.util.filewrap import InputFileGenerator, FileParser

class WrapAbaqus_stent(ExternalCode):


    #-------------------------------------------------------------------------------
    #                                   Variables definition
    #-------------------------------------------------------------------------------


    lenght=Float(3.7, iotype='in', desc='position of the center of the first circle')
    radius_2=Float(0.4, iotype='in', desc='external radius of the top')
    radius_4=Float(4.0, iotype='in', desc='external radius of the side')
    alpha=Float(0.4, iotype='in', desc='radius_1=alpha*radius_2')
    beta=Float(1.05, iotype='in', desc= 'radius_3=beta*radius_4')

    max_mises=Float(0.0, iotype='out', desc='the maximal Von Mises stress at integration point')
    minus_max_displacement=Float(0.0, iotype='out', desc='minus the maximal displacement')


    #-------------------------------------------------------------------------------
    #                                   Component initialisation
    #-------------------------------------------------------------------------------


    def __init__(self):
        
        super(WrapAbaqus_stent,self).__init__()
        
        self.input_file = 'ark_stent.py'
        self.output_file = 'output.txt'
        self.command= ['cmd.exe','/c','C:/Users/tbrosse/.openmdao/gui/projects/Stent/launcher.bat'] 
            
        self.external_files = [FileMetadata(path=self.input_file, input=True), FileMetadata(path=self.output_file), ]

{'fraction_non_alphanumeric': 0.2785796766743649, 'fraction_numerical': 0.012990762124711317, 'mean_word_length': 1.6289833080424887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6469688', 'n_tokens_mistral': 934, 'n_tokens_neox': 899, 'n_words': 180}