Description

Class to calculate force between SPH markers in Weakly Compressible SPH.

This class implements the necessary functions for a WCSPH force calculation method. The class owns a collision system fsi which takes care of GPU based proximity computation of the markers. It also holds a pointer to external data of SPH markers, proximity data, parameters, and numbers.

Inherits chrono::fsi::ChFsiGeneral.

Public Member Functions

 ChFsiForceParallel (ChBce *otherBceWorker, SphMarkerDataD *otherSortedSphMarkersD, ProximityDataD *otherMarkersProximityD, FsiGeneralData *otherFsiGeneralData, SimParams *otherParamsH, NumberOfObjects *otherNumObjects)
 Base constructor for FSI force class. More...
 
 ~ChFsiForceParallel ()
 Destructor. Deletes the collision system.
 
virtual void ForceSPH (SphMarkerDataD *otherSphMarkersD, FsiBodiesDataD *otherFsiBodiesD)
 Function calculate the force on SPH markers. More...
 
virtual void Finalize ()
 Synchronize the copy of the data (parameters and number of objects) between device (GPU) and host (CPU). More...
 

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. 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. 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. 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. More...
 

Constructor & Destructor Documentation

chrono::fsi::ChFsiForceParallel::ChFsiForceParallel ( ChBce otherBceWorker,
SphMarkerDataD otherSortedSphMarkersD,
ProximityDataD otherMarkersProximityD,
FsiGeneralData otherFsiGeneralData,
SimParams otherParamsH,
NumberOfObjects otherNumObjects 
)

Base constructor for FSI force class.

The constructor instantiates the collision system (ChCollisionSystemFsi) and initializes the pointer to external data.

Parameters
otherBceWorkerPointer to the ChBce object that handles BCE markers
otherSortedSphMarkersDInformation of markers in the sorted array on device
otherMarkersProximityDPointer to the object that holds the proximity of the markers on device
otherFsiGeneralDataPointer to the sph general data
otherParamsHPointer to the simulation parameters on host
otherNumObjectsPointer to number of objects, fluid and boundary markers, etc.

Member Function Documentation

static void chrono::fsi::ChFsiForceParallel::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.

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.

static void chrono::fsi::ChFsiForceParallel::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.

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.

static void chrono::fsi::ChFsiForceParallel::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.

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.

static void chrono::fsi::ChFsiForceParallel::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.

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.

virtual void chrono::fsi::ChFsiForceParallel::Finalize ( )
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.

virtual void chrono::fsi::ChFsiForceParallel::ForceSPH ( SphMarkerDataD otherSphMarkersD,
FsiBodiesDataD otherFsiBodiesD 
)
virtual

Function calculate the force on SPH markers.

This is a basic force computation relying on WCSPH approach.