Definition at line 40 of file TransferDriver.H.
Inherits NEM::DRV::NemDriver.
◆ TransferDriver() [1/2]
NEM::DRV::TransferDriver::TransferDriver |
( |
Files |
files, |
|
|
Opts |
opts |
|
) |
| |
Definition at line 56 of file TransferDriver.C.
57 :
files_(std::move(files)),
opts_(std::move(opts)) {
58 std::cout <<
"TransferDriver created" << std::endl;
◆ ~TransferDriver()
NEM::DRV::TransferDriver::~TransferDriver |
( |
| ) |
|
|
override |
Definition at line 99 of file TransferDriver.C.
100 std::cout <<
"TransferDriver destroyed" << std::endl;
◆ TransferDriver() [2/2]
NEM::DRV::TransferDriver::TransferDriver |
( |
| ) |
|
|
private |
◆ CreateTransferObject()
std::shared_ptr< TransferBase > NEM::DRV::TransferDriver::CreateTransferObject |
( |
meshBase * |
srcmsh, |
|
|
meshBase * |
trgmsh, |
|
|
const std::string & |
method |
|
) |
| |
|
static |
Definition at line 107 of file TransferDriver.C.
References FETransfer::CreateShared(), ConservativeSurfaceTransfer::CreateShared(), and ConservativeVolumeTransfer::CreateShared().
Referenced by OrderOfAccuracy::computeMeshWithResolution(), OrderOfAccuracy::computeRichardsonExtrapolation(), execute(), OrderOfAccuracy::OrderOfAccuracy(), proteusHdf5::proteusHdf5(), NEM::ADP::Refine::run(), and vtkMesh::vtkMesh().
109 if (method ==
"Consistent Interpolation") {
113 else if (method ==
"Conservative Surface Transfer") {
117 #ifdef HAVE_SUPERMESH 118 else if (method ==
"Conservative Volume Transfer") {
123 std::cerr <<
"Method " << method <<
" is not supported." << std::endl;
124 std::cerr <<
"Supported methods are : " << std::endl;
125 std::cerr <<
"1) Consistent Interpolation" << std::endl;
127 std::cerr <<
"2) Conservative Surface Transfer" << std::endl;
129 #ifdef HAVE_SUPERMESH 130 std::cerr <<
"3) Conservative Volume Transfer" << std::endl;
static std::shared_ptr< ConservativeVolumeTransfer > CreateShared(meshBase *_source, meshBase *_target)
static std::shared_ptr< ConservativeSurfaceTransfer > CreateShared(meshBase *_source, meshBase *_target)
static std::shared_ptr< FETransfer > CreateShared(meshBase *source, meshBase *target)
◆ execute()
void NEM::DRV::TransferDriver::execute |
( |
| ) |
const |
|
overridevirtual |
Implements NEM::DRV::NemDriver.
Definition at line 63 of file TransferDriver.C.
References NEM::DRV::TransferDriver::Opts::arrayNames, NEM::DRV::TransferDriver::Opts::checkQuality, meshBase::Create(), CreateTransferObject(), nemAux::Timer::elapsed(), files_, NEM::DRV::TransferDriver::Opts::method, opts_, NEM::DRV::TransferDriver::Files::outputMeshFile, NEM::DRV::TransferDriver::Files::sourceMeshFile, nemAux::Timer::start(), nemAux::Timer::stop(), and NEM::DRV::TransferDriver::Files::targetMeshFile.
64 std::shared_ptr<meshBase> source{
66 std::shared_ptr<meshBase> target{
68 std::cout <<
"TransferDriver created" << std::endl;
77 transfer->transferPointData(
78 source->getArrayIDs(this->opts_.arrayNames.value()),
79 source->getNewArrayNames());
81 transfer->run(source->getNewArrayNames());
83 source->write(
"new.vtu");
86 std::cout <<
"Time spent transferring data (ms) " << T.
elapsed() << std::endl;
std::string targetMeshFile
std::string outputMeshFile
static meshBase * Create(const std::string &fname)
Construct vtkMesh from filename.
std::string sourceMeshFile
jsoncons::optional< std::vector< std::string > > arrayNames
static std::shared_ptr< TransferBase > CreateTransferObject(meshBase *srcmsh, meshBase *trgmsh, const std::string &method)
◆ getFiles()
◆ getOpts()
◆ getProgramType()
jsoncons::string_view NEM::DRV::TransferDriver::getProgramType |
( |
| ) |
const |
|
overrideprivatevirtual |
◆ readJSON()
std::unique_ptr< NemDriver > NEM::DRV::NemDriver::readJSON |
( |
const jsoncons::json & |
inputjson | ) |
|
|
staticinherited |
◆ setFiles()
void NEM::DRV::TransferDriver::setFiles |
( |
Files |
files | ) |
|
◆ setOpts()
void NEM::DRV::TransferDriver::setOpts |
( |
Opts |
opts | ) |
|
◆ files_
Files NEM::DRV::TransferDriver::files_ |
|
private |
◆ opts_
Opts NEM::DRV::TransferDriver::opts_ |
|
private |
◆ programType
constexpr const char* NEM::DRV::TransferDriver::programType = "Transfer" |
|
staticprivate |
The documentation for this class was generated from the following files: