Beispiel #1
0
void Solve_Stokes(Element_List **V, Element_List **Vf, Bndry **Vbc,
                  Bsystem **Vbsys)
{

	static double *RHS = (double*)0;
	static double *U0  = (double*)0;
	static int nglob = 0;
	static int eDIM = V[0]->flist[0]->dim();

	if(Vbsys[eDIM]->nglobal > nglob)
	{
		if(nglob)
		{
			free(U0);
			free(RHS);
		}

		nglob = Vbsys[eDIM]->nglobal;
		RHS   = dvector(0,nglob-1);
		U0    = dvector(0,nglob-1);
	}

	dzero(nglob,U0,1);

	st = clock();
	/* ----------------------------*/
	/* Compute the Right-Hand Side */
	setupRHS(V, Vf, RHS, U0, Vbc, Vbsys);
	/*-----------------------------*/
	Timing("SetupRHS.......");

	/*-----------------------------*/
	/* Solve the boundary system   */
	solve_boundary(V, RHS, U0, Vbsys);
	/*-----------------------------*/
	Timing("Boundary.......");

	/*-----------------------------*/
	/* Solve the pressure system   */
	solve_pressure(V, RHS, Vbsys);
	/*-----------------------------*/
	Timing("Pressure.......");

	/*-----------------------------*/
	/* solve the Interior system   */
	solve_velocity_interior(V, Vbsys);
	/*-----------------------------*/
	Timing("VInterior......");

}
Beispiel #2
0
void CRunUpdate::SetValue(CParmUpdateDlg* pDlg)
{
   UpdateData(pDlg);
   PrepareParameters();
   CippsRun::CallIpp();
   Timing();
   SetHistory();
   UpdateData(pDlg,FALSE);
}
Beispiel #3
0
long Ultrasonic::Ranging()
{
    Timing();
    distacne_cm = duration /29 / 2 ;

    distacne_cm = duration;

    return distacne_cm;
}
Beispiel #4
0
void CRunCVNorm::SetValue(CParmCVNormDlg* pDlg)
{
   UpdateData(pDlg);
   PrepareParameters();
   if (CippiRun::CallIpp() < 0) return;
   Timing();
   SetHistory();
   UpdateData(pDlg,FALSE);
}
long Ultrasonic::Ranging(int sys)
{
  Timing();
  distacne_cm = duration /29 / 2 ;
  distance_inc = duration / 74 / 2;
  if (sys)
  return distacne_cm;
  else
  return distance_inc;
}
Beispiel #6
0
long HCSR04::Ranging(int sys)
{
    duration = Timing();
    if(duration >= 32000 || duration == 0)
        return -1;
    distacne_cm = duration /29 / 2 ;
    distance_inc = duration / 74 / 2;
    if (sys)
        return distacne_cm;
    else
        return distance_inc;
}
Beispiel #7
0
Vlasov::Vlasov(Grid *_grid, Parallel *_parallel, Setup *_setup, FileIO *fileIO, Geometry *_geo, FFTSolver *_fft, Benchmark *_bench, Collisions *_coll)

: fft(_fft), bench(_bench), parallel(_parallel), grid(_grid), setup(_setup), geo(_geo), coll(_coll)

, _kw_12_dx_dx( 1./(12.*dx*dx)   )
, _kw_12_dv   ( 1./(12.*dv)      )
, _kw_12_dx   ( 1./(12.*dx)      )
, _kw_12_dz   ( 1./(12.*dz)      )
, _kw_12_dv_dv( 1./(12.*dv*dv)   )
, _kw_16_dx4  ( 1./(16.*pow4(dx)))

