[cig-commits] r6226 - in short/3D/PyLith/trunk: . libsrc
libsrc/feassemble libsrc/materials libsrc/topology pylith/materials
brad at geodynamics.org
brad at geodynamics.org
Sun Mar 11 20:17:32 PDT 2007
Author: brad
Date: 2007-03-11 20:17:31 -0700 (Sun, 11 Mar 2007)
New Revision: 6226
Added:
short/3D/PyLith/trunk/libsrc/topology/
short/3D/PyLith/trunk/libsrc/topology/Makefile.am
short/3D/PyLith/trunk/libsrc/topology/Mesh.hh
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/configure.ac
short/3D/PyLith/trunk/libsrc/Makefile.am
short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc
short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.hh
short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
short/3D/PyLith/trunk/libsrc/feassemble/Integrator.hh
short/3D/PyLith/trunk/libsrc/feassemble/IntegratorExplicit.cc
short/3D/PyLith/trunk/libsrc/materials/Material.hh
short/3D/PyLith/trunk/libsrc/materials/Material.icc
short/3D/PyLith/trunk/pylith/materials/Material.py
Log:
Updated TODO. Added topology/Mesh (placeholder for insulated interface to PETSc Mesh?).
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/TODO 2007-03-12 03:17:31 UTC (rev 6226)
@@ -2,64 +2,66 @@
MAIN PRIORITIES (Brad)
======================================================================
-Fix bug related to casting C++ objects in module. This is bad because
-we lose what type the abstract base class is.
-
Unit tests:
petsc module
+ ParameterManager
+ Material
+ MaterialElastic
+ ElasticIsotropic3D
-0. Create element families for materials.
- a. Move quadrature component from Integrator to Material?
- [Integrator will hold material; user configures quadrature w/material]
- b. In Formulation?, create an integrator for each "material"
- [IN PROGRESS]
- c. C++ Material (1 per element family)
- Holds physical properties
- Initialize involves getting parameters from db
- d. ExplicitElasticity gets density field from material's property manager
+0. Finish implementing materials with 3-D linear, isotropic elastic material
+ a. module
+ b. unit tests for C++ level
+ c. unit tests for Python level
-1. Finish implementing ExplicitElasticity
- a. C++
- a. Python object
- b. bindings
- c. unit tests at C++ level
- d. unit tests at Python level
+1. Create element families for materials.
+ a. Limit cells to cells with material label
+2. Finish implementing ExplicitElasticity
+ a. C++
+ a. Python object
+ b. bindings
+ c. unit tests at C++ level
+ d. unit tests at Python level
+
Status: Started on a.
-2. Finish implementing Python Formulation
+3. Finish implementing Python Formulation
(e.g., Explicit) with initialization of solid element families.
- c. Python object
- e. unit tests at Python level
+ a. Python object
+ b. unit tests at Python level
-3. Implement unit tests for MeshIO at Python level.
- a. write()/read()
- b. checkVals()
+4. Implement unit tests for MeshIO at Python level.
+ a. read()/write()
+ b. checkFile()
STATUS:
- Postponed. Easiest implementation requires semi-messy build
- on top of libtests/meshio classes and initializing/finalizing
- PETSc from Python. May be easier to include in higher-level unit
- test.
+ Replace write/read with read/write and check to make sure files
+ are the same. A little more of pain to setup but doesn't require
+ any messy module stuff.
======================================================================
SECONDARY PRIORITIES
======================================================================
+0. Adjust MeshIOAscii format
+ a. Add indices for coordinates, simplices, material ids (easier to see)
+ b. Add group of vertices
+
1. Implement MeshIOHDF5 & HDF5
- a. C++ objects
- b. unit tests at C++ level
- b. Python object (MeshIOHDF5)
- c. bindings
- d. unit tests at Python level
+ a. C++ objects
+ b. unit tests at C++ level
+ b. Python object (MeshIOHDF5)
+ c. bindings
+ d. unit tests at Python level
2. Implement MeshIOCubit
- a. C++ objects
- b. unit tests at C++ level
- b. Python object (MeshIOCubit)
- c. bindings
- d. unit tests at Python level
+ a. C++ objects
+ b. unit tests at C++ level
+ b. Python object (MeshIOCubit)
+ c. bindings
+ d. unit tests at Python level
======================================================================
UNRESOLVED ISSUES
Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/configure.ac 2007-03-12 03:17:31 UTC (rev 6226)
@@ -145,8 +145,10 @@
pylith/Makefile
libsrc/Makefile
libsrc/feassemble/Makefile
+ libsrc/materials/Makefile
libsrc/meshio/Makefile
libsrc/utils/Makefile
+ libsrc/topology/Makefile
modulesrc/Makefile
modulesrc/feassemble/Makefile
modulesrc/meshio/Makefile
@@ -162,8 +164,6 @@
unittests/pytests/meshio/Makefile
doc/Makefile])
-# libsrc/materials/Makefile
-
AC_OUTPUT
dnl end of configure.ac
Modified: short/3D/PyLith/trunk/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/Makefile.am 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/Makefile.am 2007-03-12 03:17:31 UTC (rev 6226)
@@ -32,8 +32,8 @@
feassemble/Quadrature3D.cc \
feassemble/ParameterManager.cc \
materials/Material.cc \
- materials/ElasticMaterial3D.cc \
materials/ElasticIsotropic3D.cc \
+ materials/ElasticMaterial.cc \
meshio/MeshIO.cc \
meshio/MeshIOAscii.cc
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc 2007-03-12 03:17:31 UTC (rev 6226)
@@ -15,7 +15,7 @@
#include "ExplicitElasticity.hh" // implementation of class methods
#include "Quadrature.hh" // USES Quadrature
-#include "ParameterManager.hh" // USES ParameterManager
+#include "pylith/materials/ElasticMaterial.hh" // USES ElasticMaterial
#include "petscmat.h" // USES PetscMat
#include "spatialdata/spatialdb/SpatialDB.hh"
@@ -25,7 +25,8 @@
// ----------------------------------------------------------------------
// Constructor
-pylith::feassemble::ExplicitElasticity::ExplicitElasticity(void)
+pylith::feassemble::ExplicitElasticity::ExplicitElasticity(void) :
+ _material(0)
{ // constructor
} // constructor
@@ -33,16 +34,29 @@
// Destructor
pylith::feassemble::ExplicitElasticity::~ExplicitElasticity(void)
{ // destructor
+ delete _material; _material = 0;
} // destructor
// ----------------------------------------------------------------------
// Copy constructor.
pylith::feassemble::ExplicitElasticity::ExplicitElasticity(const ExplicitElasticity& i) :
- IntegratorExplicit(i)
+ IntegratorExplicit(i),
+ _material(0)
{ // copy constructor
+ if (0 != i._material)
+ _material = i._material->clone();
} // copy constructor
// ----------------------------------------------------------------------
+// Set material.
+void
+pylith::feassemble::ExplicitElasticity::material(
+ const materials::ElasticMaterial* m)
+{ // material
+ delete _material; _material = (0 != m) ? m->clone() : 0;
+} // material
+
+// ----------------------------------------------------------------------
// Integrate residual term (b) for dynamic elasticity term for 3-D
// finite elements.
void
@@ -61,10 +75,8 @@
topology->heightStratum(patch, 0);
const topology_type::label_sequence::iterator cellsEnd = cells->end();
-
// Get parameters used in integration.
const double dt = _dt;
- const ALE::Obj<real_section_type>& density = _parameters->getReal("density");
// Allocate vector for cell values (if necessary)
_initCellVector();
@@ -93,10 +105,10 @@
const int numBasis = _quadrature->numCorners();
const int spaceDim = _quadrature->spaceDim();
- // Restrict material properties material database to quadrature
- // points for this cell
- const real_section_type::value_type* densityCell =
- density->restrict(patch, *cellIter);
+ // Get material physical properties at quadrature points for this cell
+ _material->calcProperties(*cellIter, patch, numQuadPts);
+ const double* density = _material->density();
+ const double* elasticConsts = _material->elasticConsts();
// Compute action for cell
@@ -104,7 +116,7 @@
const double dt2 = dt*dt;
for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
const double wt =
- quadWts[iQuad] * jacobianDet[iQuad] * densityCell[iQuad] / dt2;
+ quadWts[iQuad] * jacobianDet[iQuad] * density[iQuad] / dt2;
for (int iBasis=0, iQ=iQuad*numBasis; iBasis < numBasis; ++iBasis) {
const int iBlock = iBasis * spaceDim;
const double valI = wt*basis[iQ+iBasis];
@@ -140,86 +152,8 @@
const ALE::Obj<real_section_type>& dispT,
const ALE::Obj<real_section_type>& coordinates)
{ // integrateJacobian
- assert(0 != mat);
- assert(0 != _quadrature);
- PetscErrorCode err;
+} // integrateJacobian
- // Get information about section
- const topology_type::patch_type patch = 0;
- const ALE::Obj<topology_type>& topology = coordinates->getTopology();
- const ALE::Obj<topology_type::label_sequence>& cells =
- topology->heightStratum(patch, 0);
- const topology_type::label_sequence::iterator cellsEnd = cells->end();
- const ALE::Obj<ALE::Mesh::order_type>& globalOrder =
- ALE::New::NumberingFactory<topology_type>::singleton(
- topology->debug())->getGlobalOrder(topology, patch,
- dispT->getName(),
- dispT->getAtlas());
-
- // Setup symmetric, sparse matrix
- // :TODO: This needs to be moved outside Integrator object, because
- // integrator object will be specific to cell type and material type
- int localSize = globalOrder->getLocalSize();
- int globalSize = globalOrder->getGlobalSize();
- err = MatCreate(topology->comm(), mat);
- err = MatSetSizes(*mat, localSize, localSize, globalSize, globalSize);
- err = MatSetFromOptions(*mat);
- err = preallocateMatrix(topology, dispT->getAtlas(), globalOrder, *mat);
-
- // Get parameters used in integration.
- const ALE::Obj<real_section_type>& density = _parameters->getReal("density");
-
- // Allocate matrix for cell values (if necessary)
- _initCellMatrix();
-
- for (topology_type::label_sequence::iterator cellIter=cells->begin();
- cellIter != cellsEnd;
- ++cellIter) {
- // Compute geometry information for current cell
- _quadrature->computeGeometry(coordinates, *cellIter);
-
- // Reset element matrix to zero
- _resetCellMatrix();
-
- // Get cell geometry information
- const int numQuadPts = _quadrature->numQuadPts();
- const double* basis = _quadrature->basis();
- const double* quadPts = _quadrature->quadPts();
- const double* quadWts = _quadrature->quadWts();
- const double* jacobianDet = _quadrature->jacobianDet();
- const int numBasis = _quadrature->numCorners();
- const int spaceDim = _quadrature->spaceDim();
-
- // Restrict material properties material database to quadrature
- // points for this cell
- const real_section_type::value_type* densityCell =
- density->restrict(patch, *cellIter);
-
- // Integrate cell
- for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
- const double wt =
- quadWts[iQuad] * jacobianDet[iQuad] * densityCell[iQuad];
- for (int iBasis=0, iQ=iQuad*numBasis; iBasis < numBasis; ++iBasis) {
- const int iBlock = iBasis * spaceDim;
- const double valI = wt*basis[iQ+iBasis];
- for (int jBasis=0; jBasis < numBasis; ++jBasis) {
- const int jBlock = jBasis * spaceDim;
- const double val = valI * basis[iQ+jBasis];
- for (int iDim=0; iDim < spaceDim; ++iDim)
- _cellMatrix[(iBlock+iDim)*(numBasis*spaceDim)+jBlock+iDim] += val;
- } // for
- } // for
- } // for
- err = PetscLogFlops(numQuadPts*(2+numBasis*(1+numBasis*(1+spaceDim))));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
-
- // Assemble cell contribution into sparse matrix
- err = updateOperator(*mat, dispT, globalOrder, *cellIter, _cellMatrix,
- ADD_VALUES);
- } // for
-} // integrateResidual
-
// ----------------------------------------------------------------------
// Compute lumped matrix associated with operator.
void
@@ -228,133 +162,17 @@
const ALE::Obj<real_section_type>& dispT,
const ALE::Obj<real_section_type>& coordinates)
{ // integrateJacobian
- assert(0 != _quadrature);
- assert(0 != _parameters);
+} // integrateJacobian
- // Get information about section
- const topology_type::patch_type patch = 0;
- const ALE::Obj<topology_type>& topology = coordinates->getTopology();
- const ALE::Obj<topology_type::label_sequence>& cells =
- topology->heightStratum(patch, 0);
- const topology_type::label_sequence::iterator cellsEnd = cells->end();
-
- const ALE::Obj<real_section_type>& density = _parameters->getReal("density");
-
- // Allocate matrix for cell values (if necessary)
- _initCellVector();
-
- for (topology_type::label_sequence::iterator cellIter=cells->begin();
- cellIter != cellsEnd;
- ++cellIter) {
- // Compute geometry information for current cell
- _quadrature->computeGeometry(coordinates, *cellIter);
-
- // Reset element matrix to zero
- _resetCellVector();
-
- // Get cell geometry information
- const int numQuadPts = _quadrature->numQuadPts();
- const double* basis = _quadrature->basis();
- const double* quadPts = _quadrature->quadPts();
- const double* quadWts = _quadrature->quadWts();
- const double* jacobianDet = _quadrature->jacobianDet();
- const int numBasis = _quadrature->numCorners();
- const int spaceDim = _quadrature->spaceDim();
-
- // Restrict material properties material database to quadrature
- // points for this cell
- const real_section_type::value_type* densityCell =
- density->restrict(patch, *cellIter);
-
- // Compute lumped mass matrix for cell
- for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
- const double wt =
- quadWts[iQuad] * jacobianDet[iQuad] * densityCell[iQuad];
- for (int iBasis=0, iQ=iQuad*numBasis; iBasis < numBasis; ++iBasis) {
- const int iBlock = iBasis * spaceDim;
- const double valI = wt*basis[iQ+iBasis];
- for (int jBasis=0; jBasis < numBasis; ++jBasis) {
- const int jBlock = jBasis * spaceDim;
- const double val = valI*basis[iQ+jBasis];
- for (int iDim=0; iDim < spaceDim; ++iDim)
- _cellVector[iBlock+iDim] += val;
- } // for
- } // for
- } // for
-
- PetscErrorCode err =
- PetscLogFlops(numQuadPts*(2+numBasis*(1+numBasis*(1+spaceDim))));
- if (err)
- throw std::runtime_error("Logging PETSc flops failed.");
-
- // Assemble cell contribution into field
- fieldOut->updateAdd(patch, *cellIter, _cellVector);
- } // for
-} // integrateLumped
-
// ----------------------------------------------------------------------
// Setup material property parameters by querying database.
void
-pylith::feassemble::ExplicitElasticity::setupMatProp(ALE::Obj<ALE::Mesh>& mesh,
- spatialdata::geocoords::CoordSys* cs,
- spatialdata::spatialdb::SpatialDB* db)
-{ // setupMatProp
- assert(0 != cs);
- assert(0 != db);
- assert(0 != _parameters);
+pylith::feassemble::ExplicitElasticity::initialize(ALE::Obj<ALE::Mesh>& mesh,
+ spatialdata::geocoords::CoordSys* cs)
+{ // initialize
+ assert(0 != _material);
+ _material->initialize(mesh, cs, _quadrature);
+} // initialize
- typedef ALE::Mesh::real_section_type real_section_type;
- typedef ALE::Mesh::topology_type topology_type;
- _parameters->addReal("density");
- const ALE::Obj<real_section_type>& density = _parameters->getReal("density");
-
- const int numQuadPts = _quadrature->numQuadPts();
- const ALE::Mesh::int_section_type::patch_type patch = 0;
- const int fiberDim = numQuadPts; // number of values in field per cell
- density->setFiberDimensionByDepth(patch, 0, fiberDim);
- density->allocate();
-
- // Open database
- db->open();
- const int numVals = 1;
- const char* names[numVals];
- names[0] = "density";
- db->queryVals(names, numVals);
-
- const ALE::Obj<real_section_type>& coordinates =
- mesh->getRealSection("coordinates");
- const ALE::Obj<topology_type>& topology = coordinates->getTopology();
- const ALE::Obj<topology_type::label_sequence>& cells =
- topology->heightStratum(patch, 0);
- const topology_type::label_sequence::iterator cellsEnd = cells->end();
-
- // Loop over cells
- double* cellDensity = (numQuadPts > 0) ? new double[numQuadPts] : 0;
- for (topology_type::label_sequence::iterator cellIter=cells->begin();
- cellIter != cellsEnd;
- ++cellIter) {
- // Compute geometry information for current cell
- _quadrature->computeGeometry(coordinates, *cellIter);
-
- const double* quadPts = _quadrature->quadPts();
- const int spaceDim = _quadrature->spaceDim();
-
- // Loop over quadrature points in cell and query database
- for (int iQuadPt=0, index=0;
- iQuadPt < numQuadPts;
- ++iQuadPt, index+=spaceDim)
- // account for differences in spaceDim
- const int err = db->query(&cellDensity[iQuadPt], numVals,
- &quadPts[index], spaceDim, cs);
- // Assemble cell contribution into field
- density->updateAdd(patch, *cellIter, cellDensity);
- } // for
- delete[] cellDensity; cellDensity = 0;
-
- // Close database
- db->close();
-} // setupMatProp
-
-
// End of file
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.hh 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.hh 2007-03-12 03:17:31 UTC (rev 6226)
@@ -57,6 +57,10 @@
class ExplicitElasticity;
class TestExplicitElasticity;
} // feassemble
+
+ namespace materials {
+ class ElasticMaterial;
+ } // feassemble
} // pylith
namespace spatialdata {
@@ -84,6 +88,12 @@
/// Create a copy of this object.
IntegratorExplicit* clone(void) const;
+ /** Set material.
+ *
+ * @param m Elastic material.
+ */
+ void material(const materials::ElasticMaterial* m);
+
/** Integrate residual term (b) for dynamic elasticity term
* for 3-D finite elements.
*
@@ -125,11 +135,9 @@
*
* @param mesh PETSc mesh
* @param cs Pointer to coordinate system of vertices
- * @param db Pointer to spatial database with material property parameters
*/
- void setupMatProp(ALE::Obj<ALE::Mesh>& mesh,
- spatialdata::geocoords::CoordSys* cs,
- spatialdata::spatialdb::SpatialDB* db);
+ void initialize(ALE::Obj<ALE::Mesh>& mesh,
+ spatialdata::geocoords::CoordSys* cs);
// PROTECTED METHODS ////////////////////////////////////////////////////
protected :
@@ -146,6 +154,12 @@
/// Not implemented
const ExplicitElasticity& operator=(const ExplicitElasticity&);
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private :
+
+ /// Elastic material associated with integrator
+ materials::ElasticMaterial* _material;
+
}; // ExplicitElasticity
#include "ExplicitElasticity.icc" // inline methods
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc 2007-03-12 03:17:31 UTC (rev 6226)
@@ -15,7 +15,6 @@
#include "Integrator.hh" // implementation of class methods
#include "Quadrature.hh" // USES Quadrature
-#include "ParameterManager.hh" // USES ParameterManager
#include <assert.h> // USES assert()
@@ -23,7 +22,6 @@
// Constructor
pylith::feassemble::Integrator::Integrator(void) :
_quadrature(0),
- _parameters(0),
_cellVector(0),
_cellMatrix(0)
{ // constructor
@@ -34,7 +32,6 @@
pylith::feassemble::Integrator::~Integrator(void)
{ // destructor
delete _quadrature; _quadrature = 0;
- delete _parameters; _parameters = 0;
delete[] _cellVector; _cellVector = 0;
delete[] _cellMatrix; _cellMatrix = 0;
} // destructor
@@ -43,7 +40,6 @@
// Copy constructor
pylith::feassemble::Integrator::Integrator(const Integrator& i) :
_quadrature(0),
- _parameters(0),
_cellVector(0),
_cellMatrix(0)
{ // copy constructor
@@ -65,14 +61,6 @@
} // quadrature
// ----------------------------------------------------------------------
-// Create parameter manager.
-void
-pylith::feassemble::Integrator::createParameters(const ALE::Obj<ALE::Mesh>& mesh)
-{ // createParameters
- delete _parameters; _parameters = new ParameterManager(mesh);
-} // createParameters
-
-// ----------------------------------------------------------------------
// Initialize vector containing result of integration action for cell.
void
pylith::feassemble::Integrator::_initCellVector(void)
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Integrator.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Integrator.hh 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Integrator.hh 2007-03-12 03:17:31 UTC (rev 6226)
@@ -58,18 +58,13 @@
virtual
~Integrator(void);
- /** Set quadrature for integrating finite-element quantities.
+ /** Set quadrature for integrating finite-element
+ * quantities. Quadrature should already be initialized.
*
* @param q Quadrature for integrating.
*/
void quadrature(const Quadrature* q);
- /** Create manager for parameters.
- *
- * @param mesh PETSc mesh associated with integrator.
- */
- void createParameters(const ALE::Obj<ALE::Mesh>& mesh);
-
// PROTECTED METHODS ////////////////////////////////////////////////////
protected :
@@ -102,9 +97,6 @@
Quadrature* _quadrature; ///< Quadrature for integrating finite-element
- /// Manager for parameters needed by integrator
- ParameterManager* _parameters;
-
/// Vector local to cell containing result of integration action
real_section_type::value_type* _cellVector;
Modified: short/3D/PyLith/trunk/libsrc/feassemble/IntegratorExplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/IntegratorExplicit.cc 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/feassemble/IntegratorExplicit.cc 2007-03-12 03:17:31 UTC (rev 6226)
@@ -46,7 +46,7 @@
{ // timeStep
_dtm1 = _dt;
_dt = dt;
- assert(_dt == _dtm1);
+ assert(_dt == _dtm1); // For now, don't allow variable time step
} // timeStep
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/materials/Material.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/Material.hh 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/materials/Material.hh 2007-03-12 03:17:31 UTC (rev 6226)
@@ -68,9 +68,9 @@
/** Set database for physical property parameters.
*
- * @param pDB Pointer to database.
+ * @param value Pointer to database.
*/
- void parametersDB(spatialdata::spatialdb::SpatialDB* db);
+ void db(spatialdata::spatialdb::SpatialDB* value);
/** Set identifier of material.
*
Modified: short/3D/PyLith/trunk/libsrc/materials/Material.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/Material.icc 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/materials/Material.icc 2007-03-12 03:17:31 UTC (rev 6226)
@@ -17,8 +17,8 @@
// Set database for material parameters.
inline
void
-pylith::materials::Material::parametersDB(spatialdata::spatialdb::SpatialDB* db) {
- _db = db;
+pylith::materials::Material::db(spatialdata::spatialdb::SpatialDB* value) {
+ _db = value;
}
// Set identifier of material.
Added: short/3D/PyLith/trunk/libsrc/topology/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Makefile.am 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/topology/Makefile.am 2007-03-12 03:17:31 UTC (rev 6226)
@@ -0,0 +1,27 @@
+# -*- Makefile -*-
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+subpackage = topology
+include $(top_srcdir)/subpackage.am
+
+subpkginclude_HEADERS = \
+ Mesh.hh
+
+noinst_HEADERS =
+
+# export
+clean-local: clean-subpkgincludeHEADERS
+BUILT_SOURCES = export-subpkgincludeHEADERS
+CLEANFILES = export-subpkgincludeHEADERS
+
+
+# End of file
Added: short/3D/PyLith/trunk/libsrc/topology/Mesh.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Mesh.hh 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/libsrc/topology/Mesh.hh 2007-03-12 03:17:31 UTC (rev 6226)
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/**
+ * @file pylith/topology/Mesh.hh
+ *
+ * @brief Type definitions for use of PETSc mesh in PyLith.
+ */
+
+#if !defined(pylith_topology_mesh_hh)
+#define pylith_topology_mesh_hh
+
+namespace pylith {
+ namespace topology {
+ class Mesh;
+ } // topology
+} // pylith
+
+class pylith::topology::Mesh
+{ // Mesh
+
+ // PUBLIC TYPEDEFS //////////////////////////////////////////////////////
+public :
+
+ typedef ALE::Obj Obj;
+ typedef ALE::Mesh Mesh;
+ typedef Mesh::topology_type topology_type;
+ typedef topology_type::point_type point_type;
+ typedef Mesh::real_section_type real_section_type;
+
+}; // Mesh
+
+
+#endif // pylith_topology_mesh_hh
Modified: short/3D/PyLith/trunk/pylith/materials/Material.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/Material.py 2007-03-12 02:52:14 UTC (rev 6225)
+++ short/3D/PyLith/trunk/pylith/materials/Material.py 2007-03-12 03:17:31 UTC (rev 6226)
@@ -90,9 +90,10 @@
Initialize material property manager.
"""
self._info.log("Initializing material '%s'." % self.matname)
+ self.db.initialize()
#self.cppHandle.id = self.id
#self.cppHandle.matname = self.matname
- self.db.initialize()
+ #self.cppHandle.db = self.db
return
More information about the cig-commits
mailing list