Skip to content

Commit

Permalink
change to WeightedAccumulateVariableOnNodes
Browse files Browse the repository at this point in the history
  • Loading branch information
sunethwarna committed Jun 27, 2020
1 parent a1da207 commit 83e69ee
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions kratos/python/add_variable_utils_to_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,14 @@ void AddVariableUtilsToPython(pybind11::module &m)
.def("ClearNonHistoricalData", &VariableUtils::ClearNonHistoricalData<ModelPart::NodesContainerType>)
.def("ClearNonHistoricalData", &VariableUtils::ClearNonHistoricalData<ModelPart::ConditionsContainerType>)
.def("ClearNonHistoricalData", &VariableUtils::ClearNonHistoricalData<ModelPart::ElementsContainerType>)
.def("DistributeConditionVariable", &VariableUtils::DistributeVariable<double, ModelPart::ConditionsContainerType, int>)
.def("DistributeConditionVariable", &VariableUtils::DistributeVariable<array_1d<double, 3>, ModelPart::ConditionsContainerType, int>)
.def("DistributeElementVariable", &VariableUtils::DistributeVariable<double, ModelPart::ElementsContainerType, int>)
.def("DistributeElementVariable", &VariableUtils::DistributeVariable<array_1d<double, 3>, ModelPart::ElementsContainerType, int>)
.def("DistributeConditionVariable", &VariableUtils::DistributeVariable<double, ModelPart::ConditionsContainerType, double>)
.def("DistributeConditionVariable", &VariableUtils::DistributeVariable<array_1d<double, 3>, ModelPart::ConditionsContainerType, double>)
.def("DistributeElementVariable", &VariableUtils::DistributeVariable<double, ModelPart::ElementsContainerType, double>)
.def("DistributeElementVariable", &VariableUtils::DistributeVariable<array_1d<double, 3>, ModelPart::ElementsContainerType, double>)
.def("WeightedAccumulateConditionVariableOnNodes", &VariableUtils::WeightedAccumulateVariableOnNodes<double, ModelPart::ConditionsContainerType, int>)
.def("WeightedAccumulateConditionVariableOnNodes", &VariableUtils::WeightedAccumulateVariableOnNodes<array_1d<double, 3>, ModelPart::ConditionsContainerType, int>)
.def("WeightedAccumulateElementVariableOnNodes", &VariableUtils::WeightedAccumulateVariableOnNodes<double, ModelPart::ElementsContainerType, int>)
.def("WeightedAccumulateElementVariableOnNodes", &VariableUtils::WeightedAccumulateVariableOnNodes<array_1d<double, 3>, ModelPart::ElementsContainerType, int>)
.def("WeightedAccumulateConditionVariableOnNodes", &VariableUtils::WeightedAccumulateVariableOnNodes<double, ModelPart::ConditionsContainerType, double>)
.def("WeightedAccumulateConditionVariableOnNodes", &VariableUtils::WeightedAccumulateVariableOnNodes<array_1d<double, 3>, ModelPart::ConditionsContainerType, double>)
.def("WeightedAccumulateElementVariableOnNodes", &VariableUtils::WeightedAccumulateVariableOnNodes<double, ModelPart::ElementsContainerType, double>)
.def("WeightedAccumulateElementVariableOnNodes", &VariableUtils::WeightedAccumulateVariableOnNodes<array_1d<double, 3>, ModelPart::ElementsContainerType, double>)
.def("SetFlag", &VariableUtils::SetFlag<ModelPart::NodesContainerType>)
.def("SetFlag", &VariableUtils::SetFlag<ModelPart::ConditionsContainerType>)
.def("SetFlag", &VariableUtils::SetFlag<ModelPart::ElementsContainerType>)
Expand Down
18 changes: 9 additions & 9 deletions kratos/utilities/variable_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ ModelPart::ConditionsContainerType& VariableUtils::GetContainer<ModelPart::Condi
}

