ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
PlaneSampler Struct Reference

#include <ERF_SampleData.H>

Collaboration diagram for PlaneSampler:

Public Member Functions

 PlaneSampler ()
 
amrex::Box getIndexBox (const amrex::RealBox &real_box, const amrex::Geometry &geom)
 
void get_sample_data (amrex::Vector< amrex::Geometry > &geom, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_new)
 
void write_sample_data (amrex::Vector< double > &time, amrex::Vector< int > &level_steps, amrex::Vector< amrex::IntVect > &ref_ratio, amrex::Vector< amrex::Geometry > &geom)
 

Public Attributes

int m_max_level = -1
 
amrex::Vector< int > m_dir
 
amrex::Vector< amrex::RealBox > m_bnd_rbx
 
amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > m_ps_mf
 
amrex::Vector< std::string > m_name
 
amrex::Vector< std::string > m_varnames {"magvel","theta"}
 

Constructor & Destructor Documentation

◆ PlaneSampler()

PlaneSampler::PlaneSampler ( )
inline
684  {
685  amrex::ParmParse pp("erf");
686 
687  // Count number of lo and hi points define the plane
688  int n_plane_lo = pp.countval("sample_plane_lo") / AMREX_SPACEDIM;
689  int n_plane_hi = pp.countval("sample_plane_hi") / AMREX_SPACEDIM;
690  int n_plane_dir = pp.countval("sample_plane_dir");
691  AMREX_ALWAYS_ASSERT( (n_plane_lo==n_plane_hi ) &&
692  (n_plane_lo==n_plane_dir) );
693 
694  // Parse the data
695  if (n_plane_lo > 0) {
696  // Parse lo
697  amrex::Vector<amrex::Real> r_lo; r_lo.resize(n_plane_lo*AMREX_SPACEDIM);
698  amrex::Vector<amrex::Vector<amrex::Real>> rv_lo;
699  pp.queryarr("sample_plane_lo",r_lo,0,n_plane_lo*AMREX_SPACEDIM);
700  for (int i(0); i < n_plane_lo; i++) {
701  amrex::Vector<amrex::Real> rv = {r_lo[AMREX_SPACEDIM*i+0],
702  r_lo[AMREX_SPACEDIM*i+1],
703  r_lo[AMREX_SPACEDIM*i+2]};
704  rv_lo.push_back(rv);
705  }
706 
707  // Parse hi
708  amrex::Vector<amrex::Real> r_hi; r_hi.resize(n_plane_hi*AMREX_SPACEDIM);
709  amrex::Vector<amrex::Vector<amrex::Real>> rv_hi;
710  pp.queryarr("sample_plane_hi",r_hi,0,n_plane_hi*AMREX_SPACEDIM);
711  for (int i(0); i < n_plane_hi; i++) {
712  amrex::Vector<amrex::Real> rv = {r_hi[AMREX_SPACEDIM*i+0],
713  r_hi[AMREX_SPACEDIM*i+1],
714  r_hi[AMREX_SPACEDIM*i+2]};
715  rv_hi.push_back(rv);
716  }
717 
718  // Construct vector of bounding real boxes
719  m_bnd_rbx.resize(n_plane_lo);
720  for (int i(0); i < n_plane_hi; i++){
721  amrex::RealBox rbx(rv_lo[i].data(),rv_hi[i].data());
722  m_bnd_rbx[i] = rbx;
723  }
724 
725  // Parse directionality
726  m_dir.resize(n_plane_dir);
727  pp.queryarr("sample_plane_dir",m_dir,0,n_plane_dir);
728 
729  // Parse names
730  std::string name_base = "plt_plane_";
731  m_name.resize(n_plane_lo);
732  int n_names = pp.countval("sample_plane_name");
733  if (n_names > 0) {
734  AMREX_ALWAYS_ASSERT( n_names==n_plane_lo );
735  pp.queryarr("sample_plane_name",m_name,0,n_names);
736  } else {
737  for (int iplane(0); iplane<n_plane_lo; ++iplane) {
738  m_name[iplane] = amrex::Concatenate(name_base, iplane , 5);
739  }
740  }
741 
742  // Optional cap on the finest level written (-1 => all intersecting levels)
743  pp.queryAdd("plane_sampling_max_level", m_max_level);
744 
745  // Allocate per-plane vectors of per-level MF pointers
746  m_ps_mf.resize(n_plane_lo);
747 
748  // Get requested vars
749  if (pp.countval("plane_sampling_vars") > 0) {
750  m_varnames.clear();
751  amrex::Vector<std::string> requested_vars;
752  pp.queryarr("plane_sampling_vars",requested_vars);
753  amrex::Print() << "Selected plane sampling vars :";
754  if (containerHasElement(requested_vars, "density")) {
755  m_varnames.push_back("density");
756  amrex::Print() << " " << "density";
757  }
758  if (containerHasElement(requested_vars, "x_velocity")) {
759  m_varnames.push_back("x_velocity");
760  amrex::Print() << " " << "x_velocity";
761  }
762  if (containerHasElement(requested_vars, "y_velocity")) {
763  m_varnames.push_back("y_velocity");
764  amrex::Print() << " " << "y_velocity";
765  }
766  if (containerHasElement(requested_vars, "z_velocity")) {
767  m_varnames.push_back("z_velocity");
768  amrex::Print() << " " << "z_velocity";
769  }
770  if (containerHasElement(requested_vars, "magvel")) {
771  m_varnames.push_back("magvel");
772  amrex::Print() << " " << "magvel";
773  }
774  if (containerHasElement(requested_vars, "theta")) {
775  m_varnames.push_back("theta");
776  amrex::Print() << " " << "theta";
777  }
778  if (containerHasElement(requested_vars, "qv")) {
779  m_varnames.push_back("qv");
780  amrex::Print() << " " << "qv";
781  }
782  if (containerHasElement(requested_vars, "qc")) {
783  m_varnames.push_back("qc");
784  amrex::Print() << " " << "qc";
785  }
786  if (containerHasElement(requested_vars, "pressure")) {
787  m_varnames.push_back("pressure");
788  amrex::Print() << " " << "pressure";
789  }
790  amrex::Print() << std::endl;
791  }
792  }
793  }
bool containerHasElement(const V &iterable, const T &query)
Definition: ERF_Container.H:5
ParmParse pp("prob")
AMREX_ALWAYS_ASSERT(bx.length()[2]==khi+1)
amrex::Vector< int > m_dir
Definition: ERF_SampleData.H:1108
int m_max_level
Definition: ERF_SampleData.H:1107
amrex::Vector< std::string > m_name
Definition: ERF_SampleData.H:1111
amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > m_ps_mf
Definition: ERF_SampleData.H:1110
amrex::Vector< amrex::RealBox > m_bnd_rbx
Definition: ERF_SampleData.H:1109
amrex::Vector< std::string > m_varnames
Definition: ERF_SampleData.H:1113
Here is the call graph for this function:

