IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
IBAMR::CIBMethod Class Reference

Class CIBMethod is a concrete CIBStrategy and IBMethod class which implements the motion of rigid bodies using the constraint formulation. The immersed structure is discretized using standard IB markers. More...

#include </home/runner/work/IBAMR/IBAMR/include/ibamr/CIBMethod.h>

Inheritance diagram for IBAMR::CIBMethod:
Inheritance graph
[legend]

Classes

struct  ConstrainedVelocityFcnsData
 Struct encapsulating constrained velocity functions data. More...
 
struct  ExternalForceTorqueFcnData
 Struct encapsulating external force and torque function data. More...
 

Public Types

using ConstrainedNodalVelocityFcnPtr = void(*)(Vec U_k, const IBTK::RigidDOFVector &U, Vec X, const Eigen::Vector3d &X_com, const Eigen::Matrix3d &rotation_mat, double data_time, void *ctx)
 Typedef specifying interface for specifying constrained body velocities.
 
using ConstrainedCOMVelocityFcnPtr = void(*)(double data_time, Eigen::Vector3d &U_com, Eigen::Vector3d &W_com, void *ctx)
 
using ExternalForceTorqueFcnPtr = void(*)(double data_time, Eigen::Vector3d &F, Eigen::Vector3d &T, void *ctx)
 Typedef specifying interface for specifying net external force and torque on structures.
 
using preprocessSolveFluidEqn_callbackfcn = void(*)(const double, const double, const int, void *)
 Callbacks before INS is integrated.
 

Public Member Functions

 CIBMethod (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, const int no_structures=1, bool register_for_restart=true)
 Constructor of the class.
 
 ~CIBMethod ()
 Destructor of the class.
 
void registerConstrainedVelocityFunction (ConstrainedNodalVelocityFcnPtr nodalvelfcn, ConstrainedCOMVelocityFcnPtr comvelfcn, void *ctx=nullptr, unsigned int part=0)
 Register user defined constrained velocity functions.
 
void registerConstrainedVelocityFunction (const ConstrainedVelocityFcnsData &data, unsigned int part=0)
 Register user defined constrained velocity function data.
 
void registerExternalForceTorqueFunction (ExternalForceTorqueFcnPtr forcetorquefcn, void *ctx=nullptr, unsigned int part=0)
 Register an external force and torque function.
 
void registerExternalForceTorqueFunction (const ExternalForceTorqueFcnData &data, unsigned int part=0)
 Register an external force and torque function data.
 
int getStructuresLevelNumber () const
 Get the level on which the structures reside.
 
int getStructureHandle (const int lag_idx) const
 Get the structure handle to which this Lagrangian index belongs.
 
void registerPreProcessSolveFluidEquationsCallBackFcn (preprocessSolveFluidEqn_callbackfcn callback, void *ctx)
 Register any preprocess fluid solve callback functions.
 
void preprocessSolveFluidEquations (double current_time, double new_time, int cycle_num) override
 Calculate any body forces for INS solver over here.
 
void registerEulerianVariables () override
 Register Eulerian variables with the parent IBHierarchyIntegrator.
 
void registerEulerianCommunicationAlgorithms () override
 Register Eulerian refinement or coarsening algorithms with the parent IBHierarchyIntegrator.
 
void preprocessIntegrateData (double current_time, double new_time, int num_cycles) override
 Method to prepare to advance data from current_time to new_time.
 
void postprocessIntegrateData (double current_time, double new_time, int num_cycles) override
 Method to clean up data following call(s) to integrateHierarchy().
 
void initializeLevelData (SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > > hierarchy, int level_number, double init_data_time, bool can_be_refined, bool initial_time, SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchLevel< NDIM > > old_level, bool allocate_data) override
 Initialize data on a new level after it is inserted into an AMR patch hierarchy by the gridding algorithm. More...
 
void initializePatchHierarchy (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > > gridding_alg, int u_data_idx, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenSchedule< NDIM > > > &u_synch_scheds, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &u_ghost_fill_scheds, int integrator_step, double init_data_time, bool initial_time) override
 Initialize Lagrangian data corresponding to the given AMR patch hierarchy at the start of a computation. If the computation is begun from a restart file, data may be read from the restart databases. More...
 
void interpolateVelocity (int u_data_idx, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenSchedule< NDIM > > > &u_synch_scheds, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &u_ghost_fill_scheds, double data_time) override
 Interpolate the Eulerian velocity to the curvilinear mesh at the specified time within the current time interval.
 
void spreadForce (int f_data_idx, IBTK::RobinPhysBdryPatchStrategy *f_phys_bdry_op, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &f_prolongation_scheds, double data_time) override
 Spread the Lagrangian force to the Cartesian grid at the specified time within the current time interval.
 
void forwardEulerStep (double current_time, double new_time) override
 Advance the positions of the Lagrangian structure using the forward Euler method.
 
void backwardEulerStep (double current_time, double new_time) override
 Advance the positions of the Lagrangian structure using the backward Euler method.
 
void midpointStep (double current_time, double new_time) override
 Advance the positions of the Lagrangian structure using the (explicit) midpoint rule.
 
void trapezoidalStep (double current_time, double new_time) override
 Advance the positions of the Lagrangian structure using the trapezoidal rule.
 
void registerVisItDataWriter (SAMRAI::tbox::Pointer< SAMRAI::appu::VisItDataWriter< NDIM > > visit_writer)
 Register VisIt data writer to output data files that may be postprocessed with the VisIt visualization tool.
 
void putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db) override
 Override the putToDatabase method of the base Serializable class.
 
void setConstraintForce (Vec L, const double data_time, const double scale=1.0) override
 Set the constraint force in the internal data structures of the class.
 
void getConstraintForce (Vec *L, const double data_time) override
 Get the constraint rigid body force at the specified time within the current time interval.
 
virtual void getFreeRigidVelocities (Vec *U, const double data_time) override
 Get the free rigid velocities (DOFs) at the specified time within the current time interval.
 
virtual void getNetExternalForceTorque (Vec *F, const double data_time) override
 Get net external force and torque at the specified time within the current time interval.
 
void subtractMeanConstraintForce (Vec L, int f_data_idx, const double scale=1.0) override
 Subtract the mean of constraint force from the background Eulerian grid.
 
void setInterpolatedVelocityVector (Vec V, const double data_time) override
 Prepare the CIBMethod class to get the interpolated fluid velocity.
 
void getInterpolatedVelocity (Vec V, const double data_time, const double scale=1.0) override
 Get interpolated velocity from the Eulerian grid.
 
void computeMobilityRegularization (Vec D, Vec L, const double scale=1.0) override
 Compute regularization vector for the mobility problem.
 
unsigned int getNumberOfNodes (const unsigned int part) const override
 Get number of nodes for a particular structure registered with CIBMethod.
 
void setRigidBodyVelocity (const unsigned int part, const IBTK::RigidDOFVector &U, Vec V) override
 Set the rigid body velocity at the nodal points contained in the Vec V.
 
void computeNetRigidGeneralizedForce (const unsigned int part, Vec L, IBTK::RigidDOFVector &F) override
 Compute total force and torque on the rigid structure(s).
 
void copyVecToArray (Vec b, double *array, const std::vector< unsigned > &struct_ids, const int data_depth, const int array_rank) override
 Copy PETSc Vec to raw array for specified structures.
 
void copyArrayToVec (Vec b, double *array, const std::vector< unsigned > &struct_ids, const int data_depth, const int array_rank) override
 Copy raw array to PETSc Vec for specified structures.
 
void constructMobilityMatrix (const std::string &mat_name, MobilityMatrixType mat_type, Mat &mobility_mat, const std::vector< unsigned > &prototype_struct_ids, const double *grid_dx, const double *domain_extents, const bool initial_time, double rho, double mu, const std::pair< double, double > &scale, double f_periodic_corr, const int managing_rank) override
 Generate dense mobility matrix for the prototypical structures identified by their indices.
 
void constructGeometricMatrix (const std::string &mat_name, Mat &geometric_mat, const std::vector< unsigned > &prototype_struct_ids, const bool initial_time, const int managing_rank) override
 Generate block-diagonal geometric matrix for the prototypical structures identified by their indices.
 
void rotateArray (double *array, const std::vector< unsigned > &struct_ids, const bool use_transpose, const int managing_rank, const int depth) override
 Rotate vector using rotation matrix to/from the reference frame of the structures.
 
bool flagRegrid () const
 
void setVelocityPhysBdryOp (IBTK::RobinPhysBdryPatchStrategy *u_phys_bdry_op)
 
virtual void setRigidBodyVelocity (const unsigned int part, const IBTK::RigidDOFVector &U, Vec V)=0
 
virtual void setRigidBodyVelocity (const unsigned int part, Vec U, Vec V)
 
virtual void setRigidBodyVelocity (Vec U, Vec V, const bool only_free_dofs, const bool only_imposed_dofs, const bool all_dofs=false)
 
virtual void computeNetRigidGeneralizedForce (const unsigned int part, Vec L, IBTK::RigidDOFVector &F)=0
 
