瀏覽代碼

Added catch for which g integration to use, incomplete, does not yet include point sources such as for DC.

master
Trevor Irons 8 年之前
父節點
當前提交
16442de35c
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8
    2
      src/FEM4EllipticPDE.cpp

+ 8
- 2
src/FEM4EllipticPDE.cpp 查看文件

@@ -202,8 +202,14 @@ namespace Lemma {
202 202
     void FEM4EllipticPDE::Solve( const std::string& resfile ) {
203 203
         ConstructAMatrix();
204 204
         //SetupLineSourcePotential();
205
-        SetupSurfaceSourcePotential();
206
-        //SetupPotential();
205
+
206
+        if (vtkGrid->GetPointData()->GetScalars("G") ) {
207
+            SetupSurfaceSourcePotential();
208
+        } else if (vtkGrid->GetCellData()->GetScalars("G") ) {
209
+            SetupPotential();
210
+        }
211
+
212
+
207 213
         //ConstructLoadVector();
208 214
 
209 215
         std::cout << "\nSolving" << std::endl;

Loading…
取消
儲存