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

Matlab and Objective-C #1

Closed
bkeepers opened this issue Oct 31, 2014 · 1 comment
Closed

Matlab and Objective-C #1

bkeepers opened this issue Oct 31, 2014 · 1 comment

Comments

@bkeepers
Copy link

Matlab and Objective-C are often misidentified due to their common use of the .m extension. This is a common issue so I'm creating a meta-issue that we can point all the reports to.

@bkeepers
Copy link
Author

Doh, sorry, wrong repo.

ambrad added a commit that referenced this issue Jan 20, 2015
1. Bug #1: valVec was used when val was meant.

2. Bug #2: val_node.size() was used when val_node(0,0).size() was meant.

3. Use derivative_dimensions.push_back(8*neq) rather than 24. This then works
for all hex-based problems. The problem with not specifying exactly the right
number is this type of formula then fails:
    int num_dof = val_node(0,0,0).size();
    int neq = num_dof / numNodes;
This of course is a kludge until we get a proper derivative-dimension
calculation in there, but it's better than 24.
ambrad added a commit that referenced this issue Jan 20, 2015
To do this, I introduced ScalarRefT into PHAL::AlbanyTraits::{Residual,
Jacobian, Tangent, DistParamDeriv}. Their definitions may change, but the
important thing is that PHAL::AlbanyTraits::Residual::ScalarRefT and
PHAL::AlbanyTraits::Jacobian::ScalarRefT, etc., exist. This lets us treat a
reference to a ScalarT in a uniform way. In particular, this pattern can be
used:
    ScalarRefT
      valptr = (this->tensorRank == 0 ? this->val[eq](cell,node) :
                this->tensorRank == 1 ? this->valVec[0](cell,node,eq) :
                this->valTensor[0](cell,node, eq/numDim, eq%numDim));

With this commit, and with Albany built with
    -D ENABLE_KOKKOS:BOOL=OFF \
I get this for SteadyHeat3D:
    Start 1: SteadyHeat3D
1/4 Test #1: SteadyHeat3D .....................   Passed    4.10 sec
    Start 2: SteadyHeat3D_10x10x10_ioss
2/4 Test #2: SteadyHeat3D_10x10x10_ioss .......   Passed    7.70 sec
    Start 3: SteadyHeat3D_10x10x10_ascii
3/4 Test #3: SteadyHeat3D_10x10x10_ascii ......   Passed    8.30 sec
    Start 4: SteadyHeat3D_Tpetra
4/4 Test #4: SteadyHeat3D_Tpetra ..............   Passed    3.83 sec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant