[FEM] extend displacement constraint

- add fields to specify a formula for the displacement, this is necessary to make transient deformation analyses with Elmer
- add option to set displacement from result of flow equation
- this way also a major overhaul -> simpler dialog logic etc.
This commit is contained in:
Uwe
2023-03-22 06:56:02 +01:00
parent 971785a160
commit dba00d44d0
8 changed files with 837 additions and 609 deletions

View File

@@ -40,7 +40,8 @@
using namespace FemGui;
PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintDisplacement, FemGui::ViewProviderFemConstraintOnBoundary)
PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintDisplacement,
FemGui::ViewProviderFemConstraintOnBoundary)
ViewProviderFemConstraintDisplacement::ViewProviderFemConstraintDisplacement()
{
@@ -52,7 +53,7 @@ ViewProviderFemConstraintDisplacement::~ViewProviderFemConstraintDisplacement()
{
}
//FIXME setEdit needs a careful review
// FIXME setEdit needs a careful review
bool ViewProviderFemConstraintDisplacement::setEdit(int ModNum)
{
if (ModNum == ViewProvider::Default) {
@@ -91,14 +92,16 @@ bool ViewProviderFemConstraintDisplacement::setEdit(int ModNum)
#define HEIGHT (4)
#define WIDTH (0.3)
//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - so disable
//#define USE_MULTIPLE_COPY
//OvG: MULTICOPY fails to update scaled display on initial drawing - so disable
void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop)
{
// Gets called whenever a property of the attached object changes
Fem::ConstraintDisplacement *pcConstraint =
static_cast<Fem::ConstraintDisplacement *>(this->getObject());
float scaledwidth = WIDTH * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only
// OvG: Calculate scaled values once only
float scaledwidth = WIDTH * pcConstraint->Scale.getValue();
float scaledheight = HEIGHT * pcConstraint->Scale.getValue();
bool xFree = pcConstraint->xFree.getValue();
bool yFree = pcConstraint->yFree.getValue();