Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
89fd07d
Variable const correctness attempt - 1
sunethwarna Mar 6, 2026
4c9cc49
make VariableData constexpr
sunethwarna Mar 6, 2026
83bf4a1
make variable constexpr
sunethwarna Mar 6, 2026
b7c4708
update serializer
sunethwarna Mar 6, 2026
6b07347
update variables.h/cpp - 1
sunethwarna Mar 6, 2026
c9d3046
add a test for switch
sunethwarna Mar 6, 2026
59103fb
add time derivatives
sunethwarna Mar 6, 2026
4eff549
Variable const correctness attempt - 2
sunethwarna Mar 6, 2026
aca4ffa
minor
sunethwarna Mar 6, 2026
b428296
try for windows - 1
sunethwarna Mar 6, 2026
27a88e6
Style
loumalouomega Mar 6, 2026
63dd423
More style
loumalouomega Mar 6, 2026
5e186d2
redirect redundant macros
sunethwarna Mar 6, 2026
3979bc6
add py::eq to VariableData
sunethwarna Mar 6, 2026
c2d1c22
add hash
sunethwarna Mar 6, 2026
1af8a1d
try for windows - 2
sunethwarna Mar 7, 2026
d07a179
rename the macros with Kratos
sunethwarna Mar 17, 2026
5a7c5d3
revert Flag changes
sunethwarna Mar 17, 2026
d8b3b31
revert unregistration
sunethwarna Mar 17, 2026
77a515f
re define the commented vars
sunethwarna Mar 17, 2026
9f89af3
minor
sunethwarna Mar 17, 2026
5ab8abf
add geometrical_object.h to variables.h
sunethwarna Mar 17, 2026
df7ff98
add a test with different TUs having the same variable defined.
sunethwarna Mar 18, 2026
10f40c1
Merge branch 'master' into core/make_variable_constexpr
sunethwarna Mar 18, 2026
e31e543
Merge remote-tracking branch 'origin/master' into core/make_variable_…
sunethwarna Mar 26, 2026
7992683
restricting the ctors
sunethwarna Mar 26, 2026
90e459c
removing serialization of vars
sunethwarna Mar 26, 2026
4869a6b
revert data serialization
sunethwarna Mar 26, 2026
a27cb96
revert the concepts
sunethwarna Mar 26, 2026
d731b3a
remove the test
sunethwarna Mar 26, 2026
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 @@ -182,7 +182,7 @@ namespace Kratos
KRATOS_TRY

const SizeType dim = mpOriginDomain->ElementsBegin()->GetGeometry().WorkingSpaceDimension();
Variable< array_1d<double, 3> >& equilibrium_variable = GetEquilibriumVariable();
const Variable< array_1d<double, 3> >& equilibrium_variable = GetEquilibriumVariable();

SparseMatrixType expanded_mapper;
GetExpandedMappingMatrix(expanded_mapper, dim);
Expand Down Expand Up @@ -819,7 +819,7 @@ namespace Kratos
};

