text: ////////////////////////////////////////////////////////////////////////////////
  //  Copyright (c) 2019 Prashant K. Jha
  //  Copyright (c) 2019 Patrick Diehl
  //
  //  Distributed under the Boost Software License, Version 1.0. (See accompanying
  //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  ////////////////////////////////////////////////////////////////////////////////
  
  #include "baseElem.h"
  #include "util/feElementDefs.h"  // global definition of elements
  #include <iostream>              // for std::cerr
  #include "util/utilIO.h"
  
  fe::BaseElem::BaseElem(size_t order, size_t element_type)
      : d_quadOrder(order),
        d_elemType(element_type),
        d_numQuadPts(util::vtk_map_element_to_num_nodes[element_type]){};
  
  std::vector<double> fe::BaseElem::getShapes(
      const util::Point3 &p, const std::vector<util::Point3> &nodes) {
    std::cerr << "Error: For element type = " << d_elemType << " the map from "
              << "element to reference element is not available.\n"
              << "Therefore, shape function evaluation at any arbitrary point "
                 "in the element is not possible.\n";
    exit(1);
  }
  
  std::vector<std::vector<double>> fe::BaseElem::getDerShapes(
      const util::Point3 &p, const std::vector<util::Point3> &nodes) {
    std::cerr << "Error: For element type = " << d_elemType << " the map from "
              << "element to reference element is not available.\n"
              << "Therefore, derivatives of shape function at any "
                 "arbitrary point in the element can not be computed.\n";
    exit(1);
  }
  
  util::Point3 fe::BaseElem::mapPointToRefElem(
      const util::Point3 &p, const std::vector<util::Point3> &nodes) {
    std::cerr << "Error: For element type = " << d_elemType << " the map from "
              << "element to reference element is not available.\n";
    exit(1);
  }
  
  void fe::BaseElem::init() {
    std::cerr << "Error: init() of BaseElem must be implemented in inheriting "
                 "class.\n";
    exit(1);
  }
  
  std::string fe::BaseElem::printStr(int nt, int lvl) const {
    auto tabS = util::io::getTabS(nt);
    std::ostringstream oss;
    oss << tabS << "------- BaseElem --------" << std::endl << std::endl;
    oss << tabS << "Quad order = " << d_quadOrder << std::endl;
    oss << tabS << "Num quad points = " << d_numQuadPts << std::endl;
    oss << tabS << "Element type = " << d_elemType << std::endl;
    oss << tabS << std::endl;
  
    return oss.str();
  }
  