Skip to content
Snippets Groups Projects
Commit fd3aea0f authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Benchmark branch small update

parent c66a0b34
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file.
### Fixed
- Installation of PETSC in case with MUMPS try without MUMPS
- In case of miss compilation ignore system wide installation
- Bug in VTK writer binary in case of vectors
- Bug in VTK writer binary: long int are not supported removing output
## [0.8.0] 28 February 2016
......
......@@ -7,6 +7,8 @@ OPT=
OBJ = main.o
all: sph_dlb
sph_dlb_test: OPT += -DTEST_RUN
sph_dlb_test: sph_dlb
......@@ -16,7 +18,6 @@ sph_dlb_test: sph_dlb
sph_dlb: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
all: sph_dlb
run: sph_dlb_test
mpirun -np 2 ./sph_dlb
......
......@@ -970,6 +970,8 @@ int main(int argc, char* argv[])
/*! \cond [important_option] \endcond */
#if 0
// You can ignore all these dp/2.0 is a trick to reach the same initialization
// of Dual-SPH that use a different criteria to draw particles
Box<3,double> fluid_box({dp/2.0,dp/2.0,dp/2.0},{0.4+dp/2.0,0.67-dp/2.0,0.3+dp/2.0});
......@@ -1020,6 +1022,8 @@ int main(int argc, char* argv[])
++fluid_it;
}
#endif
// Recipient
Box<3,double> recipient1({0.0,0.0,0.0},{1.6+dp/2.0,0.67+dp/2.0,0.4+dp/2.0});
Box<3,double> recipient2({dp,dp,dp},{1.6-dp/2.0,0.67-dp/2.0,0.4+dp/2.0});
......@@ -1081,6 +1085,11 @@ int main(int argc, char* argv[])
vd.map();
vd.write("Recipient");
openfpm_finalize();
return 0;
// Now that we fill the vector with particles
ModelCustom md;
......
......@@ -851,9 +851,9 @@ public:
* \return processorID
*
*/
template<typename Mem, typename ofb> size_t inline processorID(encapc<1, Point<dim,T>, Mem> p)
template<typename Mem> size_t inline processorID(const encapc<1, Point<dim,T>, Mem> & p) const
{
return fine_s.get(cd.template getCell<ofb>(p));
return fine_s.get(cd.template getCell(p));
}
/*! \brief Given a point return in which processor the particle should go
......@@ -1251,6 +1251,20 @@ public:
return processorID(pos) == v_cl.getProcessUnitID();
}
/*! \brief Check if the particle is local
*
* \warning if the particle id outside the domain the result is unreliable
*
* \param pos object position
*
* \return true if it is local
*
*/
bool isLocal(const Point<dim,T> & pos) const
{
return processorID(pos) == v_cl.getProcessUnitID();
}
/*! \brief Check if the particle is local considering boundary conditions
*
* \warning if the particle id outside the domain and non periodic boundary the result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment