8 #if !defined(KRATOS_DERIVATIVE_RECOVERY)
9 #define KRATOS_DERIVATIVE_RECOVERY
66 template <std::
size_t TDim>
97 mModelPart(r_model_part),
99 mFirstGradientRecovery(true),
100 mFirstLaplacianRecovery(true),
101 mSomeCloudsDontWork(false),
102 mCalculatingTheGradient(false),
103 mCalculatingTheLaplacian(false),
104 mCalculatingGradientAndLaplacian(false),
105 mFirstTimeAppending(true)
107 mStoreFullGradient = r_parameters.
GetValue(
"store_full_gradient_option").
GetBool();
129 template <
class TScalarVariable>
142 void RecoverLagrangianAcceleration(
ModelPart& r_model_part);
144 void CalculateVectorMaterialDerivativeFromGradient(
ModelPart& r_model_part,
Variable<
array_1d<double, 3> >& vector_gradient_container_x,
Variable<
array_1d<double, 3> >& vector_gradient_container_y,
Variable<
array_1d<double, 3> >& vector_gradient_container_z,
Variable<
array_1d<double, 3> >& vector_rate_container,
Variable<
array_1d<double, 3> >& material_derivative_container);
152 template <
class TScalarVariable>
159 void CalculateVelocityLaplacianRate(
ModelPart& r_model_part);
178 virtual std::string
Info()
const
194 return (mElementsPartition);
199 return (mNodesPartition);
205 return (pElements.ptr_begin() + this->GetElementPartition()[
k]);
211 return (pElements.ptr_begin() + this->GetElementPartition()[
k + 1]);
217 return (pNodes.ptr_begin() + this->GetNodePartition()[
k]);
223 return (pNodes.ptr_begin() + this->GetNodePartition()[
k + 1]);
236 bool mFirstGradientRecovery;
237 bool mFirstLaplacianRecovery;
238 bool mSomeCloudsDontWork;
239 bool mCalculatingTheGradient;
240 bool mCalculatingTheLaplacian;
241 bool mCalculatingGradientAndLaplacian;
242 bool mFirstTimeAppending;
243 bool mStoreFullGradient;
244 double mLastMeasurementTime;
245 double mLastPressureVariation;
247 std::vector<double> mPressures;
248 std::vector<DenseVector<double> > mFirstRowsOfB;
249 bool mMustCalculateMaxNodalArea;
250 double mMinFluidFraction;
251 double mMaxNodalAreaInv;
253 int mViscosityModificationType;
254 int mParticlesPerDepthDistance;
257 PointPointSearch::Pointer mpPointPointSearch;
261 std::vector<double> mSearchRadii;
267 bool operator()(std::pair<unsigned int, double>
const& first_pair, std::pair<unsigned int, double>
const& second_pair)
269 return(first_pair.second < second_pair.second || (first_pair.second == second_pair.second && first_pair.first < second_pair.first));
273 void SetNeighboursAndWeights(
ModelPart& r_model_part);
274 void SetNeighboursAndWeightsForTheLaplacian(
ModelPart& r_model_part);
276 bool SetInitialNeighboursAndWeights(
ModelPart& r_model_part, Node::Pointer &p_node);
277 bool SetNeighboursAndWeights(
ModelPart& r_model_part, Node::Pointer& p_node);
280 inline int Factorial(
const unsigned int n);
281 bool SetWeightsAndRunLeastSquaresTest(
ModelPart& r_model_part, Node::Pointer& p_node);
283 double CalculateTheMaximumDistanceToNeighbours(Node::Pointer& p_node);
284 double CalculateTheMaximumEdgeLength(
ModelPart& r_model_part);
285 double CalculateTheMinumumEdgeLength(
ModelPart& r_model_part);
329 template<std::
size_t TDim>
334 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
MeshType & LocalMesh()
Returns the reference to the mesh storing all local entities.
Definition: communicator.cpp:245
Definition: custom_functions.h:41
This class constructs nodal approximations of the derivatives of a field given a Lagrangian linear FE...
Definition: derivative_recovery.h:68
ModelPart::NodesContainerType::iterator NodeIteratorType
Definition: derivative_recovery.h:80
ElementsArrayType::iterator GetElementPartitionEnd(ModelPart &r_model_part, unsigned int k)
Definition: derivative_recovery.h:208
ElementsArrayType::ContainerType ResultElementsContainerType
Definition: derivative_recovery.h:73
NodesArrayType::ContainerType ResultNodesContainerType
Definition: derivative_recovery.h:77
DenseVector< unsigned int > mNodesPartition
Definition: derivative_recovery.h:230
SpatialSearch::VectorDistanceType VectorDistanceType
Definition: derivative_recovery.h:84
KRATOS_CLASS_POINTER_DEFINITION(DerivativeRecovery_TDim)
ModelPart::ElementsContainerType ElementsArrayType
Definition: derivative_recovery.h:72
virtual std::string Info() const
Turn back information as a stemplate<class T, std::size_t dim> tring.
Definition: derivative_recovery.h:178
DenseVector< unsigned int > & GetElementPartition()
Definition: derivative_recovery.h:192
DenseVector< unsigned int > mElementsPartition
Definition: derivative_recovery.h:229
DenseVector< unsigned int > & GetNodePartition()
Definition: derivative_recovery.h:197
std::size_t ListIndexType
Definition: derivative_recovery.h:82
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: derivative_recovery.h:187
DerivativeRecovery< TDim > DerivativeRecovery_TDim
Pointer definition of DerivativeRecovery.
Definition: derivative_recovery.h:87
NodesArrayType::iterator GetNodePartitionEnd(ModelPart &r_model_part, unsigned int k)
Definition: derivative_recovery.h:220
std::vector< ResultElementsContainerType > VectorResultElementsContainerType
Definition: derivative_recovery.h:74
DerivativeRecovery(ModelPart &r_model_part, Parameters &r_parameters)
Default constructor.
Definition: derivative_recovery.h:96
virtual ~DerivativeRecovery()
Destructor.
Definition: derivative_recovery.h:111
ElementsArrayType::iterator GetElementPartitionBegin(ModelPart &r_model_part, unsigned int k)
Definition: derivative_recovery.h:202
ModelPart::NodesContainerType NodesArrayType
Definition: derivative_recovery.h:76
std::vector< ResultNodesContainerType > VectorResultNodesContainerType
Definition: derivative_recovery.h:78
NodesArrayType::iterator GetNodePartitionBegin(ModelPart &r_model_part, unsigned int k)
Definition: derivative_recovery.h:214
std::vector< Node::Pointer > NodalPointersContainerType
Definition: derivative_recovery.h:79
SpatialSearch::DistanceType DistanceType
Definition: derivative_recovery.h:83
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: derivative_recovery.h:184
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
Definition: amatrix_interface.h:41
NodesContainerType & Nodes()
Definition: mesh.h:346
ElementsContainerType & Elements()
Definition: mesh.h:568
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
Communicator & GetCommunicator()
Definition: model_part.h:1821
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
Parameters GetValue(const std::string &rEntry)
This method returns the Parameter corresponding to a certain entry.
Definition: kratos_parameters.cpp:423
bool GetBool() const
This method returns the boolean contained in the current Parameter.
Definition: kratos_parameters.cpp:675
std::vector< DistanceType > VectorDistanceType
Definition: spatial_search.h:97
std::vector< double > DistanceType
Definition: spatial_search.h:96
This class is the base of variables and variable's components which contains their common data.
Definition: variable_data.h:49
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
Holds a list of variables and their position in VariablesListDataValueContainer.
Definition: variables_list.h:50
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
int C
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:27
int n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
int k
Definition: quadrature.py:595
Configure::ContainerType ContainerType
Definition: transfer_utility.h:247