KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::CalculateCurvature Class Reference

Short class definition. More...

#include <calculate_curvature.h>

Inheritance diagram for Kratos::CalculateCurvature:
Collaboration diagram for Kratos::CalculateCurvature:

Public Member Functions

Type Definitions
 KRATOS_CLASS_POINTER_DEFINITION (CalculateCurvature)
 Pointer definition of PushStructureProcess. More...
 
Life Cycle
 CalculateCurvature ()
 Default constructor. More...
 
virtual ~CalculateCurvature ()
 Destructor. More...
 
Operations
void CalculateCurvature2D (ModelPart &ThisModelPart)
 
void CalculateCurvature3D (ModelPart &ThisModelPart)
 
void CalculateCurvatureContactLine (ModelPart &ThisModelPart)
 
void CalculatePrincipalDirections3D (ModelPart &ThisModelPart)
 
double CalculateVol (const double x0, const double y0, const double x1, const double y1, const double x2, const double y2)
 
double CalculateCurv (const double x0, const double y0, const double x1, const double y1, const double x2, const double y2)
 
void IsObtuse (const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, const double x2, const double y2, const double z2, bool &isobt, bool &isobt_i, double &alfa)
 
void Vector2D (const double x0, const double y0, const double x1, const double y1, array_1d< double, 2 > &r01)
 
void Vector3D (const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, array_1d< double, 3 > &r01)
 
double Norm2D (const array_1d< double, 2 > &a)
 
double Norm3D (const array_1d< double, 3 > &a)
 
double DotProduct2D (const array_1d< double, 2 > &a, const array_1d< double, 2 > &b)
 
double DotProduct3D (const array_1d< double, 3 > &a, const array_1d< double, 3 > &b)
 
void CrossProduct3D (const array_1d< double, 3 > &a, const array_1d< double, 3 > &b, array_1d< double, 3 > &c)
 
double Angle2vecs2D (const array_1d< double, 2 > &a, const array_1d< double, 2 > &b)
 
double Angle2vecs3D (const array_1d< double, 3 > &a, const array_1d< double, 3 > &b)
 
double cotan (const double &alfa)
 
double NormalCurvature3D (const double xi, const double yi, const double zi, const double xj, const double yj, const double zj, array_1d< double, 3 > &n)
 
void FindUnitTangent3D (array_1d< double, 3 > &u_vec, array_1d< double, 3 > &n_vec)
 
void FindComponentsUV (double &alfa, double &beta, array_1d< double, 3 > &dij, array_1d< double, 3 > &u_vec, array_1d< double, 3 > &v_vec)
 
void SolveSys2x2 (double &a, double &b, boost::numeric::ublas::bounded_matrix< double, 2, 2 > &LHSmat, array_1d< double, 2 > &RHSvec)
 
void SolveSys3x3 (double &a, double &b, double &c, boost::numeric::ublas::bounded_matrix< double, 3, 3 > &LHSmat, array_1d< double, 3 > &RHSvec)
 
void AddTermsToSys (double &kappaN_ij, double &kappa_H, double &alfa, double &beta, int &num_neighbs, boost::numeric::ublas::bounded_matrix< double, 2, 2 > &LHSmat, array_1d< double, 2 > &RHSvec, const int &option)
 
void AddTermsToEq2 (double &kappaN_ij, double &kappa_H, double &alfa, double &beta, int &num_neighbs, array_1d< double, 6 > &terms_vec, array_1d< double, 10 > &terms_vec_der)
 
void SolveEq2ndDeg (double &A, double &B, double &C, double &a)
 
void NewtonMethod (array_1d< double, 6 > &terms_vec, array_1d< double, 10 > &terms_vec_der, double &a, double &kappa_H, double &kappa_G, double &kappaN_ij)
 
double func_Newton (double &x, array_1d< double, 6 > &terms_vec, double &kappa_H, double &kappa_G, double &kappaN_ij)
 