virtual void computeNetRigidGeneralizedForce (const unsigned int part, Vec L, Vec F)
 
virtual void computeNetRigidGeneralizedForce (Vec L, Vec F, const bool only_free_dofs, const bool only_imposed_dofs, const bool all_dofs=false)
 
- Public Member Functions inherited from IBAMR::IBMethod
 IBMethod (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, bool register_for_restart=true)
 Constructor.
 
 ~IBMethod ()
 Destructor.
 
void registerIBLagrangianForceFunction (SAMRAI::tbox::Pointer< IBLagrangianForceStrategy > ib_force_fcn)
 
void registerIBLagrangianSourceFunction (SAMRAI::tbox::Pointer< IBLagrangianSourceStrategy > ib_source_fcn)
 
void registerLInitStrategy (SAMRAI::tbox::Pointer< IBTK::LInitStrategy > l_initializer)
 
void freeLInitStrategy ()
 
void registerIBMethodPostProcessor (SAMRAI::tbox::Pointer< IBMethodPostProcessStrategy > post_processor)
 
IBTK::LDataManagergetLDataManager () const
 
SAMRAI::tbox::Pointer< IBInstrumentPanelgetIBInstrumentPanel () const
 
void registerLSiloDataWriter (SAMRAI::tbox::Pointer< IBTK::LSiloDataWriter > silo_writer)
 
const SAMRAI::hier::IntVector< NDIM > & getMinimumGhostCellWidth () const override
 
void setupTagBuffer (SAMRAI::tbox::Array< int > &tag_buffer, SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > > gridding_alg) const override
 
virtual void inactivateLagrangianStructure (int structure_number=0, int level_number=std::numeric_limits< int >::max()) override
 
virtual void activateLagrangianStructure (int structure_number=0, int level_number=std::numeric_limits< int >::max()) override
 
virtual bool getLagrangianStructureIsActivated (int structure_number=0, int level_number=std::numeric_limits< int >::max()) const override
 
void preprocessIntegrateData (double current_time, double new_time, int num_cycles) override
 
void postprocessIntegrateData (double current_time, double new_time, int num_cycles) override
 
void createSolverVecs (Vec *X_vec, Vec *F_vec) override
 
void setupSolverVecs (Vec *X_vec, Vec *F_vec) override
 
void setUpdatedPosition (Vec &X_new_vec) override
 
void setLinearizedPosition (Vec &X_vec, double data_time) override
 
void computeResidual (Vec &R_vec) override
 
void computeLinearizedResidual (Vec &X_vec, Vec &R_vec) override
 
void updateFixedLEOperators () override
 
void interpolateVelocity (int u_data_idx, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenSchedule< NDIM > > > &u_synch_scheds, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &u_ghost_fill_scheds, double data_time) override
 
void interpolateLinearizedVelocity (int u_data_idx, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenSchedule< NDIM > > > &u_synch_scheds, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &u_ghost_fill_scheds, double data_time) override
 
void forwardEulerStep (double current_time, double new_time) override
 
void backwardEulerStep (double current_time, double new_time) override
 
void midpointStep (double current_time, double new_time) override
 
void trapezoidalStep (double current_time, double new_time) override
 
void computeLagrangianForce (double data_time) override
 
void computeLinearizedLagrangianForce (Vec &X_vec, double data_time) override
 
void constructLagrangianForceJacobian (Mat &A, MatType mat_type, double data_time) override
 
void spreadForce (int f_data_idx, IBTK::RobinPhysBdryPatchStrategy *f_phys_bdry_op, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &f_prolongation_scheds, double data_time) override
 
void spreadLinearizedForce (int f_data_idx, IBTK::RobinPhysBdryPatchStrategy *f_phys_bdry_op, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &f_prolongation_scheds, double data_time) override
 
void constructInterpOp (Mat &J, void(*spread_fnc)(const double, double *), int stencil_width, const std::vector< int > &num_dofs_per_proc, int dof_index_idx, double data_time) override
 
bool hasFluidSources () const override
 
void computeLagrangianFluidSource (double data_time) override
 
void spreadFluidSource (int q_data_idx, IBTK::RobinPhysBdryPatchStrategy *q_phys_bdry_op, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &q_prolongation_scheds, double data_time) override
 
void interpolatePressure (int p_data_idx, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenSchedule< NDIM > > > &p_synch_scheds, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &p_ghost_fill_scheds, double data_time) override
 
void postprocessData () override
 
