/*
 * Copyright (C)  NHR@FAU, University Erlangen-Nuremberg.
 * All rights reserved. This file is part of nusif-solver.
 * Use of this source code is governed by a MIT style
 * license that can be found in the LICENSE file.
 */
#ifndef __SOLVER_H_
#define __SOLVER_H_
#include "comm.h"
#include "discretization.h"
#include "grid.h"
#include "mpi.h"
#include "parameter.h"

typedef struct {
    /* geometry and grid information */
    Grid* grid;
    /* parameters */
    double eps, omega;
    int itermax;
    int levels, presmooth, postsmooth;
    double **r, **e;
    /* communication */
    Comm* comm;
} Solver;

void initSolver(Solver*, Discretization*, Parameter*);
double solve(Solver*, double*, double*);
#endif