Athena++/Atmosphere
Planetary Atmosphere Simulator
MeshBlock Class Reference

#include <mesh.hpp>

Public Member Functions

 MeshBlock (int igid, int ilid, LogicalLocation iloc, RegionSize input_size, BoundaryFlag *input_bcs, Mesh *pm, ParameterInput *pin, int igflag, bool ref_flag=false)
 
 MeshBlock (int igid, int ilid, Mesh *pm, ParameterInput *pin, LogicalLocation iloc, RegionSize input_block, BoundaryFlag *input_bcs, double icost, char *mbdata, int igflag)
 
 ~MeshBlock ()
 
std::size_t GetBlockSizeInBytes ()
 
int GetNumberOfMeshBlockCells ()
 
void SearchAndSetNeighbors (MeshBlockTree &tree, int *ranklist, int *nslist)
 
void WeightedAve (AthenaArray< Real > &u_out, AthenaArray< Real > &u_in1, AthenaArray< Real > &u_in2, const Real wght[3])
 
void WeightedAve (FaceField &b_out, FaceField &b_in1, FaceField &b_in2, const Real wght[3])
 
void FindNeighbors (CoordinateDirection dir, NeighborBlock &bblock, NeighborBlock &tblock)
 
void RegisterMeshBlockData (AthenaArray< Real > &pvar_cc)
 
void RegisterMeshBlockData (FaceField &pvar_fc)
 
void UserWorkBeforeOutput (ParameterInput *pin)
 
void UserWorkInLoop ()
 

Public Attributes

Meshpmy_mesh
 
LogicalLocation loc
 
RegionSize block_size
 
int ncells1
 
int ncells2
 
int ncells3
 
int ncc1
 
int ncc2
 
int ncc3
 
int is
 
int ie
 
int js
 
int je
 
int ks
 
int ke
 
int gid
 
int lid
 
int cis
 
int cie
 
int cjs
 
int cje
 
int cks
 
int cke
 
int cnghost
 
int gflag
 
Real stage_abscissae [MAX_NSTAGE+1][MAX_NREGISTER]
 
int nuser_out_var
 
AthenaArray< Realuser_out_var
 
std::string * user_out_var_names_
 
std::string * user_out_var_longnames_
 
std::string * user_out_var_units_
 
AthenaArray< Real > * ruser_meshblock_data
 
AthenaArray< int > * iuser_meshblock_data
 
Coordinatespcoord
 
BoundaryValuespbval
 
Reconstructionprecon
 
MeshRefinement * pmr
 
Hydrophydro
 
Field * pfield
 
Gravity * pgrav
 
MGGravity * pmg
 
PassiveScalarspscalars
 
EquationOfStatepeos
 
Thermodynamicspthermo
 
Chemistry * pchem
 
Radiationprad
 
Physics * pphy
 
Diagnosticspdiag
 
Debugger * pdebug
 
Particles * ppart
 
Inversion * pfit
 
Communicator * pcomm
 
MeshBlockprev
 
MeshBlocknext
 

Private Member Functions

void AllocateRealUserMeshBlockDataField (int n)
 
void AllocateIntUserMeshBlockDataField (int n)
 
void AllocateUserOutputVariables (int n)
 
void SetUserOutputVariableName (int n, const char *name, const char *long_name="", const char *units="")
 
void SetCostForLoadBalancing (double cost)
 
void ProblemGenerator (ParameterInput *pin)
 
void InitUserMeshBlockData (ParameterInput *pin)
 
void ResetTimeMeasurement ()
 
void StartTimeMeasurement ()
 
void StopTimeMeasurement ()
 

Private Attributes

Real new_block_dt_
 
Real new_block_dt_hyperbolic_
 
Real new_block_dt_parabolic_
 
Real new_block_dt_user_
 
TaskStates tasks
 
int nreal_user_meshblock_data_
 
int nint_user_meshblock_data_
 
std::vector< std::reference_wrapper< AthenaArray< Real > > > vars_cc_
 
std::vector< std::reference_wrapper< FaceField > > vars_fc_
 
double cost_
 
double lb_time_
 

Friends

class RestartOutput
 
class BoundaryValues
 
class CellCenteredBoundaryVariable
 
class FaceCenteredBoundaryVariable
 
class Mesh
 
