PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::SimpleVelocityConstraint< TDataType > Class Template Reference

#include <SimpleVelocityConstraint.h>

Inheritance diagram for dyno::SimpleVelocityConstraint< TDataType >:
Collaboration diagram for dyno::SimpleVelocityConstraint< TDataType >:

Public Types

typedef TDataType::Real Real
 
typedef TDataType::Coord Coord
 
typedef TDataType::Matrix Matrix
 
- Public Types inherited from dyno::OBase
typedef std::vector< FBase * > FieldVector
 
typedef std::map< FieldID, FBase * > FieldMap
 

Public Member Functions

 SimpleVelocityConstraint ()
 
 ~SimpleVelocityConstraint () override
 
void constrain () override
 
bool initialize ()
 
bool resizeVector ()
 
void initialAttributes ()
 
bool visValueSet ()
 
bool visValueSet (Real vis)
 
bool visVectorSet (CArray< Real > vis)
 
bool SIMPLE_IterNumSet (int i)
 
bool SetCross (Real visT, Real mag, Real k1, Real n1)
 
 DEF_ARRAYLIST_IN (int, NeighborIds, DeviceType::GPU, "")
 
 DEF_ARRAY_IN (Coord, Position, DeviceType::GPU, "Input real particle position")
 
 DEF_ARRAY_IN (Coord, Velocity, DeviceType::GPU, "Input particle velocity")
 
 DEF_ARRAY_IN (Coord, Normal, DeviceType::GPU, "Input particle velocity")
 
 DEF_ARRAY_IN (Attribute, Attribute, DeviceType::GPU, "Input particle velocity")
 
 DEF_VAR_IN (Real, SmoothingLength, "")
 
 DEF_VAR (Real, RestDensity, Real(1000), "Reference density")
 
 DEF_VAR_IN (Real, SamplingDistance, "")
 
 DEF_VAR_IN (Real, TimeStep, "")
 
 DEF_VAR (Real, Viscosity, Real(5000.0), "Initial Viscosity Value")
 
 DEF_VAR (bool, SimpleIterationEnable, true, "")
 
- Public Member Functions inherited from dyno::ConstraintModule
 ConstraintModule ()
 
 ~ConstraintModule () override
 
std::string getModuleType () override
 
- Public Member Functions inherited from dyno::Module
 Module (std::string name="default")
 
 ~Module (void) override
 
bool initialize ()
 
void update ()
 
void setName (std::string name)
 
std::string getName () override
 
virtual void setParentNode (Node *node)
 Set the parent node.
 
NodegetParentNode ()
 
SceneGraphgetSceneGraph ()
 
bool isInitialized ()
 
bool attachField (FBase *field, std::string name, std::string desc, bool autoDestroy=true) override
 Attach a field to Base.
 
bool isInputComplete ()
 Check the completeness of input fields.
 
bool isOutputCompete ()
 
 DEF_VAR (bool, ForceUpdate, false, "")
 
void setUpdateAlways (bool b)
 Set the update strategy for the module.
 
- Public Member Functions inherited from dyno::OBase
 OBase ()
 
 ~OBase () override
 
virtual std::string caption ()
 Return the caption.
 
virtual bool captionVisible ()
 Whether to hide the caption in the GUI.
 
virtual std::string description ()
 Return a description for the node or module, override this function to support user-defined description.
 
bool addField (FBase *data)
 Add a field to Base FieldID will be set to the name of Field by default.
 
bool addField (FieldID name, FBase *data)
 Add a field to Base.
 
bool addFieldAlias (FieldID name, FBase *data)
 
bool addFieldAlias (FieldID name, FBase *data, FieldMap &fieldAlias)
 
bool findField (FBase *data)
 Find a field by its pointer.
 
bool findFieldAlias (const FieldID name)
 Find a field by its name.
 
bool findFieldAlias (const FieldID name, FieldMap &fieldAlias)
 Find a field in fieldAlias by its name This function is typically called by other functions.
 
bool removeField (FBase *data)
 Remove a field by its pointer.
 
bool removeFieldAlias (const FieldID name)
 Remove a field by its name.
 
bool removeFieldAlias (const FieldID name, FieldMap &fieldAlias)
 
FBasegetField (const FieldID name)
 Return a field by its name.
 
std::vector< FBase * > & getAllFields ()
 
template<typename T>
TgetField (FieldID name)
 
bool isAllFieldsReady ()
 Check the completeness of all required fields.
 
std::vector< FieldIDgetFieldAlias (FBase *data)
 
