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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Sep 19 12:17:23 2011 | |
@author: Jukka | |
Elementtimenetelmät 1, syksy 2011 | |
Harjoitustehtävät 2, tehtävä 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Sep 19 13:09:12 2011 | |
@author: Jukka | |
Elementtimenetelmät 1, syksy 2011 | |
Harjoitustehtävät 2, tehtävä 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
""" | |
Create new Lagrange element | |
""" | |
function create_lagrange_element(element_name, X, P, dP) | |
nnodes, dim = size(X) | |
A = zeros(nnodes, nnodes) | |
for i=1:nnodes | |
A[i,:] = P(X[i,:]) | |
end |
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
using ForwardDiff, BenchmarkTools, Tensors, DiffResults, LinearAlgebra | |
using ForwardDiff: value | |
const quadrature_points = ((0.23692688505618908, -0.906179845938664), | |
(0.47862867049936647, -0.538469310105683), | |
(0.56888888888888890, 0.000000000000000), | |
(0.47862867049936647, 0.538469310105683), | |
(0.23692688505618908, 0.906179845938664)) | |
function project_from_slave_to_master(::Type{Val{:Seg2}}, x1, n1, xm1, xm2) |
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
# This file is a part of JuliaFEM. | |
# License is MIT: see https://github.com/JuliaFEM/PDEAssembler.jl/blob/master/LICENSE | |
using FEMBase, Base.Threads | |
struct Poisson <: FieldProblem end | |
FEMBase.get_unknown_field_name(::Problem{Poisson}) = "u" | |
function FEMBase.assemble_elements!(problem::Problem{Poisson}, |
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
function StatefulLogin({ login }) { | |
const [showError, setShowError] = useState(false) | |
async function onLogin(username, password) { | |
try { | |
await login(username, password) | |
setShowError(false) | |
} catch (error) { | |
setShowError(true) | |
} | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="theme-color" content="#000000" /> | |
<meta | |
name="description" | |
content="Web site created using create-react-app" |
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
import numpy as np | |
import matplotlib.pylab as plt | |
print("Hello, world!") | |
x = np.linspace(0, np.pi) | |
y = np.sin(x) | |
plt.plot(x, y) |
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
println("Hello, world!") |
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
|
OlderNewer