-
Notifications
You must be signed in to change notification settings - Fork 279
Open
Labels
GeoMechanicsIssues related to the GeoMechanicsApplicationIssues related to the GeoMechanicsApplication
Description
As a developer, I would like to have a class that represents a (
Class design
- The class will store the values of
$p$ and$q$ in a fixed-size arraymValues(with a size of 2). - The class will have member functions
PandQthat return references to the corresponding elements of the array. This will make it easier to read expressions that operate on the component level. - The class will be default-constructible, which will yield an instance with
$p = 0$ and$q = 0$ . - The class can also be instantiated with any vector of size 2. In addition, a constructor will be provided that receives a
std::initializer_list<double>(which must have a size of 2). Attempting to instantiate this class with a vector or initializer list with an incorrect size results in throwing an exception. - The class will have a template member function
CopyTothat copies the internal array to a container of the specified type. This will help to pass the values of$p$ and$q$ to functions that expect a vector type, e.g.Vector.
Needless to say, all the above mentioned functionality should be covered by unit tests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
GeoMechanicsIssues related to the GeoMechanicsApplicationIssues related to the GeoMechanicsApplication