{
  ArrayPhase = nct::allocate(grid->RsLD, grid->RmLB, grid->RzLB, grid->RkyLD, grid->RxLB, grid->RvLB);
  ArrayPhase(&f0, &f, &fss, &fs, &f1, &ft, &Coll);
   
  ArrayXi = nct::allocate(grid->RzLB , grid->RkyLD, grid->RxLB4, grid->RvLB)(&Xi);
  ArrayG  = nct::allocate(grid->RzLB , grid->RkyLD, grid->RxLB , grid->RvLB)(&G );
  ArrayNL = nct::allocate(grid->RkyLD, grid->RxLD , grid->RvLD)(&nonLinearTerm);
   
  // allocate boundary (MPI) buffers
  int BoundX_num =    2 * Nky * NzLD * NvLD * NmLD * NsLD;
  int BoundZ_num = NxLD * Nky *    2 * NvLD * NmLD * NsLD;
  int BoundV_num = NxLD * Nky * NzLD *    2 * NmLD * NsLD;
  // do not allocate for M if not used
  int BoundM_num = (NmLlD == NmLlB) ? 0 : NxLD * Nky * NzLD * NvLD *    2 * NsLD;

  ArrayBoundX = nct::allocate(nct::Range(0 , BoundX_num ))(&SendXu, &SendXl, &RecvXl, &RecvXu);
  ArrayBoundZ = nct::allocate(nct::Range(0 , BoundZ_num ))(&SendZu, &SendZl, &RecvZl, &RecvZu);
  ArrayBoundV = nct::allocate(nct::Range(0 , BoundV_num ))(&SendVu, &SendVl, &RecvVl, &RecvVu);
  ArrayBoundM = nct::allocate(nct::Range(0 , BoundM_num ))(&SendMu, &SendMl, &RecvMl, &RecvMu);
  
  equation_type       = setup->get("Vlasov.Equation"   , "ES");        
  doNonLinear         = setup->get("Vlasov.doNonLinear", 0      );
  doNonLinearParallel = setup->get("Vlasov.doNonLinearParallel", 0);
  removeZF            = setup->get("Vlasov.removeZF", 0);

  const std::string dir_string[] = { "X", "Y", "Z", "V", "M", "S" };
  for(int dir = DIR_X; dir <= DIR_S; dir++) hyp_visc[dir] = setup->get("Vlasov.HyperViscosity." + dir_string[dir], 0.0);
   
  dataOutputF1      = Timing( setup->get("DataOutput.Vlasov.Step", -1),
                              setup->get("DataOutput.Vlasov.Time", -1.));

  // Parse operators
  ArrayKrook = nct::allocate(grid->RxGD)(&krook);  
  FunctionParser krook_parser = setup->getFParser();
  krook_parser.Parse(setup->get("Vlasov.Krook", "0."), "x");
  for(int x = NxGlD; x <= NxGuD; x++) krook[x] = krook_parser.Eval(&X[x]); 

  ///
  Xi_max[:] = 0.;

  initData(setup, fileIO);
}
Beispiel #8
0
unsigned long Ultrasonic::Ranging()
{
  Timing();
  distance = duration /29 / 2 ;
  if(distance > MINDIST && distance < MAXDIST){
    prevDist = distance;
    return distance;
  }
  else{
    return prevDist;
  }
}
//==========================================================================================
// ExecHolder::WaitForBallToEnter()
//==========================================================================================
// - Wait for ball to enter
// - Then delay to give the ball time to settle
// - Then pinch the ball (goto forward limit)z
//==========================================================================================
void ExecHolder::WaitForBallToEnter() {
	Robot::holder->CloseGate();
	if(Robot::holder->IsBallPresent()){
		if(!Timing()){
			SetDeltaTimeout(BALLDETECTIONDELAY);
			DEBUG_PRINT("New Ball Detected - Waiting Settling Period..");
		}
		else if(CheckTimeout()){
			DEBUG_PRINT("Opening Gate ..");
			state=GO_TO_FORWARD_LIMIT;
		}
	}
}
Beispiel #10
0
void CRunStat::SetValues(CParmStatDlg* pDlg)
{
   UpdateData(pDlg);
   if (m_Func.Found("Mean") || m_Func.Found("Sum"))
      m_value.Init(pp64f, 4);
   else
      m_value.Init(m_Func.SrcType(),4);
   PrepareParameters();
   if (CippiRun::CallIpp() < 0) return;
   Timing();
   SetHistory();
   UpdateData(pDlg,FALSE);
}
Beispiel #11
0
  // Constructor
  FileIO::FileIO(Parallel *_parallel, Setup *setup):     parallel(_parallel)
  {

    // Set Initial values
    inputFileName         = setup->get("DataOutput.InputFileName", "--- None ---");
    outputFileName        = setup->get("DataOutput.OutputFileName", "default.h5");
    info                  = setup->get("DataOutput.Info", "No information provided");
    resumeFile            = setup->get("DataOutput.Resume", 0);
    overwriteFile         = setup->get("DataOutput.Overwrite", 0) || (setup->flags & HELIOS_OVERWRITE);
   
     dataFileFlushTiming  = Timing(setup->get("DataOutput.Flush.Step", -1)       , setup->get("DataOutput.Flush.Time", 100.)); 
    

    ///////// Define Timeing Datatype
    timing_tid = H5Tcreate(H5T_COMPOUND, sizeof(Timing));
    H5Tinsert(timing_tid, "Timestep", HOFFSET(Timing, step), H5T_NATIVE_INT   );
    H5Tinsert(timing_tid, "Time"    , HOFFSET(Timing, time), H5T_NATIVE_DOUBLE);

    // don't changes r and i name otherwise it will break compatibiltiy with pyTables
    complex_tid = H5Tcreate(H5T_COMPOUND, sizeof (Complex));
    H5Tinsert(complex_tid, "r", HOFFSET(Complex,r), H5T_NATIVE_DOUBLE);
    H5Tinsert(complex_tid, "i", HOFFSET(Complex,i), H5T_NATIVE_DOUBLE);
    
    vector3D_tid = H5Tcreate(H5T_COMPOUND, sizeof (Vector3D));
    H5Tinsert(vector3D_tid, "x", HOFFSET(Vector3D,x), H5T_NATIVE_DOUBLE);
    H5Tinsert(vector3D_tid, "y", HOFFSET(Vector3D,y), H5T_NATIVE_DOUBLE);
    H5Tinsert(vector3D_tid, "z", HOFFSET(Vector3D,z), H5T_NATIVE_DOUBLE);
 
    hsize_t species_dim[] = { setup->get("Grid.Ns", 1)}; 
    species_tid = H5Tarray_create(H5T_NATIVE_DOUBLE, 1, species_dim);
    
    // used for species name
          // BUG : Somehow HDF-8 stores up to 8 chars fro 64 possible. Rest are truncated ! Why ?
    s256_tid = H5Tcopy(H5T_C_S1); H5Tset_size(s256_tid, 64); H5Tset_strpad(s256_tid, H5T_STR_NULLTERM);


    offset0[0] = 0;
    offset0[1] = 0;
    offset0[2] = 0;
    offset0[3] = 0;
    offset0[4] = 0;
    offset0[5] = 0;
    offset0[6] = 0;
    offset0[7] = 0;
    

    // Create/Load HDF5 file
    if(resumeFile == false || (inputFileName != outputFileName)) create(setup);

   }
