Update app to new API
This commit is contained in:
parent
ad6e1ad616
commit
7b36225bd6
@ -20,7 +20,7 @@ int main(int argc, char *argv[]) {
|
|||||||
// create input + diffusion coefficients for each grid cell
|
// create input + diffusion coefficients for each grid cell
|
||||||
std::vector<double> alpha(n, 1 * pow(10, -1));
|
std::vector<double> alpha(n, 1 * pow(10, -1));
|
||||||
std::vector<double> field(n, 1 * std::pow(10, -6));
|
std::vector<double> field(n, 1 * std::pow(10, -6));
|
||||||
std::vector<boundary_condition> bc(n, {0,0});
|
std::vector<boundary_condition> bc(n + 2, {0, 0});
|
||||||
|
|
||||||
// create instance of diffusion module
|
// create instance of diffusion module
|
||||||
BTCSDiffusion diffu(dim);
|
BTCSDiffusion diffu(dim);
|
||||||
@ -28,7 +28,7 @@ int main(int argc, char *argv[]) {
|
|||||||
diffu.setXDimensions(1, n);
|
diffu.setXDimensions(1, n);
|
||||||
|
|
||||||
// set the boundary condition for the left ghost cell to dirichlet
|
// set the boundary condition for the left ghost cell to dirichlet
|
||||||
bc[0] = {Diffusion::BC_CONSTANT, 5*std::pow(10,-6)};
|
bc[1] = {Diffusion::BC_CONSTANT, 5 * std::pow(10, -6)};
|
||||||
// diffu.setBoundaryCondition(1, 0, BTCSDiffusion::BC_CONSTANT,
|
// diffu.setBoundaryCondition(1, 0, BTCSDiffusion::BC_CONSTANT,
|
||||||
// 5. * std::pow(10, -6));
|
// 5. * std::pow(10, -6));
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#include <diffusion/BTCSDiffusion.hpp>
|
|
||||||
#include <diffusion/BoundaryCondition.hpp>
|
|
||||||
#include <algorithm> // for copy, max
|
#include <algorithm> // for copy, max
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <diffusion/BTCSDiffusion.hpp>
|
||||||
|
#include <diffusion/BoundaryCondition.hpp>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream> // for std
|
#include <iostream> // for std
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
@ -20,7 +20,7 @@ int main(int argc, char *argv[]) {
|
|||||||
// create input + diffusion coefficients for each grid cell
|
// create input + diffusion coefficients for each grid cell
|
||||||
std::vector<double> alpha(n * m, 1 * pow(10, -1));
|
std::vector<double> alpha(n * m, 1 * pow(10, -1));
|
||||||
std::vector<double> field(n * m, 1 * std::pow(10, -6));
|
std::vector<double> field(n * m, 1 * std::pow(10, -6));
|
||||||
std::vector<boundary_condition> bc(n*m, {0,0});
|
std::vector<boundary_condition> bc((n + 2) * (m + 2), {0, 0});
|
||||||
|
|
||||||
// create instance of diffusion module
|
// create instance of diffusion module
|
||||||
BTCSDiffusion diffu(dim);
|
BTCSDiffusion diffu(dim);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#include <diffusion/BTCSDiffusion.hpp>
|
|
||||||
#include <diffusion/BoundaryCondition.hpp>
|
|
||||||
#include <algorithm> // for copy, max
|
#include <algorithm> // for copy, max
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <diffusion/BTCSDiffusion.hpp>
|
||||||
|
#include <diffusion/BoundaryCondition.hpp>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream> // for std
|
#include <iostream> // for std
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
@ -20,7 +20,7 @@ int main(int argc, char *argv[]) {
|
|||||||
// create input + diffusion coefficients for each grid cell
|
// create input + diffusion coefficients for each grid cell
|
||||||
std::vector<double> alpha(n * m, 1 * pow(10, -1));
|
std::vector<double> alpha(n * m, 1 * pow(10, -1));
|
||||||
std::vector<double> field(n * m, 0.);
|
std::vector<double> field(n * m, 0.);
|
||||||
std::vector<boundary_condition> bc(n*m, {0,0});
|
std::vector<boundary_condition> bc((n + 2) * (m + 2), {0, 0});
|
||||||
|
|
||||||
field[125500] = 1;
|
field[125500] = 1;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user