Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
FluidSource< SPACE_DIM > Class Template Reference

#include <FluidSource.hpp>

+ Collaboration diagram for FluidSource< SPACE_DIM >:

Public Member Functions

 FluidSource (unsigned index, ChastePoint< SPACE_DIM > point)
 
 FluidSource (unsigned index, c_vector< double, SPACE_DIM > location)
 
 FluidSource (unsigned index, double v1=0.0, double v2=0.0, double v3=0.0)
 
 ~FluidSource ()
 
unsigned GetIndex () const
 
void SetIndex (unsigned index)
 
ChastePoint< SPACE_DIM > GetPoint () const
 
const c_vector< double, SPACE_DIM > & rGetLocation () const
 
c_vector< double, SPACE_DIM > & rGetModifiableLocation ()
 
double GetStrength () const
 
void SetStrength (double strength)
 
void SetIfSourceIsAssociatedWithElement (bool associated)
 
bool IsSourceAssociatedWithElement ()
 
unsigned GetAssociatedElementIndex () const
 
void SetAssociatedElementIndex (unsigned associatedElementIndex)
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Private Attributes

unsigned mIndex
 
c_vector< double, SPACE_DIM > mLocation
 
double mStrength
 
bool mIsSourceAssociatedWithElement
 
unsigned mAssociatedElementIndex
 

Friends

class boost::serialization::access
 

Detailed Description

template<unsigned SPACE_DIM>
class FluidSource< SPACE_DIM >

A fluid source in an immersed boundary mesh, used in ImmersedBoundary simulations.

Definition at line 45 of file FluidSource.hpp.

Constructor & Destructor Documentation

◆ FluidSource() [1/3]

template<unsigned SPACE_DIM>
FluidSource< SPACE_DIM >::FluidSource ( unsigned  index,
ChastePoint< SPACE_DIM >  point 
)

Constructor that takes in the fluid source's location as a ChastePoint.

Parameters
indexthe index of the fluid source in the mesh
pointthe location of the fluid source in the mesh

Definition at line 39 of file FluidSource.cpp.

◆ FluidSource() [2/3]

template<unsigned SPACE_DIM>
FluidSource< SPACE_DIM >::FluidSource ( unsigned  index,
c_vector< double, SPACE_DIM >  location 
)

Constructor that takes in the fluid source's location as a c_vector.

Parameters
indexthe index of the fluid source in the mesh
locationthe location of the fluid source in the mesh

Definition at line 49 of file FluidSource.cpp.

◆ FluidSource() [3/3]

template<unsigned SPACE_DIM>
FluidSource< SPACE_DIM >::FluidSource ( unsigned  index,
double  v1 = 0.0,
double  v2 = 0.0,
double  v3 = 0.0 
)

Constructor that takes the coordinates of the fluid source's location as separate input arguments.

Parameters
indexthe index of the fluid source in the mesh
v1the x-coordinate of the fluid source in the mesh (defaults to 0)
v2the y-coordinate of the fluid source in the mesh (defaults to 0)
v3the z-coordinate of the fluid source in the mesh (defaults to 0)

Definition at line 61 of file FluidSource.cpp.

References FluidSource< SPACE_DIM >::mLocation.

◆ ~FluidSource()

template<unsigned SPACE_DIM>
FluidSource< SPACE_DIM >::~FluidSource ( )

Explicit destructor.

Definition at line 79 of file FluidSource.cpp.

Member Function Documentation

◆ GetAssociatedElementIndex()

template<unsigned SPACE_DIM>
unsigned FluidSource< SPACE_DIM >::GetAssociatedElementIndex ( ) const
Returns
the index of the element associated to this fluid source.

Definition at line 138 of file FluidSource.cpp.

◆ GetIndex()

template<unsigned SPACE_DIM>
unsigned FluidSource< SPACE_DIM >::GetIndex ( ) const
Returns
the index of this fluid source in the mesh.

Definition at line 84 of file FluidSource.cpp.

◆ GetPoint()

template<unsigned SPACE_DIM>
ChastePoint< SPACE_DIM > FluidSource< SPACE_DIM >::GetPoint ( ) const
Returns
the fluid source's location as a ChastePoint.

Definition at line 96 of file FluidSource.cpp.

◆ GetStrength()

template<unsigned SPACE_DIM>
double FluidSource< SPACE_DIM >::GetStrength ( ) const
Returns
the strength of this fluid source.

Definition at line 114 of file FluidSource.cpp.

◆ IsSourceAssociatedWithElement()

template<unsigned SPACE_DIM>
bool FluidSource< SPACE_DIM >::IsSourceAssociatedWithElement ( )
Returns
whether the fluid source is associated with an element.

Definition at line 132 of file FluidSource.cpp.

◆ rGetLocation()

template<unsigned SPACE_DIM>
const c_vector< double, SPACE_DIM > & FluidSource< SPACE_DIM >::rGetLocation ( ) const
Returns
the fluid source's location as a c_vector.

The returned location may not be modified; if you want that functionality use rGetModifiableLocation instead.

Definition at line 102 of file FluidSource.cpp.

◆ rGetModifiableLocation()

template<unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > & FluidSource< SPACE_DIM >::rGetModifiableLocation ( )
Returns
the fluid source's location as a c_vector.

Don't forget to assign the result of this call to a reference!

Definition at line 108 of file FluidSource.cpp.

◆ serialize()

template<unsigned SPACE_DIM>
template<class Archive >
void FluidSource< SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Serialize information required to construct a FluidSource.

Parameters
archiveThe archive
versionversion information

Definition at line 73 of file FluidSource.hpp.

References FluidSource< SPACE_DIM >::mAssociatedElementIndex, FluidSource< SPACE_DIM >::mIsSourceAssociatedWithElement, and FluidSource< SPACE_DIM >::mStrength.

◆ SetAssociatedElementIndex()

template<unsigned SPACE_DIM>
void FluidSource< SPACE_DIM >::SetAssociatedElementIndex ( unsigned  associatedElementIndex)

Set the index of the element associated to this fluid source.

Parameters
associatedElementIndexof the element associated to this fluid source.

Definition at line 144 of file FluidSource.cpp.

◆ SetIfSourceIsAssociatedWithElement()

template<unsigned SPACE_DIM>
void FluidSource< SPACE_DIM >::SetIfSourceIsAssociatedWithElement ( bool  associated)

Set whether the fluid source is associated with an element.

Parameters
associatedwhether there is an association

Definition at line 126 of file FluidSource.cpp.

◆ SetIndex()

template<unsigned SPACE_DIM>
void FluidSource< SPACE_DIM >::SetIndex ( unsigned  index)

Set the index of the fluid source in the mesh.

Parameters
indexthe index of the fluid source

Definition at line 90 of file FluidSource.cpp.

◆ SetStrength()

template<unsigned SPACE_DIM>
void FluidSource< SPACE_DIM >::SetStrength ( double  strength)

Set the new strength of the fluid source.

Parameters
strengthof the fluid source

Definition at line 120 of file FluidSource.cpp.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned SPACE_DIM>
friend class boost::serialization::access
friend

Definition at line 65 of file FluidSource.hpp.

Member Data Documentation

◆ mAssociatedElementIndex

template<unsigned SPACE_DIM>
unsigned FluidSource< SPACE_DIM >::mAssociatedElementIndex
private

Index of the immersed boundary element associated with this fluid source.

Definition at line 63 of file FluidSource.hpp.

Referenced by FluidSource< SPACE_DIM >::serialize().

◆ mIndex

template<unsigned SPACE_DIM>
unsigned FluidSource< SPACE_DIM >::mIndex
private

The index of this fluid source within the mesh.

Definition at line 51 of file FluidSource.hpp.

◆ mIsSourceAssociatedWithElement

template<unsigned SPACE_DIM>
bool FluidSource< SPACE_DIM >::mIsSourceAssociatedWithElement
private

Whether the fluid source is associated with an immersed boundary element.

Definition at line 60 of file FluidSource.hpp.

Referenced by FluidSource< SPACE_DIM >::serialize().

◆ mLocation

template<unsigned SPACE_DIM>
c_vector<double, SPACE_DIM> FluidSource< SPACE_DIM >::mLocation
private

The location of this fluid source within the mesh.

Definition at line 54 of file FluidSource.hpp.

Referenced by FluidSource< SPACE_DIM >::FluidSource().

◆ mStrength

template<unsigned SPACE_DIM>
double FluidSource< SPACE_DIM >::mStrength
private

The strength of the fluid source.

Definition at line 57 of file FluidSource.hpp.

Referenced by FluidSource< SPACE_DIM >::serialize().


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