HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
SparseGridsCombinationTechnique.cpp
Go to the documentation of this file.
1
6
#include <
arrayfunctions.h
>
7
#include <
std_vec_ops.h
>
8
#include <
sparse_grids_simulation.h
>
9
10
extern
"C"
void
CombineSolutions
(
SimulationObject
*,
11
double
*
const
*
const
,
12
const
int
,
13
SimulationObject
*,
14
double
*
const
,
15
const
double
*
const
);
16
23
void
SparseGridsSimulation::CombinationTechnique
(
SimulationObject
*
const
a_sim )
24
{
25
double
** u_sg = (
double
**) calloc (
m_nsims_sg
,
sizeof
(
double
*));
26
std::vector<double> coeffs(
m_nsims_sg
, 0.0);
27
for
(
int
n=0; n<
m_nsims_sg
; n++) {
28
u_sg[n] =
m_sims_sg
[n].solver.u;
29
coeffs[n] =
m_combination
[n]._coeff_;
30
}
31
32
::CombineSolutions
(
m_sims_sg
.data(),
33
u_sg,
34
m_nsims_sg
,
35
a_sim,
36
a_sim->
solver
.
u
,
37
coeffs.data() );
38
39
/* done */
40
return
;
41
}
42
SparseGridsSimulation::m_sims_sg
std::vector< SimulationObject > m_sims_sg
Definition:
sparse_grids_simulation.h:231
std_vec_ops.h
Contains some vector ops.
HyPar::u
double * u
Definition:
hypar.h:116
CombineSolutions
void CombineSolutions(SimulationObject *a_sims_src, double *const *const a_u_src, const int a_nsims, SimulationObject *a_sim_dst, double *const a_u_dst, const double *const a_coeffs)
Definition:
CombineSolutions.c:19
SparseGridsSimulation::m_nsims_sg
int m_nsims_sg
Definition:
sparse_grids_simulation.h:214
sparse_grids_simulation.h
SimulationObject
Structure defining a simulation.
Definition:
simulation_object.h:23
SimulationObject::solver
HyPar solver
Definition:
simulation_object.h:26
SparseGridsSimulation::m_combination
std::vector< SGCTElem > m_combination
Definition:
sparse_grids_simulation.h:236
arrayfunctions.h
Contains macros and function definitions for common array operations.
SparseGridsSimulation::CombinationTechnique
void CombinationTechnique(SimulationObject *const)
Definition:
SparseGridsCombinationTechnique.cpp:23