void initializePatchHierarchy (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > > gridding_alg, int u_data_idx, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenSchedule< NDIM > > > &u_synch_scheds, const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &u_ghost_fill_scheds, int integrator_step, double init_data_time, bool initial_time) override
 
void registerLoadBalancer (SAMRAI::tbox::Pointer< SAMRAI::mesh::LoadBalancer< NDIM > > load_balancer, int workload_data_idx) override
 
void addWorkloadEstimate (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, const int workload_data_idx) override
 
void beginDataRedistribution (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > > gridding_alg) override
 
void endDataRedistribution (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > > gridding_alg) override
 
void initializeLevelData (SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > > hierarchy, int level_number, double init_data_time, bool can_be_refined, bool initial_time, SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchLevel< NDIM > > old_level, bool allocate_data) override
 
void resetHierarchyConfiguration (SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > > hierarchy, int coarsest_level, int finest_level) override
 
void applyGradientDetector (SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > > hierarchy, int level_number, double error_data_time, int tag_index, bool initial_time, bool uses_richardson_extrapolation_too) override
 
void putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db) override
 
- Public Member Functions inherited from IBAMR::IBImplicitStrategy
 IBImplicitStrategy ()=default
 Constructor.
 
virtual ~IBImplicitStrategy ()=default
 Virtual destructor.
 
- Public Member Functions inherited from IBAMR::IBStrategy
 IBStrategy ()=default
 Constructor.
 
virtual void registerIBHierarchyIntegrator (IBHierarchyIntegrator *ib_solver)
 
virtual double getMaxPointDisplacement () const
 
void setUseFixedLEOperators (bool use_fixed_coupling_ops=true)
 
virtual void postprocessSolveFluidEquations (double current_time, double new_time, int cycle_num)
 
void initializeLevelData (SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > > hierarchy, int level_number, double init_data_time, bool can_be_refined, bool initial_time, SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchLevel< NDIM > > old_level, bool allocate_data) override
 
void resetHierarchyConfiguration (SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > > hierarchy, int coarsest_level, int finest_level) override
 
void applyGradientDetector (SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > > hierarchy, int level_number, double error_data_time, int tag_index, bool initial_time, bool uses_richardson_extrapolation_too) override
 
void putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db) override
 
- Public Member Functions inherited from SAMRAI::mesh::StandardTagAndInitStrategy< NDIM >
virtual double getLevelDt (const tbox::Pointer< hier::BasePatchLevel< NDIM > > level, const double dt_time, const bool initial_time)
 
virtual double advanceLevel (const tbox::Pointer< hier::BasePatchLevel< NDIM > > level, const tbox::Pointer< hier::BasePatchHierarchy< NDIM > > hierarchy, const double current_time, const double new_time, const bool first_step, const bool last_step, const bool regrid_advance=false)
 
virtual void resetTimeDependentData (const tbox::Pointer< hier::BasePatchLevel< NDIM > > level, const double new_time, const bool can_be_refined)
 
virtual void resetDataToPreadvanceState (const tbox::Pointer< hier::BasePatchLevel< NDIM > > level)
 
virtual void applyRichardsonExtrapolation (const tbox::Pointer< hier::PatchLevel< NDIM > > level, const double error_data_time, const int tag_index, const double deltat, const int error_coarsen_ratio, const bool initial_time, const bool uses_gradient_detector_too)
 
virtual void coarsenDataForRichardsonExtrapolation (const tbox::Pointer< hier::PatchHierarchy< NDIM > > hierarchy, const int level_number, const tbox::Pointer< hier::PatchLevel< NDIM > > coarser_level, const double coarsen_data_time, const bool before_advance)
 
- Public Member Functions inherited from IBAMR::CIBStrategy
 CIBStrategy (const unsigned int parts)
 Constructor of the class.
 
virtual ~CIBStrategy ()
 Destructor of the class.
 
unsigned int getNumberOfRigidStructures () const
 Get number of rigid structures registered with this class.
 
void setInitialCenterOfMass (const unsigned int part, const Eigen::Vector3d &XCOM_0)
 Set the initial center of mass location for the structures. More...
 
void setSolveRigidBodyVelocity (const unsigned int part, const IBTK::FreeRigidDOFVector &solve_rigid_dofs)
 Set what rigid DOFs need to be solved for this particular structure. More...
 
const IBTK::FreeRigidDOFVector & getSolveRigidBodyVelocity (const unsigned int part, int &num_free_dofs) const
 Query what rigid DOFs need to be solved for.
 
virtual void setRigidBodyVelocity (const unsigned int part, Vec U, Vec V)
 Set the rigid body velocity at the nodal/marker points contained in the Vec V. More...
 
