Skip to content

Commit 1fd8d1c

Browse files
committed
not quite right
1 parent a4831d3 commit 1fd8d1c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/tensor_computes/TimeTensorCompute.C

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ TimeTensorCompute::TimeTensorCompute(const InputParameters & parameters)
2727
void
2828
TimeTensorCompute::computeBuffer()
2929
{
30-
_u = torch::tensor({_time}, MooseTensor::floatTensorOptions());
30+
_u = torch::tensor({_time}, MooseTensor::floatTensorOptions()).expand(_domain.getShape());
31+
std::cout << _u;
3132
}

test/tests/neml2/old_state.i

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,22 @@
1818
buffer = A
1919
real = 2
2020
[]
21+
[]
22+
[Solve]
23+
[time]
24+
type = TimeTensorCompute
25+
buffer = time
26+
[]
2127
[dAdt]
2228
type = NEML2TensorCompute
2329
neml2_input_file = neml2_input.i
2430
neml2_model = rate
25-
swift_inputs = 'A B'
26-
neml2_inputs = 'forces/A forces/B'
31+
swift_inputs = 'A time'
32+
neml2_inputs = 'forces/A forces/t'
2733
neml2_outputs = 'state/dAdt'
2834
swift_outputs = 'dAdt'
2935
[]
3036
[]
31-
[Solve]
32-
33-
[]
3437
[]
3538

3639
[Postprocessors]

0 commit comments

Comments
 (0)