Block-Structured AMR Software Framework
amrex::sundials Namespace Reference

Classes

class  MemoryHelper
 A SUNDIALS SUNMemoryHelper interface to the amrex::Arena. More...
 

Functions

N_Vector N_VNewEmpty_MultiFab (sunindextype length, ::sundials::Context *sunctx)
 
N_Vector N_VNew_MultiFab (sunindextype length, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, sunindextype nComp, sunindextype nGhost, ::sundials::Context *sunctx)
 
N_Vector N_VMake_MultiFab (sunindextype length, amrex::MultiFab *v_mf, ::sundials::Context *sunctx)
 
sunindextype N_VGetLength_MultiFab (N_Vector v)
 
int N_VGetOwnMF_MultiFab (N_Vector v)
 
void N_VSetOwnMF_MultiFab (N_Vector v, int own_mf_in)
 
N_Vector N_VCloneEmpty_MultiFab (N_Vector w)
 
N_Vector N_VClone_MultiFab (N_Vector w)
 
void N_VDestroy_MultiFab (N_Vector v)
 
void N_VSpace_MultiFab (N_Vector v, sunindextype *lrw, sunindextype *liw)
 
N_VectorContent_MultiFab N_VGetContent_MultiFab (N_Vector v)
 
amrex::MultiFab *& getMFptr (N_Vector v)
 
amrex::MultiFabN_VGetVectorPointer_MultiFab (N_Vector v)
 
amrex::MultiFab N_VGetVectorAlias_MultiFab (N_Vector v)
 
void N_VLinearSum_MultiFab (amrex::Real a, N_Vector x, amrex::Real b, N_Vector y, N_Vector z)
 
void N_VConst_MultiFab (amrex::Real c, N_Vector z)
 
void N_VProd_MultiFab (N_Vector x, N_Vector y, N_Vector z)
 
void N_VDiv_MultiFab (N_Vector x, N_Vector y, N_Vector z)
 
void N_VScale_MultiFab (amrex::Real c, N_Vector x, N_Vector z)
 
void N_VAbs_MultiFab (N_Vector x, N_Vector z)
 
void N_VInv_MultiFab (N_Vector x, N_Vector z)
 
void N_VAddConst_MultiFab (N_Vector x, amrex::Real b, N_Vector z)
 
amrex::Real N_VDotProd_MultiFab (N_Vector x, N_Vector y)
 
amrex::Real N_VMaxNorm_MultiFab (N_Vector x)
 
amrex::Real N_VWrmsNorm_MultiFab (N_Vector x, N_Vector w)
 
amrex::Real N_VWrmsNormMask_MultiFab (N_Vector x, N_Vector w, N_Vector id)
 
amrex::Real N_VMin_MultiFab (N_Vector x)
 
amrex::Real NormHelper_NVector_MultiFab (N_Vector a_x, N_Vector a_w, N_Vector id, int use_id, bool rms)
 
amrex::Real N_VWL2Norm_MultiFab (N_Vector x, N_Vector w)
 
amrex::Real N_VL1Norm_MultiFab (N_Vector x)
 
void N_VCompare_MultiFab (amrex::Real a, N_Vector x, N_Vector z)
 
int N_VInvTest_MultiFab (N_Vector x, N_Vector z)
 
int N_VConstrMask_MultiFab (N_Vector a_a, N_Vector a_x, N_Vector a_m)
 
amrex::Real N_VMinQuotient_MultiFab (N_Vector a_num, N_Vector a_denom)
 
void Initialize (int nthreads)
 Initialize the AMReX-SUNDIALS interface. More...
 
void Finalize ()
 Cleanup everything allocated for the AMReX-SUNDIALS interface. More...
 
::sundials::Context * The_Sundials_Context (int i=amrex::OpenMP::get_thread_num())
 Get the i-th SUNDIALS context instance. More...
 
MemoryHelperThe_SUNMemory_Helper (int i=amrex::OpenMP::get_thread_num())
 Get the i-th SUNMemoryHelper instance. More...
 
amrex::ArenagetArena (SUNMemoryType type)
 Get the proper amrex::Arena based on the SUNMemoryType. More...
 

Function Documentation

◆ Finalize()

void amrex::sundials::Finalize ( )

Cleanup everything allocated for the AMReX-SUNDIALS interface.

Called by amrex::Finalize.

◆ getArena()

amrex::Arena* amrex::sundials::getArena ( SUNMemoryType  type)

Get the proper amrex::Arena based on the SUNMemoryType.

Parameters
[in]typeA SUNDIALS SUNMemoryType.

◆ getMFptr()

amrex::MultiFab*& amrex::sundials::getMFptr ( N_Vector  v)

◆ Initialize()

void amrex::sundials::Initialize ( int  nthreads)

Initialize the AMReX-SUNDIALS interface.

Parameters
[in]nthreadsThe number of threads that will be used with SUNDIALS.

This will create the nthreads SUNDIALS context objects that are needed by the SUNDIALS solver and vector objects. Called by amrex::Initialize.

◆ N_VAbs_MultiFab()

void amrex::sundials::N_VAbs_MultiFab ( N_Vector  x,
N_Vector  z 
)

◆ N_VAddConst_MultiFab()

void amrex::sundials::N_VAddConst_MultiFab ( N_Vector  x,
amrex::Real  b,
N_Vector  z 
)

◆ N_VClone_MultiFab()

N_Vector amrex::sundials::N_VClone_MultiFab ( N_Vector  w)

◆ N_VCloneEmpty_MultiFab()

N_Vector amrex::sundials::N_VCloneEmpty_MultiFab ( N_Vector  w)

◆ N_VCompare_MultiFab()

