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

/export/development/ViennaFEM/viennafem/linear_pde_options.hpp

Go to the documentation of this file.
00001 #ifndef VIENNAFEM_LINEAR_PDE_OPTIONS_HPP
00002 #define VIENNAFEM_LINEAR_PDE_OPTIONS_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 <vector>
00018 
00019 //ViennaFEM includes:
00020 #include "viennafem/forwards.h"
00021 
00026 namespace viennafem
00027 {
00028   class linear_pde_options
00029   {
00030     public:      
00032       long data_id() const { return data_id_; }
00034       void data_id(long new_id) { data_id_ = new_id; }
00035       
00037       long trial_space_id() const { return trial_space_id_; }
00039       void trial_space_id(long new_id) { trial_space_id_ = new_id; }
00040       
00042       long test_space_id() const { return test_space_id_; }
00044       void test_space_id(long new_id) { test_space_id_ = new_id; }
00045       
00047       bool check_existing_mapping() const { return check_mapping_; }
00049       void check_existing_mapping(bool b) { check_mapping_ = b; }
00050       
00051     private:
00052       long data_id_;
00053       long trial_space_id_;
00054       long test_space_id_;
00055       bool check_mapping_;
00056   };
00057   
00059   template <typename TrialSpaceTag, typename TestSpaceTag>
00060   linear_pde_options make_linear_pde_options(long data_id, TrialSpaceTag, TestSpaceTag, bool existing_mapping = false)
00061   {
00062     linear_pde_options options;
00063     options.data_id(data_id);
00064     options.trial_space_id(viennafem::space_to_id<TrialSpaceTag>::value);
00065     options.test_space_id(viennafem::space_to_id<TestSpaceTag>::value);
00066     options.check_existing_mapping(existing_mapping);
00067     return options;
00068   }
00069   
00070 }
00071 #endif

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