escript  Revision_
LameAssembler2D.h
Go to the documentation of this file.
00001 
00002 /*****************************************************************************
00003 *
00004 * Copyright (c) 2003-2014 by University of Queensland
00005 * http://www.uq.edu.au
00006 *
00007 * Primary Business: Queensland, Australia
00008 * Licensed under the Open Software License version 3.0
00009 * http://www.opensource.org/licenses/osl-3.0.php
00010 *
00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
00012 * Development 2012-2013 by School of Earth Sciences
00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
00014 *
00015 *****************************************************************************/
00016 #ifndef __RIPLEY_LAMEASSEMBLER2D_H__
00017 #define __RIPLEY_LAMEASSEMBLER2D_H__
00018 
00019 #include <map>
00020 #include <escript/Data.h>
00021 #include <ripley/Ripley.h>
00022 #include <ripley/RipleyException.h>
00023 #include <ripley/AbstractAssembler.h>
00024 #include <ripley/Rectangle.h>
00025 
00026 namespace ripley {
00027 
00028 
00029 class LameAssembler2D : public AbstractAssembler {
00030 public:
00031     LameAssembler2D(Rectangle *dom, double *m_dx, dim_t *m_NX, dim_t *m_NE,
00032             dim_t *m_NN) : AbstractAssembler() {
00033         domain = dom;
00034         this->m_dx = m_dx;
00035         this->m_NX = m_NX;
00036         this->m_NE = m_NE;
00037         this->m_NN = m_NN;
00038     }
00039     ~LameAssembler2D(){};
00040     
00041     /* The new interface for assemblers */
00042     virtual void assemblePDESingle(paso::SystemMatrix_ptr mat,
00043             escript::Data& rhs,
00044             std::map<std::string, escript::Data> coefs) const;
00045     virtual void assemblePDEBoundarySingle(paso::SystemMatrix_ptr mat,
00046             escript::Data& rhs,
00047             std::map<std::string, escript::Data> coefs) const;
00048     virtual void assemblePDESingleReduced(paso::SystemMatrix_ptr mat,
00049             escript::Data& rhs,
00050             std::map<std::string, escript::Data> coefs) const;
00051     virtual void assemblePDEBoundarySingleReduced(paso::SystemMatrix_ptr mat,
00052             escript::Data& rhs,
00053             std::map<std::string, escript::Data> coefs) const;
00054     virtual void assemblePDESystem(paso::SystemMatrix_ptr mat, escript::Data& rhs,
00055             std::map<std::string, escript::Data> coefs) const;
00056     virtual void assemblePDEBoundarySystem(paso::SystemMatrix_ptr mat,
00057             escript::Data& rhs,
00058             std::map<std::string, escript::Data> coefs) const;
00059     virtual void assemblePDESystemReduced(paso::SystemMatrix_ptr mat,
00060             escript::Data& rhs,
00061             std::map<std::string, escript::Data> coefs) const;
00062     virtual void assemblePDEBoundarySystemReduced(paso::SystemMatrix_ptr mat,
00063             escript::Data& rhs,
00064             std::map<std::string, escript::Data> coefs) const;
00065             
00066     void collateFunctionSpaceTypes(std::vector<int>& fsTypes, 
00067             std::map<std::string, escript::Data> coefs) const;
00068 protected:
00069     Rectangle *domain;
00070     double *m_dx;
00071     dim_t *m_NX;
00072     dim_t *m_NE;
00073     dim_t *m_NN;
00074 };
00075 
00076 } // namespace ripley
00077 
00078 #endif // __RIPLEY_LAMEASSEMBLER2D_H__
00079