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

Class IBStandardSourceGen provides support for distributed internal fluid sources/sinks. More...

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

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

Public Member Functions

 IBStandardSourceGen ()
 Default constructor.
 
 ~IBStandardSourceGen ()=default
 Destructor.
 
std::vector< double > & getSourceStrengths (int ln)
 Return a reference to the vector of source strengths. More...
 
const std::vector< double > & getSourceStrengths (int ln) const
 Return a const reference to the vector of source strengths.
 
const std::vector< double > & getSourcePressures (int ln) const
 Return a const reference to the vector of source pressures.
 
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) override
 Setup the data needed to compute source/sink data on the specified level of the patch hierarchy. More...
 
unsigned int getNumSources (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double data_time, IBTK::LDataManager *l_data_manager) override
 Specify the number of distributed internal sources or sinks. More...
 
void getSourceLocations (std::vector< IBTK::Point > &X_src, std::vector< double > &r_src, SAMRAI::tbox::Pointer< IBTK::LData > X_data, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double data_time, IBTK::LDataManager *l_data_manager) override
 Compute the source locations for each of the distributed internal sources or sinks. More...
 
void setSourcePressures (const std::vector< double > &P_src, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double data_time, IBTK::LDataManager *l_data_manager) override
 Set the normalized pressures at the sources.
 
void computeSourceStrengths (std::vector< double > &Q_src, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double data_time, IBTK::LDataManager *l_data_manager) override
 Compute the source strengths for each of the distributed internal sources or sinks. More...
 
void putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db) override
 
- Public Member Functions inherited from IBAMR::IBLagrangianSourceStrategy
 IBLagrangianSourceStrategy ()=default
 Default constructor.
 
virtual ~IBLagrangianSourceStrategy ()=default
 Virtual destructor.
 
virtual void setTimeInterval (double current_time, double new_time)
 Set the current and new times for the present timestep. More...
 

Static Public Member Functions

static bool getIsRegisteredWithStreamableManager ()
 Returns a boolean indicating whether the class has been registered with the singleton IBTK::StreamableManager object.
 
static void setNumSources (int ln, unsigned int num_sources)
 Set the number of internal sources and sinks on the specified level of the patch hierarchy.
 
static unsigned int getNumSources (int ln)
 Get the number of internal sources and sinks on the specified level of the patch hierarchy.
 
static void setSourceNames (int ln, const std::vector< std::string > &names)
 Set the names of the internal sources and sinks on the specified level of the patch hierarchy.
 
static const std::vector< std::string > & getSourceNames (int ln)
 Get the names of the internal sources and sinks on the specified level of the patch hierarchy.
 
static void setSourceRadii (int ln, const std::vector< double > &radii)
 Set the sizes of the internal sources and sinks on the specified level of the patch hierarchy.
 
static const std::vector< double > & getSourceRadii (int ln)
 Get the sizes of the internal sources and sinks on the specified level of the patch hierarchy.
 

Detailed Description

Class IBStandardSourceGen provides support for distributed internal fluid sources/sinks.

Member Function Documentation

◆ computeSourceStrengths()

void IBAMR::IBStandardSourceGen::computeSourceStrengths ( std::vector< double > &  Q_src,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  data_time,
IBTK::LDataManager l_data_manager 
)
overridevirtual

Compute the source strengths for each of the distributed internal sources or sinks.

Note
Implementations of this method must compute the same values for Q_src on each MPI process. That is to say, Q_src must provide the strengths of all of the distributed sources/sinks.

Implements IBAMR::IBLagrangianSourceStrategy.

◆ getNumSources()

unsigned int IBAMR::IBStandardSourceGen::getNumSources ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  data_time,
IBTK::LDataManager l_data_manager 
)
overridevirtual

Specify the number of distributed internal sources or sinks.

Note
The return value must be the total number of internal sources/sinks in the entire computational domain. This implies that the return value must be identical on each MPI process.

Implements IBAMR::IBLagrangianSourceStrategy.

◆ getSourceLocations()

void IBAMR::IBStandardSourceGen::getSourceLocations ( std::vector< IBTK::Point > &  X_src,
std::vector< double > &  r_src,
SAMRAI::tbox::Pointer< IBTK::LData X_data,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  data_time,
IBTK::LDataManager l_data_manager 
)
overridevirtual

Compute the source locations for each of the distributed internal sources or sinks.

Note
Implementations of this method must compute the same values for X_src on each MPI process. That is to say, X_src must provide the location of all of the distributed sources/sinks.

Implements IBAMR::IBLagrangianSourceStrategy.

◆ getSourceStrengths()

std::vector< double > & IBAMR::IBStandardSourceGen::getSourceStrengths ( int  ln)

Return a reference to the vector of source strengths.

Note
Users must not change the size of this vector.

◆ initializeLevelData()

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

Setup the data needed to compute source/sink data on the specified level of the patch hierarchy.

Note
A default empty implementation is provided.

Reimplemented from IBAMR::IBLagrangianSourceStrategy.

◆ putToDatabase()

void IBAMR::IBStandardSourceGen::putToDatabase ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db)
overridevirtual

Write out object state to the given database.

When assertion checking is active, database pointer must be non-null.

Implements SAMRAI::tbox::Serializable.


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