51 #if !defined(KRATOS_ULF_TIME_STEP_DEC_PROCESS_INCLUDED )
52 #define KRATOS_ULF_TIME_STEP_DEC_PROCESS_INCLUDED
69 #include "utilities/geometry_utilities.h"
146 double estimated_dt = 0.00;
148 estimated_dt = EstimateDeltaTimeTemplated<2>(dt_max);
150 estimated_dt = EstimateDeltaTimeTemplated<3>(dt_max);
160 double deltatime_new;
161 double deltatime = dt_max;
176 for(ModelPart::ElementsContainerType::iterator
i = mr_model_part.
ElementsBegin();
180 for(
unsigned int iii = 0; iii <
i->GetGeometry().size(); iii++)
183 for(
unsigned int j=0;
j <TDim;
j++)
187 for(
unsigned int iii = 0; iii <
i->GetGeometry().size(); iii++)
190 for(
unsigned int j=0;
j <TDim;
j++)
191 aux_ac(
j,iii) =
a[
j];
198 KRATOS_THROW_ERROR(std::logic_error,
"negative area at the moment of estimating the time step",
"");
203 noalias(
J) = I + deltatime*Dv_dx +0.5*deltatime*deltatime*Da_dx;
211 deltatime_new=deltatime/(1-detJ);
212 deltatime=deltatime_new;
213 noalias(
J) = I + deltatime*Dv_dx+0.5*deltatime*deltatime*Da_dx;
217 deltatime_new=deltatime/(1-detJ);
218 deltatime=deltatime_new;
219 noalias(
J) = I + deltatime*Dv_dx+0.5*deltatime*deltatime*Da_dx;
226 for(
unsigned int iii = 0; iii <
i->GetGeometry().size(); iii++)
228 deltatime_new=deltatime/(1-detJ);
229 deltatime=deltatime_new;
259 std::string
Info()
const override
261 return "UlfTimeStepDecProcess";
267 rOStream <<
"UlfTimeStepDecProcess";
385 rOStream << std::endl;
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
Definition: amatrix_interface.h:41
static double Det(const TMatrixType &rA)
Calculates the determinant of a matrix of a square matrix of any size (no check performed on release ...
Definition: math_utils.h:597
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
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
The base class for all processes in Kratos.
Definition: process.h:49
Short class definition.
Definition: ulf_time_step_dec_process.h:106
KRATOS_CLASS_POINTER_DEFINITION(UlfTimeStepDecProcess)
Pointer definition of PushStructureProcess.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: ulf_time_step_dec_process.h:271
~UlfTimeStepDecProcess() override
Destructor.
Definition: ulf_time_step_dec_process.h:125
double EstimateDeltaTime(const double dt_max, const double domain_size)
Definition: ulf_time_step_dec_process.h:144
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: ulf_time_step_dec_process.h:265
double EstimateDeltaTimeTemplated(const double dt_max)
Definition: ulf_time_step_dec_process.h:156
UlfTimeStepDecProcess(ModelPart &model_part)
Default constructor.
Definition: ulf_time_step_dec_process.h:119
void operator()()
Definition: ulf_time_step_dec_process.h:134
std::string Info() const override
Turn back information as a string.
Definition: ulf_time_step_dec_process.h:259
#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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
AMatrix::IdentityMatrix< double > IdentityMatrix
Definition: amatrix_interface.h:564
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
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
int domain_size
Definition: face_heat.py:4
model_part
Definition: face_heat.py:14
v
Definition: generate_convection_diffusion_explicit_element.py:114
a
Definition: generate_stokes_twofluid_element.py:77
int j
Definition: quadrature.py:648
J
Definition: sensitivityMatrix.py:58
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17