double dxfunc_Newton (double &x, array_1d< double, 10 > &tvder, double &kappa_H, double &kappa_G, double &kappaN_ij)
 
double f_a (double &x, double &kappa_H, double &kappa_G)
 
double df_a (double &x, double &kappa_H)
 
double Det2x2 (boost::numeric::ublas::bounded_matrix< double, 2, 2 > &input)
 
double Det3x3 (boost::numeric::ublas::bounded_matrix< double, 3, 3 > &input)
 
void NormalizeVec2D (array_1d< double, 2 > &input)
 
void NormalizeVec3D (array_1d< double, 3 > &input)
 
void CopyMatrix3x3 (boost::numeric::ublas::bounded_matrix< double, 3, 3 > &input, boost::numeric::ublas::bounded_matrix< double, 3, 3 > &output)
 
void CopyMatrix2x2 (boost::numeric::ublas::bounded_matrix< double, 2, 2 > &input, boost::numeric::ublas::bounded_matrix< double, 2, 2 > &output)
 
bool GetNeighbours (array_1d< double, 2 > n_node, GlobalPointersVector< Node > &neighb, double &x1, double &y1, double &x2, double &y2, int &i_neck, int &neighnum)
 
Input and output
virtual std::string Info () const
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::Process
 KRATOS_CLASS_POINTER_DEFINITION (Process)
 Pointer definition of Process. More...
 
 Process ()
 Default constructor. More...
 
 Process (const Flags options)
 
 ~Process () override
 Destructor. More...
 
void operator() ()
 This operator is provided to call the process as a function and simply calls the Execute method. More...
 
virtual Process::Pointer Create (Model &rModel, Parameters ThisParameters)
 This method creates an pointer of the process. More...
 
virtual void Execute ()
 Execute method is used to execute the Process algorithms. More...
 
virtual void ExecuteInitialize ()
 This function is designed for being called at the beginning of the computations right after reading the model and the groups. More...
 
virtual void ExecuteBeforeSolutionLoop ()
 This function is designed for being execute once before the solution loop but after all of the solvers where built. More...
 
virtual void ExecuteInitializeSolutionStep ()
 This function will be executed at every time step BEFORE performing the solve phase. More...
 
virtual void ExecuteFinalizeSolutionStep ()
 This function will be executed at every time step AFTER performing the solve phase. More...
 
virtual void ExecuteBeforeOutputStep ()
 This function will be executed at every time step BEFORE writing the output. More...
 
virtual void ExecuteAfterOutputStep ()
 This function will be executed at every time step AFTER writing the output. More...
 
virtual void ExecuteFinalize ()
 This function is designed for being called at the end of the computations. More...
 
virtual int Check ()
 This function is designed for being called after ExecuteInitialize ONCE to verify that the input is correct. More...
 
virtual void Clear ()
 This method clears the assignation of the conditions. More...
 
virtual const Parameters GetDefaultParameters () const
 This method provides the defaults parameters to avoid conflicts between the different constructors. More...
 
- Public Member Functions inherited from Kratos::Flags
Flagsoperator= (Flags const &rOther)
 Assignment operator. More...
 
 operator bool () const
 
Flags operator~ () const
 
bool operator! () const
 
void AssignFlags (Flags const &rOther)
 
void Set (const Flags ThisFlag)
 
void Set (const Flags ThisFlag, bool Value)
 
void Reset (const Flags ThisFlag)
 
void Flip (const Flags ThisFlag)
 
void SetPosition (IndexType Position, bool Value=true)
 
bool GetPosition (IndexType Position) const
 
void FlipPosition (IndexType Position)
 
void ClearPosition (IndexType Position)
 
void Clear ()
 
Flags AsFalse () const
 
bool Is (Flags const &rOther) const
 
bool IsDefined (Flags const &rOther) const
 
bool IsNot (Flags const &rOther) const
 
bool IsNotDefined (Flags const &rOther) const
 
 KRATOS_CLASS_POINTER_DEFINITION (Flags)
 Pointer definition of Flags. More...
 
const Flagsoperator|= (const Flags &Other)
 
const Flagsoperator&= (const Flags &Other)
 
 Flags ()
 Default constructor. More...
 
 Flags (Flags const &rOther)
 Copy constructor. More...
 
virtual ~Flags ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from Kratos::Flags
enum  FlagsList {
  Flag0 = BlockType(1) , Flag1 = BlockType(1) << 1 , Flag2 = BlockType(1) << 2 , Flag3 = BlockType(1) << 3 ,
  Flag4 = BlockType(1) << 4 , Flag5 = BlockType(1) << 5 , Flag6 = BlockType(1) << 6 , Flag7 = BlockType(1) << 7 ,
  Flag8 = BlockType(1) << 8 , Flag9 = BlockType(1) << 9 , Flag10 = BlockType(1) << 10 , Flag11 = BlockType(1) << 11 ,
  Flag12 = BlockType(1) << 12 , Flag13 = BlockType(1) << 13 , Flag14 = BlockType(1) << 14 , Flag15 = BlockType(1) << 15 ,
  Flag16 = BlockType(1) << 16 , Flag17 = BlockType(1) << 17 , Flag18 = BlockType(1) << 18 , Flag19 = BlockType(1) << 19 ,
  Flag20 = BlockType(1) << 20 , Flag21 = BlockType(1) << 21 , Flag22 = BlockType(1) << 22 , Flag23 = BlockType(1) << 23 ,
  Flag24 = BlockType(1) << 24 , Flag25 = BlockType(1) << 25 , Flag26 = BlockType(1) << 26 , Flag27 = BlockType(1) << 27 ,
  Flag28 = BlockType(1) << 28 , Flag29 = BlockType(1) << 29 , Flag30 = BlockType(1) << 30
}
 
typedef int64_t BlockType
 
typedef int64_t FlagType
 
typedef std::size_t IndexType
 
- Static Public Member Functions inherited from Kratos::Flags
static const Flags AllDefined ()
 
static const Flags AllTrue ()
 
static Flags Create (IndexType ThisPosition, bool Value=true)
 

Detailed Description

Short class definition.

Detail class definition. calculate curvature for 2D and 3D.

curvature for 2D is calcualted based on equation (14) in the follwoing reference: Jarauta A, Ryzhakov P, Secanell M, Waghmare PR, Pons-Prats J. Numerical study of droplet dynamics in a polymer electrolyte fuel cell gas channel using an embedded Eulerian-Lagrangian approach. Journal of Power Sources. 2016 Aug 15;323:201-12.

curvature for 3D is based on Mayer approach in the follwoing reference: M. Meyer, M. Desbrun, P. Schröder, and A. H. Barr. Discrete differential geometry operators for triangulated 2-manifolds. Visualization and Math. III, pages 35–57, 2003.

Constructor & Destructor Documentation

◆ CalculateCurvature()

Kratos::CalculateCurvature::CalculateCurvature ( )
inline

Default constructor.

◆ ~CalculateCurvature()

virtual Kratos::CalculateCurvature::~CalculateCurvature ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ AddTermsToEq2()

void Kratos::CalculateCurvature::AddTermsToEq2 ( double kappaN_ij,
double kappa_H,
double alfa,
double beta,
int num_neighbs,
array_1d< double, 6 > &  terms_vec,
array_1d< double, 10 > &  terms_vec_der 
)
inline

◆ AddTermsToSys()

void Kratos::CalculateCurvature::AddTermsToSys ( double kappaN_ij,
double kappa_H,
double alfa,
double beta,
int num_neighbs,
boost::numeric::ublas::bounded_matrix< double, 2, 2 > &  LHSmat,
array_1d< double, 2 > &  RHSvec,
const int option 
)
inline

◆ Angle2vecs2D()

double Kratos::CalculateCurvature::Angle2vecs2D ( const array_1d< double, 2 > &  a,
const array_1d< double, 2 > &  b 
)
inline

◆ Angle2vecs3D()

double Kratos::CalculateCurvature::Angle2vecs3D ( const array_1d< double, 3 > &  a,
const array_1d< double, 3 > &  b 
)
inline

◆ CalculateCurv()

double Kratos::CalculateCurvature::CalculateCurv ( const double  x0,
const double  y0,
const double  x1,
const double  y1,
const double  x2,
const double  y2 
)
inline

◆ CalculateCurvature2D()

void Kratos::CalculateCurvature::CalculateCurvature2D ( ModelPart ThisModelPart)
inline

◆ CalculateCurvature3D()

void Kratos::CalculateCurvature::CalculateCurvature3D ( ModelPart ThisModelPart)
inline

◆ CalculateCurvatureContactLine()

void Kratos::CalculateCurvature::CalculateCurvatureContactLine ( ModelPart ThisModelPart)
inline

◆ CalculatePrincipalDirections3D()

void Kratos::CalculateCurvature::CalculatePrincipalDirections3D ( ModelPart ThisModelPart)
inline

◆ CalculateVol()

double Kratos::CalculateCurvature::CalculateVol ( const double  x0,
const double  y0,
const double  x1,
const double  y1,
const double  x2,
const double  y2 
)
inline

◆ CopyMatrix2x2()

void Kratos::CalculateCurvature::CopyMatrix2x2 ( boost::numeric::ublas::bounded_matrix< double, 2, 2 > &  input,
boost::numeric::ublas::bounded_matrix< double, 2, 2 > &  output 
)
inline

◆ CopyMatrix3x3()

void Kratos::CalculateCurvature::CopyMatrix3x3 ( boost::numeric::ublas::bounded_matrix< double, 3, 3 > &  input,
boost::numeric::ublas::bounded_matrix< double, 3, 3 > &  output 
)
inline

◆ cotan()

double Kratos::CalculateCurvature::cotan ( const double alfa)
inline

◆ CrossProduct3D()

void Kratos::CalculateCurvature::CrossProduct3D ( const array_1d< double, 3 > &  a,
const array_1d< double, 3 > &  b,
array_1d< double, 3 > &  c 
)
inline

◆ Det2x2()

double Kratos::CalculateCurvature::Det2x2 ( boost::numeric::ublas::bounded_matrix< double, 2, 2 > &  input)
inline

◆ Det3x3()

double Kratos::CalculateCurvature::Det3x3 ( boost::numeric::ublas::bounded_matrix< double, 3, 3 > &  input)
inline

◆ df_a()

double Kratos::CalculateCurvature::df_a ( double x,
double kappa_H 
)
inline

◆ DotProduct2D()

double Kratos::CalculateCurvature::DotProduct2D ( const array_1d< double, 2 > &  a,
const array_1d< double, 2 > &  b 
)
inline

◆ DotProduct3D()

double Kratos::CalculateCurvature::DotProduct3D ( const array_1d< double, 3 > &  a,
const array_1d< double, 3 > &  b 
)
inline

◆ dxfunc_Newton()

double Kratos::CalculateCurvature::dxfunc_Newton ( double x,
array_1d< double, 10 > &  tvder,
double kappa_H,
double kappa_G,
double kappaN_ij 
)
inline

◆ f_a()

double Kratos::CalculateCurvature::f_a ( double x,
double kappa_H,
double kappa_G 
)
inline

◆ FindComponentsUV()

void Kratos::CalculateCurvature::FindComponentsUV ( double alfa,
double beta,
array_1d< double, 3 > &  dij,
array_1d< double, 3 > &  u_vec,
array_1d< double, 3 > &  v_vec 
)
inline

◆ FindUnitTangent3D()

void Kratos::CalculateCurvature::FindUnitTangent3D ( array_1d< double, 3 > &  u_vec,
array_1d< double, 3 > &  n_vec 
)
inline

◆ func_Newton()

double Kratos::CalculateCurvature::func_Newton ( double x,
array_1d< double, 6 > &  terms_vec,
double kappa_H,
double kappa_G,
double kappaN_ij 
)
inline

◆ GetNeighbours()

bool Kratos::CalculateCurvature::GetNeighbours ( array_1d< double, 2 >  n_node,
GlobalPointersVector< Node > &  neighb,
double x1,
double y1,
double x2,
double y2,
int i_neck,
int neighnum 
)
inline

◆ Info()

virtual std::string Kratos::CalculateCurvature::Info ( ) const
inlinevirtual

Turn back information as a string.

Reimplemented from Kratos::Process.

◆ IsObtuse()

void Kratos::CalculateCurvature::IsObtuse ( const double  x0,
const double  y0,
const double  z0,
const double  x1,
const double  y1,
const double  z1,
const double  x2,
const double  y2,
const double  z2,
bool isobt,
bool isobt_i,
double alfa 
)
inline

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::CalculateCurvature::KRATOS_CLASS_POINTER_DEFINITION ( CalculateCurvature  )

Pointer definition of PushStructureProcess.

◆ NewtonMethod()

void Kratos::CalculateCurvature::NewtonMethod ( array_1d< double, 6 > &  terms_vec,
array_1d< double, 10 > &  terms_vec_der,
double a,
double kappa_H,
double kappa_G,
double kappaN_ij 
)
inline

◆ Norm2D()

double Kratos::CalculateCurvature::Norm2D ( const array_1d< double, 2 > &  a)
inline

◆ Norm3D()

double Kratos::CalculateCurvature::Norm3D ( const array_1d< double, 3 > &  a)
inline

◆ NormalCurvature3D()

double Kratos::CalculateCurvature::NormalCurvature3D ( const double  xi,
const double  yi,
const double  zi,
const double  xj,
const double  yj,
const double  zj,
array_1d< double, 3 > &  n 
)
inline

◆ NormalizeVec2D()

void Kratos::CalculateCurvature::NormalizeVec2D ( array_1d< double, 2 > &  input)
inline

◆ NormalizeVec3D()

void Kratos::CalculateCurvature::NormalizeVec3D ( array_1d< double, 3 > &  input)
inline

◆ PrintData()

virtual void Kratos::CalculateCurvature::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

Reimplemented from Kratos::Process.

◆ PrintInfo()

virtual void Kratos::CalculateCurvature::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

Reimplemented from Kratos::Process.

◆ SolveEq2ndDeg()

void Kratos::CalculateCurvature::SolveEq2ndDeg ( double A,
double B,
double C,
double a 
)
inline

◆ SolveSys2x2()

void Kratos::CalculateCurvature::SolveSys2x2 ( double a,
double b,
boost::numeric::ublas::bounded_matrix< double, 2, 2 > &  LHSmat,
array_1d< double, 2 > &  RHSvec 
)
inline

◆ SolveSys3x3()

void Kratos::CalculateCurvature::SolveSys3x3 ( double a,
double b,
double c,
boost::numeric::ublas::bounded_matrix< double, 3, 3 > &  LHSmat,
array_1d< double, 3 > &  RHSvec 
)
inline

◆ Vector2D()

void Kratos::CalculateCurvature::Vector2D ( const double  x0,
const double  y0,
const double  x1,
const double  y1,
array_1d< double, 2 > &  r01 
)
inline

◆ Vector3D()

void Kratos::CalculateCurvature::Vector3D ( const double  x0,
const double  y0,
const double  z0,
const double  x1,
const double  y1,
const double  z1,
array_1d< double, 3 > &  r01 
)
inline

The documentation for this class was generated from the following file: