geo_build_zero_dim.cc
Go to the documentation of this file.
// used by space IR = space(zero,"P1");
// zero.geo = 0D, 1 node, as in file:
// mesh
// 4
// header
// dimension 0
// nodes 1
// end header
//
// NOTE:
// - the only node is attributed to iproc=0
// used by field_concat.cc & form_concat.cc
// and this attribution convention
// is assumed in vec_concat.cc & csr_concat.cc
//
// TODO:
// - build it directly, without any file
// - for space IR^n : use a "n" parameter
//
#include "rheolef/geo.h"
namespace rheolef {
static std::string zero_full_name() {
std::string full_name = std::string(_RHEOLEF_PKGDATADIR) + "/zero-1";
if (file_exists (full_name + ".geo")) return full_name;
// second chance: regression tests running with non-installed lib
full_name = std::string(_RHEOLEF_ABS_TOP_SRCDIR) + "/main/lib/zero-1";
if (file_exists (full_name + ".geo")) return full_name;
fatal_macro ("cannot find \"zero-1.geo\"");
return std::string();
}
#define _RHEOLEF_zero_dimension(M) \
template <class T> \
geo_basic<T,M>::geo_basic ( \
details::zero_dimension, \
const communicator& comm) \
: base (0) \
{ \
base::operator= (geo_load<T,M>(zero_full_name())); \
}
_RHEOLEF_zero_dimension(sequential)
#ifdef _RHEOLEF_HAVE_MPI
_RHEOLEF_zero_dimension(distributed)
#endif // _RHEOLEF_HAVE_MPI
#undef _RHEOLEF_zero_dimension
// ----------------------------------------------------------------------------
// instanciation in library
// ----------------------------------------------------------------------------
#define _RHEOLEF_instanciation(T,M) \
template \
geo_basic<T,M>::geo_basic ( \
details::zero_dimension, \
const communicator& comm);
_RHEOLEF_instanciation(Float,sequential)
#ifdef _RHEOLEF_HAVE_MPI
_RHEOLEF_instanciation(Float,distributed)
#endif // _RHEOLEF_HAVE_MPI
#undef _RHEOLEF_instanciation
} // namespace rheolef
Float
see the Float page for the full documentation
_RHEOLEF_PKGDATADIR
#define _RHEOLEF_PKGDATADIR
Definition: config.h:234
_RHEOLEF_ABS_TOP_SRCDIR
#define _RHEOLEF_ABS_TOP_SRCDIR
Definition: config.h:6
fatal_macro
#define fatal_macro(message)
Definition: dis_macros.h:33
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::_RHEOLEF_zero_dimension
_RHEOLEF_zero_dimension(sequential) _RHEOLEF_zero_dimension(distributed) _RHEOLEF_instanciation(Float
rheolef::_RHEOLEF_instanciation
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
rheolef::file_exists
bool file_exists(const std::string &filename)
file_exists: see the rheostream page for the full documentation
Definition: scatch.icc:42
rheolef::distributed
Definition: distributed.h:88
rheolef::sequential
Definition: distributed.h:28