int getFieldAliasCount (FBase *data)
 
void setBlockCoord (float x, float y)
 
float bx ()
 
float by ()
 
bool findInputField (FBase *field)
 
bool addInputField (FBase *field)
 
bool removeInputField (FBase *field)
 
std::vector< FBase * > & getInputFields ()
 
bool findOutputField (FBase *field)
 
bool addOutputField (FBase *field)
 
bool addToOutput (FBase *field)
 
bool removeOutputField (FBase *field)
 
bool removeFromOutput (FBase *field)
 
std::vector< FBase * > & getOutputFields ()
 
bool findParameter (FBase *field)
 
bool addParameter (FBase *field)
 
bool removeParameter (FBase *field)
 
std::vector< FBase * > & getParameters ()
 
- Public Member Functions inherited from dyno::Object
 Object ()
 
virtual ~Object ()
 
ObjectId objectId ()
 

Private Attributes

DArray< Realm_viscosity
 
Real Cross_N
 
Real CrossVisCeil
 
Real CrossVisMag
 
Real CrossVisFloor
 
Real Cross_K
 
bool m_bConfigured = false
 
bool IsCrossReady = false
 
Real m_maxAlpha
 
Real m_maxA
 
Real m_airPressure = 0.0f
 
Real m_particleMass = 1.0f
 
Real m_tangential = 0.1f
 
Real m_separation = 0.1f
 
DArray< Realm_alpha
 
DArray< Realm_Aii
 
DArray< Realm_AiiFluid
 
DArray< Realm_AiiTotal
 
DArray< CoordP_dv
 
DArray< CoordvelOld
 
DArray< CoordvelBuf
 
DArray< Realm_deltaPressure
 
DArray< Realm_pressBuf
 
DArray< Realm_crossViscosity
 
DArray< Realm_pressure
 
DArray< Realm_divergence
 
DArray< bool > m_bSurface
 
DArray< Realm_y
 
DArray< Realm_r
 
DArray< Realm_p
 
DArray< Realv_y
 
DArray< Realv_r
 
DArray< Realv_p
 
DArray< Coordv_pv
 
DArray< Realm_VelocityReal
 
Reduction< Real > * m_reduce
 
Arithmetic< Real > * m_arithmetic
 
Arithmetic< Real > * m_arithmetic_v
 
std::shared_ptr< SummationDensity< TDataType > > m_densitySum
 
bool init_flag = false
 
int SIMPLE_IterNum
 

Additional Inherited Members

- Static Public Member Functions inherited from dyno::Object
static bool registerClass (ClassInfo *ci)
 
static ObjectcreateObject (std::string name)
 
static std::map< std::string, ClassInfo * > * getClassMap ()
 
static ObjectId baseId ()
 Base Id.
 
- Protected Member Functions inherited from dyno::ConstraintModule
void updateImpl () override
 
- Protected Member Functions inherited from dyno::Module
virtual bool initializeImpl ()
 
virtual void preprocess ()
 
virtual void postprocess ()
 
virtual bool validateInputs ()
 
virtual bool validateOutputs ()
 
virtual bool requireUpdate ()
 
virtual void updateStarted ()
 Two functions called at the beginning and end of update() used for debug.
 
virtual void updateEnded ()
 
- Protected Attributes inherited from dyno::OBase
std::vector< FBase * > fields_input
 
std::vector< FBase * > fields_output
 
std::vector< FBase * > fields_param
 

Detailed Description

template<typename TDataType>
class dyno::SimpleVelocityConstraint< TDataType >

Definition at line 42 of file SimpleVelocityConstraint.h.

Member Typedef Documentation

◆ Coord

template<typename TDataType>
typedef TDataType::Coord dyno::SimpleVelocityConstraint< TDataType >::Coord

Definition at line 47 of file SimpleVelocityConstraint.h.

◆ Matrix

template<typename TDataType>
typedef TDataType::Matrix dyno::SimpleVelocityConstraint< TDataType >::Matrix

Definition at line 48 of file SimpleVelocityConstraint.h.

◆ Real

template<typename TDataType>
typedef TDataType::Real dyno::SimpleVelocityConstraint< TDataType >::Real

Definition at line 46 of file SimpleVelocityConstraint.h.

Constructor & Destructor Documentation

◆ SimpleVelocityConstraint()

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::SimpleVelocityConstraint ( )

◆ ~SimpleVelocityConstraint()

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::~SimpleVelocityConstraint ( )
override

Member Function Documentation

◆ constrain()

template<typename TDataType>
void dyno::SimpleVelocityConstraint< TDataType >::constrain ( )
overridevirtual

◆ DEF_ARRAY_IN() [1/4]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_ARRAY_IN ( Attribute ,
Attribute ,
DeviceType::GPU ,
"Input particle velocity"  )

◆ DEF_ARRAY_IN() [2/4]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_ARRAY_IN ( Coord ,
Normal ,
DeviceType::GPU ,
"Input particle velocity"  )

◆ DEF_ARRAY_IN() [3/4]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_ARRAY_IN ( Coord ,
Position ,
DeviceType::GPU ,
"Input real particle position"  )

◆ DEF_ARRAY_IN() [4/4]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_ARRAY_IN ( Coord ,
Velocity ,
DeviceType::GPU ,
"Input particle velocity"  )

◆ DEF_ARRAYLIST_IN()

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_ARRAYLIST_IN ( int ,
NeighborIds ,
DeviceType::GPU ,
""  )

◆ DEF_VAR() [1/3]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_VAR ( bool ,
SimpleIterationEnable ,
true ,
""  )

◆ DEF_VAR() [2/3]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_VAR ( Real ,
RestDensity ,
Real(1000) ,
"Reference density"  )

◆ DEF_VAR() [3/3]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_VAR ( Real ,
Viscosity ,
Real(5000.0) ,
"Initial Viscosity Value"  )

◆ DEF_VAR_IN() [1/3]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_VAR_IN ( Real ,
SamplingDistance ,
""  )

◆ DEF_VAR_IN() [2/3]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_VAR_IN ( Real ,
SmoothingLength ,
""  )

◆ DEF_VAR_IN() [3/3]

template<typename TDataType>
dyno::SimpleVelocityConstraint< TDataType >::DEF_VAR_IN ( Real ,
TimeStep ,
""  )

◆ initialAttributes()

template<typename TDataType>
void dyno::SimpleVelocityConstraint< TDataType >::initialAttributes ( )

◆ initialize()

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::initialize ( )

◆ resizeVector()

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::resizeVector ( )

◆ SetCross()

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::SetCross ( Real visT,
Real mag,
Real k1,
Real n1 )
inline

Definition at line 86 of file SimpleVelocityConstraint.h.

◆ SIMPLE_IterNumSet()

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::SIMPLE_IterNumSet ( int i)
inline

Definition at line 80 of file SimpleVelocityConstraint.h.

◆ visValueSet() [1/2]

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::visValueSet ( )
inline

Definition at line 57 of file SimpleVelocityConstraint.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ visValueSet() [2/2]

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::visValueSet ( Real vis)
inline

Definition at line 63 of file SimpleVelocityConstraint.h.

◆ visVectorSet()

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::visVectorSet ( CArray< Real > vis)
inline

Definition at line 74 of file SimpleVelocityConstraint.h.

Member Data Documentation

◆ Cross_K

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::Cross_K
private

Definition at line 135 of file SimpleVelocityConstraint.h.

◆ Cross_N

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::Cross_N
private

Definition at line 131 of file SimpleVelocityConstraint.h.

◆ CrossVisCeil

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::CrossVisCeil
private

Definition at line 132 of file SimpleVelocityConstraint.h.

◆ CrossVisFloor

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::CrossVisFloor
private

Definition at line 134 of file SimpleVelocityConstraint.h.

◆ CrossVisMag

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::CrossVisMag
private

Definition at line 133 of file SimpleVelocityConstraint.h.

◆ init_flag

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::init_flag = false
private

Definition at line 185 of file SimpleVelocityConstraint.h.

◆ IsCrossReady

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::IsCrossReady = false
private

Definition at line 137 of file SimpleVelocityConstraint.h.

◆ m_Aii

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_Aii
private

Definition at line 149 of file SimpleVelocityConstraint.h.

◆ m_AiiFluid

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_AiiFluid
private

Definition at line 150 of file SimpleVelocityConstraint.h.

◆ m_AiiTotal

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_AiiTotal
private

Definition at line 151 of file SimpleVelocityConstraint.h.

◆ m_airPressure

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::m_airPressure = 0.0f
private

Definition at line 141 of file SimpleVelocityConstraint.h.

◆ m_alpha

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_alpha
private

Definition at line 148 of file SimpleVelocityConstraint.h.

◆ m_arithmetic

template<typename TDataType>
Arithmetic<Real>* dyno::SimpleVelocityConstraint< TDataType >::m_arithmetic
private

