FE requirements¶
Finite element requirements are a simple way to communicate the needs and expectations of a finite element.
FE requirements are used to pass information from assemblers to finite elements.
Construction and usage¶
Usually the construction is as follows:
All the methods return a reference to FErequirements
, so they can be chained together.
As in line 2, the finite element solution can also be inserted. The solution is passed with the enum
type
FESolutions::displacement
vector d
. This stores a reference to the vector.
Additionally, if some parameters are to be passed, use the method insertParameter
(line 3), where, similar to the
global solutions, an enum
type of FEParameter::loadfactor
is passed to indicate the meaning of the parameter,
followed by its value.
Finally, the method addAffordance
is used to indicate the request required from the finite element.
Thus, there exist scalar, vector, matrix and general affordance collections.
Currently, the following are defined:
#include <Eigen/Core>
#include <ikarus/finiteelements/feresulttypes.hh>
#include <ikarus/utils/makeenum.hh>
namespace Ikarus {
// clang-format off
/**
* ScalarAffordance
* \ingroup Affordancetags
* \brief A strongly typed enum class representing the scalar affordance
*/
// cppcheck-suppress MAKE_ENUM
MAKE_ENUM(ScalarAffordance,
noAffordance,
mechanicalPotentialEnergy,
microMagneticPotentialEnergy
);
/**
* VectorAffordance
* \ingroup Affordancetags
* \brief A strongly typed enum class representing the vector affordance
*/
MAKE_ENUM(VectorAffordance,
noAffordance,
forces,
microMagneticForces
);
/**
* MatrixAffordance
* \ingroup Affordancetags
Inside the finite element, the information can then be conveniently extracted:
Thus, the local finite element can be developed.
Affordance
It is good style to indicate that you cannot fulfill an affordance by throwing an appropriate exception!
FE result requirements¶
Bug
This section is outdated!
In addition to the above-mentioned finite element requirements, there are also result requirements.
They accept the same parameter types as the FErequirements
and add one more, the ResultType
.
These are used in the calculateAt
method of finite elements.
They are used to communicate the results required from the finite elements.
Its construction is shown below:
The current supported results are:
*/
MAKE_ENUM(MatrixAffordance,
noAffordance,
stiffness,
materialstiffness,
geometricstiffness,
stiffnessdiffBucklingVector,
microMagneticHessian,
mass
);
The interface for result requirements is similar to the finite element requirements. They do, however, support querying specific results to be calculated.