Skip to content

Unused ElementBase parameter in section stiffness methods #53

@JohnDN90

Description

@JohnDN90

I'm been implementing some tests in MAST using Catch2. I've noticed in the 1D and 2D section property cards that the section stiffness properties require a MAST::ElementBase reference as an input parameter, however they are never actually used anywhere in the calculations. From a testing standpoint, this would require the creation of a MAST::ElementBase object which, I believe, would also require the creation of MAST::SystemInitialization, MAST::AssemblyBase, and MAST::GeomElem objects as well in order to test a "section" card.

To get around this in the 2D element, I overloaded those methods (e.g. stiffness_A_matrix, stiffness_B_matrix, etc.) where the overloaded method does not require any input parameters. This removes the need to create those other MAST objects which aren't actually used and simplifies the test. Intuitively, I think this make a bit more sense as well since an element depends on a section, but a section shouldn't depend on an element.

Before, I do the same for 1D elements. I wanted to get thoughts on this. Is there a particular reason these sections are set up to require an MAST::ElementBase input parameter when its not used? Is there any obvious disadvantages to me creating these overloaded methods for testing purposes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions