<commit_before>r"""
Used to configure the main parameters for each implemented model.

.. currentmodule:: compmech.aero.pistonstiffpanel.modelDB


"""
import numpy as np
from scipy.sparse import coo_matrix

from clpt import *
from fsdt import *

db = {
    'clpt_donnell_bc1': {
                    'linear static': True,
                    'linear buckling': True,
                    'non-linear static': False,
                    'commons': clpt_commons_bc1,
                    'linear': clpt_donnell_bc1_linear,
                    'non-linear': None,
                    'dofs': 3,
                    'e_num': 6,
                    'num0': 0,
                    'num1': 3,
                    },
    'fsdt_donnell_bc1': {
                    'linear static': True,
                    'linear buckling': True,
                    'non-linear static': False,
                    'commons': fsdt_commons_bc1,
                    'linear': fsdt_donnell_bc1_linear,
                    'non-linear': None,
                    'dofs': 5,
                    'e_num': 6,
                    'num0': 0,
                    'num1': 5,
                    },
    }

def get_linear_matrices(p):
    r"""Obtain the right functions to calculate hte linear matrices
    for a given model.

    The ``model`` parameter of the ``ConeCyl`` object is used to search for
    functions ``fG0``, ``fkG0``, ``fkA``, ``fkM``and the matrix ``k0edges`` is
    calculated, when applicable.

    Parameters
    ----------
    p : compmech.aero.pistonstiffpanel.AeroPistonPlate
        The ``AeroPistonPlate`` object.

    Returns
    -------
    out : tuple
        A tuple containing ``(fk0, fkG0, fkA, fkM, fk0edges, fk0stiff,
        fkMstiff)``.

    """
    model = p.model

    fk0 = db[model]['linear'].fk0
    fkG0 = db[model]['linear'].fkG0
    fkA = db[model]['linear'].fkA
    fkM = db[model]['linear'].fkM
    fk0edges = db[model]['linear'].fk0edges
    fk0stiff = db[model]['linear'].fk0stiff
    fkMstiff = db[model]['linear'].fkMstiff

    return fk0, fkG0, fkA, fkM, fk0edges, fk0stiff, fkMstiff

<commit_msg>ENH: added sanders, support for kAx and kAy<commit_after>r"""
Used to configure the main parameters for each implemented model.

.. currentmodule:: compmech.aero.pistonstiffpanel.modelDB


"""
import numpy as np
from scipy.sparse import coo_matrix

from clpt import *
from fsdt import *

db = {
    'clpt_donnell_bc1': {
                    'linear static': True,
                    'linear buckling': True,
                    'non-linear static': False,
                    'commons': clpt_commons_bc1,
                    'linear': clpt_donnell_bc1_linear,
                    'non-linear': None,
                    'dofs': 3,
                    'e_num': 6,
                    'num0': 0,
                    'num1': 3,
                    },
    'clpt_sanders_bc1': {
                    'linear static': True,
                    'linear buckling': True,
                    'non-linear static': False,
                    'commons': clpt_commons_bc1,
                    'linear': clpt_sanders_bc1_linear,
                    'non-linear': None,
                    'dofs': 3,
                    'e_num': 6,
                    'num0': 0,
                    'num1': 3,
                    },
    'fsdt_donnell_bc1': {
                    'linear static': True,
                    'linear buckling': True,
                    'non-linear static': False,
                    'commons': fsdt_commons_bc1,
                    'linear': fsdt_donnell_bc1_linear,
                    'non-linear': None,
                    'dofs': 5,
                    'e_num': 6,
                    'num0': 0,
                    'num1': 5,
                    },
    }

def get_linear_matrices(p):
    r"""Obtain the right functions to calculate hte linear matrices
    for a given model.

    The ``model`` parameter of the ``ConeCyl`` object is used to search for
    functions ``fG0``, ``fkG0``, ``fkAx``, ``fkAy``, ``fkM``and the matrix
    ``k0edges`` is calculated, when applicable.

    Parameters
    ----------
    p : compmech.aero.pistonstiffpanel.AeroPistonPlate
        The ``AeroPistonPlate`` object.

    Returns
    -------
    out : tuple
        A tuple containing ``(fk0, fkG0, fkAx, fkAy, fkM, fk0edges, fk0stiff,
        fkMstiff)``.

    """
    model = p.model

    fk0 = db[model]['linear'].fk0
    fkG0 = db[model]['linear'].fkG0
    fkAx = db[model]['linear'].fkAx
    fkAy = db[model]['linear'].fkAy
    fkM = db[model]['linear'].fkM
    fk0edges = db[model]['linear'].fk0edges
    fk0stiff = db[model]['linear'].fk0stiff
    fkMstiff = db[model]['linear'].fkMstiff

    return fk0, fkG0, fkAx, fkAy, fkM, fk0edges, fk0stiff, fkMstiff


{'fraction_non_alphanumeric': 0.1252359974826935, 'fraction_numerical': 0.017411369834277324, 'mean_word_length': 1.55382967327263, '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': '3420838', 'n_tokens_mistral': 1622, 'n_tokens_neox': 1501, 'n_words': 352}