Member Function Documentation

◆ get_sample_data()

void PlaneSampler::get_sample_data ( amrex::Vector< amrex::Geometry > &  geom,
amrex::Vector< amrex::Vector< amrex::MultiFab >> &  vars_new 
)
inline
815  {
816  int nlev = static_cast<int>(vars_new.size());
817  int nplane = static_cast<int>(m_bnd_rbx.size());
818  int ncomp = static_cast<int>(m_varnames.size());
819  bool interpolate = true;
820 
821  int qv_comp = -1;
822 
823  // Loop over each plane
824  for (int iplane(0); iplane<nplane; ++iplane) {
825  int dir = m_dir[iplane];
826  amrex::RealBox bnd_rbx = m_bnd_rbx[iplane];
827  amrex::Real point = bnd_rbx.lo(dir);
828 
829  // Collect every level 0..lev_cap whose grids intersect the plane.
830  int lev_cap = (m_max_level >= 0 && m_max_level < nlev-1) ? m_max_level : nlev-1;
831  m_ps_mf[iplane].clear();
832 
833  for (int ilev(0); ilev<=lev_cap; ++ilev) {
834 
835  // Stop ascending once a level's grids no longer touch the flattened plane
836  {
837  amrex::Box plane_bx = getIndexBox(bnd_rbx, geom[ilev]);
838  int k_l = static_cast<int>(std::floor((point - geom[ilev].ProbLo(dir))
839  / geom[ilev].CellSize(dir)));
840  plane_bx.setSmall(dir, k_l); plane_bx.setBig(dir, k_l);
841  if (!vars_new[ilev][Vars::cons].boxArray().intersects(plane_bx)) { break; }
842  }
843 
844  // Construct CC velocities
845  amrex::MultiFab mf_cc_vel;
846  auto ba = vars_new[ilev][Vars::cons].boxArray();
847  auto dm = vars_new[ilev][Vars::cons].DistributionMap();
848  mf_cc_vel.define(ba, dm, AMREX_SPACEDIM, amrex::IntVect(1,1,1));
849  average_face_to_cellcenter(mf_cc_vel,0,
850  amrex::Array<const amrex::MultiFab*,3>{&vars_new[ilev][Vars::xvel],
851  &vars_new[ilev][Vars::yvel],
852  &vars_new[ilev][Vars::zvel]});
853 
854  // Construct MultiFab holding requested variables
855  amrex::MultiFab mf_cc_data;
856  mf_cc_data.define(ba, dm, ncomp, 1);
857 
858  int mf_comp = 0;
859 
860  if (containerHasElement(m_varnames, "density")) {
861  amrex::MultiFab::Copy(mf_cc_data, vars_new[ilev][Vars::cons], Rho_comp, mf_comp, 1, 0);
862  mf_comp += 1;
863  }
864 
865  if (containerHasElement(m_varnames, "x_velocity")) {
866  amrex::MultiFab::Copy(mf_cc_data, mf_cc_vel, 0, mf_comp, 1, 0);
867  mf_comp += 1;
868  }
869  if (containerHasElement(m_varnames, "y_velocity")) {
870  amrex::MultiFab::Copy(mf_cc_data, mf_cc_vel, 1, mf_comp, 1, 0);
871  mf_comp += 1;
872  }
873  if (containerHasElement(m_varnames, "z_velocity")) {
874  amrex::MultiFab::Copy(mf_cc_data, mf_cc_vel, 2, mf_comp, 1, 0);
875  mf_comp += 1;
876  }
877 
878  if (containerHasElement(m_varnames, "magvel")) {
879 #ifdef _OPENMP
880 #pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
881 #endif
882  for (amrex::MFIter mfi(mf_cc_data, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) {
883  const amrex::Box& tbx = mfi.tilebox();
884  auto const& dfab = mf_cc_data.array(mfi);
885  auto const& vfab = mf_cc_vel.array(mfi);
886 
887  amrex::ParallelFor(tbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
888  {
889  dfab(i,j,k,mf_comp) = std::sqrt(vfab(i,j,k,0)*vfab(i,j,k,0)
890  + vfab(i,j,k,1)*vfab(i,j,k,1)
891  + vfab(i,j,k,2)*vfab(i,j,k,2));
892  });
893  }
894  mf_comp += 1;
895  }
896 
897  if (containerHasElement(m_varnames, "theta")) {
898 #ifdef _OPENMP
899 #pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
900 #endif
901  for (amrex::MFIter mfi(mf_cc_data, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) {
902  const amrex::Box& tbx = mfi.tilebox();
903  auto const& dfab = mf_cc_data.array(mfi);
904  auto const& cfab = vars_new[ilev][Vars::cons].array(mfi);
905 
906  amrex::ParallelFor(tbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
907  {
908  dfab(i,j,k,mf_comp) = cfab(i,j,k,RhoTheta_comp) / cfab(i,j,k,Rho_comp);
909  });
910  }
911  mf_comp += 1;
912  }
913 
914  if (containerHasElement(m_varnames, "qv")) {
915  AMREX_ALWAYS_ASSERT_WITH_MESSAGE(vars_new[ilev][Vars::cons].nComp() > RhoQ1_comp,
916  "qv sampling requested but moisture components not present in state");
917  if (qv_comp >= 0) AMREX_ALWAYS_ASSERT(qv_comp == mf_comp);
918  qv_comp = mf_comp;
919 #ifdef _OPENMP
920 #pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
921 #endif
922  for (amrex::MFIter mfi(mf_cc_data, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) {
923  const amrex::Box& tbx = mfi.tilebox();
924  auto const& dfab = mf_cc_data.array(mfi);
925  auto const& cfab = vars_new[ilev][Vars::cons].array(mfi);
926 
927  amrex::ParallelFor(tbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
928  {
929  dfab(i,j,k,mf_comp) = cfab(i,j,k,RhoQ1_comp) / cfab(i,j,k,Rho_comp);
930  });
931  }
932  mf_comp += 1;
933  }
934  if (containerHasElement(m_varnames, "qc")) {
935  AMREX_ALWAYS_ASSERT_WITH_MESSAGE(vars_new[ilev][Vars::cons].nComp() > RhoQ2_comp,
936  "qc sampling requested but moisture components not present in state");
937 #ifdef _OPENMP
938 #pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
939 #endif
940  for (amrex::MFIter mfi(mf_cc_data, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) {
941  const amrex::Box& tbx = mfi.tilebox();
942  auto const& dfab = mf_cc_data.array(mfi);
943  auto const& cfab = vars_new[ilev][Vars::cons].array(mfi);
944 
945  amrex::ParallelFor(tbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
946  {
947  dfab(i,j,k,mf_comp) = cfab(i,j,k,RhoQ2_comp) / cfab(i,j,k,Rho_comp);
948  });
949  }
950  mf_comp += 1;
951  }
952 
953  if (containerHasElement(m_varnames, "pressure")) {
954  if (vars_new[ilev][Vars::cons].nComp() > RhoQ1_comp) {
955  // moist pressure: use qv from dfab if already sampled, else compute inline
956 #ifdef _OPENMP
957 #pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
958 #endif
959  for (amrex::MFIter mfi(mf_cc_data, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) {
960  const amrex::Box& tbx = mfi.tilebox();
961  auto const& dfab = mf_cc_data.array(mfi);
962  auto const& cfab = vars_new[ilev][Vars::cons].array(mfi);
963 
964  amrex::ParallelFor(tbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
965  {
966  amrex::Real qv_val = (qv_comp >= 0) ? dfab(i,j,k,qv_comp)
967  : cfab(i,j,k,RhoQ1_comp) / cfab(i,j,k,Rho_comp);
968  dfab(i,j,k,mf_comp) = getPgivenRTh(cfab(i,j,k,RhoTheta_comp), qv_val);
969  });
970  }
971  } else {
972  // dry pressure
973 #ifdef _OPENMP
974 #pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
975 #endif
976  for (amrex::MFIter mfi(mf_cc_data, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) {
977  const amrex::Box& tbx = mfi.tilebox();
978  auto const& dfab = mf_cc_data.array(mfi);
979  auto const& cfab = vars_new[ilev][Vars::cons].array(mfi);
980 
981  amrex::ParallelFor(tbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
982  {
983  dfab(i,j,k,mf_comp) = getPgivenRTh(cfab(i,j,k,RhoTheta_comp));
984  });
985  }
986  }
987  mf_comp += 1;
988  }
989 
990  auto slice = get_slice_data(dir, point, mf_cc_data, geom[ilev],
991  0, ncomp, interpolate, bnd_rbx);
992 
993  // Defensive: an empty return means nothing was actually sampled.
994  if (!slice || slice->boxArray().size() == 0) { break; }
995 
996  // Broadcast the single sampled plane across 2^ilev cells in dir so
997  // every level shares an isotropic refinement ratio. The dir extent
998  // becomes [0, 2^ilev-1]; each cell holds the interpolated plane value
999  // replicated across the shared level-0 slab thickness.
1000  const int rr_l = 1 << ilev;
1001  const int k_slice = slice->boxArray().minimalBox().smallEnd(dir);
1002  const int l_dir = dir;
1003 
1004  amrex::BoxList bl;
1005  const amrex::BoxArray& slice_ba = slice->boxArray();
1006  for (int ib(0); ib<static_cast<int>(slice_ba.size()); ++ib) {
1007  amrex::Box b = slice_ba[ib];
1008  b.setSmall(dir, 0);
1009  b.setBig(dir, rr_l - 1);
1010  bl.push_back(b);
1011  }
1012  amrex::BoxArray out_ba(std::move(bl));
1013  auto out_mf = std::make_unique<amrex::MultiFab>(out_ba, slice->DistributionMap(),
1014  ncomp, 0);
1015 
1016  for (amrex::MFIter mfi(*out_mf); mfi.isValid(); ++mfi) {
1017  const amrex::Box& obx = mfi.validbox();
1018  auto const& ofab = out_mf->array(mfi);
1019  auto const& sfab = slice->array(mfi);
1020  amrex::ParallelFor(obx, ncomp, [=] AMREX_GPU_DEVICE(int i, int j, int k, int n) noexcept
1021  {
1022  int si = i, sj = j, sk = k;
1023  if (l_dir == 0) { si = k_slice; }
1024  else if (l_dir == 1) { sj = k_slice; }
1025  else { sk = k_slice; }
1026  ofab(i,j,k,n) = sfab(si,sj,sk,n);
1027  });
1028  }
1029 
1030  m_ps_mf[iplane].push_back(std::move(out_mf));
1031 
1032  } // ilev
1033  }// iplane
1034  }
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getPgivenRTh(const amrex::Real rhotheta, const amrex::Real qv=amrex::Real(0))
Definition: ERF_EOS.H:81
#define Rho_comp
Definition: ERF_IndexDefines.H:39
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:40
#define RhoQ2_comp
Definition: ERF_IndexDefines.H:46
#define RhoQ1_comp
Definition: ERF_IndexDefines.H:45
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(m_cloud_chamber_config.active, "Cloud Chamber: initializer reached without a parsed configuration")
ParallelFor(fab_box, [=] AMREX_GPU_DEVICE(int i, int j, int k) { qrcuten_arr(i, j, k)=Real(0);qscuten_arr(i, j, k)=Real(0);qicuten_arr(i, j, k)=Real(0);})
amrex::Real Real
Definition: ERF_ShocInterface.H:19
@ xvel
Definition: ERF_IndexDefines.H:215
@ cons
Definition: ERF_IndexDefines.H:214
@ zvel
Definition: ERF_IndexDefines.H:217
@ yvel
Definition: ERF_IndexDefines.H:216
amrex::Box getIndexBox(const amrex::RealBox &real_box, const amrex::Geometry &geom)
Definition: ERF_SampleData.H:797
Here is the call graph for this function:

◆ getIndexBox()

amrex::Box PlaneSampler::getIndexBox ( const amrex::RealBox &  real_box,
const amrex::Geometry &  geom 
)
inline
798  {
799  amrex::IntVect slice_lo, slice_hi;
800 
801  AMREX_D_TERM(slice_lo[0]=static_cast<int>(std::floor((real_box.lo(0) - geom.ProbLo(0))/geom.CellSize(0)));,
802  slice_lo[1]=static_cast<int>(std::floor((real_box.lo(1) - geom.ProbLo(1))/geom.CellSize(1)));,
803  slice_lo[2]=static_cast<int>(std::floor((real_box.lo(2) - geom.ProbLo(2))/geom.CellSize(2))););
804 
805  AMREX_D_TERM(slice_hi[0]=static_cast<int>(std::floor((real_box.hi(0) - geom.ProbLo(0))/geom.CellSize(0)));,
806  slice_hi[1]=static_cast<int>(std::floor((real_box.hi(1) - geom.ProbLo(1))/geom.CellSize(1)));,
807  slice_hi[2]=static_cast<int>(std::floor((real_box.hi(2) - geom.ProbLo(2))/geom.CellSize(2))););
808 
809  return amrex::Box(slice_lo, slice_hi) & geom.Domain();
810  }

Referenced by get_sample_data(), and write_sample_data().

Here is the caller graph for this function:

◆ write_sample_data()

void PlaneSampler::write_sample_data ( amrex::Vector< double > &  time,
amrex::Vector< int > &  level_steps,
amrex::Vector< amrex::IntVect > &  ref_ratio,
amrex::Vector< amrex::Geometry > &  geom 
)
inline
1041  {
1042  amrex::ignore_unused(ref_ratio);
1043  int nplane = m_ps_mf.size();
1044  for (int iplane(0); iplane<nplane; ++iplane) {
1045  int nlev_c = static_cast<int>(m_ps_mf[iplane].size());
1046  if (nlev_c == 0) { continue; }
1047 
1048  int dir = m_dir[iplane];
1049  amrex::RealBox bnd_rbx = m_bnd_rbx[iplane];
1050  amrex::Real point = bnd_rbx.lo(dir);
1051 
1052  // One shared physical RealBox for every level: full in-plane extent of the
1053  // requested plane, and a dir-slab of level-0 thickness centered on the plane.
1054  // Level 0 supplies prob_lo/hi to the writer, so this object must be shared.
1055  amrex::Real dx0 = geom[0].CellSize(dir);
1056  amrex::RealBox shared_rbx = bnd_rbx;
1057  shared_rbx.setLo(dir, point - myhalf*dx0);
1058  shared_rbx.setHi(dir, point + myhalf*dx0);
1059 
1060  amrex::Vector<int> is_per(AMREX_SPACEDIM,0);
1061  for (int d(0); d<AMREX_SPACEDIM; ++d) { is_per[d] = geom[0].isPeriodic(d); }
1062 
1063  // Build the index chain by refining the level-0 plane box so that
1064  // Domain_l == refine(Domain_{l-1},2) holds exactly in every axis.
1065  amrex::Box B0 = getIndexBox(bnd_rbx, geom[0]);
1066 
1067  amrex::Vector<const amrex::MultiFab*> mf(nlev_c);
1068  amrex::Vector<amrex::Geometry> m_geom(nlev_c);
1069  amrex::Vector<int> m_level_steps(nlev_c);
1070  amrex::Vector<amrex::IntVect> m_ref_ratio(nlev_c-1, amrex::IntVect(2));
1071 
1072  for (int l(0); l<nlev_c; ++l) {
1073  const int rr_l = 1 << l;
1074 
1075  // The nested plane plotfile stores a single scalar refinement
1076  // ratio per level, so multi-level output requires factor-2
1077  // isotropic refinement.
1078  for (int d(0); d<AMREX_SPACEDIM; ++d) {
1079  amrex::Real ratio = geom[0].CellSize(d) / geom[l].CellSize(d);
1081  std::abs(ratio - static_cast<amrex::Real>(rr_l)) < amrex::Real(1.e-6) * rr_l,
1082  "PlaneSampler multi-level output requires factor-2 isotropic refinement (amr.ref_ratio = 2 2 2)");
1083  }
1084 
1085  amrex::Box domain_l = amrex::refine(B0, rr_l);
1086  domain_l.setSmall(dir, 0);
1087  domain_l.setBig(dir, rr_l - 1);
1088 
1089  mf[l] = m_ps_mf[iplane][l].get();
1090  m_geom[l].define(domain_l, &shared_rbx, geom[l].Coord(), is_per.data());
1091  m_level_steps[l] = level_steps[l];
1092  AMREX_ASSERT(domain_l.contains(mf[l]->boxArray().minimalBox()));
1093  }
1094 
1095  // Create plotfile name
1096  std::string name_plane = m_name[iplane];
1097  name_plane += "_step_";
1098  std::string plotfilename = amrex::Concatenate(name_plane, m_level_steps[0], 5);
1099 
1100  // Write the nested multi-level plane plotfile
1101  WriteMultiLevelPlotfile(plotfilename, nlev_c, mf,
1102  m_varnames, m_geom, static_cast<amrex::Real>(time[0]),
1103  m_level_steps, m_ref_ratio);
1104  } // iplane
1105  }
constexpr amrex::Real myhalf
Definition: ERF_Constants.H:13
Coord
Coordinate-axis selector.
Definition: ERF_DataStruct.H:144
Here is the call graph for this function:

Member Data Documentation

◆ m_bnd_rbx

amrex::Vector<amrex::RealBox> PlaneSampler::m_bnd_rbx

◆ m_dir

amrex::Vector<int> PlaneSampler::m_dir

◆ m_max_level

int PlaneSampler::m_max_level = -1

Referenced by get_sample_data(), and PlaneSampler().

◆ m_name

amrex::Vector<std::string> PlaneSampler::m_name

Referenced by PlaneSampler(), and write_sample_data().

◆ m_ps_mf

amrex::Vector<amrex::Vector<std::unique_ptr<amrex::MultiFab> > > PlaneSampler::m_ps_mf

◆ m_varnames

amrex::Vector<std::string> PlaneSampler::m_varnames {"magvel","theta"}

The documentation for this struct was generated from the following file: