<commit_before>from __future__ import division
import gc
import os
import sys
import traceback
from collections import Iterable
import time
import cPickle
import __main__

import numpy as np
from scipy.sparse import csr_matrix
from scipy.sparse.linalg import eigsh
from scipy.optimize import leastsq
from numpy import linspace, cos, sin, deg2rad

import compmech.composite.laminate as laminate
from compmech.analysis import Analysis
from compmech.logger import msg, warn
from compmech.constants import DOUBLE
from compmech.sparse import (make_symmetric, solve, remove_null_cols,
                             is_symmetric)
import modelDB


def load(name):
    if '.KPanelT' in name:
        return cPickle.load(open(name, 'rb'))
    else:
        return cPickle.load(open(name + '.KPanelT', 'rb'))


class KPanelT(object):
    r"""Conical (Konus) panel using trigonometric series

    The approximation functions for the displacement field are:

        .. math::
            \begin{tabular}{l c r}
            CLPT & FSDT \\
            \hline
            $u$ & $u$ \\
            $v$ & $v$ \\
            $w$ & $w$ \\
            $NA$ & $\phi_x$ \\
            $NA$ & $\phi_\theta$ \\
            \end{tabular}

    with:

        .. math::
            u = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_a}}
            \\
            v = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_a}}
            \\
            w = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_b}}
            \\
            \phi_x = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_a}}
            \\
            \phi_\theta = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_a}}
            \\
            f_a = cos(i_1 \pi b_x)cos(j_1 \pi b_\theta)
            \\
            f_b = sin(i_1 \pi b_x)sin(j_1 \pi b_\theta)
            \\
            b_x = \frac{x + \frac{L}{2}}{L}
            \\
            b_\theta = \frac{\theta - \theta_{min}}{\theta_{max}-\theta_{min}}

    """
    def __init__(self):
        self.name = ''
        self.forces = []
        self.forces_inc = []
        self.alphadeg = 0.
        self.alpharad = 0.
        self.is_cylinder = None

        # boundary conditions
        self.inf = 1.e8 # used to define high stiffnesses
        self.zero = 0. # used to define zero stiffnesses
        self.bc = None
        self.kuBot = self.inf
        self.kvBot = self.inf
        self.kwBot = self.inf
        self.kphixBot = 0.
        self.kphitBot = 0.
        self.kuTop = self.inf
        self.kvTop = self.inf
        self.kwTop = self.inf
        self.kphixTop = 0.
        self.kphitTop = 0.
        self.kuLeft = self.inf
        self.kvLeft = self.inf
        self.kwLeft = self.inf
        self.kphixLeft = 0.
        self.kphitLeft = 0.
        self.kuRight = self.inf
        self.kvRight = self.inf
        self.kwRight = self.inf
        self.kphixRight = 0.
        self.kphitRight = 0.

        # default equations
        self.model = 'clpt_donnell_bc4'

        # approximation series
        self.m1 = 40
        self.n1 = 40

        # analytical integration for cones
        self.s = 79

        # loads
        self.Fx = None
        self.Ft = None
        self.Fxt = None
        self.Ftx = None
        self.NxxTop = None
        self.NxtTop = None
        self.NttLeft = None
        self.NtxLeft = None
        self.Fx_inc = None
        self.Ft_inc = None
        self.Fxt_inc = None
        self.Ftx_inc = None
        self.NxxTop_inc = None
        self.NxtTop_inc = None
        self.NttLeft_inc = None
        self.NtxLeft_inc = None

        # initial imperfection
        self.c0 = None
        self.m0 = 0
        self.n0 = 0
        self.funcnum = 2

        self.r1 = None
        self.r2 = None
        self.L = None
        self.tmindeg = None
        self.tmaxdeg = None<commit_msg>STY: classification of attributes<commit_after>from __future__ import division
import gc
import os
import sys
import traceback
from collections import Iterable
import time
import cPickle
import __main__