void amrex::sundials::N_VCompare_MultiFab ( amrex::Real  a,
N_Vector  x,
N_Vector  z 
)

◆ N_VConst_MultiFab()

void amrex::sundials::N_VConst_MultiFab ( amrex::Real  c,
N_Vector  z 
)

◆ N_VConstrMask_MultiFab()

int amrex::sundials::N_VConstrMask_MultiFab ( N_Vector  a_a,
N_Vector  a_x,
N_Vector  a_m 
)

◆ N_VDestroy_MultiFab()

void amrex::sundials::N_VDestroy_MultiFab ( N_Vector  v)

◆ N_VDiv_MultiFab()

void amrex::sundials::N_VDiv_MultiFab ( N_Vector  x,
N_Vector  y,
N_Vector  z 
)

◆ N_VDotProd_MultiFab()

amrex::Real amrex::sundials::N_VDotProd_MultiFab ( N_Vector  x,
N_Vector  y 
)

◆ N_VGetContent_MultiFab()

N_VectorContent_MultiFab amrex::sundials::N_VGetContent_MultiFab ( N_Vector  v)

◆ N_VGetLength_MultiFab()

sunindextype amrex::sundials::N_VGetLength_MultiFab ( N_Vector  v)

◆ N_VGetOwnMF_MultiFab()

int amrex::sundials::N_VGetOwnMF_MultiFab ( N_Vector  v)

◆ N_VGetVectorAlias_MultiFab()

amrex::MultiFab amrex::sundials::N_VGetVectorAlias_MultiFab ( N_Vector  v)

◆ N_VGetVectorPointer_MultiFab()

amrex::MultiFab* amrex::sundials::N_VGetVectorPointer_MultiFab ( N_Vector  v)

◆ N_VInv_MultiFab()

void amrex::sundials::N_VInv_MultiFab ( N_Vector  x,
N_Vector  z 
)

◆ N_VInvTest_MultiFab()

int amrex::sundials::N_VInvTest_MultiFab ( N_Vector  x,
N_Vector  z 
)

◆ N_VL1Norm_MultiFab()

amrex::Real amrex::sundials::N_VL1Norm_MultiFab ( N_Vector  x)

◆ N_VLinearSum_MultiFab()

void amrex::sundials::N_VLinearSum_MultiFab ( amrex::Real  a,
N_Vector  x,
amrex::Real  b,
N_Vector  y,
N_Vector  z 
)

◆ N_VMake_MultiFab()

N_Vector amrex::sundials::N_VMake_MultiFab ( sunindextype  length,
amrex::MultiFab v_mf,
::sundials::Context *  sunctx 
)

◆ N_VMaxNorm_MultiFab()

amrex::Real amrex::sundials::N_VMaxNorm_MultiFab ( N_Vector  x)

◆ N_VMin_MultiFab()

amrex::Real amrex::sundials::N_VMin_MultiFab ( N_Vector  x)

◆ N_VMinQuotient_MultiFab()

amrex::Real amrex::sundials::N_VMinQuotient_MultiFab ( N_Vector  a_num,
N_Vector  a_denom 
)

◆ N_VNew_MultiFab()

N_Vector amrex::sundials::N_VNew_MultiFab ( sunindextype  length,
const amrex::BoxArray ba,
const amrex::DistributionMapping dm,
sunindextype  nComp,
sunindextype  nGhost,
::sundials::Context *  sunctx 
)

◆ N_VNewEmpty_MultiFab()

N_Vector amrex::sundials::N_VNewEmpty_MultiFab ( sunindextype  length,
::sundials::Context *  sunctx 
)

◆ N_VProd_MultiFab()

void amrex::sundials::N_VProd_MultiFab ( N_Vector  x,
N_Vector  y,
N_Vector  z 
)

◆ N_VScale_MultiFab()

void amrex::sundials::N_VScale_MultiFab ( amrex::Real  c,
N_Vector  x,
N_Vector  z 
)

◆ N_VSetOwnMF_MultiFab()

void amrex::sundials::N_VSetOwnMF_MultiFab ( N_Vector  v,
int  own_mf_in 
)

◆ N_VSpace_MultiFab()

void amrex::sundials::N_VSpace_MultiFab ( N_Vector  v,
sunindextype *  lrw,
sunindextype *  liw 
)

◆ N_VWL2Norm_MultiFab()

amrex::Real amrex::sundials::N_VWL2Norm_MultiFab ( N_Vector  x,
N_Vector  w 
)

◆ N_VWrmsNorm_MultiFab()

amrex::Real amrex::sundials::N_VWrmsNorm_MultiFab ( N_Vector  x,
N_Vector  w 
)

◆ N_VWrmsNormMask_MultiFab()

amrex::Real amrex::sundials::N_VWrmsNormMask_MultiFab ( N_Vector  x,
N_Vector  w,
N_Vector  id 
)

◆ NormHelper_NVector_MultiFab()

amrex::Real amrex::sundials::NormHelper_NVector_MultiFab ( N_Vector  a_x,
N_Vector  a_w,
N_Vector  id,
int  use_id,
bool  rms 
)

◆ The_Sundials_Context()

sundials::Context * amrex::sundials::The_Sundials_Context ( int  i = amrex::OpenMP::get_thread_num())

Get the i-th SUNDIALS context instance.

Parameters
[in]iThe index of the SUNDIALS context to return.

A SUNDIALS context should not be used concurrently from different threads.

◆ The_SUNMemory_Helper()

MemoryHelper * amrex::sundials::The_SUNMemory_Helper ( int  i = amrex::OpenMP::get_thread_num())

Get the i-th SUNMemoryHelper instance.

Parameters
[in]iThe index of the SUNMemoryHelper to return.

SUNMemoryHelper_i is paired with the i-th SUNContext.