Definition at line 180 of file SimpleVelocityConstraint.h.

◆ m_arithmetic_v

template<typename TDataType>
Arithmetic<Real>* dyno::SimpleVelocityConstraint< TDataType >::m_arithmetic_v
private

Definition at line 181 of file SimpleVelocityConstraint.h.

◆ m_bConfigured

template<typename TDataType>
bool dyno::SimpleVelocityConstraint< TDataType >::m_bConfigured = false
private

Definition at line 136 of file SimpleVelocityConstraint.h.

◆ m_bSurface

template<typename TDataType>
DArray<bool> dyno::SimpleVelocityConstraint< TDataType >::m_bSurface
private

Definition at line 165 of file SimpleVelocityConstraint.h.

◆ m_crossViscosity

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_crossViscosity
private

Definition at line 160 of file SimpleVelocityConstraint.h.

◆ m_deltaPressure

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_deltaPressure
private

Definition at line 158 of file SimpleVelocityConstraint.h.

◆ m_densitySum

template<typename TDataType>
std::shared_ptr<SummationDensity<TDataType> > dyno::SimpleVelocityConstraint< TDataType >::m_densitySum
private

Definition at line 183 of file SimpleVelocityConstraint.h.

◆ m_divergence

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_divergence
private

Definition at line 163 of file SimpleVelocityConstraint.h.

◆ m_maxA

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::m_maxA
private

Definition at line 140 of file SimpleVelocityConstraint.h.

◆ m_maxAlpha

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::m_maxAlpha
private

Definition at line 139 of file SimpleVelocityConstraint.h.

◆ m_p

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_p
private

Definition at line 170 of file SimpleVelocityConstraint.h.

◆ m_particleMass

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::m_particleMass = 1.0f
private

Definition at line 143 of file SimpleVelocityConstraint.h.

◆ m_pressBuf

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_pressBuf
private

Definition at line 159 of file SimpleVelocityConstraint.h.

◆ m_pressure

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_pressure
private

Definition at line 162 of file SimpleVelocityConstraint.h.

◆ m_r

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_r
private

Definition at line 169 of file SimpleVelocityConstraint.h.

◆ m_reduce

template<typename TDataType>
Reduction<Real>* dyno::SimpleVelocityConstraint< TDataType >::m_reduce
private

Definition at line 179 of file SimpleVelocityConstraint.h.

◆ m_separation

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::m_separation = 0.1f
private

Definition at line 145 of file SimpleVelocityConstraint.h.

◆ m_tangential

template<typename TDataType>
Real dyno::SimpleVelocityConstraint< TDataType >::m_tangential = 0.1f
private

Definition at line 144 of file SimpleVelocityConstraint.h.

◆ m_VelocityReal

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_VelocityReal
private

Definition at line 177 of file SimpleVelocityConstraint.h.

◆ m_viscosity

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_viscosity
private

Definition at line 130 of file SimpleVelocityConstraint.h.

◆ m_y

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::m_y
private

Definition at line 168 of file SimpleVelocityConstraint.h.

◆ P_dv

template<typename TDataType>
DArray<Coord> dyno::SimpleVelocityConstraint< TDataType >::P_dv
private

Definition at line 153 of file SimpleVelocityConstraint.h.

◆ SIMPLE_IterNum

template<typename TDataType>
int dyno::SimpleVelocityConstraint< TDataType >::SIMPLE_IterNum
private

Definition at line 186 of file SimpleVelocityConstraint.h.

◆ v_p

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::v_p
private

Definition at line 175 of file SimpleVelocityConstraint.h.

◆ v_pv

template<typename TDataType>
DArray<Coord> dyno::SimpleVelocityConstraint< TDataType >::v_pv
private

Definition at line 176 of file SimpleVelocityConstraint.h.

◆ v_r

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::v_r
private

Definition at line 174 of file SimpleVelocityConstraint.h.

◆ v_y

template<typename TDataType>
DArray<Real> dyno::SimpleVelocityConstraint< TDataType >::v_y
private

Definition at line 173 of file SimpleVelocityConstraint.h.

◆ velBuf

template<typename TDataType>
DArray<Coord> dyno::SimpleVelocityConstraint< TDataType >::velBuf
private

Definition at line 155 of file SimpleVelocityConstraint.h.

◆ velOld

template<typename TDataType>
DArray<Coord> dyno::SimpleVelocityConstraint< TDataType >::velOld
private

Definition at line 154 of file SimpleVelocityConstraint.h.


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