template <class TDataType, class TContainerType, class TWeightDataType>
void VariableUtils::DistributeVariable(
void VariableUtils::WeightedAccumulateVariableOnNodes(
ModelPart& rModelPart,
const Variable<TDataType>& rVariable,
const Variable<TWeightDataType>& rWeightVariable,
Expand Down Expand Up @@ -549,24 +549,24 @@ void VariableUtils::DistributeVariable(
}

// template instantiations
template KRATOS_API(KRATOS_CORE) void VariableUtils::DistributeVariable<double, ModelPart::ConditionsContainerType, int>(
template KRATOS_API(KRATOS_CORE) void VariableUtils::WeightedAccumulateVariableOnNodes<double, ModelPart::ConditionsContainerType, int>(
ModelPart&, const Variable<double>&, const Variable<int>&, const bool);
template KRATOS_API(KRATOS_CORE) void VariableUtils::DistributeVariable<array_1d<double, 3>, ModelPart::ConditionsContainerType, int>(
template KRATOS_API(KRATOS_CORE) void VariableUtils::WeightedAccumulateVariableOnNodes<array_1d<double, 3>, ModelPart::ConditionsContainerType, int>(
ModelPart&, const Variable<array_1d<double, 3>>&, const Variable<int>&, const bool);

template KRATOS_API(KRATOS_CORE) void VariableUtils::DistributeVariable<double, ModelPart::ElementsContainerType, int>(
template KRATOS_API(KRATOS_CORE) void VariableUtils::WeightedAccumulateVariableOnNodes<double, ModelPart::ElementsContainerType, int>(
ModelPart&, const Variable<double>&, const Variable<int>&, const bool);
template KRATOS_API(KRATOS_CORE) void VariableUtils::DistributeVariable<array_1d<double, 3>, ModelPart::ElementsContainerType, int>(
template KRATOS_API(KRATOS_CORE) void VariableUtils::WeightedAccumulateVariableOnNodes<array_1d<double, 3>, ModelPart::ElementsContainerType, int>(
ModelPart&, const Variable<array_1d<double, 3>>&, const Variable<int>&, const bool);

template KRATOS_API(KRATOS_CORE) void VariableUtils::DistributeVariable<double, ModelPart::ConditionsContainerType, double>(
template KRATOS_API(KRATOS_CORE) void VariableUtils::WeightedAccumulateVariableOnNodes<double, ModelPart::ConditionsContainerType, double>(
ModelPart&, const Variable<double>&, const Variable<double>&, const bool);
template KRATOS_API(KRATOS_CORE) void VariableUtils::DistributeVariable<array_1d<double, 3>, ModelPart::ConditionsContainerType, double>(
template KRATOS_API(KRATOS_CORE) void VariableUtils::WeightedAccumulateVariableOnNodes<array_1d<double, 3>, ModelPart::ConditionsContainerType, double>(
ModelPart&, const Variable<array_1d<double, 3>>&, const Variable<double>&, const bool);

template KRATOS_API(KRATOS_CORE) void VariableUtils::DistributeVariable<double, ModelPart::ElementsContainerType, double>(
template KRATOS_API(KRATOS_CORE) void VariableUtils::WeightedAccumulateVariableOnNodes<double, ModelPart::ElementsContainerType, double>(
ModelPart&, const Variable<double>&, const Variable<double>&, const bool);
template KRATOS_API(KRATOS_CORE) void VariableUtils::DistributeVariable<array_1d<double, 3>, ModelPart::ElementsContainerType, double>(
template KRATOS_API(KRATOS_CORE) void VariableUtils::WeightedAccumulateVariableOnNodes<array_1d<double, 3>, ModelPart::ElementsContainerType, double>(
ModelPart&, const Variable<array_1d<double, 3>>&, const Variable<double>&, const bool);

} /* namespace Kratos.*/
2 changes: 1 addition & 1 deletion kratos/utilities/variable_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ class KRATOS_API(KRATOS_CORE) VariableUtils
* @param IsInverseWeightProvided Whether the weight is provided as inverse or not.
*/
template <class TDataType, class TContainerType, class TWeightDataType>
void DistributeVariable(
void WeightedAccumulateVariableOnNodes(
ModelPart& rModelPart,
const Variable<TDataType>& rVariable,
const Variable<TWeightDataType>& rWeightVariable,
Expand Down

0 comments on commit 83e69ee

Please sign in to comment.