class Hydro
 
class TaskList
 

Detailed Description

Definition at line 70 of file mesh.hpp.

Constructor & Destructor Documentation

◆ MeshBlock() [1/2]

MeshBlock::MeshBlock ( int  igid,
int  ilid,
LogicalLocation  iloc,
RegionSize  input_size,
BoundaryFlag *  input_bcs,
Mesh pm,
ParameterInput pin,
int  igflag,
bool  ref_flag = false 
)

Definition at line 55 of file meshblock.cpp.

◆ MeshBlock() [2/2]

MeshBlock::MeshBlock ( int  igid,
int  ilid,
Mesh pm,
ParameterInput pin,
LogicalLocation  iloc,
RegionSize  input_block,
BoundaryFlag *  input_bcs,
double  icost,
char *  mbdata,
int  igflag 
)

Definition at line 212 of file meshblock.cpp.

◆ ~MeshBlock()

MeshBlock::~MeshBlock ( )

Definition at line 411 of file meshblock.cpp.

Member Function Documentation

◆ GetBlockSizeInBytes()

std::size_t MeshBlock::GetBlockSizeInBytes ( )

Definition at line 545 of file meshblock.cpp.

◆ GetNumberOfMeshBlockCells()

int MeshBlock::GetNumberOfMeshBlockCells ( )
inline

Definition at line 149 of file mesh.hpp.

◆ SearchAndSetNeighbors()

void MeshBlock::SearchAndSetNeighbors ( MeshBlockTree &  tree,
int *  ranklist,
int *  nslist 
)

◆ WeightedAve() [1/2]

void MeshBlock::WeightedAve ( AthenaArray< Real > &  u_out,
AthenaArray< Real > &  u_in1,
AthenaArray< Real > &  u_in2,
const Real  wght[3] 
)

Definition at line 24 of file weighted_ave.cpp.

◆ WeightedAve() [2/2]

void MeshBlock::WeightedAve ( FaceField b_out,
FaceField b_in1,
FaceField b_in2,
const Real  wght[3] 
)

Definition at line 151 of file weighted_ave.cpp.

◆ FindNeighbors()

void MeshBlock::FindNeighbors ( CoordinateDirection  dir,
NeighborBlock &  bblock,
NeighborBlock &  tblock 
)

Definition at line 12 of file meshblock_additions.cpp.

◆ RegisterMeshBlockData() [1/2]

void MeshBlock::RegisterMeshBlockData ( AthenaArray< Real > &  pvar_cc)

Definition at line 629 of file meshblock.cpp.

◆ RegisterMeshBlockData() [2/2]

void MeshBlock::RegisterMeshBlockData ( FaceField pvar_fc)

Definition at line 635 of file meshblock.cpp.

◆ UserWorkBeforeOutput()

void MeshBlock::UserWorkBeforeOutput ( ParameterInput pin)

◆ UserWorkInLoop()

void MeshBlock::UserWorkInLoop ( )

◆ AllocateRealUserMeshBlockDataField()

void MeshBlock::AllocateRealUserMeshBlockDataField ( int  n)
private

Definition at line 471 of file meshblock.cpp.

◆ AllocateIntUserMeshBlockDataField()

void MeshBlock::AllocateIntUserMeshBlockDataField ( int  n)
private

Definition at line 487 of file meshblock.cpp.

◆ AllocateUserOutputVariables()

void MeshBlock::AllocateUserOutputVariables ( int  n)
private

Definition at line 504 of file meshblock.cpp.

◆ SetUserOutputVariableName()

void MeshBlock::SetUserOutputVariableName ( int  n,
const char *  name,
const char *  long_name = "",
const char *  units = "" 
)
private

Definition at line 526 of file meshblock.cpp.

◆ SetCostForLoadBalancing()

void MeshBlock::SetCostForLoadBalancing ( double  cost)
private

Definition at line 584 of file meshblock.cpp.

◆ ProblemGenerator()

void MeshBlock::ProblemGenerator ( ParameterInput pin)
private

◆ InitUserMeshBlockData()

void MeshBlock::InitUserMeshBlockData ( ParameterInput pin)
private

◆ ResetTimeMeasurement()

void MeshBlock::ResetTimeMeasurement ( )
private

Definition at line 595 of file meshblock.cpp.

