Commit 81844aa8 authored by Daniel Brown's avatar Daniel Brown
Browse files

more refactoring, some circular import got created somehow a few commits ago...

more refactoring, some circular import got created somehow a few commits ago between KnmConnectorWorkspace and CarrierSignalSimulation, not sure why this wasn't an issue before, WIP
parent c77f1b21
......@@ -2,7 +2,8 @@ from finesse.cmatrix cimport SubCCSView, SubCCSView2DArray
from finesse.cymath cimport complex_t
from finesse.cymath.complex cimport cexp, crotate, conj
from finesse.cymath.math cimport radians, cosh, sinh
from finesse.simulations.base cimport frequency_info_t, NodeBeamParam
from finesse.frequency cimport frequency_info_t
from finesse.simulations.base cimport NodeBeamParam
from finesse.simulations.basematrix cimport MatrixSystemSolver, CarrierSignalMatrixSimulation
import numpy as np
cimport numpy as np
......
......@@ -7,18 +7,19 @@ description of the contents of each.
# from finesse.simulations.access import AccessSimulation
# from finesse.simulations.base import BaseSimulation
# from finesse.simulations.basematrix import CarrierSignalMatrixSimulation
from finesse.simulations.basematrix import CarrierSignalMatrixSimulation
# from finesse.simulations.digraph import DigraphSimulation, DigraphSimulationBase
# from finesse.simulations.debug import DebugSimulation
# from finesse.simulations.dense import DenseSimulation
# __all__ = (
# "AccessSimulation",
# "BaseSimulation",
# "CarrierSignalMatrixSimulation",
# "DigraphSimulation",
# "DigraphSimulationBase",
# "DebugSimulation",
# "DenseSimulation",
# )
__all__ = (
# "AccessSimulation",
# "BaseSimulation",
"CarrierSignalMatrixSimulation",
# "DigraphSimulation",
# "DigraphSimulationBase",
# "DebugSimulation",
# "DenseSimulation",
)
cimport numpy as np
from finesse.cymath cimport complex_t
from finesse.cymath.gaussbeam cimport beam_param
from finesse.tracing.ctracer cimport TraceForest, TraceTree
from finesse.frequency cimport frequency_info_t, FrequencyContainer
from cpython.ref cimport PyObject
cdef struct NodeInfoEntry:
Py_ssize_t index
Py_ssize_t rhs_index
Py_ssize_t freq_index
Py_ssize_t nfreqs # number of frequencies
Py_ssize_t nhoms # number of HOMs
frequency_info_t *frequencies # Frequencies present at this node, size nfreqs
cdef struct NodeBeamParam:
......
import contextlib
import logging
cimport cython
cimport numpy as np
import numpy as np
import networkx as nx
from finesse.cymath cimport complex_t
from finesse.cymath.complex cimport conj
from finesse.cymath.math cimport float_eq
from finesse.cymath.gaussbeam cimport transform_q, inv_transform_q
from finesse.element cimport ElementWorkspace
from finesse.frequency cimport Frequency
from finesse.components.workspace cimport ConnectorCallbacks, ConnectorWorkspace
from finesse.components.node import NodeType
from finesse.components.modal.cavity cimport CavityWorkspace
from cpython.ref cimport PyObject
from libc.stdio cimport printf
cdef extern from "stdlib.h":
void free(void* ptr)
void* malloc(size_t size)
void* calloc(size_t N, size_t size)
cdef extern from "constants.h":
long double PI
double C_LIGHT
double complex COMPLEX_0
LOGGER = logging.getLogger(__name__)
cdef class ModelData:
pass
from finesse.cmatrix cimport CCSMatrix
from finesse.cymath cimport complex_t
from finesse.tracing.ctracer cimport TraceForest, TraceTree
from finesse.simulations.base cimport ModelData, NodeBeamParam, NodeInfoEntry, SimConfigData
from finesse.simulations.base cimport ModelData, NodeBeamParam, SimConfigData
from finesse.frequency cimport frequency_info_t, FrequencyContainer, Frequency
from cpython.ref cimport PyObject
from finesse.components.workspace cimport ConnectorWorkspace
......@@ -12,6 +12,17 @@ cdef extern from "constants.h":
double C_LIGHT
double complex COMPLEX_0
# Structure to store the various information about each individual node
# such as where the node sits in the RHS vector, what the unique index is
# in a given simulation.
cdef struct NodeInfoEntry:
Py_ssize_t index # unique index
Py_ssize_t rhs_index # index node starts in RHS vector
Py_ssize_t freq_index
Py_ssize_t nfreqs # number of frequencies at this node
Py_ssize_t nhoms # number of HOMs at this node
frequency_info_t *frequencies # Frequencies array present at this node, size nfreqs
cdef class MatrixSystemWorkspaces:
cdef readonly:
......
......@@ -17,7 +17,6 @@ from finesse.detectors.general import NoiseDetector
from finesse.components.general import NoiseType
from finesse.components.readout import _Readout
from finesse.components.node import NodeType
from finesse.simulations.base cimport NodeInfoEntry
from finesse.frequency cimport Frequency, frequency_info_t, FrequencyContainer
from finesse.components.workspace cimport ConnectionSetting
from finesse.cymath cimport complex_t
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment