• Main Page
  • Namespaces
  • Data Structures
  • Files
  • File List

/export/development/ViennaFEM/viennafem/transform/dtdx_interval.hpp

Go to the documentation of this file.
00001 #ifndef VIENNAFEM_TRANSFORM_INTERVAL_HPP
00002 #define VIENNAFEM_TRANSFORM_INTERVAL_HPP
00003 
00004 /* =========================================================================
00005    Copyright (c) 2012, Institute for Microelectronics,
00006                        Institute for Analysis and Scientific Computing,
00007                        TU Wien.
00008                              -----------------
00009                ViennaFEM - The Vienna Finite Element Method Library
00010                              -----------------
00011 
00012    Author:     Karl Rupp                          rupp@iue.tuwien.ac.at
00013 
00014    License:    MIT (X11), see file LICENSE in the ViennaFEM base directory
00015 ============================================================================ */
00016 
00017 #include <iostream>
00018 #include <utility>
00019 #include "viennagrid/topology/triangle.hpp"
00020 #include "viennagrid/algorithm/spanned_volume.hpp"
00021 #include "viennagrid/domain.hpp"
00022 #include "viennafem/forwards.h"
00023 
00028 namespace viennafem
00029 {
00030 
00031   template <>
00032   struct dt_dx_handler<viennafem::unit_interval>
00033   {
00034     public:
00035       
00036       template <typename CellType>
00037       static void apply(CellType const & cell)
00038       {
00039         typedef typename CellType::config_type       Config;
00040         typedef typename viennagrid::result_of::point<Config>::type   PointType;
00041         
00042         PointType const & p0 = viennagrid::ncells<0>(cell)[0].point();
00043         PointType const & p1 = viennagrid::ncells<0>(cell)[1].point();
00044         
00045         //Step 1: store determinant:
00046         numeric_type x1_x0 = p1[0] - p0[0];
00047         
00048         viennadata::access<det_dF_dt_key, numeric_type>()(cell) = x1_x0;
00049         viennadata::access<dt_dx_key<0, 0>, numeric_type>()(cell) = 1.0 / x1_x0;
00050       }
00051 
00052   };
00053 
00054   
00055 } //namespace
00056 
00057 #endif

Generated on Wed Feb 29 2012 21:51:05 for ViennaFEM - The Vienna Finite Element Method Library by  doxygen 1.7.1