◆ StartTimeMeasurement()

void MeshBlock::StartTimeMeasurement ( )
private

Definition at line 603 of file meshblock.cpp.

◆ StopTimeMeasurement()

void MeshBlock::StopTimeMeasurement ( )
private

Definition at line 617 of file meshblock.cpp.

Friends And Related Function Documentation

◆ RestartOutput

friend class RestartOutput
friend

Definition at line 71 of file mesh.hpp.

◆ BoundaryValues

friend class BoundaryValues
friend

Definition at line 72 of file mesh.hpp.

◆ CellCenteredBoundaryVariable

friend class CellCenteredBoundaryVariable
friend

Definition at line 73 of file mesh.hpp.

◆ FaceCenteredBoundaryVariable

friend class FaceCenteredBoundaryVariable
friend

Definition at line 74 of file mesh.hpp.

◆ Mesh

friend class Mesh
friend

Definition at line 75 of file mesh.hpp.

◆ Hydro

friend class Hydro
friend

Definition at line 76 of file mesh.hpp.

◆ TaskList

friend class TaskList
friend

Definition at line 77 of file mesh.hpp.

Member Data Documentation

◆ pmy_mesh

Mesh* MeshBlock::pmy_mesh

Definition at line 92 of file mesh.hpp.

◆ loc

LogicalLocation MeshBlock::loc

Definition at line 93 of file mesh.hpp.

◆ block_size

RegionSize MeshBlock::block_size

Definition at line 94 of file mesh.hpp.

◆ ncells1

int MeshBlock::ncells1

Definition at line 97 of file mesh.hpp.

◆ ncells2

int MeshBlock::ncells2

Definition at line 97 of file mesh.hpp.

◆ ncells3

int MeshBlock::ncells3

Definition at line 97 of file mesh.hpp.

◆ ncc1

int MeshBlock::ncc1

Definition at line 99 of file mesh.hpp.

◆ ncc2

int MeshBlock::ncc2

Definition at line 99 of file mesh.hpp.

◆ ncc3

int MeshBlock::ncc3

Definition at line 99 of file mesh.hpp.

◆ is

int MeshBlock::is

Definition at line 100 of file mesh.hpp.

◆ ie

int MeshBlock::ie

Definition at line 100 of file mesh.hpp.

◆ js

int MeshBlock::js

Definition at line 100 of file mesh.hpp.

◆ je

int MeshBlock::je

Definition at line 100 of file mesh.hpp.

◆ ks

int MeshBlock::ks

Definition at line 100 of file mesh.hpp.

◆ ke

int MeshBlock::ke

Definition at line 100 of file mesh.hpp.

◆ gid

int MeshBlock::gid

Definition at line 101 of file mesh.hpp.

◆ lid

int MeshBlock::lid

Definition at line 101 of file mesh.hpp.

◆ cis

int MeshBlock::cis

Definition at line 102 of file mesh.hpp.

◆ cie

int MeshBlock::cie

Definition at line 102 of file mesh.hpp.

◆ cjs

int MeshBlock::cjs

Definition at line 102 of file mesh.hpp.

◆ cje

int MeshBlock::cje

Definition at line 102 of file mesh.hpp.

◆ cks

int MeshBlock::cks

Definition at line 102 of file mesh.hpp.

◆ cke

int MeshBlock::cke

Definition at line 102 of file mesh.hpp.

◆ cnghost

int MeshBlock::cnghost

Definition at line 102 of file mesh.hpp.

◆ gflag

int MeshBlock::gflag

Definition at line 103 of file mesh.hpp.

◆ stage_abscissae

Real MeshBlock::stage_abscissae[MAX_NSTAGE+1][MAX_NREGISTER]

Definition at line 108 of file mesh.hpp.

◆ nuser_out_var

int MeshBlock::nuser_out_var

Definition at line 111 of file mesh.hpp.

◆ user_out_var

AthenaArray<Real> MeshBlock::user_out_var

Definition at line 112 of file mesh.hpp.

◆ user_out_var_names_

std::string* MeshBlock::user_out_var_names_

Definition at line 113 of file mesh.hpp.

◆ user_out_var_longnames_

std::string* MeshBlock::user_out_var_longnames_

Definition at line 114 of file mesh.hpp.