import numpy as np
from scipy.sparse import csr_matrix
from scipy.sparse.linalg import eigsh
from scipy.optimize import leastsq
from numpy import linspace, cos, sin, deg2rad

import compmech.composite.laminate as laminate
from compmech.analysis import Analysis
from compmech.logger import msg, warn
from compmech.constants import DOUBLE
from compmech.sparse import (make_symmetric, solve, remove_null_cols,
                             is_symmetric)
import modelDB


def load(name):
    if '.KPanelT' in name:
        return cPickle.load(open(name, 'rb'))
    else:
        return cPickle.load(open(name + '.KPanelT', 'rb'))


class KPanelT(object):
    r"""Conical (Konus) panel using trigonometric series

    The approximation functions for the displacement field are:

        .. math::
            \begin{tabular}{l c r}
            CLPT & FSDT \\
            \hline
            $u$ & $u$ \\
            $v$ & $v$ \\
            $w$ & $w$ \\
            $NA$ & $\phi_x$ \\
            $NA$ & $\phi_\theta$ \\
            \end{tabular}

    with:

        .. math::
            u = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_a}}
            \\
            v = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_a}}
            \\
            w = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_b}}
            \\
            \phi_x = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_a}}
            \\
            \phi_\theta = \sum_{i_1=0}^{m_1}{\sum_{j_1=0}^{n_1}{f_a}}
            \\
            f_a = cos(i_1 \pi b_x)cos(j_1 \pi b_\theta)
            \\
            f_b = sin(i_1 \pi b_x)sin(j_1 \pi b_\theta)
            \\
            b_x = \frac{x + \frac{L}{2}}{L}
            \\
            b_\theta = \frac{\theta - \theta_{min}}{\theta_{max}-\theta_{min}}

    """
    def __init__(self):
        self.name = ''
        self.alphadeg = 0.
        self.alpharad = 0.
        self.is_cylinder = None

        # boundary conditions
        self.inf = 1.e8 # used to define high stiffnesses
        self.zero = 0. # used to define zero stiffnesses
        self.bc = None
        self.kuBot = self.inf
        self.kvBot = self.inf
        self.kwBot = self.inf
        self.kphixBot = 0.
        self.kphitBot = 0.
        self.kuTop = self.inf
        self.kvTop = self.inf
        self.kwTop = self.inf
        self.kphixTop = 0.
        self.kphitTop = 0.
        self.kuLeft = self.inf
        self.kvLeft = self.inf
        self.kwLeft = self.inf
        self.kphixLeft = 0.
        self.kphitLeft = 0.
        self.kuRight = self.inf
        self.kvRight = self.inf
        self.kwRight = self.inf
        self.kphixRight = 0.
        self.kphitRight = 0.

        # default equations
        self.model = 'clpt_donnell_bc4'

        # approximation series
        self.m1 = 40
        self.n1 = 40

        # analytical integration for cones
        self.s = 79

        # loads
        self.Fx = None
        self.Ft = None
        self.Fxt = None
        self.Ftx = None
        self.NxxTop = None
        self.NxtTop = None
        self.NttLeft = None
        self.NtxLeft = None
        self.Fx_inc = None
        self.Ft_inc = None
        self.Fxt_inc = None
        self.Ftx_inc = None
        self.NxxTop_inc = None
        self.NxtTop_inc = None
        self.NttLeft_inc = None
        self.NtxLeft_inc = None
        self.forces = []
        self.forces_inc = []

        # initial imperfection
        self.c0 = None
        self.m0 = 0
        self.n0 = 0
        self.funcnum = 2

        self.r1 = None
        self.r2 = None
        self.L = None
        self.tmindeg = None
        self.tmaxdeg = None
{'fraction_non_alphanumeric': 0.11624539231174302, 'fraction_numerical': 0.017377567140600316, 'mean_word_length': 1.5561911170928668, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '921396', 'n_tokens_mistral': 2670, 'n_tokens_neox': 2579, 'n_words': 576}