//==========================================================================================
// ExecHolder::RemoveBall()
//==========================================================================================
// - Try to remove a stuck ball by reversing the push and gate motors
// - Start a timer
// - If the timeout expires and the ball is still stuck go to an error state
// - Else close the gate
//==========================================================================================
void ExecHolder::RemoveBall() {
	Robot::holder->RemoveBall();
	if(!Timing())
		SetDeltaTimeout(BALLDETECTIONDELAY);
	else if(CheckTimeout()){
		if(Robot::holder->IsBallPresent()){
			DEBUG_PRINT("Remove Ball Failed - Entering Error State");
			state=PUSH_ERROR;
		}
		else {
			DEBUG_PRINT("Remove Ball Succeeded - Closing Gate");
			state=GO_TO_REVERSE_LIMIT;
		}
	}
}
Beispiel #13
0
int main(void) {
    Initialize();
    // motor
    OC4RS = 100;
    OC2RS = 100;

    while (1) {
        Get_Inputs();
        Decide();
        // todo: do we even need do outputs?
        // Do_Outputs();
        Timing();
    }

}
KeyframeEffectReadOnly* KeyframeEffectReadOnly::create(
    ExecutionContext* executionContext,
    Element* element,
    const DictionarySequenceOrDictionary& effectInput,
    ExceptionState& exceptionState) {
  DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
  if (element) {
    UseCounter::count(
        element->document(),
        UseCounter::AnimationConstructorKeyframeListEffectNoTiming);
  }
  return create(element, EffectInput::convert(element, effectInput,
                                              executionContext, exceptionState),
                Timing());
}
//==========================================================================================
// ExecHolder::WaitForBallToLeave()
//==========================================================================================
// - After a push request, enable the push wheel (forward push)
// - Start a timer to detect when the ball leaves
// - If the ball is still present after the timeout, assume it is stuck and try to remove it
// - Else close the gate and wait for a new ball to enter
//==========================================================================================
void ExecHolder::WaitForBallToLeave() {
	Robot::holder->PushBall();
	if(!Timing())
		SetDeltaTimeout(BALLDETECTIONDELAY);
	else if(CheckTimeout()){
		if(Robot::holder->IsBallPresent()){
			DEBUG_PRINT("Push Failed - Attempting to remove the ball");
			state=REMOVE_BALL;
		}
		else{
			DEBUG_PRINT("Push Succeeded - Closing Gate");
			state=GO_TO_REVERSE_LIMIT;
		}
	}
}
Beispiel #16
0
  void MGPreconditioner :: Update ()
  {
    static Timer t("MGPreconditioner::Update"); RegionTimer reg(t);
    
    shared_ptr<BilinearForm> lo_bfa = bfa->GetLowOrderBilinearForm();

    INVERSETYPE invtype, loinvtype = default_inversetype;
    invtype = dynamic_cast<const BaseSparseMatrix & > (bfa->GetMatrix()).SetInverseType (inversetype);
    if (lo_bfa)
      loinvtype = dynamic_cast<const BaseSparseMatrix & > (lo_bfa->GetMatrix()) .SetInverseType (inversetype);


    mgp->Update();

    if (coarse_pre)
      {
	mgp->SetCoarseGridPreconditioner (shared_ptr<BaseMatrix> (const_cast<BaseMatrix*>(&coarse_pre->GetMatrix()), NOOP_Deleter));
      }

    if (bfa->GetLowOrderBilinearForm()) //  || ntasks > 1) not supported anymore
      {
        static Timer t("MGPreconditioner::Update - fine precond"); RegionTimer reg(t);
        auto fine_smoother = make_shared<BlockSmoother> (*bfa->GetMeshAccess(), *bfa, flags);
        tlp = make_shared<TwoLevelMatrix> (&bfa->GetMatrix(),
                                           &*mgp,
                                           fine_smoother,
                                           bfa->GetMeshAccess()->GetNLevels()-1);
        tlp -> SetSmoothingSteps (finesmoothingsteps);
	tlp -> Update();
      }
    else
      tlp = nullptr;

    if (timing) Timing();
    if (test) Test();
    if (mgtest) MgTest();

    dynamic_cast<const BaseSparseMatrix & > (bfa->GetMatrix()).SetInverseType ( invtype );
    if (lo_bfa)
      dynamic_cast<const BaseSparseMatrix & > (lo_bfa->GetMatrix()) .SetInverseType ( loinvtype );
  }
Beispiel #17
0
long HCSR04::Ranging(int sys) //Te regresa la distancia en cm o pulgadas 
{
  
  Timing();
  if (sys)
  {
  
    distacne_cm = duration /29 / 2 ;
    return distacne_cm;
  
  }
  
  else
  {
  
    distance_inc = duration / 74 / 2;
    return distance_inc;

  }

}
Beispiel #18
0
	void Phase (int value)         { ID ((Timing () << 8) + value); }
DOMHighResTimeStamp
PerformanceMainThread::GetPerformanceTimingFromString(const nsAString& aProperty)
{
  if (!IsPerformanceTimingAttribute(aProperty)) {
    return 0;
  }
  if (aProperty.EqualsLiteral("navigationStart")) {
    // DOMHighResTimeStamp is in relation to navigationStart, so this will be
    // zero.
    return GetDOMTiming()->GetNavigationStart();
  }
  if (aProperty.EqualsLiteral("unloadEventStart")) {
    return GetDOMTiming()->GetUnloadEventStart();
  }
  if (aProperty.EqualsLiteral("unloadEventEnd")) {
    return GetDOMTiming()->GetUnloadEventEnd();
  }
  if (aProperty.EqualsLiteral("redirectStart")) {
    return Timing()->RedirectStart();
  }
  if (aProperty.EqualsLiteral("redirectEnd")) {
    return Timing()->RedirectEnd();
  }
  if (aProperty.EqualsLiteral("fetchStart")) {
    return Timing()->FetchStart();
  }
  if (aProperty.EqualsLiteral("domainLookupStart")) {
    return Timing()->DomainLookupStart();
  }
  if (aProperty.EqualsLiteral("domainLookupEnd")) {
    return Timing()->DomainLookupEnd();
  }
  if (aProperty.EqualsLiteral("connectStart")) {
    return Timing()->ConnectStart();
  }
  if (aProperty.EqualsLiteral("connectEnd")) {
    return Timing()->ConnectEnd();
  }
  if (aProperty.EqualsLiteral("requestStart")) {
    return Timing()->RequestStart();
  }
  if (aProperty.EqualsLiteral("responseStart")) {
    return Timing()->ResponseStart();
  }
  if (aProperty.EqualsLiteral("responseEnd")) {
    return Timing()->ResponseEnd();
  }
  if (aProperty.EqualsLiteral("domLoading")) {
    return GetDOMTiming()->GetDomLoading();
  }
  if (aProperty.EqualsLiteral("domInteractive")) {
    return GetDOMTiming()->GetDomInteractive();
  }
  if (aProperty.EqualsLiteral("domContentLoadedEventStart")) {
    return GetDOMTiming()->GetDomContentLoadedEventStart();
  }
  if (aProperty.EqualsLiteral("domContentLoadedEventEnd")) {
    return GetDOMTiming()->GetDomContentLoadedEventEnd();
  }
  if (aProperty.EqualsLiteral("domComplete")) {
    return GetDOMTiming()->GetDomComplete();
  }
  if (aProperty.EqualsLiteral("loadEventStart")) {
    return GetDOMTiming()->GetLoadEventStart();
  }
  if (aProperty.EqualsLiteral("loadEventEnd"))  {
    return GetDOMTiming()->GetLoadEventEnd();
  }
  MOZ_CRASH("IsPerformanceTimingAttribute and GetPerformanceTimingFromString are out of sync");
  return 0;
}
Beispiel #20
0
PassRefPtr<Animation> Animation::create(Element* element, PassRefPtr<AnimationEffect> effect)
{
    ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
    return create(element, effect, Timing());
}
Beispiel #21
0
PassRefPtr<Animation> Animation::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState)
{
    ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
    if (element)
        UseCounter::count(element->document(), UseCounter::AnimationConstructorKeyframeListEffectNoTiming);
    return create(element, EffectInput::convert(element, keyframeDictionaryVector, exceptionState), Timing());
}
Beispiel #22
0
void PairList::Timing(double total) const { Timing(total, 2); }
Beispiel #23
0
long Ultrasonic::Ranging()
{
    return Timing()/29 / 2;
}
KeyframeEffect* KeyframeEffect::create(Element* element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, ExceptionState& exceptionState)
{
    ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
    if (element)
        UseCounter::count(element->document(), UseCounter::AnimationConstructorKeyframeListEffectNoTiming);
    return create(element, EffectInput::convert(element, effectInput, exceptionState), Timing());
}
Beispiel #25
0
void Analysis::initDataOutput(Setup *setup, FileIO *fileIO) {
        
     analysisGroup = fileIO->newGroup(fileIO->getFileID(), "/Analysis");
        
     hsize_t offset0[] = { 0, 0, 0, 0, 0, 0, 0 };
    
     //###################################### Analysis - Heat fluxes ################################
     
     // Heat Flux ky and Particle FluxKy ( per species) 
     hid_t fluxGroup = fileIO->newGroup(analysisGroup, "Flux");
     
     hsize_t FSky_dim[]       = { plasma->nfields, Nky, Ns  , 1 }; 
     hsize_t FSky_maxdim[]    = { plasma->nfields, Nky, Ns  , H5S_UNLIMITED} ;
     hsize_t FSky_chunkdim[]  = { plasma->nfields, Nky, NsLD, 1 };
     hsize_t FSky_chunkBdim[] = { plasma->nfields, Nky, NsLD, 1 };
     hsize_t FSky_offset[]    = { 0, 0  , NsLlD-1, 0  };
//     std::cout << "NsLD : " << NsLD << std::endl;
//     std::cout << parallel->Coord(DIR_XYZVM) << std::endl << std::flush;
//     parallel->barrier();
     
//check(-1, DMESG("STOP"));

     FA_heatKy      = new FileAttr("Heat"   , fluxGroup, 4, FSky_dim, FSky_maxdim, FSky_chunkdim, offset0,  FSky_chunkBdim, FSky_offset, parallel->Coord(DIR_XYZVM == 0));
     FA_particleKy  = new FileAttr("Density", fluxGroup, 4, FSky_dim, FSky_maxdim, FSky_chunkdim, offset0,  FSky_chunkBdim, FSky_offset, parallel->Coord(DIR_XYZVM == 0));
    
     H5Gclose(fluxGroup);
     
     //###################################### Moments - Heat fluxes ################################
     hid_t momentGroup = check(H5Gcreate(fileIO->getFileID(), "/Moments",H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT), DMESG("Error creating group file for Phi : H5Gcreate"));

     hsize_t moment_dim[]       =  { grid->NzGD , NkyLD      , grid->NxGD , NsLD , 1};
     hsize_t moment_maxdim[]    =  { grid->NzGD , NkyLD      , grid->NxGD , Ns   , H5S_UNLIMITED};
     hsize_t moment_chunkBdim[] =  { NzLD       , NkyLD      , NxLD       , NsLD , 1          };
     hsize_t moment_chunkdim[]  =  { NzLD       , NkyLD      , NxLD       , NsLD , 1};
     hsize_t moment_moffset[]   =  { 0, 0, 0, 0, 0 };
     hsize_t moment_offset[]    =  { NzLlD-3, 0     , NxLlD-3, 0     ,  0  };
     
     bool momWrite = (parallel->Coord(DIR_VM) == 0);
     
     
     FA_Mom_Tp        = new FileAttr("Temperature_v", momentGroup, 5, moment_dim , moment_maxdim   , moment_chunkdim   , moment_moffset    ,  moment_chunkBdim  , moment_offset, momWrite, fileIO->complex_tid);
     FA_Mom_HeatFlux  = new FileAttr("HeatFlux"     , momentGroup, 5, moment_dim , moment_maxdim   , moment_chunkdim   , moment_moffset    ,  moment_chunkBdim  , moment_offset, momWrite, fileIO->complex_tid);
     FA_Mom_Density   = new FileAttr("Density"      , momentGroup, 5, moment_dim , moment_maxdim   , moment_chunkdim   , moment_moffset    ,  moment_chunkBdim  , moment_offset, momWrite, fileIO->complex_tid);
     FA_Mom_Time  = fileIO->newTiming(momentGroup);
        
     H5Gclose(momentGroup);
      
     dataOutputMoments   = Timing(setup->get("DataOutput.Moments.Step", -1)       , setup->get("DataOutput.Moments.Time", -1.));


     //###################################### Power Spectrum  ################################################
     // X-scalarValue
      hid_t growGroup = fileIO->newGroup(analysisGroup, "PowerSpectrum");

     hsize_t grow_x_dim[]       = { plasma->nfields, Nx/2+1, 1 }; 
     hsize_t grow_x_maxdim[]    = { plasma->nfields, Nx/2+1, H5S_UNLIMITED} ;
     hsize_t grow_x_chunkdim[]  = { plasma->nfields, Nx/2+1, 1 };
     hsize_t grow_x_chunkBdim[] = { plasma->nfields, Nx/2+1, 1 };
     FA_grow_x  = new FileAttr("X", growGroup, 3, grow_x_dim, grow_x_maxdim, grow_x_chunkdim, offset0,  grow_x_chunkBdim, offset0, parallel->myRank == 0);

     // Y-scalarValue
     hsize_t grow_y_dim[]       = { plasma->nfields, Nky, 1 };
     hsize_t grow_y_maxdim[]    = { plasma->nfields, Nky, H5S_UNLIMITED };
     hsize_t grow_y_chunkdim[]  = { plasma->nfields, Nky, 1 };
     hsize_t grow_y_chunkBdim[] = { plasma->nfields, Nky, 1 };
   
     FA_grow_y  = new FileAttr("Y", growGroup, 3, grow_y_dim, grow_y_maxdim, grow_y_chunkdim, offset0,  grow_y_chunkBdim, offset0, parallel->myRank == 0);

     FA_grow_t  = fileIO->newTiming(growGroup);

     H5Gclose(growGroup);
     
     
     hid_t freqGroup = fileIO->newGroup(analysisGroup, "PhaseShift");
     FA_freq_x  = new FileAttr("X", freqGroup, 3, grow_x_dim, grow_x_maxdim, grow_x_chunkdim, offset0,  grow_x_chunkBdim, offset0, parallel->myRank == 0);
     FA_freq_y  = new FileAttr("Y", growGroup, 3, grow_y_dim, grow_y_maxdim, grow_y_chunkdim, offset0,  grow_y_chunkBdim, offset0, parallel->myRank == 0);
     FA_freq_t  = fileIO->newTiming(freqGroup);
     H5Gclose(freqGroup);

      //////////////////////////////////////////////////////////////// Setup Table for scalar data ////////////////////////////////////////////////////////
              
      ScalarValues scalarValues;
     
      size_t SV_offset[] = { HOFFSET( ScalarValues, timestep ) , HOFFSET( ScalarValues, time     ), HOFFSET( ScalarValues, phiEnergy ),
                            HOFFSET( ScalarValues, ApEnergy ),  HOFFSET( ScalarValues, BpEnergy ), HOFFSET( ScalarValues, particle_number    ),
                            HOFFSET( ScalarValues, kinetic_energy ), HOFFSET( ScalarValues, entropy ), HOFFSET( ScalarValues, heat_flux ),
                            HOFFSET( ScalarValues, particle_flux ) };

      size_t SV_sizes[] = { sizeof(scalarValues.timestep), sizeof(scalarValues.time    ), sizeof(scalarValues.phiEnergy), 
                           sizeof(scalarValues.ApEnergy), sizeof(scalarValues.BpEnergy), Ns * sizeof(scalarValues.particle_number[0]), Ns * sizeof(scalarValues.kinetic_energy[0]), 
                           Ns * sizeof(scalarValues.entropy[0]), Ns * sizeof(scalarValues.heat_flux[0]), Ns * sizeof(scalarValues.particle_flux[0])};

      hid_t SV_types[] = { H5T_NATIVE_INT, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE, 
                           fileIO->species_tid, fileIO->species_tid, fileIO->species_tid, fileIO->species_tid, fileIO->species_tid } ;
  
      const char *SV_names[] = { "Timestep", "Time", "phiEnergy", "ApEnergy", "BpEnergy", "ParticleNumber", "KineticEnergy", "Entropy", "HeatFlux", "ParticleFlux" };

      SVTable = new TableAttr(analysisGroup, "scalarValues", 10, SV_names, SV_offset, SV_types, SV_sizes, &scalarValues); 

      dataOutputStatistics  = Timing(setup->get("DataOutput.Statistics.Step", -1), setup->get("DataOutput.Statistics.Time", -1.));

}