[cig-commits] r6180 - in short/3D/PyLith/trunk: libsrc/materials pylith/materials

brad at geodynamics.org brad at geodynamics.org
Mon Mar 5 21:27:38 PST 2007


Author: brad
Date: 2007-03-05 21:27:38 -0800 (Mon, 05 Mar 2007)
New Revision: 6180

Modified:
   short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh
   short/3D/PyLith/trunk/pylith/materials/Material.py
Log:
Started filling in details of Material implementation.

Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh	2007-03-06 05:06:16 UTC (rev 6179)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh	2007-03-06 05:27:38 UTC (rev 6180)
@@ -64,37 +64,25 @@
   virtual
   ElasticMaterial* clone(void) const = 0;
 
-  /** Set database for material parameters.
+  /** Set database for physical property parameters.
    *
    * @param pDB Pointer to database.
    */
   void parametersDB(spatialdata::spatialdb::SpatialDB* pDB);
 
-  /** Get inertia at points.
+  /** Get physical property parameters from database.
    *
-   * The values are returned through the parameters.
-   *
-   * Index into array of densities:
-   * index = ipt
-   *
-   * @param ppInertia Array of inertia values.
-   * @param pSize Size of mass densities array.
-   * @param pPts Array of coordinates for points [npts x 3].
-   * @param npts Number of points.
-   * @param pCS Coordinate system associated with points.
-   * @param pState Pointer to system state at points
+   * @param mesh PETSc mesh
+   * @param label Label identifying material
    */
-  void inertia(double** pDensity,
-	       int* pSize,
-	       const double* pPts,
-	       const int npts,
-	       const spatialdata::geocoords::CoordSys* pCS,
-	       const void* pState) const;
+  void createParameters(const ALE::Obj<ALE::Mesh>& mesh);
   
-  /** Get elasticity constants at points.
+  /** Get section with inertia values.
    *
-   * The values are returned through the parameters and are grouped by
-   * point.
+   */
+  void inertia(void);
+
+  /** Get section with elasticity constants.
    *
    * Index into array of elasticity constants:
    * index = iPoint*NUMELASTCONSTS + iConstant
@@ -107,109 +95,14 @@
    *                                             18: C2323, 19: C2313,
    *                                                        20: C1313
    *
-   * @param ppElasticityC Array of elasticity constants
-   * @param pSize Size of elastiticy constants array
-   * @param pPts Array of coordinates for points [npts x 3]
-   * @param npts Number of points
-   * @param pCS Coordinate system associated with points
-   * @param pState Pointer to system state at points
    */
-  void elasticityConsts(double** ppElasticityC,
-			int* pSize,
-			const double* pPts,
-			const int npts,
-			const spatialdata::geocoords::CoordSys* pCS,
-			const void* pState) const;
+  void elasticityConstants(void);
 
   // PUBLIC MEMBERS /////////////////////////////////////////////////////
 public :
 
   static const int NUMELASTCONSTS; ///< Number of elastic constants
 
-  // PROTECTED METHODS //////////////////////////////////////////////////
-protected :
-
-  /** Get names of parameters for material.
-   *
-   * @returns Names of parameters.
-   */
-  virtual
-  const char** namesParams(void) const = 0;
-
-  /** Get number of parameters for material.
-   *
-   * @returns Number of parameters.
-   */
-  virtual
-  int numParams(void) const = 0;
-
-  /** Compute inertia at points using material parameters.
-   *
-   * The values are returned through the parameters.
-   *
-   * Index into array of inertia values:
-   * index = iPoint
-   *
-   * @param ppIntertia Array of mass densities
-   * @param pSize Size of mass densities array
-   * @param pParams Array of material parameters [npts x numParams]
-   * @param npts Number of points
-   * @param pState Pointer to system state at points
-   */
-  virtual
-  void calcInertia(double** ppInertia,
-		   int* pSize,
-		   const double* pParams,
-		   const int npts,
-		   const void* pState) const = 0;
-  
-  /** Compute elasticity constants at points using material parameters.
-   *
-   * The values are returned through the parameters and are grouped by
-   * point.
-   *
-   * Index into array of elasticity constants:
-   * index = iPoint*NUMELASTCONSTS + iConstant
-   *
-   * Order of elasticity constants:
-   *  0: C1111,  1: C1122,  2: C1133,  3: C1112,  4: C1123,  5: C1113,
-   *             6: C2222,  7: C2233,  8: C2212,  9: C2223, 10: C2213,
-   *                       11: C3333, 12: C3312, 13: C3323, 14: C3313,
-   *                                  15: C1212, 16: C1223, 17: C1213,
-   *                                             18: C2323, 19: C2313,
-   *                                                        20: C1313
-   *
-   * @param pElasticityC Array of elasticity constants
-   * @param pSize Size of elastiticy constants array
-   * @param pParams Array of material parameters [npts x numParams]
-   * @param npts Number of points
-   * @param pState Pointer to system state at points
-   */
-  virtual
-  void calcElasticityConsts(double** pElasticityC,
-			    int* pSize,
-			    const double* pParams,
-			    const int npts,
-			    const void* pState) const = 0;
-
-  // PRIVATE METHODS ////////////////////////////////////////////////////
-private :
-
-  /** Get material parameters at a set of points.
-   *
-   * @param ppParams Pointer to array of paramters.
-   * @param pSize Size of array of parameters
-   * @param pPts Array of coordinates for points [npts x 3]
-   * @param npts Number of points
-   * @param pCS Coordinate system associated with points.
-   */
-  void
-  _getParameters(double** ppParams,
-		 int* pSize,
-		 const double* pPts,
-		 const int npts,
-		 const spatialdata::geocoords::CoordSys* pCS) const;
-
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 
@@ -226,7 +119,4 @@
 
 #endif // pylith_materials_elasticmaterial_hh
 
-// version
-// $Id$
-
 // End of file 

Modified: short/3D/PyLith/trunk/pylith/materials/Material.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/Material.py	2007-03-06 05:06:16 UTC (rev 6179)
+++ short/3D/PyLith/trunk/pylith/materials/Material.py	2007-03-06 05:27:38 UTC (rev 6180)
@@ -30,6 +30,12 @@
 class Material(Component):
   """
   Python material property manager.
+
+  This implementation of a material associates both physical
+  properties and a quadrature scheme with the material. Thus, applying
+  different quadrature schemes within a region with the same physical
+  property database requires two 'materials', which can use the same
+  database.  a material.
   """
 
   # INVENTORY //////////////////////////////////////////////////////////



More information about the cig-commits mailing list