Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::ForkJoin Class Reference

#include <AMReX_ForkJoin.H>

Classes

struct  ComponentSet
 if strategy == split, use this to specify how to split components across tasks More...
 

Public Types

enum class  Strategy { single , duplicate , split }
 
enum class  Intent { in , out , inout }
 

Public Member Functions

 ForkJoin (const Vector< int > &task_rank_n)
 
 ForkJoin (const Vector< double > &task_rank_pct)
 
 ForkJoin (int ntasks)
 
int NTasks () const
 
int MyTask () const
 
bool Verbose () const
 
void SetVerbose (bool verbose_in)
 
ComponentSet ComponentBounds (const std::string &name, int idx=0) const
 
int NProcsTask (int task) const
 
void reg_mf (MultiFab &mf, const std::string &name, int idx, Strategy strategy, Intent intent, int owner=-1)
 
void reg_mf (MultiFab &mf, const std::string &name, Strategy strategy, Intent intent, int owner=-1)
 
void reg_mf (const MultiFab &mf, const std::string &name, int idx, Strategy strategy, Intent intent, int owner=-1)
 
void reg_mf (const MultiFab &mf, const std::string &name, Strategy strategy, Intent intent, int owner=-1)
 
void reg_mf_vec (const Vector< MultiFab * > &mfs, const std::string &name, Strategy strategy, Intent intent, int owner=-1)
 
void reg_mf_vec (const Vector< MultiFab const * > &mfs, const std::string &name, Strategy strategy, Intent intent, int owner=-1)
 overload in case of vector of pointer to const MultiFab
 
void modify_ngrow (const std::string &name, int idx, IntVect ngrow)
 modify the number of grow cells associated with the multifab
 
void modify_ngrow (const std::string &name, IntVect ngrow)
 
void modify_split (const std::string &name, int idx, Vector< ComponentSet > comp_split)
 modify how the multifab is split along components across the tasks
 
void modify_split (const std::string &name, Vector< ComponentSet > comp_split)
 
MultiFabget_mf (const std::string &name, int idx=0)
 
Vector< MultiFab * > get_mf_vec (const std::string &name)
 vector of pointers to all MFs under a name
 
void set_task_output_dir (const std::string &dir)
 
template<class F >
void fork_join (const F &fn)
 

Static Public Member Functions

static void set_task_output_file (const std::string &filename)
 

Member Enumeration Documentation

◆ Intent

enum class amrex::ForkJoin::Intent
strong
Enumerator
in 
out 
inout 

◆ Strategy

enum class amrex::ForkJoin::Strategy
strong
Enumerator
single 

one task gets a copy of whole MF

duplicate 

all tasks get a copy of whole MF

split 

split MF components across tasks

Constructor & Destructor Documentation

◆ ForkJoin() [1/3]

amrex::ForkJoin::ForkJoin ( const Vector< int > &  task_rank_n)

◆ ForkJoin() [2/3]

amrex::ForkJoin::ForkJoin ( const Vector< double > &  task_rank_pct)

◆ ForkJoin() [3/3]

amrex::ForkJoin::ForkJoin ( int  ntasks)
inline

Member Function Documentation

◆ ComponentBounds()

ForkJoin::ComponentSet amrex::ForkJoin::ComponentBounds ( const std::string &  name,
int  idx = 0 
) const

◆ fork_join()

template<class F >
void amrex::ForkJoin::fork_join ( const F fn)
inline

◆ get_mf()

MultiFab & amrex::ForkJoin::get_mf ( const std::string &  name,
int  idx = 0 
)
inline

◆ get_mf_vec()

Vector< MultiFab * > amrex::ForkJoin::get_mf_vec ( const std::string &  name)
inline

vector of pointers to all MFs under a name

◆ modify_ngrow() [1/2]

void amrex::ForkJoin::modify_ngrow ( const std::string &  name,
int  idx,
IntVect  ngrow 
)

modify the number of grow cells associated with the multifab

◆ modify_ngrow() [2/2]

void amrex::ForkJoin::modify_ngrow ( const std::string &  name,
IntVect  ngrow 
)
inline

◆ modify_split() [1/2]

void amrex::ForkJoin::modify_split ( const std::string &  name,
int  idx,
Vector< ComponentSet comp_split 
)

modify how the multifab is split along components across the tasks

◆ modify_split() [2/2]

void amrex::ForkJoin::modify_split ( const std::string &  name,
Vector< ComponentSet comp_split 
)
inline

◆ MyTask()

int amrex::ForkJoin::MyTask ( ) const
inline

◆ NProcsTask()

int amrex::ForkJoin::NProcsTask ( int  task) const
inline

◆ NTasks()

int amrex::ForkJoin::NTasks ( ) const
inline

◆ reg_mf() [1/4]

void amrex::ForkJoin::reg_mf ( const MultiFab mf,
const std::string &  name,
int  idx,
Strategy  strategy,
Intent  intent,
int  owner = -1 
)
inline

these overloads are for in case the MultiFab argument is const intent must be in

◆ reg_mf() [2/4]

void amrex::ForkJoin::reg_mf ( const MultiFab mf,
const std::string &  name,
Strategy  strategy,
Intent  intent,
int  owner = -1 
)
inline

◆ reg_mf() [3/4]

void amrex::ForkJoin::reg_mf ( MultiFab mf,
const std::string &  name,
int  idx,
Strategy  strategy,
Intent  intent,
int  owner = -1 
)

◆ reg_mf() [4/4]

void amrex::ForkJoin::reg_mf ( MultiFab mf,
const std::string &  name,
Strategy  strategy,
Intent  intent,
int  owner = -1 
)
inline

◆ reg_mf_vec() [1/2]

void amrex::ForkJoin::reg_mf_vec ( const Vector< MultiFab * > &  mfs,
const std::string &  name,
Strategy  strategy,
Intent  intent,
int  owner = -1 
)
inline

◆ reg_mf_vec() [2/2]

void amrex::ForkJoin::reg_mf_vec ( const Vector< MultiFab const * > &  mfs,
const std::string &  name,
Strategy  strategy,
Intent  intent,
int  owner = -1 
)
inline

overload in case of vector of pointer to const MultiFab

◆ set_task_output_dir()

void amrex::ForkJoin::set_task_output_dir ( const std::string &  dir)
inline

◆ set_task_output_file()

static void amrex::ForkJoin::set_task_output_file ( const std::string &  filename)
inlinestatic

◆ SetVerbose()

void amrex::ForkJoin::SetVerbose ( bool  verbose_in)
inline

◆ Verbose()

bool amrex::ForkJoin::Verbose ( ) const
inline

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