24 fprintf(stderr,
"Error in SparseGridsSimulation::Initialize()\n");
25 fprintf(stderr,
" m_sim_fg is NULL on rank %d!\n",
m_rank);
43 printf(
"Processor distribution for full grid object: ");
44 for (
int d=0; d<
m_ndims; d++) printf(
" %3d", iproc_fg[d]);
48 if (!
m_rank) printf(
"Initializing sparse grids...\n");
49 if (!
m_rank) printf(
" Number of spatial dimensions: %d\n",
m_ndims);
53 if (ierr)
return ierr;
57 printf(
" Computing sparse grids dimensions...\n");
60 if (ierr)
return ierr;
63 printf(
" Number of sparse grid domains in combination technique: %d\n",
67 fprintf(stderr,
"Error in SparseGridsSimulation::Initialize()\n");
68 fprintf(stderr,
" ComputeSGDimsAndCoeffs() returned empty vector!\n");
74 printf(
" Computing processor decompositions...\n");
81 if (ierr)
return ierr;
86 printf(
"Sparse Grids: Combination technique grids sizes and coefficients are:-\n");
88 printf(
" %3d: dim = (", i);
99 if (ierr)
return ierr;
106 MPI_Comm_dup(MPI_COMM_WORLD, &(
m_sims_sg[i].mpi.world));
114 if (ierr)
return ierr;
119 if (ierr)
return ierr;
124 ndof_sg +=
m_sims_sg[i].solver.npoints_global;
128 printf(
"Total number of DOFs:-\n");
129 printf(
" using sparse grids: %d\n", (
int)ndof_sg);
130 printf(
" using conventional grid: %d\n", (
int)ndof_fg);
int InitializeBarebones(SimulationObject *)
std::vector< int > GridDimensions
int MPIBroadcast_integer(int *, int, int, void *)
Some basic definitions and macros.
int ComputeSGDimsAndCoeffs()
std::vector< SGCTElem > m_combination
int ComputeProcessorDistribution(ProcDistribution &, const GridDimensions &)
std::vector< SimulationObject > m_sims_sg
std::vector< int > ProcDistribution
int SetSolverParameters(SimulationObject &, const GridDimensions &, const ProcDistribution &, const SimulationObject &, const int, const int)
std::vector< ProcDistribution > m_iprocs
int WriteInputs(void *, int, int)
SimulationObject * m_sim_fg
Contains macros and function definitions for common array operations.