Skip to content
Snippets Groups Projects
oofem_classes.py 1.34 KiB
Newer Older
  • Learn to ignore specific revisions
  • Ernesto Oquelis's avatar
    Ernesto Oquelis committed
    """
    This is an empty docstring.
    """
    
    import numpy as np
    
    class Force:
        """
        This is a missing docstring.
        """
    
        def __init__(self, components):
            self.components = np.array(components, dtype='float64')
    
        def get_component(self, c_component):
            """
            Docstrig missing.
            """
            return self.components[c_component]
    
        def print(self):
            """
            Docstrig missing.
            """
            print('{}'.format(self.components))
    
    
    class Constraint:
        """
        This is a missing docstring.
        """
    
        def __init__(self, free):
            self.free = free
    
        def is_free(self, c_component):
            """
            Docstrig missing.
            """
            return self.free[c_component]
    
        def print(self):
            """
            Docstrig missing.
            """
            print('{}'.format(self.free))
    
    
    class Node:
        """
        This is a missing docstring.
        """
    
        def __init__(self, position, constraint=Constraint(), force=Force()):
            self.position = position
            self.constraint = constraint
            self.force = force
    
        def set_constraint(self, new_constraint):
            self.constraint = new_constraint
    
        def get_constraint(self, c_component):
            return self.constraint
    
        def set_force(self, new_force):
            self.force = new_force
    
        def get_force(self):
            return self.force