◆ user_out_var_units_

std::string* MeshBlock::user_out_var_units_

Definition at line 115 of file mesh.hpp.

◆ ruser_meshblock_data

AthenaArray<Real>* MeshBlock::ruser_meshblock_data

Definition at line 118 of file mesh.hpp.

◆ iuser_meshblock_data

AthenaArray<int>* MeshBlock::iuser_meshblock_data

Definition at line 119 of file mesh.hpp.

◆ pcoord

Coordinates* MeshBlock::pcoord

Definition at line 122 of file mesh.hpp.

◆ pbval

BoundaryValues* MeshBlock::pbval

Definition at line 123 of file mesh.hpp.

◆ precon

Reconstruction* MeshBlock::precon

Definition at line 124 of file mesh.hpp.

◆ pmr

MeshRefinement* MeshBlock::pmr

Definition at line 125 of file mesh.hpp.

◆ phydro

Hydro* MeshBlock::phydro

Definition at line 128 of file mesh.hpp.

◆ pfield

Field* MeshBlock::pfield

Definition at line 129 of file mesh.hpp.

◆ pgrav

Gravity* MeshBlock::pgrav

Definition at line 130 of file mesh.hpp.

◆ pmg

MGGravity* MeshBlock::pmg

Definition at line 131 of file mesh.hpp.

◆ pscalars

PassiveScalars* MeshBlock::pscalars

Definition at line 132 of file mesh.hpp.

◆ peos

EquationOfState* MeshBlock::peos

Definition at line 133 of file mesh.hpp.

◆ pthermo

Thermodynamics* MeshBlock::pthermo

Definition at line 135 of file mesh.hpp.

◆ pchem

Chemistry* MeshBlock::pchem

Definition at line 136 of file mesh.hpp.

◆ prad

Radiation* MeshBlock::prad

Definition at line 137 of file mesh.hpp.

◆ pphy

Physics* MeshBlock::pphy

Definition at line 138 of file mesh.hpp.

◆ pdiag

Diagnostics* MeshBlock::pdiag

Definition at line 139 of file mesh.hpp.

◆ pdebug

Debugger* MeshBlock::pdebug

Definition at line 140 of file mesh.hpp.

◆ ppart

Particles* MeshBlock::ppart

Definition at line 141 of file mesh.hpp.

◆ pfit

Inversion* MeshBlock::pfit

Definition at line 142 of file mesh.hpp.

◆ pcomm

Communicator* MeshBlock::pcomm

Definition at line 143 of file mesh.hpp.

◆ prev

MeshBlock* MeshBlock::prev

Definition at line 145 of file mesh.hpp.

◆ next

MeshBlock * MeshBlock::next

Definition at line 145 of file mesh.hpp.

◆ new_block_dt_

Real MeshBlock::new_block_dt_
private

Definition at line 171 of file mesh.hpp.

◆ new_block_dt_hyperbolic_

Real MeshBlock::new_block_dt_hyperbolic_
private

Definition at line 171 of file mesh.hpp.

◆ new_block_dt_parabolic_

Real MeshBlock::new_block_dt_parabolic_
private

Definition at line 171 of file mesh.hpp.

◆ new_block_dt_user_

Real MeshBlock::new_block_dt_user_
private

Definition at line 172 of file mesh.hpp.

◆ tasks

TaskStates MeshBlock::tasks
private

Definition at line 175 of file mesh.hpp.

◆ nreal_user_meshblock_data_

int MeshBlock::nreal_user_meshblock_data_
private

Definition at line 176 of file mesh.hpp.

◆ nint_user_meshblock_data_

int MeshBlock::nint_user_meshblock_data_
private

Definition at line 176 of file mesh.hpp.

◆ vars_cc_

std::vector<std::reference_wrapper<AthenaArray<Real> > > MeshBlock::vars_cc_
private

Definition at line 177 of file mesh.hpp.

◆ vars_fc_

std::vector<std::reference_wrapper<FaceField> > MeshBlock::vars_fc_
private

Definition at line 178 of file mesh.hpp.

◆ cost_

double MeshBlock::cost_
private

Definition at line 193 of file mesh.hpp.

◆ lb_time_

double MeshBlock::lb_time_
private

Definition at line 193 of file mesh.hpp.


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