parameters: (paraRefine=0, ncpu=6)
return_statement: return fop, rhoaR, err, paraMesh
docstring: Create Forward operator and synthetic data.
docstring_summary: Create Forward operator and synthetic data.
docstring_tokens: Create Forward operator and synthetic data .
function: def createFopWithParaDomain(paraRefine=0, ncpu=6):
      """Create Forward operator and synthetic data."""
      tMax = 345600 * 3
      satSteps = 800 * 2
      ertSteps = 10
  
      synthPath = 'synth/'
  
      synthArea = 0.1
      paraArea = 0.1
  
      simulateSynth(model=[1e-8, 5e-3, 1e-4, 8e-4],
                    tMax=tMax,
                    satSteps=satSteps,
                    ertSteps=ertSteps,
                    area=synthArea,
                    synthPath=synthPath)
  
      fop = HydroGeophysicalModelling(mesh=None, tMax=tMax,
                                      satSteps=satSteps,
                                      ertSteps=ertSteps,
                                      verbose=1)
  
      rhoaR = np.load(synthPath + 'synthRhoaRatio.npy')
      err = np.load(synthPath + 'synthErr.npy')
  
      fop.setVerbose(True)
      fop.setMultiThreadJacobian(ncpu)
  
      paraMesh = pg.createGrid(x=[-20, -10, 0, 10, 20], y=[-16, -8, -2, 0])
      # top Boundary Marker
      for i, b in enumerate(paraMesh.findBoundaryByMarker(4)):
          b.setMarker(8)
      # right Boundary Marker
      for i, b in enumerate(paraMesh.findBoundaryByMarker(2)):
          b.setMarker(7 - i)
      # bottom Boundary Marker
      for i, b in enumerate(paraMesh.findBoundaryByMarker(3)):
          b.setMarker(4)
      # left boundary Marker
      for i, b in enumerate(paraMesh.findBoundaryByMarker(1)):
          b.setMarker(3-i)
  
  #    ax, _ = pg.show(paraMesh)
  #    pg.viewer.mpl.drawMeshBoundaries(ax=ax, mesh=paraMesh)
  #    pg.wait()
  
      paraMesh.cell(0).setMarker(0)  # bottom
      paraMesh.cell(1).setMarker(0)  # bottom
      paraMesh.cell(2).setMarker(0)  # bottom
      paraMesh.cell(3).setMarker(0)  # bottom
      paraMesh.cell(4).setMarker(2)  # center
      paraMesh.cell(5).setMarker(2)  # center
      paraMesh.cell(6).setMarker(2)  # center
      paraMesh.cell(7).setMarker(2)  # center
      paraMesh.cell(8).setMarker(1)  # top
      paraMesh.cell(9).setMarker(1)  # top
      paraMesh.cell(10).setMarker(1)  # top
      paraMesh.cell(11).setMarker(1)  # top
  
      if paraRefine:
          for i in range(paraRefine):
              paraMesh = paraMesh.createH2()
  
          paraCount = 2
          for c in paraMesh.cells():
              if c.marker() > 1:
                  c.setMarker(paraCount)
                  paraCount += 1
  
          fop.setMesh(paraMesh)
  
          for i in range(fop.regionManager().regionCount()):
              fop.regionManager().region(i).setSingle(1)
      else:
          fop.setMesh(paraMesh)
          fop.createRefinedForwardMesh(refine=False, pRefine=False)
  
      fopMesh = pg.meshtools.createMesh(fop.regionManager().paraDomain(),
                                        area=paraArea, smooth=[1, 10])
  
      fop.setVerbose(True)
      fop.setMesh(fopMesh, ignoreRegionManager=False)
      for i in range(fop.regionManager().regionCount()):
          fop.regionManager().region(i).setSingle(1)
  
      return fop, rhoaR, err, paraMesh
function_tokens: def createFopWithParaDomain ( paraRefine = 0 , ncpu = 6 ) : tMax = 345600 * 3 satSteps = 800 * 2 ertSteps = 10 synthPath = 'synth/' synthArea = 0.1 paraArea = 0.1 simulateSynth ( model = [ 1e-8 , 5e-3 , 1e-4 , 8e-4 ] , tMax = tMax , satSteps = satSteps , ertSteps = ertSteps , area = synthArea , synthPath = synthPath ) fop = HydroGeophysicalModelling ( mesh = None , tMax = tMax , satSteps = satSteps , ertSteps = ertSteps , verbose = 1 ) rhoaR = np . load ( synthPath + 'synthRhoaRatio.npy' ) err = np . load ( synthPath + 'synthErr.npy' ) fop . setVerbose ( True ) fop . setMultiThreadJacobian ( ncpu ) paraMesh = pg . createGrid ( x = [ - 20 , - 10 , 0 , 10 , 20 ] , y = [ - 16 , - 8 , - 2 , 0 ] ) # top Boundary Marker for i , b in enumerate ( paraMesh . findBoundaryByMarker ( 4 ) ) : b . setMarker ( 8 ) # right Boundary Marker for i , b in enumerate ( paraMesh . findBoundaryByMarker ( 2 ) ) : b . setMarker ( 7 - i ) # bottom Boundary Marker for i , b in enumerate ( paraMesh . findBoundaryByMarker ( 3 ) ) : b . setMarker ( 4 ) # left boundary Marker for i , b in enumerate ( paraMesh . findBoundaryByMarker ( 1 ) ) : b . setMarker ( 3 - i ) #    ax, _ = pg.show(paraMesh) #    pg.viewer.mpl.drawMeshBoundaries(ax=ax, mesh=paraMesh) #    pg.wait() paraMesh . cell ( 0 ) . setMarker ( 0 ) # bottom paraMesh . cell ( 1 ) . setMarker ( 0 ) # bottom paraMesh . cell ( 2 ) . setMarker ( 0 ) # bottom paraMesh . cell ( 3 ) . setMarker ( 0 ) # bottom paraMesh . cell ( 4 ) . setMarker ( 2 ) # center paraMesh . cell ( 5 ) . setMarker ( 2 ) # center paraMesh . cell ( 6 ) . setMarker ( 2 ) # center paraMesh . cell ( 7 ) . setMarker ( 2 ) # center paraMesh . cell ( 8 ) . setMarker ( 1 ) # top paraMesh . cell ( 9 ) . setMarker ( 1 ) # top paraMesh . cell ( 10 ) . setMarker ( 1 ) # top paraMesh . cell ( 11 ) . setMarker ( 1 ) # top if paraRefine : for i in range ( paraRefine ) : paraMesh = paraMesh . createH2 ( ) paraCount = 2 for c in paraMesh . cells ( ) : if c . marker ( ) > 1 : c . setMarker ( paraCount ) paraCount += 1 fop . setMesh ( paraMesh ) for i in range ( fop . regionManager ( ) . regionCount ( ) ) : fop . regionManager ( ) . region ( i ) . setSingle ( 1 ) else : fop . setMesh ( paraMesh ) fop . createRefinedForwardMesh ( refine = False , pRefine = False ) fopMesh = pg . meshtools . createMesh ( fop . regionManager ( ) . paraDomain ( ) , area = paraArea , smooth = [ 1 , 10 ] ) fop . setVerbose ( True ) fop . setMesh ( fopMesh , ignoreRegionManager = False ) for i in range ( fop . regionManager ( ) . regionCount ( ) ) : fop . regionManager ( ) . region ( i ) . setSingle ( 1 ) return fop , rhoaR , err , paraMesh