Browse Source

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

master
Trevor Irons 8 years ago
parent
commit
16442de35c
1 changed files with 8 additions and 2 deletions
  1. 8
    2
      src/FEM4EllipticPDE.cpp

+ 8
- 2
src/FEM4EllipticPDE.cpp View File

@@ -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…
Cancel
Save