Chi-Tech
mgd_04_update_fieldfuncs.cc
Go to the documentation of this file.
1
#include "
mg_diffusion_solver.h
"
2
3
#include "
physics/FieldFunction/fieldfunction_gridbased.h
"
4
#include "
math/SpatialDiscretization/SpatialDiscretization.h
"
5
6
//###################################################################
7
/**Updates the field functions with the lates data.*/
8
void
mg_diffusion::Solver::UpdateFieldFunctions
()
9
{
10
const
auto
& OneDOFPerNode =
sdm_ptr_
->UNITARY_UNKNOWN_MANAGER;
11
for
(
int
g=0; g <
num_groups_
; ++g)
12
{
13
std::vector<double> data_vector;
14
sdm_ptr_
->LocalizePETScVector(
x_
[g], data_vector, OneDOFPerNode);
15
16
auto
& ff =
field_functions_
.at(g);
17
ff->UpdateFieldVector(data_vector);
18
}
//for g
19
}
SpatialDiscretization.h
chi_physics::Solver::field_functions_
std::vector< std::shared_ptr< FieldFunctionGridBased > > field_functions_
Definition:
chi_solver.h:58
mg_diffusion::Solver::x_
std::vector< Vec > x_
Definition:
mg_diffusion_solver.h:68
mg_diffusion::Solver::UpdateFieldFunctions
void UpdateFieldFunctions()
Definition:
mgd_04_update_fieldfuncs.cc:8
mg_diffusion::Solver::num_groups_
uint num_groups_
Definition:
mg_diffusion_solver.h:59
mg_diffusion::Solver::sdm_ptr_
chi_math::SDMPtr sdm_ptr_
Definition:
mg_diffusion_solver.h:57
fieldfunction_gridbased.h
mg_diffusion_solver.h
modules
MGDiffusion
mgd_04_update_fieldfuncs.cc
Generated by
1.9.3