Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,6 @@ In this constraint, the whole surface is displaced the same amount as a single m

{{ section_dump(input_file4_content, "DESIGN SURFACE NORMALDIR MULTIPNT CONSTRAINT 3D") }}

There is also a penalty version, which uses a different algorithm, where one has to provide a penalty parameter.
See also :ref:`secdesignsurfacenormaldirmultipntconstraint3d` and :ref:`secdesignsurfacenormaldirmultipntconstraint3dpen`.

Node displacement relative to a given surface or line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
5 changes: 1 addition & 4 deletions src/adapter/4C_adapter_str_structure_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,9 @@ void Adapter::StructureBaseAlgorithmNew::set_model_types(
// --- enforcement by penalty law
std::vector<const Core::Conditions::Condition*> pencond_volconstr3d;
std::vector<const Core::Conditions::Condition*> pencond_areaconstr3d;
std::vector<const Core::Conditions::Condition*> pencond_mpcnormcomp3d;
actdis_->get_condition("VolumeConstraint_3D_Pen", pencond_volconstr3d);
actdis_->get_condition("AreaConstraint_3D_Pen", pencond_areaconstr3d);
actdis_->get_condition("MPC_NormalComponent_3D_Pen", pencond_mpcnormcomp3d);
if (pencond_volconstr3d.size() or pencond_areaconstr3d.size() or pencond_mpcnormcomp3d.size())
have_pen_constraint = true;
if (pencond_volconstr3d.size() or pencond_areaconstr3d.size()) have_pen_constraint = true;
if (have_lag_constraint or have_pen_constraint)
modeltypes.insert(Inpar::Solid::model_lag_pen_constraint);

Expand Down
2 changes: 1 addition & 1 deletion src/constraint/4C_constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Constraints::Constraint::ConstrType Constraints::Constraint::get_constr_type(
return mpcnodeonplane3d;
else if (name == "MPC_NodeOnLine_2D")
return mpcnodeonline2d;
else if (name == "MPC_NormalComponent_3D" or name == "MPC_NormalComponent_3D_Pen")
else if (name == "MPC_NormalComponent_3D")
return mpcnormalcomp3d;
return none;
}
Expand Down
10 changes: 1 addition & 9 deletions src/constraint/4C_constraint_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "4C_constraint_monitor.hpp"
#include "4C_constraint_multipointconstraint2.hpp"
#include "4C_constraint_multipointconstraint3.hpp"
#include "4C_constraint_multipointconstraint3penalty.hpp"
#include "4C_constraint_penalty.hpp"
#include "4C_io.hpp"
#include "4C_linalg_utils_densematrix_communication.hpp"
Expand Down Expand Up @@ -78,11 +77,8 @@ void Constraints::ConstrManager::init(

volconstr3dpen_ = std::make_shared<ConstraintPenalty>(actdisc_, "VolumeConstraint_3D_Pen");
areaconstr3dpen_ = std::make_shared<ConstraintPenalty>(actdisc_, "AreaConstraint_3D_Pen");
mpcnormcomp3dpen_ =
std::make_shared<MPConstraint3Penalty>(actdisc_, "MPC_NormalComponent_3D_Pen");

havepenaconstr_ = (mpcnormcomp3dpen_->have_constraint()) or
(volconstr3dpen_->have_constraint()) or (areaconstr3dpen_->have_constraint());
havepenaconstr_ = (volconstr3dpen_->have_constraint()) or (areaconstr3dpen_->have_constraint());

//----------------------------------------------------
//-----------include possible further constraints here
Expand Down Expand Up @@ -145,8 +141,6 @@ void Constraints::ConstrManager::setup(
mpconplane3d_->initialize(p, refbaseredundant);
mpcnormcomp3d_->set_constr_state("displacement", *disp);
mpcnormcomp3d_->initialize(p, refbaseredundant);
mpcnormcomp3dpen_->set_constr_state("displacement", *disp);
mpcnormcomp3dpen_->initialize(p);

// Export redundant vector into distributed one
refbasevalues_->export_to(*refbaseredundant, *conimpo_, Core::LinAlg::CombineMode::add);
Expand Down Expand Up @@ -268,8 +262,6 @@ void Constraints::ConstrManager::evaluate_force_stiff(const double time,
mpconplane3d_->evaluate(p, stiff, constr_matrix_, fint, refbaseredundant, actredundant);
mpcnormcomp3d_->set_constr_state("displacement", *disp);
mpcnormcomp3d_->evaluate(p, stiff, constr_matrix_, fint, refbaseredundant, actredundant);
mpcnormcomp3dpen_->set_constr_state("displacement", *disp);
mpcnormcomp3dpen_->evaluate(p, stiff, nullptr, fint, nullptr, nullptr);
mpconline2d_->set_constr_state("displacement", *disp);
mpconline2d_->evaluate(p, stiff, constr_matrix_, fint, refbaseredundant, actredundant);
// Export redundant vectors into distributed ones
Expand Down
2 changes: 0 additions & 2 deletions src/constraint/4C_constraint_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ namespace Constraints
class Constraint;
class ConstraintPenalty;
class MPConstraint3;
class MPConstraint3Penalty;
class MPConstraint2;
class Monitor;
class ConstraintDofSet;
Expand Down Expand Up @@ -341,7 +340,6 @@ namespace Constraints
std::shared_ptr<MPConstraint2>
mpconline2d_; ///< 2d multipoint constraint prescribing the motion
///< of a node relatively to a straight line
std::shared_ptr<MPConstraint3Penalty> mpcnormcomp3dpen_;


std::shared_ptr<Monitor> volmonitor3d_; ///< 3d volume monitors defined on surfaces
Expand Down
Loading