MFEM  v4.5.1
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mfem::Ginkgo::VectorWrapper Class Reference

#include <ginkgo.hpp>

Inheritance diagram for mfem::Ginkgo::VectorWrapper:
[legend]
Collaboration diagram for mfem::Ginkgo::VectorWrapper:
[legend]

Public Member Functions

 VectorWrapper (std::shared_ptr< const gko::Executor > exec, gko::size_type size, Vector *mfem_vec, bool ownership=false)
 
 gko::Array (exec, size, mfem_vec->ReadWrite(exec!=exec->get_master()?true:false))
 
 if (ownership)
 
Vectorget_mfem_vec_ref ()
 
const Vectorget_mfem_vec_const_ref () const
 
virtual std::unique_ptr
< gko::matrix::Dense< double > > 
create_with_same_config () const override
 
virtual std::unique_ptr
< gko::matrix::Dense< double > > 
create_with_type_of_impl (std::shared_ptr< const gko::Executor > exec, const gko::dim< 2 > &size, gko::size_type stride) const override
 
virtual std::unique_ptr
< gko::matrix::Dense< double > > 
create_submatrix_impl (const gko::span &rows, const gko::span &columns, const gko::size_type stride) override
 

Static Public Member Functions

static std::unique_ptr
< VectorWrapper
create (std::shared_ptr< const gko::Executor > exec, gko::size_type size, Vector *mfem_vec, bool ownership=false)
 

Public Attributes

 else
 
 wrapped_vec
 

Detailed Description

This class wraps an MFEM vector object for Ginkgo's use. It allows Ginkgo and MFEM to operate directly on the same data, and is necessary to use MFEM Operators with Ginkgo solvers.

Definition at line 60 of file ginkgo.hpp.

Constructor & Destructor Documentation

mfem::Ginkgo::VectorWrapper::VectorWrapper ( std::shared_ptr< const gko::Executor >  exec,
gko::size_type  size,
Vector mfem_vec,
bool  ownership = false 
)
inline

Definition at line 63 of file ginkgo.hpp.

Member Function Documentation

static std::unique_ptr<VectorWrapper> mfem::Ginkgo::VectorWrapper::create ( std::shared_ptr< const gko::Executor >  exec,
gko::size_type  size,
Vector mfem_vec,
bool  ownership = false 
)
inlinestatic

Definition at line 96 of file ginkgo.hpp.

virtual std::unique_ptr<gko::matrix::Dense<double> > mfem::Ginkgo::VectorWrapper::create_submatrix_impl ( const gko::span &  rows,
const gko::span &  columns,
const gko::size_type  stride 
)
inlineoverridevirtual

Definition at line 166 of file ginkgo.hpp.

virtual std::unique_ptr<gko::matrix::Dense<double> > mfem::Ginkgo::VectorWrapper::create_with_same_config ( ) const
inlineoverridevirtual

Definition at line 115 of file ginkgo.hpp.

virtual std::unique_ptr<gko::matrix::Dense<double> > mfem::Ginkgo::VectorWrapper::create_with_type_of_impl ( std::shared_ptr< const gko::Executor >  exec,
const gko::dim< 2 > &  size,
gko::size_type  stride 
) const
inlineoverridevirtual

Definition at line 136 of file ginkgo.hpp.

const Vector& mfem::Ginkgo::VectorWrapper::get_mfem_vec_const_ref ( ) const
inline

Definition at line 110 of file ginkgo.hpp.

Vector& mfem::Ginkgo::VectorWrapper::get_mfem_vec_ref ( )
inline

Definition at line 107 of file ginkgo.hpp.

mfem::Ginkgo::VectorWrapper::gko::Array ( exec  ,
size  ,
mfem_vec->  ReadWriteexec!=exec->get_master()?true:false 
)
mfem::Ginkgo::VectorWrapper::if ( ownership  )
inline

Definition at line 80 of file ginkgo.hpp.

Member Data Documentation

mfem::Ginkgo::VectorWrapper::else
Initial value:
{
using deleter = gko::null_deleter<Vector>

Definition at line 88 of file ginkgo.hpp.

mfem::Ginkgo::VectorWrapper::wrapped_vec
Initial value:
= std::unique_ptr<Vector,
std::function<void(Vector *)>>(
mfem_vec, deleter{})

Definition at line 90 of file ginkgo.hpp.


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