Skip to content

Commit

Permalink
Example and some path fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
praksharma committed Jun 20, 2023
1 parent 86b2e3f commit e16408a
Show file tree
Hide file tree
Showing 3 changed files with 494 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DeepINN/geometry/domains/domainoperations/sampler_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import torch
import warnings

from torchphysics.problem.spaces.points import Points
from ....geometry.spaces.points import Points # some relative path fixing
#from torchphysics.problem.spaces.points import Points


def _inside_random_with_n(main_domain, domain_a, domain_b, n, params, invert, device):
Expand Down
66 changes: 66 additions & 0 deletions Tutorials/Basic_domains.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# This is only valid when the package is not installed\n",
"import sys\n",
"sys.path.append('/home/hell/Desktop/repos/DeepINN/')"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Using default backend: PyTorch\n",
"Using Pytorch: 2.0.1+cu117\n"
]
}
],
"source": [
"import DeepINN\n",
"import DeepINN.geometry as tp"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"T = tp.spaces.R1('t') # we need a one dimensional space\n",
"I = tp.domains.Interval(T,0,5 )"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
426 changes: 426 additions & 0 deletions Tutorials/domain_creation.ipynb

Large diffs are not rendered by default.

0 comments on commit e16408a

Please sign in to comment.