Description

Base class to calculate force between SPH particles.

This is an abstract class that defines an interface that various SPH methods should implement. The class owns a collision system fsi which takes care of GPU based proximity computation of the particles. It also holds a pointer to external data of SPH particles, proximity data, parameters, and numbers.

Inheritance diagram for chrono::fsi::sph::FsiForce:
Collaboration diagram for chrono::fsi::sph::FsiForce:

Public Member Functions

 FsiForce (FsiDataManager &data_mgr, BceManager &bce_mgr, bool verbose)
 Base constructor for the FsiForce class. More...
 
virtual ~FsiForce ()
 Destructor of the FsiForce.
 
virtual void ForceSPH (std::shared_ptr< SphMarkerDataD > sortedSphMarkers_D, Real time, Real step)=0
 Function to calculate forces on SPH particles.
 
virtual void Initialize ()
 Synchronize the copy of the data (parameters and number of objects) between device (GPU) and host (CPU). More...
 
void SetLinearSolver (SolverType type)
 Function to set the linear solver type for the solver implemented using the ISPH method (FsiForceISPH).
 

Static Public Member Functions

static void CopySortedToOriginal_Invasive_R3 (thrust::device_vector< Real3 > &original, thrust::device_vector< Real3 > &sorted, const thrust::device_vector< uint > &gridMarkerIndex)
 Copy sorted data into original data (real3). More...
 
static void CopySortedToOriginal_NonInvasive_R3 (thrust::device_vector< Real3 > &original, const thrust::device_vector< Real3 > &sorted, const thrust::device_vector< uint > &gridMarkerIndex)
 Copy sorted data into original data (real3). More...
 
static void CopySortedToOriginal_Invasive_R4 (thrust::device_vector< Real4 > &original, thrust::device_vector< Real4 > &sorted, const thrust::device_vector< uint > &gridMarkerIndex)
 Copy sorted data into original data (real4). More...
 
static void CopySortedToOriginal_NonInvasive_R4 (thrust::device_vector< Real4 > &original, thrust::device_vector< Real4 > &sorted, const thrust::device_vector< uint > &gridMarkerIndex)
 Copy sorted data into original data (real4). More...
 

Protected Attributes

FsiDataManagerm_data_mgr
 FSI data manager.
 
BceManagerm_bce_mgr
 BCE manager.
 
bool m_verbose
 
bool * m_errflagD
 

Friends

class FluidDynamics
 

Constructor & Destructor Documentation

◆ FsiForce()

chrono::fsi::sph::FsiForce::FsiForce ( FsiDataManager data_mgr,
BceManager bce_mgr,
bool  verbose 
)

Base constructor for the FsiForce class.

The constructor instantiates the force system and initializes the pointer to external data.

Parameters
data_mgrFSI data manager
bce_mgrBCE manager
verboseverbose output

Member Function Documentation

◆ CopySortedToOriginal_Invasive_R3()

static void chrono::fsi::sph::FsiForce::CopySortedToOriginal_Invasive_R3 ( thrust::device_vector< Real3 > &  original,
thrust::device_vector< Real3 > &  sorted,
const thrust::device_vector< uint > &  gridMarkerIndex 
)
static

Copy sorted data into original data (real3).

This function copies the data that are sorted in the collision system, into the original data, where data is real3. The class is invasive, meaning that the sorted data will be modified (and will be equivalent to the original). Therefore, this function should be used whenever sorted data is not needed, but efficiency is preferred.

◆ CopySortedToOriginal_Invasive_R4()

static void chrono::fsi::sph::FsiForce::CopySortedToOriginal_Invasive_R4 ( thrust::device_vector< Real4 > &  original,
thrust::device_vector< Real4 > &  sorted,
const thrust::device_vector< uint > &  gridMarkerIndex 
)
static

Copy sorted data into original data (real4).

This function copies the data that are sorted in the collision system, into the original data, where data is real4. The class is invasive, meaning that the sorted data will be modified (and will be equivalent to the original). Therefore, this function should be used whenever sorted data is not needed, but efficiency is preferred.

◆ CopySortedToOriginal_NonInvasive_R3()

static void chrono::fsi::sph::FsiForce::CopySortedToOriginal_NonInvasive_R3 ( thrust::device_vector< Real3 > &  original,
const thrust::device_vector< Real3 > &  sorted,
const thrust::device_vector< uint > &  gridMarkerIndex 
)
static

Copy sorted data into original data (real3).

This function copies the data that are sorted in the collision system, into the original data, where data is real3. The class is non-invasive, meaning that the sorted data will not be modified. This comes at the expense of lower efficiency.

◆ CopySortedToOriginal_NonInvasive_R4()

static void chrono::fsi::sph::FsiForce::CopySortedToOriginal_NonInvasive_R4 ( thrust::device_vector< Real4 > &  original,
thrust::device_vector< Real4 > &  sorted,
const thrust::device_vector< uint > &  gridMarkerIndex 
)
static

Copy sorted data into original data (real4).

This function copies the data that are sorted in the collision system, into the original data, where data is real4. The class is non-invasive, meaning that the sorted data will not be modified. This comes at the expense of lower efficiency.

◆ Initialize()

virtual void chrono::fsi::sph::FsiForce::Initialize ( )
virtual

Synchronize the copy of the data (parameters and number of objects) between device (GPU) and host (CPU).

This function needs to be called once the host data are modified.

Reimplemented in chrono::fsi::sph::FsiForceWCSPH, and chrono::fsi::sph::FsiForceISPH.


The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono_fsi/sph/physics/FsiForce.cuh