15 #if !defined(KRATOS_LEVELSET_CONVECTION_PROCESS_INCLUDED )
16 #define KRATOS_LEVELSET_CONVECTION_PROCESS_INCLUDED
68 template<
unsigned int TDim,
class TSparseSpace,
class TDenseSpace,
class TLinearSolver >
76 class ProcessInfoDataContainer
79 ProcessInfoDataContainer(
const ProcessInfo& rInputProcessInfo)
80 : DeltaTime(rInputProcessInfo.
GetValue(DELTA_TIME))
81 , pUnknownVariable(&((rInputProcessInfo.
GetValue(CONVECTION_DIFFUSION_SETTINGS))->GetUnknownVariable()))
82 , pGradientVariable(&((rInputProcessInfo.
GetValue(CONVECTION_DIFFUSION_SETTINGS))->GetGradientVariable()))
83 , pConvectionVariable(&((rInputProcessInfo.
GetValue(CONVECTION_DIFFUSION_SETTINGS))->GetConvectionVariable()))
86 void RestoreProcessInfoData(
ProcessInfo& rOutputProcessInfo)
const
88 rOutputProcessInfo.
SetValue(DELTA_TIME, DeltaTime);
89 (rOutputProcessInfo.
GetValue(CONVECTION_DIFFUSION_SETTINGS))->SetUnknownVariable(*pUnknownVariable);
90 (rOutputProcessInfo.
GetValue(CONVECTION_DIFFUSION_SETTINGS))->SetGradientVariable(*pGradientVariable);
91 (rOutputProcessInfo.
GetValue(CONVECTION_DIFFUSION_SETTINGS))->SetConvectionVariable(*pConvectionVariable);
95 const double DeltaTime;
133 typename TLinearSolver::Pointer pLinearSolver,
136 rModel.GetModelPart(ThisParameters[
"model_part_name"].GetString()),
151 typename TLinearSolver::Pointer pLinearSolver,
159 auto p_builder_solver = Kratos::make_shared< ResidualBasedBlockBuilderAndSolver<TSparseSpace,TDenseSpace,TLinearSolver>>(pLinearSolver);
160 InitializeConvectionStrategy(p_builder_solver);
218 auto fill_process_info_function = GetFillProcessInfoFormulationDataFunction();
223 const double previous_delta_time = r_conv_process_info.
GetValue(DELTA_TIME);
224 const double dt = previous_delta_time /
static_cast<double>(n_substep);
225 r_conv_process_info.SetValue(DELTA_TIME,
dt);
226 r_conv_process_info.GetValue(CONVECTION_DIFFUSION_SETTINGS)->SetUnknownVariable(*
mpLevelSetVar);
227 r_conv_process_info.GetValue(CONVECTION_DIFFUSION_SETTINGS)->SetGradientVariable(*
mpLevelSetGradientVar);
228 r_conv_process_info.GetValue(CONVECTION_DIFFUSION_SETTINGS)->SetConvectionVariable(*
mpConvectVar);
241 const double nodal_h = it_node->
GetValue(NODAL_H);
242 const double dynamic_tau = r_conv_process_info.GetValue(DYNAMIC_TAU);
243 const double tau = 1.0 / (
dynamic_tau /
dt + velocity_norm / std::pow(nodal_h,2));
244 it_node->GetValue(TAU) =
tau;
251 "Doing step "<<
step <<
" of " << n_substep << std::endl;
258 const double Nold = 1.0 -
static_cast<double>(
step) /
static_cast<double>(n_substep);
259 const double Nnew = 1.0 - Nold;
261 const double Nold_before = 1.0 -
static_cast<double>(
step-1) /
static_cast<double>(n_substep);
262 const double Nnew_before = 1.0 - Nold_before;
273 noalias(it_node->FastGetSolutionStepValue(*
mpConvectVar, 1)) = Nold_before * r_v_old + Nnew_before * r_v;
334 "model_part_name" : "",
336 "convection_model_part_name" : "",
337 "levelset_variable_name" : "DISTANCE",
338 "levelset_convection_variable_name" : "VELOCITY",
339 "levelset_gradient_variable_name" : "DISTANCE_GRADIENT",
342 "eulerian_error_compensation" : false,
343 "BFECC_limiter_acuteness" : 2.0,
344 "element_type" : "levelset_convection_supg",
345 "element_settings" : {}
348 return default_parameters;
364 std::string
Info()
const override {
365 return "LevelSetConvectionProcess";
370 rOStream <<
"LevelSetConvectionProcess";
463 ,
mrModel(rModelPart.GetModel())
467 ThisParameters[
"element_settings"].
ValidateAndAssignDefaults(GetConvectionElementDefaultParameters(ThisParameters[
"element_type"].GetString()));
470 CheckAndAssignSettings(ThisParameters);
497 if(!r_process_info.Has(CONVECTION_DIFFUSION_SETTINGS)){
498 auto p_conv_diff_settings = Kratos::make_shared<ConvectionDiffusionSettings>();
499 r_process_info.SetValue(CONVECTION_DIFFUSION_SETTINGS, p_conv_diff_settings);
501 p_conv_diff_settings->SetConvectionVariable(*
mpConvectVar);
509 auto fill_process_info_function = GetFillProcessInfoFormulationDataFunction();
523 const auto base_buffer_size = rBaseModelPart.
GetBufferSize();
525 "Base model part buffer size is " << base_buffer_size <<
". Set it to a minimum value of 2." << std::endl;
552 it_elem->pGetGeometry(),
553 it_elem->pGetProperties());
609 auto& r_geom = rElement.GetGeometry();
614 for(
unsigned int i=0;
i<TDim+1;
i++){
616 for(
unsigned int k=0;
k<TDim;
k++){
617 h_inv += DN_DX(
i,
k)*DN_DX(
i,
k);
621 h = sqrt(
h)/
static_cast<double>(TDim+1);
625 for(
unsigned int i=0;
i<TDim+1;
i++){
657 const double epsilon = 1.0e-12;
666 for (
unsigned int j = 0;
j< global_pointer_list.
size(); ++
j)
668 auto& global_pointer = global_pointer_list(
j);
675 auto coordinate_proxy = pointer_comm.
Apply(
678 return global_pointer->Coordinates();
688 const auto& X_i = it_node->Coordinates();
692 double S_minus = 0.0;
696 for (
unsigned int j = 0;
j< global_pointer_list.size(); ++
j)
701 auto& global_pointer = global_pointer_list(
j);
702 auto X_j = coordinate_proxy.Get(global_pointer);
713 auto combined_proxy = pointer_comm.
Apply(
715 return std::make_pair(
717 global_pointer->Coordinates());
724 const double distance_i = it_node->FastGetSolutionStepValue(*
mpLevelSetVar);
725 const auto& X_i = it_node->Coordinates();
728 double numerator = 0.0;
729 double denominator = 0.0;
733 for (
unsigned int j = 0;
j< global_pointer_list.
size(); ++
j)
735 auto& global_pointer = global_pointer_list(
j);
736 auto result = combined_proxy.Get(global_pointer);
737 const auto X_j = std::get<1>(result);
738 const double distance_j = std::get<0>(result);
740 double beta_ij = 1.0;
747 numerator += beta_ij*(distance_i - distance_j);
748 denominator += beta_ij*std::abs(distance_i - distance_j);
751 const double fraction = std::abs(numerator) / (denominator + epsilon);
765 const auto& r_geometry = rElement.GetGeometry();
766 double elemental_limiter = 1.0;
767 for(unsigned int i_node=0; i_node< TDim+1; ++i_node) {
768 elemental_limiter = std::min(r_geometry[i_node].GetValue(LIMITER_COEFFICIENT), elemental_limiter);
770 rElement.
GetValue(LIMITER_COEFFICIENT) = elemental_limiter;
785 noalias(rNode.FastGetSolutionStepValue(*mpConvectVar)) = -1.0 * rNode.FastGetSolutionStepValue(*mpConvectVar);
786 noalias(rNode.FastGetSolutionStepValue(*mpConvectVar, 1)) = -1.0 * rNode.FastGetSolutionStepValue(*mpConvectVar, 1);
787 rNode.FastGetSolutionStepValue(*mpLevelSetVar, 1) = rNode.FastGetSolutionStepValue(*mpLevelSetVar);
790 mpSolvingStrategy->InitializeSolutionStep();
791 mpSolvingStrategy->Predict();
792 mpSolvingStrategy->SolveSolutionStep();
793 mpSolvingStrategy->FinalizeSolutionStep();
798 auto it_node = mpDistanceModelPart->NodesBegin() + i_node;
800 0.5*(it_node->GetValue(*mpLevelSetVar) - it_node->FastGetSolutionStepValue(*mpLevelSetVar));
805 auto it_node = mpDistanceModelPart->NodesBegin() + i_node;
806 noalias(it_node->FastGetSolutionStepValue(*mpConvectVar)) = -1.0 * it_node->FastGetSolutionStepValue(*mpConvectVar);
807 noalias(it_node->FastGetSolutionStepValue(*mpConvectVar, 1)) = -1.0 * it_node->FastGetSolutionStepValue(*mpConvectVar, 1);
808 const double phi_n_star = it_node->GetValue(*mpLevelSetVar) + mLimiter[i_node]*mError[i_node];
809 it_node->FastGetSolutionStepValue(*mpLevelSetVar) = phi_n_star;
810 it_node->FastGetSolutionStepValue(*mpLevelSetVar, 1) = phi_n_star;
813 mpSolvingStrategy->InitializeSolutionStep();
814 mpSolvingStrategy->Predict();
815 mpSolvingStrategy->SolveSolutionStep();
816 mpSolvingStrategy->FinalizeSolutionStep();
826 nodal_h_process.Execute();
863 void CheckAndAssignSettings(
const Parameters ThisParameters)
865 mLevelSetConvectionSettings = ThisParameters;
867 std::string element_register_name = GetConvectionElementRegisteredName(ThisParameters);
870 mElementRequiresLimiter = ThisParameters[
"element_settings"].
Has(
"include_anti_diffusivity_terms") ? ThisParameters[
"element_settings"][
"include_anti_diffusivity_terms"].
GetBool() :
false;
871 mElementTauNodal = ThisParameters[
"element_settings"].
Has(
"tau_nodal") ? ThisParameters[
"element_settings"][
"tau_nodal"].
GetBool() :
false;
873 if (ThisParameters[
"element_settings"].
Has(
"elemental_limiter_acuteness") && mElementRequiresLimiter) {
874 mPowerElementalLimiter = ThisParameters[
"element_settings"][
"elemental_limiter_acuteness"].
GetDouble();
877 if (mConvectionElementType ==
"LevelSetConvectionElementSimplexAlgebraicStabilization"){
878 ThisParameters[
"element_settings"][
"requires_distance_gradient"].
SetBool(mElementRequiresLimiter);
881 mElementRequiresLevelSetGradient = ThisParameters[
"element_settings"].
Has(
"requires_distance_gradient") ? ThisParameters[
"element_settings"][
"requires_distance_gradient"].
GetBool() :
false;
884 mMaxAllowedCFL = ThisParameters[
"max_CFL"].
GetDouble();
885 mMaxSubsteps = ThisParameters[
"max_substeps"].
GetInt();
886 mIsBfecc = ThisParameters[
"eulerian_error_compensation"].
GetBool();
888 mPowerBfeccLimiter = ThisParameters[
"BFECC_limiter_acuteness"].
GetDouble();
891 mMaxAllowedCFL = ThisParameters[
"max_CFL"].
GetDouble();
892 mpLevelSetVar = &KratosComponents<Variable<double>>::Get(ThisParameters[
"levelset_variable_name"].GetString());
893 mpConvectVar = &KratosComponents<Variable<array_1d<double,3>>>::Get(ThisParameters[
"levelset_convection_variable_name"].GetString());
894 if (ThisParameters[
"convection_model_part_name"].GetString() ==
"") {
895 mAuxModelPartName = mrBaseModelPart.Name() +
"_DistanceConvectionPart";
897 mAuxModelPartName = ThisParameters[
"convection_model_part_name"].
GetString();
901 mpLevelSetGradientVar = (mIsBfecc || mElementRequiresLevelSetGradient) ? &(KratosComponents<Variable<array_1d<double, 3>>>::Get(ThisParameters[
"levelset_gradient_variable_name"].GetString())) :
nullptr;
902 mEvaluateLimiter = (mIsBfecc || mElementRequiresLimiter) ?
true :
false;
905 std::string GetConvectionElementRegisteredName(Parameters ThisParameters)
908 std::string
element_type = ThisParameters[
"element_type"].GetString();
912 "Attempting to use custom specified element." << std::endl;
915 mConvectionElementType = GetConvectionElementName(
element_type);
917 std::string element_register_name = mConvectionElementType + std::to_string(TDim) +
"D" + std::to_string(TDim + 1) +
"N";
920 <<
" and it is nor registered as a kratos element either. Please check your settings\n";
922 return element_register_name;
930 const virtual inline std::vector<std::string> GetConvectionElementsList()
932 std::vector<std::string> elements_list = {
933 "levelset_convection_supg",
934 "levelset_convection_algebraic_stabilization"
936 return elements_list;
945 const virtual std::string GetConvectionElementName(std::string InputName)
947 const std::map<std::string, std::string> elements_name_map {
948 {
"levelset_convection_supg",
"LevelSetConvectionElementSimplex"},
949 {
"levelset_convection_algebraic_stabilization",
"LevelSetConvectionElementSimplexAlgebraicStabilization"}
951 return elements_name_map.at(InputName);
960 const virtual Parameters GetConvectionElementDefaultParameters(
const std::string
ElementType)
962 Parameters default_parameters;
964 default_parameters = Parameters(R
"({
966 "cross_wind_stabilization_factor" : 0.7,
967 "requires_distance_gradient" : false,
968 "time_integration_theta" : 0.5,
971 } else if (
ElementType ==
"levelset_convection_algebraic_stabilization") {
972 default_parameters = Parameters(R
"({
973 "include_anti_diffusivity_terms" : false,
974 "elemental_limiter_acuteness" : 4.0,
975 "requires_distance_gradient" : false,
976 "time_integration_theta" : 0.5
980 return default_parameters;
989 const virtual std::function<void(ModelPart&)> GetFillProcessInfoFormulationDataFunction()
991 std::function<void(ModelPart&)> fill_process_info_function;
993 if (mConvectionElementType ==
"LevelSetConvectionElementSimplex") {
994 fill_process_info_function = [
this](
ModelPart &rModelPart) {
995 auto &r_process_info = rModelPart.GetProcessInfo();
996 r_process_info.SetValue(DYNAMIC_TAU, mLevelSetConvectionSettings[
"element_settings"][
"dynamic_tau"].GetDouble());
997 r_process_info.SetValue(CROSS_WIND_STABILIZATION_FACTOR, mLevelSetConvectionSettings[
"element_settings"][
"cross_wind_stabilization_factor"].GetDouble());
998 r_process_info.SetValue(TIME_INTEGRATION_THETA, mLevelSetConvectionSettings[
"element_settings"][
"time_integration_theta"].GetDouble());
1000 }
else if (mConvectionElementType ==
"LevelSetConvectionElementSimplexAlgebraicStabilization") {
1001 fill_process_info_function = [
this](
ModelPart &rModelPart) {
1002 auto &r_process_info = rModelPart.GetProcessInfo();
1003 r_process_info.SetValue(TIME_INTEGRATION_THETA, mLevelSetConvectionSettings[
"element_settings"][
"time_integration_theta"].GetDouble());
1006 fill_process_info_function = [](
ModelPart &rModelPart) {};
1009 return fill_process_info_function;
1012 void InitializeConvectionStrategy(BuilderAndSolverPointerType pBuilderAndSolver)
1015 KRATOS_ERROR_IF(mrBaseModelPart.NumberOfNodes() == 0) <<
"The model has no nodes." << std::endl;
1016 KRATOS_ERROR_IF(mrBaseModelPart.NumberOfElements() == 0) <<
"The model has no elements." << std::endl;
1019 VariableUtils().CheckVariableExists<Variable<double>>(*mpLevelSetVar, mrBaseModelPart.Nodes());
1020 VariableUtils().CheckVariableExists<Variable<array_1d<double,3>>>(*mpConvectVar, mrBaseModelPart.Nodes());
1023 if constexpr (TDim == 2){
1025 "In 2D the element type is expected to be a triangle" << std::endl;
1026 }
else if constexpr (TDim == 3) {
1028 "In 3D the element type is expected to be a tetrahedra" << std::endl;
1032 ReGenerateConvectionModelPart(mrBaseModelPart);
1035 bool CalculateReactions =
false;
1037 bool CalculateNormDxFlag =
false;
1038 auto p_scheme = Kratos::make_shared<ResidualBasedIncrementalUpdateStaticScheme<TSparseSpace,TDenseSpace>>();
1039 mpSolvingStrategy = Kratos::make_unique< ResidualBasedLinearStrategy<TSparseSpace,TDenseSpace,TLinearSolver > >(
1040 *mpDistanceModelPart,
1045 CalculateNormDxFlag);
1047 mpSolvingStrategy->SetEchoLevel(mLevelSetConvectionSettings[
"echo_level"].GetInt());
1048 mpSolvingStrategy->Check();
1049 mpSolvingStrategy->Initialize();
1065 LevelSetConvectionProcess&
operator=(LevelSetConvectionProcess
const& rOther);
1079 template<
unsigned int TDim,
class TSparseSpace,
class TDenseSpace,
class TLinearSolver>
1081 std::istream& rIStream,
1085 template<
unsigned int TDim,
class TSparseSpace,
class TDenseSpace,
class TLinearSolver>
1087 std::ostream& rOStream,
1091 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Current class provides an implementation for the base builder and solving operations.
Definition: builder_and_solver.h:64
virtual const DataCommunicator & GetDataCommunicator() const
Definition: communicator.cpp:340
Compute Nodal Gradient process.
Definition: compute_nodal_gradient_process.h:123
void SetValue(const Variable< TDataType > &rThisVariable, TDataType const &rValue)
Sets the value for a given variable.
Definition: data_value_container.h:320
TDataType & GetValue(const Variable< TDataType > &rThisVariable)
Gets the value associated with a given variable.
Definition: data_value_container.h:268
Base class for all Elements.
Definition: element.h:60
virtual Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new element pointer.
Definition: element.h:202
Computes NODAL_H.
Definition: find_nodal_h_process.h:69
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometrical_object.h:248
static void CalculateGeometryData(const GeometryType &rGeometry, BoundedMatrix< double, 4, 3 > &rDN_DX, array_1d< double, 4 > &rN, double &rVolume)
This function is designed to compute the shape function derivatives, shape functions and volume in 3D...
Definition: geometry_utilities.h:176
A template class for handling communication related to global pointers.
Definition: pointer_communicator.h:178
ResultsProxy< TPointerDataType, TFunctorType > Apply(TFunctorType &&UserFunctor)
Applies a user-provided function to the global pointers and return a proxy to the results.
Definition: pointer_communicator.h:266
This class is a wrapper for a pointer to a data that is located in a different rank.
Definition: global_pointer.h:44
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
void push_back(TPointerType x)
Definition: global_pointers_vector.h:322
size_type size() const
Definition: global_pointers_vector.h:307
Implicit solving strategy base class This is the base class from which we will derive all the implici...
Definition: implicit_solving_strategy.h:61
This class is useful for index iteration over containers.
Definition: parallel_utilities.h:451
void for_each(TUnaryFunction &&f)
Definition: parallel_utilities.h:514
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
void clear()
Definition: amatrix_interface.h:284
static bool Has(const std::string &rName)
Check if the given name exists in the set of components.
Definition: kratos_components.h:161
static const TComponentType & Get(const std::string &rName)
Retrieves a component with the specified name.
Definition: kratos_components.h:114
Short class definition.
Definition: levelset_convection_process.h:71
Vector mError
Definition: levelset_convection_process.h:422
std::vector< array_1d< double, 3 > > mVelocityOld
Definition: levelset_convection_process.h:434
Vector mOldDistance
Definition: levelset_convection_process.h:424
void ErrorCalculationAndCorrection()
Eulerian error calculation and correction This function implements the Backward Forward Error Compens...
Definition: levelset_convection_process.h:782
LevelSetConvectionProcess(ModelPart &rBaseModelPart, typename TLinearSolver::Pointer pLinearSolver, Parameters ThisParameters)
Construct a new Level Set Convection Process object Level set convection proces model part constructo...
Definition: levelset_convection_process.h:149
bool mDistancePartIsInitialized
Definition: levelset_convection_process.h:436
Vector mSigmaPlus
Definition: levelset_convection_process.h:426
BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::Pointer BuilderAndSolverPointerType
Definition: levelset_convection_process.h:109
SolvingStrategyType::UniquePointer mpSolvingStrategy
Definition: levelset_convection_process.h:438
LevelSetConvectionProcess(LevelSetConvectionProcess const &rOther)=delete
Copy constructor.
virtual void ReGenerateConvectionModelPart(ModelPart &rBaseModelPart)
Definition: levelset_convection_process.h:513
Parameters mLevelSetConvectionSettings
Definition: levelset_convection_process.h:446
double mPowerBfeccLimiter
Definition: levelset_convection_process.h:418
ComputeGradientProcessType::Pointer ComputeGradientProcessPointerType
Definition: levelset_convection_process.h:111
std::vector< array_1d< double, 3 > > mVelocity
Definition: levelset_convection_process.h:432
const Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: levelset_convection_process.h:331
bool mElementRequiresLimiter
Definition: levelset_convection_process.h:408
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: levelset_convection_process.h:369
Vector mSigmaMinus
Definition: levelset_convection_process.h:428
std::string mConvectionElementType
Definition: levelset_convection_process.h:442
bool mElementRequiresLevelSetGradient
Definition: levelset_convection_process.h:414
double mMaxAllowedCFL
Definition: levelset_convection_process.h:402
std::string Info() const override
Turn back information as a string.
Definition: levelset_convection_process.h:364
bool mElementTauNodal
Definition: levelset_convection_process.h:410
unsigned int mMaxSubsteps
Definition: levelset_convection_process.h:404
void Clear() override
This method clears the assignation of the conditions.
Definition: levelset_convection_process.h:310
const Element * mpConvectionFactoryElement
Definition: levelset_convection_process.h:444
bool mCalculateNodalH
Definition: levelset_convection_process.h:412
void SetConvectionProblemSettings()
Set the level set convection formulation settings This method sets the convection diffusion settings ...
Definition: levelset_convection_process.h:490
Model & mrModel
Definition: levelset_convection_process.h:392
KRATOS_CLASS_POINTER_DEFINITION(LevelSetConvectionProcess)
Pointer definition of LevelSetConvectionProcess.
LevelSetConvectionProcess(ModelPart &rModelPart, Parameters ThisParameters)
Definition: levelset_convection_process.h:459
const Variable< array_1d< double, 3 > > * mpConvectVar
Definition: levelset_convection_process.h:398
LevelSetConvectionProcess(Model &rModel, typename TLinearSolver::Pointer pLinearSolver, Parameters ThisParameters)
Construct a new Level Set Convection Process object Level set convection proces model constructor.
Definition: levelset_convection_process.h:131
ComputeGradientProcessPointerType mpGradientCalculator
Definition: levelset_convection_process.h:448
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: levelset_convection_process.h:374
double mPowerElementalLimiter
Definition: levelset_convection_process.h:420
Vector mLimiter
Definition: levelset_convection_process.h:430
const Variable< array_1d< double, 3 > > * mpLevelSetGradientVar
Definition: levelset_convection_process.h:400
void ComputeNodalH()
Nodal H calculation This function calculates the nodal h by executing a process where the nodal h cal...
Definition: levelset_convection_process.h:823
void InitializeDistanceModelPartDatabases()
Initializes the databases values This function initializes is intended to collect all the database in...
Definition: levelset_convection_process.h:586
void Execute() override
Perform the level-set convection This solver provides a stabilized convection solver based on [Codina...
Definition: levelset_convection_process.h:194
std::string mAuxModelPartName
Definition: levelset_convection_process.h:440
void operator()()
Definition: levelset_convection_process.h:178
const Variable< double > * mpLevelSetVar
Definition: levelset_convection_process.h:396
ComputeNodalGradientProcess< ComputeNodalGradientProcessSettings::SaveAsNonHistoricalVariable > ComputeGradientProcessType
Definition: levelset_convection_process.h:110
ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > SolvingStrategyType
Definition: levelset_convection_process.h:108
unsigned int EvaluateNumberOfSubsteps()
Definition: levelset_convection_process.h:602
bool mIsBfecc
Definition: levelset_convection_process.h:406
~LevelSetConvectionProcess() override
Destructor.
Definition: levelset_convection_process.h:169
ModelPart * mpDistanceModelPart
Definition: levelset_convection_process.h:394
void EvaluateLimiter()
Convection limiter evaluation This function implements the limiter evaluation Note that both the stan...
Definition: levelset_convection_process.h:655
bool mEvaluateLimiter
Definition: levelset_convection_process.h:416
ModelPart & mrBaseModelPart
Definition: levelset_convection_process.h:390
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
ModelPart & CreateModelPart(const std::string &ModelPartName, IndexType NewBufferSize=1)
This method creates a new model part contained in the current Model with a given name and buffer size...
Definition: model.cpp:37
void DeleteModelPart(const std::string &ModelPartName)
This method deletes a modelpart with a given name.
Definition: model.cpp:64
bool HasModelPart(const std::string &rFullModelPartName) const
This method checks if a certain a model part exists given a certain name.
Definition: model.cpp:178
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
void SetProcessInfo(ProcessInfo::Pointer pNewProcessInfo)
Definition: model_part.h:1766
ProcessInfo::Pointer pGetProcessInfo()
Definition: model_part.h:1756
PropertiesIterator PropertiesBegin(IndexType ThisIndex=0)
Definition: model_part.h:978
Communicator & GetCommunicator()
Definition: model_part.h:1821
void SetBufferSize(IndexType NewBufferSize)
This method sets the suffer size of the model part database.
Definition: model_part.cpp:2171
IndexType GetBufferSize() const
This method gets the suffer size of the model part database.
Definition: model_part.h:1876
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
SizeType NumberOfElements(IndexType ThisIndex=0) const
Definition: model_part.h:1027
void AddProperties(PropertiesType::Pointer pNewProperties, IndexType ThisIndex=0)
Inserts a properties in the current mesh.
Definition: model_part.cpp:582
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
TablesContainerType & Tables()
Definition: model_part.h:635
SizeType NumberOfNodes(IndexType ThisIndex=0) const
Definition: model_part.h:341
PropertiesIterator PropertiesEnd(IndexType ThisIndex=0)
Definition: model_part.h:988
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
double GetDouble() const
This method returns the double contained in the current Parameter.
Definition: kratos_parameters.cpp:657
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
void SetBool(const bool Value)
This method sets the bool contained in the current Parameter.
Definition: kratos_parameters.cpp:803
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
std::string GetString() const
This method returns the string contained in the current Parameter.
Definition: kratos_parameters.cpp:684
bool Has(const std::string &rEntry) const
This method checks if the Parameter contains a certain entry.
Definition: kratos_parameters.cpp:520
bool GetBool() const
This method returns the boolean contained in the current Parameter.
Definition: kratos_parameters.cpp:675
The base class for all processes in Kratos.
Definition: process.h:49
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
This class implements a set of auxiliar, already parallelized, methods to perform some common tasks r...
Definition: variable_utils.h:63
void AddDof(const TVarType &rVar, ModelPart &rModelPart)
This function add dofs to the nodes in a model part. It is useful since addition is done in parallel.
Definition: variable_utils.h:1361
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
std::istream & operator>>(std::istream &rIStream, LevelSetConvectionProcess< TDim, TSparseSpace, TDenseSpace, TLinearSolver > &rThis)
Input stream function.
std::ostream & operator<<(std::ostream &rOStream, const LevelSetConvectionProcess< TDim, TSparseSpace, TDenseSpace, TLinearSolver > &rThis)
Output stream function.
Definition: levelset_convection_process.h:1086
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_INFO(label)
Definition: logger.h:250
#define KRATOS_INFO_IF(label, conditional)
Definition: logger.h:251
Kratos::ModelPart ModelPart
Definition: kratos_wrapper.h:31
dt
Definition: DEM_benchmarks.py:173
static double max(double a, double b)
Definition: GeometryFunctions.h:79
static double min(double a, double b)
Definition: GeometryFunctions.h:71
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
void block_for_each(TIterator itBegin, TIterator itEnd, TFunction &&rFunction)
Execute a functor on all items of a range in parallel.
Definition: parallel_utilities.h:299
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
list fraction
Definition: angle_finder.py:11
int n_steps
Definition: bombardelli_test.py:27
int step
Definition: face_heat.py:88
float dynamic_tau
Definition: fluid_only_var.py:11
tau
Definition: generate_convection_diffusion_explicit_element.py:115
h
Definition: generate_droplet_dynamics.py:91
vgauss
Definition: generate_stokes_twofluid_element.py:52
int n_nodes
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:15
element_type
Choosing element type for lagrangian_model_part.
Definition: lagrangian_droplet_test.py:56
list element_list
Definition: mesh_to_mdpa_converter.py:43
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17
ReformDofAtEachIteration
Definition: test_pureconvectionsolver_benchmarking.py:131