Version: 6.3.1

src/MEDCalculator/MEDCalculatorDBSliceField.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __MEDCALCULATORDBSLICEFIELD_HXX__
00021 #define __MEDCALCULATORDBSLICEFIELD_HXX__
00022 
00023 #include "MEDCouplingRefCountObject.hxx"
00024 
00025 #include "InterpKernelException.hxx"
00026 
00027 #include <string>
00028 
00029 namespace ParaMEDMEM
00030 {
00031   class MEDCouplingFieldDouble;
00032   class MEDCouplingMesh;
00033   class DataArrayInt;
00034   class MEDCalculatorDBRangeSelection;
00035   
00036   class MEDCalculatorDBSliceField : public RefCountObject
00037   {
00038   public:
00039     MEDCalculatorDBSliceField(int iter, int order);
00040     MEDCalculatorDBSliceField(MEDCouplingFieldDouble *f);
00041     bool isFetched() const { return _field!=0; }
00042     void getDtIt(int& it, int& order) const { it=_iteration;  order=_order; }
00043     void setField(MEDCouplingFieldDouble *f) const;
00044     void setName(const char *name);
00045     void setDescription(const char *descr);
00046     void write(const char *fName, const std::string& n, const std::string& d) const throw(INTERP_KERNEL::Exception);
00047     const MEDCouplingMesh *getMesh(TypeOfField type, const std::string& fname, const std::string& mname, const std::string& fieldName) const;
00048     MEDCouplingFieldDouble *getField(TypeOfField type, const std::string& fname, const std::string& mname, const std::string& fieldName) const;
00049     MEDCouplingFieldDouble *getFieldWithoutQuestion(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const;
00050     MEDCouplingFieldDouble *getFieldAttribute() const { return _field; }
00051     MEDCouplingFieldDouble *buildCstFromThis(double val, int nbOfComp, const MEDCouplingFieldDouble *m) const;
00052     //
00053     void assign(const MEDCalculatorDBSliceField* other, int sizeCThis, const MEDCalculatorDBRangeSelection& thisC,
00054                 int sizeCOther, const MEDCalculatorDBRangeSelection& otherC);
00055     MEDCalculatorDBSliceField *add(const MEDCalculatorDBSliceField* other, const DataArrayInt *cc, const DataArrayInt *nc,
00056                                 int sizeCThis, const MEDCalculatorDBRangeSelection& thisC,
00057                                 int sizeCOther, const MEDCalculatorDBRangeSelection& otherC) const;
00058     MEDCalculatorDBSliceField *substract(const MEDCalculatorDBSliceField* other, const DataArrayInt *cc, const DataArrayInt *nc,
00059                                       int sizeCThis, const MEDCalculatorDBRangeSelection& thisC,
00060                                       int sizeCOther, const MEDCalculatorDBRangeSelection& otherC) const;
00061     MEDCalculatorDBSliceField *multiply(const MEDCalculatorDBSliceField* other, const DataArrayInt *cc, const DataArrayInt *nc,
00062                                      int sizeCThis, const MEDCalculatorDBRangeSelection& thisC,
00063                                      int sizeCOther, const MEDCalculatorDBRangeSelection& otherC) const;
00064     MEDCalculatorDBSliceField *divide(const MEDCalculatorDBSliceField* other, const DataArrayInt *cc, const DataArrayInt *nc,
00065                                    int sizeCThis, const MEDCalculatorDBRangeSelection& thisC,
00066                                    int sizeCOther, const MEDCalculatorDBRangeSelection& otherC) const;
00067     MEDCalculatorDBSliceField *dot(const MEDCalculatorDBSliceField* other,
00068                                 int sizeCThis, const MEDCalculatorDBRangeSelection& thisC,
00069                                 int sizeCOther, const MEDCalculatorDBRangeSelection& otherC) const;
00070     MEDCalculatorDBSliceField *crossProduct(const MEDCalculatorDBSliceField* other,
00071                                          int sizeCThis, const MEDCalculatorDBRangeSelection& thisC,
00072                                          int sizeCOther, const MEDCalculatorDBRangeSelection& otherC) const;
00073     MEDCalculatorDBSliceField *doublyContractedProduct(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception);
00074     MEDCalculatorDBSliceField *determinant(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception);
00075     MEDCalculatorDBSliceField *eigenValues(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception);
00076     MEDCalculatorDBSliceField *eigenVectors(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception);
00077     MEDCalculatorDBSliceField *inverse(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception);
00078     MEDCalculatorDBSliceField *trace(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception);
00079     MEDCalculatorDBSliceField *deviator(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception);
00080     MEDCalculatorDBSliceField *magnitude(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception);
00081     void applyFunc(const char *func, int sizeCThis, const MEDCalculatorDBRangeSelection& thisC);
00082     bool isEqual(const MEDCalculatorDBSliceField* other, const DataArrayInt *cc, const DataArrayInt *nc,
00083                  int sizeCThis, const MEDCalculatorDBRangeSelection& thisC,
00084                  int sizeCOther, const MEDCalculatorDBRangeSelection& otherC, double prec) const;
00085   private:
00086     ~MEDCalculatorDBSliceField();
00087   private:
00088     int _iteration;
00089     int _order;
00090     mutable MEDCouplingFieldDouble *_field;
00091     MEDCouplingFieldDouble *_work;
00092   };
00093 }
00094 
00095 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS