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

Class IBLagrangianForceStrategy provides a generic interface for specifying nodal forces (not force densities) on the Lagrangian curvilinear mesh. More...

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

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

Public Member Functions

 IBLagrangianForceStrategy ()=default
 Default constructor.
 
virtual ~IBLagrangianForceStrategy ()=default
 Virtual destructor.
 
virtual void setTimeInterval (double current_time, double new_time)
 Set the current and new times for the present timestep. More...
 
virtual void initializeLevelData (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double init_data_time, bool initial_time, IBTK::LDataManager *l_data_manager)
 Setup the data needed to compute the curvilinear force on the specified level of the patch hierarchy. More...
 
virtual void computeLagrangianForce (SAMRAI::tbox::Pointer< IBTK::LData > F_data, SAMRAI::tbox::Pointer< IBTK::LData > X_data, SAMRAI::tbox::Pointer< IBTK::LData > U_data, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double data_time, IBTK::LDataManager *l_data_manager)
 Compute the curvilinear force generated by the given configuration of the curvilinear mesh. More...
 
virtual void computeLagrangianForceJacobianNonzeroStructure (std::vector< int > &d_nnz, std::vector< int > &o_nnz, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, IBTK::LDataManager *l_data_manager)
 Compute the non-zero structure of the force Jacobian matrix. More...
 
virtual void computeLagrangianForceJacobian (Mat &J_mat, MatAssemblyType assembly_type, double X_coef, SAMRAI::tbox::Pointer< IBTK::LData > X_data, double U_coef, SAMRAI::tbox::Pointer< IBTK::LData > U_data, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double data_time, IBTK::LDataManager *l_data_manager)
 Compute the Jacobian of the force with respect to the present structure configuration and velocity. More...
 
virtual double computeLagrangianEnergy (SAMRAI::tbox::Pointer< IBTK::LData > X_data, SAMRAI::tbox::Pointer< IBTK::LData > U_data, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double data_time, IBTK::LDataManager *l_data_manager)
 Compute the potential energy with respect to the present structure configuration and velocity. More...
 

Detailed Description

Class IBLagrangianForceStrategy provides a generic interface for specifying nodal forces (not force densities) on the Lagrangian curvilinear mesh.

Note
Implementations of class IBLagrangianForceStrategy must compute the total nodal forces. In particular, they must not compute the nodal force densities.
See also
IBBeamForceGen
IBLagrangianForceStrategySet
IBSpringForceGen
IBStandardForceGen
IBTargetPointForceGen

Member Function Documentation

◆ computeLagrangianEnergy()

double IBAMR::IBLagrangianForceStrategy::computeLagrangianEnergy ( SAMRAI::tbox::Pointer< IBTK::LData X_data,
SAMRAI::tbox::Pointer< IBTK::LData U_data,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  data_time,
IBTK::LDataManager l_data_manager 
)
virtual

Compute the potential energy with respect to the present structure configuration and velocity.

Note
A default implementation is provided that results in an assertion failure.

Reimplemented in IBAMR::IBStandardForceGen, and IBAMR::IBLagrangianForceStrategySet.

◆ computeLagrangianForce()

void IBAMR::IBLagrangianForceStrategy::computeLagrangianForce ( SAMRAI::tbox::Pointer< IBTK::LData F_data,
SAMRAI::tbox::Pointer< IBTK::LData X_data,
SAMRAI::tbox::Pointer< IBTK::LData U_data,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  data_time,
IBTK::LDataManager l_data_manager 
)
virtual

Compute the curvilinear force generated by the given configuration of the curvilinear mesh.

Note
Nodal forces computed by implementations of this method must be added to the force vector.
A default implementation is provided that results in an assertion failure.

Reimplemented in IBAMR::IBStandardForceGen, IBAMR::IBLagrangianForceStrategySet, IBAMR::WallForceEvaluator, and IBAMR::NonbondedForceEvaluator.

◆ computeLagrangianForceJacobian()

void IBAMR::IBLagrangianForceStrategy::computeLagrangianForceJacobian ( Mat &  J_mat,
MatAssemblyType  assembly_type,
double  X_coef,
SAMRAI::tbox::Pointer< IBTK::LData X_data,
double  U_coef,
SAMRAI::tbox::Pointer< IBTK::LData U_data,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  data_time,
IBTK::LDataManager l_data_manager 
)
virtual

Compute the Jacobian of the force with respect to the present structure configuration and velocity.

Note
The elements of the Jacobian should be "accumulated" in the provided matrix J.
A default implementation is provided that results in an assertion failure.

Reimplemented in IBAMR::IBStandardForceGen, and IBAMR::IBLagrangianForceStrategySet.

◆ computeLagrangianForceJacobianNonzeroStructure()

void IBAMR::IBLagrangianForceStrategy::computeLagrangianForceJacobianNonzeroStructure ( std::vector< int > &  d_nnz,
std::vector< int > &  o_nnz,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
IBTK::LDataManager l_data_manager 
)
virtual

Compute the non-zero structure of the force Jacobian matrix.

Note
Elements indices must be global PETSc indices.
A default implementation is provided that results in an assertion failure.

Reimplemented in IBAMR::IBStandardForceGen, and IBAMR::IBLagrangianForceStrategySet.

◆ initializeLevelData()

void IBAMR::IBLagrangianForceStrategy::initializeLevelData ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  init_data_time,
bool  initial_time,
IBTK::LDataManager l_data_manager 
)
virtual

Setup the data needed to compute the curvilinear force on the specified level of the patch hierarchy.

Note
A default empty implementation is provided.

Reimplemented in IBAMR::IBStandardForceGen, and IBAMR::IBLagrangianForceStrategySet.

◆ setTimeInterval()

void IBAMR::IBLagrangianForceStrategy::setTimeInterval ( double  current_time,
double  new_time 
)
virtual

Set the current and new times for the present timestep.

Note
A default empty implementation is provided.

Reimplemented in IBAMR::IBLagrangianForceStrategySet.


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