/[escript]/branches/trilinos_from_5897/dudley/src/Assemble_PDE.cpp
ViewVC logotype

Diff of /branches/trilinos_from_5897/dudley/src/Assemble_PDE.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6089 by caltinay, Tue Mar 22 06:58:00 2016 UTC revision 6090 by caltinay, Wed Mar 23 06:35:54 2016 UTC
# Line 23  Line 23 
23    
24        -(A_{k,i,m,j} u_m,j)_i-(B_{k,i,m} u_m)_i+C_{k,m,j} u_m,j-D_{k,m} u_m = -(X_{k,i})_i + Y_k        -(A_{k,i,m,j} u_m,j)_i-(B_{k,i,m} u_m)_i+C_{k,m,j} u_m,j-D_{k,m} u_m = -(X_{k,i})_i + Y_k
25    
26    u has numComp components.    u has numEqu components.
27    Shape of the coefficients:    Shape of the coefficients:
28    
29        A = numEqu x numDim x numComp x numDim        A = numEqu x numDim x numEqu x numDim
30        B = numDim x numEqu x numComp        B = numDim x numEqu x numEqu
31        C = numEqu x numDim x numComp        C = numEqu x numDim x numEqu
32        D = numEqu x numComp        D = numEqu x numEqu
33        X = numEqu x numDim        X = numEqu x numDim
34        Y = numEqu        Y = numEqu
35    
# Line 154  void Assemble_PDE(const NodeFile* nodes, Line 154  void Assemble_PDE(const NodeFile* nodes,
154      }      }
155    
156      // check the dimensions      // check the dimensions
157      if (p.numEqu != p.numComp) {      if (p.numEqu == 1) {
         throw DudleyException("Assemble_PDE requires number of equations == number of solutions.");  
     } else if (p.numEqu == 1) {  
158          const int dimensions[2] = { p.numDim, p.numDim };          const int dimensions[2] = { p.numDim, p.numDim };
159          if (!A.isDataPointShapeEqual(2, dimensions)) {          if (!A.isDataPointShapeEqual(2, dimensions)) {
160              setShapeError("A", 2, dimensions);              setShapeError("A", 2, dimensions);
# Line 172  void Assemble_PDE(const NodeFile* nodes, Line 170  void Assemble_PDE(const NodeFile* nodes,
170              throw DudleyException("Assemble_PDE: coefficient Y must be rank 0.");              throw DudleyException("Assemble_PDE: coefficient Y must be rank 0.");
171          }          }
172      } else {      } else {
173          const int dimAB[4] = { p.numEqu, p.numDim, p.numComp, p.numDim };          const int dimAB[4] = { p.numEqu, p.numDim, p.numEqu, p.numDim };
174          const int dimCD[3] = { p.numEqu, p.numComp, p.numDim };          const int dimCD[3] = { p.numEqu, p.numEqu, p.numDim };
175          if (!A.isDataPointShapeEqual(4, dimAB)) {          if (!A.isDataPointShapeEqual(4, dimAB)) {
176              setShapeError("A", 4, dimAB);              setShapeError("A", 4, dimAB);
177          } else if (!B.isDataPointShapeEqual(3, dimAB)) {          } else if (!B.isDataPointShapeEqual(3, dimAB)) {

Legend:
Removed from v.6089  
changed lines
  Added in v.6090

  ViewVC Help
Powered by ViewVC 1.1.26