Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next release #74

Merged
merged 39 commits into from
Mar 12, 2016
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7a2c56d
Adding files
Dec 9, 2015
2a9d34f
Adding files
Dec 9, 2015
98fe4a2
Removed dir:'Content', saved locally if this was a mistake...
Dec 9, 2015
8377459
Removed dir:'Content', saved locally if this was a mistake...
Dec 9, 2015
70575bb
Starting documentation
Dec 10, 2015
3eeba0b
Partial commit
Dec 14, 2015
42f61ee
fixing merge error
Dec 14, 2015
029f273
Adding file
Dec 14, 2015
832486f
Added some documentation, and 'import modena' to foamAgeing. No longe…
Dec 14, 2015
37750b3
Documentation
Dec 15, 2015
335d7d9
Merge remote-tracking branch 'upstream/nextRelease' into nextRelease
Dec 15, 2015
6cba987
Merge remote-tracking branch 'upstream/nextRelease' into nextRelease
Dec 17, 2015
8c5ee65
Polymer density exact task modification
Dec 28, 2015
e3070fe
Merge error in Readme.md from examples/twoTanksFortran
Dec 28, 2015
eea190e
Edited function for locating 'MoDeNaModels' in 'src/python/__init__.py'
Dec 29, 2015
395e8a4
Added documentation ++. Two problems: 1. Solubility 2. SurfaceTension
Dec 30, 2015
d60e1f5
Merge pull request #59 from sigveka/nextRelease
henrus Dec 30, 2015
f30987e
Merge pull request #58 from japaf:recon
henrus Dec 30, 2015
b537391
BUGFIX: Hardcoded paths and version
henrus Dec 30, 2015
2ad7dc9
Resolve merge conflict (Model directory renamed)
henrus Dec 30, 2015
5ae508d
Fixed 'strange problem', forgot to define IndsxSet
Jan 6, 2016
ed52c35
restoring missing files for foam reconstruction (deleted at merging)
Jan 14, 2016
3825604
Merge pull request #63 from japaf/reconstruction
henrus Jan 14, 2016
b027028
Merge pull request #60 from sigveka/nextRelease
henrus Jan 14, 2016
782bb7c
Update from upstream
Jan 14, 2016
b38f57b
fixing merge error
Jan 20, 2016
9bd5d2f
Documentation
Jan 22, 2016
5fbacaa
Cleaning up before pull request
Jan 22, 2016
5dcf101
I added an old version of Strategy.py, fixed now
Jan 22, 2016
8ca71e5
Editing Strategy.py, unfinished work was included in previous commit
Jan 22, 2016
8619895
Fixing binaries added to commits
Jan 22, 2016
ffb4bdf
Removing SpherePack
Jan 22, 2016
09ab741
Merge remote-tracking branch 'upstream/nextRelease' into nextRelease
Jan 25, 2016
5c343c2
Fixed bug on autoinitialisation, removed dependency of variable name …
Feb 13, 2016
a111732
Merge remote-tracking branch 'upstream/nextRelease' into nextRelease
Feb 26, 2016
ab86baa
wq
Mar 12, 2016
6c36fdf
Loading module based on surrogate '_id'
Mar 12, 2016
5a42de1
Merge error fixed
Mar 12, 2016
5c076d7
Removed 'Solubility/src/Makefile' by mistake (?)
Mar 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/python/SurrogateModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@ def Parse(self, formula, debug=False, model='', stack={}, delim=0, \
else:
return model


class SurrogateModel(DynamicDocument):
"""Base class for surrogate models.

Expand Down Expand Up @@ -919,7 +918,7 @@ def new(Min, Max):
v.max = min(v.max, i[k].max)
else:
i[k] = new(v.min, v.max)

return i


Expand Down Expand Up @@ -1205,20 +1204,20 @@ def loadFailing(self):
__raw__={'outsidePoint': { '$exists': True}}
).first()


@classmethod
def loadFromModule(self):
"""Method importing a surrogate model module."""
collection = self._get_collection()
doc = collection.find_one({ '_cls': { '$exists': False}})
modName = re.search('(.*)(\[.*\])?', doc['_id']).group(1)
#TODO: This solution still requires the user to give the modena
# application the same name as the surrogate model '_id'
try:
mod = __import__(modName)
return (i for i in modena.BackwardMappingModel.get_instances() if i._id == modName).next()
except ImportError:
print "Could not find MoDeNa model '%s'" %(modName)


@classmethod
def get_instances(self):
"""Method returning an iterator over all SurrogateModel instances."""
Expand Down