virtual void setRigidBodyVelocity (Vec U, Vec V, const bool only_free_dofs, const bool only_imposed_dofs, const bool all_dofs=false)
 Set the rigid body velocity at the nodal/marker points contained in the Vec V. More...
 
virtual void computeNetRigidGeneralizedForce (const unsigned int part, Vec L, Vec F)
 Compute total force and torque on the structure. More...
 
virtual void computeNetRigidGeneralizedForce (Vec L, Vec F, const bool only_free_dofs, const bool only_imposed_dofs, const bool all_dofs=false)
 Compute total force and torque on the structure. More...
 
const IBTK::RigidDOFVector & getNetRigidGeneralizedForce (const unsigned int part)
 Get total torque and force on the structure at new_time within the current time interval. More...
 
void updateFreeDOFsMapping ()
 Update the mapping of free DOFs for all structures if they are collected in a global vector.
 
void updateNewRigidBodyVelocity (const unsigned int part, const IBTK::RigidDOFVector &U)
 Update the rigid body velocity obtained from the constraint Stokes solver for free-moving case.
 
void updateNewRigidBodyVelocity (const unsigned int part, Vec U)
 Update the rigid body velocity obtained from the constraint Stokes solver for free-moving case.
 
void updateNewRigidBodyVelocity (Vec U, const bool only_free_dofs, const bool only_imposed_dofs, const bool all_dofs=false)
 Update the rigid body velocity obtained from the constraint Stokes solver for free-moving case.
 
virtual void copyFreeDOFsVecToArray (Vec b, double *array, const std::vector< unsigned > &struct_ids, const int array_rank)
 Copy data from distributed PETSc Vec for specified stucture indices to an array defined on a single processor. A default implementation is provided. More...
 
virtual void copyFreeDOFsArrayToVec (Vec b, double *array, const std::vector< unsigned > &struct_ids, const int array_rank)
 Copy data from array defined on a single processor for specified stucture indices to distributed PETScVec. A default implementation is provided. More...
 
void getCurrentRigidBodyVelocity (const unsigned int part, IBTK::RigidDOFVector &U)
 Get the rigid body translational velocity at the beginning of the timestep.
 
void getNewRigidBodyVelocity (const unsigned int part, IBTK::RigidDOFVector &U)
 Get the rigid body translational velocity at the end of the timestep.
 
const Eigen::Vector3d & getCurrentBodyCenterOfMass (const unsigned int part)
 Get body center of mass at the current time step.
 
const Eigen::Vector3d & getNewBodyCenterOfMass (const unsigned int part)
 Get body center of mass at half time step.
 

Protected Attributes

std::vector< ConstrainedVelocityFcnsDatad_constrained_velocity_fcns_data
 
std::vector< ExternalForceTorqueFcnDatad_ext_force_torque_fcn_data
 
std::vector< preprocessSolveFluidEqn_callbackfcnd_prefluidsolve_callback_fcns
 
std::vector< void * > d_prefluidsolve_callback_fcns_ctx
 
bool d_constraint_force_is_initialized = false
 
bool d_lag_velvec_is_initialized = false
 
bool d_time_integrator_needs_regrid = false
 
SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > d_eul_lambda_var
 
int d_eul_lambda_idx = IBTK::invalid_index
 
std::vector< std::pair< int, int > > d_struct_lag_idx_range
 
SAMRAI::tbox::Pointer< SAMRAI::appu::VisItDataWriter< NDIM > > d_visit_writer
 
bool d_output_eul_lambda = false
 
int d_lambda_dump_interval = 0
 
std::ofstream d_lambda_stream
 
std::vector< std::stringd_reg_filename
 
std::vector< std::stringd_lambda_filename
 
IBTK::RobinPhysBdryPatchStrategyd_u_phys_bdry_op = nullptr
 
bool d_use_steady_stokes = false
 
- Protected Attributes inherited from IBAMR::IBMethod
bool d_do_log = false
 
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > d_hierarchy
 
SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > > d_gridding_alg
 
double d_current_time = std::numeric_limits<double>::quiet_NaN()
 
double d_new_time = std::numeric_limits<double>::quiet_NaN()
 
double d_half_time = std::numeric_limits<double>::quiet_NaN()
 
bool d_X_current_needs_ghost_fill = true
 
bool d_X_new_needs_ghost_fill = true
 
bool d_X_half_needs_ghost_fill = true
 
bool d_X_jac_needs_ghost_fill = true
 
bool d_X_LE_new_needs_ghost_fill = true
 
bool d_X_LE_half_needs_ghost_fill = true
 
bool d_F_current_needs_ghost_fill = true
 
bool d_F_new_needs_ghost_fill = true
 
bool d_F_half_needs_ghost_fill = true
 
bool d_F_jac_needs_ghost_fill = true
 
IBTK::LDataManagerd_l_data_manager
 
std::string d_interp_kernel_fcn = "IB_4"
 
std::string d_spread_kernel_fcn = "IB_4"
 
bool d_error_if_points_leave_domain = false
 
SAMRAI::hier::IntVector< NDIM > d_ghosts
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_X_current_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_X_new_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_X_half_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_X_jac_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_X_LE_new_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_X_LE_half_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_U_current_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_U_new_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_U_half_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_U_jac_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_F_current_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_F_new_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_F_half_data
 
std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > d_F_jac_data
 
std::vector< std::set< int > > d_anchor_point_local_idxs
 
SAMRAI::tbox::Pointer< IBInstrumentPaneld_instrument_panel
 
std::vector< double > d_total_flow_volume
 
SAMRAI::tbox::Pointer< IBTK::LInitStrategyd_l_initializer
 
SAMRAI::tbox::Pointer< IBLagrangianForceStrategyd_ib_force_fcn
 
bool d_ib_force_fcn_needs_init = true
 
SAMRAI::tbox::Pointer< IBLagrangianSourceStrategyd_ib_source_fcn
 
bool d_ib_source_fcn_needs_init = true
 
std::vector< std::vector< IBTK::Point > > d_X_src
 
std::vector< std::vector< double > > d_r_src
 
std::vector< std::vector< double > > d_P_src
 
std::vector< std::vector< double > > d_Q_src
 
std::vector< int > d_n_src
 
bool d_normalize_source_strength = false
 
SAMRAI::tbox::Pointer< IBMethodPostProcessStrategyd_post_processor
 
SAMRAI::tbox::Pointer< IBTK::LSiloDataWriterd_silo_writer
 
SAMRAI::tbox::Pointer< SAMRAI::mesh::LoadBalancer< NDIM > > d_load_balancer
 
int d_workload_idx = IBTK::invalid_index
 
std::string d_object_name
 
bool d_registered_for_restart
 
- Protected Attributes inherited from IBAMR::IBStrategy
IBHierarchyIntegratord_ib_solver = nullptr
 
bool d_use_fixed_coupling_ops = false
 
- Protected Attributes inherited from IBAMR::CIBStrategy
unsigned int d_num_rigid_parts
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_center_of_mass_initial
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_center_of_mass_current
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_center_of_mass_half
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_center_of_mass_new
 
std::vector< bool > d_compute_center_of_mass_initial
 
IBTK::EigenAlignedVector< Eigen::Quaterniond > d_quaternion_current
 
IBTK::EigenAlignedVector< Eigen::Quaterniond > d_quaternion_half
 
IBTK::EigenAlignedVector< Eigen::Quaterniond > d_quaternion_new
 
std::vector< IBTK::FRDV > d_solve_rigid_vel
 
Vec d_U
 
Vec d_F
 
std::vector< std::pair< int, int > > d_free_dofs_map
 
bool d_free_dofs_map_updated
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_trans_vel_current
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_trans_vel_half
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_trans_vel_new
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_rot_vel_current
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_rot_vel_half
 
IBTK::EigenAlignedVector< Eigen::Vector3d > d_rot_vel_new
 
std::vector< IBTK::RigidDOFVector > d_net_rigid_generalized_force
 

Additional Inherited Members

- Static Public Member Functions inherited from IBAMR::CIBStrategy
static void vecToRDV (Vec U, IBTK::RigidDOFVector &Ur)
 Set the DOFs from PETSc Vec U to RigidDOFVector Ur.
 
static void rdvToVec (const IBTK::RigidDOFVector &Ur, Vec &U)
 Set the DOFs from RigidDOFVector Ur to PETSc Vec U.
 
static void eigenToRDV (const Eigen::Vector3d &U, const Eigen::Vector3d &W, IBTK::RigidDOFVector &UW)
 Set the DOFs from Eigen::Vector3d U and W to RigidDOFVector UW.
 
static void rdvToEigen (const IBTK::RigidDOFVector &UW, Eigen::Vector3d &U, Eigen::Vector3d &W)
 Set the DOFs from RigidDOFVector UW to Eigen::Vector3d U and W.
 
- Protected Member Functions inherited from IBAMR::IBMethod
void getPositionData (std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > **X_data, bool **X_needs_ghost_fill, double data_time)
 
void getLinearizedPositionData (std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > **X_data, bool **X_needs_ghost_fill)
 
void getLECouplingPositionData (std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > **X_LE_data, bool **X_LE_needs_ghost_fill, double data_time)
 
void getVelocityData (std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > **U_data, double data_time)
 
void getLinearizedVelocityData (std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > **U_data)
 
void getForceData (std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > **F_data, bool **F_needs_ghost_fill, double data_time)
 
void getLinearizedForceData (std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > **F_data, bool **F_needs_ghost_fill)
 
void reinitMidpointData (const std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > &current_data, const std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > &new_data, const std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > &half_data)
 
void resetAnchorPointValues (std::vector< SAMRAI::tbox::Pointer< IBTK::LData > > U_data, int coarsest_ln, int finest_ln)
 
PetscErrorCode computeForce (Vec X, Vec F)
 
- Protected Member Functions inherited from IBAMR::IBStrategy
INSHierarchyIntegratorgetINSHierarchyIntegrator () const
 
SAMRAI::tbox::Pointer< SAMRAI::math::HierarchyDataOpsReal< NDIM, double > > getVelocityHierarchyDataOps () const
 
SAMRAI::tbox::Pointer< SAMRAI::math::HierarchyDataOpsReal< NDIM, double > > getPressureHierarchyDataOps () const
 
SAMRAI::tbox::Pointer< IBTK::HierarchyMathOpsgetHierarchyMathOps () const
 
void registerVariable (int &current_idx, int &new_idx, int &scratch_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > variable, const SAMRAI::hier::IntVector< NDIM > &scratch_ghosts=SAMRAI::hier::IntVector< NDIM >(0), const std::string &coarsen_name="NO_COARSEN", const std::string &refine_name="NO_REFINE", SAMRAI::tbox::Pointer< IBTK::CartGridFunction > init_fcn=SAMRAI::tbox::Pointer< IBTK::CartGridFunction >(NULL))
 
void registerVariable (int &idx, SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > variable, const SAMRAI::hier::IntVector< NDIM > &ghosts=SAMRAI::hier::IntVector< NDIM >(0), SAMRAI::tbox::Pointer< SAMRAI::hier::VariableContext > ctx=SAMRAI::tbox::Pointer< SAMRAI::hier::VariableContext >(NULL))
 
void registerGhostfillRefineAlgorithm (const std::string &name, SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineAlgorithm< NDIM > > ghostfill_alg, std::unique_ptr< SAMRAI::xfer::RefinePatchStrategy< NDIM > > ghostfill_patch_strategy=nullptr)
 
void registerProlongRefineAlgorithm (const std::string &name, SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineAlgorithm< NDIM > > prolong_alg, std::unique_ptr< SAMRAI::xfer::RefinePatchStrategy< NDIM > > prolong_patch_strategy=nullptr)
 
void registerCoarsenAlgorithm (const std::string &name, SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenAlgorithm< NDIM > > coarsen_alg, std::unique_ptr< SAMRAI::xfer::CoarsenPatchStrategy< NDIM > > coarsen_patch_strategy=nullptr)
 
SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineAlgorithm< NDIM > > getGhostfillRefineAlgorithm (const std::string &name) const
 
SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineAlgorithm< NDIM > > getProlongRefineAlgorithm (const std::string &name) const
 
SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenAlgorithm< NDIM > > getCoarsenAlgorithm (const std::string &name) const
 
const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > & getGhostfillRefineSchedules (const std::string &name) const
 
const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > & getProlongRefineSchedules (const std::string &name) const
 
const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenSchedule< NDIM > > > & getCoarsenSchedules (const std::string &name) const
 
- Protected Member Functions inherited from IBAMR::CIBStrategy
void setRotationMatrix (const IBTK::EigenAlignedVector< Eigen::Vector3d > &rot_vel, const IBTK::EigenAlignedVector< Eigen::Quaterniond > &q_old, IBTK::EigenAlignedVector< Eigen::Quaterniond > &q_new, IBTK::EigenAlignedVector< Eigen::Matrix3d > &rot_mat, const double dt)
 Fill the rotation matrix. More...
 
- Static Protected Member Functions inherited from IBAMR::IBMethod
static PetscErrorCode computeForce_SAMRAI (void *ctx, Vec X, Vec F)
 

Detailed Description

Class CIBMethod is a concrete CIBStrategy and IBMethod class which implements the motion of rigid bodies using the constraint formulation. The immersed structure is discretized using standard IB markers.

Member Function Documentation

◆ computeNetRigidGeneralizedForce() [1/3]

virtual void IBAMR::CIBStrategy::computeNetRigidGeneralizedForce

Explicitly use the other overloads of this function from the base class.

◆ computeNetRigidGeneralizedForce() [2/3]

void IBAMR::CIBStrategy::computeNetRigidGeneralizedForce

Explicitly use the other overloads of this function from the base class.

◆ computeNetRigidGeneralizedForce() [3/3]

void IBAMR::CIBStrategy::computeNetRigidGeneralizedForce

Explicitly use the other overloads of this function from the base class.

◆ flagRegrid()

bool IBAMR::CIBMethod::flagRegrid ( ) const

Function to determine whether regridding should occur at the current time step.

◆ initializeLevelData()

void IBAMR::CIBMethod::initializeLevelData ( SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  init_data_time,
bool  can_be_refined,
bool  initial_time,
SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchLevel< NDIM > >  old_level,
bool  allocate_data 
)
overridevirtual

Initialize data on a new level after it is inserted into an AMR patch hierarchy by the gridding algorithm.

See also
SAMRAI::mesh::StandardTagAndInitStrategy::initializeLevelData

Implements SAMRAI::mesh::StandardTagAndInitStrategy< NDIM >.

◆ initializePatchHierarchy()

void IBAMR::CIBMethod::initializePatchHierarchy ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > >  gridding_alg,
int  u_data_idx,
const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::CoarsenSchedule< NDIM > > > &  u_synch_scheds,
const std::vector< SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > > &  u_ghost_fill_scheds,
int  integrator_step,
double  init_data_time,
bool  initial_time 
)
overridevirtual

Initialize Lagrangian data corresponding to the given AMR patch hierarchy at the start of a computation. If the computation is begun from a restart file, data may be read from the restart databases.

A patch data descriptor is provided for the Eulerian velocity in case initialization requires interpolating Eulerian data. Ghost cells for Eulerian data will be filled upon entry to this function.

Reimplemented from IBAMR::IBStrategy.

◆ setRigidBodyVelocity() [1/3]

virtual void IBAMR::CIBStrategy::setRigidBodyVelocity

Explicitly use the other overload of this function from the base class.

◆ setRigidBodyVelocity() [2/3]

void IBAMR::CIBStrategy::setRigidBodyVelocity

Explicitly use the other overload of this function from the base class.

◆ setRigidBodyVelocity() [3/3]

void IBAMR::CIBStrategy::setRigidBodyVelocity

Explicitly use the other overload of this function from the base class.

Member Data Documentation

◆ d_constrained_velocity_fcns_data

std::vector<ConstrainedVelocityFcnsData> IBAMR::CIBMethod::d_constrained_velocity_fcns_data
protected

Functions to set constrained velocities of the structures.

◆ d_constraint_force_is_initialized

bool IBAMR::CIBMethod::d_constraint_force_is_initialized = false
protected

Booleans to control spreading constraint force and interpolating to Lagrangian velocities.

◆ d_eul_lambda_var

SAMRAI::tbox::Pointer<SAMRAI::hier::Variable<NDIM> > IBAMR::CIBMethod::d_eul_lambda_var
protected

Eulerian variables.

◆ d_ext_force_torque_fcn_data

std::vector<ExternalForceTorqueFcnData> IBAMR::CIBMethod::d_ext_force_torque_fcn_data
protected

Functions to set net external force and torque on free moving structures.

◆ d_lambda_dump_interval

int IBAMR::CIBMethod::d_lambda_dump_interval = 0
protected

Input/output.

◆ d_output_eul_lambda

bool IBAMR::CIBMethod::d_output_eul_lambda = false
protected

Control printing of S[lambda]

◆ d_prefluidsolve_callback_fcns

std::vector<preprocessSolveFluidEqn_callbackfcn> IBAMR::CIBMethod::d_prefluidsolve_callback_fcns
protected

Pre and post fluid solve call back functions and contexts.

◆ d_struct_lag_idx_range

std::vector<std::pair<int, int> > IBAMR::CIBMethod::d_struct_lag_idx_range
protected

Vector of Lagrnagian indices of all structures.

◆ d_time_integrator_needs_regrid

bool IBAMR::CIBMethod::d_time_integrator_needs_regrid = false
protected

Boolean to flag if time integrator needs regriding

◆ d_visit_writer

SAMRAI::tbox::Pointer<SAMRAI::appu::VisItDataWriter<NDIM> > IBAMR::CIBMethod::d_visit_writer
protected

The object used to write out data for postprocessing by the visIt visualization tool.


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