dougshidong / PHiLiP

Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
Other
45 stars 37 forks source link

Create SolutionCell, MetricCell, etc to aggregate DG functions inputs #141

Open dougshidong opened 2 years ago

dougshidong commented 2 years ago

The current functions within DG have over 10 input parameters, often from a left and right solution for example. A way to make the parameter more readable and maintainable is to encapsulate relevant data together like

class ElementSolution
{
std::vector<real> local_solution;
std::vector<int> local_dof_indices;
int degree;
}
class DGCell
{
ElementSolution state_solution;
ElementSolution metric_solution;
}

Or maybe have different classes for the state solution and metric solutions that have various functions associated with them. Details to be determined. Overall, the goal would be to decrease the total number of parameters that need to be passed around.