Definition at line 44 of file ConservativeVolumeTransfer.H.
Public Member Functions | |
ConservativeVolumeTransfer (meshBase *_source, meshBase *_target) | |
~ConservativeVolumeTransfer () override | |
int | transferPointData (const std::vector< int > &arrayIDs, const std::vector< std::string > &newnames=std::vector< std::string >()) |
Transfer point data with given ids from source to target. More... | |
int | transferPointData (int i, vtkSmartPointer< vtkGenericCell > genCell, std::vector< vtkSmartPointer< vtkDoubleArray >> &dasSource, std::vector< vtkSmartPointer< vtkDoubleArray >> &dasTarget, bool flip) |
int | transferCellData (const std::vector< int > &arrayIDs, const std::vector< std::string > &newnames=std::vector< std::string >()) |
Transfer cell data with given ids from source to target. More... | |
int | transferCellData (int i, vtkSmartPointer< vtkGenericCell > genCell, std::vector< vtkSmartPointer< vtkDoubleArray >> &dasSourceToPoint, std::vector< vtkSmartPointer< vtkDoubleArray >> &dasTarget) |
int | run (const std::vector< std::string > &newnames=std::vector< std::string >()) override |
Transfer all fields. More... | |
int | initialize () |
int | transferSurfacePointData (const std::vector< int > &arrayIDs) |
void | enableSurfaceTransfer () |
Enable surface transfer. More... | |
void | disableSurfaceTransfer () |
Disable surface transfer. More... | |
int | constructSupermesh () |
Construct supermesh. More... | |
int | constructMassMatrix () |
Construct mass matrix corresponding to target. More... | |
int | constructMixedMassMatrix () |
Construct mixed mass matrix corresponding to the source and target. More... | |
int | constructLoadVector (int arrayId, int componentId) |
Construct load vector corresponding to a given array and component. More... | |
int | transfer (int arrayId) |
Transfer array given its id. More... | |
int | convertSupermeshToUnstructuredGrid () |
Convertes supermesh to an unstructured grid. More... | |
vtkSmartPointer< vtkUnstructuredGrid > | getSourceGrid () |
Get the source grid in the transfer. More... | |
vtkSmartPointer< vtkUnstructuredGrid > | getTargetGrid () |
Get the target grid in the transfer. More... | |
vtkSmartPointer< vtkUnstructuredGrid > | getSupermeshGrid () |
Get the supermesh grid in the transfer. More... | |
int | transferPointData (const std::vector< std::string > &arrayNames, const std::vector< std::string > &newnames=std::vector< std::string >()) |
Transfer point data with given field names from source to target. More... | |
int | transferCellData (const std::vector< std::string > &arrayNames, const std::vector< std::string > &newnames=std::vector< std::string >()) |
Transfer cell data with given field names from source to target. More... | |
void | setCheckQual (bool x) |
void | setContBool (bool x) |
Static Public Member Functions | |
static ConservativeVolumeTransfer * | Create (meshBase *_source, meshBase *_target) |
static std::shared_ptr< ConservativeVolumeTransfer > | CreateShared (meshBase *_source, meshBase *_target) |
Protected Attributes | |
meshBase * | source |
meshBase * | target |
vtkSmartPointer< vtkStaticCellLocator > | srcCellLocator = nullptr |
vtkSmartPointer< vtkStaticCellLocator > | trgCellLocator = nullptr |
vtkSmartPointer< vtkStaticPointLocator > | srcPointLocator = nullptr |
vtkSmartPointer< vtkStaticPointLocator > | trgPointLocator = nullptr |
bool | checkQual |
bool | continuous |
double | c2cTrnsDistTol |
Private Member Functions | |
void | getLibSupermeshData (vtkDataSet *data, long &nnodes, int &dim, long &nelements, int &loc, double *&positions, long *&enlist, long &initTetId) |
int | interpolateCellDataToPoints (int cellArrayId) |
vtkSmartPointer< vtkPolyData > | extractSurface (vtkUnstructuredGrid *grid) |
void | volumeCheck () |
Private Attributes | |
double | TET8 [32] |
double | TET8W [8] |
double | TET4 [16] |
double | TET4W [4] |
double | TET10 [40] |
double | TET10W [10] |
long | numSourceNodes |
long | numTargetNodes |
long | initSourceTetId |
long | initTargetTetId |
vtkSmartPointer< vtkUnstructuredGrid > | sourceGrid |
vtkSmartPointer< vtkUnstructuredGrid > | targetGrid |
vtkSmartPointer< vtkUnstructuredGrid > | supermeshGrid |
vtkSmartPointer< vtkQuadratureSchemeDefinition > | quadrature |
Eigen::SparseMatrix< double, Eigen::ColMajor, long > | massMatrix |
Eigen::SparseMatrix< double, Eigen::ColMajor, long > | mixedMassMatrix |
Eigen::VectorXd | loadVector |
std::vector< std::vector< double > > | children_a |
std::vector< std::vector< double > > | children_b |
std::vector< std::vector< double > > | tets_c |
std::vector< long > | parents_a |
std::vector< long > | parents_b |
bool | surfaceTransferEnabled = false |
Inherits TransferBase.
Definition at line 47 of file ConservativeVolumeTransfer.C.
References meshBase::getDataSet(), massMatrix, mixedMassMatrix, NEM::MSH::New(), numSourceNodes, numTargetNodes, quadrature, TransferBase::source, sourceGrid, TransferBase::target, targetGrid, TET4, and TET4W.
|
inlineoverride |
Definition at line 49 of file ConservativeVolumeTransfer.H.
int ConservativeVolumeTransfer::constructLoadVector | ( | int | arrayId, |
int | componentId | ||
) |
Definition at line 421 of file ConservativeVolumeTransfer.C.
References nemAux::Timer::elapsed(), loadVector, mixedMassMatrix, numSourceNodes, sourceGrid, nemAux::Timer::start(), and nemAux::Timer::stop().
Referenced by transfer().
int ConservativeVolumeTransfer::constructMassMatrix | ( | ) |
Definition at line 280 of file ConservativeVolumeTransfer.C.
References nemAux::Timer::elapsed(), initTargetTetId, massMatrix, quadrature, nemAux::Timer::start(), nemAux::Timer::stop(), and targetGrid.
Referenced by initialize(), and run().
int ConservativeVolumeTransfer::constructMixedMassMatrix | ( | ) |
Requires a constructed supermesh.
Definition at line 324 of file ConservativeVolumeTransfer.C.
References nemAux::Timer::elapsed(), initSourceTetId, initTargetTetId, mixedMassMatrix, parents_a, parents_b, quadrature, sourceGrid, nemAux::Timer::start(), nemAux::Timer::stop(), targetGrid, and tets_c.
Referenced by initialize(), and run().
int ConservativeVolumeTransfer::constructSupermesh | ( | ) |
Definition at line 131 of file ConservativeVolumeTransfer.C.
References nemAux::Timer::elapsed(), meshBase::getDataSet(), getLibSupermeshData(), initSourceTetId, initTargetTetId, parents_a, parents_b, TransferBase::source, nemAux::Timer::start(), nemAux::Timer::stop(), TransferBase::target, and tets_c.
Referenced by initialize(), and run().
int ConservativeVolumeTransfer::convertSupermeshToUnstructuredGrid | ( | ) |
Definition at line 578 of file ConservativeVolumeTransfer.C.
References NEM::MSH::New(), sourceGrid, supermeshGrid, and tets_c.
|
inlinestatic |
Definition at line 54 of file ConservativeVolumeTransfer.H.
Referenced by CreateShared().
|
inlinestatic |
Definition at line 60 of file ConservativeVolumeTransfer.H.
References Create(), and TransferBase::transferPointData().
Referenced by NEM::DRV::TransferDriver::CreateTransferObject().
|
inline |
Definition at line 108 of file ConservativeVolumeTransfer.H.
|
inline |
This is necessary for meshes with a shared boundary.
Definition at line 103 of file ConservativeVolumeTransfer.H.
|
private |
Definition at line 677 of file ConservativeVolumeTransfer.C.
References NEM::MSH::New().
|
private |
Definition at line 530 of file ConservativeVolumeTransfer.C.
Referenced by constructSupermesh().
|
inline |
Definition at line 141 of file ConservativeVolumeTransfer.H.
|
inline |
Call convertSupermeshToUnstructuredGrid before this query.
Definition at line 151 of file ConservativeVolumeTransfer.H.
|
inline |
Definition at line 145 of file ConservativeVolumeTransfer.H.
int ConservativeVolumeTransfer::initialize | ( | ) |
Definition at line 94 of file ConservativeVolumeTransfer.C.
References constructMassMatrix(), constructMixedMassMatrix(), and constructSupermesh().
|
private |
Definition at line 488 of file ConservativeVolumeTransfer.C.
References NEM::MSH::New(), and sourceGrid.
|
overridevirtual |
newnames | optional array of names to be applied to transferred fields |
Implements TransferBase.
Definition at line 71 of file ConservativeVolumeTransfer.C.
References constructMassMatrix(), constructMixedMassMatrix(), constructSupermesh(), sourceGrid, and transfer().
|
inlineinherited |
Definition at line 100 of file TransferBase.H.
|
inlineinherited |
Definition at line 102 of file TransferBase.H.
int ConservativeVolumeTransfer::transfer | ( | int | arrayId | ) |
Definition at line 448 of file ConservativeVolumeTransfer.C.
References constructLoadVector(), nemAux::Timer::elapsed(), loadVector, massMatrix, NEM::MSH::New(), numTargetNodes, sourceGrid, nemAux::Timer::start(), nemAux::Timer::stop(), and targetGrid.
Referenced by run(), and transferPointData().
|
inlinevirtual |
arrayIDs | array of array ids to specify which fields to transfer |
newnames | optional array of names to be applied to transferred fields |
Implements TransferBase.
Definition at line 78 of file ConservativeVolumeTransfer.H.
|
inline |
Definition at line 84 of file ConservativeVolumeTransfer.H.
References TransferBase::run().
|
inherited |
arrayIDs | array of array names to specify which fields to transfer |
newnames | optional array of names to be applied to transferred fields |
Definition at line 47 of file TransferBase.C.
References TransferBase::getArrayIDs(), meshBase::getDataSet(), TransferBase::source, and TransferBase::transferCellData().
|
virtual |
arrayIDs | array of array ids to specify which fields to transfer |
newnames | optional array of names to be applied to transferred fields |
Implements TransferBase.
Definition at line 100 of file ConservativeVolumeTransfer.C.
References transfer().
|
inline |
Definition at line 70 of file ConservativeVolumeTransfer.H.
|
inherited |
arrayIDs | array of array names to specify which fields to transfer |
newnames | optional array of names to be applied to transferred fields |
Definition at line 36 of file TransferBase.C.
References TransferBase::getArrayIDs(), meshBase::getDataSet(), TransferBase::source, and TransferBase::transferPointData().
int ConservativeVolumeTransfer::transferSurfacePointData | ( | const std::vector< int > & | arrayIDs | ) |
|
private |
Definition at line 661 of file ConservativeVolumeTransfer.C.
References initSourceTetId, initTargetTetId, sourceGrid, and targetGrid.
|
protectedinherited |
Definition at line 116 of file TransferBase.H.
Referenced by FETransfer::transferCellData().
|
protectedinherited |
Definition at line 114 of file TransferBase.H.
Referenced by FETransfer::transferPointData().
|
private |
Definition at line 227 of file ConservativeVolumeTransfer.H.
|
private |
Definition at line 228 of file ConservativeVolumeTransfer.H.
|
protectedinherited |
Definition at line 115 of file TransferBase.H.
Referenced by FETransfer::transferCellData().
|
private |
Definition at line 213 of file ConservativeVolumeTransfer.H.
Referenced by constructMixedMassMatrix(), constructSupermesh(), and volumeCheck().
|
private |
Definition at line 214 of file ConservativeVolumeTransfer.H.
Referenced by constructMassMatrix(), constructMixedMassMatrix(), constructSupermesh(), and volumeCheck().
|
private |
Definition at line 225 of file ConservativeVolumeTransfer.H.
Referenced by constructLoadVector(), and transfer().
|
private |
Definition at line 223 of file ConservativeVolumeTransfer.H.
Referenced by ConservativeVolumeTransfer(), constructMassMatrix(), and transfer().
|
private |
Definition at line 224 of file ConservativeVolumeTransfer.H.
Referenced by ConservativeVolumeTransfer(), constructLoadVector(), and constructMixedMassMatrix().
|
private |
Definition at line 210 of file ConservativeVolumeTransfer.H.
Referenced by ConservativeVolumeTransfer(), and constructLoadVector().
|
private |
Definition at line 211 of file ConservativeVolumeTransfer.H.
Referenced by ConservativeVolumeTransfer(), and transfer().
|
private |
Definition at line 231 of file ConservativeVolumeTransfer.H.
Referenced by constructMixedMassMatrix(), and constructSupermesh().
|
private |
Definition at line 232 of file ConservativeVolumeTransfer.H.
Referenced by constructMixedMassMatrix(), and constructSupermesh().
|
private |
Definition at line 220 of file ConservativeVolumeTransfer.H.
Referenced by ConservativeVolumeTransfer(), constructMassMatrix(), and constructMixedMassMatrix().
|
protectedinherited |
Definition at line 105 of file TransferBase.H.
Referenced by ConservativeVolumeTransfer(), constructSupermesh(), FETransfer::FETransfer(), FETransfer::getClosestSourceCell(), FETransfer::run(), TransferBase::transferCellData(), FETransfer::transferCellData(), ConservativeSurfaceTransfer::transferPointData(), FETransfer::transferPointData(), TransferBase::transferPointData(), and ConservativeSurfaceTransfer::writeOverlay().
|
private |
Definition at line 216 of file ConservativeVolumeTransfer.H.
Referenced by ConservativeVolumeTransfer(), constructLoadVector(), constructMixedMassMatrix(), convertSupermeshToUnstructuredGrid(), interpolateCellDataToPoints(), run(), transfer(), and volumeCheck().
|
protectedinherited |
Definition at line 108 of file TransferBase.H.
Referenced by FETransfer::FETransfer(), and FETransfer::getClosestSourceCell().
|
protectedinherited |
Definition at line 111 of file TransferBase.H.
Referenced by FETransfer::FETransfer().
|
private |
Definition at line 218 of file ConservativeVolumeTransfer.H.
Referenced by convertSupermeshToUnstructuredGrid().
|
private |
Definition at line 246 of file ConservativeVolumeTransfer.H.
|
protectedinherited |
Definition at line 106 of file TransferBase.H.
Referenced by ConservativeVolumeTransfer(), constructSupermesh(), FETransfer::FETransfer(), FETransfer::getClosestSourceCell(), FETransfer::run(), FETransfer::transferCellData(), ConservativeSurfaceTransfer::transferPointData(), FETransfer::transferPointData(), and ConservativeSurfaceTransfer::writeOverlay().
|
private |
Definition at line 217 of file ConservativeVolumeTransfer.H.
Referenced by ConservativeVolumeTransfer(), constructMassMatrix(), constructMixedMassMatrix(), transfer(), and volumeCheck().
|
private |
Definition at line 183 of file ConservativeVolumeTransfer.H.
|
private |
Definition at line 202 of file ConservativeVolumeTransfer.H.
|
private |
Definition at line 173 of file ConservativeVolumeTransfer.H.
Referenced by ConservativeVolumeTransfer().
|
private |
Definition at line 180 of file ConservativeVolumeTransfer.H.
Referenced by ConservativeVolumeTransfer().
|
private |
Definition at line 156 of file ConservativeVolumeTransfer.H.
|
private |
Definition at line 169 of file ConservativeVolumeTransfer.H.
|
private |
Definition at line 230 of file ConservativeVolumeTransfer.H.
Referenced by constructMixedMassMatrix(), constructSupermesh(), and convertSupermeshToUnstructuredGrid().
|
protectedinherited |
Definition at line 109 of file TransferBase.H.
Referenced by FETransfer::FETransfer(), and FETransfer::getClosestSourceCell().
|
protectedinherited |
Definition at line 112 of file TransferBase.H.
Referenced by FETransfer::FETransfer().