Revision 7a9629f010442923ca7d6ca179b4f511abe0a9bc authored by wenqing on 03 February 2023, 17:46:14 UTC, committed by wenqing on 03 February 2023, 17:46:14 UTC
Use inclined elements in ComponentTransport See merge request ogs/ogs!4228
ComputeResiduum.cpp
/**
* \file
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#include "ComputeResiduum.h"
#include "MathLib/LinAlg/LinAlg.h"
namespace ProcessLib
{
GlobalVector computeResiduum(GlobalVector const& x, GlobalVector const& xdot,
GlobalMatrix const& M, GlobalMatrix const& K,
GlobalVector const& b)
{
using namespace MathLib::LinAlg;
GlobalVector residuum;
matMult(M, xdot, residuum);
matMultAdd(K, x, residuum, residuum);
axpy(residuum, -1, b);
scale(residuum, -1);
return residuum;
}
} // namespace ProcessLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...