Fortran array memory layout: (1,1), (2,1) (3,1) (1,2) (2,2) (3,2) (1,3) (2,3) (3,3) C++ array memory layout: [0][0], [0][1], [0][2], [1][0], [1][1], [1][2], [2][0], [2][1], [2][2].
57{
58
59 int nnode = elem->n_nodes();
62
63
64
66 {
68
69
71 mooseError(
"Scaling factors other than unity are not yet supported");
73 mooseError(
"All coupled variables must be full order lagrangian");
74
77 }
78
80
81
83
87
91
94
95
96 if (false)
97 {
102 }
103
104
108
110 {
112
114 mooseError(
"All auxiliary variables must be full order Lagrangian");
115
118 }
119
122
126
127
130
132 {
135 }
136
137
140
141
142 if (do_residual && do_jacobian)
144 else if (!do_residual && do_jacobian)
146 else if (do_residual && !do_jacobian)
148 else
150
151
157
158
161
162 int nrhs = 1;
164
167 std::vector<Real> times{time - dt, time - dt};
168
169 std::array<Real, 8> energy;
170 int jelem = elem->id() + 1;
172
173 int npredf = nvar_aux;
174
175
177 int idummy = 0;
178
179
181 {
183 std::copy(statev_old.begin(), statev_old.end(),
_statev_copy.begin());
184 }
185
186
190 energy.data(),
191 &ndofel,
192 &nrhs,
197 &dim,
198 &nnode,
203 &jtype,
204 times.data(),
205 &dt,
206 &idummy ,
207 &idummy ,
208 &jelem,
209 nullptr ,
210 &idummy ,
211 nullptr ,
212 nullptr ,
214 &npredf ,
215 nullptr ,
216 &ndofel ,
217 nullptr ,
218 &idummy ,
219 &pnewdt,
220 nullptr ,
221 &idummy ,
222 &rdummy
223 );
224
226 {
229 }
230
231
232
233
234 if (do_residual)
237
238
239 if (do_jacobian)
244 -1.0);
245}
void mooseError(Args &&... args)
for(PetscInt i=0;i< nvars;++i)
std::size_t _statev_index_old
std::vector< Real > _props
props
const int _jtype
Abaqus element type.
std::size_t _statev_index_current
std::array< std::map< dof_id_type, std::vector< Real > >, 2 > _statev
const unsigned int _dim
The dimension of the mesh, e.g. 3 for hexes and tets, 2 for quads and tris.
const NumericVector< Number > *const & currentSolution() const override
virtual Real & dt() const
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
virtual Real & time() const
TagID systemMatrixTag() const override
TagID residualVectorTag() const override
virtual const NumericVector< Number > *const & currentSolution() const override final
bool hasVector(const std::string &tag_name) const
virtual NumericVector< Number > * solutionUDot()
unsigned int number() const
NumericVector< Number > & solutionOld()
virtual bool hasMatrix(TagID tag) const
void addJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
void addResiduals(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
std::vector< Real > _coords
std::vector< Real > _all_udotdot_dof_values
std::vector< Real > _all_aux_var_dof_increments
std::vector< dof_id_type > _var_dof_indices
dof indices of all coupled variables
std::vector< dof_id_type > _all_dof_indices
std::vector< Real > _aux_var_values_to_uel
std::vector< Real > _all_udot_dof_values
std::vector< dof_id_type > _all_aux_var_dof_indices
DenseVector< Real > _local_re
DenseMatrix< Real > _local_ke
std::vector< Real > _all_dof_increments
std::vector< dof_id_type > _aux_var_dof_indices
std::vector< Real > _all_aux_var_dof_values
std::vector< Real > _all_dof_values
std::vector< T > & get_values()
void resize(const unsigned int new_m, const unsigned int new_n)
virtual void get(const std::vector< numeric_index_type > &index, T *values) const
auto index_range(const T &sizable)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)