pyAMReX
Functions
amrex.ArrayOfStructs Namespace Reference

Functions

def aos_to_numpy (self, copy=False)
 
def aos_to_cupy (self, copy=False)
 
def register_AoS_extension (amr)
 

Detailed Description

This file is part of pyAMReX

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

Function Documentation

◆ aos_to_cupy()

def amrex.ArrayOfStructs.aos_to_cupy (   self,
  copy = False 
)
Provide Cupy views into a ArrayOfStructs.

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

Returns
-------
namedtuple
    A tuple with real and int components that are each lists
    of 1D numpy arrays.

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

◆ aos_to_numpy()

def amrex.ArrayOfStructs.aos_to_numpy (   self,
  copy = False 
)
Provide Numpy views into a ArrayOfStructs.

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

Returns
-------
namedtuple
    A tuple with real and int components that are each lists
    of 1D numpy arrays.

◆ register_AoS_extension()

def amrex.ArrayOfStructs.register_AoS_extension (   amr)
ArrayOfStructs helper methods