template<class TSparseSpace, class TDenseSpace>
Variable< array_1d<double, 3> >& FetiDynamicCouplingUtilities<TSparseSpace, TDenseSpace>::GetEquilibriumVariable()
const Variable< array_1d<double, 3> >& FetiDynamicCouplingUtilities<TSparseSpace, TDenseSpace>::GetEquilibriumVariable()
{
if (mEquilibriumVariable == EquilibriumVariable::Velocity) return VELOCITY;
else if (mEquilibriumVariable == EquilibriumVariable::Displacement) return DISPLACEMENT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ namespace Kratos

void PrintInterfaceKinematics(const Variable< array_1d<double, 3> >& rVariable, const SolverIndex solverIndex);

Variable< array_1d<double, 3> >& GetEquilibriumVariable();
const Variable< array_1d<double, 3> >& GetEquilibriumVariable();

}; // namespace FetiDynamicCouplingUtilities.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// KRATOS ______ __ __ _____ __ __ __
// / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ /
// / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ /
// / /___/ /_/ / / / / /_/ /_/ / /__/ /_ ___/ / /_/ / / /_/ / /__/ /_/ /_/ / / / /_/ / /
// / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ /
// / /___/ /_/ / / / / /_/ /_/ / /__/ /_ ___/ / /_/ / / /_/ / /__/ /_/ /_/ / / / /_/ / /
// \____/\____/_/ /_/\__/\__,_/\___/\__//____/\__/_/ \__,_/\___/\__/\__,_/_/ \__,_/_/ MECHANICS
//
// License: BSD License
Expand Down Expand Up @@ -78,7 +78,7 @@ class KRATOS_API(CONTACT_STRUCTURAL_MECHANICS_APPLICATION) ALMVariablesCalculati
/// Default constructor.
ALMVariablesCalculationProcess(
ModelPart& rThisModelPart,
Variable<double>& rNodalLengthVariable = NODAL_H,
const Variable<double>& rNodalLengthVariable = NODAL_H,
Parameters ThisParameters = Parameters(R"({})")
):mrThisModelPart(rThisModelPart),
mrNodalLengthVariable(rNodalLengthVariable)
Expand Down Expand Up @@ -184,12 +184,12 @@ class KRATOS_API(CONTACT_STRUCTURAL_MECHANICS_APPLICATION) ALMVariablesCalculati
///@name Member Variables
///@{

ModelPart& mrThisModelPart; /// The main model part
Variable<double>& mrNodalLengthVariable; /// The variable used to messure the length of the element
double mFactorStiffness; /// The proportion between stiffness and penalty/scale factor
double mPenaltyScale; /// The penalty/scale factor proportion
bool mComputeScaleFactor; /// If compute the scale factor
bool mComputePenalty; /// If compute the penalty
ModelPart& mrThisModelPart; /// The main model part
const Variable<double>& mrNodalLengthVariable; /// The variable used to messure the length of the element
double mFactorStiffness; /// The proportion between stiffness and penalty/scale factor
double mPenaltyScale; /// The penalty/scale factor proportion
bool mComputeScaleFactor; /// If compute the scale factor
bool mComputePenalty; /// If compute the penalty

///@}
///@name Private Operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ namespace Kratos {
double node_area = rNode.FastGetSolutionStepValue(DEM_NODAL_AREA);
double& shear_stress = rNode.FastGetSolutionStepValue(SHEAR_STRESS);
array_1d<double, 3>& node_rhs_tang = rNode.FastGetSolutionStepValue(TANGENTIAL_ELASTIC_FORCES);

if (node_area > 0.0){
node_pressure = node_pressure / node_area;
shear_stress = GeometryFunctions::module(node_rhs_tang) / node_area;
Expand All @@ -954,7 +954,7 @@ namespace Kratos {
KRATOS_CATCH("")
}

void ExplicitSolverStrategy::SetFlagAndVariableToNodes(const Kratos::Flags& r_flag_name, ComponentOf3ComponentsVariableType& r_variable_to_set, const double value, NodesArrayType& r_nodes_array) {
void ExplicitSolverStrategy::SetFlagAndVariableToNodes(const Kratos::Flags& r_flag_name, const ComponentOf3ComponentsVariableType& r_variable_to_set, const double value, NodesArrayType& r_nodes_array) {
KRATOS_TRY

block_for_each(r_nodes_array, [&](ModelPart::NodeType& rNode) {
Expand All @@ -964,7 +964,7 @@ namespace Kratos {
KRATOS_CATCH("")
}

void ExplicitSolverStrategy::SetVariableToNodes(ComponentOf3ComponentsVariableType& r_variable_to_set, const double value, NodesArrayType& r_nodes_array) {
void ExplicitSolverStrategy::SetVariableToNodes(const ComponentOf3ComponentsVariableType& r_variable_to_set, const double value, NodesArrayType& r_nodes_array) {
KRATOS_TRY
block_for_each(r_nodes_array, [&](ModelPart::NodeType& rNode) {
rNode.FastGetSolutionStepValue(r_variable_to_set) = value;
Expand Down Expand Up @@ -1324,7 +1324,7 @@ namespace Kratos {

KRATOS_CATCH("")
}

void ExplicitSolverStrategy::SetNormalRadiiOnAllParticles(ModelPart& r_model_part) {
KRATOS_TRY

Expand Down Expand Up @@ -1883,7 +1883,7 @@ namespace Kratos {
}

double ExplicitSolverStrategy::ComputeCoordinationNumber(double& standard_dev) {

KRATOS_TRY

return 0.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ namespace Kratos {
virtual void CalculateConditionsRHSAndAdd();
void ClearFEMForces();
void CalculateNodalPressuresAndStressesOnWalls();
void SetFlagAndVariableToNodes(const Kratos::Flags& r_flag_name, ComponentOf3ComponentsVariableType& r_variable_to_set, const double value, NodesArrayType& r_nodes_array);
void SetVariableToNodes(ComponentOf3ComponentsVariableType& r_variable_to_set, const double value, NodesArrayType& r_nodes_array);
void SetFlagAndVariableToNodes(const Kratos::Flags& r_flag_name, const ComponentOf3ComponentsVariableType& r_variable_to_set, const double value, NodesArrayType& r_nodes_array);
void SetVariableToNodes(const ComponentOf3ComponentsVariableType& r_variable_to_set, const double value, NodesArrayType& r_nodes_array);
void ResetPrescribedMotionFlagsRespectingImposedDofs();
void ApplyPrescribedBoundaryConditions();
void ApplyInitialConditions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,18 @@ namespace Testing {

void AccessComputeConsistentResidual(
ModelPart &rModelPart,
Variable<TValueType> &rOriginalVariable,
Variable<TValueType> &rModifiedVariable,
Variable<TValueType> &rResidualVariable)
const Variable<TValueType> &rOriginalVariable,
const Variable<TValueType> &rModifiedVariable,
const Variable<TValueType> &rResidualVariable)
{
this->ComputeConsistentResidual(rModelPart, rOriginalVariable, rModifiedVariable, rResidualVariable);
}

void AccessComputeNodeByNodeResidual(
ModelPart &rModelPart,
Variable<TValueType> &rOriginalVariable,
Variable<TValueType> &rModifiedVariable,
Variable<TValueType> &rResidualVariable)
const Variable<TValueType> &rOriginalVariable,
const Variable<TValueType> &rModifiedVariable,
const Variable<TValueType> &rResidualVariable)
{
this->ComputeNodeByNodeResidual(rModelPart, rOriginalVariable, rModifiedVariable, rResidualVariable);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class DynamicSmagorinskyUtils
Possible values for the variable: 1.0 inlet, 2.0 bridge surface, 3.0 outlet, 0.0 otherwise
@param rThisVariable The Kratos variable used to identify the boundary
*/
void CorrectFlagValues(Variable<double>& rThisVariable = FLAG_VARIABLE)
void CorrectFlagValues(const Variable<double>& rThisVariable = FLAG_VARIABLE)
{
// Loop over coarse mesh to evaluate all terms that do not involve the fine mesh
const int NumThreads = ParallelUtilities::GetNumThreads();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class LoadSteppingScheme : public GeoMechanicsStaticScheme<TSparseSpace, TDenseS
}

std::map<std::size_t, TLocalSystemVectorType> CalculateElementForces(ModelPart& rModelPart,
Variable<Vector>& rForces)
const Variable<Vector>& rForces)
{
std::map<std::size_t, TLocalSystemVectorType> result;
std::ranges::transform(rModelPart.Elements(), std::inserter(result, result.end()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ KratosExecute::ConvergenceCriteriaType::Pointer KratosExecute::setup_criteria_dg
{
const double rel_tol = 1.0e-4;
const double abs_tol = 1.0e-9;
VariableData* p_water_pres = &WATER_PRESSURE;
const VariableData* p_water_pres = &WATER_PRESSURE;
KratosExecute::ConvergenceVariableListType convergence_settings{std::make_tuple(p_water_pres, rel_tol, abs_tol)};
return std::make_shared<KratosExecute::MixedGenericCriteriaType>(convergence_settings);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ KRATOS_DEFINE_APPLICATION_VARIABLE(GEO_MECHANICS_APPLICATION, double, ENGINEERIN
KRATOS_DEFINE_APPLICATION_VARIABLE(GEO_MECHANICS_APPLICATION, double, GREEN_LAGRANGE_VOLUMETRIC_STRAIN)
KRATOS_DEFINE_APPLICATION_VARIABLE(GEO_MECHANICS_APPLICATION, double, GREEN_LAGRANGE_VON_MISES_STRAIN)

// Nodal load variables
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(STRUCTURAL_MECHANICS_APPLICATION, POINT_LOAD)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(STRUCTURAL_MECHANICS_APPLICATION, LINE_LOAD)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(STRUCTURAL_MECHANICS_APPLICATION, SURFACE_LOAD)

KRATOS_DEFINE_APPLICATION_VARIABLE(GEO_MECHANICS_APPLICATION, bool, CONSIDER_GEOMETRIC_STIFFNESS)

// Gap/closure
Expand Down
1 change: 0 additions & 1 deletion applications/MPMApplication/mpm_application_variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ namespace Kratos
KRATOS_DEFINE_APPLICATION_VARIABLE( MPM_APPLICATION, double, MP_KINETIC_ENERGY )
KRATOS_DEFINE_APPLICATION_VARIABLE( MPM_APPLICATION, double, MP_STRAIN_ENERGY )
KRATOS_DEFINE_APPLICATION_VARIABLE( MPM_APPLICATION, double, MP_TOTAL_ENERGY )
KRATOS_DEFINE_APPLICATION_VARIABLE( MPM_APPLICATION, double, MP_TEMPERATURE)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this was a redeclaration of a variable defined in line 45


// Pressure
KRATOS_DEFINE_APPLICATION_VARIABLE( MPM_APPLICATION, double, MP_PRESSURE )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ComputeHessianSolMetricProcess::ComputeHessianSolMetricProcess(

ComputeHessianSolMetricProcess::ComputeHessianSolMetricProcess(
ModelPart& rThisModelPart,
Variable<double>& rVariable,
const Variable<double>& rVariable,
Parameters ThisParameters
) : mrModelPart(rThisModelPart),
mpOriginVariable(&rVariable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class KRATOS_API(MESHING_APPLICATION) ComputeHessianSolMetricProcess
*/
ComputeHessianSolMetricProcess(
ModelPart& rThisModelPart,
Variable<double>& rVariable,
const Variable<double>& rVariable,
Parameters ThisParameters = Parameters(R"({})")
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ namespace Kratos
// max_stress
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(OPTIMIZATION_APPLICATION, D_MAX_STRES_D_X);
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(OPTIMIZATION_APPLICATION, D_MAX_STRES_D_CX);
KRATOS_DEFINE_APPLICATION_VARIABLE(OPTIMIZATION_APPLICATION, double, D_MAX_STRESS_D_PT);
KRATOS_DEFINE_APPLICATION_VARIABLE(OPTIMIZATION_APPLICATION, double, D_MAX_STRESS_D_CT);
KRATOS_DEFINE_APPLICATION_VARIABLE(OPTIMIZATION_APPLICATION, double, D_MAX_STRESS_D_PD);
KRATOS_DEFINE_APPLICATION_VARIABLE(OPTIMIZATION_APPLICATION, double, D_MAX_STRESS_D_CD);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, a short summary

KRATOS_DEFINE_APPLICATION_VARIABLE used to declare a variable. Now it actually defines one.

What you're seeing here are all variables that have duplicate declarations, which have now become duplicate definitions, which is of course an error.


// shape control
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(OPTIMIZATION_APPLICATION,CX);
Expand Down
10 changes: 0 additions & 10 deletions applications/RANSApplication/rans_application_variables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,13 @@ namespace Kratos
KRATOS_CREATE_VARIABLE( double, RANS_AUXILIARY_VARIABLE_1 )
KRATOS_CREATE_VARIABLE( double, RANS_AUXILIARY_VARIABLE_2 )

// k-epsilon-high-re turbulence modelling variables
KRATOS_CREATE_VARIABLE_WITH_TIME_DERIVATIVE(double, TURBULENT_KINETIC_ENERGY_RATE, RANS_AUXILIARY_VARIABLE_1)
KRATOS_CREATE_VARIABLE_WITH_TIME_DERIVATIVE(double, TURBULENT_KINETIC_ENERGY, TURBULENT_KINETIC_ENERGY_RATE)

KRATOS_CREATE_VARIABLE_WITH_TIME_DERIVATIVE(double, TURBULENT_ENERGY_DISSIPATION_RATE_2, RANS_AUXILIARY_VARIABLE_2)
KRATOS_CREATE_VARIABLE_WITH_TIME_DERIVATIVE(double, TURBULENT_ENERGY_DISSIPATION_RATE, TURBULENT_ENERGY_DISSIPATION_RATE_2)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated changes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explained in the above comment.

KRATOS_CREATE_VARIABLE( double, TURBULENT_KINETIC_ENERGY_SIGMA )
KRATOS_CREATE_VARIABLE( double, TURBULENT_ENERGY_DISSIPATION_RATE_SIGMA )
KRATOS_CREATE_VARIABLE( double, TURBULENCE_RANS_C_MU )
KRATOS_CREATE_VARIABLE( double, TURBULENCE_RANS_C1 )
KRATOS_CREATE_VARIABLE( double, TURBULENCE_RANS_C2 )

// k-omega turbulence modelling specific additional variables
KRATOS_CREATE_VARIABLE_WITH_TIME_DERIVATIVE(double, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE_2, RANS_AUXILIARY_VARIABLE_2)
KRATOS_CREATE_VARIABLE_WITH_TIME_DERIVATIVE(double, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE_2)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated changes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explained in the above comment

KRATOS_CREATE_VARIABLE( double, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE_SIGMA )
KRATOS_CREATE_VARIABLE( double, TURBULENCE_RANS_BETA )
KRATOS_CREATE_VARIABLE( double, TURBULENCE_RANS_GAMMA )
Expand Down
12 changes: 6 additions & 6 deletions applications/RANSApplication/rans_application_variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ namespace Kratos
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, AFC_NEGATIVE_ANTI_DIFFUSIVE_FLUX_LIMIT )

// k-epsilon-high-re turbulence modelling variables
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENT_KINETIC_ENERGY )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENT_ENERGY_DISSIPATION_RATE )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENT_KINETIC_ENERGY_RATE )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENT_ENERGY_DISSIPATION_RATE_2 )
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xplained in the above comment

KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, RANS_AUXILIARY_VARIABLE_1 )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, RANS_AUXILIARY_VARIABLE_2 )
KRATOS_DEFINE_APPLICATION_VARIABLE_WITH_TIME_DERIVATIVE( RANS_APPLICATION, double, TURBULENT_KINETIC_ENERGY_RATE, RANS_AUXILIARY_VARIABLE_1)
KRATOS_DEFINE_APPLICATION_VARIABLE_WITH_TIME_DERIVATIVE( RANS_APPLICATION, double, TURBULENT_KINETIC_ENERGY, TURBULENT_KINETIC_ENERGY_RATE)
KRATOS_DEFINE_APPLICATION_VARIABLE_WITH_TIME_DERIVATIVE( RANS_APPLICATION, double, TURBULENT_ENERGY_DISSIPATION_RATE_2, RANS_AUXILIARY_VARIABLE_2)
KRATOS_DEFINE_APPLICATION_VARIABLE_WITH_TIME_DERIVATIVE( RANS_APPLICATION, double, TURBULENT_ENERGY_DISSIPATION_RATE, TURBULENT_ENERGY_DISSIPATION_RATE_2)
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENCE_RANS_C_MU )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENT_KINETIC_ENERGY_SIGMA )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENT_ENERGY_DISSIPATION_RATE_SIGMA )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENCE_RANS_C1 )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENCE_RANS_C2 )

// k-omega turbulence modelling specific additional variables
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE )
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explained in above comment.

KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE_2 )
KRATOS_DEFINE_APPLICATION_VARIABLE_WITH_TIME_DERIVATIVE( RANS_APPLICATION, double, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE_2, RANS_AUXILIARY_VARIABLE_2)
KRATOS_DEFINE_APPLICATION_VARIABLE_WITH_TIME_DERIVATIVE( RANS_APPLICATION, double, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE_2)
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENT_SPECIFIC_ENERGY_DISSIPATION_RATE_SIGMA )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENCE_RANS_BETA )
KRATOS_DEFINE_APPLICATION_VARIABLE( RANS_APPLICATION, double, TURBULENCE_RANS_GAMMA )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ template<class TVarType>
ApplyPerturbationFunctionProcess<TVarType>::ApplyPerturbationFunctionProcess(
ModelPart& rThisModelPart,
NodePointerType pNode,
TVarType& rThisVariable,
const TVarType& rThisVariable,
Parameters& rThisParameters
) : Process(), mrModelPart(rThisModelPart), mrVariable(rThisVariable)
{
Expand All @@ -43,7 +43,7 @@ template<class TVarType>
ApplyPerturbationFunctionProcess<TVarType>::ApplyPerturbationFunctionProcess(
ModelPart& rThisModelPart,
NodesArrayType& rSourcePoints,
TVarType& rThisVariable,
const TVarType& rThisVariable,
Parameters& rThisParameters
) : Process(), mrModelPart(rThisModelPart), mrVariable(rThisVariable)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace Kratos
///@name Kratos Classes
///@{

/**
/**
* @ingroup ShallowWaterApplication
* @class ApplyPerturbationFunctionProcess
* @brief This process assigns a default value or a perturbation if the node is close to an influence area
Expand Down Expand Up @@ -79,14 +79,14 @@ class KRATOS_API(SHALLOW_WATER_APPLICATION) ApplyPerturbationFunctionProcess : p
ApplyPerturbationFunctionProcess(
ModelPart& rThisModelPart,
NodePointerType pNode,
TVarType& rThisVariable,
const TVarType& rThisVariable,
Parameters& rThisParameters);

/// Constructor with an array of nodes
ApplyPerturbationFunctionProcess(
ModelPart& rThisModelPart,
NodesArrayType& rSourcePoints,
TVarType& rThisVariable,
const TVarType& rThisVariable,
Parameters& rThisParameters);

/// Destructor.
Expand Down Expand Up @@ -208,7 +208,7 @@ class KRATOS_API(SHALLOW_WATER_APPLICATION) ApplyPerturbationFunctionProcess : p

ModelPart& mrModelPart;
NodesArrayType mSourcePoints;
TVarType& mrVariable;
const TVarType& mrVariable;
double mDefaultValue;
double mInfluenceDistance;
double mPerturbation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Condition::Pointer DisplacementControlCondition::Clone (
/***********************************************************************************/
/***********************************************************************************/

Variable<double>* DisplacementControlCondition::GetDisplacementInDirection() const
const Variable<double>* DisplacementControlCondition::GetDisplacementInDirection() const
{
KRATOS_TRY

Expand Down Expand Up @@ -134,7 +134,7 @@ Variable<double>* DisplacementControlCondition::GetDisplacementInDirection() con
/***********************************************************************************/
/***********************************************************************************/

Variable<double>* DisplacementControlCondition::GetPointLoadInDirection() const
const Variable<double>* DisplacementControlCondition::GetPointLoadInDirection() const
{
KRATOS_TRY

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) DisplacementControlCondition
///@name Private Operations
///@{

Variable<double>* GetDisplacementInDirection() const;
Variable<double>* GetPointLoadInDirection() const;
const Variable<double>* GetDisplacementInDirection() const;
const Variable<double>* GetPointLoadInDirection() const;

///@}
///@name Private Access
Expand Down
Loading
Loading