class_docstr: Base class for a simplicial complex described as a cache of vertices
  together with their connections.
  
  Important methods:
      Domain triangulation:
              Complex.triangulate, Complex.split_generation
      Triangulating arbitrary points (must be traingulable,
          may exist outside domain):
              Complex.triangulate(sample_set)
      Converting another simplicial complex structure data type to the
          structure used in Complex (ex. OBJ wavefront)
              Complex.convert(datatype, data)
  
  Important objects:
      HC.V: The cache of vertices and their connection
      HC.H: Storage structure of all vertex groups
  
  Parameters
  ----------
  dim : int
      Spatial dimensionality of the complex R^dim
  domain : list of tuples, optional
      The bounds [x_l, x_u]^dim of the hyperrectangle space
      ex. The default domain is the hyperrectangle [0, 1]^dim
      Note: The domain must be convex, non-convex spaces can be cut
            away from this domain using the non-linear
            g_cons functions to define any arbitrary domain
            (these domains may also be disconnected from each other)
  sfield :
      A scalar function defined in the associated domain f: R^dim --> R
  sfield_args : tuple
      Additional arguments to be passed to `sfield`
  vfield :
      A scalar function defined in the associated domain
                     f: R^dim --> R^m
                 (for example a gradient function of the scalar field)
  vfield_args : tuple
      Additional arguments to be passed to vfield
  symmetry : None or list
          Specify if the objective function contains symmetric variables.
          The search space (and therefore performance) is decreased by up to
          O(n!) times in the fully symmetric case.
  
          E.g.  f(x) = (x_1 + x_2 + x_3) + (x_4)**2 + (x_5)**2 + (x_6)**2
  
          In this equation x_2 and x_3 are symmetric to x_1, while x_5 and
           x_6 are symmetric to x_4, this can be specified to the solver as:
  
          symmetry = [0,  # Variable 1
                      0,  # symmetric to variable 1
                      0,  # symmetric to variable 1
                      3,  # Variable 4
                      3,  # symmetric to variable 4
                      3,  # symmetric to variable 4
                      ]
  
  constraints : dict or sequence of dict, optional
      Constraints definition.
      Function(s) ``R**n`` in the form::
  
          g(x) <= 0 applied as g : R^n -> R^m
          h(x) == 0 applied as h : R^n -> R^p
  
      Each constraint is defined in a dictionary with fields:
  
          type : str
              Constraint type: 'eq' for equality, 'ineq' for inequality.
          fun : callable
              The function defining the constraint.
          jac : callable, optional
              The Jacobian of `fun` (only for SLSQP).
          args : sequence, optional
              Extra arguments to be passed to the function and Jacobian.
  
      Equality constraint means that the constraint function result is to
      be zero whereas inequality means that it is to be
      non-negative.constraints : dict or sequence of dict, optional
      Constraints definition.
      Function(s) ``R**n`` in the form::
  
          g(x) <= 0 applied as g : R^n -> R^m
          h(x) == 0 applied as h : R^n -> R^p
  
      Each constraint is defined in a dictionary with fields:
  
          type : str
              Constraint type: 'eq' for equality, 'ineq' for inequality.
          fun : callable
              The function defining the constraint.
          jac : callable, optional
              The Jacobian of `fun` (unused).
          args : sequence, optional
              Extra arguments to be passed to the function and Jacobian.
  
      Equality constraint means that the constraint function result is to
      be zero whereas inequality means that it is to be non-negative.
  
  workers : int  optional
      Uses `multiprocessing.Pool <multiprocessing>`) to compute the field
       functions in parallel.
docstr: Refine the entire domain of the current complex.
docstr_tok: ["Refine","the","entire","domain","of","the","current","complex","."]
code: def refine_all(self, centroids=True):
      """Refine the entire domain of the current complex."""
      try:
          self.triangulated_vectors
          tvs = copy.copy(self.triangulated_vectors)
          for i, vp in enumerate(tvs):
              self.rls = self.refine_local_space(
                  *vp, bounds=self.bounds
              )
              for i in self.rls:
                  i
      except AttributeError as ae:
          if (
              str(ae) == "'Complex' object has no attribute "
              "'triangulated_vectors'"
          ):
              self.triangulate(
                  symmetry=self.symmetry, centroid=centroids
              )
          else:
              raise
  
      # This adds a centroid to every new sub-domain generated and defined
      # by self.triangulated_vectors, in addition the vertices ! to complete
      # the triangulation
      return
  
imports: import copy
  import logging
  import itertools
  import decimal
  from functools import cache
  import numpy
  from ._vertex import VertexCacheField, VertexCacheIndex
label_desc: Use image node_id 6 for calling the Complex obj's underlying member method code with example usage: obj.refine_all(centroids) without return types