1 // Copyright (C) 2022-2023 CEA, EDF
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (EDF R&D)
23 #include "MEDCouplingFieldDiscretization.hxx"
30 * Class in charge to implement FE functions with shape functions
32 class MEDCouplingFieldDiscretizationOnNodesFE : public MEDCouplingFieldDiscretizationOnNodes
35 MEDCOUPLING_EXPORT TypeOfField getEnum() const override { return TYPE; }
36 MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationOnNodesFE"); }
37 MEDCOUPLING_EXPORT const char *getRepr() const override { return REPR; }
38 MEDCOUPLING_EXPORT std::string getStringRepr() const override;
39 MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const override;
40 MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
41 MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const override;
42 MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clone() const override;
43 MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const override;
44 MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const override;
45 MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const override;
46 MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const override;
48 MEDCOUPLING_EXPORT MCAuto<DataArrayDouble> getCooInRefElement(const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
50 MEDCOUPLING_EXPORT static void GetRefCoordOfListOf3DPtsIn3D(const MEDCouplingUMesh *umesh, const double *ptsCoo, mcIdType nbOfPts,
51 std::function<void(const MEDCouplingGaussLocalization&, const std::vector<mcIdType>&)> customFunc);
53 const MEDCouplingUMesh *checkConfig3D(const MEDCouplingMesh *mesh) const;
55 static const char REPR[];
56 static constexpr TypeOfField TYPE = ON_NODES_FE;