14 #if !defined(KRATOS_RUNGE_KUTTA_GLS_STRATEGY)
15 #define KRATOS_RUNGE_KUTTA_GLS_STRATEGY
22 #include "boost/smart_ptr.hpp"
94 template<
unsigned int TDim,
class TSparseSpace,
145 typename TLinearSolver::Pointer pNewPressureLinearSolver,
146 bool CalculateReactions =
false,
148 bool CalculateNormDxFlag =
true
181 typename SchemeType::Pointer pscheme =
typename SchemeType::Pointer
208 mSlipBoundaryList.clear();
210 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
213 if (it->FastGetSolutionStepValue(FLAG_VARIABLE)==3.0)
215 mSlipBoundaryList.push_back(*(it.base()));
219 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
221 if(it->pGetDof(VELOCITY_X)->IsFixed() ==
true)
223 mFixedVelocityDofSet.
push_back( it->pGetDof(VELOCITY_X).get() );
224 mFixedVelocityDofValues.push_back( it->pGetDof(VELOCITY_X)->GetSolutionStepValue() );
227 if(it->pGetDof(VELOCITY_Y)->IsFixed() ==
true)
229 mFixedVelocityDofSet.
push_back( it->pGetDof(VELOCITY_Y).get() );
230 mFixedVelocityDofValues.push_back( it->pGetDof(VELOCITY_Y)->GetSolutionStepValue() );
233 if(it->pGetDof(VELOCITY_Z)->IsFixed() ==
true)
235 mFixedVelocityDofSet.
push_back( it->pGetDof(VELOCITY_Z).get() );
236 mFixedVelocityDofValues.push_back( it->pGetDof(VELOCITY_Z)->GetSolutionStepValue() );
246 if constexpr (TDim==2)
250 if (
typeid(ref_el) !=
typeid(
el))
251 KRATOS_THROW_ERROR(std::logic_error,
"Incompressible Runge Kutta Strategy requires utilization of Fluid2DGLS_expl elements " ,
"");
254 if constexpr (TDim==3)
256 KRATOS_THROW_ERROR(std::logic_error,
"not Runge Kutta Strategy for 3D problems " ,
"");
277 KRATOS_WATCH(
"Solve of Runge Kutta GLS Frac Step Strategy")
310 i_dof->GetSolutionStepValue() = mFixedVelocityDofValues[
i];
322 for(ModelPart::NodesContainerType::iterator
i = rNodes.begin();
i!=rNodes.end();
i++)
331 for(ModelPart::NodesContainerType::iterator
i = rNodes.begin();
i!=rNodes.end();
i++)
332 i->FastGetSolutionStepValue(rVariable) = 0.0;
351 bool inverted_element=
true;
355 double time_ccc =
model_part.GetProcessInfo()[TIME];
356 double time_cal=time_ccc -
delta_t;
358 for(ModelPart::NodesContainerType::iterator in =
model_part.NodesBegin() ; in !=
model_part.NodesEnd() ; ++in)
360 in->FastGetSolutionStepValue(IS_INTERFACE)=0.0;
372 mFixedVelocityDofSet.
clear();
373 mFixedVelocityDofValues.clear();
375 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
377 if(it->pGetDof(VELOCITY_X)->IsFixed() ==
true)
379 mFixedVelocityDofSet.
push_back( it->pGetDof(VELOCITY_X).get() );
380 mFixedVelocityDofValues.push_back( it->pGetDof(VELOCITY_X)->GetSolutionStepValue() );
383 if(it->pGetDof(VELOCITY_Y)->IsFixed() ==
true)
385 mFixedVelocityDofSet.
push_back( it->pGetDof(VELOCITY_Y).get() );
386 mFixedVelocityDofValues.push_back( it->pGetDof(VELOCITY_Y)->GetSolutionStepValue() );
389 if(it->pGetDof(VELOCITY_Z)->IsFixed() ==
true)
391 mFixedVelocityDofSet.
push_back( it->pGetDof(VELOCITY_Z).get() );
392 mFixedVelocityDofValues.push_back( it->pGetDof(VELOCITY_Z)->GetSolutionStepValue() );
402 while(inverted_element==
true )
404 inverted_element=
false;
406 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
408 noalias(it->FastGetSolutionStepValue(VELOCITY_OLD)) = it->FastGetSolutionStepValue(VELOCITY,1);
411 it->FastGetSolutionStepValue(PRESSURE) = it->FastGetSolutionStepValue(PRESSURE,1);
412 it->FastGetSolutionStepValue(VELOCITY) = it->FastGetSolutionStepValue(VELOCITY,1);
413 it->FastGetSolutionStepValue(NODAL_MASS)=0.0;
422 im->Calculate(NODAL_MASS,
dummy, proc_info);
432 Frac_Step_Switch[0]=1.0;
433 Frac_Step_Switch[1]=1.0;
434 Frac_Step_Switch[2]=1.0;
439 #if defined( UPDATE_MASS)
441 if(inverted==
true ) inverted_element=
true;
444 double cal_time=time_cal;
451 im->Calculate(VELOCITY, Frac_Step_Switch, proc_info);
457 double one_sixt = 0.166666666666667;
458 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
460 noalias(it->FastGetSolutionStepValue(CONV_PROJ))= one_sixt *
delta_t * it->FastGetSolutionStepValue(VELOCITY,1);
462 noalias(aux) =
delta_t/(it->FastGetSolutionStepValue(NODAL_MASS)) * it->FastGetSolutionStepValue(VELOCITY_OLD_OLD);
463 noalias(it->FastGetSolutionStepValue(VELOCITY_OLD)) += one_sixt * aux;
464 noalias(it->FastGetSolutionStepValue(VELOCITY)) = 0.5 * aux + it->FastGetSolutionStepValue(VELOCITY,1);
469 if (mSlipBoundaryList.size()!=0)
475 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
477 it->FastGetSolutionStepValue(ADVPROJ)= it->Coordinates();
480 if(it->FastGetSolutionStepValue(IS_STRUCTURE)==0.0)
482 noalias(it->Coordinates())+= 0.5 *
delta_t * it->FastGetSolutionStepValue(VELOCITY,1);
496 #if defined( UPDATE_MASS)
498 if(inverted==
true ) inverted_element=
true;
502 cal_time=time_cal + 0.5 *
delta_t;
506 im->Calculate(VELOCITY, Frac_Step_Switch, proc_info);
510 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
513 it->Coordinates()=it->FastGetSolutionStepValue(ADVPROJ);
514 if(it->FastGetSolutionStepValue(IS_STRUCTURE)==0.0)
517 noalias(it->Coordinates())+= 0.5 *
delta_t * it->FastGetSolutionStepValue(VELOCITY);
522 double one_third = 0.33333333333333333333333333;
524 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
527 noalias(it->FastGetSolutionStepValue(CONV_PROJ))+= one_third *
delta_t * it->FastGetSolutionStepValue(VELOCITY);
528 noalias(aux) =
delta_t/(it->FastGetSolutionStepValue(NODAL_MASS)) * it->FastGetSolutionStepValue(VELOCITY_OLD_OLD);
529 noalias(it->FastGetSolutionStepValue(VELOCITY_OLD)) += one_third * aux;
531 noalias(it->FastGetSolutionStepValue(VELOCITY)) = 0.5 * aux + it->FastGetSolutionStepValue(VELOCITY,1);
536 if (mSlipBoundaryList.size()!=0)
542 #if defined( UPDATE_MASS)
544 if(inverted==
true ) inverted_element=
true;
554 cal_time=time_cal + 0.5 *
delta_t;
558 im->Calculate(VELOCITY, Frac_Step_Switch, proc_info);
561 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
564 if(it->FastGetSolutionStepValue(IS_STRUCTURE)==0.0)
567 noalias(it->Coordinates())= it->FastGetSolutionStepValue(ADVPROJ);
569 noalias(it->Coordinates())+=
delta_t * it->FastGetSolutionStepValue(VELOCITY);
573 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
575 noalias(it->FastGetSolutionStepValue(CONV_PROJ))+= one_third *
delta_t * it->FastGetSolutionStepValue(VELOCITY);
576 noalias(aux) =
delta_t/(it->FastGetSolutionStepValue(NODAL_MASS)) * it->FastGetSolutionStepValue(VELOCITY_OLD_OLD);
577 noalias(it->FastGetSolutionStepValue(VELOCITY_OLD)) += one_third * aux;
579 noalias(it->FastGetSolutionStepValue(VELOCITY)) = aux + it->FastGetSolutionStepValue(VELOCITY,1);
584 if (mSlipBoundaryList.size()!=0)
595 #if defined( UPDATE_MASS)
597 if(inverted==
true ) inverted_element=
true;
605 im->Calculate(VELOCITY, Frac_Step_Switch, proc_info);
608 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
611 noalias(it->FastGetSolutionStepValue(CONV_PROJ))+= one_sixt *
delta_t * it->FastGetSolutionStepValue(VELOCITY);
614 noalias(aux) =
delta_t/(it->FastGetSolutionStepValue(NODAL_MASS)) * it->FastGetSolutionStepValue(VELOCITY_OLD_OLD);
615 noalias(it->FastGetSolutionStepValue(VELOCITY_OLD)) += one_sixt * aux;
618 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
620 noalias(it->Coordinates())=it->FastGetSolutionStepValue(ADVPROJ);
621 if(it->FastGetSolutionStepValue(IS_STRUCTURE)==0.0)
623 noalias(it->Coordinates())+= it->FastGetSolutionStepValue(CONV_PROJ);
627 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
629 noalias(it->FastGetSolutionStepValue(VELOCITY)) = it->FastGetSolutionStepValue(VELOCITY_OLD);
633 if (mSlipBoundaryList.size()!=0)
636 #if defined( UPDATE_MASS)
638 if(inverted==
true ) inverted_element=
true;
641 if(inverted_element==
true) {
644 inverted_element=
false;
671 const double dt =
model_part.GetProcessInfo()[DELTA_TIME];
675 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
677 it->FastGetSolutionStepValue(VELOCITY_OLD)=
ZeroVector(3);
678 it->FastGetSolutionStepValue(CONV_PROJ)=it->FastGetSolutionStepValue(VELOCITY);
681 double one_sixth = 0.166666666666667;
683 if constexpr (TDim==2)
686 boost::numeric::ublas::bounded_matrix<double,3,2> DN_DX;
693 for (
typename ModelPart::ElementsContainerType::iterator it=
model_part.ElementsBegin(); it!=
model_part.ElementsEnd(); ++it)
702 pres_inc[0] = geom[0].FastGetSolutionStepValue(PRESSURE)-geom[0].FastGetSolutionStepValue(PRESSURE,1);
703 pres_inc[1] = geom[1].FastGetSolutionStepValue(PRESSURE)-geom[1].FastGetSolutionStepValue(PRESSURE,1);
704 pres_inc[2] = geom[2].FastGetSolutionStepValue(PRESSURE)-geom[2].FastGetSolutionStepValue(PRESSURE,1);
710 double p_avg =
N[0]*pres_inc[0]
720 aaa[0] += DN_DX(0, 0) * p_avg;
721 aaa[1] += DN_DX(0, 1) * p_avg;
722 aaa[2] += DN_DX(1, 0) * p_avg;
723 aaa[3] += DN_DX(1, 1) * p_avg;
724 aaa[4] += DN_DX(2, 0) * p_avg;
725 aaa[5] += DN_DX(2, 1) * p_avg;
729 geom[0].FastGetSolutionStepValue(VELOCITY_OLD_X) += aaa[0];
730 geom[0].FastGetSolutionStepValue(VELOCITY_OLD_Y) += aaa[1];
732 geom[1].FastGetSolutionStepValue(VELOCITY_OLD_X) += aaa[2];
733 geom[1].FastGetSolutionStepValue(VELOCITY_OLD_Y) += aaa[3];
735 geom[2].FastGetSolutionStepValue(VELOCITY_OLD_X) += aaa[4];
736 geom[2].FastGetSolutionStepValue(VELOCITY_OLD_Y) += aaa[5];
740 if constexpr (TDim==3)
745 boost::numeric::ublas::bounded_matrix<double,12,3> shape_func =
ZeroMatrix(12, 3);
746 boost::numeric::ublas::bounded_matrix<double,12,4> G =
ZeroMatrix(12,4);
747 boost::numeric::ublas::bounded_matrix<double,4,3> DN_DX;
750 for (
typename ModelPart::ElementsContainerType::iterator it=
model_part.ElementsBegin(); it!=
model_part.ElementsEnd(); ++it)
754 pres_inc[0] = geom[0].FastGetSolutionStepValue(PRESSURE,1)-geom[0].FastGetSolutionStepValue(PRESSURE);
755 pres_inc[1] = geom[1].FastGetSolutionStepValue(PRESSURE,1)-geom[1].FastGetSolutionStepValue(PRESSURE);
756 pres_inc[2] = geom[2].FastGetSolutionStepValue(PRESSURE,1)-geom[2].FastGetSolutionStepValue(PRESSURE);
757 pres_inc[3] = geom[3].FastGetSolutionStepValue(PRESSURE,1)-geom[3].FastGetSolutionStepValue(PRESSURE);
768 for (
int ii = 0; ii< 4; ii++)
786 geom[0].FastGetSolutionStepValue(VELOCITY_OLD) += aux;
792 geom[1].FastGetSolutionStepValue(VELOCITY_OLD) += aux;
797 geom[2].FastGetSolutionStepValue(VELOCITY_OLD) += aux;
802 geom[3].FastGetSolutionStepValue(VELOCITY_OLD) += aux;
809 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
812 double dt_Minv =
dt / it->FastGetSolutionStepValue(NODAL_MASS);
814 if(!it->IsFixed(VELOCITY_X))
816 it->FastGetSolutionStepValue(VELOCITY_X)+= dt_Minv*
temp[0];
819 if(!it->IsFixed(VELOCITY_Y))
821 it->FastGetSolutionStepValue(VELOCITY_Y)+= dt_Minv*
temp[1];
823 if(!it->IsFixed(VELOCITY_Z))
825 it->FastGetSolutionStepValue(VELOCITY_Z)+= dt_Minv*
temp[2];
842 const double&
p = (
i)->FastGetSolutionStepValue(PRESSURE);
854 const double dt =
model_part.GetProcessInfo()[DELTA_TIME];
858 acc=(
i)->FastGetSolutionStepValue(VELOCITY)-(
i)->FastGetSolutionStepValue(VELOCITY,1);
859 (
i)->FastGetSolutionStepValue(ACCELERATION)=acc/
dt;
870 for (
PointIterator it=mSlipBoundaryList.begin(); it!=mSlipBoundaryList.end(); ++it)
874 double length = sqrt(normal[0]*normal[0]+normal[1]*normal[1]+normal[2]*normal[2]);
877 KRATOS_THROW_ERROR(std::logic_error,
"TO apply SLIP you should calculate normals first! Dont forget to assign Condition2D/3D resp for that " ,
"");
886 normal_comp_vec = normal_comp*normal;
887 (*it)->FastGetSolutionStepValue(VELOCITY)-=normal_comp_vec;
898 boost::numeric::ublas::bounded_matrix<double,TDim+1,TDim> DN_DX;
905 unsigned int dof_position = (r_model_part.
NodesBegin())->GetDofPosition(DISPLACEMENT_X);
907 double aaa = 1.0/(TDim+1.0);
914 unsigned int str_nr=0;
916 for (
unsigned int k = 0;
k<geom.
size();
k++)
918 str_nr+=
int(
i->GetGeometry()[
k].FastGetSolutionStepValue(IS_STRUCTURE));
921 if (geom.
size()!=str_nr)
930 for(
unsigned int ii = 0; ii<geom.
size(); ii++)
932 local_indices[ii] = geom[ii].GetDof(DISPLACEMENT_X,dof_position).EquationId();
936 for(
unsigned int row = 0;
row<TDim+1;
row++)
938 unsigned int row_index = local_indices[
row] / (TDim);
939 mMdiagInv[row_index] +=
temp;
948 if (mMdiagInv[
i]>1
e-26)
949 mMdiagInv[
i] = 1.0/mMdiagInv[
i];
955 mMdiagInv[
i] = 1000000000000.0;
971 unsigned int str_nr=0;
972 for (
unsigned int k = 0;
k<
i->GetGeometry().size();
k++)
974 str_nr+=(
unsigned int)(
i->GetGeometry()[
k].FastGetSolutionStepValue(IS_STRUCTURE));
977 if (geom.
size()!=str_nr)
985 for(
unsigned int ii = 0; ii<geom.
size(); ii++)
987 local_indices[ii] = geom[ii].GetDof(DISPLACEMENT_X,dof_position).EquationId();
1004 for(
unsigned int row = 0;
row<TDim+1;
row++)
1006 unsigned int row_index = local_indices[
row] / (TDim);
1007 for(
unsigned int col = 0; col<TDim+1; col++)
1009 unsigned int col_index = local_indices[col] /(TDim);
1010 if (row_index==col_index)
1013 if constexpr (TDim==2)
1014 Mconsistent(row_index,col_index) += 0.25*
temp * 2.0;
1015 else if constexpr (TDim==3)
1016 Mconsistent(row_index,col_index) += 0.2*
temp * 2.0;
1022 if constexpr (TDim==2)
1023 Mconsistent(row_index,col_index) += 0.25*
temp ;
1024 else if constexpr (TDim==3)
1025 Mconsistent(row_index,col_index) += 0.2*
temp;
1049 bool inv_element=
false;
1050 unsigned int bad_elements_number=0;
1065 im->GetGeometry()[0].FastGetSolutionStepValue(IS_INTERFACE)=1.0;
1066 im->GetGeometry()[1].FastGetSolutionStepValue(IS_INTERFACE)=1.0;
1067 im->GetGeometry()[2].FastGetSolutionStepValue(IS_INTERFACE)=1.0;
1068 bad_elements_number++;
1074 unsigned int bad_nodes=0;
1075 for(ModelPart::NodesContainerType::iterator in =
model_part.NodesBegin() ; in !=
model_part.NodesEnd() ; ++in)
1077 if (in->FastGetSolutionStepValue(IS_INTERFACE)==1.0)
1081 while (bad_nodes>=1)
1084 for(ModelPart::NodesContainerType::iterator in =
model_part.NodesBegin() ; in !=
model_part.NodesEnd() ; ++in)
1087 if (in->FastGetSolutionStepValue(IS_INTERFACE)==1.0)
1094 i != in->GetValue(NEIGHBOUR_NODES).end();
i++)
1097 if (
i->FastGetSolutionStepValue(IS_INTERFACE)==0.0)
1100 v+=
i->FastGetSolutionStepValue(VELOCITY);
1101 p+=
i->FastGetSolutionStepValue(PRESSURE);
1115 in->FastGetSolutionStepValue(VELOCITY)=
v;
1116 in->FastGetSolutionStepValue(PRESSURE)=
p;
1117 in->FastGetSolutionStepValue(PRESSURE,1)=
p;
1118 in->FastGetSolutionStepValue(IS_INTERFACE)=0.0;
1124 if(in->FastGetSolutionStepValue(IS_STRUCTURE)==1.0)
1129 in->Set(TO_ERASE,
true);
1142 KRATOS_WATCH(
"Finished While Loop, number of bad nodes is")
1164 KRATOS_WATCH(
"RungeKuttaFractStepGLSStrategy Clear Function called");
1271 std::vector<double> mFixedVelocityDofValues;
Base class for all Elements.
Definition: element.h:60
Short class definition.
Definition: fluid_2dGLS_expl.h:61
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
static double CalculateVolume2D(const GeometryType &rGeometry)
This function computes the element's volume (with sign)
Definition: geometry_utilities.h:292
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
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: global_pointers_vector.h:79
Implicit solving strategy base class This is the base class from which we will derive all the implici...
Definition: implicit_solving_strategy.h:61
BaseType::TSystemVectorType TSystemVectorType
Definition: implicit_solving_strategy.h:72
BaseType::TSystemMatrixType TSystemMatrixType
Definition: implicit_solving_strategy.h:70
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
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
MeshType::ElementIterator ElementIterator
Definition: model_part.h:174
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
This class defines the node.
Definition: node.h:65
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
void clear()
Clear the set, removing all elements.
Definition: pointer_vector_set.h:663
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector_set.h:95
void push_back(TPointerType x)
Adds a pointer to the end of the set.
Definition: pointer_vector_set.h:544
iterator begin()
Returns an iterator pointing to the beginning of the container.
Definition: pointer_vector_set.h:278
iterator end()
Returns an iterator pointing to the end of the container.
Definition: pointer_vector_set.h:314
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
This class provides the implementation of a static scheme.
Definition: residualbased_incrementalupdate_static_scheme.h:57
This is a very simple strategy to solve linearly the problem.
Definition: residualbased_linear_strategy.h:64
Short class definition.
Definition: runge_kutta_fracstep_GLS_strategy.h:100
void ApplyVelocityBoundaryConditions(DofsArrayType &mFixedVelocityDofSet, std::vector< double > &mFixedVelocityDofValues)
Definition: runge_kutta_fracstep_GLS_strategy.h:303
ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
Definition: runge_kutta_fracstep_GLS_strategy.h:110
double mpressure_toll
Definition: runge_kutta_fracstep_GLS_strategy.h:1215
bool CalculateLumpedMassAux()
Definition: runge_kutta_fracstep_GLS_strategy.h:1042
virtual void Clear()
Clears the internal storage.
Definition: runge_kutta_fracstep_GLS_strategy.h:1162
Node::Pointer PointPointerType
Definition: runge_kutta_fracstep_GLS_strategy.h:128
std::vector< unsigned int > IndicesVectorType
Definition: runge_kutta_fracstep_GLS_strategy.h:106
void SaveAccelerations()
Definition: runge_kutta_fracstep_GLS_strategy.h:849
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: runge_kutta_fracstep_GLS_strategy.h:124
void SavePressureIt()
Definition: runge_kutta_fracstep_GLS_strategy.h:834
virtual void SetEchoLevel(int Level)
This sets the level of echo for the solving strategy.
Definition: runge_kutta_fracstep_GLS_strategy.h:1151
BaseType::TDataType TDataType
Definition: runge_kutta_fracstep_GLS_strategy.h:112
void AssembleMassMatrices(TSystemMatrixType &Mconsistent, TSystemVectorType &mMdiagInv, ModelPart &r_model_part)
Definition: runge_kutta_fracstep_GLS_strategy.h:893
void SolveStep1()
Definition: runge_kutta_fracstep_GLS_strategy.h:337
BaseType::DofsArrayType DofsArrayType
Definition: runge_kutta_fracstep_GLS_strategy.h:116
double Solve()
Definition: runge_kutta_fracstep_GLS_strategy.h:275
virtual ~RungeKuttaFracStepStrategy()
Definition: runge_kutta_fracstep_GLS_strategy.h:268
void SetToZero(Variable< double > &rVariable, ModelPart::NodesContainerType &rNodes)
Definition: runge_kutta_fracstep_GLS_strategy.h:328
BaseType::TSystemVectorType TSystemVectorType
Definition: runge_kutta_fracstep_GLS_strategy.h:120
BaseType::Pointer mpressurestep
Definition: runge_kutta_fracstep_GLS_strategy.h:1212
double SolveStep2()
Definition: runge_kutta_fracstep_GLS_strategy.h:654
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: runge_kutta_fracstep_GLS_strategy.h:122
std::vector< PointType::Pointer > PointVector
Definition: runge_kutta_fracstep_GLS_strategy.h:130
Node PointType
Definition: runge_kutta_fracstep_GLS_strategy.h:126
PointVector::iterator PointIterator
Definition: runge_kutta_fracstep_GLS_strategy.h:132
void SolveStep3()
Definition: runge_kutta_fracstep_GLS_strategy.h:665
RungeKuttaFracStepStrategy(ModelPart &model_part, typename TLinearSolver::Pointer pNewPressureLinearSolver, bool CalculateReactions=false, bool ReformDofAtEachIteration=true, bool CalculateNormDxFlag=true)
Definition: runge_kutta_fracstep_GLS_strategy.h:143
bool mReformDofAtEachIteration
Definition: runge_kutta_fracstep_GLS_strategy.h:1222
void ApplySlipBC()
Definition: runge_kutta_fracstep_GLS_strategy.h:865
BaseType::TSystemMatrixType TSystemMatrixType
Definition: runge_kutta_fracstep_GLS_strategy.h:118
KRATOS_CLASS_POINTER_DEFINITION(RungeKuttaFracStepStrategy)
void SetToZero(Variable< array_1d< double, 3 > > &rVariable, ModelPart::NodesContainerType &rNodes)
Definition: runge_kutta_fracstep_GLS_strategy.h:318
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
TDenseSpace::MatrixType LocalSystemMatrixType
Definition: solving_strategy.h:79
TSparseSpace::DataType TDataType
Definition: solving_strategy.h:69
ModelPart & GetModelPart()
Operations to get the pointer to the model.
Definition: solving_strategy.h:350
TSparseSpace::MatrixType TSystemMatrixType
Definition: solving_strategy.h:71
TSparseSpace::VectorType TSystemVectorType
Definition: solving_strategy.h:73
TDenseSpace::VectorType LocalSystemVectorType
Definition: solving_strategy.h:81
static void Start(std::string const &rIntervalName)
This method starts the timer meassures.
Definition: timer.cpp:109
static void Stop(std::string const &rIntervalName)
This method stops the timer meassures.
Definition: timer.cpp:125
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_WATCH(variable)
Definition: define.h:806
#define KRATOS_TRY
Definition: define.h:109
dt
Definition: DEM_benchmarks.py:173
im
Definition: GenerateCN.py:100
TSpaceType::IndexType Size(TSpaceType &dummy, typename TSpaceType::VectorType const &rV)
Definition: add_strategies_to_python.cpp:111
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
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
AMatrix::MatrixRow< const TExpressionType > row(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression, std::size_t RowIndex)
Definition: amatrix_interface.h:649
AMatrix::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
AMatrix::MatrixColumn< const TExpressionType > column(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression, std::size_t ColumnIndex)
Definition: amatrix_interface.h:637
model_part
Definition: face_heat.py:14
v
Definition: generate_convection_diffusion_explicit_element.py:114
vel
Definition: pure_conduction.py:76
int k
Definition: quadrature.py:595
el
Definition: read_stl.py:25
float temp
Definition: rotating_cone.py:85
float delta_t
Definition: rotatingcone_PureConvectionBenchmarking.py:129
int counter
Definition: script_THERMAL_CORRECT.py:218
dummy
Definition: script.py:194
p
Definition: sensitivityMatrix.py:52
N
Definition: sensitivityMatrix.py:29
volume
Definition: sp_statistics.py:15
integer i
Definition: TensorModule.f:17
zero
Definition: test_pureconvectionsolver_benchmarking.py:94
ReformDofAtEachIteration
Definition: test_pureconvectionsolver_benchmarking.py:131
e
Definition: run_cpp_mpi_tests.py:31