Commit 473fad10 authored by incardon's avatar incardon

Fixing example compilation

parent 2289297b
......@@ -10,10 +10,10 @@ OBJ = main.o update_new.o
mpif90 -ffree-line-length-none -fno-range-check -fno-second-underscore -fimplicit-none -mavx -O3 -c -g -o $@ $<
%.o: %.cpp
$(CC) -O3 -mavx -g -c --std=c++11 -Wno-ignored-attributes -o $@ $< $(INCLUDE_PATH) -I/home/i-bird/VC/include
$(CC) -O3 -mavx -g -c --std=c++11 -Wno-ignored-attributes -o $@ $< $(INCLUDE_PATH) -I/where/is/vc/installation/include
gray_scott: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -L/home/i-bird/VC/lib -lVc
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -L/where/is/vc/installation/lib # -lVc (Add -lVc if you use VCDevel)
all: gray_scott
......
......@@ -117,12 +117,15 @@ void step(grid_dist_id<3, double, aggregate<double>> & OldU,
grid_dist_id<3, double, aggregate<double>> & NewU,
grid_dist_id<3, double, aggregate<double>> & NewV,
grid_key_dx<3> (& star_stencil_3D)[7],
Vc::double_v uFactor, Vc::double_v vFactor, double deltaT, double F, double K)
double uFactor_s, double vFactor_s, double deltaT, double F, double K)
{
#ifndef FORTRAN_UPDATE
//! \cond [cpp_update] \endcond
Vc::double uFactor = uFactor_s;
Vc::double vFactor = vFactor_s;
WHILE_M(OldU,star_stencil_3D)
auto & U_old = GET_GRID_M(OldU);
auto & V_old = GET_GRID_M(OldV);
......@@ -184,9 +187,6 @@ void step(grid_dist_id<3, double, aggregate<double>> & OldU,
//! \cond [fort_update] \endcond
double uFactor_s = uFactor[0];
double vFactor_s = vFactor[0];
auto & ginfo = OldU.getLocalGridsInfo();
for (size_t i = 0 ; i < OldU.getN_loc_grid() ; i++)
......@@ -294,8 +294,8 @@ int main(int argc, char* argv[])
// because we assume that spacing[x] == spacing[y] we use formula 2
// and we calculate the prefactor of Eq 2
Vc::double_v uFactor = deltaT * du/(spacing[x]*spacing[x]);
Vc::double_v vFactor = deltaT * dv/(spacing[x]*spacing[x]);
double uFactor = deltaT * du/(spacing[x]*spacing[x]);
double vFactor = deltaT * dv/(spacing[x]*spacing[x]);
timer tot_sim;
tot_sim.start();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment