From a84fbf632a93310a6f9cfaded704b295df98599c Mon Sep 17 00:00:00 2001 From: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Date: Mon, 22 Jun 2020 17:57:36 -0700 Subject: New BTD class layout and member functions - Part 2 (#1092) * fixing bug to initialize CellCenterFunctor for Bx * create new BTB class and move FullDiagnostics functions from Diagnostics class * [skip ci] Adding BTDiag class members and allocating them * output_mf vector of buffers for both Full and BTD * [skip ci] a few comments * added more functions in BTDiagnostics for initialization * [skip-ci] a small comment abour FlushRawData * [skip-ci] Add new functor class for BTD * Included BTDiagnostics class and skeleton of functions to be populated * fix eol and make destructor of base Diag class virtual * remove redundant query file_prefix in FullDiag class * Apply suggestions from code review adding PR suggestions Co-authored-by: MaxThevenet * cleaning function calls and definitions as suggested in review * uncomment the assert. It is valid for FullDiag and BTDiag * Update Source/Diagnostics/Diagnostics.H adding PR suggestion including comments Co-authored-by: MaxThevenet * moved InitData to Diagnostics.cpp and call relevant functions from there * moving FilterComputeAndPack to Diagnostics * removing commented out code * remove gpu vector containing map of fields from cc_mf to dst_mf. New diag machinery ensures cc_mf.ncomp == dst_mf.ncomp * fix eol whitespace * populating Init functions in BTDiagnostics * DefineCellCenteredMultiFab should be called only once for all buffers * add Init functions and constructing BackTransform functor * call BackTransform operator which currently does nothing * EOL * average-down cc data to coarsest level * loop over level used to allocate output buffer * some comment about avg-down functions to be moved * EOL * Apply suggestions from code review add pr suggestions Co-authored-by: MaxThevenet * clarifying pure virtual and virtual functions * removing namespace amrex and adding corresponding amrex:: prefix * this should be nlev -- number of levels in the sim, not max allocated levels * the number of levels to be output could be different from nlev, nmax_lev * add missing semi-colon! * add amrex:: prefix to MultiFab to comile psatd * add new diag files to CMakeLists.txt * fix compiler errors. * add amrex:: prefix to fix psatd compilation error * some more conflicts * minor cleaning * EOL * flatten cc data using finestLevel() and use moving window dir * EOL * Apply suggestions from code review PR suggestions Co-authored-by: Axel Huebl * making it readable and adding comments * add missing semicolon Co-authored-by: MaxThevenet Co-authored-by: Axel Huebl --- Source/Diagnostics/ComputeDiagFunctors/BackTransformFunctor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Diagnostics/ComputeDiagFunctors/BackTransformFunctor.cpp') diff --git a/Source/Diagnostics/ComputeDiagFunctors/BackTransformFunctor.cpp b/Source/Diagnostics/ComputeDiagFunctors/BackTransformFunctor.cpp index 5b049a112..2d8651efe 100644 --- a/Source/Diagnostics/ComputeDiagFunctors/BackTransformFunctor.cpp +++ b/Source/Diagnostics/ComputeDiagFunctors/BackTransformFunctor.cpp @@ -1,7 +1,7 @@ #include "BackTransformFunctor.H" BackTransformFunctor::BackTransformFunctor(amrex::MultiFab const * mf_src, int lev, - int ncomp, amrex::IntVect crse_ratio) + const int ncomp, const amrex::IntVect crse_ratio) : ComputeDiagFunctor(ncomp, crse_ratio), m_mf_src(mf_src), m_lev(lev) { // Get the right slice of each field in the CC MultiFab, transform it and store it in the output. -- cgit v1.2.3