[cig-commits] r6794 - in short/3D/PyLith/trunk/libsrc: . feassemble

willic3 at geodynamics.org willic3 at geodynamics.org
Mon May 7 13:33:02 PDT 2007


Author: willic3
Date: 2007-05-07 13:33:02 -0700 (Mon, 07 May 2007)
New Revision: 6794

Modified:
   short/3D/PyLith/trunk/libsrc/Makefile.am
   short/3D/PyLith/trunk/libsrc/feassemble/ImplicitElasticity.cc
   short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.hh
   short/3D/PyLith/trunk/libsrc/feassemble/Makefile.am
Log:
Fixed compilation bugs.  ImplicitElasticity and IntegratorImplicit
compile now.



Modified: short/3D/PyLith/trunk/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/Makefile.am	2007-05-07 19:32:23 UTC (rev 6793)
+++ short/3D/PyLith/trunk/libsrc/Makefile.am	2007-05-07 20:33:02 UTC (rev 6794)
@@ -29,9 +29,11 @@
 	faults/FaultCohesiveKin.cc \
 	faults/SlipTimeFn.cc \
 	feassemble/ExplicitElasticity.cc \
+	feassemble/ImplicitElasticity.cc \
 	feassemble/Integrator.cc \
 	feassemble/IntegratorElasticity.cc \
 	feassemble/IntegratorExplicit.cc \
+	feassemble/IntegratorImplicit.cc \
 	feassemble/Quadrature.cc \
 	feassemble/Quadrature1D.cc \
 	feassemble/Quadrature1Din2D.cc \

Modified: short/3D/PyLith/trunk/libsrc/feassemble/ImplicitElasticity.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ImplicitElasticity.cc	2007-05-07 19:32:23 UTC (rev 6793)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ImplicitElasticity.cc	2007-05-07 20:33:02 UTC (rev 6794)
@@ -398,9 +398,8 @@
 					      dispTCell, numBasis);
 
       // Get "elasticity" matrix at quadrature points for this cell
-      const double_array& elasticConsts = _material->calcDerivElastic(&totalStrain);
-      const int numElasticConsts = _material->_numElasticConsts();
-      assert(1 == numElasticConsts);
+      const std::vector<double_array>& elasticConsts = 
+	_material->calcDerivElastic(totalStrain);
 
       // Compute Jacobian for consistent tangent matrix
       for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
@@ -409,7 +408,7 @@
 	for (int iBasis=0, iQ=iQuad*numBasis; iBasis < numBasis; ++iBasis) {
 	  const int iBlock = iBasis * spaceDim;
 	  const double valI = wt*basisDeriv[iQ+iBasis]*C1111;
-	  for (int jBasis=0; jBasis < numBasis; ++jBasis] {
+	  for (int jBasis=0; jBasis < numBasis; ++jBasis) {
 	    const int jBlock = jBasis * spaceDim;
 	    const double valIJ = valI * basisDeriv[iQ+jBasis];
 	    _cellMatrix[iBlock+jBlock] += valIJ;
@@ -428,9 +427,8 @@
 					      dispTCell, numBasis);
 
       // Get "elasticity" matrix at quadrature points for this cell
-      const double_array& elasticConsts = _material->calcDerivElastic(&totalStrain);
-      const int numElasticConsts = _material->_numElasticConsts();
-      assert(6 == numElasticConsts);
+      const std::vector<double_array>& elasticConsts = 
+	_material->calcDerivElastic(totalStrain);
 
       // Compute Jacobian for consistent tangent matrix
       for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
@@ -440,7 +438,7 @@
         const double C1112 = elasticConsts[iQuad][2];
         const double C2222 = elasticConsts[iQuad][3];
         const double C2212 = elasticConsts[iQuad][4];
-        const double C1212 = elasticConsts[iQuad][5];
+	const double C1212 = elasticConsts[iQuad][5];
         for (int iBasis=0, iQ=iQuad*numBasis; iBasis < numBasis; ++iBasis) {
           const int iBlock = iBasis * spaceDim;
           const double Nip = wt*basisDeriv[iQ+iBasis*cellDim  ];
@@ -473,13 +471,12 @@
     // 3D Case
     } else if (3 == cellDim) {
       // Compute strains
-      IntegratorElasticity::calcTotalStrain2D(&totalStrain, basisDeriv,
+      IntegratorElasticity::calcTotalStrain3D(&totalStrain, basisDeriv,
 					      dispTCell, numBasis);
 
       // Get "elasticity" matrix at quadrature points for this cell
-      const double_array& elasticConsts = _material->calcDerivElastic(&totalStrain);
-      const int numElasticConsts = _material->_numElasticConsts();
-      assert(21 == numElasticConsts);
+      const std::vector<double_array>& elasticConsts = 
+	_material->calcDerivElastic(totalStrain);
 
       // Compute Jacobian for consistent tangent matrix
       for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {

Modified: short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.hh	2007-05-07 19:32:23 UTC (rev 6793)
+++ short/3D/PyLith/trunk/libsrc/feassemble/IntegratorImplicit.hh	2007-05-07 20:33:02 UTC (rev 6794)
@@ -78,15 +78,24 @@
    *
    * @param fieldOut Constant field (output)
    * @param fieldInT Input field at time t
-   * @param fieldInTmdt Input field at time t-dt
-   * @param coordinates Field of cell vertex coordinates
+   * @param mesh Mesh object
    */
   virtual 
   void integrateConstant(const ALE::Obj<real_section_type>& fieldOut,
 			 const ALE::Obj<real_section_type>& fieldInT,
-			 const ALE::Obj<real_section_type>& fieldInTmdt,
 			 const ALE::Obj<Mesh>& mesh) = 0;
 
+  /** Integrate residual for quasi-static finite elements.
+   *
+   * @param fieldOut Constant field (output)
+   * @param fieldInT Input field at time t
+   * @param mesh Mesh object
+   */
+  virtual 
+  void integrateResidual(const ALE::Obj<real_section_type>& fieldOut,
+			 const ALE::Obj<real_section_type>& fieldInT,
+			 const ALE::Obj<Mesh>& mesh) = 0;
+
   /** Compute Jacobian matrix (A) associated with operator.
    *
    * @param mat Sparse matrix

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Makefile.am	2007-05-07 19:32:23 UTC (rev 6793)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Makefile.am	2007-05-07 20:33:02 UTC (rev 6794)
@@ -16,9 +16,12 @@
 subpkginclude_HEADERS = \
 	ExplicitElasticity.hh \
 	ExplicitElasticity.icc \
+	ImplicitElasticity.hh \
+	ImplicitElasticity.icc \
 	Integrator.hh \
 	IntegratorElasticity.hh \
 	IntegratorExplicit.hh \
+	IntegratorImplicit.hh \
 	Quadrature.hh \
 	Quadrature.icc \
 	Quadrature1D.hh \



More information about the cig-commits mailing list