Giter Club home page Giter Club logo

Comments (9)

tdowrick avatar tdowrick commented on June 3, 2024

Hi,

Can you copy & paste the contents of your standardparams and parameter files?

Thanks

from peits.

Jimbles avatar Jimbles commented on June 3, 2024

hey, it looks like it is having a problem reading your electrode.use_node_assignment which is part of the param_3Dcyl file. which is specified in the parameter file with the line paramfile: ../data/param_$(mesh)
double check this is in the correct place. If you are using the Nodes to assign the electrodes, then I think you need to double check your param_3Dcyl as you need the equivalent line to this electrode.nodes: ../data/electrode_nodes_TA052_meters

from peits.

Jimbles avatar Jimbles commented on June 3, 2024

also, check out the functions run_forward_solver.m and write_parameter_files.m as these already allow you to write the parameter files and run call the forward solver

from peits.

ca-ja avatar ca-ja commented on June 3, 2024

Hi,

Can you copy & paste the contents of your standardparams and parameter files?

Thanks

Ok, here it is:

~/PEITS_root/PEITS/data/standardparams
################# Verbosity ######################
# number of process that prints output (-1 no output)
fem.verboserank: 0
# true for iteration output, false means no output
fem.solver.verbose: false
# write vtk file with solution to first current input
write.vtk: false
# write petsc matrix to matlab readable file - this only works in serial
output.write_matrix: false
# print electrode voltages during execution
output.print_electrode_voltages: false
# write all electrode potentials or only measured voltage?
fem.io.write_only_measured_voltage: true
# shift average voltage
fem.solver.shift_average: false

##### conductivity settings #######
# uniform conductivity?
fem.uniform_conductivity: true
fem.uniform_conductivity_value: 1
# WHETHER CONDUCTIVITY OF MESH FILE IS USED OR CONDUCTIVITIES
# ARE ASSIGNED ACCORDING TO LAYER NUMBERING IS SPECIFIED IN THE MESH PARAMETER FILES

##### electrode settings #####
contact.impedance: 0.01
input.current: 0.01
electrode.diameter: 200
electrode.diameter_file: ../data/electrode_diameters_TA052.txt #set this to "none" if you do not want to
specify individual diameters

##### Parameters for preconditioned linear solver
# preconditioning method: none, ssor, sor, ilu-0, ilu-n, gauss-seidel, jacobi, amg-ilu-0
istl.preconditioning.method: ilu-0
istl.preconditioning.iterations: 1
istl.preconditioning.relaxation: 1.2
# enable simple Jacobi preconditioning (for non istl inverse operators)
fem.preconditioning: true

##### Parameters for output ######
# path for output
fem.prefix: ../output
# time interval for data output
fem.io.savestep: 0.1
# number of calls to write() after which a file is produced
fem.io.savecount: 1
# output format (vtk-cell, vtk-vertex, sub-vtk-cell, sub-vtk-vertex, gnuplot)
fem.io.outputformat: vtk-cell
# also print partitioning for parallel runs
fem.io.partitioning: rank #true

##### Problem setup parameter #####
poisson.problem: EIT

~/PEITS_root/PEITS/data/parameter
### has to be set to 1 / true
fem.resolvevariables: 1

########## Include Standard Settings ##############
paramfile: ../data/standardparams

######### Parameters for input/output #############
fem.io.loadPartitions: false
fem.io.meshPath: ../data/
fem.io.partitionPath: ../partitions/
fem.io.do_elec_volts: true
fem.io.do_jacobian: true
fem.io.do_electrode_jacobian: false
fem.io.outputpath: ../output/

# Meshes
mesh: 3Dcyl
#mesh: unitcube-3d # Cube for debugging => before using it you have to edit the electrode assignment in src/electrodehelpers.hh and build it again

# Separate conductivity file: this file assigns a conductivity value to each finite element
fem.io.load_sigma_separately: false
fem.io.separate_sigma_file: none

# Conductivities: this file encodes the conductivity values for different tissues
conductivities: ../data/conductivities

### include special parameter file for the mesh ###
paramfile: ../data/param_$(mesh)

########## how to make solution unique ############
ground.node: true
ground.epsmass: false

############### PETSc settings ###################
# Preconditioners are: "none", "asm", "sor", "jacobi", "hypre", "ml"; SERIAL: "ilu-n", "lu", "icc"; DIRECT SOLVERS: "mumps", "superlu"
petsc.preconditioning.method: hypre

# Solvers are: "cg" , "bicg", "bicgstab", "gmres"
petsc.kspsolver.method: cg

# tolerance for linear solver
poisson.solvereps: 1e-12

# maximum iterations for linear solver
poisson.solveriter: 10000

############### Current Protocol #################
#current.protocol: ../data/current_protocol.txt # one entry
current.protocol: ../data//home/jc/PEITS_root/PEITS/data/current_protocol_3Dcyl.txt
#current.protocol: ../data/current_protocol_cube.txt # for the cube test

################# Perturbation ##################
mesh.perturbation: false
mesh.perturbation.multORabs: true
mesh.perturbation.value: 1.5
mesh.perturbation.radius: 10
mesh.perturbation.pos_x: 0
mesh.perturbation.pos_y: 0
mesh.perturbation.pos_z: 0

~/PEITS_root/PEITS/data/param_3Dcyl
##### Parameters for 3Dcyl #####
# no. elements: 11675 # no. nodes: 2846 #

fem.io.macroGrid: 3Dcyl.dgf

electrode.use_node_assignment: true

electrode.positions: none

/home/jc/PEITS_root/PEITS/data/electrode_nodes_3Dcyl.txt
surface.coordinates: none

ground.hsquared: 1.5e-5
groundposition.x: -0.093853611626754596
groundposition.y: 0.230431191864336193
groundposition.z: 0.000000000000000000

from peits.

Jimbles avatar Jimbles commented on June 3, 2024

I think the param_3Dcyl is where the error is. The line /home/jc/PEITS_root/PEITS/data/electrode_nodes_3Dcyl.txt is the problem, if its not a comment or an expected parameter, I dont think PEITS can read the whole file properly. You can use the matab functions in the matlab folder in this repo to double check your function writes files in the correct format.

electrode.use_node_assignment: true

electrode.positions: none

/home/jc/PEITS_root/PEITS/data/electrode_nodes_3Dcyl.txt  -- this one
surface.coordinates: none

from peits.

ca-ja avatar ca-ja commented on June 3, 2024

hey, it looks like it is having a problem reading your electrode.use_node_assignment which is part of the param_3Dcyl file. which is specified in the parameter file with the line paramfile: ../data/param_$(mesh)
double check this is in the correct place. If you are using the Nodes to assign the electrodes, then I think you need to double check your param_3Dcyl as you need the equivalent line to this electrode.nodes: ../data/electrode_nodes_TA052_meters

Thank you Jimbles.
I have found the first two mistakes. There is missing electrode.nodes: in my param_3Dcyl file and a bad path to current protocol in the parameter file. I have already fix them. Nevertheless, above-mentioned error persists.

So, the line with link to the file with electrode nodes in the param_3Dcyl file is:
electrode.nodes: /home/jc/PEITS_root/PEITS/data/electrode_nodes_3Dcyl.txt
In this file, there are nodes for each electrode on the separate line (separated by a comma). I guess that it is the correct format, according to a file electrode_nodes_TA052_meters. Which Matlab function for a double check of the electrode nodes did you mean?

from peits.

Jimbles avatar Jimbles commented on June 3, 2024

Hey,

There are two files run_forward_solver.m and write_parameter_files.m which call PEITS from matlab, I think they should write everything including the nodes file. You could also try ignoring the nodes assignment, and instead using the electrode locations - this will check if it is reading the correct file at least. Are you calling PEITS from the correct directory from within matlab?

Also the line current.protocol: ../data//home/jc/PEITS_root/PEITS/data/current_protocol_3Dcyl.txt needs fixing in your parameter file

from peits.

ca-ja avatar ca-ja commented on June 3, 2024

Hey,

There are two files run_forward_solver.m and write_parameter_files.m which call PEITS from matlab, I think they should write everything including the nodes file. You could also try ignoring the nodes assignment, and instead using the electrode locations - this will check if it is reading the correct file at least. Are you calling PEITS from the correct directory from within matlab?

Also the line current.protocol: ../data//home/jc/PEITS_root/PEITS/data/current_protocol_3Dcyl.txt needs fixing in your parameter file

Oh yes. The problem was in the wrong location from which I called PEITS. My stupid mistake ... I am already playing with PEITS.

Thank you very much.

from peits.

Jimbles avatar Jimbles commented on June 3, 2024

No problem! I've done it myself a few times, thats why I thought to suggest it 👍 PEITS could be nicer with its error messages tbf.
I'm glad you are able to starting playing around with it. I'll keep this issue open in case something else doesnt make sense. Please let us know your results

from peits.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.