Skip to content

Commit

Permalink
Remove --plot-charges option to validations
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-vv committed Nov 17, 2024
1 parent ee03688 commit 145aca9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions validation/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ def parse_args(self):

parser.add_argument('-MSF', '--mesh-size-factor', dest='MSF', default=None, type=int, help='Mesh size factor')
parser.add_argument('--symmetry', choices=['3d', 'radial'], default='radial', help='Choose the symmetry to use for the geometry (3d or radially symmetric)')
parser.add_argument('--higher-order', action='store_true', help='Use higher order (curved) elements')
parser.add_argument('--higher-order', action='store_true', help='Use higher order curved line elements, only valid in radial symmetric geometries')
parser.add_argument('--plot-accuracy', action='store_true', help='Plot the accuracy as a function of time and number of elements')
parser.add_argument('--plot-geometry', action='store_true', help='Plot the geometry')
parser.add_argument('--plot-normals', action='store_true', help='When plotting geometry, show normals')
parser.add_argument('--plot-charges', action='store_true', help='When plotting geometry, base the colors on the charge on each element')
parser.add_argument('--use-fmm', action='store_true', help='Use fast multipole method to solve 3D geometry')
parser.add_argument('--fmm-precision', type=int, default=12, help='Number of element (l_max) to use in multipole expansion')

Expand All @@ -54,7 +53,7 @@ def supports_fmm(self):
def supports_3d(self):
return True

def plot_geometry(self, MSF, symmetry, higher_order=False, plot_charges=False, plot_normals=False):
def plot_geometry(self, MSF, symmetry, higher_order=False, plot_normals=False):
geom = self.create_mesh(MSF, symmetry, higher_order)
P.plot_mesh(geom, show_normals=plot_normals, **self.plot_colors)

Expand Down Expand Up @@ -134,14 +133,12 @@ def run_validation(self):

assert args.symmetry != '3d' or not args.higher_order, "Higher order meshes not supported in 3D"

plot = args.plot_geometry or args.plot_normals or args.plot_charges
plot = args.plot_geometry or args.plot_normals
symmetry = self.args_to_symmetry(args)
MSF = args.MSF if args.MSF != None else self.default_MSF(symmetry)[1]

if plot:
self.plot_geometry(MSF, symmetry, higher_order=args.higher_order,
plot_charges=args.plot_charges,
plot_normals=args.plot_normals)
self.plot_geometry(MSF, symmetry, higher_order=args.higher_order, plot_normals=args.plot_normals)
elif args.plot_accuracy:
self.plot_accuracy(self.default_MSF(symmetry), symmetry)
else:
Expand Down

0 comments on commit 145aca9

Please sign in to comment.