fixed robin BC
This commit is contained in:
parent
decfe1d710
commit
bbceb5cf06
8 changed files with 47974 additions and 1832 deletions
|
|
@ -30,7 +30,7 @@ int main(int argc, char **argv )
|
|||
// Parameteres
|
||||
// ##########################################
|
||||
|
||||
double dt = 1.0; // time step
|
||||
double dt = 1.0; // time step
|
||||
int steps = 20; // number of time iterations
|
||||
|
||||
double u0_mug = 18.0;
|
||||
|
|
@ -45,14 +45,14 @@ int main(int argc, char **argv )
|
|||
// Initializing FEM matrix !pattern! (only zero entries now)
|
||||
FEM_Matrix SK(mesh_c); // CRS matrix
|
||||
//SK.writeBinary("sparseMatrix.bin");
|
||||
// SK.Debug();
|
||||
//SK.Debug();
|
||||
|
||||
vector<double> fv(SK.Nrows(), 0.0);
|
||||
SK.CalculateRHS(fv, [](double x, double y) {return 0;}); // rhs (f=0)
|
||||
|
||||
SK.CalculateLaplace_mult(fv); // stiffness matrix (+K)
|
||||
SK.AddMass_mult(fv, 1.0/dt); // add mass matrix (+M/dt)
|
||||
// SK.ApplyRobinBC_mult(fv, u_out); // apply Robin-bnd (+C = +F)
|
||||
SK.ApplyRobinBC_mult(fv, u_out); // apply Robin-bnd (+C = +F)
|
||||
// SK = M/dt + K + C = F
|
||||
|
||||
// SK.Debug();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue