This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Solve the 3D diffusion equation using CN and finite differences.""" | |
from time import sleep | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
from pylab import * | |
# The total number of nodes | |
nodx = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Solve the 2D diffusion equation using CN and finite differences.""" | |
from time import sleep | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
from pylab import * | |
# The total number of nodes | |
nodx = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Solve the 1D diffusion equation using CN and finite differences.""" | |
from time import sleep | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
# The total number of nodes | |
nnodes = 10 | |
# The total number of times |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Solve the 1D diffusion equation using CN and finite differences.""" | |
from time import sleep | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
# The total number of nodes | |
nodx = 3 | |
nody = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpy import * | |
from matplotlib.pyplot import * | |
from time import sleep | |
import numpy as np | |
import networkx as nx | |
dim = [3,2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpy import * | |
from matplotlib.pyplot import * | |
from time import sleep | |
import numpy as np | |
import networkx as nx | |
dim = [2,2] |