pyAMReX
Functions
amrex.PODVector Namespace Reference

Functions

def podvector_to_numpy (self, copy=False)
 
def podvector_to_cupy (self, copy=False)
 
def register_PODVector_extension (amr)
 

Detailed Description

This file is part of pyAMReX

Copyright 2023 AMReX community
Authors: Axel Huebl
License: BSD-3-Clause-LBNL

Function Documentation

◆ podvector_to_cupy()

def amrex.PODVector.podvector_to_cupy (   self,
  copy = False 
)
Provide a Cupy view into a PODVector (e.g., RealVector, IntVector).

Parameters
----------
self : amrex.PODVector_*
    A PODVector class in pyAMReX
copy : bool, optional
    Copy the data if true, otherwise create a view (default).

Returns
-------
cupy.array
    A 1D cupy array.

Raises
------
ImportError
    Raises an exception if cupy is not installed

◆ podvector_to_numpy()

def amrex.PODVector.podvector_to_numpy (   self,
  copy = False 
)
Provide a Numpy view into a PODVector (e.g., RealVector, IntVector).

Parameters
----------
self : amrex.PODVector_*
    A PODVector class in pyAMReX
copy : bool, optional
    Copy the data if true, otherwise create a view (default).

Returns
-------
np.array
    A 1D numpy array.

◆ register_PODVector_extension()

def amrex.PODVector.register_PODVector_extension (   amr)
PODVector helper methods