suanPan
RigidWallPenalty Class Reference

A RigidWall class. More...

#include <RigidWallPenalty.h>

Inheritance diagram for RigidWallPenalty:
Collaboration diagram for RigidWallPenalty:

Public Member Functions

 RigidWallPenalty (unsigned, unsigned, unsigned, vec &&, vec &&, double, unsigned)
 
 RigidWallPenalty (unsigned, unsigned, unsigned, vec &&, vec &&, vec &&, double, unsigned)
 
int process (const shared_ptr< DomainBase > &) override
 This method provides all necessary pieces of typical constraints/loads required, including additional blocks in original global stiffness, border matrix resistance of multiplier, external loads. More...
 
void commit_status () override
 
void clear_status () override
 
void reset_status () override
 
- Public Member Functions inherited from Constraint
 Constraint (unsigned, unsigned, unsigned, uvec &&, uvec &&, unsigned)
 
 Constraint (const Constraint &)=delete
 
 Constraint (Constraint &&)=delete
 
Constraintoperator= (const Constraint &)=delete
 
Constraintoperator= (Constraint &&)=delete
 
 ~Constraint () override=default
 
const sp_vec & get_resistance () const
 
const sp_mat & get_stiffness () const
 
const vec & get_auxiliary_resistance () const
 
const vec & get_auxiliary_load () const
 
const sp_mat & get_auxiliary_stiffness () const
 
void set_multiplier_size (unsigned)
 At the beginning of each sub-step, it is assumed that constraints are not active (constraining conditions are not satisfied). The process(const shared_ptr<DomainBase>&) checks the constraining conditions for each iteration, and activates the multiplier(s) if conditions are met. The activation will be valid for all subsequent iterations in the same sub-step to avoid numerical instability. More...
 
unsigned get_multiplier_size () const
 
- Public Member Functions inherited from ConditionalModifier
 ConditionalModifier (unsigned, unsigned, unsigned, uvec &&, uvec &&)
 
virtual int initialize (const shared_ptr< DomainBase > &)
 
virtual int process (const shared_ptr< DomainBase > &)=0
 This method provides all necessary pieces of typical constraints/loads required, including additional blocks in original global stiffness, border matrix resistance of multiplier, external loads. More...
 
virtual int process_resistance (const shared_ptr< DomainBase > &)
 For some algorithms, the global stiffness is formed only once in each substep. After calling solver, the storage may contain factorization. It is not correct to modify it in those algorithms. This method should provide updated constraint/load resistance but must not touch global stiffness. More...
 
virtual void stage (const shared_ptr< DomainBase > &)
 Some algorithms needs to manually modify some variables after solving. Typical example is the predictor–corrector type algorithms. This method is called before committing trial status to perform necessary operations. More...
 
const uvec & get_node_encoding () const
 
const uvec & get_dof_encoding () const
 
void set_initialized (bool) const
 
bool is_initialized () const
 
void set_start_step (unsigned)
 
unsigned get_start_step () const
 
void set_end_step (unsigned)
 
unsigned get_end_step () const
 
void set_connected (bool) const
 Some constraints may modify global stiffness matrix so that it needs to be treated as an element which may affect bandwidth of banded storage. By calling this method, the RCM reordering algorithm will take this constraint into consideration. Make sure it is called in the constructor. More...
 
bool is_connected () const
 
bool validate_step (const shared_ptr< DomainBase > &) const
 
virtual void update_status (const vec &)
 
virtual void commit_status ()
 
virtual void clear_status ()
 
virtual void reset_status ()
 
- Public Member Functions inherited from Tag
 Tag (unsigned=0)
 
 Tag (const Tag &)=default
 
 Tag (Tag &&)=default
 
Tagoperator= (const Tag &)=delete
 
Tagoperator= (Tag &&)=delete
 
virtual ~Tag ()=default
 
void set_tag (unsigned) const
 
unsigned get_tag () const
 
void enable ()
 
void disable ()
 
void guard ()
 
void unguard ()
 
bool is_active () const
 
bool is_guarded () const
 
virtual void print ()
 

Protected Member Functions

template<DOF... D>
void set_handler ()
 
- Protected Member Functions inherited from ConditionalModifier
uvec get_nodal_active_dof (const shared_ptr< DomainBase > &)
 Generate active DoF vector from assigned nodes. More...
 
uvec get_all_nodal_active_dof (const shared_ptr< DomainBase > &)
 Generate active DoF vector from all nodes in the model. More...
 

Protected Attributes

const unsigned n_dim
 
const double alpha
 
const vec edge_a
 
const vec edge_b
 
const vec origin
 
const vec outer_norm
 
const double length_a = 0.
 
const double length_b = 0.
 
bool(* checker_handler )(const shared_ptr< Node > &) = nullptr
 
Col< double >(* current_velocity_handler )(const shared_ptr< Node > &) = nullptr
 
Col< double >(* incre_acceleration_handler )(const shared_ptr< Node > &) = nullptr
 
Col< double >(* trial_position_handler )(const shared_ptr< Node > &) = nullptr
 
Col< double >(* trial_displacement_handler )(const shared_ptr< Node > &) = nullptr
 
Col< double >(* trial_velocity_handler )(const shared_ptr< Node > &) = nullptr
 
Col< double >(* trial_acceleration_handler )(const shared_ptr< Node > &) = nullptr
 
- Protected Attributes inherited from Constraint
unsigned num_size
 
vec trial_lambda = zeros(num_size)
 
vec current_lambda = zeros(num_size)
 
sp_vec resistance
 
sp_mat stiffness
 
vec auxiliary_resistance
 
vec auxiliary_load
 
sp_mat auxiliary_stiffness
 
- Protected Attributes inherited from ConditionalModifier
const bool initialized = false
 
const bool connected = false
 
unsigned start_step
 
unsigned end_step = static_cast<unsigned>(-1)
 
const unsigned amplitude_tag
 
uvec node_encoding
 
uvec dof_reference
 
uvec dof_encoding
 
shared_ptr< Amplitudemagnitude
 

Additional Inherited Members

- Static Protected Attributes inherited from Constraint
static double multiplier = 1E8
 

Detailed Description

A RigidWall class.

Author
tlc
Date
15/07/2020
Version
0.1.0

Constructor & Destructor Documentation

◆ RigidWallPenalty() [1/2]

RigidWallPenalty::RigidWallPenalty ( unsigned  T,
unsigned  S,
unsigned  A,
vec &&  O,
vec &&  N,
double  F,
unsigned  NS 
)

◆ RigidWallPenalty() [2/2]

RigidWallPenalty::RigidWallPenalty ( unsigned  T,
unsigned  S,
unsigned  A,
vec &&  O,
vec &&  E1,
vec &&  E2,
double  F,
unsigned  NS 
)

Member Function Documentation

◆ clear_status()

void RigidWallPenalty::clear_status ( )
overridevirtual

Reimplemented from ConditionalModifier.

◆ commit_status()

void RigidWallPenalty::commit_status ( )
overridevirtual

Reimplemented from ConditionalModifier.

◆ process()

int RigidWallPenalty::process ( const shared_ptr< DomainBase > &  )
overridevirtual

This method provides all necessary pieces of typical constraints/loads required, including additional blocks in original global stiffness, border matrix resistance of multiplier, external loads.

Returns
success flag

Implements ConditionalModifier.

Here is the caller graph for this function:

◆ reset_status()

void RigidWallPenalty::reset_status ( )
overridevirtual

Reimplemented from ConditionalModifier.

◆ set_handler()

template<DOF... D>
void RigidWallPenalty::set_handler ( )
inlineprotected

Member Data Documentation

◆ alpha

const double RigidWallPenalty::alpha
protected

◆ checker_handler

bool(* RigidWallPenalty::checker_handler) (const shared_ptr< Node > &) = nullptr
protected

◆ current_velocity_handler

Col< double >(* RigidWallPenalty::current_velocity_handler) (const shared_ptr< Node > &) = nullptr
protected

◆ edge_a

const vec RigidWallPenalty::edge_a
protected

◆ edge_b

const vec RigidWallPenalty::edge_b
protected

◆ incre_acceleration_handler

Col< double >(* RigidWallPenalty::incre_acceleration_handler) (const shared_ptr< Node > &) = nullptr
protected

◆ length_a

const double RigidWallPenalty::length_a = 0.
protected

◆ length_b

const double RigidWallPenalty::length_b = 0.
protected

◆ n_dim

const unsigned RigidWallPenalty::n_dim
protected

◆ origin

const vec RigidWallPenalty::origin
protected

◆ outer_norm

const vec RigidWallPenalty::outer_norm
protected

◆ trial_acceleration_handler

Col< double >(* RigidWallPenalty::trial_acceleration_handler) (const shared_ptr< Node > &) = nullptr
protected

◆ trial_displacement_handler

Col< double >(* RigidWallPenalty::trial_displacement_handler) (const shared_ptr< Node > &) = nullptr
protected

◆ trial_position_handler

Col< double >(* RigidWallPenalty::trial_position_handler) (const shared_ptr< Node > &) = nullptr
protected

◆ trial_velocity_handler

Col< double >(* RigidWallPenalty::trial_velocity_handler) (const shared_ptr< Node > &) = nullptr
protected

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